mirror of
https://github.com/whyour/qinglong.git
synced 2026-04-04 15:20:36 +08:00
34 lines
699 B
TypeScript
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' },
|
|
},
|
|
},
|
|
},
|
|
};
|
|
},
|
|
};
|