move CLI command files into cli/commands/ subdirectory#14209
Conversation
Move all 26 command registration files from assistant/src/cli/ into assistant/src/cli/commands/ so that cli/ contains only utilities, infrastructure, and entry points (program.ts, utils.ts, reference.ts, ipc-client.ts, email-guardrails.ts, main-screen.tsx). Update all relative imports in moved files (../X → ../../X, ./utils → ../utils), program.ts imports (./X → ./commands/X), and 6 test files that imported command modules directly. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
After moving this file into cli/commands, import.meta.dirname is one directory deeper, so ../daemon/main.ts now resolves to assistant/src/cli/daemon/main.ts (which does not exist). That makes assistant dev (with or without --watch) fail when it tries to spawn bun run against the wrong script path, so the dev command no longer starts the assistant.
This relative path was correct before the move, but from assistant/src/cli/commands/doctor.ts the expression ../../node_modules/... points to assistant/src/node_modules instead of assistant/node_modules. In source runs, assistant doctor will now falsely report missing Tree-sitter WASM files even when dependencies are installed, which degrades diagnostics reliability.
With the command file moved under cli/commands, this ../../../skills lookup now resolves to assistant/skills instead of the repo-level skills/ directory. When VELLUM_DEV is enabled, getRepoSkillsDir() will miss the local catalog and disable repo-local skill discovery, which breaks local development/offline workflows for assistant skills.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed in #14257 |
Summary
assistant/src/cli/intoassistant/src/cli/commands/to separate command definitions from shared utilities and infrastructureprogram.ts, and 6 test filesOriginal prompt
Help me move all of these files into assistant/src/cli/commands so that all remaining files in assistant/src/cli are more like utility functions, and other things, not commands that need registering.
Generated with Claude Code