mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 18:03:50 +00:00
feat(coding-agent): configurable double-escape action (tree vs branch)
Add doubleEscapeAction setting to choose whether double-escape with an empty editor opens /tree (default) or /branch. - Add setting to Settings interface and SettingsManager - Add to /settings UI for easy toggling - Update interactive-mode to respect the setting - Document in README.md settings table fixes #404
This commit is contained in:
parent
17b3a14bfa
commit
42b1e06ad1
6 changed files with 34 additions and 6 deletions
|
|
@ -58,6 +58,7 @@ export interface Settings {
|
|||
terminal?: TerminalSettings;
|
||||
images?: ImageSettings;
|
||||
enabledModels?: string[]; // Model patterns for cycling (same format as --models CLI flag)
|
||||
doubleEscapeAction?: "branch" | "tree"; // Action for double-escape with empty editor (default: "tree")
|
||||
}
|
||||
|
||||
/** Deep merge settings: project/overrides take precedence, nested objects merge recursively */
|
||||
|
|
@ -410,4 +411,13 @@ export class SettingsManager {
|
|||
getEnabledModels(): string[] | undefined {
|
||||
return this.settings.enabledModels;
|
||||
}
|
||||
|
||||
getDoubleEscapeAction(): "branch" | "tree" {
|
||||
return this.settings.doubleEscapeAction ?? "tree";
|
||||
}
|
||||
|
||||
setDoubleEscapeAction(action: "branch" | "tree"): void {
|
||||
this.globalSettings.doubleEscapeAction = action;
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue