fix(commandcode): retry on transient stream error and avoid fake stop chunks

This commit is contained in:
Christian Gennari authored and decolua committed 2026-09-18 17:09:24 +07:00
1 parent b3d6e089c6
commit 092c84eac9
4 files changed
+65 -8

No files matched your search

@@ -133,6 +133,10 @@ function convertMessages(messages = []) {
if (role === ROLE.ASSISTANT) {
const blocks = [];
const rc = m.reasoning_content || m.thought || m.reasoning;
if (rc || (Array.isArray(m.tool_calls) && m.tool_calls.length > 0)) {
blocks.push({ type: "reasoning", text: rc || " " });
}
const text = flattenText(m.content);
if (text) blocks.push({ type: OPENAI_BLOCK.TEXT, text });
if (Array.isArray(m.tool_calls)) {