Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no json output vars in front-page tool #5943

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions web/app/components/workflow/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down
5 changes: 5 additions & 0 deletions web/app/components/workflow/nodes/tool/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
type='Array[File]'
description={t(`${i18nPrefix}.outputVars.files.title`)}
/>
<VarItem
name='json'
type='Array[Object]'
description={t(`${i18nPrefix}.outputVars.json`)}
/>
</>
</OutputVars>
</div>
Expand Down
1 change: 1 addition & 0 deletions web/i18n/en-US/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translation = {
url: 'Image url',
upload_file_id: 'Upload file id',
},
json: 'tool generated json',
},
},
questionClassifiers: {
Expand Down
1 change: 1 addition & 0 deletions web/i18n/zh-Hans/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translation = {
url: '图片链接',
upload_file_id: '上传文件ID',
},
json: '工具生成的json',
},
},
questionClassifiers: {
Expand Down