From 0dcfac5b84bca253778d4d4b6928db55795247d1 Mon Sep 17 00:00:00 2001 From: NFish Date: Thu, 12 Mar 2026 17:57:08 +0800 Subject: [PATCH] fix: The HTTP Request node panel supports line break and overflow handling for variable values (#33359) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- web/app/components/base/prompt-editor/index.tsx | 8 ++++++-- .../nodes/_base/components/input-support-select-var.tsx | 6 +++--- .../components/key-value/key-value-edit/input-item.tsx | 7 +++---- web/eslint-suppressions.json | 3 --- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/app/components/base/prompt-editor/index.tsx b/web/app/components/base/prompt-editor/index.tsx index 6f1d40f6eb..deead5086c 100644 --- a/web/app/components/base/prompt-editor/index.tsx +++ b/web/app/components/base/prompt-editor/index.tsx @@ -1,5 +1,6 @@ 'use client' +import type { InitialConfigType } from '@lexical/react/LexicalComposer' import type { EditorState, LexicalCommand, @@ -153,7 +154,10 @@ const PromptEditor: FC = ({ shortcutPopups = [], }) => { const { eventEmitter } = useEventEmitterContextContext() - const initialConfig = { + const initialConfig: InitialConfigType = { + theme: { + paragraph: 'group-[.clamp]:line-clamp-5 group-focus/editable:!line-clamp-none', + }, namespace: 'prompt-editor', nodes: [ CodeNode, @@ -214,7 +218,7 @@ const PromptEditor: FC = ({ contentEditable={( = ({ const setShowInputFieldPanel = useStore(s => s.setShowInputFieldPanel) return ( -
+
<> = ({ {/* to patch Editor not support dynamic change editable status */} {readOnly &&
} {isFocus && ( -
+
diff --git a/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/input-item.tsx b/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/input-item.tsx index 7f1e2df2a0..a6914f0eb7 100644 --- a/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/input-item.tsx +++ b/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/input-item.tsx @@ -59,12 +59,12 @@ const InputItem: FC = ({ }, [onRemove]) return ( -
+
{(!readOnly) ? ( = ({ onFocusChange={setIsFocus} placeholder={t('nodes.http.insertVarPlaceholder', { ns: 'workflow' })!} placeholderClassName="!leading-[21px]" - promptMinHeightClassName="h-full" insertVarTipToLeft={insertVarTipToLeft} /> ) @@ -85,7 +84,7 @@ const InputItem: FC = ({ {hasValue && (