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

release: v0.6.4

nash_su03e46fc4a629
diff --git a/package-lock.json b/package-lock.json
index 587a0a2d..dc48041c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "llm-wiki",
- "version": "0.6.3",
+ "version": "0.6.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "llm-wiki",
- "version": "0.6.3",
+ "version": "0.6.4",
"dependencies": {
"@base-ui/react": "^1.3.0",
"@fontsource-variable/geist": "^5.2.8",
diff --git a/package.json b/package.json
index 5443f98e..eb1c290c 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "llm-wiki",
"private": true,
- "version": "0.6.3",
+ "version": "0.6.4",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index cc91b651..275f05db 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -4561,7 +4561,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "llm-wiki"
-version = "0.6.3"
+version = "0.6.4"
dependencies = [
"arrow-array",
"arrow-schema",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index be44b154..b5364a0d 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "llm-wiki"
-version = "0.6.3"
+version = "0.6.4"
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.json
index 94a9c87a..fb14b4b1 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.6.3",
+ "version": "0.6.4",
"identifier": "com.llmwiki.app",
"build": {
"beforeDevCommand": "npm run dev",
diff --git a/src/components/chat/chat-message.tsx b/src/components/chat/chat-message.tsx
index 1e864ec9..8be26e46 100644
--- a/src/components/chat/chat-message.tsx
+++ b/src/components/chat/chat-message.tsx
@@ -98,6 +98,7 @@ function ChatMessageImpl({
onApproveShellCommand,
onSubmitUserInput,
}: ChatMessageProps) {
+ const { t } = useTranslation()
const isUser = message.role === "user"
const isSystem = message.role === "system"
const isAssistant = message.role === "assistant"
@@ -196,9 +197,9 @@ function ChatMessageImpl({
type="button"
onClick={onRegenerate}
className="inline-flex items-center gap-1 rounded px-2 py-0.5 text-[11px] text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors"
- title="Regenerate this response"
+ title={t("chat.regenerateResponse")}
>
- <RefreshCw className="h-3 w-3" /> Regenerate
+ <RefreshCw className="h-3 w-3" /> {t("chat.regenerate")}
</button>
)}
</div>
@@ -509,6 +510,7 @@ function initialUserInputAnswers(request: ChatUserInputRequest): Record<string,
}
function CopyButton({ content }: { content: string }) {
+ const { t } = useTranslation()
const [copied, setCopied] = useState(false)
const handleCopy = useCallback(async () => {
@@ -529,15 +531,16 @@ function CopyButton({ content }: { content: string }) {
type="button"
onClick={handleCopy}
className="inline-flex items-center gap-1 rounded px-2 py-0.5 text-[11px] text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors"
- title="Copy to clipboard"
+ title={t("chat.copyToClipboard")}
>
{copied ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
- {copied ? "Copied!" : "Copy"}
+ {copied ? t("chat.copied") : t("chat.copy")}
</button>
)
}
function SaveToWikiButton({ content, visible }: { content: string; visible: boolean }) {
+ const { t } = useTranslation()
const project = useWikiStore((s) => s.project)
const [saved, setSaved] = useState(false)
const [saving, setSaving] = useState(false)
@@ -631,10 +634,10 @@ function SaveToWikiButton({ content, visible }: { content: string; visible: bool
onClick={handleSave}
disabled={saving}
className="self-start inline-flex items-center gap-1 rounded px-2 py-0.5 text-[11px] text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors"
- title="Save to wiki"
+ title={t("chat.saveToWiki")}
>
<BookmarkPlus className="h-3 w-3" />
- {saved ? "Saved!" : saving ? "Saving..." : "Save to Wiki"}
+ {saved ? t("chat.saved") : saving ? t("chat.saving") : t("chat.saveToWiki")}
</button>
)
}
@@ -1516,6 +1519,7 @@ function separateThinking(text: string): { thinking: string | null; answer: stri
/** Streaming thinking: shows latest ~5 lines rolling upward with animation */
function StreamingThinkingBlock({ content }: { content: string }) {
+ const { t } = useTranslation()
const lines = content.split("\n").filter((l) => l.trim())
const visibleLines = lines.slice(-5)
@@ -1523,8 +1527,8 @@ function StreamingThinkingBlock({ content }: { content: string }) {
<div className="rounded-md border border-dashed border-amber-500/30 bg-amber-50/50 dark:bg-amber-950/20 px-2.5 py-2">
<div className="flex items-center gap-1.5 mb-1.5">
<span className="text-sm animate-pulse">💭</span>
- <span className="text-xs font-medium text-amber-700 dark:text-amber-400">Thinking...</span>
- <span className="text-[10px] text-amber-600/50 dark:text-amber-500/40">{lines.length} lines</span>
+ <span className="text-xs font-medium text-amber-700 dark:text-amber-400">{t("chat.thinking")}</span>
+ <span className="text-[10px] text-amber-600/50 dark:text-amber-500/40">{t("chat.lineCount", { count: lines.length })}</span>
</div>
<div className="h-[5lh] overflow-hidden text-xs text-amber-800/70 dark:text-amber-300/60 font-mono leading-relaxed">
{visibleLines.map((line, i) => (
@@ -1544,6 +1548,7 @@ function StreamingThinkingBlock({ content }: { content: string }) {
/** Completed thinking: collapsed by default, click to expand */
function ThinkingBlock({ content }: { content: string }) {
+ const { t } = useTranslation()
const [expanded, setExpanded] = useState(false)
const lines = content.split("\n").filter((l) => l.trim())
@@ -1555,7 +1560,7 @@ function ThinkingBlock({ content }: { content: string }) {
className="flex w-full items-center gap-1.5 px-2.5 py-1.5 text-xs text-amber-700 dark:text-amber-400 hover:bg-amber-100/50 dark:hover:bg-amber-900/20 transition-colors"
>
<span className="text-sm">💭</span>
- <span className="font-medium">Thought for {lines.length} lines</span>
+ <span className="font-medium">{t("chat.thoughtLineCount", { count: lines.length })}</span>
<span className="text-amber-600/60 dark:text-amber-500/60">
{expanded ? "▼" : "▶"}
</span>
diff --git a/src/components/editor/frontmatter-panel.tsx b/src/components/editor/frontmatter-panel.tsx
index 6bd99f3a..75cb102e 100644
--- a/src/components/editor/frontmatter-panel.tsx
+++ b/src/components/editor/frontmatter-panel.tsx
@@ -25,6 +25,7 @@ import {
} from "@/lib/wiki-page-resolver"
import { useWikiStore } from "@/stores/wiki-store"
import { normalizePath } from "@/lib/path-utils"
+import { useTranslation } from "react-i18next"
interface FrontmatterPanelProps {
data: Record<string, FrontmatterValue>
@@ -42,6 +43,7 @@ const TOP_LEVEL_KEYS = new Set([
])
export function FrontmatterPanel({ data }: FrontmatterPanelProps) {
+ const { t } = useTranslation()
const project = useWikiStore((s) => s.project)
const projectPathIndex = useWikiStore((s) => s.projectPathIndex)
const openPathInPreview = useWikiStore((s) => s.openPathInPreview)
@@ -141,7 +143,7 @@ export function FrontmatterPanel({ data }: FrontmatterPanelProps) {
{origin && (
<div className="mx-4 mt-3 rounded border-l-2 border-primary/40 bg-primary/5 px-3 py-1.5 text-xs text-foreground/80">
- <span className="font-medium text-muted-foreground">Origin: </span>
+ <span className="font-medium text-muted-foreground">{t("editor.frontmatter.origin")}: </span>
{origin}
</div>
)}
@@ -212,7 +214,7 @@ export function FrontmatterPanel({ data }: FrontmatterPanelProps) {
{/* Extras (any other key/values we didn't surface above) ──── */}
{extras.length > 0 && (
<div className="mx-4 mt-4 rounded border border-border/40 bg-background/50 px-3 py-2 text-xs">
- <div className="mb-1 font-medium text-muted-foreground/80">More</div>
+ <div className="mb-1 font-medium text-muted-foreground/80">{t("editor.frontmatter.more")}</div>
<div className="space-y-0.5">
{extras.map(([k, v]) => (
<div key={k} className="flex gap-2">
diff --git a/src/components/error-boundary.tsx b/src/components/error-boundary.tsx
index 0abd9c21..4d20482a 100644
--- a/src/components/error-boundary.tsx
+++ b/src/components/error-boundary.tsx
@@ -1,4 +1,5 @@
import { Component, type ReactNode } from "react"
+import i18n from "@/i18n"
interface Props {
children: ReactNode
@@ -29,13 +30,13 @@ export class ErrorBoundary extends Component<Props, State> {
if (this.props.fallback) return this.props.fallback
return (
<div className="flex h-full flex-col items-center justify-center gap-3 p-6 text-sm text-muted-foreground">
- <p className="text-destructive font-medium">Something went wrong</p>
+ <p className="text-destructive font-medium">{i18n.t("errors.generic")}</p>
<p className="text-xs max-w-md text-center">{this.state.error?.message}</p>
<button
className="rounded border px-3 py-1 text-xs hover:bg-muted"
onClick={() => this.setState({ hasError: false, error: null })}
>
- Retry
+ {i18n.t("common.retry")}
</button>
</div>
)
diff --git a/src/components/graph/graph-view.tsx b/src/components/graph/graph-view.tsx
index 9158a7d9..dffa2827 100644
--- a/src/components/graph/graph-view.tsx
+++ b/src/components/graph/graph-view.tsx
@@ -1040,7 +1040,7 @@ export function GraphView() {
size="sm"
onClick={resetFilters}
className="text-xs gap-1 h-7"
- title="Reset graph filters"
+ title={t("graph.resetFilters")}
>
<RotateCcw className="h-3 w-3" />
{t("graph.reset")}
@@ -1217,7 +1217,7 @@ export function GraphView() {
minLinks: raw === "" || !Number.isFinite(value) ? undefined : Math.max(0, value),
}))
}}
- placeholder="Any"
+ placeholder={t("graph.any")}
/>
<span className="text-muted-foreground">{t("graph.minLinksHint")}</span>
</div>
@@ -1239,7 +1239,7 @@ export function GraphView() {
maxLinks: raw === "" || !Number.isFinite(value) ? undefined : Math.max(0, value),
}))
}}
- placeholder="Any"
+ placeholder={t("graph.any")}
/>
<span className="text-muted-foreground">{t("graph.maxLinksHint")}</span>
</div>
@@ -1382,7 +1382,7 @@ export function GraphView() {
size="sm"
className="h-6 text-[10px] px-1"
onClick={() => setFilters((prev) => ({ ...prev, hiddenTypes: new Set() }))}
- title="Show all types"
+ title={t("graph.showAllTypes")}
>
{t("graph.showAll")}
</Button>
@@ -1392,7 +1392,7 @@ export function GraphView() {
size="sm"
className="h-6 w-6 p-0"
onClick={() => setLegendCollapsed(!legendCollapsed)}
- title={legendCollapsed ? "Expand legend" : "Collapse legend"}
+ title={legendCollapsed ? t("graph.expandLegend") : t("graph.collapseLegend")}
>
{legendCollapsed ? "▶" : "▼"}
</Button>
@@ -1423,7 +1423,7 @@ export function GraphView() {
return { ...prev, hiddenTypes: next }
})
}}
- title="Double-click to toggle visibility"
+ title={t("graph.doubleClickToggle")}
>
<span
className="inline-block h-3 w-3 rounded-full shrink-0 shadow-sm"
diff --git a/src/components/layout/activity-panel.tsx b/src/components/layout/activity-panel.tsx
index 29156a0b..55b81e23 100644
--- a/src/components/layout/activity-panel.tsx
+++ b/src/components/layout/activity-panel.tsx
@@ -54,20 +54,20 @@ const WIKI_TYPE_ICON_KEYS: Record<string, keyof typeof FILE_TYPE_ICONS> = {
overview: "overview",
}
-function getFileTypeInfo(path: string): { icon: typeof FileText; type: string } {
+function getFileTypeInfo(path: string): { icon: typeof FileText; typeKey: string } {
const inferred = inferWikiTypeFromPath(path)
if (inferred) {
const directoryIcon = FILE_TYPE_ICONS[WIKI_TYPE_ICON_KEYS[inferred]]
- return { icon: directoryIcon ?? FileText, type: wikiTypeLabel(inferred) }
+ return { icon: directoryIcon ?? FileText, typeKey: inferred }
}
for (const [dir, icon] of Object.entries(FILE_TYPE_ICONS)) {
if (path.includes(`/${dir}/`) || path.startsWith(`wiki/${dir}/`)) {
- return { icon, type: dir.charAt(0).toUpperCase() + dir.slice(1, -1) }
+ return { icon, typeKey: dir.replace(/s$/, "") }
}
}
- if (path.includes("index.md")) return { icon: Layout, type: "Index" }
- if (path.includes("log.md")) return { icon: FileText, type: "Log" }
- return { icon: FileText, type: "File" }
+ if (path.includes("index.md")) return { icon: Layout, typeKey: "index" }
+ if (path.includes("log.md")) return { icon: FileText, typeKey: "log" }
+ return { icon: FileText, typeKey: "file" }
}
export function ActivityPanel() {
@@ -238,13 +238,13 @@ export function ActivityPanel() {
{hasFileSync && (
<div className="border-b border-border/50 px-3 py-1.5">
<div className="mb-1 flex items-center justify-between gap-2 text-[10px] text-muted-foreground">
- <span>File Sync</span>
+ <span>{t("activity.fileSync")}</span>
<button
onClick={handleFileSyncRescan}
className="rounded px-1.5 py-0.5 text-[10px] hover:bg-accent hover:text-foreground"
- title="Scan project files for external changes"
+ title={t("activity.rescanTitle")}
>
- Rescan
+ {t("activity.rescan")}
</button>
</div>
{fileSyncError && (
@@ -370,7 +370,7 @@ export function ActivityPanel() {
onClick={clearDone}
className="w-full px-3 py-1 text-center text-[10px] text-muted-foreground hover:underline"
>
- Clear completed
+ {t("activity.clearCompleted")}
</button>
)}
</div>
@@ -380,6 +380,7 @@ export function ActivityPanel() {
}
function QueueRow({ task, onRetry, onCancel }: { task: IngestTask; onRetry: (id: string) => void; onCancel: (id: string) => void }) {
+ const { t } = useTranslation()
const fileName = getFileName(task.sourcePath)
return (
@@ -404,7 +405,7 @@ function QueueRow({ task, onRetry, onCancel }: { task: IngestTask; onRetry: (id:
<button
onClick={() => onRetry(task.id)}
className="p-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground"
- title="Retry"
+ title={t("common.retry")}
>
<RotateCcw className="h-3 w-3" />
</button>
@@ -413,7 +414,7 @@ function QueueRow({ task, onRetry, onCancel }: { task: IngestTask; onRetry: (id:
<button
onClick={() => onCancel(task.id)}
className="p-0.5 rounded hover:bg-destructive/20 text-muted-foreground hover:text-destructive"
- title="Cancel"
+ title={t("common.cancel")}
>
<X className="h-3 w-3" />
</button>
@@ -425,8 +426,9 @@ function QueueRow({ task, onRetry, onCancel }: { task: IngestTask; onRetry: (id:
}
function FileSyncRow({ task, onRetry, onIgnore }: { task: FileChangeTask; onRetry: (id: string) => void; onIgnore: (id: string) => void }) {
+ const { t } = useTranslation()
const fileName = getFileName(task.path)
- const kindLabel = task.kind.charAt(0).toUpperCase() + task.kind.slice(1)
+ const kindLabel = t(`activity.changeKinds.${task.kind}`, { defaultValue: task.kind })
return (
<div className="py-1.5 text-xs">
@@ -448,14 +450,14 @@ function FileSyncRow({ task, onRetry, onIgnore }: { task: FileChangeTask; onRetr
<button
onClick={() => onRetry(task.id)}
className="rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-foreground"
- title="Retry"
+ title={t("common.retry")}
>
<RotateCcw className="h-3 w-3" />
</button>
<button
onClick={() => onIgnore(task.id)}
className="rounded p-0.5 text-muted-foreground hover:bg-destructive/20 hover:text-destructive"
- title="Ignore"
+ title={t("common.ignore")}
>
<X className="h-3 w-3" />
</button>
@@ -467,6 +469,7 @@ function FileSyncRow({ task, onRetry, onIgnore }: { task: FileChangeTask; onRetr
}
function ActivityRow({ item, onCancel }: { item: ActivityItem; onCancel?: () => void }) {
+ const { t } = useTranslation()
const openPathInPreview = useWikiStore((s) => s.openPathInPreview)
const project = useWikiStore((s) => s.project)
@@ -495,7 +498,7 @@ function ActivityRow({ item, onCancel }: { item: ActivityItem; onCancel?: () =>
<button
onClick={onCancel}
className="shrink-0 p-0.5 rounded hover:bg-destructive/20 text-muted-foreground hover:text-destructive"
- title="Cancel"
+ title={t("common.cancel")}
>
<X className="h-3 w-3" />
</button>
@@ -506,7 +509,7 @@ function ActivityRow({ item, onCancel }: { item: ActivityItem; onCancel?: () =>
{item.filesWritten.length > 0 && item.status === "done" && (
<div className="mt-1.5 ml-5 flex flex-col gap-0.5">
{item.filesWritten.map((filePath) => {
- const { icon: Icon, type } = getFileTypeInfo(filePath)
+ const { icon: Icon, typeKey } = getFileTypeInfo(filePath)
const fileName = getFileName(filePath)
return (
<button
@@ -516,7 +519,9 @@ function ActivityRow({ item, onCancel }: { item: ActivityItem; onCancel?: () =>
className="flex items-center gap-1.5 rounded px-1 py-0.5 text-left text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors"
>
<Icon className="h-3 w-3 shrink-0" />
- <span className="text-[10px] font-medium text-muted-foreground/70 w-14 shrink-0">{type}</span>
+ <span className="text-[10px] font-medium text-muted-foreground/70 w-14 shrink-0">
+ {t(`activity.fileTypes.${typeKey}`, { defaultValue: wikiTypeLabel(typeKey) })}
+ </span>
<span className="truncate">{fileName}</span>
</button>
)
diff --git a/src/components/layout/knowledge-tree.tsx b/src/components/layout/knowledge-tree.tsx
index c1df5f02..fd780b81 100644
--- a/src/components/layout/knowledge-tree.tsx
+++ b/src/components/layout/knowledge-tree.tsx
@@ -12,6 +12,7 @@ import { refreshProjectFileTree } from "@/lib/project-file-tree-refresh"
import { cascadeDeleteWikiPagesWithRefs } from "@/lib/wiki-page-delete"
import { inferWikiTypeFromPath, wikiTypeLabel } from "@/lib/wiki-page-types"
import { filterRawSourceTree } from "@/lib/source-filter"
+import { useTranslation } from "react-i18next"
interface WikiPageInfo {
path: string
@@ -39,6 +40,7 @@ function typeConfig(type: string): { icon: typeof FileText; label: string; color
}
export function KnowledgeTree() {
+ const { t } = useTranslation()
const project = useWikiStore((s) => s.project)
const selectedFile = useWikiStore((s) => s.selectedFile)
const setSelectedFile = useWikiStore((s) => s.setSelectedFile)
@@ -165,7 +167,7 @@ export function KnowledgeTree() {
{sortedGroups.length === 0 && (
<div className="px-2 py-4 text-center text-xs text-muted-foreground">
- No wiki pages yet. Import sources to get started.
+ {t("sidebar.noWikiPages")}
</div>
)}
@@ -186,7 +188,9 @@ export function KnowledgeTree() {
<ChevronRight className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
)}
<Icon className={`h-3.5 w-3.5 shrink-0 ${config.color}`} />
- <span className="flex-1 text-left font-medium">{config.label}</span>
+ <span className="flex-1 text-left font-medium">
+ {t(`sidebar.typeLabels.${type}`, { defaultValue: config.label })}
+ </span>
<span className="text-xs text-muted-foreground">{items.length}</span>
</button>
@@ -246,6 +250,7 @@ export function KnowledgeTree() {
}
function RawSourcesSection() {
+ const { t } = useTranslation()
const project = useWikiStore((s) => s.project)
const openPathInPreview = useWikiStore((s) => s.openPathInPreview)
const selectedFile = useWikiStore((s) => s.selectedFile)
@@ -274,7 +279,7 @@ function RawSourcesSection() {
<ChevronRight className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
)}
<BookOpen className="h-3.5 w-3.5 shrink-0 text-amber-600" />
- <span className="flex-1 text-left font-medium text-muted-foreground">Raw Sources</span>
+ <span className="flex-1 text-left font-medium text-muted-foreground">{t("sidebar.rawSources")}</span>
<span className="text-xs text-muted-foreground">{sources.length}</span>
</button>
{expanded && (
diff --git a/src/components/layout/research-panel.tsx b/src/components/layout/research-panel.tsx
index 5849b0ed..4285a12a 100644
--- a/src/components/layout/research-panel.tsx
+++ b/src/components/layout/research-panel.tsx
@@ -123,6 +123,7 @@ function separateThinking(text: string): { thinking: string; answer: string } {
}
function SynthesisBlock({ synthesis, isStreaming }: { synthesis: string; isStreaming: boolean }) {
+ const { t } = useTranslation()
const scrollRef = useRef<HTMLDivElement>(null)
const { thinking, answer } = useMemo(() => separateThinking(synthesis), [synthesis])
const renderLanguage = useMemo(() => detectLanguage(answer || synthesis), [answer, synthesis])
@@ -146,7 +147,7 @@ function SynthesisBlock({ synthesis, isStreaming }: { synthesis: string; isStrea
return (
<div className="mb-2 flex flex-col min-h-0">
- <div className="mb-1 font-medium text-muted-foreground">Synthesis</div>
+ <div className="mb-1 font-medium text-muted-foreground">{t("research.synthesis")}</div>
<div
ref={scrollRef}
className="flex-1 overflow-y-auto rounded bg-muted/30 p-2 prose prose-xs prose-invert max-w-none"
@@ -165,7 +166,7 @@ function SynthesisBlock({ synthesis, isStreaming }: { synthesis: string; isStrea
) : (
<ChevronDown className="h-3 w-3" />
)}
- Thinking{isStreaming && !answer ? "..." : ""}
+ {t("research.thinking")}{isStreaming && !answer ? "..." : ""}
</button>
{!thinkingCollapsed && (
<div className="mt-1 rounded border border-muted px-2 py-1 text-[10px] text-muted-foreground opacity-70 leading-relaxed whitespace-pre-wrap">
diff --git a/src/components/mermaid-diagram.tsx b/src/components/mermaid-diagram.tsx
index 339fff51..02b348b5 100644
--- a/src/components/mermaid-diagram.tsx
+++ b/src/components/mermaid-diagram.tsx
@@ -1,5 +1,6 @@
import { Children, isValidElement, useEffect, useRef, useState, type ReactNode } from "react"
import { AlertTriangle, X, ZoomIn } from "lucide-react"
+import { useTranslation } from "react-i18next"
interface MermaidDiagramProps {
code: string
@@ -8,6 +9,7 @@ interface MermaidDiagramProps {
const svgCache = new Map<string, string>()
export function MermaidDiagram({ code }: MermaidDiagramProps) {
+ const { t } = useTranslation()
const containerRef = useRef<HTMLDivElement>(null)
const [error, setError] = useState<string | null>(null)
const [svg, setSvg] = useState<string | null>(() => svgCache.get(code) ?? null)
@@ -119,11 +121,11 @@ export function MermaidDiagram({ code }: MermaidDiagramProps) {
<div className="flex items-start gap-2">
<AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />
<div className="min-w-0 flex-1">
- <p className="font-medium">Mermaid diagram could not be rendered</p>
+ <p className="font-medium">{t("mermaid.renderFailed")}</p>
<p className="mt-0.5 line-clamp-2 text-destructive/80">{summary}</p>
<details className="mt-1">
<summary className="cursor-pointer select-none text-[11px] text-destructive/70 hover:text-destructive">
- Show parser details
+ {t("mermaid.showDetails")}
</summary>
<pre className="mt-1 max-h-40 overflow-auto whitespace-pre-wrap rounded bg-background/70 p-2 text-[11px] text-muted-foreground">
{error}
@@ -148,7 +150,7 @@ export function MermaidDiagram({ code }: MermaidDiagramProps) {
type="button"
onClick={() => setExpanded(true)}
className="absolute top-2 right-2 z-10 rounded-md bg-background/80 px-1.5 py-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover/diagram:opacity-100"
- title="Enlarge diagram"
+ title={t("mermaid.enlarge")}
>
<ZoomIn className="h-4 w-4" />
</button>
@@ -160,11 +162,11 @@ export function MermaidDiagram({ code }: MermaidDiagramProps) {
</>
) : visible ? (
<div className="flex items-center justify-center h-full p-4">
- <span className="text-xs text-muted-foreground animate-pulse">Rendering diagram...</span>
+ <span className="text-xs text-muted-foreground animate-pulse">{t("mermaid.rendering")}</span>
</div>
) : (
<div className="flex items-center justify-center h-full p-4">
- <span className="text-xs text-muted-foreground/50">Diagram</span>
+ <span className="text-xs text-muted-foreground/50">{t("mermaid.diagram")}</span>
</div>
)}
</div>
diff --git a/src/components/review/review-view.tsx b/src/components/review/review-view.tsx
index ded61ce4..98420b9c 100644
--- a/src/components/review/review-view.tsx
+++ b/src/components/review/review-view.tsx
@@ -24,12 +24,12 @@ import { createReviewPageDrafts } from "@/lib/review-create-page"
import { cleanAssistantContentForWikiSave, titleFromCleanAssistantContent } from "@/lib/chat-save-to-wiki"
import { useTranslation } from "react-i18next"
-const typeConfig: Record<ReviewItem["type"], { icon: typeof AlertTriangle; label: string; color: string }> = {
- contradiction: { icon: AlertTriangle, label: "Contradiction", color: "text-amber-500" },
- duplicate: { icon: Copy, label: "Possible Duplicate", color: "text-blue-500" },
- "missing-page": { icon: FileQuestion, label: "Missing Page", color: "text-purple-500" },
- confirm: { icon: MessageSquare, label: "Needs Confirmation", color: "text-foreground" },
- suggestion: { icon: Lightbulb, label: "Suggestion", color: "text-emerald-500" },
+const typeConfig: Record<ReviewItem["type"], { icon: typeof AlertTriangle; color: string }> = {
+ contradiction: { icon: AlertTriangle, color: "text-amber-500" },
+ duplicate: { icon: Copy, color: "text-blue-500" },
+ "missing-page": { icon: FileQuestion, color: "text-purple-500" },
+ confirm: { icon: MessageSquare, color: "text-foreground" },
+ suggestion: { icon: Lightbulb, color: "text-emerald-500" },
}
export function ReviewView() {
@@ -462,7 +462,7 @@ function ReviewCard({
{item.affectedPages && item.affectedPages.length > 0 && (
<div className="mb-3 text-xs text-muted-foreground">
- Pages: {item.affectedPages.join(", ")}
+ {t("review.affectedPages")}: {item.affectedPages.join(", ")}
</div>
)}
diff --git a/src/components/search/search-view.tsx b/src/components/search/search-view.tsx
index 9f3795c3..d049aece 100644
--- a/src/components/search/search-view.tsx
+++ b/src/components/search/search-view.tsx
@@ -192,7 +192,7 @@ export function SearchView() {
if (isImeComposing(e)) return
if (e.key === "Enter") doSearch(query)
}}
- placeholder={t("search.placeholder") + " (Enter to search)"}
+ placeholder={t("search.placeholderWithShortcut")}
autoFocus
className="w-full rounded-md border bg-background py-2 pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
/>
@@ -208,12 +208,12 @@ export function SearchView() {
*/}
{searching ? (
<div className="flex-1 p-4 text-center text-sm text-muted-foreground">
- Searching...
+ {t("search.searching")}
</div>
) : !hasSearched ? (
<div className="flex flex-1 flex-col items-center justify-center gap-2 p-8 text-center text-sm text-muted-foreground">
<Search className="h-8 w-8 text-muted-foreground/30" />
- <p>Press Enter to search</p>
+ <p>{t("search.pressEnter")}</p>
</div>
) : results.length === 0 ? (
<div className="flex-1 p-4 text-center text-sm text-muted-foreground">
@@ -222,12 +222,12 @@ export function SearchView() {
) : (
<div className="flex min-h-0 flex-1 flex-col">
<div className="shrink-0 px-3 pt-3 pb-1 text-xs text-muted-foreground">
- {results.length} page{results.length !== 1 ? "s" : ""}
+ {t("search.pageCount", { count: results.length })}
{imageHits.length > 0 && (
<>
{" · "}
- {matchingImages.length} image{matchingImages.length !== 1 ? "s" : ""} match
- {supportingImages.length > 0 && ` · +${supportingImages.length} from matched pages`}
+ {t("search.imageMatchCount", { count: matchingImages.length })}
+ {supportingImages.length > 0 && ` · ${t("search.supportingImageCount", { count: supportingImages.length })}`}
</>
)}
</div>
@@ -238,7 +238,7 @@ export function SearchView() {
<div className="shrink-0 px-3 pt-1">
<SectionHeader
icon={<ImageIcon className="h-3.5 w-3.5" />}
- label="Images"
+ label={t("search.images")}
count={visibleImages.length}
trailing={
supportingImages.length > 0 ? (
@@ -248,8 +248,8 @@ export function SearchView() {
className="text-[11px] text-muted-foreground hover:text-foreground underline-offset-2 hover:underline"
>
{showSupportingImages
- ? "Hide supporting"
- : `Show all (+${supportingImages.length})`}
+ ? t("search.hideSupporting")
+ : t("search.showAllSupporting", { count: supportingImages.length })}
</button>
) : null
}
@@ -285,7 +285,7 @@ export function SearchView() {
<div className="shrink-0 px-3 pt-1">
<SectionHeader
icon={<FileText className="h-3.5 w-3.5" />}
- label="Pages"
+ label={t("search.pages")}
count={results.length}
/>
</div>
@@ -330,6 +330,7 @@ function Lightbox({
onClose: () => void
onJumpToSource: () => void
}) {
+ const { t } = useTranslation()
// Escape-to-close. Body-scroll-lock while open: a long search-
// results list scrolling underneath the modal is disorienting.
useEffect(() => {
@@ -366,16 +367,16 @@ function Lightbox({
{hit.alt ? (
<div className="line-clamp-3 text-sm leading-snug">{hit.alt}</div>
) : (
- <div className="text-sm italic text-muted-foreground">No caption</div>
+ <div className="text-sm italic text-muted-foreground">{t("search.noCaption")}</div>
)}
<div className="mt-1 truncate text-[11px] text-muted-foreground">
- From: {hit.sourceTitle}
+ {t("search.fromSource", { source: hit.sourceTitle })}
</div>
</div>
<button
type="button"
onClick={onClose}
- aria-label="Close"
+ aria-label={t("common.close")}
className="shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground"
>
<X className="h-4 w-4" />
@@ -401,7 +402,7 @@ function Lightbox({
className="inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90"
>
<ArrowUpRight className="h-3.5 w-3.5" />
- Jump to source document
+ {t("search.jumpToSource")}
</button>
</div>
</div>
@@ -441,6 +442,7 @@ function ImageHitCard({
query: string
onClick: () => void
}) {
+ const { t } = useTranslation()
const project = useWikiStore((s) => s.project)
const projectPath = project?.path ?? null
// Same resolver the markdown preview uses — handles absolute
@@ -488,7 +490,7 @@ function ImageHitCard({
<HighlightedText text={hit.alt} query={query} />
</div>
) : (
- <div className="text-[11px] italic text-muted-foreground">No caption</div>
+ <div className="text-[11px] italic text-muted-foreground">{t("search.noCaption")}</div>
)}
<div className="mt-auto truncate text-[10px] text-muted-foreground">
{hit.sourceTitle}
diff --git a/src/components/settings/sections/llm-provider-section.tsx b/src/components/settings/sections/llm-provider-section.tsx
index b68ec3eb..390dbfd8 100644
--- a/src/components/settings/sections/llm-provider-section.tsx
+++ b/src/components/settings/sections/llm-provider-section.tsx
@@ -723,6 +723,7 @@ interface DetectResult {
* already tailors the hint (macOS quarantine, missing binary, etc).
*/
function ClaudeCliStatusPill() {
+ const { t } = useTranslation()
const [state, setState] = useState<"loading" | "ok" | "err">("loading")
const [result, setResult] = useState<DetectResult | null>(null)
@@ -750,14 +751,14 @@ function ClaudeCliStatusPill() {
return (
<div className="space-y-1.5">
<div className="flex items-center gap-2">
- <Label className="m-0">CLI status</Label>
+ <Label className="m-0">{t("settings.sections.llm.cliStatus")}</Label>
<button
type="button"
onClick={() => void detect()}
className="rounded border border-border px-2 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground"
disabled={state === "loading"}
>
- {state === "loading" ? "Checking…" : "Re-check"}
+ {state === "loading" ? t("settings.sections.llm.checkingCli") : t("settings.sections.llm.recheckCli")}
</button>
</div>
<div
@@ -773,12 +774,11 @@ function ClaudeCliStatusPill() {
{state === "ok" && <CheckCircle2 className="mt-0.5 h-3.5 w-3.5 shrink-0" />}
{state === "err" && <XCircle className="mt-0.5 h-3.5 w-3.5 shrink-0" />}
<div className="min-w-0 flex-1 space-y-0.5">
- {state === "loading" && <div>Detecting local claude binary…</div>}
+ {state === "loading" && <div>{t("settings.sections.llm.detectingCli", { name: "Claude" })}</div>}
{state === "ok" && (
<>
<div>
- Detected{result?.version ? ` ${result.version}` : ""}. Ready to use your local
- subscription — no API key needed.
+ {t("settings.sections.llm.cliDetected", { version: result?.version ? ` ${result.version}` : "", login: t("settings.sections.llm.claudeSubscription") })}
</div>
{result?.path && (
<div className="truncate font-mono text-[10px] text-muted-foreground">
@@ -791,23 +791,23 @@ function ClaudeCliStatusPill() {
the resulting "Unauthenticated" exit-1 as a LLM
Wiki bug. */}
<div className="text-muted-foreground">
- If chat fails with an authentication error, run{" "}
+ {t("settings.sections.llm.cliAuthBefore")}{" "}
<code className="rounded bg-background/60 px-1 py-0.5 font-mono text-[10px]">
claude
</code>{" "}
- in a terminal to refresh the OAuth login.
+ {" "}{t("settings.sections.llm.cliAuthAfter")}
</div>
</>
)}
{state === "err" && (
<>
- <div>{result?.error ?? "claude CLI not available."}</div>
+ <div>{result?.error ?? t("settings.sections.llm.cliUnavailable", { name: "Claude" })}</div>
<div className="text-muted-foreground">
- Install from{" "}
+ {t("settings.sections.llm.cliInstallBefore")}{" "}
<code className="rounded bg-background/60 px-1 py-0.5 font-mono text-[10px]">
npm i -g @anthropic-ai/claude-code
</code>{" "}
- then re-check.
+ {" "}{t("settings.sections.llm.cliInstallAfter")}
</div>
</>
)}
@@ -818,6 +818,7 @@ function ClaudeCliStatusPill() {
}
function CodexCliStatusPill() {
+ const { t } = useTranslation()
const [state, setState] = useState<"loading" | "ok" | "err">("loading")
const [result, setResult] = useState<DetectResult | null>(null)
@@ -845,14 +846,14 @@ function CodexCliStatusPill() {
return (
<div className="space-y-1.5">
<div className="flex items-center gap-2">
- <Label className="m-0">CLI status</Label>
+ <Label className="m-0">{t("settings.sections.llm.cliStatus")}</Label>
<button
type="button"
onClick={() => void detect()}
className="rounded border border-border px-2 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground"
disabled={state === "loading"}
>
- {state === "loading" ? "Checking…" : "Re-check"}
+ {state === "loading" ? t("settings.sections.llm.checkingCli") : t("settings.sections.llm.recheckCli")}
</button>
</div>
<div
@@ -868,12 +869,11 @@ function CodexCliStatusPill() {
{state === "ok" && <CheckCircle2 className="mt-0.5 h-3.5 w-3.5 shrink-0" />}
{state === "err" && <XCircle className="mt-0.5 h-3.5 w-3.5 shrink-0" />}
<div className="min-w-0 flex-1 space-y-0.5">
- {state === "loading" && <div>Detecting local codex binary…</div>}
+ {state === "loading" && <div>{t("settings.sections.llm.detectingCli", { name: "Codex" })}</div>}
{state === "ok" && (
<>
<div>
- Detected{result?.version ? ` ${result.version}` : ""}. Ready to use your local
- Codex login — no API key needed.
+ {t("settings.sections.llm.cliDetected", { version: result?.version ? ` ${result.version}` : "", login: t("settings.sections.llm.codexLogin") })}
</div>
{result?.path && (
<div className="truncate font-mono text-[10px] text-muted-foreground">
@@ -881,23 +881,23 @@ function CodexCliStatusPill() {
</div>
)}
<div className="text-muted-foreground">
- If chat fails with an authentication error, run{" "}
+ {t("settings.sections.llm.cliAuthBefore")}{" "}
<code className="rounded bg-background/60 px-1 py-0.5 font-mono text-[10px]">
codex
</code>{" "}
- in a terminal to refresh the login.
+ {" "}{t("settings.sections.llm.cliAuthAfter")}
</div>
</>
)}
{state === "err" && (
<>
- <div>{result?.error ?? "codex CLI not available."}</div>
+ <div>{result?.error ?? t("settings.sections.llm.cliUnavailable", { name: "Codex" })}</div>
<div className="text-muted-foreground">
- Install from{" "}
+ {t("settings.sections.llm.cliInstallBefore")}{" "}
<code className="rounded bg-background/60 px-1 py-0.5 font-mono text-[10px]">
npm install -g @openai/codex
</code>{" "}
- then re-check.
+ {" "}{t("settings.sections.llm.cliInstallAfter")}
</div>
</>
)}
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
index 014f5aa3..8c4fad5a 100644
--- a/src/components/ui/dialog.tsx
+++ b/src/components/ui/dialog.tsx
@@ -1,6 +1,7 @@
"use client"
import * as React from "react"
+import i18n from "@/i18n"
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
import { cn } from "@/lib/utils"
@@ -72,7 +73,7 @@ function DialogContent({
>
<XIcon
/>
- <span className="sr-only">Close</span>
+ <span className="sr-only">{i18n.t("common.close")}</span>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Popup>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 7c8c8100..88af5749 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -3,6 +3,19 @@
"title": "LLM Wiki",
"subtitle": "Build and maintain your personal knowledge base with LLMs"
},
+ "common": {
+ "retry": "Retry", "cancel": "Cancel", "ignore": "Ignore", "close": "Close",
+ "dismiss": "Dismiss", "loading": "Loading...", "optional": "optional"
+ },
+ "layout": { "showSidebar": "Show sidebar", "hideSidebar": "Hide sidebar" },
+ "errors": { "generic": "Something went wrong" },
+ "mermaid": {
+ "renderFailed": "Mermaid diagram could not be rendered",
+ "showDetails": "Show parser details",
+ "enlarge": "Enlarge diagram",
+ "rendering": "Rendering diagram...",
+ "diagram": "Diagram"
+ },
"nav": {
"chat": "Chat",
"wiki": "Wiki",
@@ -29,7 +42,15 @@
},
"sidebar": {
"knowledge": "Knowledge",
- "files": "Files"
+ "files": "Files",
+ "rawSources": "Raw Sources",
+ "noWikiPages": "No wiki pages yet. Import sources to get started.",
+ "typeLabels": {
+ "overview": "Overview", "entity": "Entities", "concept": "Concepts",
+ "source": "Sources", "synthesis": "Synthesis", "finding": "Findings",
+ "thesis": "Theses", "methodology": "Methodologies",
+ "comparison": "Comparisons", "query": "Queries"
+ }
},
"editor": {
"edit": "Edit",
@@ -70,6 +91,7 @@
"createFailed": "The missing page could not be created.",
"emptyDraftError": "The model returned an empty draft."
},
+ "frontmatter": { "origin": "Origin", "more": "More" },
"rawMarkdownEditor": "Raw Markdown editor"
},
"research": {
@@ -82,6 +104,8 @@
"sourcesCount": "Sources ({{count}})",
"anyTxtSource": "AnyTXT source",
"webSource": "Web source",
+ "synthesis": "Synthesis",
+ "thinking": "Thinking",
"open": "Open",
"remove": "Remove",
"status": {
@@ -196,6 +220,16 @@
"saveToWiki": "Save to Wiki",
"saving": "Saving...",
"saved": "Saved!",
+ "regenerate": "Regenerate",
+ "regenerateResponse": "Regenerate this response",
+ "copy": "Copy",
+ "copied": "Copied!",
+ "copyToClipboard": "Copy to clipboard",
+ "thinking": "Thinking...",
+ "lineCount": "{{count}} line",
+ "lineCount_other": "{{count}} lines",
+ "thoughtLineCount": "Thought for {{count}} line",
+ "thoughtLineCount_other": "Thought for {{count}} lines",
"writeToWiki": "Write to Wiki",
"emptyHint": "Ask a question or start an ingest to begin.",
"sources": "Sources",
@@ -249,6 +283,7 @@
"references": "References",
"generatedOutputs": "Generated outputs",
"generatedOutput": "Output",
+ "openGeneratedOutputFolder": "Open output folder",
"generatedOutputCount": "{{count}} file",
"generatedOutputCount_plural": "{{count}} files",
"closeGeneratedOutputs": "Close generated outputs",
@@ -278,6 +313,21 @@
"search": {
"title": "Search",
"placeholder": "Search wiki pages...",
+ "placeholderWithShortcut": "Search wiki pages... (Enter to search)",
+ "searching": "Searching...",
+ "pressEnter": "Press Enter to search",
+ "pageCount": "{{count}} page",
+ "pageCount_other": "{{count}} pages",
+ "imageMatchCount": "{{count}} image match",
+ "imageMatchCount_other": "{{count}} image matches",
+ "supportingImageCount": "+{{count}} from matched pages",
+ "images": "Images",
+ "pages": "Pages",
+ "hideSupporting": "Hide supporting",
+ "showAllSupporting": "Show all (+{{count}})",
+ "noCaption": "No caption",
+ "fromSource": "From: {{source}}",
+ "jumpToSource": "Jump to source document",
"noResults": "No results found",
"startSearching": "Type to search wiki pages"
},
@@ -332,6 +382,7 @@
"selectedCount": "{{count}} selected",
"markSelectedResolved": "Mark selected resolved",
"dismissSelected": "Dismiss selected",
+ "affectedPages": "Pages",
"allClear": "All clear — nothing to review",
"resolvedDivider": "— Resolved —"
},
@@ -436,6 +487,20 @@
"codexCliTimeout": "Codex CLI timeout",
"codexCliTimeoutUnit": "minutes",
"codexCliTimeoutHint": "Overall timeout for one Codex CLI request. Raise this for long PDF ingest or slower local/network sessions.",
+ "requestTimeout": "Request timeout (minutes)",
+ "requestTimeoutHint": "Increase this for slow local CPU models. The default is 30 minutes.",
+ "cliStatus": "CLI status",
+ "checkingCli": "Checking…",
+ "recheckCli": "Re-check",
+ "detectingCli": "Detecting local {{name}} binary…",
+ "cliDetected": "Detected{{version}}. Ready to use your local {{login}} — no API key needed.",
+ "claudeSubscription": "subscription",
+ "codexLogin": "Codex login",
+ "cliAuthBefore": "If chat fails with an authentication error, run",
+ "cliAuthAfter": "in a terminal to refresh the login.",
+ "cliUnavailable": "{{name}} CLI not available.",
+ "cliInstallBefore": "Install with",
+ "cliInstallAfter": "then re-check.",
"testConnection": "Test connection",
"testFunction": "Test function",
"testingConnection": "Testing connection…",
@@ -749,6 +814,8 @@
"delete": "Delete",
"queueTitle": "In-progress merges",
"queueDescription": "Tasks queued from a previous scan that haven't finished yet. Merges run one at a time.",
+ "restoredBacklog": "These merge tasks were restored from the previous session and are paused to avoid unexpected LLM usage.",
+ "resumeRestored": "Resume merges",
"notDuplicates": "Not duplicates",
"merged": "Merged",
"skipped": "Marked not duplicates"
@@ -856,10 +923,22 @@
"cancelAllTitle": "Cancel all queued and in-progress tasks",
"cancelAllConfirm": "Cancel all {{count}} queued/processing ingest tasks? Partial files from the in-progress task will be removed. Failed tasks will be kept so you can retry them.",
"retryFailed": "Retry failed",
- "retryFailedTitle": "Retry all failed ingest tasks"
+ "retryFailedTitle": "Retry all failed ingest tasks",
+ "fileSync": "File Sync",
+ "rescan": "Rescan",
+ "rescanTitle": "Scan project files for external changes",
+ "changeKinds": { "created": "Created", "modified": "Modified", "deleted": "Deleted" },
+ "fileTypes": {
+ "entity": "Entity", "concept": "Concept", "source": "Source", "query": "Query",
+ "synthesis": "Synthesis", "comparison": "Comparison", "finding": "Finding",
+ "thesis": "Thesis", "methodology": "Methodology", "overview": "Overview",
+ "index": "Index", "log": "Log", "file": "File"
+ }
},
"fileTree": {
- "noProject": "No project open"
+ "noProject": "No project open",
+ "openProjectFolder": "Open project folder",
+ "openProjectFolderFailed": "Failed to open the project folder."
},
"graph": {
"openProject": "Open a project to view the graph",
@@ -879,6 +958,12 @@
"noVisibleNodes": "No visible nodes",
"filter": "Filter",
"reset": "Reset",
+ "resetFilters": "Reset graph filters",
+ "any": "Any",
+ "showAllTypes": "Show all types",
+ "doubleClickToggle": "Double-click to toggle visibility",
+ "expandLegend": "Expand legend",
+ "collapseLegend": "Collapse legend",
"type": "Type",
"community": "Community",
"insights": "Insights",
diff --git a/src/i18n/i18n-parity.test.ts b/src/i18n/i18n-parity.test.ts
index c8ed88c3..04537cb9 100644
--- a/src/i18n/i18n-parity.test.ts
+++ b/src/i18n/i18n-parity.test.ts
@@ -13,7 +13,7 @@
import { describe, it, expect } from "vitest"
import { dirname, join } from "node:path"
import { fileURLToPath } from "node:url"
-import { readFileSync } from "node:fs"
+import { readFileSync, readdirSync } from "node:fs"
import en from "./en.json"
import zh from "./zh.json"
@@ -105,4 +105,35 @@ describe("i18n bundle parity (en.json ↔ zh.json)", () => {
check(en, "en.json")
check(zh, "zh.json")
})
+
+ it("every literal translation key used by frontend code exists", () => {
+ const srcDir = join(i18nDir, "..")
+ const sourceFiles: string[] = []
+ const visit = (directory: string) => {
+ for (const entry of readdirSync(directory, { withFileTypes: true })) {
+ const path = join(directory, entry.name)
+ if (entry.isDirectory()) visit(path)
+ else if (/\.(?:ts|tsx)$/.test(entry.name) && !entry.name.endsWith(".test.ts")) {
+ sourceFiles.push(path)
+ }
+ }
+ }
+ visit(srcDir)
+
+ const missing = new Set<string>()
+ // Dynamic keys such as `sidebar.typeLabels.${type}` cannot be proven
+ // statically and remain covered by bundle parity plus their fallback.
+ const literalKey = /(?:\bt|i18n\.t)\(\s*["']([^"']+)["']/g
+ for (const file of sourceFiles) {
+ const source = readFileSync(file, "utf8")
+ for (const match of source.matchAll(literalKey)) {
+ if (!enKeys.has(match[1])) missing.add(match[1])
+ }
+ }
+
+ expect(
+ [...missing].sort(),
+ "Literal i18n keys used by frontend code but missing from the bundles",
+ ).toEqual([])
+ })
})
diff --git a/src/i18n/zh.json b/src/i18n/zh.json
index d8364535..0ea3a662 100644
--- a/src/i18n/zh.json
+++ b/src/i18n/zh.json
@@ -3,6 +3,19 @@
"title": "LLM Wiki",
"subtitle": "用 LLM 构建和维护你的个人知识库"
},
+ "common": {
+ "retry": "重试", "cancel": "取消", "ignore": "忽略", "close": "关闭",
+ "dismiss": "关闭", "loading": "加载中……", "optional": "可选"
+ },
+ "layout": { "showSidebar": "展开侧栏", "hideSidebar": "收起侧栏" },
+ "errors": { "generic": "出现错误" },
+ "mermaid": {
+ "renderFailed": "无法渲染 Mermaid 图表",
+ "showDetails": "查看解析器详情",
+ "enlarge": "放大图表",
+ "rendering": "正在渲染图表……",
+ "diagram": "图表"
+ },
"nav": {
"chat": "对话",
"wiki": "Wiki",
@@ -29,7 +42,15 @@
},
"sidebar": {
"knowledge": "知识库",
- "files": "文件"
+ "files": "文件",
+ "rawSources": "原始资料",
+ "noWikiPages": "暂无 Wiki 页面,请先导入原始资料。",
+ "typeLabels": {
+ "overview": "概览", "entity": "实体", "concept": "概念",
+ "source": "来源", "synthesis": "综合", "finding": "发现",
+ "thesis": "论点", "methodology": "方法论",
+ "comparison": "比较", "query": "查询"
+ }
},
"editor": {
"edit": "编辑",
@@ -70,6 +91,7 @@
"createFailed": "无法创建缺失页面。",
"emptyDraftError": "模型返回了空白草稿。"
},
+ "frontmatter": { "origin": "来源", "more": "更多" },
"rawMarkdownEditor": "Markdown 源码编辑器"
},
"research": {
@@ -82,6 +104,8 @@
"sourcesCount": "来源({{count}})",
"anyTxtSource": "AnyTXT 来源",
"webSource": "网页来源",
+ "synthesis": "综合结果",
+ "thinking": "思考中",
"open": "打开",
"remove": "移除",
"status": {
@@ -196,6 +220,16 @@
"saveToWiki": "保存到 Wiki",
"saving": "保存中...",
"saved": "已保存!",
+ "regenerate": "重新生成",
+ "regenerateResponse": "重新生成此回复",
+ "copy": "复制",
+ "copied": "已复制!",
+ "copyToClipboard": "复制到剪贴板",
+ "thinking": "思考中……",
+ "lineCount": "{{count}} 行",
+ "lineCount_other": "{{count}} 行",
+ "thoughtLineCount": "思考过程共 {{count}} 行",
+ "thoughtLineCount_other": "思考过程共 {{count}} 行",
"writeToWiki": "写入 Wiki",
"emptyHint": "提问或开始提取资料。",
"sources": "来源",
@@ -249,6 +283,7 @@
"references": "引用",
"generatedOutputs": "生成物",
"generatedOutput": "生成",
+ "openGeneratedOutputFolder": "打开生成物目录",
"generatedOutputCount": "{{count}} 个文件",
"generatedOutputCount_plural": "{{count}} 个文件",
"closeGeneratedOutputs": "关闭生成物列表",
@@ -278,6 +313,21 @@
"search": {
"title": "搜索",
"placeholder": "搜索 Wiki 页面...",
+ "placeholderWithShortcut": "搜索 Wiki 页面……(按 Enter 搜索)",
+ "searching": "正在搜索……",
+ "pressEnter": "按 Enter 开始搜索",
+ "pageCount": "{{count}} 个页面",
+ "pageCount_other": "{{count}} 个页面",
+ "imageMatchCount": "{{count}} 个图片匹配",
+ "imageMatchCount_other": "{{count}} 个图片匹配",
+ "supportingImageCount": "匹配页面中的另外 {{count}} 张图片",
+ "images": "图片",
+ "pages": "页面",
+ "hideSupporting": "隐藏补充图片",
+ "showAllSupporting": "显示全部(+{{count}})",
+ "noCaption": "无图片说明",
+ "fromSource": "来源:{{source}}",
+ "jumpToSource": "跳转到来源文档",
"noResults": "未找到相关结果",
"startSearching": "输入关键词搜索 Wiki 页面"
},
@@ -332,6 +382,7 @@
"selectedCount": "已选择 {{count}} 项",
"markSelectedResolved": "标记为已解决",
"dismissSelected": "忽略选中项",
+ "affectedPages": "相关页面",
"allClear": "一切正常,无需审阅",
"resolvedDivider": "— 已解决 —"
},
@@ -436,6 +487,20 @@
"codexCliTimeout": "Codex CLI 超时时间",
"codexCliTimeoutUnit": "分钟",
"codexCliTimeoutHint": "单次 Codex CLI 请求的总超时时间。长 PDF 摄取或较慢的本地 / 网络会话可适当调大。",
+ "requestTimeout": "请求超时时间(分钟)",
+ "requestTimeoutHint": "本地 CPU 模型响应较慢时可适当调高,默认 30 分钟。",
+ "cliStatus": "CLI 状态",
+ "checkingCli": "正在检查……",
+ "recheckCli": "重新检查",
+ "detectingCli": "正在检测本地 {{name}} 程序……",
+ "cliDetected": "已检测到{{version}},可以使用本地{{login}},无需 API Key。",
+ "claudeSubscription": "订阅账户",
+ "codexLogin": "Codex 登录",
+ "cliAuthBefore": "如果聊天提示认证失败,请在终端运行",
+ "cliAuthAfter": "以刷新登录状态。",
+ "cliUnavailable": "无法使用 {{name}} CLI。",
+ "cliInstallBefore": "请运行",
+ "cliInstallAfter": "完成安装后重新检查。",
"testConnection": "测试连接",
"testFunction": "测试功能",
"testingConnection": "正在测试连接…",
@@ -749,6 +814,8 @@
"delete": "删除",
"queueTitle": "进行中的合并",
"queueDescription": "上次扫描后排进队列、还未跑完的合并任务。每次只跑一个。",
+ "restoredBacklog": "这些合并任务由上次会话恢复,当前已暂停,以免意外消耗 LLM 配额。",
+ "resumeRestored": "继续合并",
"notDuplicates": "不是重复",
"merged": "已合并",
"skipped": "已标记为不重复"
@@ -856,10 +923,22 @@
"cancelAllTitle": "取消所有排队和正在处理的任务",
"cancelAllConfirm": "要取消全部 {{count}} 个排队/处理中摄取任务吗?正在处理任务产生的部分文件会被移除;失败任务会保留,之后仍可重试。",
"retryFailed": "重试失败项",
- "retryFailedTitle": "重试所有失败的摄取任务"
+ "retryFailedTitle": "重试所有失败的摄取任务",
+ "fileSync": "文件同步",
+ "rescan": "重新扫描",
+ "rescanTitle": "扫描项目文件的外部变更",
+ "changeKinds": { "created": "已创建", "modified": "已修改", "deleted": "已删除" },
+ "fileTypes": {
+ "entity": "实体", "concept": "概念", "source": "来源", "query": "查询",
+ "synthesis": "综合", "comparison": "比较", "finding": "发现",
+ "thesis": "论点", "methodology": "方法论", "overview": "概览",
+ "index": "索引", "log": "日志", "file": "文件"
+ }
},
"fileTree": {
- "noProject": "未打开项目"
+ "noProject": "未打开项目",
+ "openProjectFolder": "打开项目目录",
+ "openProjectFolderFailed": "无法打开项目目录。"
},
"graph": {
"openProject": "打开项目以查看关系图",
@@ -879,6 +958,12 @@
"noVisibleNodes": "没有可见节点",
"filter": "过滤器",
"reset": "重置",
+ "resetFilters": "重置图谱筛选条件",
+ "any": "不限",
+ "showAllTypes": "显示全部类型",
+ "doubleClickToggle": "双击切换可见性",
+ "expandLegend": "展开图例",
+ "collapseLegend": "收起图例",
"type": "类型",
"community": "社区",
"insights": "洞察",
diff --git a/src/lib/changelog.ts b/src/lib/changelog.ts
index 97adf961..43943848 100644
--- a/src/lib/changelog.ts
+++ b/src/lib/changelog.ts
@@ -25,6 +25,34 @@ export interface ChangelogEntry {
}
export const CHANGELOG: ChangelogEntry[] = [
+ {
+ version: "0.6.4",
+ date: "2026-07-16",
+ highlights: {
+ en: [
+ "Added EPUB and MOBI source support so ebooks can be imported, previewed, and ingested into a project.",
+ "Added support for the official local MinerU API, including configurable service endpoints and Pipeline mode.",
+ "Added ZIP-based project export and import for migrating wiki content, source files, and project state.",
+ "Added deterministic wiki index rebuilding from the pages currently stored in the project.",
+ "Added configurable LLM request timeouts for long-running cloud models and local services.",
+ "Expanded Firecrawl configuration with API key authentication and custom service URLs.",
+ "Added a persistent collapsible knowledge sidebar that preserves more space for the active workspace.",
+ "Added Czech as an AI output language option.",
+ "Improved existing features and fixed bugs across document import, frontmatter handling, source links, knowledge graphs, missing-page checks, and cross-platform compatibility.",
+ ],
+ zh: [
+ "新增 EPUB 和 MOBI 原始资料支持,电子书可直接导入、预览并摄取到项目中。",
+ "新增官方 Local MinerU API 支持,可配置服务地址并使用 Pipeline 模式。",
+ "新增 ZIP 项目导出与导入功能,可迁移 Wiki 内容、原始资料和项目状态。",
+ "新增 Wiki 索引重建功能,可根据项目中现有页面确定性生成索引。",
+ "新增 LLM 请求超时时间设置,适配耗时较长的云端模型和本地服务。",
+ "扩展 Firecrawl 配置,支持 API Key 鉴权和自定义服务地址。",
+ "新增可持久保存状态的知识库侧栏折叠功能,为当前工作区释放更多空间。",
+ "新增捷克语 AI 输出语言选项。",
+ "优化现有功能并修复文档导入、Frontmatter、来源链接、知识图谱、缺失页面检查和跨平台兼容等问题。",
+ ],
+ },
+ },
{
version: "0.6.1",
date: "2026-07-10",