Commit 149eb38e authored by Joel's avatar Joel

feat: tool single run

parent d777184f
......@@ -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<NodePanelProps<ToolNodeType>> = ({
runningStatus,
handleRun,
handleStop,
runResult,
} = useConfig(id, data)
// console.log(inputs)
if (isLoading) {
return <div className='flex h-[200px] items-center justify-center'>
<Loading />
......@@ -158,6 +162,7 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
runningStatus={runningStatus}
onRun={handleRun}
onStop={handleStop}
result={<ResultPanel {...runResult} showSteps={false} />}
/>
)}
</div>
......
......@@ -114,6 +114,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
setRunInputData,
handleRun,
handleStop,
runResult,
} = useOneStepRun<ToolNodeType>({
id,
data: inputs,
......@@ -171,6 +172,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
runningStatus,
handleRun,
handleStop,
runResult,
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment