🐛 fix(Playground): Fix thinking section scroll issue and clean up unused CSS
- 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.
This commit is contained in:
@@ -215,7 +215,15 @@ const MessageContent = ({
|
||||
>
|
||||
{message.isReasoningExpanded && (
|
||||
<div className="p-3 sm:p-5 pt-2 sm:pt-4">
|
||||
<div className="bg-white/70 backdrop-blur-sm rounded-lg sm:rounded-xl p-2 shadow-inner overflow-x-auto max-h-50 overflow-y-auto">
|
||||
<div
|
||||
className="bg-white/70 backdrop-blur-sm rounded-lg sm:rounded-xl p-2 shadow-inner overflow-x-auto overflow-y-auto thinking-content-scroll"
|
||||
style={{
|
||||
maxHeight: '200px',
|
||||
minHeight: '100px',
|
||||
scrollbarWidth: 'thin',
|
||||
scrollbarColor: 'rgba(0, 0, 0, 0.3) transparent'
|
||||
}}
|
||||
>
|
||||
<div className="prose prose-xs sm:prose-sm prose-purple max-w-none text-xs sm:text-sm">
|
||||
<MarkdownRenderer
|
||||
content={finalExtractedThinkingContent}
|
||||
|
||||
@@ -74,11 +74,6 @@ body {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
/* 隐藏在移动设备上 */
|
||||
.hide-on-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.semi-table-tbody,
|
||||
.semi-table-row,
|
||||
.semi-table-row-cell {
|
||||
@@ -86,10 +81,12 @@ body {
|
||||
width: auto !important;
|
||||
padding: 2px !important;
|
||||
}
|
||||
|
||||
.semi-table-row-cell {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
.semi-table-tbody > .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;
|
||||
}
|
||||
|
||||
/* 调试面板标签样式 */
|
||||
|
||||
Reference in New Issue
Block a user