MCPcopy Index your code
hub / github.com/codeaashu/claude-code / clearRegisteredPluginHooks

Function clearRegisteredPluginHooks

src/bootstrap/state.ts:1446–1461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1444}
1445
1446export function clearRegisteredPluginHooks(): void {
1447 if (!STATE.registeredHooks) {
1448 return
1449 }
1450
1451 const filtered: Partial<Record<HookEvent, RegisteredHookMatcher[]>> = {}
1452 for (const [event, matchers] of Object.entries(STATE.registeredHooks)) {
1453 // Keep only callback hooks (those without pluginRoot)
1454 const callbackHooks = matchers.filter(m => !('pluginRoot' in m))
1455 if (callbackHooks.length > 0) {
1456 filtered[event as HookEvent] = callbackHooks
1457 }
1458 }
1459
1460 STATE.registeredHooks = Object.keys(filtered).length > 0 ? filtered : null
1461}
1462
1463export function resetSdkInitState(): void {
1464 STATE.initJsonSchema = null

Callers 2

loadPluginHooks.tsFile · 0.85
pruneRemovedPluginHooksFunction · 0.85

Calls 2

entriesMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected