v0.4.0: 用户体验优化与高级功能
🎉 AgentSwitch v0.4.0 - 用户体验优化与高级功能
✨ 主要功能
1. 🧙 交互式配置向导 (wizard)
- 使用 inquire 库实现友好的 CLI 交互式向导
- 支持向导进度保存和恢复(--resume, --reset)
- TTY 终端检测和非交互式环境错误处理
- API Key 掩码显示(sk-***abc123)
- 配置文件自动创建
2. 🔍 自动发现已安装工具 (doctor)
- 自动检测系统中已安装的 Code Agent 工具
- 显示工具的安装状态、版本和配置文件路径
- 支持健康检查和配置验证
- 彩色终端输出
3. 🔤 Shell 自动补全 (completion)
- 为 Bash、Zsh、Fish 提供补全脚本
- 集成 clap_complete 生成静态补全
- 支持补全脚本安装/卸载
- 支持动态补全数据生成
4. 🔄 配置同步 (sync)
- Git 仓库初始化和管理
- AES-256-GCM 加密存储 API Key
- Argon2 密钥派生
- 支持推送、拉取和状态查询
🚀 新增命令
# 交互式向导
asw wizard init [--resume] [--reset]
# 工具诊断
asw doctor [verbose] [json] [fix]
asw doctor detect
# Shell 补全
asw completion install <bash|zsh|fish>
asw completion generate <bash|zsh|fish>
# Git 同步
asw sync init [--encrypt]
asw sync push
asw sync pull
asw sync status🔧 技术更新
新增依赖
inquire 0.7: 交互式输入clap_complete 4.5: Shell 补全git2 0.18: Git 操作aes-gcm 0.10: AES-GCM 加密argon2 0.5: 密钥派生base64 0.21: Base64 编码
新增模块
src/wizard/: 交互式向导模块src/doctor/: 工具诊断模块src/completion/: Shell 补全模块src/sync/: Git 同步模块src/crypto/: 加密模块
📊 统计
- 106 个文件修改
- 14,447 行新增
- 25 行删除
- 新增 4 大功能模块
- 所有测试通过
📚 文档
完整的功能规范、设计文档和任务清单请查看:
specs/004-ux-optimization/spec.mdspecs/004-ux-optimization/plan.mdspecs/004-ux-optimization/quickstart.md
🤖 Generated with Claude Code