Commit graph

2 commits

Author SHA1 Message Date
ytahdn
1609bdaa32
feat(web-shell): queue prompts while turns are running (#6005)
* feat(web-shell): queue prompts while turns are running

* fix(web-shell): address pending prompt review feedback

* fix(web-shell): tighten queued prompt event handling

* fix(web-shell): avoid showing active prompt as queued

* fix(web-shell): address queued prompt review follow-ups

* fix(web-shell): address pending prompt review issues

* fix(web-shell): reconcile queued prompt actions from server

* fix(daemon): address pending prompt critical review

* test(webui): expect submit abort signal forwarding

* fix(web-shell): avoid duplicate queued prompt sync

* fix(web-shell): keep local slash commands out of queue

* fix(webui): avoid aborting prompt admission

* fix(daemon): avoid queued prompt cancel cascades

* fix(webui): avoid stale client id for queue cleanup

* test(webui): update stale session queue cleanup expectation

* fix(web-shell): preserve queue reconciliation identity

* fix(web-shell): guard queue clear session writes

---------

Co-authored-by: ytahdn <ytahdn@gmail.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-06-30 14:51:28 +00:00
carffuca
0621ef7d6c
fix(web-shell): defer transcript-appending local commands while a turn streams (#5822)
* fix(web-shell): defer transcript-appending local commands while a turn streams

Local slash commands that echo into the transcript (/context, /stats,
/status, /bug, /model --voice, /skills, /tools, /extensions) appended a user
message mid-turn, which applyTurnCollapse treats as a turn boundary — splitting
the active turn and corrupting its tool/thinking/token counts.

Route these echoes through a single choke point (appendOrDeferLocalUserMessage):
while a turn streams they defer to the prompt queue and re-dispatch as their own
clean turn once it settles. showContextUsage self-guards so the keyboard,
status-bar button and in-chat "context detail" click are all covered.
/extensions install defers via a top-of-branch guard, replacing its bespoke
"wait for turn" message.

* fix(web-shell): disable queue "insert" for command entries

The queue's "insert" action injects a queued message's raw text into the
running turn via enqueueMidTurnMessage; for a slash/shell command the model
would only see the literal "/context …" and the command would never run.
Disable (grey out) the insert action for command entries and guard the
handler, so commands only run when the queue drains and re-dispatches them
through handleSubmit. Plain prompts are unaffected.
2026-06-25 07:10:16 +00:00