From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- app/components/workflow/nodes/tool/node.tsx | 30 ++++++------------------------ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git a/app/components/workflow/nodes/tool/node.tsx b/app/components/workflow/nodes/tool/node.tsx index f3cb4d9..4de0339 100644 --- a/app/components/workflow/nodes/tool/node.tsx +++ b/app/components/workflow/nodes/tool/node.tsx @@ -2,12 +2,11 @@ import React from 'react' import type { ToolNodeType } from './types' import type { NodeProps } from '@/app/components/workflow/types' -import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' const Node: FC<NodeProps<ToolNodeType>> = ({ data, }) => { - const { tool_configurations, paramSchemas } = data + const { tool_configurations } = data const toolConfigs = Object.keys(tool_configurations || {}) if (!toolConfigs.length) @@ -17,30 +16,13 @@ <div className='mb-1 px-3 py-1'> <div className='space-y-0.5'> {toolConfigs.map((key, index) => ( - <div key={index} className='flex h-6 items-center justify-between space-x-1 rounded-md bg-workflow-block-parma-bg px-1 text-xs font-normal text-text-secondary'> - <div title={key} className='max-w-[100px] shrink-0 truncate text-xs font-medium uppercase text-text-tertiary'> + <div key={index} className='flex items-center h-6 justify-between bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'> + <div title={key} className='max-w-[100px] shrink-0 truncate text-xs font-medium text-gray-500 uppercase'> {key} </div> - {typeof tool_configurations[key] === 'string' && ( - <div title={tool_configurations[key]} className='w-0 shrink-0 grow truncate text-right text-xs font-normal text-text-secondary'> - {paramSchemas?.find(i => i.name === key)?.type === FormTypeEnum.secretInput ? '********' : tool_configurations[key]} - </div> - )} - {typeof tool_configurations[key] === 'number' && ( - <div title={tool_configurations[key].toString()} className='w-0 shrink-0 grow truncate text-right text-xs font-normal text-text-secondary'> - {tool_configurations[key]} - </div> - )} - {typeof tool_configurations[key] !== 'string' && tool_configurations[key]?.type === FormTypeEnum.modelSelector && ( - <div title={tool_configurations[key].model} className='w-0 shrink-0 grow truncate text-right text-xs font-normal text-text-secondary'> - {tool_configurations[key].model} - </div> - )} - {/* {typeof tool_configurations[key] !== 'string' && tool_configurations[key]?.type === FormTypeEnum.appSelector && ( - <div title={tool_configurations[key].app_id} className='grow w-0 shrink-0 truncate text-right text-xs font-normal text-gray-700'> - {tool_configurations[key].app_id} - </div> - )} */} + <div title={tool_configurations[key]} className='grow w-0 shrink-0 truncate text-right text-xs font-normal text-gray-700'> + {tool_configurations[key]} + </div> </div> ))} -- Gitblit v1.8.0