mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 00:00:27 +00:00
feat(coding-agent): add keybinding actions for /tree, /fork, and /new
Add newSession, tree, and fork as configurable keybinding actions. All unbound by default. Users can configure in keybindings.json. Closes #1088
This commit is contained in:
parent
d075291b08
commit
6f2d066342
4 changed files with 25 additions and 1 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `newSession`, `tree`, and `fork` keybinding actions for `/new`, `/tree`, and `/fork` commands. All unbound by default. ([#1114](https://github.com/badlogic/pi-mono/pull/1114) by [@juanibiapina](https://github.com/juanibiapina))
|
||||||
|
|
||||||
## [0.50.7] - 2026-01-31
|
## [0.50.7] - 2026-01-31
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,14 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, etc.
|
||||||
| `suspend` | `ctrl+z` | Suspend to background |
|
| `suspend` | `ctrl+z` | Suspend to background |
|
||||||
| `externalEditor` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
|
| `externalEditor` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
|
||||||
|
|
||||||
|
### Session
|
||||||
|
|
||||||
|
| Action | Default | Description |
|
||||||
|
|--------|---------|-------------|
|
||||||
|
| `newSession` | *(none)* | Start a new session (`/new`) |
|
||||||
|
| `tree` | *(none)* | Open session tree navigator (`/tree`) |
|
||||||
|
| `fork` | *(none)* | Fork current session (`/fork`) |
|
||||||
|
|
||||||
### Models & Thinking
|
### Models & Thinking
|
||||||
|
|
||||||
| Action | Default | Description |
|
| Action | Default | Description |
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,10 @@ export type AppAction =
|
||||||
| "externalEditor"
|
| "externalEditor"
|
||||||
| "followUp"
|
| "followUp"
|
||||||
| "dequeue"
|
| "dequeue"
|
||||||
| "pasteImage";
|
| "pasteImage"
|
||||||
|
| "newSession"
|
||||||
|
| "tree"
|
||||||
|
| "fork";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All configurable actions.
|
* All configurable actions.
|
||||||
|
|
@ -60,6 +63,9 @@ export const DEFAULT_APP_KEYBINDINGS: Record<AppAction, KeyId | KeyId[]> = {
|
||||||
followUp: "alt+enter",
|
followUp: "alt+enter",
|
||||||
dequeue: "alt+up",
|
dequeue: "alt+up",
|
||||||
pasteImage: "ctrl+v",
|
pasteImage: "ctrl+v",
|
||||||
|
newSession: [],
|
||||||
|
tree: [],
|
||||||
|
fork: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -86,6 +92,9 @@ const APP_ACTIONS: AppAction[] = [
|
||||||
"followUp",
|
"followUp",
|
||||||
"dequeue",
|
"dequeue",
|
||||||
"pasteImage",
|
"pasteImage",
|
||||||
|
"newSession",
|
||||||
|
"tree",
|
||||||
|
"fork",
|
||||||
];
|
];
|
||||||
|
|
||||||
function isAppAction(action: string): action is AppAction {
|
function isAppAction(action: string): action is AppAction {
|
||||||
|
|
|
||||||
|
|
@ -1776,6 +1776,9 @@ export class InteractiveMode {
|
||||||
this.defaultEditor.onAction("externalEditor", () => this.openExternalEditor());
|
this.defaultEditor.onAction("externalEditor", () => this.openExternalEditor());
|
||||||
this.defaultEditor.onAction("followUp", () => this.handleFollowUp());
|
this.defaultEditor.onAction("followUp", () => this.handleFollowUp());
|
||||||
this.defaultEditor.onAction("dequeue", () => this.handleDequeue());
|
this.defaultEditor.onAction("dequeue", () => this.handleDequeue());
|
||||||
|
this.defaultEditor.onAction("newSession", () => this.handleClearCommand());
|
||||||
|
this.defaultEditor.onAction("tree", () => this.showTreeSelector());
|
||||||
|
this.defaultEditor.onAction("fork", () => this.showUserMessageSelector());
|
||||||
|
|
||||||
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