fix: structuredClone template
Some checks are pending
Deploy static content to Pages / deploy (push) Waiting to run

This commit is contained in:
2025-06-10 17:13:53 +08:00
parent 6078d8a2c3
commit 24973eabfe
2 changed files with 2 additions and 2 deletions

View File

@@ -548,7 +548,7 @@ function ChatTemplateDropdownList() {
<CommandItem <CommandItem
key={index} key={index}
value={t.name} value={t.name}
onSelect={() => handleTemplateSelect(t)} onSelect={() => handleTemplateSelect(structuredClone(t))}
> >
<div className="flex items-center justify-between w-full"> <div className="flex items-center justify-between w-full">
<span>{t.name}</span> <span>{t.name}</span>

View File

@@ -69,7 +69,7 @@ export function TemplateAttributeDialog({
(filteredStore as any)[typedKey] = chatStore[typedKey]; (filteredStore as any)[typedKey] = chatStore[typedKey];
} }
}); });
onSave(templateName, filteredStore); onSave(templateName, structuredClone(filteredStore));
}; };
const toggleAll = (checked: boolean) => { const toggleAll = (checked: boolean) => {