Skip to content

Commit 0726f26

Browse files
committed
wip
1 parent 0cc21d5 commit 0726f26

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

examples/inspector/src/components/McpServers.tsx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function McpServers({
254254
return (
255255
<input
256256
type="number"
257-
className="w-1/4 p-2 pr-6 mr-3 border border-gray-200 rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-300 placeholder-gray-300"
257+
className="w-32 p-2 pr-6 mr-3 border border-gray-200 rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-300 placeholder-gray-300"
258258
value={value}
259259
step={schema.type === 'integer' ? 1 : 'any'}
260260
required={isRequired}
@@ -364,7 +364,7 @@ export function McpServers({
364364
No tools available. Connect to an MCP server to see available tools.
365365
</div>
366366
) : (
367-
<div className="space-y-6">
367+
<div className="border border-gray-200 rounded p-4 bg-gray-50 space-y-6">
368368
{tools.map((tool: Tool, index: number) => (
369369
<div key={index}>
370370
{/* Tool title outside the card */}
@@ -399,7 +399,7 @@ export function McpServers({
399399
</div>
400400
)}
401401
</div>
402-
<div className={schema.type === 'number' || schema.type === 'integer' ? 'flex flex-wrap items-center' : ''}>
402+
<div className={schema.type === 'number' || schema.type === 'integer' ? 'inline-block' : ''}>
403403
{renderFormField(tool.name, fieldName, schema, isRequired)}
404404
</div>
405405
</div>
@@ -417,25 +417,27 @@ export function McpServers({
417417
Run
418418
</button>
419419

420-
{/* Per-tool execution log */}
421-
<div className="border-t border-gray-100 pt-4">
422-
<div className="flex items-center justify-between mb-2">
423-
<h5 className="font-medium text-sm text-gray-700">Execution Log</h5>
424-
<button
425-
onClick={() => clearExecutionLog(tool.name)}
426-
className="flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700"
427-
>
428-
<X size={12} />
429-
Clear
430-
</button>
420+
{/* Per-tool execution log - only show if there's content */}
421+
{toolExecutionLogs[tool.name] && (
422+
<div className="border-t border-gray-100 pt-4">
423+
<div className="flex items-center justify-between mb-2">
424+
<h5 className="font-medium text-sm text-gray-700">Execution Log</h5>
425+
<button
426+
onClick={() => clearExecutionLog(tool.name)}
427+
className="flex items-center gap-1 text-xs text-gray-500 hover:text-gray-700"
428+
>
429+
<X size={12} />
430+
Clear
431+
</button>
432+
</div>
433+
<textarea
434+
value={toolExecutionLogs[tool.name]}
435+
readOnly
436+
className="w-full h-32 p-2 border border-gray-200 rounded text-xs font-mono bg-gray-50 resize-none placeholder-gray-300"
437+
placeholder="Tool execution results will appear here..."
438+
/>
431439
</div>
432-
<textarea
433-
value={toolExecutionLogs[tool.name] || ''}
434-
readOnly
435-
className="w-full h-32 p-2 border border-gray-200 rounded text-xs font-mono bg-gray-50 resize-none placeholder-gray-300"
436-
placeholder="Tool execution results will appear here..."
437-
/>
438-
</div>
440+
)}
439441
</div>
440442
</div>
441443
))}

0 commit comments

Comments
 (0)