Summary
Add real token-by-token streaming to the agentic tool loop
(pkg/tools/loop.go) so phase 2 responses stream from the provider
instead of using simulated word-by-word chunking.
Context
Issue #44 adds StreamWithTools to the provider interface. The first
iteration (PR TBD) implements real streaming for phase 1 (no tools)
and keeps simulated streaming for phase 2 (tool loop). This issue
tracks the follow-up to make phase 2 streaming real.
What needs to change
RunToolLoop accepts a streaming callback parameter
- On the final iteration (when
StopReason == EndTurn), use
StreamWithTools instead of CompleteWithTools and pipe text
deltas through the callback
- All consumers benefit: OpenAI API, Chat TUI, A2A server
Depends on
Summary
Add real token-by-token streaming to the agentic tool loop
(
pkg/tools/loop.go) so phase 2 responses stream from the providerinstead of using simulated word-by-word chunking.
Context
Issue #44 adds
StreamWithToolsto the provider interface. The firstiteration (PR TBD) implements real streaming for phase 1 (no tools)
and keeps simulated streaming for phase 2 (tool loop). This issue
tracks the follow-up to make phase 2 streaming real.
What needs to change
RunToolLoopaccepts a streaming callback parameterStopReason == EndTurn), useStreamWithToolsinstead ofCompleteWithToolsand pipe textdeltas through the callback
Depends on