fix(chat): 修复 ChatPanel 不显示的布局问题

- ChatPanel 容器添加 h-full shrink-0 确保有高度且不被压缩
- ScrollArea 从 w-full 改为 flex-1 min-w-0,为 ChatPanel 让出空间

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
huangjianwu
2026-03-23 15:15:14 +08:00
parent 2f2eb646a4
commit ae2bfe4d0a

View File

@@ -221,7 +221,7 @@ const MarkdownViewer: FC<MarkdownViewerProps> = ({ status }) => {
<div className="flex flex-1 overflow-hidden bg-white py-2">
{selectedContent && selectedContent !== 'loading' && selectedContent !== 'empty' ? (
<>
<ScrollArea className="w-full">
<ScrollArea className="min-w-0 flex-1">
<div className={'markdown-body w-full px-2'}>
<ReactMarkdown
remarkPlugins={[gfm, remarkMath]}
@@ -477,7 +477,7 @@ const MarkdownViewer: FC<MarkdownViewerProps> = ({ status }) => {
</div>
)}
{showChat && currentTask && (
<div className="ml-2 w-2/5">
<div className="ml-2 h-full w-2/5 shrink-0">
<ChatPanel taskId={currentTask.id} />
</div>
)}