refactor(open-sse): add reasoningDelta helper, dedup thinking deltas (B4)
Centralize the reasoning_content delta shape (optional assistant role) used by claude/gemini/kiro/codex/commandcode response translators. Keeps the cross-format convention consistent for future translators. Output byte-for-byte identical; golden + gate clean. Ollama left as-is (mutates existing delta object). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
997860aa1f
commit
6597b81e5e
7 files changed
+18
-12
No files matched your search
@@ -0,0 +1,6 @@
|
||||
// Build OpenAI delta carrying reasoning_content (optional leading assistant role)
|
||||
export function reasoningDelta(text, withRole = false) {
|
||||
return withRole
|
||||
? { role: "assistant", reasoning_content: text }
|
||||
: { reasoning_content: text };
|
||||
}
|
||||
Reference in new issue
Block a user