From 4308a79e89feaafc1caf7cfc4ddd30e3df781497 Mon Sep 17 00:00:00 2001 From: Whitewater Date: Thu, 30 May 2024 19:10:14 +0800 Subject: [PATCH] fix: revision styles for workflow (#4087) --- web/.vscode/settings.example.json | 2 +- .../model-provider-page/model-parameter-modal/index.tsx | 2 +- web/app/components/workflow/header/index.tsx | 4 ++-- web/app/components/workflow/nodes/_base/components/field.tsx | 4 ++-- .../workflow/nodes/_base/components/memory-config.tsx | 5 ++++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/web/.vscode/settings.example.json b/web/.vscode/settings.example.json index 34b49e2708..6162d021d0 100644 --- a/web/.vscode/settings.example.json +++ b/web/.vscode/settings.example.json @@ -2,7 +2,7 @@ "prettier.enable": false, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "eslint.format.enable": true, "[python]": { diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx index 65e770b998..f33e5a6a44 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx @@ -152,7 +152,7 @@ const ModelParameterModal: FC = ({
diff --git a/web/app/components/workflow/header/index.tsx b/web/app/components/workflow/header/index.tsx index 679b6e626c..5245ce39bf 100644 --- a/web/app/components/workflow/header/index.tsx +++ b/web/app/components/workflow/header/index.tsx @@ -88,13 +88,13 @@ const Header: FC = () => { const handleShowFeatures = useCallback(() => { const { + showFeaturesPanel, isRestoring, setShowFeaturesPanel, } = workflowStore.getState() if (getNodesReadOnly() && !isRestoring) return - - setShowFeaturesPanel(true) + setShowFeaturesPanel(!showFeaturesPanel) }, [workflowStore, getNodesReadOnly]) const handleCancelRestore = useCallback(() => { diff --git a/web/app/components/workflow/nodes/_base/components/field.tsx b/web/app/components/workflow/nodes/_base/components/field.tsx index b47d66c4a8..bdc0e95442 100644 --- a/web/app/components/workflow/nodes/_base/components/field.tsx +++ b/web/app/components/workflow/nodes/_base/components/field.tsx @@ -31,10 +31,10 @@ const Filed: FC = ({ toggle: toggleFold, }] = useBoolean(true) return ( -
+
supportFold && toggleFold()} - className='flex justify-between items-center'> + className={cn('flex justify-between items-center', supportFold && 'cursor-pointer')}>
{title}
{tooltip && ( diff --git a/web/app/components/workflow/nodes/_base/components/memory-config.tsx b/web/app/components/workflow/nodes/_base/components/memory-config.tsx index 359f265fdd..24a279dcbd 100644 --- a/web/app/components/workflow/nodes/_base/components/memory-config.tsx +++ b/web/app/components/workflow/nodes/_base/components/memory-config.tsx @@ -50,7 +50,10 @@ type Props = { canSetRoleName?: boolean } -const MEMORY_DEFAULT: Memory = { window: { enabled: false, size: WINDOW_SIZE_DEFAULT } } +const MEMORY_DEFAULT: Memory = { + window: { enabled: false, size: WINDOW_SIZE_DEFAULT }, + query_prompt_template: '', +} const MemoryConfig: FC = ({ className,