Repository navigation
Keep an answer visible when the turn continues without work - #1033
Piyushrathoree wants to merge 1 commit into
Conversation
A Stop hook that continues a turn (exit 2) fed the answer it interrupted into the work trail: foldableWork() ended the fold at any activity group below a prose message, including reasoning-only runs, then extended the fold over the prose. Only the continuation's text stayed visible as the reply. An activity run can carry the fold now only when it holds actual tool calls, so a continuation with nothing but thinking leaves both messages in the order the CLI shows them. Commentary on real work still folds as before. Fixes hardbeat920#952.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
What changed
foldableWork()no longer ends the fold at a run of reasoning alone. An activity group can anchor the fold only when it holds actual tool calls, so a turn the agent continued after answering — a Stop hook feeding its message back — keeps the message it interrupted visible, with the continuation below it.Why
Fixes #952. A Stop hook exits 2 to continue the turn, so the transcript ends up prompt → answer → thinking → one more line. The fold treated the thinking as work the answer narrated, demoted the answer into the trail ("thought process"), and showed only the continuation as the reply. The CLI shows both messages in order.
Mid-turn commentary still folds — every run there holds tools; only reasoning-only trails change.
UI
No chrome change. The fold line no longer swallows the first message: both appear in order, and the setup that folded nothing at all now shows no "Show the work" toggle. (Repro needs a Stop hook, so the before state isn't screenshot-able here.)
Checklist
npm run check(npm run check:web: vitest 483 files / 5366 tests passed;tsc --noEmitclean; no Rust touched)Summary by CodeRabbit