From 46eca01fa356ef2ff8bc690fa0b01c7f5f3935c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 4 Jul 2024 16:15:56 +0800 Subject: [PATCH] fix: no json output vars in front-page tool (#5943) --- web/app/components/workflow/constants.ts | 4 ++++ web/app/components/workflow/nodes/tool/panel.tsx | 5 +++++ web/i18n/en-US/workflow.ts | 1 + web/i18n/zh-Hans/workflow.ts | 1 + 4 files changed, 11 insertions(+) diff --git a/web/app/components/workflow/constants.ts b/web/app/components/workflow/constants.ts index a6f313e98e..1786ca4b47 100644 --- a/web/app/components/workflow/constants.ts +++ b/web/app/components/workflow/constants.ts @@ -377,6 +377,10 @@ export const TOOL_OUTPUT_STRUCT: Var[] = [ variable: 'files', type: VarType.arrayFile, }, + { + variable: 'json', + type: VarType.arrayObject, + }, ] export const PARAMETER_EXTRACTOR_COMMON_STRUCT: Var[] = [ diff --git a/web/app/components/workflow/nodes/tool/panel.tsx b/web/app/components/workflow/nodes/tool/panel.tsx index e783e56ca7..1b00045c0f 100644 --- a/web/app/components/workflow/nodes/tool/panel.tsx +++ b/web/app/components/workflow/nodes/tool/panel.tsx @@ -131,6 +131,11 @@ const Panel: FC> = ({ type='Array[File]' description={t(`${i18nPrefix}.outputVars.files.title`)} /> + diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 617e3f8135..4ac3e82a95 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -396,6 +396,7 @@ const translation = { url: 'Image url', upload_file_id: 'Upload file id', }, + json: 'tool generated json', }, }, questionClassifiers: { diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index fe38904e5b..a71b22c8e0 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -396,6 +396,7 @@ const translation = { url: '图片链接', upload_file_id: '上传文件ID', }, + json: '工具生成的json', }, }, questionClassifiers: {