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

Function hasHooks

src/components/TrustDialog/utils.ts:8–27  ·  view source on GitHub ↗
(settings: SettingsJson | null)

Source from the content-addressed store, hash-verified

6import { getPermissionRulesForSource } from '../../utils/permissions/permissionsLoader.js'
7
8function hasHooks(settings: SettingsJson | null): boolean {
9 if (settings === null || settings.disableAllHooks) {
10 return false
11 }
12 if (settings.statusLine) {
13 return true
14 }
15 if (settings.fileSuggestion) {
16 return true
17 }
18 if (!settings.hooks) {
19 return false
20 }
21 for (const hookConfig of Object.values(settings.hooks)) {
22 if (hookConfig.length > 0) {
23 return true
24 }
25 }
26 return false
27}
28
29export function getHooksSources(): string[] {
30 const sources: string[] = []

Callers 1

getHooksSourcesFunction · 0.85

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected