迁移文件:
- AgentCLI.tsx: 主机格式/安全模式示例/确认弹框/历史记录/状态徽章等 12 处
- LLMConfig.tsx: 云服务/自定义分组/推理模式/测试连接/配置帮助等 15 处
- AIOpsAssistant.tsx: 能力展示/自动报告生成
- AIAlertAnalyzer.tsx: AI引擎状态/活跃计数/严重等级标签
- AIAnalysisResult.tsx: 分析结果标题/根因/影响/建议/相似案例/修复脚本
- AutoFixDialog.tsx: 脚本确认弹框/警告/取消/执行按钮
- PredictiveCapacityTab.tsx: 容量预警/AI解读/7天预测/当前/预测/阈值标签
- AIPredictiveAnalytics.tsx: 关键指标/线性回归/趋势/预测值/概率
- AgentCLIMessages.tsx: 轮次/工具数/思考/耗时标签
- AgentCLIHistory.tsx: 删除确认/新建/轮次摘要
- analyzerHelpers.ts: 持续时间格式化 (小时/分钟)
- predictUtils.ts: 时间范围/异常预测/容量摘要
翻译键总数: 6088 → 6172 (zh-CN/en-US 完全对齐)
CJK 残留: 1672 → 1114 字符 (33% 降幅)
tsc -b=0, npm build=✅, 17/17 集成测试通过
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])