File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
apps/server/src/provider/Layers Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import {
3939 TurnId ,
4040 type UserInputQuestion ,
4141 ClaudeCodeEffort ,
42+ RuntimeMode ,
4243} from "@t3tools/contracts" ;
4344import {
4445 applyClaudePromptEffortPrefix ,
@@ -2693,12 +2694,12 @@ const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* (
26932694 ? modelSelection . options . thinking
26942695 : undefined ;
26952696 const effectiveEffort = getEffectiveClaudeCodeEffort ( effort ) ;
2696- const permissionMode : PermissionMode =
2697- input . runtimeMode === "full-access"
2698- ? "bypassPermissions"
2699- : input . runtimeMode === "auto-accept-edits"
2700- ? "acceptEdits"
2701- : "default" ;
2697+ const runtimeModeToPermission : Record < RuntimeMode , PermissionMode > = {
2698+ "approval-required" : "default" ,
2699+ "auto-accept-edits" : "acceptEdits" ,
2700+ "full-access" : "bypassPermissions" ,
2701+ } ;
2702+ const permissionMode = runtimeModeToPermission [ input . runtimeMode ] ;
27022703 const settings = {
27032704 ...( typeof thinking === "boolean" ? { alwaysThinkingEnabled : thinking } : { } ) ,
27042705 ...( fastMode ? { fastMode : true } : { } ) ,
You can’t perform that action at this time.
0 commit comments