feat: set var inspect schema type

This commit is contained in:
Joel
2025-09-02 18:44:40 +08:00
parent 32a009654f
commit 60da4c9048
13 changed files with 128 additions and 48 deletions

View File

@ -23,7 +23,7 @@ import { useStore } from '@/app/components/workflow/store'
import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
import ToolForm from '../tool/components/tool-form'
import { wrapStructuredVarItem } from '@/app/components/workflow/utils/tool'
import useMatchSchemaType from '../_base/components/variable/use-match-schema-type'
import useMatchSchemaType, { getMatchedSchemaType } from '../_base/components/variable/use-match-schema-type'
const Panel: FC<NodePanelProps<DataSourceNodeType>> = ({ id, data }) => {
const { t } = useTranslation()
@ -50,8 +50,7 @@ const Panel: FC<NodePanelProps<DataSourceNodeType>> = ({ id, data }) => {
const pipelineId = useStore(s => s.pipelineId)
const setShowInputFieldPanel = useStore(s => s.setShowInputFieldPanel)
const { getMatchedSchemaType } = useMatchSchemaType()
const { schemaTypeDefinitions } = useMatchSchemaType()
return (
<div >
{
@ -137,7 +136,7 @@ const Panel: FC<NodePanelProps<DataSourceNodeType>> = ({ id, data }) => {
}
{
outputSchema.map((outputItem) => {
const schemaType = getMatchedSchemaType(outputItem.value)
const schemaType = getMatchedSchemaType(outputItem.value, schemaTypeDefinitions)
return (
<div key={outputItem.name}>