From 135a93993b3df06f2b772b5be1882e84ec5ea877 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Sat, 31 May 2025 03:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(Playground):=20Fix=20thinkin?= =?UTF-8?q?g=20section=20scroll=20issue=20and=20clean=20up=20unused=20CSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix thinking content area scroll functionality in MessageContent.js * Replace max-h-50 with explicit maxHeight style (200px) * Add thinking-content-scroll CSS class for proper scrollbar styling * Ensure scrollbars are visible when content exceeds container height - Add thinking-content-scroll CSS class in index.css * Define webkit scrollbar styles with proper dimensions (6px) * Add hover effects and cross-browser compatibility * Support both webkit and Firefox scrollbar styling - Remove unused CSS classes to improve code cleanliness * Remove .hide-on-mobile class (no usage found in codebase) * Remove .debug-code class (no longer needed) - Improve user experience for viewing lengthy thinking content * Users can now properly scroll through AI reasoning content * Maintains content visibility with appropriate height constraints Resolves issue where thinking section had max height but no scrolling capability. --- .../components/playground/MessageContent.js | 10 +++++- web/src/index.css | 36 +++++++++++++------ 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/web/src/components/playground/MessageContent.js b/web/src/components/playground/MessageContent.js index 6d0e3974..77b10c5a 100644 --- a/web/src/components/playground/MessageContent.js +++ b/web/src/components/playground/MessageContent.js @@ -215,7 +215,15 @@ const MessageContent = ({ > {message.isReasoningExpanded && (
-
+
.semi-table-row { + + .semi-table-tbody>.semi-table-row { border-bottom: 1px solid rgba(0, 0, 0, 0.1); } } @@ -217,11 +214,28 @@ code { scrollbar-width: none; } -/* 调试面板代码样式 */ -.debug-code { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; - font-size: 11px; - line-height: 1.4; +/* 思考内容区域滚动条样式 */ +.thinking-content-scroll::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +.thinking-content-scroll::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.2); + border-radius: 3px; +} + +.thinking-content-scroll::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.3); +} + +.thinking-content-scroll::-webkit-scrollbar-track { + background: transparent; +} + +.thinking-content-scroll { + scrollbar-width: thin; + scrollbar-color: rgba(0, 0, 0, 0.2) transparent; } /* 调试面板标签样式 */