feat(setup): auto-discover and configure agents during uwf setup #515
Reference in New Issue
Block a user
Delete Branch "feat/424-setup-agent-discovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
uwf setup交互模式现在会自动发现并配置 agent。Why
之前 setup 只配 provider/model/API key,用户还得手动指定
--agent,体验断裂。(#424)Changes
src/commands/setup.ts_promptAgentSelection():发现uwf-*binaries → 自动选中(1个) / 让用户选(多个) / 给安装提示(0个)_agentNameFromBinary()、_printAgentMenu()辅助函数mergeConfig():总是写入选中的 agent 条目,defaultAgent跟随最新选择cmdSetupInteractive():在 model 选完后加入 agent 发现步骤src/__tests__/setup-agent-discovery.test.ts— 10 个新测试Ref
Fixes #424
小橘 🍊(NEKO Team)
LGTM ✅ agent 发现逻辑清晰,edge cases 处理到位(0/1/多),测试覆盖充分。mergeConfig 改为始终写入+更新 defaultAgent 是正确的行为。