Show prompts delivered into the running reply distinctly

This commit is contained in:
2026-11-07 01:42:48 +00:00
parent 983136a2b4
commit 1a0f999fb1
14 changed files with 97 additions and 21 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ func TestChatPromptDuringTurnIsSteeredImmediately(t *testing.T) {
t.Fatalf("first prompt queued: %+v", ack)
}
waitFor(t, "first prompt", func() bool { return broker.promptCount() == 1 })
if ack := sendPrompt(t, server.ctx, conn, "p2", "two", "op-2"); ack.ChatQueued {
if ack := sendPrompt(t, server.ctx, conn, "p2", "two", "op-2"); ack.ChatQueued || !ack.ChatSteered {
t.Fatalf("mid-turn prompt was queued instead of forwarded: %+v", ack)
}
broker.steerMu.Lock()
@@ -130,7 +130,7 @@ func TestChatPromptDuringTurnIsSteeredImmediately(t *testing.T) {
t.Fatalf("steered prompt was stored: %v", ops)
}
// A retry of the same operation is acknowledged, never forwarded again.
if ack := sendPrompt(t, server.ctx, conn, "p2-retry", "two", "op-2"); ack.ChatQueued {
if ack := sendPrompt(t, server.ctx, conn, "p2-retry", "two", "op-2"); ack.ChatQueued || !ack.ChatSteered {
t.Fatalf("retry ack = %+v", ack)
}
broker.steerMu.Lock()