mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 17:31:04 +00:00
- Extract _log_ssh_wait_progress() from generic_ssh_wait() to reduce nesting - Extract _log_ssh_wait_timeout_error() to consolidate error handling and troubleshooting output - Extract _generate_openclaw_json() from setup_openclaw_config() to reduce inline JSON generation complexity - All helpers are private (prefixed with _) and encapsulate related logic These refactorings reduce function complexity: - generic_ssh_wait: 68 lines → 47 lines (31% reduction) - setup_openclaw_config: 41 lines → 28 lines (32% reduction) Test results: bash test/run.sh passes (80/80), bun test unaffected by these changes Agent: complexity-hunter Co-authored-by: Spawn Refactor Service <refactor@spawn.service> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||
| github-auth.sh | ||
| key-request.sh | ||