fix: surface disconnect reason, switch health probe to /global/health (#978)
- event-pipeline: onDisconnect now carries a reason tag (ws_closed:code=N, ws_error_frame, ws_closed_before_ready, sse_error) - useConfigStore: store lastDisconnectReason, clear on reconnect - send guards: embed reason in Connection lost toast so we can tell which path tripped - lifecycle: isOpenCodeProcessHealthy hits /global/health (healthy flag) with 5s timeout instead of /session with 2s, avoids false restarts under stream load
This commit is contained in:
committed by
GitHub
parent
8e86891d8e
commit
5ec7f46105
@@ -1520,7 +1520,9 @@ const ChatInputComponent: React.FC<ChatInputProps> = ({ onOpenSettings, scrollTo
|
||||
else if (commandName === 'compact' && currentSessionId) {
|
||||
try {
|
||||
if (!useConfigStore.getState().isConnected) {
|
||||
throw new Error("Connection lost. Please wait for reconnection.");
|
||||
const reason = useConfigStore.getState().lastDisconnectReason;
|
||||
const suffix = reason ? ` (${reason})` : " (never connected)";
|
||||
throw new Error(`Connection lost${suffix}. Please wait for reconnection.`);
|
||||
}
|
||||
const { opencodeClient } = await import('@/lib/opencode/client');
|
||||
const sdk = opencodeClient.getSdkClient();
|
||||
|
||||
Reference in New Issue
Block a user