Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed app/src/features/conversations/aui/ApprovalCardAdapter.tsx

Steven Enamakelafcf568eca9a
diff --git a/app/src/features/conversations/aui/ApprovalCardAdapter.tsx b/app/src/features/conversations/aui/ApprovalCardAdapter.tsx
index dc6bc2ff5f..a10d058e05 100644
--- a/app/src/features/conversations/aui/ApprovalCardAdapter.tsx
+++ b/app/src/features/conversations/aui/ApprovalCardAdapter.tsx
@@ -57,7 +57,12 @@ export interface ApprovalCardAdapterProps<D = ApprovalDecision> {
* (e.g. the unrouted-approval surface, which deliberately offers only
* once/deny — see the deleted `UnroutedApprovalCard`'s doc comment).
*/
- alwaysDecision?: D;
+ // `NoInfer` keeps a plain string-literal decision (e.g.
+ // `alwaysDecision="approve_always_for_tool"`) from narrowing `D` away from
+ // its `ApprovalDecision` default at an ordinary approval-gate call site
+ // that passes no explicit `<D>` — only an explicit type argument (like
+ // `PlanReviewPart`'s `<ApprovalCardAdapter<Decision>>`) should do that.
+ alwaysDecision?: NoInfer<D>;
alwaysHint?: string;
/**
* Local UI action for "Always allow" instead of an `onDecide` dispatch —