diff --git a/src/components/ListAPI.tsx b/src/components/ListAPI.tsx index ecbc990..ad7c9b0 100644 --- a/src/components/ListAPI.tsx +++ b/src/components/ListAPI.tsx @@ -548,7 +548,7 @@ function ChatTemplateDropdownList() { handleTemplateSelect(t)} + onSelect={() => handleTemplateSelect(structuredClone(t))} >
{t.name} diff --git a/src/components/TemplateAttributeDialog.tsx b/src/components/TemplateAttributeDialog.tsx index eeca899..e0c09b2 100644 --- a/src/components/TemplateAttributeDialog.tsx +++ b/src/components/TemplateAttributeDialog.tsx @@ -69,7 +69,7 @@ export function TemplateAttributeDialog({ (filteredStore as any)[typedKey] = chatStore[typedKey]; } }); - onSave(templateName, filteredStore); + onSave(templateName, structuredClone(filteredStore)); }; const toggleAll = (checked: boolean) => {