fix(coding-agent): use key helpers for arrow keys and Enter
Fixed arrow key and Enter detection in selector components to work with Kitty protocol when Caps Lock or Num Lock is enabled. Updated: oauth-selector, user-message-selector, hook-selector, hook-input, model-selector, session-selector
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Simple text input component for hooks.
|
||||
*/
|
||||
|
||||
import { Container, Input, isEscape, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import { Container, Input, isEnter, isEscape, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import { theme } from "../theme/theme.js";
|
||||
import { DynamicBorder } from "./dynamic-border.js";
|
||||
|
||||
@@ -47,7 +47,7 @@ export class HookInputComponent extends Container {
|
||||
|
||||
handleInput(keyData: string): void {
|
||||
// Enter
|
||||
if (keyData === "\r" || keyData === "\n") {
|
||||
if (isEnter(keyData) || keyData === "\n") {
|
||||
this.onSubmitCallback(this.input.getValue());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user