From 7467b7fd67d0069fc30537b5ee02a50050824c89 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 1 Feb 2024 12:45:38 -0800 Subject: [PATCH] feat: web doc url link --- src/lib/components/chat/MessageInput.svelte | 1 + src/lib/components/chat/Messages/UserMessage.svelte | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 96d7d2e1..2aec58d4 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -145,6 +145,7 @@ name: url, collection_name: '', upload_status: false, + url: url, error: '' }; diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 7bd71205..761ba41c 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -82,8 +82,14 @@ {#if file.type === 'image'} input {:else if file.type === 'doc'} -
{ + if (file?.url) { + window.open(file?.url, '_blank').focus(); + } + }} >
Document
- + {/if} {/each}