fix(agent): surface tool calls before input completes

Emit tool-call placeholders as soon as tool input streaming starts so long writes appear immediately in chat. Reuse the same UI tool message when full input arrives to avoid duplicate cards, and keep the hook-required test suite green.
This commit is contained in:
Acbox
2026-04-16 16:42:07 +08:00
parent 1a5b1d6086
commit e0fc2f514e
6 changed files with 193 additions and 12 deletions
+2
View File
@@ -10,6 +10,7 @@ func TestNewProviderHTTPClientWithoutTimeoutKeepsStreamingFriendlyBehavior(t *te
client := NewProviderHTTPClient(0)
if client == nil {
t.Fatal("expected client")
return
}
if client.Timeout != 0 {
t.Fatalf("expected no client timeout, got %s", client.Timeout)
@@ -29,6 +30,7 @@ func TestNewProviderHTTPClientWithTimeout(t *testing.T) {
client := NewProviderHTTPClient(timeout)
if client == nil {
t.Fatal("expected client")
return
}
if client.Timeout != timeout {
t.Fatalf("expected timeout %s, got %s", timeout, client.Timeout)