diff --git a/packages/global/core/workflow/template/system/readFiles/index.tsx b/packages/global/core/workflow/template/system/readFiles/index.tsx index 565dc7468..f30f30fea 100644 --- a/packages/global/core/workflow/template/system/readFiles/index.tsx +++ b/packages/global/core/workflow/template/system/readFiles/index.tsx @@ -45,6 +45,14 @@ export const ReadFilesNode: FlowNodeTemplateType = { valueType: WorkflowIOValueTypeEnum.string, type: FlowNodeOutputTypeEnum.static }, + { + id: NodeOutputKeyEnum.rawResponse, + key: NodeOutputKeyEnum.rawResponse, + label: i18nT('workflow:raw_response'), + description: i18nT('workflow:tool_raw_response_description'), + valueType: WorkflowIOValueTypeEnum.arrayObject, + type: FlowNodeOutputTypeEnum.static + }, Output_Template_Error_Message ] }; diff --git a/packages/service/core/workflow/dispatch/tools/readFiles.ts b/packages/service/core/workflow/dispatch/tools/readFiles.ts index 64e1dd0c3..4726b7b04 100644 --- a/packages/service/core/workflow/dispatch/tools/readFiles.ts +++ b/packages/service/core/workflow/dispatch/tools/readFiles.ts @@ -22,6 +22,7 @@ type Props = ModuleDispatchProps<{ }>; type Response = DispatchNodeResultType<{ [NodeOutputKeyEnum.text]: string; + [NodeOutputKeyEnum.rawResponse]: ReturnType[]; }>; const formatResponseObject = ({ @@ -75,7 +76,8 @@ export const dispatchReadFiles = async (props: Props): Promise => { return { data: { - [NodeOutputKeyEnum.text]: text + [NodeOutputKeyEnum.text]: text, + [NodeOutputKeyEnum.rawResponse]: readFilesResult }, [DispatchNodeResponseKeyEnum.nodeResponse]: { readFiles: readFilesResult.map((item) => ({