From 6a5653639ac7cba469864dcb5a8a705edf1410e7 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 6 May 2025 11:04:05 +0800 Subject: [PATCH] chore: loop node debug remove before form panel --- .../workflow-panel/last-run/use-last-run.ts | 3 ++- .../components/workflow/nodes/loop/panel.tsx | 21 ------------------- .../nodes/loop/use-single-run-form-params.ts | 7 +++++++ 3 files changed, 9 insertions(+), 22 deletions(-) create mode 100644 web/app/components/workflow/nodes/loop/use-single-run-form-params.ts diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts index 0fe1ee0457..723a3afd56 100644 --- a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts +++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts @@ -12,6 +12,7 @@ import useQuestionClassifierSingleRunFormParams from '../../../../question-class import useHttpRequestSingleRunFormParams from '../../../../http/use-single-run-form-params' import useIterationSingleRunFormParams from '../../../../iteration/use-single-run-form-params' import useDocExtractorSingleRunFormParams from '../../../../document-extractor/use-single-run-form-params' +import useLoopSingleRunFormParams from '../../../../loop/use-single-run-form-params' import { BlockEnum } from '@/app/components/workflow/types' import { useNodesSyncDraft, @@ -29,7 +30,7 @@ const singleRunFormParamsHooks: Record = { [BlockEnum.Iteration]: useIterationSingleRunFormParams, [BlockEnum.Agent]: undefined, [BlockEnum.DocExtractor]: useDocExtractorSingleRunFormParams, - [BlockEnum.Loop]: undefined, + [BlockEnum.Loop]: useLoopSingleRunFormParams, [BlockEnum.Start]: undefined, [BlockEnum.End]: undefined, [BlockEnum.Answer]: undefined, diff --git a/web/app/components/workflow/nodes/loop/panel.tsx b/web/app/components/workflow/nodes/loop/panel.tsx index 8114160efd..757ba6b51d 100644 --- a/web/app/components/workflow/nodes/loop/panel.tsx +++ b/web/app/components/workflow/nodes/loop/panel.tsx @@ -3,7 +3,6 @@ import React, { useMemo } from 'react' import { useTranslation } from 'react-i18next' import { RiAddLine } from '@remixicon/react' import Split from '../_base/components/split' -import ResultPanel from '../../run/result-panel' import InputNumberWithSlider from '../_base/components/input-number-with-slider' import type { LoopNodeType } from './types' import useConfig from './use-config' @@ -11,7 +10,6 @@ import ConditionWrap from './components/condition-wrap' import LoopVariable from './components/loop-variables' import type { NodePanelProps } from '@/app/components/workflow/types' import Field from '@/app/components/workflow/nodes/_base/components/field' -import BeforeRunForm from '@/app/components/workflow/nodes/_base/components/before-run-form' import formatTracing from '@/app/components/workflow/run/utils/format-log' import { useLogs } from '@/app/components/workflow/run/hooks' @@ -30,11 +28,6 @@ const Panel: FC> = ({ inputs, childrenNodeVars, loopChildrenNodes, - isShowSingleRun, - hideSingleRun, - runningStatus, - handleRun, - handleStop, runResult, loopRunResult, handleAddCondition, @@ -139,20 +132,6 @@ const Panel: FC> = ({ */} - {isShowSingleRun && ( - - } - /> - )} ) } diff --git a/web/app/components/workflow/nodes/loop/use-single-run-form-params.ts b/web/app/components/workflow/nodes/loop/use-single-run-form-params.ts new file mode 100644 index 0000000000..daed2b03a3 --- /dev/null +++ b/web/app/components/workflow/nodes/loop/use-single-run-form-params.ts @@ -0,0 +1,7 @@ +const useSingleRunFormParams = () => { + return { + forms: [], + } +} + +export default useSingleRunFormParams