// Hook Manager View // Renders the Claude Code hooks management interface async function renderHookManager() { const container = document.getElementById('mainContent'); if (!container) return; // Hide stats grid and search for Hook view const statsGrid = document.getElementById('statsGrid'); const searchInput = document.getElementById('searchInput'); if (statsGrid) statsGrid.style.display = 'none'; if (searchInput) searchInput.parentElement.style.display = 'none'; // Load hook config if not already loaded if (!hookConfig.global.hooks && !hookConfig.project.hooks) { await loadHookConfig(); } const globalHooks = hookConfig.global?.hooks || {}; const projectHooks = hookConfig.project?.hooks || {}; // Count hooks const globalHookCount = countHooks(globalHooks); const projectHookCount = countHooks(projectHooks); container.innerHTML = `
No hooks configured for this project
Create a hook to automate actions on tool usage
No global hooks configured
Global hooks apply to all Claude Code sessions
$CLAUDE_FILE_PATHS
Space-separated file paths affected
$CLAUDE_TOOL_NAME
Name of the tool being executed
$CLAUDE_TOOL_INPUT
JSON input passed to the tool
$CLAUDE_SESSION_ID
Current Claude session ID
$CLAUDE_PROJECT_DIR
Current project directory path
$CLAUDE_WORKING_DIR
Current working directory
${getHookEventDescription(event)}
${escapeHtml(description)}