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

Function getAppState

src/utils/hooks/execAgentHook.ts:137–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135 },
136 setInProgressToolUseIDs: () => {},
137 getAppState() {
138 const appState = toolUseContext.getAppState()
139 // Add session rule to allow reading transcript file
140 const existingSessionRules =
141 appState.toolPermissionContext.alwaysAllowRules.session ?? []
142 return {
143 ...appState,
144 toolPermissionContext: {
145 ...appState.toolPermissionContext,
146 mode: 'dontAsk' as const,
147 alwaysAllowRules: {
148 ...appState.toolPermissionContext.alwaysAllowRules,
149 session: [...existingSessionRules, `Read(/${transcriptPath})`],
150 },
151 },
152 }
153 },
154 }
155
156 // Register a session-level stop hook to enforce structured output

Callers 5

getEnhancedPRAttributionFunction · 0.50
executeHooksOutsideREPLFunction · 0.50
pollTasksFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected