fix: keep in-flight cleanup internal

This commit is contained in:
2026-07-27 16:38:47 +09:00
parent 1dc6429b87
commit 5d1950647e
6 changed files with 3 additions and 70 deletions
@@ -225,7 +225,6 @@ export type Event =
reason: string;
};
}
| { "event": "in_flight_cleared" }
| { "event": "text_delta"; "data": { text: string } }
| { "event": "text_done"; "data": { text: string } }
| { "event": "thinking_start" }
@@ -859,53 +859,6 @@ Deno.test("projectConsole renders snapshot entries and in-flight output", () =>
);
});
Deno.test("projectConsole clears transient in-flight rows", () => {
const projection = projectConsole([
{
eventId: "20",
event: {
event: "snapshot",
data: {
entries: [
{
kind: "assistant_item",
ts: 1,
item: {
kind: "message",
role: "assistant",
content: [{ kind: "text", text: "latest committed" }],
},
},
],
greeting: {
worker_name: "Worker",
cwd: "/repo",
provider: "provider",
model: "model",
scope_summary: "bounded",
tools: [],
context_window: 100,
context_tokens: 20,
},
status: "running",
in_flight: {
blocks: [{ kind: "text", text: "stale partial" }],
},
},
} satisfies Event,
},
{
eventId: "21",
event: { event: "in_flight_cleared" } satisfies Event,
},
]);
assertEquals(
projection.lines.map((line) => `${line.kind}:${line.body}`),
["assistant:latest committed"],
);
});
Deno.test("projectConsole reseeds visible rows from segment rotation", () => {
const projection = projectConsole([
{
@@ -303,9 +303,6 @@ export function applyProtocolEvent(
next.lines.push(inFlightLine(envelope.eventId, block, next.cwd));
}
break;
case "in_flight_cleared":
next.lines = next.lines.filter((line) => line.kind !== "in_flight");
break;
case "status":
next.status = event.data.status;
break;