feat: add onClose functionality to ApprovalCard across all HITL tools

This commit is contained in:
Anish Sarkar 2026-03-20 23:50:50 +05:30
parent 85462675a0
commit ab6eeaf02e
11 changed files with 36 additions and 6 deletions

View file

@ -325,6 +325,7 @@ function ApprovalCard({
}));
setHasPanelEdits(true);
},
onClose: () => setIsPanelOpen(false),
});
}}
>
@ -599,6 +600,7 @@ function ApprovalCard({
size="sm"
className="rounded-lg gap-1.5"
onClick={handleApprove}
disabled={isPanelOpen}
>
Approve
<CornerDownLeftIcon className="size-3 opacity-60" />
@ -609,6 +611,7 @@ function ApprovalCard({
size="sm"
variant="ghost"
className="rounded-lg text-muted-foreground"
disabled={isPanelOpen}
onClick={() => {
setDecided("reject");
onDecision({ type: "reject", message: "User rejected the action." });