fix(run): align mini with current session contracts (#35354)

This commit is contained in:
Simon Klee
2026-07-04 21:14:01 +02:00
committed by GitHub
parent ba07481b59
commit 57fb3e5cc5
10 changed files with 1063 additions and 80 deletions
@@ -50,6 +50,23 @@ function structured(next: StreamCommit) {
}
describe("run entry body", () => {
test("renders a failed direct shell as an error instead of completed success", () => {
expect(
entryBody(
commit({
kind: "tool",
text: "Shell exited with code 7",
phase: "final",
source: "tool",
tool: "bash",
toolState: "error",
toolError: "Shell exited with code 7",
shell: { callID: "sh_failed", command: "false" },
}),
),
).toEqual({ type: "text", content: "✖ bash failed: Shell exited with code 7" })
})
test("renders assistant, reasoning, and user entries in their display formats", () => {
expect(
entryBody(