fix: 优化markdown解析器

This commit is contained in:
imeepos 2025-07-22 17:33:09 +08:00
parent 16ca52fa27
commit 7fcf0a1702
1 changed files with 12 additions and 4 deletions

View File

@ -357,11 +357,14 @@ export const ChatInterface: React.FC<ChatInterfaceProps> = ({
}, [selectedTags]);
return (
<div className={`flex flex-col h-full enhanced-chat-interface rounded-xl shadow-lg border border-gray-200 ${className}`}>
<div className={`relative h-full enhanced-chat-interface rounded-xl shadow-lg border border-gray-200 ${className}`}>
{/* 聊天消息区域 */}
<div
ref={chatContainerRef}
className="flex-1 overflow-y-auto p-4 space-y-6 bg-transparent chat-scroll pb-4"
className="absolute inset-0 overflow-y-auto p-4 space-y-6 bg-transparent chat-scroll"
style={{
paddingBottom: allTags.length > 0 ? '200px' : '120px'
}}
>
{messages.length === 0 ? (
<div className="flex flex-col items-center justify-center h-full text-center">
@ -409,7 +412,12 @@ export const ChatInterface: React.FC<ChatInterfaceProps> = ({
{/* 错误提示 */}
{error && (
<div className="mx-4 mb-2 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2">
<div
className="absolute left-4 right-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2 z-10"
style={{
bottom: allTags.length > 0 ? '210px' : '130px'
}}
>
<AlertCircle className="w-4 h-4 text-red-500 flex-shrink-0" />
<span className="text-red-700 text-sm">{error}</span>
<button
@ -422,7 +430,7 @@ export const ChatInterface: React.FC<ChatInterfaceProps> = ({
)}
{/* 固定底部输入区域 */}
<div className="flex-shrink-0 bg-white border-t border-gray-200 rounded-b-xl">
<div className="absolute bottom-0 left-0 right-0 bg-white border-t border-gray-200 rounded-b-xl">
{/* 标签选择区域 */}
{allTags.length > 0 && (
<div className="border-b border-gray-100 bg-gradient-to-r from-pink-50 to-purple-50">