From d0633a9499ae20dfa45453c94feafea12deb6511 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 17:48:31 -0800 Subject: [PATCH] feat: horizontal scroll for code block --- src/app.css | 8 ++++++++ src/lib/components/chat/Messages.svelte | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app.css b/src/app.css index 27d2d7ef5..9ff69e873 100644 --- a/src/app.css +++ b/src/app.css @@ -14,6 +14,14 @@ html { word-break: break-word; } +code { + white-space-collapse: preserve !important; + /* text-wrap: nowrap !important; */ + + white-space: nowrap; + width: auto; +} + math { margin-top: 1rem; } diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 5b7aca61b..7e950d312 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -372,7 +372,7 @@ {/if} -
+
{#if message.role === 'user'} You