From 7b64b4027006176bc8ee4d9773df4d8c63f58c17 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 19 Jun 2024 15:26:35 -0700 Subject: [PATCH] refac --- src/lib/components/chat/MessageInput.svelte | 2 +- src/lib/utils/index.ts | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index e18f2f67e..812d79e64 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -214,7 +214,7 @@ } } catch (e) { // Remove the failed doc from the files array - files = files.filter((f) => f.name !== url); + // files = files.filter((f) => f.name !== url); toast.error(e); } }; diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index fbf183325..bfff8e199 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -6,7 +6,17 @@ import sha256 from 'js-sha256'; ////////////////////////// export const sanitizeResponseContent = (content: string) => { - return content + // First, temporarily replace valid