fix(stdio): /mode is reserved even while a question prompt is active
Review finding at the seam of two surfaces this branch added to the same stdin: with an ask_user_question (or plan-review) prompt active, the line handler dispatched every line as the answer first, so '/mode plan' typed mid-question was recorded as free-text feedback — model-visible in the tool result — and the mode never changed. Command handling now runs before answer dispatch: the command executes, the question stays pending and still owns the next non-command line. A literal '/mode…' free-text answer is the trade-off deliberately spent — a swallowed command that becomes review feedback costs far more than that contrived answer shape.
This commit is contained in:
@@ -50,7 +50,7 @@ Mode definitions are validated plugin Config — per repo convention, changeable
|
||||
|
||||
### In the terminal
|
||||
|
||||
The stdio app gains `/mode` (print the current and available modes) and `/mode <name>` (switch + banner — a command line, never sent to the model). The exit review prompts right in the terminal with no new machinery: it is an ordinary user-interaction question, so it rides the stdio provider's one-prompt-owns-stdin queue that `ask_user_question` already uses.
|
||||
The stdio app gains `/mode` (print the current and available modes) and `/mode <name>` (switch + banner — a command line, never sent to the model, and reserved even while a question prompt is active: a command is never recorded as an answer). The exit review prompts right in the terminal with no new machinery: it is an ordinary user-interaction question, so it rides the stdio provider's one-prompt-owns-stdin queue that `ask_user_question` already uses.
|
||||
|
||||
### Over ACP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user