qinglong/src/pages/scenario/flowgram/nodes/agent/agent-tools.ts
2025-11-24 01:49:59 +08:00

34 lines
699 B
TypeScript

import { nanoid } from 'nanoid';
import { FlowNodeBaseType } from '@flowgram.ai/fixed-layout-editor';
import { FlowNodeRegistry } from '../../typings';
let index = 0;
export const AgentToolsNodeRegistry: FlowNodeRegistry = {
type: 'agentTools',
extend: FlowNodeBaseType.SLOT_BLOCK,
info: {
icon: '',
description: 'Agent Tools.',
},
meta: {
addDisable: true,
sidebarDisable: true,
},
onAdd() {
return {
id: `tool_${nanoid(5)}`,
type: 'agentTool',
data: {
title: `Tool_${++index}`,
outputs: {
type: 'object',
properties: {
result: { type: 'string' },
},
},
},
};
},
};