Commit Graph

3 Commits

Author SHA1 Message Date
DaiChaoXiong 9a2d50ee58 fix(core): stream tool output live via ToolExecutionUpdate events
The agent passed None for on_update, so tools (e.g. shell) never forwarded
their incremental output — the UI only saw the final result. Now:

- EventSink: Send + Sync (the forwarding closure must satisfy ToolUpdateSink)
- ToolUpdateSink becomes lifetime-parameterized (bare trait-object aliases
  default to 'static, which forbade borrowing the caller's sink); all tool
  impls updated to &ToolUpdateSink<'_>
- Agent::execute_single forwards each tool update as a ToolExecutionUpdate
  event (Mutex provides interior mutability inside the Fn closure)
- TUI: running tools show the tail of the output live (newest lines), done
  tools show the head + remaining-line hint

regression test: a streaming tool's on_update texts appear as agent events in
order.
2026-08-09 22:55:16 +08:00
DaiChaoXiong 112342c42e feat(core): agent message setters, thinking support, reducer arg-slot fix
- Agent::set_system_prompt / replace_messages (dynamic prompts + compaction)
- ProviderEventReducer::thinking_delta with per-block tracking
- fix: interleaved text/tool-call streams no longer misroute partial args
  (args aligned per content slot; regression tests added)
2026-08-09 20:59:39 +08:00
DaiChaoXiong a7ddba035a INIT 2026-07-16 17:59:16 +08:00