diff --git a/crates/hx-ai/src/claude_cli.rs b/crates/hx-ai/src/claude_cli.rs index f9683d5..a455959 100644 --- a/crates/hx-ai/src/claude_cli.rs +++ b/crates/hx-ai/src/claude_cli.rs @@ -190,8 +190,8 @@ impl Provider for ClaudeCli { match v["type"].as_str() { Some("stream_event") => { let e = &v["event"]; - match e["type"].as_str() { - Some("content_block_delta") => match e["delta"]["type"].as_str() { + if e["type"] == "content_block_delta" { + match e["delta"]["type"].as_str() { Some("text_delta") => { let t = e["delta"]["text"].as_str().unwrap_or_default(); text += t; @@ -204,8 +204,7 @@ impl Provider for ClaudeCli { tx.send(Ok(StreamEvent::ThinkingDelta { text: t.into() })); } _ => {} - }, - _ => {} + } } } // complete tool calls (the stream events only carry partial JSON)