Changesets · Branches · Tags · Compare
| Changeset | 9334ee37bf04f56a0f9d2467776ad7cd09f4cb4cfa38ac3ddb8a7f74b6306fef |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-18 11:38 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-18 11:38 +05:30 |
| Parents | c093109a6490 |
3 files changed
modified core/context/mcp/MCPConnection.ts +13 −0
| @@ -52,6 +52,7 @@ | ||
| 52 | 52 | public status: MCPConnectionStatus = "not-connected"; |
| 53 | 53 | public isProtectedResource = false; |
| 54 | 54 | public errors: string[] = []; |
| 55 | + public infos: string[] = []; | |
| 55 | 56 | public prompts: MCPPrompt[] = []; |
| 56 | 57 | public tools: MCPTool[] = []; |
| 57 | 58 | public resources: MCPResource[] = []; |
| @@ -93,6 +94,7 @@ | ||
| 93 | 94 | return { |
| 94 | 95 | ...this.options, |
| 95 | 96 | errors: this.errors, |
| 97 | + infos: this.infos, | |
| 96 | 98 | prompts: this.prompts, |
| 97 | 99 | resources: this.resources, |
| 98 | 100 | resourceTemplates: this.resourceTemplates, |
| @@ -122,6 +124,7 @@ | ||
| 122 | 124 | this.resources = []; |
| 123 | 125 | this.resourceTemplates = []; |
| 124 | 126 | this.errors = []; |
| 127 | + this.infos = []; | |
| 125 | 128 | this.stdioOutput = { stdout: "", stderr: "" }; |
| 126 | 129 | |
| 127 | 130 | this.abortController.abort(); |
| @@ -280,6 +283,16 @@ | ||
| 280 | 283 | if (msg.includes("spawn") && msg.includes("enoent")) { |
| 281 | 284 | const command = msg.split(" ")[1]; |
| 282 | 285 | errorMessage += `Error: command "${command}" not found. To use this MCP server, install the ${command} CLI.`; |
| 286 | + if (["uv", "uvx"].includes(command)) { | |
| 287 | + this.infos.push( | |
| 288 | + 'Please install uv by following the installation guide: <a href="https://docs.astral.sh/uv/getting-started/installation/">https://docs.astral.sh/uv/getting-started/installation/</a>', | |
| 289 | + ); | |
| 290 | + } | |
| 291 | + if (["node", "npx"].includes(command)) { | |
| 292 | + this.infos.push( | |
| 293 | + 'Please install npx by following the installation guide: <a href="https://docs.npmjs.com/downloading-and-installing-node-js-and-npm">https://docs.npmjs.com/downloading-and-installing-node-js-and-npm</a>', | |
| 294 | + ); | |
| 295 | + } | |
| 283 | 296 | } else { |
| 284 | 297 | errorMessage += "Error: " + error.message; |
| 285 | 298 | } |
modified core/index.d.ts +1 −0
| @@ -1333,6 +1333,7 @@ | ||
| 1333 | 1333 | export interface MCPServerStatus extends MCPOptions { |
| 1334 | 1334 | status: MCPConnectionStatus; |
| 1335 | 1335 | errors: string[]; |
| 1336 | + infos: string[]; | |
| 1336 | 1337 | isProtectedResource: boolean; |
| 1337 | 1338 | |
| 1338 | 1339 | prompts: MCPPrompt[]; |
modified gui/src/pages/config/sections/ToolsSection.tsx +21 −1
| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | CircleStackIcon, |
| 6 | 6 | CommandLineIcon, |
| 7 | 7 | GlobeAltIcon, |
| 8 | - PlusIcon, | |
| 9 | 8 | UserCircleIcon, |
| 10 | 9 | WrenchScrewdriverIcon, |
| 11 | 10 | } from "@heroicons/react/24/outline"; |
| @@ -268,6 +267,27 @@ | ||
| 268 | 267 | ))} |
| 269 | 268 | </div> |
| 270 | 269 | )} |
| 270 | + | |
| 271 | + {server.infos && server.infos.length > 0 && ( | |
| 272 | + <div className="mt-3 space-y-2"> | |
| 273 | + {server.infos.map((info, infoIndex) => ( | |
| 274 | + <Alert | |
| 275 | + key={infoIndex} | |
| 276 | + type="info" | |
| 277 | + size="sm" | |
| 278 | + className="transition-all" | |
| 279 | + onClick={() => | |
| 280 | + void ideMessenger.ide.showVirtualFile(server.name, info) | |
| 281 | + } | |
| 282 | + > | |
| 283 | + <span | |
| 284 | + className="text-xs" | |
| 285 | + dangerouslySetInnerHTML={{ __html: info }} | |
| 286 | + /> | |
| 287 | + </Alert> | |
| 288 | + ))} | |
| 289 | + </div> | |
| 290 | + )} | |
| 271 | 291 | </div> |
| 272 | 292 | ); |
| 273 | 293 | } |