import type { FC } from 'react' 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> = ({ data, }) => { const { tool_configurations } = data const toolConfigs = Object.keys(tool_configurations || {}) if (!toolConfigs.length) return null return (
{toolConfigs.map((key, index) => (
{key}
{typeof tool_configurations[key] === 'string' && (
{tool_configurations[key]}
)} {typeof tool_configurations[key] !== 'string' && tool_configurations[key]?.type === FormTypeEnum.modelSelector && (
{tool_configurations[key].model}
)} {/* {typeof tool_configurations[key] !== 'string' && tool_configurations[key]?.type === FormTypeEnum.appSelector && (
{tool_configurations[key].app_id}
)} */}
))}
) } export default React.memo(Node)