From 94dbda503f30016794c071752ca00fd3dca52306 Mon Sep 17 00:00:00 2001 From: Harry Date: Thu, 8 Jan 2026 14:15:58 +0800 Subject: [PATCH] refactor(llm-panel): update layout and enhance Max Iterations component - Adjusted padding in the LLM panel for better visual alignment. - Refactored the Max Iterations component to accept a className prop for flexible styling. - Maintained the structure of advanced settings while ensuring consistent rendering of fields. --- .../llm/components/tools/max-iterations.tsx | 7 +- .../components/workflow/nodes/llm/panel.tsx | 102 +++++++++--------- 2 files changed, 57 insertions(+), 52 deletions(-) diff --git a/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx b/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx index 3f1a4b7130..d9de3623e3 100644 --- a/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx +++ b/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx @@ -3,13 +3,16 @@ import { InputNumber } from '@/app/components/base/input-number' import Slider from '@/app/components/base/slider' import Tooltip from '@/app/components/base/tooltip' +import { cn } from '@/utils/classnames' + type MaxIterationsProps = { value?: number onChange?: (value: number) => void + className?: string } -const MaxIterations = ({ value = 10, onChange }: MaxIterationsProps) => { +const MaxIterations = ({ value = 10, onChange, className }: MaxIterationsProps) => { return ( -
+
Max Iterations
> = ({ }, [inputs.model.completion_params]) return (
-
+
> = ({ maxIterations={inputs.max_iterations} hideMaxIterations /> - - {/* Advanced Settings - 折叠区 */} - -
- {/* Context */} - - <> - - {shouldShowContextTip && ( -
{t(`${i18nPrefix}.notSetContextInPromptTip`, { ns: 'workflow' })}
- )} - -
- - {/* Vision: GPT4-vision and so on */} - - - {/* Max Iterations */} - - - {/* Reasoning Format */} - -
-
+ + {/* Advanced Settings - 折叠区 */} + +
+ {/* Context */} + + <> + + {shouldShowContextTip && ( +
{t(`${i18nPrefix}.notSetContextInPromptTip`, { ns: 'workflow' })}
+ )} + +
+ + {/* Vision: GPT4-vision and so on */} + + + {/* Max Iterations */} + + + {/* Reasoning Format */} + +
+
+