Skip to content

Commit 71e745d

Browse files
authored
Use default behavior for bypassPermissions mode (#75)
They updated the types to allow us to just pass this through now. So we shouldn't have to have the special casing here.
1 parent 2aa181b commit 71e745d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/acp-agent.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,11 @@ export class ClaudeAcpAgent implements Agent {
377377
switch (params.modeId) {
378378
case "default":
379379
case "acceptEdits":
380+
case "bypassPermissions":
380381
case "plan":
381382
this.sessions[params.sessionId].permissionMode = params.modeId;
382383
await this.sessions[params.sessionId].query.setPermissionMode(params.modeId);
383384
return {};
384-
case "bypassPermissions":
385-
// For some reason, the SDK doesn't support setting the mode to `bypassPermissions`
386-
// so we do it ourselves
387-
this.sessions[params.sessionId].permissionMode = "bypassPermissions";
388-
await this.sessions[params.sessionId].query.setPermissionMode("acceptEdits");
389-
return {};
390385
default:
391386
throw new Error("Invalid mode");
392387
}

0 commit comments

Comments
 (0)