From 149eb38e842b705f1ff50ba758624f332f995ff4 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 13 Mar 2024 18:43:43 +0800 Subject: [PATCH] feat: tool single run --- web/app/components/workflow/nodes/tool/panel.tsx | 5 +++++ web/app/components/workflow/nodes/tool/use-config.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/web/app/components/workflow/nodes/tool/panel.tsx b/web/app/components/workflow/nodes/tool/panel.tsx index 1f973c7e19..62f1633c56 100644 --- a/web/app/components/workflow/nodes/tool/panel.tsx +++ b/web/app/components/workflow/nodes/tool/panel.tsx @@ -13,6 +13,7 @@ import ConfigCredential from '@/app/components/tools/setting/build-in/config-cre import Loading from '@/app/components/base/loading' import BeforeRunForm from '@/app/components/workflow/nodes/_base/components/before-run-form' import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars' +import ResultPanel from '@/app/components/workflow/run/result-panel' const i18nPrefix = 'workflow.nodes.tool' @@ -43,8 +44,11 @@ const Panel: FC> = ({ runningStatus, handleRun, handleStop, + runResult, } = useConfig(id, data) + // console.log(inputs) + if (isLoading) { return
@@ -158,6 +162,7 @@ const Panel: FC> = ({ runningStatus={runningStatus} onRun={handleRun} onStop={handleStop} + result={} /> )}
diff --git a/web/app/components/workflow/nodes/tool/use-config.ts b/web/app/components/workflow/nodes/tool/use-config.ts index 4fc9cc92fe..bcb633954d 100644 --- a/web/app/components/workflow/nodes/tool/use-config.ts +++ b/web/app/components/workflow/nodes/tool/use-config.ts @@ -114,6 +114,7 @@ const useConfig = (id: string, payload: ToolNodeType) => { setRunInputData, handleRun, handleStop, + runResult, } = useOneStepRun({ id, data: inputs, @@ -171,6 +172,7 @@ const useConfig = (id: string, payload: ToolNodeType) => { runningStatus, handleRun, handleStop, + runResult, } }