From 0d8e6204b86871bae75329045eea7b64865206d5 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Fri, 5 Jan 2024 11:25:59 +0700 Subject: [PATCH] fix: conditional section promp_template --- web/screens/Chat/Sidebar/index.tsx | 50 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/web/screens/Chat/Sidebar/index.tsx b/web/screens/Chat/Sidebar/index.tsx index 14c2a67d6..bfa8bde9d 100644 --- a/web/screens/Chat/Sidebar/index.tsx +++ b/web/screens/Chat/Sidebar/index.tsx @@ -48,6 +48,8 @@ const Sidebar: React.FC = () => { const componentDataRuntimeSetting = getConfigurationsData(modelEngineParams) const componentDataEngineSetting = getConfigurationsData(modelRuntimeParams) + console.log(componentDataEngineSetting) + const onReviewInFinderClick = async (type: string) => { if (!activeThread) return const activeThreadState = threadStates[activeThread.id] @@ -236,31 +238,31 @@ const Sidebar: React.FC = () => { )} + {componentDataEngineSetting.filter( + (x) => x.name === 'prompt_template' + ).length !== 0 && ( +
+ +
+ {settingComponentBuilder(componentDataEngineSetting, true)} +
+
+
+ )} + {componentDataEngineSetting.length !== 0 && ( - <> -
- -
- {settingComponentBuilder( - componentDataEngineSetting, - true - )} -
-
-
-
- -
- -
-
-
- +
+ +
+ +
+
+
)}