mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-08 18:57:43 +02:00
[eric] hitl: Approve All persists always-allow so mid-run identical commands stop re-prompting
This commit is contained in:
@@ -435,7 +435,8 @@ const DynamicIsland: React.FC = () => {
|
||||
for (const g of groups) {
|
||||
for (const req of g.approvals) {
|
||||
if (req.tool_name !== 'AskUserQuestion') {
|
||||
dispatch(handleApproval({ requestId: req.id, behavior: 'allow' }));
|
||||
// setAlwaysAllow so the SAME command mid-run stops re-prompting: the backend writes the policy into the live in-run snapshot, a plain allow only clears the pending request.
|
||||
dispatch(handleApproval({ requestId: req.id, behavior: 'allow', setAlwaysAllow: true }));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -792,7 +793,7 @@ const CompactActionablePill: React.FC<{
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
{remainingCount > 1 && !isIntervention && (
|
||||
<Tooltip title={`Approve all ${remainingCount}`} arrow>
|
||||
<Tooltip title={`Approve all ${remainingCount} (stops re-asking for these tools)`} arrow>
|
||||
<Box
|
||||
component="button"
|
||||
onClick={(e: React.MouseEvent) => { e.stopPropagation(); onApproveAll(); }}
|
||||
|
||||
@@ -1165,7 +1165,8 @@ const AgentCard: React.FC<Props> = ({
|
||||
startIcon={<CheckIcon sx={{ fontSize: '14px !important' }} />}
|
||||
onClick={() => {
|
||||
for (const req of session.pending_approvals) {
|
||||
if (req.tool_name !== 'AskUserQuestion') dispatch(handleApproval({ requestId: req.id, behavior: 'allow' }));
|
||||
// setAlwaysAllow so the SAME command mid-run stops re-prompting: the backend writes the policy into the live in-run snapshot, a plain allow only clears the pending request.
|
||||
if (req.tool_name !== 'AskUserQuestion') dispatch(handleApproval({ requestId: req.id, behavior: 'allow', setAlwaysAllow: true }));
|
||||
}
|
||||
}}
|
||||
sx={{
|
||||
|
||||
Reference in New Issue
Block a user