fix: add number key support to approval dialogs (#821)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user