(ctx: ToolPermissionContext)
| 15 | // (permissionSetup.ts:~559), which would silently crash the shift+tab handler |
| 16 | // and leave the user stuck at the current mode. |
| 17 | function 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. |
no test coverage detected