From 746f2b6799da9f1b011db7fa2137d7e7141f1376 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 29 Sep 2023 10:48:07 -0300 Subject: [PATCH] refactor(formModal): rename 'template' prop to 'prompt' for better clarity and consistency fix(formModal): update 'template' prop value to use the correct value from tabsState for each chatItem --- src/frontend/src/modals/formModal/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/modals/formModal/index.tsx b/src/frontend/src/modals/formModal/index.tsx index d74980183..3dd0e3ad9 100644 --- a/src/frontend/src/modals/formModal/index.tsx +++ b/src/frontend/src/modals/formModal/index.tsx @@ -214,7 +214,7 @@ export default function FormModal({ intermediate_steps?: string; is_bot: boolean; message: string; - template: string; + prompt?: string; type: string; chatKey: string; files?: Array; @@ -225,7 +225,7 @@ export default function FormModal({ ? { isSend: !chatItem.is_bot, message: chatItem.message, - template: chatItem.template, + template: tabsState[flow.id].formKeysData.template, thought: chatItem.intermediate_steps, files: chatItem.files, chatKey: chatItem.chatKey, @@ -233,7 +233,7 @@ export default function FormModal({ : { isSend: !chatItem.is_bot, message: chatItem.message, - template: chatItem.template, + template: tabsState[flow.id].formKeysData.template, thought: chatItem.intermediate_steps, chatKey: chatItem.chatKey, }