mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
Reverse model switching and binding for dialog
This commit is contained in:
parent
58c02ce02b
commit
b576a527c7
5 changed files with 57 additions and 12 deletions
|
|
@ -3,11 +3,13 @@ import {
|
|||
isCtrlC,
|
||||
isCtrlD,
|
||||
isCtrlG,
|
||||
isCtrlL,
|
||||
isCtrlO,
|
||||
isCtrlP,
|
||||
isCtrlT,
|
||||
isCtrlZ,
|
||||
isEscape,
|
||||
isShiftCtrlP,
|
||||
isShiftTab,
|
||||
} from "@mariozechner/pi-tui";
|
||||
|
||||
|
|
@ -20,6 +22,8 @@ export class CustomEditor extends Editor {
|
|||
public onCtrlD?: () => void;
|
||||
public onShiftTab?: () => void;
|
||||
public onCtrlP?: () => void;
|
||||
public onShiftCtrlP?: () => void;
|
||||
public onCtrlL?: () => void;
|
||||
public onCtrlO?: () => void;
|
||||
public onCtrlT?: () => void;
|
||||
public onCtrlG?: () => void;
|
||||
|
|
@ -44,12 +48,24 @@ export class CustomEditor extends Editor {
|
|||
return;
|
||||
}
|
||||
|
||||
// Intercept Ctrl+L for model selector
|
||||
if (isCtrlL(data) && this.onCtrlL) {
|
||||
this.onCtrlL();
|
||||
return;
|
||||
}
|
||||
|
||||
// Intercept Ctrl+O for tool output expansion
|
||||
if (isCtrlO(data) && this.onCtrlO) {
|
||||
this.onCtrlO();
|
||||
return;
|
||||
}
|
||||
|
||||
// Intercept Shift+Ctrl+P for backward model cycling (check before Ctrl+P)
|
||||
if (isShiftCtrlP(data) && this.onShiftCtrlP) {
|
||||
this.onShiftCtrlP();
|
||||
return;
|
||||
}
|
||||
|
||||
// Intercept Ctrl+P for model cycling
|
||||
if (isCtrlP(data) && this.onCtrlP) {
|
||||
this.onCtrlP();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue