Skip to content

Commit f27bafe

Browse files
github-actions[bot]saphid
authored andcommitted
fix(server): surface a single devin decline option per permission request
1 parent f8e06d9 commit f27bafe

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/server/src/provider/Layers/DevinAdapter.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,14 @@ function devinApprovalOptions(request: NativePermission): ReadonlyArray<Provider
157157
case "allow_always":
158158
return [{ decision: "acceptForSession" as const, label }];
159159
case "reject_once":
160-
case "reject_always":
161160
return [{ decision: "decline" as const, label }];
161+
case "reject_always":
162+
// T3's decision set has no persistent decline, so a second
163+
// "decline" button would still resolve to reject_once. Surface it
164+
// only when it is the sole refusal Devin offered.
165+
return request.options.some((entry) => entry.kind === "reject_once")
166+
? []
167+
: [{ decision: "decline" as const, label }];
162168
default:
163169
return [];
164170
}

0 commit comments

Comments
 (0)