picoclaw/pkg/channels/pico
Andy Lo-A-Foe 2f01d210f8
feat(pico): add ChatStream support for real-time token streaming
Add full ChatStream support to the pico channel, enabling real-time token
streaming to connected WebSocket clients.

Changes:
- Add streamer tracking in turnState (acquire/release per conversation turn)
- Integrate ChatStream in pipeline_llm (use when streamer is available)
- Wire streamer lifecycle through agent loop
- Add Streaming field to PicoSettings config
- Skip bus publish when response was already streamed
- Add streaming test scaffold

When a channel supports streaming and has it enabled in config, the agent
loop calls ChatStream() instead of Chat(), allowing tokens to flow in
real-time through the WebSocket as the LLM generates them.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-11 16:42:33 +02:00
..
client.go merge: integrate main channel config changes 2026-04-14 00:34:17 +08:00
client_test.go refactor(pico): unify message kind handling of tool_calls and thought (#2680) 2026-04-28 10:17:12 +08:00
init.go refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
pico.go feat(pico): add ChatStream support for real-time token streaming 2026-05-11 16:42:33 +02:00
pico_test.go refactor(pico): unify message kind handling of tool_calls and thought (#2680) 2026-04-28 10:17:12 +08:00
protocol.go refactor(pico): unify message kind handling of tool_calls and thought (#2680) 2026-04-28 10:17:12 +08:00