mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
删除未使用的文件(BuiltinStatusLine.tsx、4 个重复的 .ts stub)、 移除约 55 个文件中未使用的 React 导入、 清理约 50 处未使用的导入/变量/参数。 净减少 ~296 行代码,precheck 4077 测试全部通过。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import { GITHUB_ACTION_SETUP_DOCS_URL } from '../../constants/github-app.js';
|
|
import { Box, Text } from '@anthropic/ink';
|
|
|
|
interface ErrorStepProps {
|
|
error: string | undefined;
|
|
errorReason?: string;
|
|
errorInstructions?: string[];
|
|
}
|
|
|
|
export function ErrorStep({ error, errorReason, errorInstructions }: ErrorStepProps) {
|
|
return (
|
|
<>
|
|
<Box flexDirection="column" borderStyle="round" paddingX={1}>
|
|
<Box flexDirection="column" marginBottom={1}>
|
|
<Text bold>Install GitHub App</Text>
|
|
</Box>
|
|
<Text color="error">Error: {error}</Text>
|
|
{errorReason && (
|
|
<Box marginTop={1}>
|
|
<Text dimColor>Reason: {errorReason}</Text>
|
|
</Box>
|
|
)}
|
|
{errorInstructions && errorInstructions.length > 0 && (
|
|
<Box flexDirection="column" marginTop={1}>
|
|
<Text dimColor>How to fix:</Text>
|
|
{errorInstructions.map((instruction, index) => (
|
|
<Box key={index} marginLeft={2}>
|
|
<Text dimColor>• </Text>
|
|
<Text>{instruction}</Text>
|
|
</Box>
|
|
))}
|
|
</Box>
|
|
)}
|
|
<Box marginTop={1}>
|
|
<Text dimColor>
|
|
For manual setup instructions, see: <Text color="claude">{GITHUB_ACTION_SETUP_DOCS_URL}</Text>
|
|
</Text>
|
|
</Box>
|
|
</Box>
|
|
<Box marginLeft={3}>
|
|
<Text dimColor>Press any key to exit</Text>
|
|
</Box>
|
|
</>
|
|
);
|
|
}
|