添加Claude和Codex环境变量检查 (#242)

* feat(env): add environment variable conflict detection and management

实现了系统环境变量冲突检测与管理功能:

核心功能:
- 自动检测会影响 Claude/Codex 的系统环境变量
- 支持 Windows 注册表和 Unix shell 配置文件检测
- 提供可视化的环境变量冲突警告横幅
- 支持批量选择和删除环境变量
- 删除前自动备份,支持后续恢复

技术实现:
- Rust 后端: 跨平台环境变量检测与管理
- React 前端: EnvWarningBanner 组件交互界面
- 国际化支持: 中英文界面
- 类型安全: 完整的 TypeScript 类型定义

* refactor(env): remove unused imports and function

Remove unused HashMap and PathBuf imports, and delete the unused get_source_description function to clean up the code.
This commit is contained in:
冰子
2025-11-18 23:44:44 +08:00
committed by GitHub
parent ec303544ca
commit b9412ece0b
15 changed files with 948 additions and 2 deletions

View File

@@ -608,6 +608,43 @@
"deleteMessage": "确定要删除提示词 \"{{name}}\" 吗?"
}
},
"env": {
"warning": {
"title": "检测到系统环境变量冲突",
"description": "发现 {{count}} 个环境变量可能会覆盖您的配置"
},
"actions": {
"expand": "查看详情",
"collapse": "收起",
"selectAll": "全选",
"clearSelection": "取消选择",
"deleteSelected": "删除选中 ({{count}})",
"deleting": "删除中..."
},
"field": {
"value": "值",
"source": "来源"
},
"source": {
"userRegistry": "用户环境变量 (注册表)",
"systemRegistry": "系统环境变量 (注册表)",
"systemEnv": "系统环境变量"
},
"delete": {
"success": "环境变量已成功删除",
"error": "删除环境变量失败"
},
"backup": {
"location": "备份位置: {{path}}"
},
"confirm": {
"title": "确认删除环境变量",
"message": "确定要删除 {{count}} 个环境变量吗?",
"backupNotice": "删除前将自动备份,您可以稍后恢复。删除后需要重启应用或终端才能生效。",
"confirm": "确认删除"
},
"error": {
"noSelection": "请选择要删除的环境变量"
"skills": {
"manage": "Skills",
"title": "Claude Skills 管理",