import { useState } from "react"; import { WorkspaceMode } from "../lib/types"; import FileTree from "./FileTree"; import EditorPanel from "./EditorPanel"; interface FilesPanelProps { workspaceMode: WorkspaceMode; } export default function FilesPanel({ workspaceMode }: FilesPanelProps) { const [selectedFilePath, setSelectedFilePath] = useState(undefined); const isReadOnly = workspaceMode === WorkspaceMode.Agent; const isReadWrite = workspaceMode === WorkspaceMode.User; const handleFileSelect = (path: string) => { setSelectedFilePath(path); }; const handleCloseFile = () => { setSelectedFilePath(undefined); }; return (

Files

RW RO
{/* Split view: File tree on left, editor on right */}
{/* File Tree - 30% width, resizable in future */}
{/* Editor Panel - remaining space */}

{isReadOnly ? "Read-only: Agent is working" : isReadWrite ? "Read-write mode enabled" : "Select User or Agent mode to access files"}

); }