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: make dismiss button always visible, remove dynamic threshold
nash_su6f42cb63e005
diff --git a/src/components/graph/graph-view.tsx b/src/components/graph/graph-view.tsxindex a89efe89..a9b3de9e 100644--- a/src/components/graph/graph-view.tsx+++ b/src/components/graph/graph-view.tsx@@ -590,21 +590,23 @@ export function GraphView() {return (<divkey={i}- className={`rounded border px-2 py-1.5 cursor-pointer transition-colors relative group ${isActive ? "bg-blue-500/15 border-blue-500/40" : "bg-muted/30 hover:bg-muted/50"}`}+ className={`rounded border px-2 py-1.5 cursor-pointer transition-colors ${isActive ? "bg-blue-500/15 border-blue-500/40" : "bg-muted/30 hover:bg-muted/50"}`}onClick={() => setHighlightedNodes(isActive ? new Set() : ids)}>- <button- className="absolute top-1 right-1 hidden group-hover:block p-0.5 rounded hover:bg-muted"- onClick={(e) => {- e.stopPropagation()- setDismissedInsights((prev) => new Set([...prev, conn.key]))- if (isActive) setHighlightedNodes(new Set())- }}- >- <X className="h-3 w-3 text-muted-foreground" />- </button>- <div className="font-medium text-foreground">- {conn.source.label} ↔ {conn.target.label}+ <div className="flex items-start justify-between gap-1">+ <div className="font-medium text-foreground">+ {conn.source.label} ↔ {conn.target.label}+ </div>+ <button+ className="shrink-0 p-0.5 rounded hover:bg-destructive/20 text-muted-foreground hover:text-destructive"+ onClick={(e) => {+ e.stopPropagation()+ setDismissedInsights((prev) => new Set([...prev, conn.key]))+ if (isActive) setHighlightedNodes(new Set())+ }}+ >+ <X className="h-3 w-3" />+ </button></div><div className="text-muted-foreground mt-0.5">{conn.reasons.join(", ")}diff --git a/src/lib/graph-insights.ts b/src/lib/graph-insights.tsindex d87fd5c4..e9d18dd2 100644--- a/src/lib/graph-insights.ts+++ b/src/lib/graph-insights.ts@@ -41,10 +41,6 @@ export function findSurprisingConnections(// Structural pages that link to everything — exclude from analysisconst STRUCTURAL_IDS = new Set(["index", "log", "overview"])- // Dynamic threshold: as wiki grows, require higher score to surface- const nodeCount = nodes.length- const dynamicThreshold = nodeCount < 20 ? 3 : nodeCount < 50 ? 4 : 5-const scored: SurprisingConnection[] = []for (const edge of edges) {@@ -95,7 +91,7 @@ export function findSurprisingConnections(reasons.push("weak but present connection")}- if (score >= dynamicThreshold && reasons.length > 0) {+ if (score >= 3 && reasons.length > 0) {const key = [source.id, target.id].sort().join(":::")scored.push({ source, target, score, reasons, key })}