fix(ai): accept clean OpenAI Chat stream endings

This commit is contained in:
Aiden Cline 2026-07-22 03:56:18 +00:00 committed by opencode-agent[bot]
commit 1380707e0d
7 changed files with 118 additions and 28 deletions

View file

@ -194,7 +194,7 @@ const FakeProtocol = Protocol.make<FakeBody, string, string, void>({
event: Schema.String,
initial: () => undefined,
step: (_, frame) => Effect.succeed([undefined, [{ type: "text-delta", id: "text-0", text: frame }]] as const),
onHalt: () => [{ type: "finish", reason: "stop" }],
onHalt: () => Effect.succeed([{ type: "finish", reason: "stop" }]),
},
})