删除未使用的文件(BuiltinStatusLine.tsx、4 个重复的 .ts stub)、 移除约 55 个文件中未使用的 React 导入、 清理约 50 处未使用的导入/变量/参数。 净减少 ~296 行代码,precheck 4077 测试全部通过。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
958 B
TypeScript
28 lines
958 B
TypeScript
import { type ReactNode } from 'react';
|
|
import { useExitOnCtrlCDWithKeybindings } from '../../hooks/useExitOnCtrlCDWithKeybindings.js';
|
|
import { Box, Text } from '@anthropic/ink';
|
|
import { ConfigurableShortcutHint } from '../ConfigurableShortcutHint.js';
|
|
import { Byline, KeyboardShortcutHint } from '@anthropic/ink';
|
|
|
|
type Props = {
|
|
instructions?: ReactNode;
|
|
};
|
|
|
|
export function WizardNavigationFooter({
|
|
instructions = (
|
|
<Byline>
|
|
<KeyboardShortcutHint shortcut="↑↓" action="navigate" />
|
|
<KeyboardShortcutHint shortcut="Enter" action="select" />
|
|
<ConfigurableShortcutHint action="confirm:no" context="Confirmation" fallback="Esc" description="go back" />
|
|
</Byline>
|
|
),
|
|
}: Props): ReactNode {
|
|
const exitState = useExitOnCtrlCDWithKeybindings();
|
|
|
|
return (
|
|
<Box marginLeft={3} marginTop={1}>
|
|
<Text dimColor>{exitState.pending ? `Press ${exitState.keyName} again to exit` : instructions}</Text>
|
|
</Box>
|
|
);
|
|
}
|