From 9023a60d0d3bd845fe43b0e56153c1b37f3f4b8a Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 17 Jun 2024 01:42:04 -0700 Subject: [PATCH] refac --- package-lock.json | 12 ++++++++++++ package.json | 1 + src/lib/components/chat/Chat.svelte | 3 ++- src/lib/components/chat/MessageInput.svelte | 4 +++- src/lib/components/common/ConfirmDialog.svelte | 8 ++++---- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 513993c74..8ec9484fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "async": "^3.2.5", "bits-ui": "^0.19.7", "codemirror": "^6.0.1", + "crc-32": "^1.2.2", "dayjs": "^1.11.10", "eventsource-parser": "^1.1.2", "file-saver": "^2.0.5", @@ -3063,6 +3064,17 @@ "layout-base": "^1.0.0" } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", diff --git a/package.json b/package.json index 46aeb14f7..50f5ea5ae 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "async": "^3.2.5", "bits-ui": "^0.19.7", "codemirror": "^6.0.1", + "crc-32": "^1.2.2", "dayjs": "^1.11.10", "eventsource-parser": "^1.1.2", "file-saver": "^2.0.5", diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index a5609685e..2a70af97e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1332,7 +1332,7 @@ />
{/if} @@ -1415,6 +1415,7 @@ } return a; }, [])} + transparentBackground={$settings?.backgroundImageUrl ?? false} {selectedModels} {messages} {submitPrompt} diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index ba288829b..7f0beb9c7 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -35,6 +35,8 @@ const i18n = getContext('i18n'); + export let transparentBackground = false; + export let submitPrompt: Function; export let stopResponse: Function; @@ -391,7 +393,7 @@
-
+