Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): render async Codex messages #9227

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9227/headopened View on GitHub

Showing 2 changed files with 66 additions and 4 deletions.

x
0 of 2 viewed, 2 left
55 additions and 0 deletionsapps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.tsModified
View file
@@ -1797,6 +1797,61 @@
expect(message?.streaming).toBe(false);
+ it("keeps async assistant messages separate from the streaming commentary item", async () => {
+ const harness = await createHarness();
+ const base = {
+ provider: ProviderDriverKind.make("codex"),
+ createdAt: "2026-01-01T00:00:00.000Z",
+ threadId: asThreadId("thread-1"),
+ turnId: asTurnId("turn-async-message"),
+ };
+ const completeAssistant = (eventId: string, itemId: string, detail: string) =>
+ ({
+ ...base,
+ type: "item.completed",
+ eventId: asEventId(eventId),
+ itemId: asItemId(itemId),
+ payload: { itemType: "assistant_message", status: "completed", detail },
+ }) as const;
+ const commentaryDelta = (eventId: string, delta: string) =>
+ ({
+ ...base,
+ type: "content.delta",
+ eventId: asEventId(eventId),
+ itemId: asItemId("commentary"),
+ payload: { streamKind: "assistant_text", delta },
+ }) as const;
+​
+ await harness.emitAndDrain([