diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-13 08:21:23 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-13 08:21:23 -0500 |
| commit | 1c7b30005af27dcc3345f7dee0fe0404c3bc8c49 (patch) | |
| tree | 25eb99ddfce74749264aa30dcf2992c207cc71a3 /Omni/Ide/tips.sh | |
| parent | f752330c9562b7a1bbdce15c05106a577daa2392 (diff) | |
fix: accumulate streaming tool call arguments across SSE chunks
OpenAI's SSE streaming sends tool calls incrementally - the first chunk
has the id and function name, subsequent chunks contain argument fragments.
Previously each chunk was treated as a complete tool call, causing invalid
JSON arguments.
- Add ToolCallDelta type with index for partial tool call data
- Add StreamToolCallDelta chunk type
- Track tool calls by index in IntMap accumulator
- Merge argument fragments across chunks via mergeToolCallDelta
- Build final ToolCall objects from accumulator when stream ends
- Handle new StreamToolCallDelta in Engine.hs pattern match
Diffstat (limited to 'Omni/Ide/tips.sh')
0 files changed, 0 insertions, 0 deletions
