fix(coding-agent): use static reload box without spinner

This commit is contained in:
Mario Zechner
2026-04-15 23:25:45 +02:00
parent f7cd613ee4
commit 20ff469605

View File

@@ -4118,22 +4118,24 @@ export class InteractiveMode {
this.resetExtensionUI();
const loader = new BorderedLoader(
this.ui,
theme,
"Reloading keybindings, extensions, skills, prompts, themes...",
{
cancellable: false,
},
const reloadBox = new Container();
const borderColor = (s: string) => theme.fg("border", s);
reloadBox.addChild(new DynamicBorder(borderColor));
reloadBox.addChild(new Spacer(1));
reloadBox.addChild(
new Text(theme.fg("muted", "Reloading keybindings, extensions, skills, prompts, themes..."), 1, 0),
);
reloadBox.addChild(new Spacer(1));
reloadBox.addChild(new DynamicBorder(borderColor));
const previousEditor = this.editor;
this.editorContainer.clear();
this.editorContainer.addChild(loader);
this.ui.setFocus(loader);
this.ui.requestRender();
this.editorContainer.addChild(reloadBox);
this.ui.setFocus(reloadBox);
this.ui.requestRender(true);
await new Promise((resolve) => process.nextTick(resolve));
const dismissLoader = (editor: Component) => {
loader.dispose();
const dismissReloadBox = (editor: Component) => {
this.editorContainer.clear();
this.editorContainer.addChild(editor);
this.ui.setFocus(editor);
@@ -4166,7 +4168,7 @@ export class InteractiveMode {
this.setupExtensionShortcuts(runner);
}
this.rebuildChatFromMessages();
dismissLoader(this.editor as Component);
dismissReloadBox(this.editor as Component);
this.showLoadedResources({
force: false,
showDiagnosticsWhenQuiet: true,
@@ -4177,7 +4179,7 @@ export class InteractiveMode {
}
this.showStatus("Reloaded keybindings, extensions, skills, prompts, themes");
} catch (error) {
dismissLoader(previousEditor as Component);
dismissReloadBox(previousEditor as Component);
this.showError(`Reload failed: ${error instanceof Error ? error.message : String(error)}`);
}
}