mcfn.feng
|
2f421b1dfa
|
[packages/cli-v2]refactor: port setup to interactive wizard from actionbook-rs
Convert setup from a single-file sync implementation to a multi-module
interactive wizard matching the actionbook-rs design:
- setup/mod.rs: 4-step orchestrator (env detect → API key → browser → save)
with welcome banner, spinners, re-run protection, and completion summary
- setup/theme.rs: dialoguer theme with ◉/○ radio-button style
- setup/detect.rs: environment detection (OS, browsers, Node, npx, existing config)
- setup/api_key.rs: interactive API key input (flag > env > config > prompt)
- setup/browser_cfg.rs: interactive browser mode selection (local/extension/cloud)
Config field renames with serde aliases for backward compatibility:
- api.base_url added
- browser.default_profile → browser.profile_name
- browser.executable → browser.executable_path
TODOs left for future PRs:
- API key server-side validation (requires ApiClient)
- Extension installer integration
- Health check step
- Skills installation step
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-28 17:28:31 +08:00 |
|