Forráskód Böngészése

Merge pull request #196 from ollama-webui/codeblock-width

feat: horizontal scroll for code block
Timothy Jaeryang Baek 1 éve
szülő
commit
1e880f2526
2 módosított fájl, 9 hozzáadás és 3 törlés
  1. 8 2
      src/app.css
  2. 1 1
      src/lib/components/chat/Messages.svelte

+ 8 - 2
src/app.css

@@ -14,6 +14,12 @@ html {
 	word-break: break-word;
 }
 
+code {
+	white-space-collapse: preserve !important;
+	white-space: nowrap;
+	width: auto;
+}
+
 math {
 	margin-top: 1rem;
 }
@@ -31,8 +37,8 @@ math {
 }
 
 ::-webkit-scrollbar {
-	height: 1rem;
-	width: 0.5rem;
+	height: 0.45rem;
+	width: 0.35rem;
 }
 
 ::-webkit-scrollbar-track {

+ 1 - 1
src/lib/components/chat/Messages.svelte

@@ -372,7 +372,7 @@
 						{/if}
 					</div>
 
-					<div class="w-full">
+					<div class="w-full overflow-hidden">
 						<div class=" self-center font-bold mb-0.5">
 							{#if message.role === 'user'}
 								You