feat: streamline opencode loading screens and reuse the reload flow for vscode Restart API
Loading screens: drop the internal-jargon progress text on the opencode reload overlay (ConfigUpdateOverlay) and the vscode init splash — show text only on errors. Replace it with a glow pulse on the OpenCode mark on the cube's top face; OpenChamberLogo's isAnimated prop was a no-op and now actually animates. vscode shows the glow on the inline splash logo and the React app stops writing 'Loading data (… Providers, … Agents)…'. Restart API: 'OpenChamber: Restart API Connection' now runs the same full reload flow used after an OpenCode update — the command asks the chat webview to call reloadOpenCodeConfiguration() (overlay + managed restart via the bridge + config/data refresh) instead of a bare manager restart, falling back to the old restart when no webview is open. Mounts ConfigUpdateOverlay in the vscode app so the overlay actually shows there.
This commit is contained in:
@@ -181,9 +181,8 @@ const maybeHideLoadingOverlay = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const providersText = bootstrapProvidersReady ? '✓ Providers' : '… Providers';
|
||||
const agentsText = bootstrapAgentsReady ? '✓ Agents' : '… Agents';
|
||||
setLoadingStatusText(`Loading data (${providersText}, ${agentsText})…`);
|
||||
// Still loading providers/agents — stay silent (the animated logo signals work).
|
||||
setLoadingStatusText('');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -200,7 +199,8 @@ const maybeHideLoadingOverlay = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoadingStatusText('Starting OpenCode API…');
|
||||
// Connecting — no jargon; the animated logo conveys progress.
|
||||
setLoadingStatusText('');
|
||||
};
|
||||
|
||||
const applyInitialTheme = (theme: { metadata?: { variant?: string }; colors?: { surface?: { background?: string; foreground?: string } } }) => {
|
||||
@@ -1283,6 +1283,15 @@ onCommand('showSettings', () => {
|
||||
window.dispatchEvent(new CustomEvent('openchamber:navigate', { detail: { view: 'settings' } }));
|
||||
});
|
||||
|
||||
// Run the same full OpenCode reload flow the app uses after an update: shows the
|
||||
// reload overlay, restarts the managed OpenCode (via the bridge's /api/config/reload),
|
||||
// and refreshes config/data. Triggered by the "Restart API Connection" command.
|
||||
onCommand('reloadOpenCode', () => {
|
||||
void import('@openchamber/ui/stores/useAgentsStore').then(({ reloadOpenCodeConfiguration }) => {
|
||||
void reloadOpenCodeConfiguration();
|
||||
});
|
||||
});
|
||||
|
||||
const getNotificationClaimKey = (payload: { title?: unknown; body?: unknown; sessionId?: unknown; tag?: unknown } | undefined): string => {
|
||||
const tag = typeof payload?.tag === 'string' ? payload.tag.trim() : '';
|
||||
if (tag) return tag;
|
||||
|
||||
Reference in New Issue
Block a user