// 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'; // Always reload hook config and available skills to get latest data await Promise.all([ loadHookConfig(), loadAvailableSkills() ]); const globalHooks = hookConfig.global?.hooks || {}; const projectHooks = hookConfig.project?.hooks || {}; // Count hooks const globalHookCount = countHooks(globalHooks); const projectHookCount = countHooks(projectHooks); container.innerHTML = `
${t('empty.noHooks')}
${t('empty.createHookHint')}
${t('empty.noGlobalHooks')}
${t('empty.globalHooksHint')}
$CLAUDE_FILE_PATHS
${t('hook.filePaths')}
$CLAUDE_TOOL_NAME
${t('hook.toolName')}
$CLAUDE_TOOL_INPUT
${t('hook.toolInput')}
$CLAUDE_SESSION_ID
${t('hook.sessionId')}
$CLAUDE_PROJECT_DIR
${t('hook.projectDir')}
$CLAUDE_WORKING_DIR
${t('hook.workingDir')}
${escapeHtml(wizardDesc)}
${getHookEventDescription(event)}
${escapeHtml(description)}