mirror of
https://github.com/cline/cline.git
synced 2026-09-19 10:13:34 +08:00
S7 (a + c) of the message-state redesign — removes two order-dependent hacks now that
TurnState is authoritative.
(a) ask_question / ask_followup_question are suppressed from the generic say:"tool"
renderer (both content_start and content_end). The SdkInteractionCoordinator services
these and emits the proper ask:"followup"; the generic tool row was an orphan partial
that never finalized and defeated the tail heuristics. The CLI already does this.
(c) The `done` handler no longer synthesizes a trailing ask:"completion_result" — that
was the "must be last message" hack (ENG-1887) that existed only because the webview
inferred UI mode from the array tail. `done` now emits no transcript message and only
signals turnComplete; the webview reads phase from TurnState (completed when
attempt_completion was used, else awaiting_followup). The green "Task Completed" box
still comes from the say:"completion_result" emitted at attempt_completion content_end.
Translator unit tests updated to the new contract (done → 0 messages, turnComplete=true).
Deferred to a follow-up (lower risk if left): (b) collapsing the approval ask onto the
streaming tool's id (needs cross-coordinator id threading), and (d) the mistake_limit
forced abort (now harmless since phase is authoritative). The persisted-history renderer
still appends its own trailing ask so reopened tasks show the resume affordance —
intentional.
428 SDK unit tests pass; tsc + biome clean.