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

Function persistPermissions

src/hooks/toolPermission/PermissionContext.ts:139–147  ·  view source on GitHub ↗
(updates: PermissionUpdate[])

Source from the content-addressed store, hash-verified

137 })
138 },
139 async persistPermissions(updates: PermissionUpdate[]) {
140 if (updates.length === 0) return false
141 persistPermissionUpdates(updates)
142 const appState = toolUseContext.getAppState()
143 setToolPermissionContext(
144 applyPermissionUpdates(appState.toolPermissionContext, updates),
145 )
146 return updates.some(update => supportsPersistence(update.destination))
147 },
148 resolveIfAborted(resolve: (decision: PermissionDecision) => void) {
149 if (!toolUseContext.abortController.signal.aborted) return false
150 this.logCancelled()

Callers

nothing calls this directly

Calls 4

persistPermissionUpdatesFunction · 0.85
setToolPermissionContextFunction · 0.85
applyPermissionUpdatesFunction · 0.85
supportsPersistenceFunction · 0.85

Tested by

no test coverage detected