fix: 图谱视图简化为单useEffect,修复节点不渲染;清理诊断代码

This commit is contained in:
hunter-dev
2026-08-24 20:55:33 +08:00
parent 2062eeceed
commit 13a80c7dc5
3 changed files with 61 additions and 56 deletions
+2 -2
View File
@@ -44,10 +44,10 @@ export function registerIpc(vault: VaultService) {
ipcMain.handle(IPC.search, async (_e, p: { query: string }) => vault.searchService?.search(p.query) ?? []);
ipcMain.handle(IPC.tagStats, async () => vault.searchService?.tagStats() ?? []);
ipcMain.handle(IPC.graph, async () => {
const fs2 = vault.fileService;
const fs2 = vault.fileService; console.log('[GRAPH-HANDLER] fs2?', !!fs2);
if (!fs2) return { nodes: [], edges: [] };
const tree = await fs2.listTree();
return buildGraphData(fs2.getRoot(), tree);
const gd = await buildGraphData(fs2.getRoot(), tree); return gd;
});
ipcMain.handle(IPC.copyMd, async (_e, p: { path: string }) => {