[BUG] Fix List of tools per agent isn't rendering properly (#957) (#968)

This commit is contained in:
Wendong-Fan 2026-01-20 00:20:35 +00:00 committed by GitHub
commit c2783f929a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -630,7 +630,7 @@ const ToolSelect = forwardRef<
key={item.id + item.key + (item.isLocal + "")}
className="h-5 bg-button-tertiery-fill-default flex items-center gap-1 w-auto flex-shrink-0 px-xs"
>
{item.name || item.mcp_name}
{item.name || item.mcp_name || item.key || `tool_${item.id}`}
<div className="flex items-center justify-center bg-button-secondary-fill-disabled rounded-sm">
<X
className="w-4 h-4 cursor-pointer text-button-secondary-icon-disabled"

View file

@ -282,7 +282,7 @@ export function AddWorker({
name: workerName,
type: workerName as AgentNameType,
log: [],
tools: [...selectedTools.map((tool) => tool.name)],
tools: [...selectedTools.map((tool) => tool.name || tool.mcp_name || tool.key || `tool_${tool.id}`)],
activeWebviewIds: [],
workerInfo: {
name: workerName,
@ -310,7 +310,7 @@ export function AddWorker({
type: workerName as AgentNameType,
log: [],
tools: [
...selectedTools.map((tool) => tool?.key || tool?.mcp_name || ""),
...selectedTools.map((tool) => tool.name || tool.mcp_name || tool.key || `tool_${tool.id}`),
],
activeWebviewIds: [],
workerInfo: {

View file

@ -420,7 +420,7 @@ export function Node({ id, data }: NodeProps) {
</div>
<div
ref={toolsRef}
className="flex-shrink-0 text-text-label text-xs leading-tight min-h-4 font-normal mb-sm pr-3 text-"
className="flex-shrink-0 text-text-label text-xs leading-tight min-h-4 font-normal mb-sm pr-3"
>
{/* {JSON.stringify(data.agent)} */}
{agentToolkits[