Repository navigation
Adds support for attaching a git repository to an existing MCP proxy component - #1456
chamodperera wants to merge 5 commits into
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds end-to-end support for attaching Git repositories to MCP proxy components created from existing API components. The change extends the cloud form context type with an 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
wi/wi-extension/src/cloud/cmds/create-component-cmd.ts (1)
267-273:⚠️ Potential issue | 🟠 Major | ⚡ Quick winCheck MCP subtype before generic prebuilt handling.
On Line 267, prebuilt handling returns early before the MCP subtype branch on Line 271. If an MCP proxy component is also flagged as prebuilt, the new attach path is skipped.
Suggested fix
if (workspaceCompId) { const component = dataCacheStore.getState().getComponents(org.handle, project.handler)?.find(comp => comp.metadata?.id === workspaceCompId); + if (component?.spec?.subType === ChoreoComponentSubType.MCPProxyFromExistingAPI) { + return await handleMCPProxyRepositoryAttach(workspaceCompId, component, org, project, createParams[0], workspaceFsPath, gitRoot!); + } if (component?.metadata?.isPrebuilt) { // if its pre-built integration, we need to update the existing component with new repo details instead of creating a new component. return await handlePrebuiltComponentUpdate(workspaceCompId, component, org, project, createParams[0], workspaceFsPath, gitRoot!); } - if (component?.spec?.subType === ChoreoComponentSubType.MCPProxyFromExistingAPI) { - return await handleMCPProxyRepositoryAttach(workspaceCompId, component, org, project, createParams[0], workspaceFsPath, gitRoot!); - } }🤖 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 `@wi/wi-extension/src/cloud/cmds/create-component-cmd.ts` around lines 267 - 273, The current early return for prebuilt components (component?.metadata?.isPrebuilt) short-circuits the MCP-specific attach logic (component?.spec?.subType === ChoreoComponentSubType.MCPProxyFromExistingAPI) so if a component is both prebuilt and MCPProxyFromExistingAPI we never call handleMCPProxyRepositoryAttach; reorder or refine the checks so the MCP subtype is evaluated first (i.e., check component?.spec?.subType === ChoreoComponentSubType.MCPProxyFromExistingAPI before the isPrebuilt branch) or add an explicit MCP check inside the prebuilt branch and delegate to handleMCPProxyRepositoryAttach when appropriate, ensuring handleMCPProxyRepositoryAttach(workspaceCompId, component, org, project, createParams[0], workspaceFsPath, gitRoot!) is invoked for MCP proxies.
🤖 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 `@wi/wi-extension/src/cloud/cmds/create-component-cmd.ts`:
- Around line 522-535: The code uses optional chaining on
ext.clients.rpcClient?.attachMCPProxyRepository which can silently skip making
the RPC call and let execution proceed; change this to require the RPC client
explicitly by checking ext.clients.rpcClient (or throwing) before calling
attachMCPProxyRepository, and call
ext.clients.rpcClient.attachMCPProxyRepository(...) directly so failures are
explicit — update the create-component logic around attachMCPProxyRepository to
throw or return an error if ext.clients.rpcClient is missing, ensuring the
success path is only reached after a real RPC call.
---
Outside diff comments:
In `@wi/wi-extension/src/cloud/cmds/create-component-cmd.ts`:
- Around line 267-273: The current early return for prebuilt components
(component?.metadata?.isPrebuilt) short-circuits the MCP-specific attach logic
(component?.spec?.subType === ChoreoComponentSubType.MCPProxyFromExistingAPI) so
if a component is both prebuilt and MCPProxyFromExistingAPI we never call
handleMCPProxyRepositoryAttach; reorder or refine the checks so the MCP subtype
is evaluated first (i.e., check component?.spec?.subType ===
ChoreoComponentSubType.MCPProxyFromExistingAPI before the isPrebuilt branch) or
add an explicit MCP check inside the prebuilt branch and delegate to
handleMCPProxyRepositoryAttach when appropriate, ensuring
handleMCPProxyRepositoryAttach(workspaceCompId, component, org, project,
createParams[0], workspaceFsPath, gitRoot!) is invoked for MCP proxies.
🪄 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: 3bdf2416-6b7a-403d-9085-03d21a7bb8af
📒 Files selected for processing (5)
wi/wi-core/src/types/cloud.types.tswi/wi-extension/src/cloud/choreo-cli-rpc/client.tswi/wi-extension/src/cloud/cmds/create-component-cmd.tswi/wi-extension/src/cloud/stores/context-store.tswi/wi-webviews/src/views/componentFormView/ComponentFormView.tsx
Purpose
Enables attaching a git repository to an MCP proxy component created from an existing API (
MCPProxyFromExistingAPIsubType). Previously, once such a component was created in the Devant console, there was no way to connect a source repository to it from the VS Code extension.Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning