@lobehub/chat 1.85.3 → 1.85.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/desktop-pr-build.yml +19 -4
- package/.github/workflows/release-desktop-beta.yml +20 -8
- package/CHANGELOG.md +50 -0
- package/apps/desktop/package.json +1 -1
- package/apps/desktop/src/main/core/BrowserManager.ts +5 -0
- package/changelog/v1.json +18 -0
- package/package.json +1 -1
- package/src/database/client/db.ts +40 -5
- package/src/features/ElectronTitlebar/WinControl/index.tsx +1 -1
@@ -93,7 +93,7 @@ jobs:
|
|
93
93
|
runs-on: ${{ matrix.os }}
|
94
94
|
strategy:
|
95
95
|
matrix:
|
96
|
-
os: [macos-latest, windows-
|
96
|
+
os: [macos-latest, windows-2025, ubuntu-latest]
|
97
97
|
steps:
|
98
98
|
- uses: actions/checkout@v4
|
99
99
|
with:
|
@@ -143,9 +143,9 @@ jobs:
|
|
143
143
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
144
144
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
145
145
|
|
146
|
-
#
|
147
|
-
- name: Build artifact on
|
148
|
-
if: runner.os
|
146
|
+
# Windows 平台构建处理
|
147
|
+
- name: Build artifact on Windows
|
148
|
+
if: runner.os == 'Windows'
|
149
149
|
run: npm run desktop:build
|
150
150
|
env:
|
151
151
|
# 设置更新通道,PR构建为nightly,否则为stable
|
@@ -155,7 +155,22 @@ jobs:
|
|
155
155
|
KEY_VAULTS_SECRET: 'oLXWIiR/AKF+rWaqy9lHkrYgzpATbW3CtJp3UfkVgpE='
|
156
156
|
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
|
157
157
|
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
|
158
|
+
# 将 TEMP 和 TMP 目录设置到 D 盘
|
159
|
+
TEMP: D:\temp
|
160
|
+
TMP: D:\temp
|
158
161
|
|
162
|
+
# Linux 平台构建处理
|
163
|
+
- name: Build artifact on Linux
|
164
|
+
if: runner.os == 'Linux'
|
165
|
+
run: npm run desktop:build
|
166
|
+
env:
|
167
|
+
# 设置更新通道,PR构建为nightly,否则为stable
|
168
|
+
UPDATE_CHANNEL: 'nightly'
|
169
|
+
APP_URL: http://localhost:3015
|
170
|
+
DATABASE_URL: 'postgresql://postgres@localhost:5432/postgres'
|
171
|
+
KEY_VAULTS_SECRET: 'oLXWIiR/AKF+rWaqy9lHkrYgzpATbW3CtJp3UfkVgpE='
|
172
|
+
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
|
173
|
+
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
|
159
174
|
|
160
175
|
# 上传构建产物
|
161
176
|
- name: Upload artifact
|
@@ -80,9 +80,7 @@ jobs:
|
|
80
80
|
runs-on: ${{ matrix.os }}
|
81
81
|
strategy:
|
82
82
|
matrix:
|
83
|
-
|
84
|
-
os: [macos-latest]
|
85
|
-
# os: [macos-latest, windows-latest, ubuntu-latest]
|
83
|
+
os: [macos-latest, windows-2025, ubuntu-latest]
|
86
84
|
steps:
|
87
85
|
- uses: actions/checkout@v4
|
88
86
|
with:
|
@@ -130,16 +128,30 @@ jobs:
|
|
130
128
|
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_BETA_DESKTOP_PROJECT_ID }}
|
131
129
|
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_BETA_DESKTOP_BASE_URL }}
|
132
130
|
|
133
|
-
#
|
134
|
-
- name: Build artifact on
|
135
|
-
if: runner.os
|
131
|
+
# Windows 平台构建处理
|
132
|
+
- name: Build artifact on Windows
|
133
|
+
if: runner.os == 'Windows'
|
136
134
|
run: npm run desktop:build
|
137
135
|
env:
|
138
136
|
APP_URL: http://localhost:3015
|
139
137
|
DATABASE_URL: 'postgresql://postgres@localhost:5432/postgres'
|
140
138
|
KEY_VAULTS_SECRET: 'oLXWIiR/AKF+rWaqy9lHkrYgzpATbW3CtJp3UfkVgpE='
|
141
|
-
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.
|
142
|
-
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.
|
139
|
+
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
|
140
|
+
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
|
141
|
+
# 将 TEMP 和 TMP 目录设置到 D 盘
|
142
|
+
TEMP: D:\temp
|
143
|
+
TMP: D:\temp
|
144
|
+
|
145
|
+
# Linux 平台构建处理
|
146
|
+
- name: Build artifact on Linux
|
147
|
+
if: runner.os == 'Linux'
|
148
|
+
run: npm run desktop:build
|
149
|
+
env:
|
150
|
+
APP_URL: http://localhost:3015
|
151
|
+
DATABASE_URL: 'postgresql://postgres@localhost:5432/postgres'
|
152
|
+
KEY_VAULTS_SECRET: 'oLXWIiR/AKF+rWaqy9lHkrYgzpATbW3CtJp3UfkVgpE='
|
153
|
+
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
|
154
|
+
NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
|
143
155
|
|
144
156
|
# 上传构建产物,移除了 zip 相关部分
|
145
157
|
- name: Upload artifact
|
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.85.5](https://github.com/lobehub/lobe-chat/compare/v1.85.4...v1.85.5)
|
6
|
+
|
7
|
+
<sup>Released on **2025-05-10**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix window close issue and release Window/Linux beta.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix window close issue and release Window/Linux beta, closes [#7780](https://github.com/lobehub/lobe-chat/issues/7780) ([82c48b9](https://github.com/lobehub/lobe-chat/commit/82c48b9))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.85.4](https://github.com/lobehub/lobe-chat/compare/v1.85.3...v1.85.4)
|
31
|
+
|
32
|
+
<sup>Released on **2025-05-10**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix nothing return when reset the client db.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Fix nothing return when reset the client db, closes [#7738](https://github.com/lobehub/lobe-chat/issues/7738) ([90efb13](https://github.com/lobehub/lobe-chat/commit/90efb13))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.85.3](https://github.com/lobehub/lobe-chat/compare/v1.85.2...v1.85.3)
|
6
56
|
|
7
57
|
<sup>Released on **2025-05-10**</sup>
|
@@ -161,6 +161,11 @@ export default class BrowserManager {
|
|
161
161
|
if (browser.webContents) this.webContentsMap.delete(browser.webContents);
|
162
162
|
});
|
163
163
|
|
164
|
+
browser.browserWindow.on('show', () => {
|
165
|
+
if (browser.webContents)
|
166
|
+
this.webContentsMap.set(browser.webContents, browser.identifier as AppBrowsersIdentifiers);
|
167
|
+
});
|
168
|
+
|
164
169
|
return browser;
|
165
170
|
}
|
166
171
|
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Fix window close issue and release Window/Linux beta."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-05-10",
|
9
|
+
"version": "1.85.5"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"fixes": [
|
14
|
+
"Fix nothing return when reset the client db."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2025-05-10",
|
18
|
+
"version": "1.85.4"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"fixes": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.85.
|
3
|
+
"version": "1.85.5",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -313,16 +313,33 @@ export class DatabaseManager {
|
|
313
313
|
}
|
314
314
|
|
315
315
|
async resetDatabase(): Promise<void> {
|
316
|
-
//
|
316
|
+
// 1. 关闭现有的 PGlite 连接(如果存在)
|
317
|
+
if (this.dbInstance) {
|
318
|
+
try {
|
319
|
+
// @ts-ignore
|
320
|
+
await (this.dbInstance.session as any).client.close();
|
321
|
+
console.log('PGlite instance closed successfully.');
|
322
|
+
} catch (e) {
|
323
|
+
console.error('Error closing PGlite instance:', e);
|
324
|
+
// 即使关闭失败,也尝试继续删除,IndexedDB 的 onblocked 或 onerror 会处理后续问题
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
// 2. 重置数据库实例和初始化状态
|
329
|
+
this.dbInstance = null;
|
330
|
+
this.initPromise = null;
|
331
|
+
this.isLocalDBSchemaSynced = false; // 重置同步状态
|
332
|
+
|
333
|
+
// 3. 删除 IndexedDB 数据库
|
317
334
|
return new Promise<void>((resolve, reject) => {
|
318
335
|
// 检查 IndexedDB 是否可用
|
319
336
|
if (typeof indexedDB === 'undefined') {
|
320
337
|
console.warn('IndexedDB is not available, cannot delete database');
|
321
|
-
resolve();
|
338
|
+
resolve(); // 在此环境下无法删除,直接解决
|
322
339
|
return;
|
323
340
|
}
|
324
341
|
|
325
|
-
const dbName = `/pglite/${DB_NAME}`;
|
342
|
+
const dbName = `/pglite/${DB_NAME}`; // PGlite IdbFs 使用的路径
|
326
343
|
const request = indexedDB.deleteDatabase(dbName);
|
327
344
|
|
328
345
|
request.onsuccess = () => {
|
@@ -338,8 +355,26 @@ export class DatabaseManager {
|
|
338
355
|
|
339
356
|
// eslint-disable-next-line unicorn/prefer-add-event-listener
|
340
357
|
request.onerror = (event) => {
|
341
|
-
|
342
|
-
|
358
|
+
const error = (event.target as IDBOpenDBRequest)?.error;
|
359
|
+
console.error(`❌ Error resetting database '${dbName}':`, error);
|
360
|
+
reject(
|
361
|
+
new Error(
|
362
|
+
`Failed to reset database '${dbName}'. Error: ${error?.message || 'Unknown error'}`,
|
363
|
+
),
|
364
|
+
);
|
365
|
+
};
|
366
|
+
|
367
|
+
request.onblocked = (event) => {
|
368
|
+
// 当其他打开的连接阻止数据库删除时,会触发此事件
|
369
|
+
console.warn(
|
370
|
+
`Deletion of database '${dbName}' is blocked. This usually means other connections (e.g., in other tabs) are still open. Event:`,
|
371
|
+
event,
|
372
|
+
);
|
373
|
+
reject(
|
374
|
+
new Error(
|
375
|
+
`Failed to reset database '${dbName}' because it is blocked by other open connections. Please close other tabs or applications using this database and try again.`,
|
376
|
+
),
|
377
|
+
);
|
343
378
|
};
|
344
379
|
});
|
345
380
|
}
|