From 767dfde4cb6fac388840c28d5431db568088028c Mon Sep 17 00:00:00 2001 From: 777genius Date: Fri, 17 Apr 2026 20:51:25 +0300 Subject: [PATCH] fix(extensions): use provider-aware runtime copy --- .../extensions/ExtensionStoreView.tsx | 6 +-- .../extensions/mcp/McpServersPanel.tsx | 11 +++-- .../extensions/skills/SkillsPanel.tsx | 10 ++--- .../extensions/mcp/McpServersPanel.test.ts | 42 +++++++++++++++++++ 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/src/renderer/components/extensions/ExtensionStoreView.tsx b/src/renderer/components/extensions/ExtensionStoreView.tsx index ffc9ff4c..dfb2355d 100644 --- a/src/renderer/components/extensions/ExtensionStoreView.tsx +++ b/src/renderer/components/extensions/ExtensionStoreView.tsx @@ -100,21 +100,21 @@ export const ExtensionStoreView = (): React.JSX.Element => { label: 'Plugins', icon: Puzzle, description: - 'Small add-ons for Claude. They give the app extra features and integrations you can install when you need them.', + 'Small add-ons for the runtime. In multimodel mode they currently apply to Anthropic sessions when supported.', }, { value: 'mcp-servers' as const, label: 'MCP Servers', icon: Server, description: - 'Connections to outside tools and apps. They let Claude read data or do actions beyond this app.', + 'Connections to outside tools and apps. They let the runtime read data or do actions beyond this app.', }, { value: 'skills' as const, label: 'Skills', icon: BookOpen, description: - 'Ready-made instructions for common jobs. They help Claude do specific tasks better and more consistently.', + 'Ready-made instructions for common jobs. They help the runtime handle repeatable tasks more consistently.', }, { value: 'api-keys' as const, diff --git a/src/renderer/components/extensions/mcp/McpServersPanel.tsx b/src/renderer/components/extensions/mcp/McpServersPanel.tsx index 657dc359..46249a10 100644 --- a/src/renderer/components/extensions/mcp/McpServersPanel.tsx +++ b/src/renderer/components/extensions/mcp/McpServersPanel.tsx @@ -385,10 +385,15 @@ export const McpServersPanel = ({
-

Claude CLI not installed

+

+ {cliStatus?.flavor === 'agent_teams_orchestrator' + ? 'Configured runtime not available' + : 'Claude CLI not installed'} +

- MCP health checks require Claude CLI. Go to the Dashboard to install it - automatically. + {cliStatus?.flavor === 'agent_teams_orchestrator' + ? 'MCP health checks require the configured runtime. Go to the Dashboard to install or repair it.' + : 'MCP health checks require Claude CLI. Go to the Dashboard to install or repair it.'}

diff --git a/src/renderer/components/extensions/skills/SkillsPanel.tsx b/src/renderer/components/extensions/skills/SkillsPanel.tsx index cd9fabe5..ecdeed73 100644 --- a/src/renderer/components/extensions/skills/SkillsPanel.tsx +++ b/src/renderer/components/extensions/skills/SkillsPanel.tsx @@ -261,11 +261,11 @@ export const SkillsPanel = ({
-

Teach Claude repeatable work

+

Teach repeatable work

- Skills are reusable instructions that help Claude handle the same kind of task more - consistently.{' '} + Skills are reusable instructions that help the runtime handle the same kind of task + more consistently.{' '} {projectPath ? `You are seeing skills for ${projectLabel ?? projectPath} plus your personal skills.` : 'You are seeing only your personal skills right now.'} @@ -428,7 +428,7 @@ export const SkillsPanel = ({

{skillsSearchQuery ? 'Try a different search term or switch filters.' - : 'Create your first skill to teach Claude a repeatable workflow, or import one you already use.'} + : 'Create your first skill to teach a repeatable workflow, or import one you already use.'}

)} @@ -527,7 +527,7 @@ export const SkillsPanel = ({

Personal skills

- Habits and instructions you want Claude to remember everywhere. + Habits and instructions you want available everywhere.

diff --git a/test/renderer/components/extensions/mcp/McpServersPanel.test.ts b/test/renderer/components/extensions/mcp/McpServersPanel.test.ts index 7a31088d..8b86b574 100644 --- a/test/renderer/components/extensions/mcp/McpServersPanel.test.ts +++ b/test/renderer/components/extensions/mcp/McpServersPanel.test.ts @@ -2,6 +2,8 @@ import React, { act } from 'react'; import { createRoot } from 'react-dom/client'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { CLI_NOT_FOUND_MARKER } from '@shared/constants/cli'; + interface StoreState { mcpBrowseCatalog: Array<{ id: string; @@ -32,6 +34,9 @@ interface StoreState { mcpDiagnosticsLastCheckedAt: number | null; mcpDiagnosticsLastCheckedAtByProjectPath?: Record; runMcpDiagnostics: ReturnType; + cliStatus?: { + flavor?: 'claude' | 'agent_teams_orchestrator'; + }; } const storeState = {} as StoreState; @@ -139,6 +144,7 @@ describe('McpServersPanel initial browse loading', () => { storeState.mcpDiagnosticsLastCheckedAt = null; storeState.mcpDiagnosticsLastCheckedAtByProjectPath = undefined; storeState.runMcpDiagnostics = vi.fn(); + storeState.cliStatus = undefined; }); afterEach(() => { @@ -267,4 +273,40 @@ describe('McpServersPanel initial browse loading', () => { await Promise.resolve(); }); }); + + it('uses runtime-aware missing-runtime copy for multimodel diagnostics failures', async () => { + storeState.mcpDiagnosticsError = `${CLI_NOT_FOUND_MARKER}: missing runtime`; + storeState.cliStatus = { + flavor: 'agent_teams_orchestrator', + }; + + const host = document.createElement('div'); + document.body.appendChild(host); + const root = createRoot(host); + + await act(async () => { + root.render( + React.createElement(McpServersPanel, { + projectPath: null, + mcpSearchQuery: '', + mcpSearch: vi.fn(), + mcpSearchResults: [], + mcpSearchLoading: false, + mcpSearchWarnings: [], + selectedMcpServerId: null, + setSelectedMcpServerId: vi.fn(), + }) + ); + await Promise.resolve(); + }); + + expect(host.textContent).toContain('Configured runtime not available'); + expect(host.textContent).toContain('MCP health checks require the configured runtime'); + expect(host.textContent).not.toContain('Claude CLI not installed'); + + await act(async () => { + root.unmount(); + await Promise.resolve(); + }); + }); });