refactor: 统一项目名称从OpenFang到ZCLAW
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括:
- 配置文件中的项目名称
- 代码注释和文档引用
- 环境变量和路径
- 类型定义和接口名称
- 测试用例和模拟数据

同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
This commit is contained in:
iven
2026-03-27 07:36:03 +08:00
parent 4b08804aa9
commit 0d4fa96b82
226 changed files with 7288 additions and 5788 deletions

View File

@@ -95,10 +95,10 @@ pnpm tauri:build:bundled
| 文件 | 位置 |
|------|------|
| 主配置 | `%USERPROFILE%\.openfang\openfang.toml` |
| 环境变量 | `%USERPROFILE%\.openfang\.env` |
| 数据库 | `%USERPROFILE%\.openfang\data\openfang.db` |
| 日志 | `%USERPROFILE%\.openfang\logs\` |
| 主配置 | `%USERPROFILE%\.zclaw\zclaw.toml` |
| 环境变量 | `%USERPROFILE%\.zclaw\.env` |
| 数据库 | `%USERPROFILE%\.zclaw\data\zclaw.db` |
| 日志 | `%USERPROFILE%\.zclaw\logs\` |
### 首次启动配置
@@ -158,7 +158,7 @@ ZCLAW_DB_PATH=./data/zclaw.db
```bash
# 查看最新日志
type %USERPROFILE%\.openfang\logs\app.log | more
type %USERPROFILE%\.zclaw\logs\app.log | more
```
## 更新流程
@@ -177,7 +177,7 @@ type %USERPROFILE%\.openfang\logs\app.log | more
## 安全建议
1. **API Key 保护**:不要分享 API Key
2. **定期备份**:备份 `.openfang` 目录
2. **定期备份**:备份 `.zclaw` 目录
3. **网络隔离**:建议在可信网络使用
4. **权限控制**:限制对配置目录的访问

View File

@@ -111,11 +111,11 @@ dir src-tauri\target\release\bundle\nsis\
ZCLAW 在以下位置存储用户数据:
```
%USERPROFILE%\.openfang\
├── openfang.toml # 主配置文件
%USERPROFILE%\.zclaw\
├── zclaw.toml # 主配置文件
├── .env # 环境变量(可选)
├── data/
│ └── openfang.db # SQLite 数据库
│ └── zclaw.db # SQLite 数据库
└── logs/
└── app.log # 应用日志
```
@@ -156,7 +156,7 @@ ZCLAW 在以下位置存储用户数据:
winget install Microsoft.VCRedist.2015+.x64
# 重置配置
Remove-Item -Recurse -Force "$env:USERPROFILE\.openfang"
Remove-Item -Recurse -Force "$env:USERPROFILE\.zclaw"
# 检查端口占用
netstat -ano | findstr :50051
@@ -176,10 +176,10 @@ netstat -ano | findstr :50051
**解决方案**
```powershell
# 检查目录权限
icacls "$env:USERPROFILE\.openfang"
icacls "$env:USERPROFILE\.zclaw"
# 修复权限
icacls "$env:USERPROFILE\.openfang" /grant:r "%USERNAME%:(OI)(CI)F"
icacls "$env:USERPROFILE\.zclaw" /grant:r "%USERNAME%:(OI)(CI)F"
```
## 卸载
@@ -195,7 +195,7 @@ icacls "$env:USERPROFILE\.openfang" /grant:r "%USERNAME%:(OI)(CI)F"
1. 删除安装目录(默认:`C:\Program Files\ZCLAW`
2. 删除用户数据(可选):
```powershell
Remove-Item -Recurse -Force "$env:USERPROFILE\.openfang"
Remove-Item -Recurse -Force "$env:USERPROFILE\.zclaw"
```
3. 删除快捷方式
@@ -220,8 +220,8 @@ icacls "$env:USERPROFILE\.openfang" /grant:r "%USERNAME%:(OI)(CI)F"
```powershell
# 查看最新日志
Get-Content "$env:USERPROFILE\.openfang\logs\app.log" -Tail 50
Get-Content "$env:USERPROFILE\.zclaw\logs\app.log" -Tail 50
# 导出日志
Copy-Item "$env:USERPROFILE\.openfang\logs" -Destination "C:\temp\zclaw-logs" -Recurse
Copy-Item "$env:USERPROFILE\.zclaw\logs" -Destination "C:\temp\zclaw-logs" -Recurse
```