feat: real-time tool call streaming indicator with blinking UI
- Add ToolParsingHint enum (Detected/Active/Complete) for UI feedback - New UiWriter methods: print_tool_streaming_hint(), print_tool_streaming_active() - Refactor ConsoleUiWriter state to use atomics in ParsingHintState - Add tool_call_streaming field to CompletionChunk for provider hints - Anthropic provider sends streaming hints when tool name detected - New streaming helpers: make_tool_streaming_hint(), make_tool_streaming_active() Parser improvements: - Add is_json_invalidated() to detect false positive tool patterns - Fix tool result poisoning when file contents contain partial JSON - Unescaped newlines in strings or prose after JSON invalidates detection User sees ' ● tool_name |' immediately when tool call starts streaming, with blinking indicator while args are received.
This commit is contained in:
@@ -292,6 +292,14 @@ impl g3_core::ui_writer::UiWriter for PlannerUiWriter {
|
||||
// The "Thinking..." status was causing overwrites
|
||||
}
|
||||
|
||||
fn print_tool_streaming_hint(&self, _tool_name: &str) {
|
||||
// No-op for planner - we don't show streaming hints
|
||||
}
|
||||
|
||||
fn print_tool_streaming_active(&self) {
|
||||
// No-op for planner - we don't show streaming hints
|
||||
}
|
||||
|
||||
fn flush(&self) {
|
||||
use std::io::Write;
|
||||
std::io::stdout().flush().ok();
|
||||
|
||||
Reference in New Issue
Block a user