fix(coding-agent): make terminal progress escape sequences configurable, disabled by default

Adds terminal.showTerminalProgress setting (default false) and wires it
to /settings. Guards all OSC 9;4 setProgress calls in interactive-mode.

closes #3588
This commit is contained in:
Mario Zechner
2026-04-23 12:27:51 +02:00
parent 010e9acfe9
commit 8cc046f86e
4 changed files with 52 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ export interface SettingsConfig {
autocompleteMaxVisible: number;
quietStartup: boolean;
clearOnShrink: boolean;
showTerminalProgress: boolean;
}
export interface SettingsCallbacks {
@@ -77,6 +78,7 @@ export interface SettingsCallbacks {
onAutocompleteMaxVisibleChange: (maxVisible: number) => void;
onQuietStartupChange: (enabled: boolean) => void;
onClearOnShrinkChange: (enabled: boolean) => void;
onShowTerminalProgressChange: (enabled: boolean) => void;
onCancel: () => void;
}
@@ -372,6 +374,16 @@ export class SettingsSelectorComponent extends Container {
values: ["true", "false"],
});
// Terminal progress toggle (insert after clear-on-shrink)
const clearOnShrinkIndex = items.findIndex((item) => item.id === "clear-on-shrink");
items.splice(clearOnShrinkIndex + 1, 0, {
id: "terminal-progress",
label: "Terminal progress",
description: "Show OSC 9;4 progress indicators in the terminal tab bar",
currentValue: config.showTerminalProgress ? "true" : "false",
values: ["true", "false"],
});
// Add borders
this.addChild(new DynamicBorder());
@@ -440,6 +452,9 @@ export class SettingsSelectorComponent extends Container {
case "clear-on-shrink":
callbacks.onClearOnShrinkChange(newValue === "true");
break;
case "terminal-progress":
callbacks.onShowTerminalProgressChange(newValue === "true");
break;
}
},
callbacks.onCancel,