/** * @license * Copyright 2026 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ import { Box, Text } from 'ink'; import { theme } from '../../semantic-colors.js'; import { t } from '../../../i18n/index.js'; interface HooksDisabledStepProps { configuredHooksCount: number; } export function HooksDisabledStep({ configuredHooksCount, }: HooksDisabledStepProps): React.JSX.Element { // Get the correct plural/singular form const hooksText = configuredHooksCount === 1 ? t('{{count}} configured hook', { count: String(configuredHooksCount) }) : t('{{count}} configured hooks', { count: String(configuredHooksCount), }); return ( {/* Title */} {t('Hook Configuration - Disabled')} {/* Main message */} {t( 'All hooks are currently disabled. You have {{count}} that are not running.', { count: hooksText, }, )} {/* Explanation */} {t('When hooks are disabled:')} {` · ${t('No hook commands will execute')}`} {` · ${t('StatusLine will not be displayed')}`} {` · ${t('Tool operations will proceed without hook validation')}`} {/* How to re-enable */} {t( 'To re-enable hooks, remove "disableAllHooks" from settings.json or ask Qwen Code.', )} {/* Footer hint */} {t('Esc to close')} ); }