mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 06:04:15 +00:00
feat(coding-agent): add resume as configurable keybinding action (#1249)
feat(coding-agent): add resume as configurable keybinding action Allow users to bind a key to open the session resume selector, matching the pattern of newSession, tree, and fork actions.
This commit is contained in:
parent
b5be54b8ef
commit
b80762966a
3 changed files with 9 additions and 1 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `resume` as a configurable keybinding action, allowing users to bind a key to open the session resume selector (like `newSession`, `tree`, and `fork`)
|
||||||
|
|
||||||
## [0.51.5] - 2026-02-04
|
## [0.51.5] - 2026-02-04
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ export type AppAction =
|
||||||
| "pasteImage"
|
| "pasteImage"
|
||||||
| "newSession"
|
| "newSession"
|
||||||
| "tree"
|
| "tree"
|
||||||
| "fork";
|
| "fork"
|
||||||
|
| "resume";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All configurable actions.
|
* All configurable actions.
|
||||||
|
|
@ -68,6 +69,7 @@ export const DEFAULT_APP_KEYBINDINGS: Record<AppAction, KeyId | KeyId[]> = {
|
||||||
newSession: [],
|
newSession: [],
|
||||||
tree: [],
|
tree: [],
|
||||||
fork: [],
|
fork: [],
|
||||||
|
resume: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -98,6 +100,7 @@ const APP_ACTIONS: AppAction[] = [
|
||||||
"newSession",
|
"newSession",
|
||||||
"tree",
|
"tree",
|
||||||
"fork",
|
"fork",
|
||||||
|
"resume",
|
||||||
];
|
];
|
||||||
|
|
||||||
function isAppAction(action: string): action is AppAction {
|
function isAppAction(action: string): action is AppAction {
|
||||||
|
|
|
||||||
|
|
@ -1779,6 +1779,7 @@ export class InteractiveMode {
|
||||||
this.defaultEditor.onAction("newSession", () => this.handleClearCommand());
|
this.defaultEditor.onAction("newSession", () => this.handleClearCommand());
|
||||||
this.defaultEditor.onAction("tree", () => this.showTreeSelector());
|
this.defaultEditor.onAction("tree", () => this.showTreeSelector());
|
||||||
this.defaultEditor.onAction("fork", () => this.showUserMessageSelector());
|
this.defaultEditor.onAction("fork", () => this.showUserMessageSelector());
|
||||||
|
this.defaultEditor.onAction("resume", () => this.showSessionSelector());
|
||||||
|
|
||||||
this.defaultEditor.onChange = (text: string) => {
|
this.defaultEditor.onChange = (text: string) => {
|
||||||
const wasBashMode = this.isBashMode;
|
const wasBashMode = this.isBashMode;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue