(filename: string)
| 65 | } |
| 66 | |
| 67 | async function handleDeleteFile(filename: string) { |
| 68 | try { |
| 69 | await api(`/api/memory/file/${encodeURIComponent(filename)}`, { method: 'DELETE' }); |
| 70 | if (activeFile?.filename === filename) { |
| 71 | setActiveFile(null); |
| 72 | setActiveView('overview'); |
| 73 | } |
| 74 | await loadOverview(); |
| 75 | } catch { /* ignore */ } |
| 76 | } |
| 77 | |
| 78 | async function handleSearch() { |
| 79 | if (!searchQuery.trim()) return; |