From d7c72e0eaa9febc8558f4a11fbb13d5643ff90b1 Mon Sep 17 00:00:00 2001 From: Nathan Sarrazin Date: Wed, 25 Dec 2024 11:29:45 +0000 Subject: [PATCH] feat: put file upload icon first so its always visible and make tools scrollable on mobile --- src/lib/components/chat/ChatInput.svelte | 77 ++++++++++++------------ 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/lib/components/chat/ChatInput.svelte b/src/lib/components/chat/ChatInput.svelte index 195e18de024..62054ecdbc9 100644 --- a/src/lib/components/chat/ChatInput.svelte +++ b/src/lib/components/chat/ChatInput.svelte @@ -142,8 +142,46 @@ {#if !assistant}
+ {#if modelIsMultimodal || modelHasTools} + {@const mimeTypesString = mimeTypes + .map((m) => { + // if the mime type ends in *, grab the first part so image/* becomes image + if (m.endsWith("*")) { + return m.split("/")[0]; + } + // otherwise, return the second part for example application/pdf becomes pdf + return m.split("/")[1]; + }) + .join(", ")} +
+ + + +
+ {/if} {/each} {/if} - {#if modelIsMultimodal || modelHasTools} - {@const mimeTypesString = mimeTypes - .map((m) => { - // if the mime type ends in *, grab the first part so image/* becomes image - if (m.endsWith("*")) { - return m.split("/")[0]; - } - // otherwise, return the second part for example application/pdf becomes pdf - return m.split("/")[1]; - }) - .join(", ")} -
- - - -
- {/if} {#if modelHasTools}