mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
mcp ui
This commit is contained in:
parent
09f5f1fad1
commit
f0f536bc2d
2 changed files with 11 additions and 2 deletions
|
|
@ -1868,7 +1868,13 @@ const MCPToolWrapper = ({ toolMessage }: WrapperProps<string>) => {
|
|||
const { rawParams, params } = toolMessage
|
||||
const componentParams: ToolHeaderParams = { title, desc1, isError, icon, isRejected, }
|
||||
|
||||
componentParams.info = `MCP server "${toolMessage.mcpServerName}"`
|
||||
const paramsStr = JSON.stringify(params, null, 2)
|
||||
componentParams.desc2 = <CopyButton codeStr={paramsStr} toolTipName={`Copy inputs: ${paramsStr}`} />
|
||||
|
||||
componentParams.info = !toolMessage.mcpServerName ? 'MCP tool not found' : undefined
|
||||
|
||||
// Add copy inputs button in desc2
|
||||
|
||||
|
||||
if (toolMessage.type === 'success' || toolMessage.type === 'tool_request') {
|
||||
const { result } = toolMessage
|
||||
|
|
|
|||
|
|
@ -943,7 +943,10 @@ const MCPServerComponent = ({ name, server }: { name: string, server: MCPServer
|
|||
<span
|
||||
key={tool.name}
|
||||
className="px-2 py-0.5 bg-black/5 dark:bg-white/5 rounded text-xs"
|
||||
title={tool.description || ''}
|
||||
|
||||
data-tooltip-id='void-tooltip'
|
||||
data-tooltip-content={tool.description || ''}
|
||||
data-tooltip-class-name='void-max-w-[20px]'
|
||||
>
|
||||
{tool.name}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue