docs/design/nonblocking-slash-commands.md
The interactive input router currently queues every slash command except
/btw while a model response is streaming. This makes local UI controls wait
for the active conversation turn even when their result does not depend on that
turn.
SlashCommand gains an opt-in canRunDuringStreaming capability. The default
remains false. While the main model is responding, the input router resolves the
submitted command through the existing slash-command tree. An opted-in command
is sent directly to the slash-command processor; all other slash commands keep
using the existing serialized message queue.
The direct path does not go through submitQuery. That function owns the model
turn lifecycle and deliberately rejects concurrent top-level turns. Keeping
local commands outside it avoids sharing abort controllers, submission flags,
or model-stream counters with the active response.
The slash-command processor and command results already update Ink through React state. The initial commands therefore do not write directly to terminal stdout while Ink is rendering.
/status, /about, and /status paths: read local runtime information and
append an Ink history item./settings: opens the settings dialog; saved changes apply through the
existing settings hooks without replacing the active conversation turn./help: opens the static help dialog.The following categories remain serialized:
/summary,
/compress, /model <model> <prompt>, and /goal./context, /stats, /copy, /diff, and /recap./btw keeps its specialized concurrent model-request path. /quit keeps its
existing immediate cancellation path. Ctrl+Q continues to force any submission
to wait for idle, including an otherwise opted-in command.
Unit coverage verifies that opted-in commands bypass both submitQuery and the
message queue during a response, while unmarked slash commands remain queued.
Command tests pin the initial capability declarations. Interactive E2E checks
should start a visibly streaming response, open each opted-in command, close any
dialog, and confirm that the original response continues and completes.