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.4.18 close behavior fixes

nash_sua5ee5ec3c7cc
diff --git a/mcp-server/package-lock.json b/mcp-server/package-lock.json
index 5a539cd1..7dfc48bd 100644
--- a/mcp-server/package-lock.json
+++ b/mcp-server/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "llm-wiki-mcp-server",
- "version": "0.4.17",
+ "version": "0.4.18",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "llm-wiki-mcp-server",
- "version": "0.4.17",
+ "version": "0.4.18",
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0"
diff --git a/mcp-server/package.json b/mcp-server/package.json
index 362110f7..29fe5695 100644
--- a/mcp-server/package.json
+++ b/mcp-server/package.json
@@ -1,6 +1,6 @@
{
"name": "llm-wiki-mcp-server",
- "version": "0.4.17",
+ "version": "0.4.18",
"description": "MCP server for LLM Wiki local API",
"type": "module",
"main": "dist/src/index.js",
diff --git a/mcp-server/src/index.ts b/mcp-server/src/index.ts
index 4b636f5d..16105d24 100644
--- a/mcp-server/src/index.ts
+++ b/mcp-server/src/index.ts
@@ -9,7 +9,7 @@ import {
} from "@modelcontextprotocol/sdk/types.js"
import { LlmWikiApiClient, type ApiFileNode, type ApiGraphNode, type ApiSearchResult } from "./api-client.js"
-const VERSION = "0.4.17"
+const VERSION = "0.4.18"
const DEFAULT_PROJECT_ID = "current"
const MAX_TEXT_BYTES = 120_000
diff --git a/package-lock.json b/package-lock.json
index 96bbe131..93785de6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "llm-wiki",
- "version": "0.4.17",
+ "version": "0.4.18",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "llm-wiki",
- "version": "0.4.17",
+ "version": "0.4.18",
"dependencies": {
"@base-ui/react": "^1.3.0",
"@fontsource-variable/geist": "^5.2.8",
diff --git a/package.json b/package.json
index bef42126..cd5eb0c2 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "llm-wiki",
"private": true,
- "version": "0.4.17",
+ "version": "0.4.18",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 6261edec..cc2076c1 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -4461,7 +4461,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "llm-wiki"
-version = "0.4.17"
+version = "0.4.18"
dependencies = [
"arrow-array",
"arrow-schema",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 523f9941..9af06e03 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "llm-wiki"
-version = "0.4.17"
+version = "0.4.18"
description = "LLM Wiki - A personal knowledge base for LLM concepts"
authors = []
edition = "2021"
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 5a829ce7..78e38800 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -11,6 +11,7 @@ use std::sync::Mutex;
use tauri::Manager;
struct CloseBehaviorState(Mutex<String>);
+struct TrayAvailabilityState(Mutex<bool>);
#[tauri::command]
fn clip_server_status() -> String {
@@ -119,7 +120,16 @@ fn close_behavior<R: tauri::Runtime>(window: &tauri::Window<R>) -> String {
.0
.lock()
.map(|value| value.clone())
- .unwrap_or_else(|_| "ask".to_string())
+ .unwrap_or_else(|_| "minimize".to_string())
+}
+
+fn tray_available<R: tauri::Runtime>(window: &tauri::Window<R>) -> bool {
+ window
+ .state::<TrayAvailabilityState>()
+ .0
+ .lock()
+ .map(|value| *value)
+ .unwrap_or(false)
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
@@ -170,10 +180,15 @@ pub fn run() {
app.manage(commands::claude_cli::ClaudeCliState::default());
app.manage(commands::codex_cli::CodexCliState::default());
app.manage(commands::file_sync::FileSyncState::default());
- app.manage(CloseBehaviorState(Mutex::new("ask".to_string())));
- if let Err(err) = tray::create_tray(app.handle()) {
- eprintln!("[tray] system tray unavailable, continuing without it: {err}");
- }
+ app.manage(CloseBehaviorState(Mutex::new("minimize".to_string())));
+ let tray_available = match tray::create_tray(app.handle()) {
+ Ok(()) => true,
+ Err(err) => {
+ eprintln!("[tray] system tray unavailable, continuing without it: {err}");
+ false
+ }
+ };
+ app.manage(TrayAvailabilityState(Mutex::new(tray_available)));
api_server::start_api_server(app.handle().clone());
Ok(())
})
@@ -244,17 +259,25 @@ pub fn run() {
});
}
"minimize" => {
- let _ = window.hide();
+ if tray_available(window) {
+ let _ = window.hide();
+ } else {
+ let _ = window.minimize();
+ }
}
_ => {
tauri::async_runtime::spawn(async move {
- use tauri_plugin_dialog::DialogExt;
+ use tauri_plugin_dialog::{DialogExt, MessageDialogButtons};
let confirmed = app
.dialog()
.message(
- "Quit LLM Wiki? Choose OK to exit. Choose Cancel to hide the window and keep background features running.",
+ "Quit LLM Wiki? Choose Quit to exit. Choose Hide Window to keep background features running.",
)
.title("LLM Wiki")
+ .buttons(MessageDialogButtons::OkCancelCustom(
+ "Quit".to_string(),
+ "Hide Window".to_string(),
+ ))
.kind(tauri_plugin_dialog::MessageDialogKind::Warning)
.blocking_show();
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 749efe4f..9d3d99bf 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.17",
+ "version": "0.4.18",
"identifier": "com.llmwiki.app",
"build": {
"beforeDevCommand": "npm run dev",
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 35e0a55e..0be056c0 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -230,8 +230,8 @@
"closeBehaviorHint": "This setting applies when you click the title-bar close button. The tray menu can still quit the app directly.",
"closeAsk": "Ask every time",
"closeAskHint": "Show a confirmation. Cancel hides the window and keeps background features running.",
- "closeMinimize": "Hide to tray",
- "closeMinimizeHint": "Keep LLM Wiki running in the background when the window closes. Requires system tray support; some Linux desktops may not show tray icons.",
+ "closeMinimize": "Hide window",
+ "closeMinimizeHint": "Keep LLM Wiki running in the background when the window closes. On macOS this matches the normal red close button behavior. If a Linux tray is unavailable, the window is minimized instead of hidden.",
"closeExit": "Quit app",
"closeExitHint": "Exit LLM Wiki immediately when the window closes."
},
diff --git a/src/i18n/zh.json b/src/i18n/zh.json
index c07b1d30..09f5b3b9 100644
--- a/src/i18n/zh.json
+++ b/src/i18n/zh.json
@@ -230,8 +230,8 @@
"closeBehaviorHint": "点击标题栏关闭按钮时使用这个设置。托盘菜单仍可直接退出应用。",
"closeAsk": "每次询问",
"closeAskHint": "显示确认框。取消会隐藏窗口,并保持后台功能继续运行。",
- "closeMinimize": "隐藏到托盘",
- "closeMinimizeHint": "关闭窗口时让 LLM Wiki 留在后台运行。依赖系统托盘支持;部分 Linux 桌面可能不显示托盘图标。",
+ "closeMinimize": "隐藏窗口",
+ "closeMinimizeHint": "关闭窗口时让 LLM Wiki 留在后台运行。在 macOS 上这符合红色关闭按钮的常规行为;如果 Linux 托盘不可用,会最小化窗口而不是隐藏。",
"closeExit": "退出应用",
"closeExitHint": "关闭窗口时立即退出 LLM Wiki。"
},
diff --git a/src/lib/changelog.ts b/src/lib/changelog.ts
index a82eb88f..3dedf69c 100644
--- a/src/lib/changelog.ts
+++ b/src/lib/changelog.ts
@@ -25,6 +25,20 @@ export interface ChangelogEntry {
}
export const CHANGELOG: ChangelogEntry[] = [
+ {
+ version: "0.4.18",
+ date: "2026-06-03",
+ highlights: {
+ en: [
+ "Fixed close-window behavior on macOS and restored a clear Quit / Hide Window confirmation when asking before close.",
+ "Improved Linux compatibility so the window minimizes instead of hiding when system tray support is unavailable.",
+ ],
+ zh: [
+ "修复 macOS 关闭窗口行为,并在询问模式下恢复清晰的「退出 / 隐藏窗口」确认。",
+ "改进 Linux 兼容性:系统托盘不可用时改为最小化,避免窗口隐藏后无法恢复。",
+ ],
+ },
+ },
{
version: "0.4.17",
date: "2026-06-03",
diff --git a/src/lib/project-store.ts b/src/lib/project-store.ts
index 524707ea..565f9515 100644
--- a/src/lib/project-store.ts
+++ b/src/lib/project-store.ts
@@ -161,7 +161,7 @@ const GENERAL_CONFIG_KEY = "generalConfig"
export const DEFAULT_GENERAL_CONFIG: GeneralConfig = {
autostart: false,
- closeBehavior: "ask",
+ closeBehavior: "minimize",
}
export function normalizeGeneralConfig(config?: Partial<GeneralConfig> | null): GeneralConfig {
diff --git a/src/stores/wiki-store.ts b/src/stores/wiki-store.ts
index 26a97e22..96b37ac7 100644
--- a/src/stores/wiki-store.ts
+++ b/src/stores/wiki-store.ts
@@ -447,7 +447,7 @@ export const useWikiStore = create<WikiState>((set) => ({
generalConfig: {
autostart: false,
- closeBehavior: "ask",
+ closeBehavior: "minimize",
},
setLlmConfig: (llmConfig) => set({ llmConfig }),