import { useStore } from '@nanostores/react'; import { memo } from 'react'; import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels'; import type { FileMap } from '../../lib/stores/files'; import { themeStore } from '../../lib/stores/theme'; import { renderLogger } from '../../utils/logger'; import { isMobile } from '../../utils/mobile'; import { CodeMirrorEditor, type EditorDocument, type OnChangeCallback as OnEditorChange, type OnScrollCallback as OnEditorScroll, } from '../editor/codemirror/CodeMirrorEditor'; import { FileTreePanel } from './FileTreePanel'; interface EditorPanelProps { files?: FileMap; editorDocument?: EditorDocument; selectedFile?: string | undefined; isStreaming?: boolean; onEditorChange?: OnEditorChange; onEditorScroll?: OnEditorScroll; onFileSelect?: (value?: string) => void; } export const EditorPanel = memo( ({ files, editorDocument, selectedFile, onFileSelect, onEditorChange, onEditorScroll }: EditorPanelProps) => { renderLogger.trace('EditorPanel'); const theme = useStore(themeStore); return ( ); }, );