( context: LocalJSXCommandContext, )
| 27 | } |
| 28 | |
| 29 | export function handleAuthChangeInCommand( |
| 30 | context: LocalJSXCommandContext, |
| 31 | ): void { |
| 32 | context.onChangeAPIKey() |
| 33 | // Signature-bearing blocks (thinking, connector_text) are bound to the API key. |
| 34 | context.setMessages(stripSignatureBlocks) |
| 35 | resetCostState() |
| 36 | refreshAuthDependentServices() |
| 37 | resetBypassPermissionsCheck() |
| 38 | const appState = context.getAppState() |
| 39 | void checkAndDisableBypassPermissionsIfNeeded( |
| 40 | appState.toolPermissionContext, |
| 41 | context.setAppState, |
| 42 | ) |
| 43 | if (feature('TRANSCRIPT_CLASSIFIER')) { |
| 44 | resetAutoModeGateCheck() |
| 45 | void checkAndDisableAutoModeIfNeeded( |
| 46 | appState.toolPermissionContext, |
| 47 | context.setAppState, |
| 48 | appState.fastMode, |
| 49 | ) |
| 50 | } |
| 51 | context.setAppState(prev => ({ |
| 52 | ...prev, |
| 53 | authVersion: prev.authVersion + 1, |
| 54 | })) |
| 55 | } |
no test coverage detected