fix: route warnings to file and add in-app toast notifications
- Replace all eprintln! with tracing::warn! to avoid TUI corruption via stderr writes during alternate screen mode - Route tracing output to ~/.local/share/zesdex/zesdex.log instead of stderr by configuring tracing_subscriber with a Mutex<File> writer - Add render_toasts() widget: floating notification stack at top-right of the terminal, color-coded by severity (Info/Success/Warning/Error/ Lesson), auto-expires after 5s, max 4 visible - Apply to 12 files: stream parser, MCP client, subagent engine, state/rest, controller/input, app_config, provider, OAuth, agent_def, dto/chat/tool Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
e29dfadaa7
commit
89b63b1bc2
@@ -32,7 +32,7 @@ fn resolve_provider_config() -> (String, String, Option<String>) {
|
||||
let app_config = crate::model::app_config::AppConfig::load();
|
||||
|
||||
let mut api_key = settings.api_keys.get(&settings.provider).cloned().unwrap_or_else(|| {
|
||||
eprintln!("[subagent] no API key for provider '{}' in settings, trying env/default", settings.provider);
|
||||
tracing::warn!("[subagent] no API key for provider '{}' in settings, trying env/default", settings.provider);
|
||||
String::new()
|
||||
});
|
||||
let model = settings.model.clone();
|
||||
@@ -45,7 +45,7 @@ fn resolve_provider_config() -> (String, String, Option<String>) {
|
||||
.and_then(|env| std::env::var(env).ok())
|
||||
.or_else(|| provider_cfg.default_api_key.clone())
|
||||
.unwrap_or_else(|| {
|
||||
eprintln!("[subagent] all API key resolution paths exhausted for '{}'", settings.provider);
|
||||
tracing::warn!("[subagent] all API key resolution paths exhausted for '{}'", settings.provider);
|
||||
String::new()
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user