mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 18:03:44 +00:00
parent
1e7d991a25
commit
345fa975f1
5 changed files with 24 additions and 14 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* Simple text input component for hooks.
|
||||
*/
|
||||
|
||||
import { Container, Input, isEnter, isEscape, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import { Container, Input, isCtrlC, isEnter, isEscape, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import { theme } from "../theme/theme.js";
|
||||
import { DynamicBorder } from "./dynamic-border.js";
|
||||
|
||||
|
|
@ -52,8 +52,8 @@ export class HookInputComponent extends Container {
|
|||
return;
|
||||
}
|
||||
|
||||
// Escape to cancel
|
||||
if (isEscape(keyData)) {
|
||||
// Escape or Ctrl+C to cancel
|
||||
if (isEscape(keyData) || isCtrlC(keyData)) {
|
||||
this.onCancelCallback();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue