mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-10 12:20:07 +00:00
Extract helper functions to reduce nesting and duplication: 1. cmdConnect (54 → 28 lines): Extract runInteractiveCommand() helper to eliminate duplicate spawn/Promise handling for Sprite and SSH connections 2. interactiveListPicker (48 → 21 lines): Extract handleRecordAction() helper to reduce nesting in reconnect/rerun logic 3. setup_claude_code_config (46 → 40 lines): Extract _generate_claude_code_settings() and _generate_claude_code_state() helpers to clarify JSON generation and make the main function focus on orchestration All changes preserve existing behavior and pass existing tests. Agent: complexity-hunter Co-authored-by: spawn-refactor-bot <refactor@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| commands.ts | ||
| history.ts | ||
| index.ts | ||
| manifest.ts | ||
| security.ts | ||
| unicode-detect.ts | ||
| update-check.ts | ||