diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx index f40a62d..49130c8 100644 --- a/src/components/ChatInput.tsx +++ b/src/components/ChatInput.tsx @@ -1,14 +1,10 @@ -import { useState, useRef, useEffect, useCallback, lazy, Suspense } from 'react'; +import { useState, useRef, useEffect, useCallback } from 'react'; import { Send, Square, Paperclip, X, FileText, Eye, EyeOff, Reply } from 'lucide-react'; import { useT } from '../hooks/useLocale'; import { useSendShortcut } from '../hooks/useSendShortcut'; import { SlashCommandMenu } from './SlashCommands'; import { shouldShowSlashMenu } from '../lib/slashUtils'; - -const ReactMarkdown = lazy(() => import('react-markdown')); -const remarkGfm = import('remark-gfm').then(m => m.default); -let _remarkGfm: typeof import('remark-gfm').default | null = null; -remarkGfm.then(p => { _remarkGfm = p; }); +import { LazyMarkdown } from './LazyMarkdown'; interface FileAttachment { id: string; @@ -320,9 +316,7 @@ export function ChatInput({ onSend, onNewSession, onAbort, isGenerating, disable {/* Markdown preview */} {showPreview && text.trim() && (
- Loading…}> - {text} - + {text}
)}