mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-08 08:00:10 +00:00
update some crash logs
This commit is contained in:
@@ -273,6 +273,11 @@ const McpHubView = () => {
|
||||
</div>
|
||||
) : (
|
||||
mcpServers.map(server => {
|
||||
// Add null check for server object
|
||||
if (!server || !server.name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const serverKey = `${server.name}-${server.source || 'global'}`;
|
||||
const isExpanded = !!expandedServers[serverKey];
|
||||
const currentDetailTab = activeServerDetailTab[serverKey] || 'tools';
|
||||
@@ -285,7 +290,7 @@ const McpHubView = () => {
|
||||
{isExpanded ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
|
||||
</div>
|
||||
<span className={`infio-mcp-hub-status-indicator ${server.status === 'connected' ? 'connected' : server.status === 'connecting' ? 'connecting' : 'disconnected'} ${server.disabled ? 'disabled' : ''}`}></span>
|
||||
<h3 className="infio-mcp-hub-name">{server.name.replace('infio-builtin-server', 'builtin')}</h3>
|
||||
<h3 className="infio-mcp-hub-name">{server.name ? server.name.replace('infio-builtin-server', 'builtin') : 'Unknown Server'}</h3>
|
||||
</div>
|
||||
|
||||
<div className="infio-mcp-hub-actions" onClick={(e) => e.stopPropagation()}>
|
||||
@@ -352,7 +357,7 @@ const McpHubView = () => {
|
||||
<div className="infio-mcp-tab-content">
|
||||
{currentDetailTab === 'tools' && (
|
||||
<div className="infio-mcp-tools-list">
|
||||
{(server.tools && server.tools.length > 0) ? server.tools.map(tool => <ToolRow key={tool.name} tool={tool} />) : <p className="infio-mcp-empty-message">{t('mcpHub.noTools')}</p>}
|
||||
{(server.tools && server.tools.length > 0) ? server.tools.filter(tool => tool && tool.name).map(tool => <ToolRow key={tool.name} tool={tool} />) : <p className="infio-mcp-empty-message">{t('mcpHub.noTools')}</p>}
|
||||
</div>
|
||||
)}
|
||||
{currentDetailTab === 'resources' && (
|
||||
|
||||
@@ -64,7 +64,7 @@ function FileBadge({
|
||||
className="infio-chat-user-input-file-badge-name-icon"
|
||||
/>
|
||||
)}
|
||||
<span>{mentionable.file.name}</span>
|
||||
<span>{mentionable.file?.name || 'Unknown File'}</span>
|
||||
</div>
|
||||
</BadgeBase>
|
||||
)
|
||||
@@ -91,7 +91,7 @@ function FolderBadge({
|
||||
className="infio-chat-user-input-file-badge-name-icon"
|
||||
/>
|
||||
)}
|
||||
<span>{mentionable.folder.name}</span>
|
||||
<span>{mentionable.folder?.name || 'Unknown Folder'}</span>
|
||||
</div>
|
||||
</BadgeBase>
|
||||
)
|
||||
@@ -147,7 +147,7 @@ function CurrentFileBadge({
|
||||
className="infio-chat-user-input-file-badge-name-icon"
|
||||
/>
|
||||
)}
|
||||
<span>{mentionable.file.name}</span>
|
||||
<span>{mentionable.file?.name || 'Unknown File'}</span>
|
||||
</div>
|
||||
<div className="infio-chat-user-input-file-badge-name-block-suffix">
|
||||
{' (Current file)'}
|
||||
@@ -177,7 +177,7 @@ function BlockBadge({
|
||||
className="infio-chat-user-input-file-badge-name-block-name-icon"
|
||||
/>
|
||||
)}
|
||||
<span>{mentionable.file.name}</span>
|
||||
<span>{mentionable.file?.name || 'Unknown File'}</span>
|
||||
</div>
|
||||
<div className="infio-chat-user-input-file-badge-name-block-suffix">
|
||||
{` (${mentionable.startLine}:${mentionable.endLine})`}
|
||||
@@ -234,7 +234,7 @@ function ImageBadge({
|
||||
className="infio-chat-user-input-file-badge-name-icon"
|
||||
/>
|
||||
)}
|
||||
<span>{mentionable.name}</span>
|
||||
<span>{mentionable.name || 'Unknown Image'}</span>
|
||||
</div>
|
||||
</BadgeBase>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user