From bcd5853ce78e09a256141218560b53ad918bfc47 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 8 May 2024 16:29:25 -0700 Subject: [PATCH] enhancement: youtu.be url support --- src/lib/components/chat/MessageInput/Documents.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/MessageInput/Documents.svelte b/src/lib/components/chat/MessageInput/Documents.svelte index b38cc5f1b..4e93d2155 100644 --- a/src/lib/components/chat/MessageInput/Documents.svelte +++ b/src/lib/components/chat/MessageInput/Documents.svelte @@ -143,7 +143,11 @@ {/each} - {#if prompt.split(' ')?.at(0)?.substring(1).startsWith('https://www.youtube.com')} + {#if prompt + .split(' ') + .some((s) => s.substring(1).startsWith('https://www.youtube.com') || s + .substring(1) + .startsWith('https://youtu.be'))}