From 24973eabfe23e934226e19a0dcfc32b031f90ffb Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Tue, 10 Jun 2025 17:13:53 +0800 Subject: [PATCH] fix: structuredClone template --- src/components/ListAPI.tsx | 2 +- src/components/TemplateAttributeDialog.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) => {