feat(agents): add diff and open commands (3/8)#8282
Conversation
📝 WalkthroughWalkthroughThis PR adds two new Netlify CLI subcommands for managing agent runs. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
79a1657 to
c47c842
Compare
c6e77a5 to
3220465
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/agents/agents-open.ts`:
- Around line 60-67: The messages in agents-open referencing a non-existent CLI
command `netlify agents:pr` are dead-ends; update the user-facing strings in
src/commands/agents/agents-open.ts (the block that checks runner.pr_error and
the subsequent "No pull request exists" branch using runner) to point to the
correct invocation `netlify agents:open <id> pr` (or to the actual command you
choose to implement), so users are given a valid CLI instruction; ensure both
the retry and create messages use `netlify agents:open ${id} pr` (or replace
with the name of a newly added agents:pr command if you implement that
endpoint).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e3567f08-9402-45bd-b650-7d5a9d1369a9
📒 Files selected for processing (7)
docs/commands/agents.mddocs/index.mdsrc/commands/agents/agents-diff.tssrc/commands/agents/agents-open.tssrc/commands/agents/agents.tstests/integration/commands/agents/agents-diff.test.tstests/integration/commands/agents/agents-open.test.ts
- agents:diff renders the change set for an agent run (with --no-strip-binary to keep binary patches) - agents:open opens the run's preview, dashboard, or PR in the browser, honoring NETLIFY_WEB_UI for staging Part 3/8 of the agents CLI revamp split.
c47c842 to
8a0f826
Compare
3220465 to
35a38b9
Compare
|
Link EX-2195 |
Summary
Linear: https://linear.app/netlify/issue/EX-2195
Part 3 of the agents CLI revamp split. Adds two read-only commands.
agents:diffprints the change set an agent run produced. Supports--session,--cumulative, pagination, and--no-strip-binaryto keep raw binary patches (stripped by default).agents:openopens the run's preview, dashboard, or pull request in the browser. HonorsNETLIFY_WEB_UIso links work on staging.Stacked on the existing-commands PR.
For us to review and ship your PR efficiently, please perform the following steps:
re fixing a typo or something thats on fire 🔥 (e.g. incident related), you can skip this step.passes our tests.