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
release: v0.4.2 — language picker on create + project deletion fix
nash_sucaa31db61721
diff --git a/package.json b/package.jsonindex 5a41a44f..91cc11be 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "llm-wiki","private": true,- "version": "0.4.1",+ "version": "0.4.2","type": "module","scripts": {"dev": "vite",diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lockindex 41b343f3..459ad9b8 100644--- a/src-tauri/Cargo.lock+++ b/src-tauri/Cargo.lock@@ -4420,7 +4420,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"[[package]]name = "llm-wiki"-version = "0.4.1"+version = "0.4.2"dependencies = ["arrow-array","arrow-schema",diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.tomlindex 99c520b2..1a3c9dd4 100644--- a/src-tauri/Cargo.toml+++ b/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "llm-wiki"-version = "0.4.1"+version = "0.4.2"description = "LLM Wiki - A personal knowledge base for LLM concepts"authors = []edition = "2021"diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex cdef35a8..4a5c9f89 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -1,7 +1,7 @@{"$schema": "https://schema.tauri.app/config/2","productName": "LLM Wiki",- "version": "0.4.1",+ "version": "0.4.2","identifier": "com.llmwiki.app","build": {"beforeDevCommand": "npm run dev",diff --git a/src/components/project/create-project-dialog.tsx b/src/components/project/create-project-dialog.tsxindex 4a8656da..ede16ea1 100644--- a/src/components/project/create-project-dialog.tsx+++ b/src/components/project/create-project-dialog.tsx@@ -12,6 +12,9 @@ import { getTemplate } from "@/lib/templates"import { TemplatePicker } from "@/components/project/template-picker"import type { WikiProject } from "@/types/wiki"import { normalizePath } from "@/lib/path-utils"+import { OUTPUT_LANGUAGE_OPTIONS } from "@/lib/output-language-options"+import { useWikiStore, type OutputLanguage } from "@/stores/wiki-store"+import { saveOutputLanguage } from "@/lib/project-store"interface CreateProjectDialogProps {open: boolean@@ -23,8 +26,15 @@ export function CreateProjectDialog({ open: isOpen, onOpenChange, onCreated }: Cconst [name, setName] = useState("")const [path, setPath] = useState("")const [selectedTemplate, setSelectedTemplate] = useState("general")+ // Empty string = "user hasn't picked yet"; we validate this on+ // submit so a fresh project never starts in implicit auto-detect+ // mode. Once chosen, the value is one of OUTPUT_LANGUAGE_OPTIONS+ // (`auto` is a valid explicit choice — the user is then opting+ // INTO auto-detect rather than getting it by accident).+ const [language, setLanguage] = useState<string>("")const [error, setError] = useState("")const [creating, setCreating] = useState(false)+ const setOutputLanguage = useWikiStore((s) => s.setOutputLanguage)async function handleBrowse() {const selected = await open({@@ -42,6 +52,10 @@ export function CreateProjectDialog({ open: isOpen, onOpenChange, onCreated }: CsetError("Name and path are required")return}+ if (!language) {+ setError("Please pick an AI output language")+ return+ }setCreating(true)setError("")try {@@ -55,11 +69,20 @@ export function CreateProjectDialog({ open: isOpen, onOpenChange, onCreated }: Cawait createDirectory(`${pp}/${dir}`)}+ // Persist the user's language choice. The store / disk+ // mirror is what the rest of the app reads via+ // `getOutputLanguage()` — without this write the choice+ // wouldn't survive past the dialog closing.+ const lang = language as OutputLanguage+ setOutputLanguage(lang)+ await saveOutputLanguage(lang)+onCreated(project)onOpenChange(false)setName("")setPath("")setSelectedTemplate("general")+ setLanguage("")} catch (err) {setError(String(err))} finally {@@ -82,6 +105,41 @@ export function CreateProjectDialog({ open: isOpen, onOpenChange, onCreated }: C<Label>Template</Label><TemplatePicker selected={selectedTemplate} onSelect={setSelectedTemplate} /></div>+ <div className="flex flex-col gap-2">+ <Label htmlFor="language">+ AI Output Language <span className="text-destructive">*</span>+ </Label>+ <select+ id="language"+ value={language}+ onChange={(e) => setLanguage(e.target.value)}+ className="w-full rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring"+ >+ <option value="" disabled>+ Pick a language…+ </option>+ {/*+ * "auto" is intentionally filtered out at project+ * creation time. Auto-detect is a fine post-hoc+ * setting (Settings → Output) for users who later+ * decide they want it, but at create time we force+ * an explicit commitment so the project never starts+ * in the implicit-detect mode that was the source+ * of "wiki content showed up in a language I didn't+ * expect" surprises.+ */}+ {OUTPUT_LANGUAGE_OPTIONS.filter((l) => l.value !== "auto").map((l) => (+ <option key={l.value} value={l.value}>+ {l.label}+ </option>+ ))}+ </select>+ <p className="text-xs text-muted-foreground">+ All AI-generated content (wiki pages, chat replies, research+ output) will use this language. You can change it later in+ Settings → Output.+ </p>+ </div><div className="flex flex-col gap-2"><Label htmlFor="path">Parent Directory</Label><div className="flex gap-2">diff --git a/src/components/settings/sections/output-section.tsx b/src/components/settings/sections/output-section.tsxindex 15884b4f..10be985c 100644--- a/src/components/settings/sections/output-section.tsx+++ b/src/components/settings/sections/output-section.tsx@@ -1,36 +1,13 @@import { useTranslation } from "react-i18next"import { Label } from "@/components/ui/label"import type { SettingsDraft, DraftSetter } from "../settings-types"+import { OUTPUT_LANGUAGE_OPTIONS as LANGUAGE_OPTIONS } from "@/lib/output-language-options"interface Props {draft: SettingsDraftsetDraft: DraftSetter}-const LANGUAGE_OPTIONS = [- { value: "auto", label: "Auto (detect from input/source)" },- { value: "English", label: "English" },- { value: "Chinese", label: "简体中文 (Simplified Chinese)" },- { value: "Traditional Chinese", label: "繁體中文 (Traditional Chinese)" },- { value: "Japanese", label: "日本語 (Japanese)" },- { value: "Korean", label: "한국어 (Korean)" },- { value: "Vietnamese", label: "Tiếng Việt (Vietnamese)" },- { value: "French", label: "Français (French)" },- { value: "German", label: "Deutsch (German)" },- { value: "Spanish", label: "Español (Spanish)" },- { value: "Portuguese", label: "Português (Portuguese)" },- { value: "Italian", label: "Italiano (Italian)" },- { value: "Russian", label: "Русский (Russian)" },- { value: "Arabic", label: "العربية (Arabic)" },- { value: "Hindi", label: "हिन्दी (Hindi)" },- { value: "Turkish", label: "Türkçe (Turkish)" },- { value: "Dutch", label: "Nederlands (Dutch)" },- { value: "Polish", label: "Polski (Polish)" },- { value: "Swedish", label: "Svenska (Swedish)" },- { value: "Indonesian", label: "Bahasa Indonesia (Indonesian)" },- { value: "Thai", label: "ไทย (Thai)" },-]-const HISTORY_OPTIONS = [2, 4, 6, 8, 10, 20]export function OutputSection({ draft, setDraft }: Props) {diff --git a/src/lib/output-language-options.ts b/src/lib/output-language-options.tsnew file mode 100644index 00000000..26fa051d--- /dev/null+++ b/src/lib/output-language-options.ts@@ -0,0 +1,39 @@+/**+ * Shared list of selectable output-language values for any UI that+ * needs to ask the user "what language should the AI generate in?".+ *+ * Currently consumed by:+ * - Settings → Output: post-create change of the preference+ * - Create-Project dialog: required choice at project creation+ * time so a fresh project never starts in the implicit+ * "auto-detect from whatever text we see first" mode+ *+ * `value` strings are the exact tokens the rest of the codebase+ * compares against (`OutputLanguage` type in stores/wiki-store.ts);+ * keep them in sync. Labels mix the native script + the English+ * name so a user who can't read the native form still recognizes+ * the language.+ */+export const OUTPUT_LANGUAGE_OPTIONS = [+ { value: "auto", label: "Auto (detect from input/source)" },+ { value: "English", label: "English" },+ { value: "Chinese", label: "简体中文 (Simplified Chinese)" },+ { value: "Traditional Chinese", label: "繁體中文 (Traditional Chinese)" },+ { value: "Japanese", label: "日本語 (Japanese)" },+ { value: "Korean", label: "한국어 (Korean)" },+ { value: "Vietnamese", label: "Tiếng Việt (Vietnamese)" },+ { value: "French", label: "Français (French)" },+ { value: "German", label: "Deutsch (German)" },+ { value: "Spanish", label: "Español (Spanish)" },+ { value: "Portuguese", label: "Português (Portuguese)" },+ { value: "Italian", label: "Italiano (Italian)" },+ { value: "Russian", label: "Русский (Russian)" },+ { value: "Arabic", label: "العربية (Arabic)" },+ { value: "Hindi", label: "हिन्दी (Hindi)" },+ { value: "Turkish", label: "Türkçe (Turkish)" },+ { value: "Dutch", label: "Nederlands (Dutch)" },+ { value: "Polish", label: "Polski (Polish)" },+ { value: "Swedish", label: "Svenska (Swedish)" },+ { value: "Indonesian", label: "Bahasa Indonesia (Indonesian)" },+ { value: "Thai", label: "ไทย (Thai)" },+] as constdiff --git a/src/lib/project-store.ts b/src/lib/project-store.tsindex dfc2aa25..b6aca953 100644--- a/src/lib/project-store.ts+++ b/src/lib/project-store.ts@@ -115,6 +115,16 @@ export async function removeFromRecentProjects(const existing = (await store.get<WikiProject[]>(RECENT_PROJECTS_KEY)) ?? []const updated = existing.filter((p) => p.path !== path)await store.set(RECENT_PROJECTS_KEY, updated)+ // ALSO clear the last-project pointer if it points at the project+ // we just removed. Without this, App.tsx's startup auto-open+ // (`getLastProject()` → `openProject()` → `saveLastProject()`)+ // re-adds the removed entry back to recents on the next launch,+ // making the delete look like it didn't take. Reported by user+ // as "deleted project comes back after restart."+ const last = await store.get<WikiProject>(LAST_PROJECT_KEY)+ if (last && last.path === path) {+ await store.delete(LAST_PROJECT_KEY)+ }}const LANGUAGE_KEY = "language"