fix(repl): queue prompt guidance for next turn (#333)
Keep normal prompt submissions during generation queued instead of interrupting the current turn. Add a visible next-turn banner in the prompt area so users can tell their follow-up guidance was accepted, and cover the new behavior with focused tests. Fixes #328 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -316,9 +316,10 @@ export async function handlePromptSubmit(
|
||||
return
|
||||
}
|
||||
|
||||
// Interrupt the current turn when all executing tools have
|
||||
// interruptBehavior 'cancel' (e.g. SleepTool).
|
||||
if (params.hasInterruptibleToolInProgress) {
|
||||
// Prompt submissions during generation should guide the next turn without
|
||||
// interrupting the current one. Keep the explicit interrupt path only for
|
||||
// non-prompt inputs that opt into that behavior.
|
||||
if (mode !== 'prompt' && params.hasInterruptibleToolInProgress) {
|
||||
logForDebugging(
|
||||
`[interrupt] Aborting current turn: streamMode=${params.streamMode}`,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user