Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript

fix: Graph View auto-refreshes when wiki pages change after ingest

nash_suab6a1762a9b8
diff --git a/src/components/graph/graph-view.tsx b/src/components/graph/graph-view.tsx
index ff35f7c3..6858cd5b 100644
--- a/src/components/graph/graph-view.tsx
+++ b/src/components/graph/graph-view.tsx
@@ -130,6 +130,7 @@ export function GraphView() {
const setFileContent = useWikiStore((s) => s.setFileContent)
const setActiveView = useWikiStore((s) => s.setActiveView)
+ const fileTree = useWikiStore((s) => s.fileTree)
const [nodes, setNodes] = useState<GraphNode[]>([])
const [edges, setEdges] = useState<GraphEdge[]>([])
const [loading, setLoading] = useState(false)
@@ -153,12 +154,12 @@ export function GraphView() {
}
}, [project])
- // Auto-load on mount when a project is open
+ // Auto-load on mount and reload when file tree changes (after ingest)
useEffect(() => {
- if (project && !loaded) {
+ if (project) {
loadGraph()
}
- }, [project, loaded, loadGraph])
+ }, [project, fileTree, loadGraph])
const handleNodeClick = useCallback(
async (nodeId: string) => {