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

Function updateHooksConfigSnapshot

src/utils/hooks/hooksConfigSnapshot.ts:104–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 * Respects the allowManagedHooksOnly setting
103 */
104export function updateHooksConfigSnapshot(): void {
105 // Reset the session cache to ensure we read fresh settings from disk.
106 // Without this, the snapshot could use stale cached settings when the user
107 // edits settings.json externally and then runs /hooks - the session cache
108 // may not have been invalidated yet (e.g., if the file watcher's stability
109 // threshold hasn't elapsed).
110 resetSettingsCache()
111 initialHooksConfig = getHooksFromAllowedSources()
112}
113
114/**
115 * Get the current hooks configuration from snapshot

Callers 3

setupFunction · 0.85
applySettingsChangeFunction · 0.85

Calls 2

resetSettingsCacheFunction · 0.85

Tested by

no test coverage detected