"use client"; import { memo } from "react"; import { SessionPanel, SessionPanelContent } from "@kandev/ui/pannel-session"; import { FileBrowser } from "@/components/task/file-browser"; import type { OpenFileTab } from "@/lib/types/backend"; import { useFilesPanelData } from "./task-files-panel-hooks"; function FilesTabContent({ sessionId, onOpenFile, handleCreateFile, hookDeleteFile, hookRenameFile, activeFilePath, }: { sessionId: string | null; onOpenFile: (file: OpenFileTab) => void; handleCreateFile: (path: string) => Promise; hookDeleteFile: (path: string) => Promise; hookRenameFile: (oldPath: string, newPath: string) => Promise; activeFilePath?: string | null; }) { if (!sessionId) { return (
No task selected
); } return ( ); } type TaskFilesPanelProps = { onOpenFile: (file: OpenFileTab) => void; activeFilePath?: string | null; }; const TaskFilesPanel = memo(function TaskFilesPanel({ onOpenFile, activeFilePath, }: TaskFilesPanelProps) { const { activeSessionId, hookDeleteFile, hookRenameFile, handleCreateFile } = useFilesPanelData(onOpenFile); return ( ); }); export { TaskFilesPanel };