fix: add consistent CTRL-C and ESC handling to all dialogs (#426)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-29 21:19:57 -08:00
committed by GitHub
parent f5a1a5e400
commit 397eb5e390
19 changed files with 302 additions and 171 deletions

View File

@@ -14,7 +14,13 @@ export function NewAgentDialog({ onSubmit, onCancel }: NewAgentDialogProps) {
const [nameInput, setNameInput] = useState("");
const [error, setError] = useState("");
useInput((_, key) => {
useInput((input, key) => {
// CTRL-C: immediately cancel
if (key.ctrl && input === "c") {
onCancel();
return;
}
if (key.escape) {
onCancel();
}