MCPcopy Create free account
hub / github.com/Noumena-Network/code / hasHooks

Function hasHooks

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

Source from the content-addressed store, hash-verified

9const LOCAL_SETTINGS_DISPLAY_PATH = '.ncode/settings.local.json'
10
11function hasHooks(settings: SettingsJson | null): boolean {
12 if (settings === null || settings.disableAllHooks) {
13 return false
14 }
15 if (settings.statusLine?.type === 'command') {
16 return true
17 }
18 if (settings.fileSuggestion) {
19 return true
20 }
21 if (!settings.hooks) {
22 return false
23 }
24 for (const hookConfig of Object.values(settings.hooks)) {
25 if (hookConfig.length > 0) {
26 return true
27 }
28 }
29 return false
30}
31
32export function getHooksSources(): string[] {
33 const sources: string[] = []

Callers 1

getHooksSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected