focus/crates/focus-tui
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
..
src fix(core): stream tool output live via ToolExecutionUpdate events 2026-08-09 22:55:16 +08:00
tests fix(tui): merged tool request+result blocks; fix wheel-down bottom jump 2026-08-09 22:43:01 +08:00
Cargo.toml feat(tui): add focus-tui terminal UI 2026-08-09 21:35:58 +08:00