Feat: Display operator icons on the agent form #3221 (#9138)

### What problem does this PR solve?

Feat: Display operator icons on the agent form #3221
Fix: Fixed the issue where the form corresponding to the tool operator
icon could not appear after clicking it #3211

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-31 18:53:03 +08:00
committed by GitHub
parent 26042343d8
commit 89c2067a16
4 changed files with 21 additions and 20 deletions

View File

@ -18,6 +18,7 @@ import { Operator } from '../../constant';
import { AgentInstanceContext } from '../../context';
import { useFindMcpById } from '../../hooks/use-find-mcp-by-id';
import { INextOperatorForm } from '../../interface';
import OperatorIcon from '../../operator-icon';
import useGraphStore from '../../store';
import { filterDownstreamAgentNodeIds } from '../../utils/filter-downstream-nodes';
import { ToolPopover } from './tool-popover';
@ -109,7 +110,10 @@ export function AgentTools() {
<ul className="space-y-2">
{toolNames.map((x) => (
<ToolCard key={x}>
{x}
<div className="flex gap-2 items-center">
<OperatorIcon name={x as Operator}></OperatorIcon>
{x}
</div>
<ActionButton
record={x}
deleteRecord={deleteNodeTool(x)}