MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / hookDedupKey

Function hookDedupKey

src/utils/hooks.ts:1590–1592  ·  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

1588 * template don't collapse: after expansion they point to different files.
1589 */
1590function hookDedupKey(m: MatchedHook, payload: string): string {
1591 return `${m.pluginRoot ?? m.skillRoot ?? ''}\0${payload}`
1592}
1593
1594/**
1595 * Build a map of {sanitizedPluginName: hookCount} from matched hooks.

Callers 1

getMatchingHooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected