From 5ce6c8ced30379d6a3fc9f412bd38b888b053ed2 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 31 Mar 2025 01:45:22 -0700 Subject: [PATCH] refac --- .../components/chat/MessageInput/Commands/Prompts.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Commands/Prompts.svelte b/src/lib/components/chat/MessageInput/Commands/Prompts.svelte index d7dcd25f5..0e7a601e4 100644 --- a/src/lib/components/chat/MessageInput/Commands/Prompts.svelte +++ b/src/lib/components/chat/MessageInput/Commands/Prompts.svelte @@ -126,8 +126,13 @@ const lastLineWords = lastLine.split(' '); const lastWord = lastLineWords.pop(); - lastLineWords.push(text); - lines.push(lastLineWords.join(' ')); + if ($settings?.richTextInput ?? true) { + lastLineWords.push(`${text.replace(//g, '>')}`); + lines.push(lastLineWords.join(' ')); + } else { + lastLineWords.push(text); + lines.push(lastLineWords.join(' ')); + } prompt = lines.join('\n');