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: filter sensitive hidden source entries

nash_sud09f8f0dbd45
diff --git a/src/lib/project-file-tree-refresh.test.ts b/src/lib/project-file-tree-refresh.test.ts
index b7dbd466..f5040274 100644
--- a/src/lib/project-file-tree-refresh.test.ts
+++ b/src/lib/project-file-tree-refresh.test.ts
@@ -98,6 +98,11 @@ describe("refreshProjectFileTree", () => {
path: "/tmp/project/raw/sources/.claude/memory.md",
is_dir: false,
},
+ {
+ name: "settings.json",
+ path: "/tmp/project/raw/sources/.claude/settings.json",
+ is_dir: false,
+ },
],
},
]
@@ -118,6 +123,7 @@ describe("refreshProjectFileTree", () => {
const index = useWikiStore.getState().projectPathIndex
expect(index.byPath.has("/tmp/project/wiki/entities/alpha.md")).toBe(true)
expect(index.byPath.has("/tmp/project/raw/sources/.claude/memory.md")).toBe(true)
+ expect(index.byPath.has("/tmp/project/raw/sources/.claude/settings.json")).toBe(false)
})
it("does not write stale results after the active project changes", async () => {
diff --git a/src/lib/project-file-tree-refresh.ts b/src/lib/project-file-tree-refresh.ts
index 9e4da313..54802db8 100644
--- a/src/lib/project-file-tree-refresh.ts
+++ b/src/lib/project-file-tree-refresh.ts
@@ -1,6 +1,7 @@
import { listDirectory } from "@/commands/fs"
import { useWikiStore } from "@/stores/wiki-store"
import { normalizePath } from "@/lib/path-utils"
+import { filterRawSourceTree } from "@/lib/source-filter"
import type { FileNode } from "@/types/wiki"
export interface RefreshProjectFileTreeOptions {
@@ -98,7 +99,7 @@ export async function refreshProjectFileTree(
if (!isStillCurrentProject(currentProjectId, normalizedProjectPath)) return
useWikiStore
.getState()
- .setProjectPathIndexFromTree([...fullTree, ...rawSourcesTree])
+ .setProjectPathIndexFromTree([...fullTree, ...filterRawSourceTree(rawSourcesTree)])
})
.catch((err) => {
console.error("Failed to refresh project path index:", err)