Add support for Junie from JetBrains tool and command generation#853
Add support for Junie from JetBrains tool and command generation#853preigile wants to merge 2 commits intoFission-AI:mainfrom
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds the Junie tool: new command adapter implementation, export and registry registration, AI_TOOLS configuration entry, legacy command path patterns, docs update, and tests verifying registration. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI/Generator
participant Registry as CommandAdapterRegistry
participant Adapter as junieAdapter
participant FS as FileSystem
CLI->>Registry: request adapter for "junie"
Registry-->>CLI: returns junieAdapter
CLI->>Adapter: build CommandContent + commandId
Adapter-->>CLI: filePath (".junie/commands/opsx-<id>.md") and formattedContent
CLI->>FS: write filePath with formattedContent
FS-->>CLI: write success
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
test/core/command-generation/registry.test.ts (1)
24-28: Add Junie behavior assertions, not only registry presence.Lines 24-28 and Line 63 validate registration, but they don’t verify Junie-specific path/format behavior. A broken Junie adapter implementation could still pass these tests.
Suggested test additions
@@ it('registered adapters should have working getFilePath', () => { const claudeAdapter = CommandAdapterRegistry.get('claude'); const cursorAdapter = CommandAdapterRegistry.get('cursor'); const windsurfAdapter = CommandAdapterRegistry.get('windsurf'); + const junieAdapter = CommandAdapterRegistry.get('junie'); expect(claudeAdapter?.getFilePath('test')).toContain('.claude'); expect(cursorAdapter?.getFilePath('test')).toContain('.cursor'); expect(windsurfAdapter?.getFilePath('test')).toContain('.windsurf'); + expect(junieAdapter?.getFilePath('test')).toContain('.junie'); + expect(junieAdapter?.getFilePath('test')).toContain('opsx-test.md'); }); @@ const adapters = CommandAdapterRegistry.getAll(); for (const adapter of adapters) { const output = adapter.formatFile(content); @@ } + + const junieOutput = CommandAdapterRegistry.get('junie')?.formatFile(content) ?? ''; + expect(junieOutput).toContain('description: Test desc'); + expect(junieOutput).toContain('Body content'); });Also applies to: 63-63
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/core/command-generation/registry.test.ts` around lines 24 - 28, The test currently only checks registry presence for CommandAdapterRegistry.get('junie'); extend it to exercise Junie-specific behavior by calling the adapter's public formatting/build method(s) (e.g., adapter.formatCommand(...) or adapter.buildCommand(...) — whichever the CommandAdapter interface exposes) with a representative input and assert the returned path/format/command matches Junie expectations (for example specific path prefix, file extension, or command structure) in the same test block (and similarly at the other location around line 63); keep the existing toolId assertion and add one or two focused assertions that validate Junie-specific output so a broken Junie adapter implementation will fail the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/supported-tools.md`:
- Line 39: Update the Junie table row to match the rest of the table convention
by adding the tool ID and concrete include/exclude patterns: replace the current
row containing "Junie | `.junie/skills/` | `.junie/commands/`" with a
four-column entry that includes the tool ID (e.g., "junie") and explicit pattern
entries (for example, include pattern like ".junie/**" and specific subfolder
patterns such as ".junie/skills/**" and ".junie/commands/**") so the Junie row
uses the same columns and concrete patterns as other tool rows.
In `@src/core/legacy-cleanup.ts`:
- Line 56: The Junie legacy cleanup entry currently uses the glob pattern
'.junie/commands/openspec-*.md' but Junie generator actually emits files named
'opsx-*.md' (see the 'junie' mapping in legacy-cleanup.ts); update the 'junie'
mapping's pattern to match the generated filenames (e.g., change to
'.junie/commands/opsx-*.md' or include both patterns) so stale Junie command
files are detected and removed by the cleanup flow.
---
Nitpick comments:
In `@test/core/command-generation/registry.test.ts`:
- Around line 24-28: The test currently only checks registry presence for
CommandAdapterRegistry.get('junie'); extend it to exercise Junie-specific
behavior by calling the adapter's public formatting/build method(s) (e.g.,
adapter.formatCommand(...) or adapter.buildCommand(...) — whichever the
CommandAdapter interface exposes) with a representative input and assert the
returned path/format/command matches Junie expectations (for example specific
path prefix, file extension, or command structure) in the same test block (and
similarly at the other location around line 63); keep the existing toolId
assertion and add one or two focused assertions that validate Junie-specific
output so a broken Junie adapter implementation will fail the test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 038bb184-1c73-4298-a576-d6b5d537cc94
📒 Files selected for processing (7)
docs/supported-tools.mdsrc/core/command-generation/adapters/index.tssrc/core/command-generation/adapters/junie.tssrc/core/command-generation/registry.tssrc/core/config.tssrc/core/legacy-cleanup.tstest/core/command-generation/registry.test.ts
…entation accordingly
Added support for Junie, an AI agent from JetBrains
Summary by CodeRabbit