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: CSP was blocking all external API calls (LLM, Tavily, etc.)
nash_su42d3a25f0b00
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex 6fd35a11..8e266cae 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -20,7 +20,7 @@}],"security": {- "csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; media-src 'self' asset: https://asset.localhost; style-src 'self' 'unsafe-inline'",+ "csp": "default-src 'self'; connect-src 'self' https: http:; img-src 'self' asset: https://asset.localhost; media-src 'self' asset: https://asset.localhost; style-src 'self' 'unsafe-inline'","assetProtocol": {"enable": true,"scope": ["**"]diff --git a/src/components/review/review-view.tsx b/src/components/review/review-view.tsxindex 79698430..45a4a45b 100644--- a/src/components/review/review-view.tsx+++ b/src/components/review/review-view.tsx@@ -115,6 +115,30 @@ export function ReviewView() {console.error("Failed to delete:", err)resolveItem(id, "Delete failed")}+ } else if (actionLooksLikeResearch(action) && project) {+ // Actions with "research" trigger deep research, not just page creation+ const searchConfig = useWikiStore.getState().searchApiConfig+ if (searchConfig.provider === "none" || !searchConfig.apiKey) {+ // No search API — fall through to create a page instead+ const item = items.find((i) => i.id === id)+ if (item) {+ handleResolve(id, "__create_page__:" + action)+ }+ return+ }+ const item = items.find((i) => i.id === id)+ if (item) {+ const llmConfig = useWikiStore.getState().llmConfig+ const topic = action.replace(/^research\s*/i, "").trim() || item.description.split("\n")[0]+ queueResearch(project.path, topic, llmConfig, searchConfig)+ resolveItem(id, "Queued for deep research")+ } else {+ resolveItem(id, action)+ }+ } else if (action.startsWith("__create_page__:") && project) {+ // Explicit create page fallback+ const realAction = action.slice("__create_page__:".length)+ await createPageFromReview(id, realAction, items, project.path)} else if (actionLooksLikeCreate(action) && project) {// Create a wiki page from the review item's contentconst item = items.find((i) => i.id === id)@@ -319,6 +343,20 @@ function ReviewCard({)}+/** Detect if an action implies deep research (web search + LLM synthesis) */+function actionLooksLikeResearch(action: string): boolean {+ const lower = action.toLowerCase()+ return (+ lower.includes("research") ||+ lower.includes("investigate") ||+ lower.includes("explore") ||+ lower.includes("look into") ||+ lower.includes("研究") ||+ lower.includes("调研") ||+ lower.includes("探索")+ )+}+/** Detect if an action is a dismissal (no-op) or should create a page */function actionIsDismissal(action: string): boolean {const lower = action.toLowerCase()