Commit 2f160ba59 for llama.cpp
commit 2f160ba59ae7a84e014d7c0e67690d110058aa03
Author: shamnadxyz <155352697+shamnadxyz@users.noreply.github.com>
Date: Mon Oct 12 13:50:16 2026 +0530
ui: fix text attachment preview overflow (#29898)
* ui: fix text attachment preview overflow
Set the max height to 80dvh and the max width to full on screens
below medium and 80vw from medium onward.
* style: run formatter
diff --git a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
index 5977523ac..1fa1d5e8a 100644
--- a/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
+++ b/tools/ui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentsPreview/ChatAttachmentsPreviewCurrentItem/ChatAttachmentsPreviewCurrentItemText.svelte
@@ -10,12 +10,7 @@
</script>
{#if displayTextContent}
- <div class="px-4 pb-4">
- <SyntaxHighlightedCode
- class="max-w-4xl"
- code={displayTextContent}
- {language}
- maxHeight="none"
- />
+ <div class="px-4 pb-4 min-h-0 min-w-0 max-w-full md:max-w-[80vw]">
+ <SyntaxHighlightedCode code={displayTextContent} {language} maxHeight="80dvh" />
</div>
{/if}