fix: use colon syntax for Cursor slash commands#1335
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe Cursor command adapter now generates the command ChangesCursor Command Name Colon Syntax
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/core/command-generation/adapters/cursor.ts (1)
15-26: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winAlign the Cursor command spec with the new name syntax.
openspec/specs/command-generation/spec.mdstill requiresnameto be/opsx-<id>, whilesrc/core/command-generation/adapters/cursor.tsnow emits/opsx:<id>. Update the spec or revert the adapter so the contract stays consistent.🤖 Prompt for 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. In `@src/core/command-generation/adapters/cursor.ts` around lines 15 - 26, The Cursor command naming contract is inconsistent between cursorAdapter and the command-generation spec. Update either the spec in command-generation/spec.md or the cursorAdapter.formatFile output so both use the same name syntax, and keep getFilePath aligned with that chosen convention by referencing the cursorAdapter and its /opsx naming format.
🤖 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.
Outside diff comments:
In `@src/core/command-generation/adapters/cursor.ts`:
- Around line 15-26: The Cursor command naming contract is inconsistent between
cursorAdapter and the command-generation spec. Update either the spec in
command-generation/spec.md or the cursorAdapter.formatFile output so both use
the same name syntax, and keep getFilePath aligned with that chosen convention
by referencing the cursorAdapter and its /opsx naming format.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ca943590-e4e9-4fe3-bc67-02a5df0c132f
📒 Files selected for processing (4)
src/core/command-generation/adapters/cursor.tstest/commands/artifact-workflow.test.tstest/core/command-generation/adapters.test.tstest/core/command-generation/generator.test.ts
|
Thanks for the review. I pushed a follow-up commit that aligns the command-generation spec with the new Cursor frontmatter name syntax ( Validation re-run:
|
Summary
/opsx:<command>names instead of/opsx-<command>.cursor/commands/opsx-<command>.mdfilenames and ids unchangedFixes #1307.
Validation
pnpm exec vitest run test/core/command-generation/adapters.test.ts test/core/command-generation/generator.test.ts test/commands/artifact-workflow.test.ts(179 passed)pnpm run buildpnpm run lint(passes with one pre-existing warning insrc/core/references.tsabout an unused eslint-disable directive)I could not verify Cursor's UI command palette locally from this CLI environment, so the local validation covers generated file content and build/lint checks.
Summary by CodeRabbit
:syntax (e.g.,/opsx:<id>).namepattern.