story-kit: merge 227_bug_thinking_traces_visible_in_agents_panel_in_release_builds_only

This commit is contained in:
Dave
2026-03-13 18:34:16 +00:00
parent 20a4f0c492
commit 6a477de2e1
3 changed files with 155 additions and 1 deletions

View File

@@ -312,10 +312,11 @@ describe("Thinking traces hidden from agent stream UI", () => {
// AC1: no thinking block
expect(screen.queryByTestId("thinking-block")).not.toBeInTheDocument();
// AC2+AC3: output area renders the text
// AC2+AC3: output area renders the text but NOT thinking text
const outputArea = screen.getByTestId("agent-output-coder-1");
expect(outputArea).toBeInTheDocument();
expect(outputArea.textContent).toContain("Here is the result.");
expect(outputArea.textContent).not.toContain("thinking deeply");
});
// AC3: output-only event stream (no thinking) still works

View File

@@ -175,6 +175,9 @@ export function AgentPanel({
terminalAt: current.terminalAt ?? Date.now(),
},
};
case "thinking":
// Thinking traces are internal model state — never display them.
return prev;
default:
return prev;
}