feat(workspace-manager): added remove workspace#1085
feat(workspace-manager): added remove workspace#1085MarsKubeX merged 2 commits intokortex-hub:mainfrom
Conversation
Signed-off-by: Marcel Bertagnini <mbertagn@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds agent workspace removal: manager exposes Changes
Sequence Diagram(s)sequenceDiagram
participant Renderer as Renderer
participant Preload as Preload (bridge)
participant Main as Main (IPC/AgentWorkspaceManager)
participant Store as Mock Store
Renderer->>Preload: call removeAgentWorkspace(id)
Preload->>Main: ipcInvoke "agent-workspace:remove" (id)
Main->>Main: AgentWorkspaceManager.remove(id)
Main->>Store: mockRemoveWorkspace(id)
Store-->>Main: success / throw Error
Main-->>Preload: resolve / reject
Preload-->>Renderer: Promise resolves / rejects
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/main/src/plugin/agent-workspace/agent-workspace-manager.ts`:
- Around line 56-58: The new IPC channel 'agent-workspace:remove' is registered
in the main but not exposed to the renderer; add a corresponding contextBridge
exposure in the preload layer by calling
contextBridge.exposeInMainWorld('removeAgentWorkspace', async (id: string) =>
ipcInvoke('agent-workspace:remove', id)); ensure you import/use the same
ipcInvoke helper used for listAgentWorkspaces so the renderer can call
removeAgentWorkspace(id) and reach the main handler (pair with the existing
ipcHandle in agent-workspace-manager).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 683e428c-e479-4a6d-8055-fd9e9169cd1b
📒 Files selected for processing (3)
packages/main/src/plugin/agent-workspace/agent-workspace-manager.spec.tspackages/main/src/plugin/agent-workspace/agent-workspace-manager.tspackages/main/src/plugin/agent-workspace/agent-workspace-mock-data.ts
Signed-off-by: Marcel Bertagnini <mbertagn@redhat.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Added
removefeat to the agent workspace manager.Part of #1039