From 2342c5036b8786be1826645d70abe35e1696f79c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 19 Nov 2023 17:47:07 -0800 Subject: [PATCH] feat: custom chatId route support --- backend/config.py | 2 +- src/lib/components/chat/MessageInput.svelte | 282 +++ .../{ => MessageInput}/Suggestions.svelte | 0 src/lib/components/chat/Messages.svelte | 706 ++++++++ src/lib/components/chat/ModelSelector.svelte | 117 ++ src/lib/components/chat/SettingsModal.svelte | 110 +- src/lib/components/layout/Navbar.svelte | 526 +----- src/lib/components/layout/Sidebar.svelte | 642 +++++++ src/lib/stores/index.ts | 9 + src/lib/utils/index.ts | 67 + src/routes/(app)/+layout.svelte | 151 +- src/routes/(app)/+page.svelte | 1579 ++--------------- src/routes/(app)/c/[id]/+page.svelte | 519 ++++++ src/routes/auth/+page.svelte | 4 +- 14 files changed, 2672 insertions(+), 2042 deletions(-) create mode 100644 src/lib/components/chat/MessageInput.svelte rename src/lib/components/chat/{ => MessageInput}/Suggestions.svelte (100%) create mode 100644 src/lib/components/chat/Messages.svelte create mode 100644 src/lib/components/chat/ModelSelector.svelte create mode 100644 src/lib/components/layout/Sidebar.svelte create mode 100644 src/lib/utils/index.ts diff --git a/backend/config.py b/backend/config.py index dd1c0b61..7285edf6 100644 --- a/backend/config.py +++ b/backend/config.py @@ -29,7 +29,7 @@ if ENV == "prod": # WEBUI_VERSION #################################### -WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.9") +WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.11") #################################### # WEBUI_AUTH diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte new file mode 100644 index 00000000..dcd46429 --- /dev/null +++ b/src/lib/components/chat/MessageInput.svelte @@ -0,0 +1,282 @@ + + +
+
+
+ {#if messages.length == 0 && suggestions !== 'false'} + + {/if} + + {#if autoScroll === false && messages.length > 0} +
+ +
+ {/if} + +
+
{ + submitPrompt(prompt); + }} + > +