fix: 优化markdown解析器

This commit is contained in:
imeepos 2025-07-22 17:47:31 +08:00
parent d1a2c885fb
commit 9a0ddb72d5
1 changed files with 4 additions and 13 deletions

View File

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