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
This commit is contained in:
anovazzi1 2023-09-29 10:48:07 -03:00 • committed by anovazzi1
commit 746f2b6799

View file

@ -214,7 +214,7 @@ export default function FormModal({
intermediate_steps?: string; intermediate_steps?: string;
is_bot: boolean; is_bot: boolean;
message: string; message: string;
template: string; prompt?: string;
type: string; type: string;
chatKey: string; chatKey: string;
files?: Array<any>; files?: Array<any>;
@ -225,7 +225,7 @@ export default function FormModal({
? { ? {
isSend: !chatItem.is_bot, isSend: !chatItem.is_bot,
message: chatItem.message, message: chatItem.message,
template: chatItem.template, template: tabsState[flow.id].formKeysData.template,
thought: chatItem.intermediate_steps, thought: chatItem.intermediate_steps,
files: chatItem.files, files: chatItem.files,
chatKey: chatItem.chatKey, chatKey: chatItem.chatKey,
@ -233,7 +233,7 @@ export default function FormModal({
: { : {
isSend: !chatItem.is_bot, isSend: !chatItem.is_bot,
message: chatItem.message, message: chatItem.message,
template: chatItem.template, template: tabsState[flow.id].formKeysData.template,
thought: chatItem.intermediate_steps, thought: chatItem.intermediate_steps,
chatKey: chatItem.chatKey, chatKey: chatItem.chatKey,
} }