refactor(cli): consolidate internal command tree layout#502
Conversation
Remove the hidden `helper` parent command, promoting its 16 subcommands to direct children of `internal` (e.g. `internal helper ssh-server` -> `internal ssh-server`). Collapse the helper* sub-packages into the cmdinternal package, dropping the vestigial `helper` naming from files and import aliases now that the parent is gone. The agentPreRunE hook is attached per-command rather than on the `internal` parent so daemon-local/logs-daemon/run-user-commands keep inheriting the root command's PersistentPreRunE. git-ssh-signature-helper is preserved as a genuine distinct command.
✅ Deploy Preview for devsydev canceled.
|
|
Warning Review limit reached
More reviews will be available in 43 minutes and 16 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (87)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Refactoring the annotation reference (agent -> cmdinternal) made the line new to goconst's diff-scoped check, which flags the third "true" literal in the cmd/pro package. Match the existing //nolint:goconst convention already used in check_update.go.
Summary
cmd/agent/andcmd/helper/undercmd/internal/so the source layout mirrors the hiddeninternalcommand tree.agentcontainer/agentworkspacepackages, and group the helper http/json/strings/ssh/provider/image/workspace-info commands into focused sub-packages before dissolving the loose files into thecmdinternalpackage.helperparent command, promoting its 16 subcommands to direct children ofinternal(e.g.internal helper ssh-server->internal ssh-server), and update all Go, provider.yaml, desktop, and docs call sites.agentPreRunEhook per-command so daemon-local/logs-daemon/run-user-commands keep inheriting the root command'sPersistentPreRunE; preservegit-ssh-signature-helperas a genuine distinct command.