story-80: remove model/apiKey and rate limit notifications from chat UI

Suppresses the noisy system-init notification '[model | apiKey: source]'
and rate limit notifications that were being streamed into the chat UI
from the claude_code provider. Normal chat functionality is unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-23 15:29:41 +00:00
parent 90936173ce
commit 2833cbcda9
2 changed files with 4 additions and 29 deletions

View File

@@ -252,35 +252,10 @@ fn run_pty_session(
"result" => {
got_result = true;
}
// System init — log billing info via streaming display
"system" => {
let api_source = json
.get("apiKeySource")
.and_then(|s| s.as_str())
.unwrap_or("unknown");
let model = json
.get("model")
.and_then(|s| s.as_str())
.unwrap_or("unknown");
let _ = token_tx
.send(format!("_[{model} | apiKey: {api_source}]_\n\n"));
}
// Rate limit info — surface briefly in streaming display
"rate_limit_event" => {
if let Some(info) = json.get("rate_limit_info") {
let status = info
.get("status")
.and_then(|s| s.as_str())
.unwrap_or("unknown");
let limit_type = info
.get("rateLimitType")
.and_then(|s| s.as_str())
.unwrap_or("unknown");
let _ = token_tx.send(format!(
"_[rate limit: {status} ({limit_type})]_\n\n"
));
}
}
// System init — suppress noisy model/apiKey notification
"system" => {}
// Rate limit info — suppress noisy notification
"rate_limit_event" => {}
_ => {}
}
}