fix: add number key support to approval dialogs (#821)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-04 12:19:44 -08:00
committed by GitHub
parent 7081876088
commit 2792df7c84
5 changed files with 58 additions and 0 deletions

View File

@@ -276,6 +276,20 @@ export const InlineFileEditApproval = memo(
}
if (key.escape) {
onCancel?.();
return;
}
// Number keys for quick selection (only for fixed options, not custom text input)
if (input === "1") {
onApprove(diffsToPass.size > 0 ? diffsToPass : undefined);
return;
}
if (input === "2" && allowPersistence) {
onApproveAlways(
"project",
diffsToPass.size > 0 ? diffsToPass : undefined,
);
return;
}
},
{ isActive: isFocused },