Browse Source

refac: code block styling

Timothy Jaeryang Baek 2 months ago
parent
commit
a6a7c548d5
2 changed files with 8 additions and 2 deletions
  1. 1 1
      src/app.css
  2. 7 1
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 1 - 1
src/app.css

@@ -101,7 +101,7 @@ li p {
 
 /* Dark theme scrollbar styles */
 .dark ::-webkit-scrollbar-thumb {
-	background-color: rgba(33, 33, 33, 0.8); /* Darker color for dark theme */
+	background-color: rgba(42, 42, 42, 0.8); /* Darker color for dark theme */
 	border-color: rgba(0, 0, 0, var(--tw-border-opacity));
 }
 

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

@@ -493,7 +493,13 @@
 						{#if stdout || stderr}
 							<div class=" ">
 								<div class=" text-gray-500 text-xs mb-1">STDOUT/STDERR</div>
-								<div class="text-sm">{stdout || stderr}</div>
+								<div
+									class="text-sm {stdout?.split('\n')?.length > 100
+										? `max-h-96`
+										: ''}  overflow-y-auto"
+								>
+									{stdout || stderr}
+								</div>
 							</div>
 						{/if}
 						{#if result || files}