Repository navigation
Commit fa47951
committed
fix: keep slash commands working while a turn is running
`handleSubmit` treated every submission as guidance while a turn was running, including
the `/exit` command that `PromptInput` deliberately lets through. The CLI then queued
"/exit" as a user message and steered the turn instead of quitting.
Commands are not prompts, so they take the normal path again: non-exit commands stay
blocked while the turn runs, and `/exit` still quits.
Found by driving the real TUI in a pseudo-terminal against a stub OpenAI-compatible
server. The guidance path itself behaved as designed: the streaming answer was aborted
after 21 of 130 chunks, the partial text was kept and marked `meta.interrupted`, and the
follow-up request carried it together with the guidance as a user message.
Refs #113, #1171 parent 96f71c2 commit fa47951
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
142 | 161 | | |
143 | 162 | | |
144 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
| |||
0 commit comments