fix(acp): harden session-page connection and localize backend errors
- Session-page connect never triggers download/install; returns SdkNotInstalled immediately and prompts the user to install from Agent Settings instead - Binary agents now accept any cached version via find_best_cached_binary_for_agent so stale caches still connect - Bound Initialize handshake with a 60s timeout and convert it to AcpError::InitializeTimeout via a sentinel in run_connection - Spawn background task owns ConnectionManager map insertion and removes the entry on exit through an RAII guard that survives panics, preventing leaked stale entries - AcpError gains SdkNotInstalled and InitializeTimeout variants plus a stable code() identifier; AcpEvent::Error carries code so the frontend can render localized messages by key - Frontend preflight now runs for all connect sources; error event handler switches on code to show translated text for initialize_timeout, sdk_not_installed, platform_not_supported, process_exited, spawn_failed and download_failed - Remove ConnectionStatus::Downloading enum variant, all frontend branches, and i18n strings; drop obsolete autoLinkFailedTitle, autoLinkPreflightFailed, preflightCheckFailedDefault and preflightFailedTitle keys across 10 locales - Add backendErrors.* translations in 10 languages - Diagnostic logging: always log agent stderr plus binary path/size/args/env keys and Initialize timing; gate stdin/stdout JSON-RPC tracing behind CODEG_ACP_DEBUG to avoid persisting user content into OS log files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -851,7 +851,6 @@
|
||||
"connection": {
|
||||
"connected": "Connecté",
|
||||
"connecting": "Connexion...",
|
||||
"downloading": "Téléchargement...",
|
||||
"prompting": "Réponse...",
|
||||
"error": "Erreur de connexion",
|
||||
"disconnected": "Déconnecté",
|
||||
@@ -1422,11 +1421,13 @@
|
||||
"unavailable": "{agent} n'est pas disponible sur la plateforme actuelle.",
|
||||
"sdkMissing": "Le SDK de {agent} n'est pas installé"
|
||||
},
|
||||
"backendErrors": {
|
||||
"initializeTimeout": "Le handshake de connexion de {agent} a expiré (aucune réponse après 60 secondes). Ouvrez Paramètres pour vérifier la configuration de l'agent et du réseau.",
|
||||
"processExited": "Le processus {agent} s'est arrêté de manière inattendue.",
|
||||
"spawnFailed": "Impossible de démarrer {agent} : {message}",
|
||||
"downloadFailed": "Échec du téléchargement de {agent} : {message}"
|
||||
},
|
||||
"unableReadAgentConfig": "Impossible de lire la configuration de l'agent : {message}",
|
||||
"autoLinkFailedTitle": "Échec de l'auto-liaison de {agent}",
|
||||
"preflightCheckFailedDefault": "Les vérifications préalables ont échoué. Vérifiez les paramètres des agents.",
|
||||
"preflightFailedTitle": "Échec de la vérification préalable de {agent}",
|
||||
"autoLinkPreflightFailed": "Échec de la vérification préalable de l'auto-liaison : {message}",
|
||||
"connectFailedTitle": "Échec de la connexion de {agent}",
|
||||
"toolFallbackTitle": "Outil",
|
||||
"eventErrorTitle": "Erreur de l'agent",
|
||||
|
||||
Reference in New Issue
Block a user