diff --git a/README.md b/README.md index 71b4234..694b745 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@
- 正文内容
+
@@ -251,7 +251,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
-产出:`release/Metona Ollama Setup v0.17.0.exe`
+产出:`release/Metona Ollama Setup v0.17.1.exe`
## 🛠️ 常用命令
@@ -499,7 +499,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
-Output: `release/Metona Ollama Setup v0.17.0.exe`
+Output: `release/Metona Ollama Setup v0.17.1.exe`
## 🛠️ Common Commands
diff --git a/package-lock.json b/package-lock.json
index fc310dd..c8297b1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "metona-ollama-desktop",
- "version": "0.17.0",
+ "version": "0.17.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "metona-ollama-desktop",
- "version": "0.17.0",
+ "version": "0.17.1",
"license": "MIT",
"dependencies": {
"ffmpeg-static": "^5.2.0",
diff --git a/package.json b/package.json
index e6cb7fc..c149554 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "metona-ollama-desktop",
- "version": "0.17.0",
+ "version": "0.17.1",
"description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端",
"main": "dist/main/main.js",
"author": "thzxx",
diff --git a/src/main/db/sqlite.ts b/src/main/db/sqlite.ts
index 2e0e0fa..f4a69f1 100644
--- a/src/main/db/sqlite.ts
+++ b/src/main/db/sqlite.ts
@@ -101,6 +101,7 @@ function persist(): void {
fs.renameSync(tmpPath, dbPath);
} catch (err) {
_dirty = true;
+ // 豁免:SQLite 刷盘在应用退出/崩溃时可能无渲染进程可推送日志,落盘错误必须保留到 stderr
console.error(`[SQLite persist] 写入失败: ${(err as Error).message}`);
}
}
diff --git a/src/main/html-utils.ts b/src/main/html-utils.ts
new file mode 100644
index 0000000..7e3e2f0
--- /dev/null
+++ b/src/main/html-utils.ts
@@ -0,0 +1,193 @@
+/**
+ * HTML 工具函数 — 从 tool-handlers-system.ts 抽取的纯函数(无 electron/fs 依赖)
+ * 便于单元测试与复用:实体解码、HTML→文本、HTML→Markdown、拦截页检测、搜索相关性评分。
+ */
+
+/** 完整 HTML 实体映射(常见实体) */
+const HTML_ENTITIES: Record