prose-sm on mobile
Browse files
src/lib/components/chat/ChatMessage.svelte
CHANGED
@@ -69,7 +69,7 @@
|
|
69 |
<IconLoading classNames="absolute inset-0 m-auto" />
|
70 |
{/if}
|
71 |
<div
|
72 |
-
class="prose dark:prose-invert prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900 prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-headings:font-semibold max-w-none"
|
73 |
bind:this={contentEl}
|
74 |
>
|
75 |
{#each tokens as token}
|
@@ -84,7 +84,7 @@
|
|
84 |
</div>
|
85 |
{/if}
|
86 |
{#if message.from === "user"}
|
87 |
-
<div class="flex items-start justify-start gap-4">
|
88 |
<div class="mt-5 w-3 h-3 flex-none rounded-full" />
|
89 |
<div class="rounded-2xl px-5 py-3.5 text-gray-500 dark:text-gray-400 whitespace-break-spaces">
|
90 |
{message.content.trim()}
|
|
|
69 |
<IconLoading classNames="absolute inset-0 m-auto" />
|
70 |
{/if}
|
71 |
<div
|
72 |
+
class="prose max-sm:prose-sm dark:prose-invert prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900 prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-headings:font-semibold max-w-none"
|
73 |
bind:this={contentEl}
|
74 |
>
|
75 |
{#each tokens as token}
|
|
|
84 |
</div>
|
85 |
{/if}
|
86 |
{#if message.from === "user"}
|
87 |
+
<div class="flex items-start justify-start gap-4 max-sm:text-sm">
|
88 |
<div class="mt-5 w-3 h-3 flex-none rounded-full" />
|
89 |
<div class="rounded-2xl px-5 py-3.5 text-gray-500 dark:text-gray-400 whitespace-break-spaces">
|
90 |
{message.content.trim()}
|
src/lib/components/chat/ChatMessages.svelte
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
</script>
|
26 |
|
27 |
<div class="overflow-y-auto h-full" use:snapScrollToBottom={messages} bind:this={chatContainer}>
|
28 |
-
<div class="max-w-3xl xl:max-w-4xl mx-auto px-5 pt-6 flex flex-col gap-8 h-full">
|
29 |
{#each messages as message, i}
|
30 |
<ChatMessage loading={loading && i === messages.length - 1} {message} />
|
31 |
{:else}
|
|
|
25 |
</script>
|
26 |
|
27 |
<div class="overflow-y-auto h-full" use:snapScrollToBottom={messages} bind:this={chatContainer}>
|
28 |
+
<div class="max-w-3xl xl:max-w-4xl mx-auto px-5 pt-6 flex flex-col gap-5 sm:gap-8 h-full">
|
29 |
{#each messages as message, i}
|
30 |
<ChatMessage loading={loading && i === messages.length - 1} {message} />
|
31 |
{:else}
|