This commit is contained in:
Andrew Pareles
2025-05-20 23:09:23 -07:00
parent 807086f7b6
commit 03ab6559fc
2 changed files with 11 additions and 16 deletions
@@ -3,7 +3,6 @@ import { MCPConfigParseError, MCPServerEventParam, MCPServerObject, MCPServers }
import { useEffect, useState } from 'react';
import { useAccessor } from '../util/services.js';
import { IDisposable } from '../../../../../../../base/common/lifecycle.js';
import { off } from 'process';
export interface Tool {
/** Unique tool identifier */
@@ -42,21 +41,18 @@ const MCPServer = ({ name, server }: MCPServerProps) => {
mcpService.toggleServer(name, e);
}
// Needs to be raw CSS because
// Tailwind won't compile the colors
// dynamically
const serverStatusColorStyles = {
success: { backgroundColor: '#10B981' }, // green-500 equivalent
error: { backgroundColor: '#EF4444' }, // red-500 equivalent
loading: { backgroundColor: '#F59E0B' }, // yellow-500 equivalent
offline: { backgroundColor: '#6B7280' } // gray-500 equivalent
};
return (
return (
<div className="border-b border-gray-800 bg-gray-300/10 py-4 rounded-lg ">
<div className="flex items-center mx-4">
{/* Status indicator */}
<div className={`w-2 h-2 rounded-full mr-2`} style={serverStatusColorStyles[server.status]}></div>
<div className={`w-2 h-2 rounded-full mr-2
${server.status === 'success' ? 'green-500'
:server.status === 'error' ? 'red-500'
:server.status === 'loading' ? 'yellow-500'
:server.status === 'offline' ? 'gray-500'
:''}
`}></div>
{/* Server name */}
<div className="text-sm font-medium mr-2">{name}</div>
@@ -1255,9 +1255,8 @@ Alternatively, place a \`.voidrules\` file in the root of your workspace.
</div>
<h4 className={`text-void-fg-3 mb-4`}>
<ChatMarkdownRender inPTag={true} string={`
Configure Model Context Protocol servers to connect your AI models with external data sources and tools.
Edit your MCP configuration file to add or modify server connections.
`} chatMessageLocation={undefined} />
Use Model Context Protocol to provide Agent mode with more tools.
`} chatMessageLocation={undefined} />
</h4>
<ErrorBoundary>
<MCPServersList />