()
| 102 | * Respects the allowManagedHooksOnly setting |
| 103 | */ |
| 104 | export 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 |
no test coverage detected