From 53103c3bd7331ae0bc12c7b5d68ae95a44c7bd33 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 19 Nov 2024 03:04:49 -0800 Subject: [PATCH] refac: styling --- src/lib/components/chat/Chat.svelte | 1 + src/lib/components/chat/MessageInput.svelte | 112 +++++++------------- 2 files changed, 41 insertions(+), 72 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 2948e9a51..bfc9800fe 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2033,6 +2033,7 @@ parentId: string, responseMessageId: string ) => { + // TODO: move this to the backend const responseMessage = history.messages[responseMessageId]; const userMessage = history.messages[parentId]; const messages = createMessagesList(history.currentId); diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 03b6ffc32..08277cd09 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -312,11 +312,49 @@
{#if atSelectedModel !== undefined || selectedToolIds.length > 0 || webSearchEnabled}
+ {#if selectedToolIds.length > 0} +
+
+
+ + + + +
+
+ {selectedToolIds + .map((id) => { + return $tools ? $tools.find((tool) => tool.id === id)?.name : id; + }) + .join(', ')} +
+
+
+ {/if} + + {#if webSearchEnabled} +
+
+
+ + + + +
+
{$i18n.t('Search the web')}
+
+
+ {/if} + {#if atSelectedModel !== undefined}
-
+
model profile
{/if} - - {#if selectedToolIds.length > 0} -
-
-
- - - -
-
- {selectedToolIds - .map((id) => { - return $tools ? $tools.find((tool) => tool.id === id)?.name : id; - }) - .join(', ')} -
-
-
- -
-
- {/if} - - {#if webSearchEnabled} -
-
-
- - - -
-
{$i18n.t('Search the web')}
-
-
- -
-
- {/if}
{/if}