mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
fix: change thinking level cycling from Tab to Ctrl+T
Tab key was preventing file path autocomplete from working. Changed to Ctrl+T to avoid conflict with Tab completion. - Tab now works normally for file/path autocomplete - Ctrl+T cycles through thinking levels - Shows message if model doesn't support thinking
This commit is contained in:
parent
b367f5bec6
commit
5336843de8
2 changed files with 13 additions and 14 deletions
|
|
@ -6,15 +6,13 @@ import { Editor } from "@mariozechner/pi-tui";
|
|||
export class CustomEditor extends Editor {
|
||||
public onEscape?: () => void;
|
||||
public onCtrlC?: () => void;
|
||||
public onTab?: () => boolean;
|
||||
public onCtrlT?: () => void;
|
||||
|
||||
handleInput(data: string): void {
|
||||
// Intercept Tab key when autocomplete is not showing
|
||||
if (data === "\t" && !this.isShowingAutocomplete() && this.onTab) {
|
||||
const handled = this.onTab();
|
||||
if (handled) {
|
||||
return;
|
||||
}
|
||||
// Intercept Ctrl+T for thinking level cycling
|
||||
if (data === "\x14" && this.onCtrlT) {
|
||||
this.onCtrlT();
|
||||
return;
|
||||
}
|
||||
|
||||
// Intercept Escape key - but only if autocomplete is NOT active
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue