MCPcopy
hub / github.com/codeaashu/claude-code / canCycleToAuto

Function canCycleToAuto

src/utils/permissions/getNextPermissionMode.ts:17–29  ·  view source on GitHub ↗
(ctx: ToolPermissionContext)

Source from the content-addressed store, hash-verified

15// (permissionSetup.ts:~559), which would silently crash the shift+tab handler
16// and leave the user stuck at the current mode.
17function canCycleToAuto(ctx: ToolPermissionContext): boolean {
18 if (feature('TRANSCRIPT_CLASSIFIER')) {
19 const gateEnabled = isAutoModeGateEnabled()
20 const can = !!ctx.isAutoModeAvailable && gateEnabled
21 if (!can) {
22 logForDebugging(
23 `[auto-mode] canCycleToAuto=false: ctx.isAutoModeAvailable=${ctx.isAutoModeAvailable} isAutoModeGateEnabled=${gateEnabled} reason=${getAutoModeUnavailableReason()}`,
24 )
25 }
26 return can
27 }
28 return false
29}
30
31/**
32 * Determines the next permission mode when cycling through modes with Shift+Tab.

Callers 1

getNextPermissionModeFunction · 0.85

Calls 4

featureFunction · 0.85
isAutoModeGateEnabledFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected