mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 19:03:50 +00:00
feat: add editorPaddingX setting for input editor horizontal padding
This commit is contained in:
parent
5d3e7d5aaa
commit
fe52ff00d2
6 changed files with 46 additions and 2 deletions
|
|
@ -36,6 +36,7 @@ export interface SettingsConfig {
|
|||
hideThinkingBlock: boolean;
|
||||
collapseChangelog: boolean;
|
||||
doubleEscapeAction: "fork" | "tree";
|
||||
editorPaddingX: number;
|
||||
}
|
||||
|
||||
export interface SettingsCallbacks {
|
||||
|
|
@ -52,6 +53,7 @@ export interface SettingsCallbacks {
|
|||
onHideThinkingBlockChange: (hidden: boolean) => void;
|
||||
onCollapseChangelogChange: (collapsed: boolean) => void;
|
||||
onDoubleEscapeActionChange: (action: "fork" | "tree") => void;
|
||||
onEditorPaddingXChange: (padding: number) => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
||||
|
|
@ -267,6 +269,16 @@ export class SettingsSelectorComponent extends Container {
|
|||
values: ["true", "false"],
|
||||
});
|
||||
|
||||
// Editor padding toggle (insert after skill-commands)
|
||||
const skillCommandsIndex = items.findIndex((item) => item.id === "skill-commands");
|
||||
items.splice(skillCommandsIndex + 1, 0, {
|
||||
id: "editor-padding",
|
||||
label: "Editor padding",
|
||||
description: "Horizontal padding for input editor (0-3)",
|
||||
currentValue: String(config.editorPaddingX),
|
||||
values: ["0", "1", "2", "3"],
|
||||
});
|
||||
|
||||
// Add borders
|
||||
this.addChild(new DynamicBorder());
|
||||
|
||||
|
|
@ -306,6 +318,9 @@ export class SettingsSelectorComponent extends Container {
|
|||
case "double-escape-action":
|
||||
callbacks.onDoubleEscapeActionChange(newValue as "fork" | "tree");
|
||||
break;
|
||||
case "editor-padding":
|
||||
callbacks.onEditorPaddingXChange(parseInt(newValue, 10));
|
||||
break;
|
||||
}
|
||||
},
|
||||
callbacks.onCancel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue