From 3436523b79eb1194b2c7f1717dbf958f7faf5d78 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 19 Oct 2024 13:40:20 -0700 Subject: [PATCH] fix: input commands --- src/lib/components/chat/MessageInput/Commands.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Commands.svelte b/src/lib/components/chat/MessageInput/Commands.svelte index f8b0d5b6d..c6feea1d1 100644 --- a/src/lib/components/chat/MessageInput/Commands.svelte +++ b/src/lib/components/chat/MessageInput/Commands.svelte @@ -25,13 +25,13 @@ }; let command = ''; - $: command = (prompt?.trim() ?? '').split(' ')?.at(-1) ?? ''; + $: command = prompt.split(' ')?.at(-1) ?? ''; {#if ['/', '#', '@'].includes(command?.charAt(0)) || '\\#' === command.slice(0, 2)} {#if command?.charAt(0) === '/'} - {:else if command?.charAt(0) === '#' || '\\#' === command.slice(0, 2)} + {:else if (command?.charAt(0) === '#' && command.startsWith('#') && !command.includes('# ')) || ('\\#' === command.slice(0, 2) && command.startsWith('#') && !command.includes('# '))}