Skip to content

v0.4.0: 用户体验优化与高级功能

Choose a tag to compare

@Yu-Xiao-Sheng Yu-Xiao-Sheng released this 11 Mar 01:53
· 28 commits to main since this release
0a789ca

🎉 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.md
  • specs/004-ux-optimization/plan.md
  • specs/004-ux-optimization/quickstart.md

🤖 Generated with Claude Code