Commit 86641e4
committed
Tidy up the AttachedFiles plumbing
Pure cleanup, no behaviour change:
* buildTaskSystemMessage now uses a single strings.Builder throughout
instead of mixing string concatenation with a one-off builder for the
attached_files block.
* CreateUserMessageWithAttachment introduces a noAttachment closure so
the seven best-effort fallback paths share one return statement instead
of repeating session.UserMessage(userContent), "" everywhere.
* branch.go drops a redundant cloneStringSlice on the result of
AttachedFilesSnapshot, which already returns an independent copy.
* The over-eager three-line comments at the AddAttachedFile call sites
and on top of newSubSession are replaced with a single line each that
states the contract.
Assisted-By: docker-agent1 parent 359b8f6 commit 86641e4
4 files changed
Lines changed: 33 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 143 | + | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
| |||
304 | 302 | | |
305 | 303 | | |
306 | 304 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
410 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
414 | | - | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
418 | 425 | | |
419 | 426 | | |
420 | | - | |
| 427 | + | |
421 | 428 | | |
422 | 429 | | |
423 | 430 | | |
| |||
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
438 | | - | |
| 445 | + | |
439 | 446 | | |
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
443 | | - | |
| 450 | + | |
444 | 451 | | |
445 | 452 | | |
446 | 453 | | |
| |||
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | | - | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| |||
461 | 468 | | |
462 | 469 | | |
463 | 470 | | |
464 | | - | |
| 471 | + | |
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
468 | 475 | | |
469 | | - | |
| 476 | + | |
470 | 477 | | |
471 | 478 | | |
472 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
71 | 69 | | |
72 | | - | |
73 | | - | |
| 70 | + | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments