MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getHookDisplayText

Function getHookDisplayText

src/utils/hooks/hooksSettings.ts:68–90  ·  view source on GitHub ↗
(
  hook: HookCommand | { type: 'callback' | 'function'; statusMessage?: string },
)

Source from the content-addressed store, hash-verified

66
67/** Get the display text for a hook */
68export function getHookDisplayText(
69 hook: HookCommand | { type: 'callback' | 'function'; statusMessage?: string },
70): string {
71 // Return custom status message if provided
72 if ('statusMessage' in hook && hook.statusMessage) {
73 return hook.statusMessage
74 }
75
76 switch (hook.type) {
77 case 'command':
78 return hook.command
79 case 'prompt':
80 return hook.prompt
81 case 'agent':
82 return hook.prompt
83 case 'http':
84 return hook.url
85 case 'callback':
86 return 'callback'
87 case 'function':
88 return 'function'
89 }
90}
91
92export function getAllHooks(appState: AppState): IndividualHookConfig[] {
93 const hooks: IndividualHookConfig[] = []

Callers 2

_temp2Function · 0.85
executeHooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected