MCPcopy Create free account
hub / github.com/Noumena-Network/code / handleAuthChangeInCommand

Function handleAuthChangeInCommand

src/utils/postAuthFlow.ts:29–55  ·  view source on GitHub ↗
(
  context: LocalJSXCommandContext,
)

Source from the content-addressed store, hash-verified

27}
28
29export 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}

Callers 2

callFunction · 0.85
callFunction · 0.85

Tested by

no test coverage detected