(
hook: HookCommand | { type: 'callback' | 'function'; statusMessage?: string },
)
| 66 | |
| 67 | /** Get the display text for a hook */ |
| 68 | export 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 | |
| 92 | export function getAllHooks(appState: AppState): IndividualHookConfig[] { |
| 93 | const hooks: IndividualHookConfig[] = [] |
no outgoing calls
no test coverage detected