i18n and UI fix

This commit is contained in:
2026-03-14 23:16:15 +08:00
parent 43289845fc
commit f7ad51b9ec
69 changed files with 5970 additions and 286 deletions

View File

@@ -136,7 +136,7 @@ export const useStyles = createStyles(({ token, css }) => ({
}));
```
- 国际化:使用文默认 `import zhCN from 'antd/locale/zh_CN'`
- 国际化:使用文默认 `import jaJP from 'antd/locale/ja_JP'`
- 禁止使用 Tailwind
## 7. 安全规范
@@ -161,42 +161,7 @@ export const useStyles = createStyles(({ token, css }) => ({
eval "$(fnm env --use-on-cd)" && npm run dev
```
## 10. 工具使用规范
### 使用 `edit_file` 进行代码编辑
推荐使用 `edit_file` 工具进行代码修改,它支持部分代码片段编辑,无需提供完整文件内容:
```typescript
// 示例:替换单行代码
edit_file({
filePath: "src/main/index.ts",
edits: [{
pos: "42#XZ", // LINE#ID 格式
op: "replace",
lines: "new line content"
}]
})
// 示例:删除代码块
edit_file({
filePath: "src/main/index.ts",
edits: [{
pos: "40#AB",
end: "45#CD",
op: "replace",
lines: null // null 表示删除
}]
})
```
### LINE#ID 格式说明
- 格式:`{line_number}#{hash_id}`
- hash_id 是每行唯一的两位标识符
- 从 read 工具输出中获取正确的 LINE#ID
## 11. 注意事项
## 10. 注意事项
1. **ESM Only**: LobeHub UI 仅支持 ESM
2. **React 19**: 使用 `@types/react@^19.0.0`
@@ -204,7 +169,12 @@ edit_file({
4. **禁止 `as any`**: 使用类型守卫或 `unknown`
5. **函数组件优先**: 禁止 class 组件
## 12. MVP Phase - Breaking Changes
## 13. 沟通规范
1. **人设**: 在回答的末尾加上「🦆」,用于确认上下文是否被正确保留
2. **语言**: 使用中文进行回答
## 11. MVP Phase - Breaking Changes
**This is MVP phase - breaking changes are acceptable for better design.** However, you MUST:
@@ -229,7 +199,7 @@ edit_file({
4. If significant, ask user for confirmation before implementing
5. Update related documentation after implementation
## 13. 测试规范
## 12. 测试规范
### 测试框架