getHookDisplayText function
Get the display text for a hook.
Implementation
String getHookDisplayText(HookCommand hook) {
if (hook is FunctionHook && hook.statusMessage != null) {
return hook.statusMessage!;
}
if (hook is CommandHook) return hook.command;
if (hook is PromptHook) return hook.prompt;
if (hook is AgentHook) return hook.prompt;
if (hook is HttpHook) return hook.url;
if (hook is FunctionHook) return 'function';
return 'unknown';
}