From d041f498cfc7e73f12bd4d7f22e6776e0ebdcf28 Mon Sep 17 00:00:00 2001 From: archipelago Date: Fri, 9 Oct 2026 09:03:10 -0400 Subject: [PATCH] fix: satisfy terminal UI type checking --- neode-ui/src/components/CLIPopup.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neode-ui/src/components/CLIPopup.vue b/neode-ui/src/components/CLIPopup.vue index 039e7542..0a517fd1 100644 --- a/neode-ui/src/components/CLIPopup.vue +++ b/neode-ui/src/components/CLIPopup.vue @@ -91,7 +91,8 @@ function onKeydown(event: KeyboardEvent) { if (event.ctrlKey && event.key.toLowerCase() === 'c') { event.preventDefault(); send('\u0003'); return } if (event.ctrlKey && event.key.toLowerCase() === 'd') { event.preventDefault(); send('\u0004'); return } const special: Record = { Enter: '\n', Backspace: '\u007f', Tab: '\t', ArrowUp: '\u001b[A', ArrowDown: '\u001b[B', ArrowRight: '\u001b[C', ArrowLeft: '\u001b[D' } - if (special[event.key]) { event.preventDefault(); send(special[event.key]); return } + const specialKey = special[event.key] + if (specialKey !== undefined) { event.preventDefault(); send(specialKey); return } if (event.key.length === 1 && !event.metaKey && !event.altKey) { event.preventDefault(); send(event.key) } } function focusInput() { nextTick(() => inputRef.value?.focus()) }