chore: reduce complexity in cli-workflow setup.ts #445

Closed
opened 2026-05-23 14:39:55 +00:00 by xingyue · 0 comments
Owner

Split from #444.

Refactor 3 functions in packages/cli-workflow/src/commands/setup.ts:

  • _discoverAgents (32 → ≤15)
  • onData closure (32 → ≤15)
  • cmdSetupInteractive (41 → ≤15)

Strategy: extract helper functions, split conditionals, early returns.
Keep existing tests green, add unit tests for extracted helpers.

Split from #444. Refactor 3 functions in `packages/cli-workflow/src/commands/setup.ts`: - `_discoverAgents` (32 → ≤15) - `onData` closure (32 → ≤15) - `cmdSetupInteractive` (41 → ≤15) Strategy: extract helper functions, split conditionals, early returns. Keep existing tests green, add unit tests for extracted helpers.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#445