story-kit: queue 80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui for merge
This commit is contained in:
@@ -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" => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user