Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06c76c2da7
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Adds output-size optimizations and basic CLI metadata support to @rsdoctor/agent-cli, primarily by stripping heavy modules arrays from several tool responses and exposing a --version/-v flag.
Changes:
- Add
--version/-vhandling to the agent CLI and corresponding tests. - Omit
modulesfields from chunk-related outputs (including bundle optimize step data and media assets) and adjust tests accordingly. - Update tree-shaking summary description to reference the correct detailed subcommands.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/agent-cli/tests/rsdoctor-cli.test.ts | Updates expected chunk outputs to no longer include modules. |
| packages/agent-cli/tests/cli.test.ts | Adds coverage for --version and -v CLI output. |
| packages/agent-cli/src/commands/handlers/tree-shaking.ts | Updates summary description text to reference current detailed commands. |
| packages/agent-cli/src/commands/handlers/chunks.ts | Strips modules from chunk list/large-chunk responses via a new omit helper. |
| packages/agent-cli/src/commands/handlers/build.ts | Strips modules from bundle optimize step-1 payloads. |
| packages/agent-cli/src/commands/handlers/assets.ts | Strips modules from media-assets chunk data. |
| packages/agent-cli/src/cli.ts | Implements --version/-v by printing the package version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
This pull request introduces several improvements and fixes to the agent CLI, focusing on version reporting and the consistent omission of the
modulesfield from chunk-related outputs. The changes also update tests to reflect the new behavior and clarify tree-shaking guidance messaging.New Features and Enhancements:
--versionand-vflags to print the package version, along with corresponding tests for both options.Data Output Consistency:
modulesField from Chunk Outputs:omitModulesFieldsutility function in multiple files to remove themodulesproperty from chunk data structures and all related outputs. This affects handlers for assets, build, and chunks, ensuring that any API or CLI output no longer includes themodulesfield.Documentation and Messaging:
Related Links