Commit 4b42898
committed
fix(telegram): keep tool progress after non-final commentary
Root cause: non-final inter-tool commentary suppressed the progress draft via
prepareAnswerLaneForText. In non-persist progress streaming mode (with
streaming.progress.commentary enabled) commentary arrives as assistant partial
text (onPartialReply -> ingestDraftLaneSegments), whose answer-lane rotation in
rotateAnswerLaneAfterToolProgress called suppressProgressDraftState. The next
tool's pushStreamToolProgress was then dropped on the compositor's
progressSuppressed guard, so the tool-progress lines after commentary vanished.
Fix: in progress mode, route non-final answer-lane partial text into the shared
progress draft's commentary lane (progressDraft.pushCommentaryProgress, keyed
per assistant message) so commentary and tool progress accumulate in one open
draft instead of tearing the lane down. This reuses the same commentary lane the
onItemEvent preamble path already uses. The pushStreamToolProgress finalized /
final-delivery guard and the final-answer cleanup path are left unchanged, and
no new config is added.
Adds a dispatch regression covering the commentary -> tool -> commentary -> tool
interleave that asserts every tool-progress line stays in the draft.
This is the Telegram consumer-side fix, independent of #90883 (the commentary
producer); it should land first so enabling commentary + non-persist progress
does not immediately regress.
Fixes #90962
Signed-off-by: Jason Yao <wsyjh8@gmail.com>1 parent 96c5d33 commit 4b42898
2 files changed
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2424 | 2424 | | |
2425 | 2425 | | |
2426 | 2426 | | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
2427 | 2475 | | |
2428 | 2476 | | |
2429 | 2477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
970 | 973 | | |
971 | 974 | | |
972 | 975 | | |
| |||
1165 | 1168 | | |
1166 | 1169 | | |
1167 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1168 | 1181 | | |
1169 | 1182 | | |
1170 | 1183 | | |
| |||
2021 | 2034 | | |
2022 | 2035 | | |
2023 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
2024 | 2041 | | |
2025 | 2042 | | |
2026 | 2043 | | |
| |||
0 commit comments