fix: key-order agnostic signal detection in backend
All checks were successful
BotServer CI/CD / build (push) Successful in 3m11s
All checks were successful
BotServer CI/CD / build (push) Successful in 3m11s
This commit is contained in:
parent
21591e22dd
commit
1f743766a8
1 changed files with 2 additions and 2 deletions
|
|
@ -882,9 +882,9 @@ impl BotOrchestrator {
|
|||
// Tool calls arrive as JSON that can span multiple chunks
|
||||
|
||||
// Check if this chunk is an internal event (thinking/thinking_clear)
|
||||
let is_internal_signal = if chunk.trim().starts_with("{\"type\"") {
|
||||
let is_internal_signal = if chunk.trim().starts_with('{') {
|
||||
if let Ok(v) = serde_json::from_str::<serde_json::Value>(&chunk) {
|
||||
let t = v.get("type").and_then(|t: &serde_json::Value| t.as_str()).unwrap_or_default();
|
||||
let t = v.get("type").and_then(|t| t.as_str()).unwrap_or_default();
|
||||
t == "thinking" || t == "thinking_clear"
|
||||
} else { false }
|
||||
} else { false };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue