(filename: string)
| 43 | }, [open, workspaceDir, loadOverview]); |
| 44 | |
| 45 | async function openFile(filename: string) { |
| 46 | try { |
| 47 | const file = await api<MemoryFile>(`/api/memory/file/${encodeURIComponent(filename)}`); |
| 48 | setActiveFile(file); |
| 49 | setEditContent(file.content); |
| 50 | setActiveView('file'); |
| 51 | } catch { /* ignore */ } |
| 52 | } |
| 53 | |
| 54 | async function handleSaveFile() { |
| 55 | if (!activeFile) return; |