focus/crates/focus-core/tests
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
..
agent_loop.rs fix(core): stream tool output live via ToolExecutionUpdate events 2026-08-09 22:55:16 +08:00
batch_tests.rs feat(core): agent message setters, thinking support, reducer arg-slot fix 2026-08-09 20:59:39 +08:00
json_tests.rs feat(core): agent message setters, thinking support, reducer arg-slot fix 2026-08-09 20:59:39 +08:00
model_tests.rs feat(core): agent message setters, thinking support, reducer arg-slot fix 2026-08-09 20:59:39 +08:00
provider_tests.rs fix(providers): keep the API's real tool-call ids across turns 2026-08-09 22:07:18 +08:00
tool_tests.rs fix(core): stream tool output live via ToolExecutionUpdate events 2026-08-09 22:55:16 +08:00