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

Function hookDedupKey

src/utils/hooks.ts:1453–1455  ·  view source on GitHub ↗

* Build a dedup key for a matched hook, namespaced by source context. * * Settings-file hooks (no pluginRoot/skillRoot) share the '' prefix so the * same command defined in user/project/local still collapses to one — the * original intent of the dedup. Plugin/skill hooks get their root as the *

(m: MatchedHook, payload: string)

Source from the content-addressed store, hash-verified

1451 * template don't collapse: after expansion they point to different files.
1452 */
1453function hookDedupKey(m: MatchedHook, payload: string): string {
1454 return `${m.pluginRoot ?? m.skillRoot ?? ''}\0${payload}`
1455}
1456
1457/**
1458 * Build a map of {sanitizedPluginName: hookCount} from matched hooks.

Callers 1

getMatchingHooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected