mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
What I changed: - extracted a single missingModeError helper in agent/mode.ts so the command no longer duplicates the same command error payload in two branches - flattened control flow by returning early for --list and using one set-mode path guarded by explicit missing-mode validation - tightened tests/10-agent-mode.test.ts to assert the exact missing-mode error message instead of allowing a daemon-connection fallback Reasoning: - this keeps behavior the same while reducing branch duplication and making the validation contract explicit - the hardened test protects the intended precedence: missing required mode should fail before any daemon interaction Verification: - npm run typecheck - (cd packages/cli && npx tsx tests/10-agent-mode.test.ts) Notes for next agent: - repository had a pre-existing local modification in scripts/codex-refactor-loop.sh; I intentionally did not touch or stage it - no blockers encountered for this refactor