feat: royal blue tool names in agent mode + fix README heading display

- Add set_agent_mode() to UiWriter trait for visual mode differentiation
- ConsoleUiWriter uses royal blue (ANSI 256 color 69) for tool names in agent mode
- Fix extract_readme_heading() to search only README section of combined content
  (was incorrectly showing AGENTS.md heading instead of README heading)
This commit is contained in:
Dhanji R. Prasanna
2026-01-07 11:37:51 +11:00
parent 189fdec006
commit 4e7aca50fa
3 changed files with 36 additions and 10 deletions

View File

@@ -81,6 +81,11 @@ pub trait UiWriter: Send + Sync {
/// Called at the start of a new response to clear any partial state.
/// Default implementation does nothing.
fn reset_json_filter(&self) {}
/// Set whether the UI is in agent mode.
/// When in agent mode, tool names may be displayed differently (e.g., different color).
/// Default implementation does nothing.
fn set_agent_mode(&self, _is_agent_mode: bool) {}
}
/// A no-op implementation for when UI output is not needed