From 9d88722f355108f1b7ee3a60080cbae4871a997c Mon Sep 17 00:00:00 2001 From: Mckay Wrigley Date: Thu, 23 Mar 2023 19:08:20 -0600 Subject: [PATCH] clean history on import --- components/Sidebar/Import.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/Sidebar/Import.tsx b/components/Sidebar/Import.tsx index a3988dc..199b748 100644 --- a/components/Sidebar/Import.tsx +++ b/components/Sidebar/Import.tsx @@ -1,4 +1,5 @@ import { ChatFolder, Conversation } from "@/types"; +import { cleanConversationHistory } from "@/utils/app/clean"; import { IconFileImport } from "@tabler/icons-react"; import { FC } from "react"; @@ -22,7 +23,7 @@ export const Import: FC = ({ onImport }) => { let json = JSON.parse(e.target?.result as string); if (!json.folders) { - json = { history: json, folders: [] }; + json = { history: cleanConversationHistory(json), folders: [] }; } onImport({ conversations: json.history, folders: json.folders });