feat(coding-agent): add configurable assistant output padding
Closes #6168
This commit is contained in:
@@ -321,6 +321,7 @@ export class InteractiveMode {
|
||||
|
||||
// Thinking block visibility state
|
||||
private hideThinkingBlock = false;
|
||||
private outputPad = 1;
|
||||
|
||||
// Skill commands: command name -> skill file path
|
||||
private skillCommands = new Map<string, string>();
|
||||
@@ -429,6 +430,7 @@ export class InteractiveMode {
|
||||
|
||||
// Load hide thinking block setting
|
||||
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
||||
this.outputPad = this.settingsManager.getOutputPad();
|
||||
|
||||
// Register themes from resource loader and initialize
|
||||
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
||||
@@ -1624,6 +1626,7 @@ export class InteractiveMode {
|
||||
this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);
|
||||
this.footerDataProvider.setCwd(this.sessionManager.getCwd());
|
||||
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
||||
this.outputPad = this.settingsManager.getOutputPad();
|
||||
this.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());
|
||||
const clearOnShrink = this.settingsManager.getClearOnShrink();
|
||||
this.ui.setClearOnShrink(clearOnShrink);
|
||||
@@ -2803,6 +2806,7 @@ export class InteractiveMode {
|
||||
this.hideThinkingBlock,
|
||||
this.getMarkdownThemeWithSettings(),
|
||||
this.hiddenThinkingLabel,
|
||||
this.outputPad,
|
||||
);
|
||||
this.streamingMessage = event.message;
|
||||
this.chatContainer.addChild(this.streamingComponent);
|
||||
@@ -3143,6 +3147,7 @@ export class InteractiveMode {
|
||||
this.hideThinkingBlock,
|
||||
this.getMarkdownThemeWithSettings(),
|
||||
this.hiddenThinkingLabel,
|
||||
this.outputPad,
|
||||
);
|
||||
this.chatContainer.addChild(assistantComponent);
|
||||
break;
|
||||
@@ -3959,6 +3964,7 @@ export class InteractiveMode {
|
||||
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
||||
defaultProjectTrust: this.settingsManager.getDefaultProjectTrust(),
|
||||
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
||||
outputPad: this.settingsManager.getOutputPad(),
|
||||
autocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),
|
||||
quietStartup: this.settingsManager.getQuietStartup(),
|
||||
clearOnShrink: this.settingsManager.getClearOnShrink(),
|
||||
@@ -4061,6 +4067,19 @@ export class InteractiveMode {
|
||||
this.editor.setPaddingX(padding);
|
||||
}
|
||||
},
|
||||
onOutputPadChange: (padding) => {
|
||||
this.settingsManager.setOutputPad(padding);
|
||||
this.outputPad = padding;
|
||||
for (const child of this.chatContainer.children) {
|
||||
if (child instanceof AssistantMessageComponent) {
|
||||
child.setOutputPad(padding);
|
||||
}
|
||||
}
|
||||
if (this.streamingComponent) {
|
||||
this.streamingComponent.setOutputPad(padding);
|
||||
}
|
||||
this.ui.requestRender();
|
||||
},
|
||||
onAutocompleteMaxVisibleChange: (maxVisible) => {
|
||||
this.settingsManager.setAutocompleteMaxVisible(maxVisible);
|
||||
this.defaultEditor.setAutocompleteMaxVisible(maxVisible);
|
||||
@@ -5043,6 +5062,7 @@ export class InteractiveMode {
|
||||
return;
|
||||
}
|
||||
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
||||
this.outputPad = this.settingsManager.getOutputPad();
|
||||
this.rebuildChatFromMessages();
|
||||
chatRestoredBeforeSessionStart = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user