@lobehub/chat 1.107.1 → 1.107.2
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/CHANGELOG.md +33 -0
- package/apps/desktop/src/main/core/browser/Browser.ts +17 -4
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/packages/types/package.json +17 -0
- package/tsconfig.json +1 -0
- package/vitest.config.server.ts +6 -3
- package/vitest.config.ts +3 -0
- package/{src/types → packages/types/src}/agent/chatConfig.ts +0 -0
- package/{src/types → packages/types/src}/agent/index.ts +0 -0
- package/{src/types → packages/types/src}/aiModel.ts +0 -0
- package/{src/types → packages/types/src}/aiProvider.ts +0 -0
- package/{src/types → packages/types/src}/apiKey.ts +0 -0
- package/{src/types → packages/types/src}/artifact.ts +0 -0
- package/{src/types → packages/types/src}/asyncTask.ts +0 -0
- package/{src/types → packages/types/src}/changelog.ts +0 -0
- package/{src/types → packages/types/src}/chunk/document.ts +0 -0
- package/{src/types → packages/types/src}/chunk/index.ts +0 -0
- package/{src/types → packages/types/src}/clientDB.ts +0 -0
- package/{src/types → packages/types/src}/discover/assistants.ts +0 -0
- package/{src/types → packages/types/src}/discover/index.ts +0 -0
- package/{src/types → packages/types/src}/discover/mcp.ts +0 -0
- package/{src/types → packages/types/src}/discover/models.ts +0 -0
- package/{src/types → packages/types/src}/discover/plugins.ts +0 -0
- package/{src/types → packages/types/src}/discover/providers.ts +0 -0
- package/{src/types → packages/types/src}/document/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/dataset.ts +0 -0
- package/{src/types → packages/types/src}/eval/evaluation.ts +0 -0
- package/{src/types → packages/types/src}/eval/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/ragas.ts +0 -0
- package/{src/types → packages/types/src}/export.ts +0 -0
- package/{src/types → packages/types/src}/exportConfig.ts +0 -0
- package/{src/types → packages/types/src}/fetch.ts +0 -0
- package/{src/types → packages/types/src}/files/index.ts +0 -0
- package/{src/types → packages/types/src}/files/list.ts +0 -0
- package/{src/types → packages/types/src}/files/upload.ts +0 -0
- package/{src/types → packages/types/src}/generation/index.ts +24 -24
- /package/{src/types → packages/types/src}/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/importer.ts +0 -0
- /package/{src/types → packages/types/src}/knowledgeBase/index.ts +0 -0
- /package/{src/types → packages/types/src}/llm.ts +0 -0
- /package/{src/types → packages/types/src}/locale.ts +0 -0
- /package/{src/types → packages/types/src}/message/base.ts +0 -0
- /package/{src/types → packages/types/src}/message/chat.ts +0 -0
- /package/{src/types → packages/types/src}/message/image.ts +0 -0
- /package/{src/types → packages/types/src}/message/index.ts +0 -0
- /package/{src/types → packages/types/src}/message/tools.ts +0 -0
- /package/{src/types → packages/types/src}/message/translate.ts +0 -0
- /package/{src/types → packages/types/src}/meta.ts +0 -0
- /package/{src/types → packages/types/src}/next.ts +0 -0
- /package/{src/types → packages/types/src}/openai/chat.ts +0 -0
- /package/{src/types → packages/types/src}/openai/functionCall.ts +0 -0
- /package/{src/types → packages/types/src}/openai/image.ts +0 -0
- /package/{src/types → packages/types/src}/openai/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/index.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcp.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcpDeps.ts +0 -0
- /package/{src/types → packages/types/src}/rag.ts +0 -0
- /package/{src/types → packages/types/src}/search.ts +0 -0
- /package/{src/types → packages/types/src}/serverConfig.ts +0 -0
- /package/{src/types → packages/types/src}/service.ts +0 -0
- /package/{src/types → packages/types/src}/session/agentSession.ts +0 -0
- /package/{src/types → packages/types/src}/session/index.ts +0 -0
- /package/{src/types → packages/types/src}/session/sessionGroup.ts +0 -0
- /package/{src/types → packages/types/src}/share.ts +0 -0
- /package/{src/types → packages/types/src}/subscription.ts +0 -0
- /package/{src/types → packages/types/src}/sync.ts +0 -0
- /package/{src/types → packages/types/src}/tableViewer.ts +0 -0
- /package/{src/types → packages/types/src}/tool/builtin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/crawler.ts +0 -0
- /package/{src/types → packages/types/src}/tool/dalle.ts +0 -0
- /package/{src/types → packages/types/src}/tool/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/search/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/tool.ts +0 -0
- /package/{src/types → packages/types/src}/topic/index.ts +0 -0
- /package/{src/types → packages/types/src}/topic/thread.ts +0 -0
- /package/{src/types → packages/types/src}/topic/topic.ts +0 -0
- /package/{src/types → packages/types/src}/trace/action.ts +0 -0
- /package/{src/types → packages/types/src}/trace/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/filesConfig.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/general.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/keyVaults.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/modelProvider.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/sync.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/systemAgent.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tool.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tts.ts +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.107.2](https://github.com/lobehub/lobe-chat/compare/v1.107.1...v1.107.2)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-02**</sup>
|
8
|
+
|
9
|
+
#### ♻ Code Refactoring
|
10
|
+
|
11
|
+
- **misc**: Move types to separate package.
|
12
|
+
|
13
|
+
#### 🐛 Bug Fixes
|
14
|
+
|
15
|
+
- **desktop**: Settings window can't exit when fullscreen.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### Code refactoring
|
23
|
+
|
24
|
+
- **misc**: Move types to separate package, closes [#8635](https://github.com/lobehub/lobe-chat/issues/8635) ([3cc4a54](https://github.com/lobehub/lobe-chat/commit/3cc4a54))
|
25
|
+
|
26
|
+
#### What's fixed
|
27
|
+
|
28
|
+
- **desktop**: Settings window can't exit when fullscreen, closes [#8633](https://github.com/lobehub/lobe-chat/issues/8633) ([954eb2c](https://github.com/lobehub/lobe-chat/commit/954eb2c))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
5
38
|
### [Version 1.107.1](https://github.com/lobehub/lobe-chat/compare/v1.107.0...v1.107.1)
|
6
39
|
|
7
40
|
<sup>Released on **2025-08-01**</sup>
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
import { join } from 'node:path';
|
10
10
|
|
11
11
|
import { buildDir, preloadDir, resourcesDir } from '@/const/dir';
|
12
|
-
import { isDev, isWindows } from '@/const/env';
|
12
|
+
import { isDev, isMac, isWindows } from '@/const/env';
|
13
13
|
import {
|
14
14
|
BACKGROUND_DARK,
|
15
15
|
BACKGROUND_LIGHT,
|
@@ -269,7 +269,20 @@ export default class Browser {
|
|
269
269
|
|
270
270
|
hide() {
|
271
271
|
logger.debug(`Hiding window: ${this.identifier}`);
|
272
|
-
|
272
|
+
|
273
|
+
// Fix for macOS fullscreen black screen issue
|
274
|
+
// See: https://github.com/electron/electron/issues/20263
|
275
|
+
if (isMac && this.browserWindow.isFullScreen()) {
|
276
|
+
logger.debug(
|
277
|
+
`[${this.identifier}] Window is in fullscreen mode, exiting fullscreen before hiding.`,
|
278
|
+
);
|
279
|
+
this.browserWindow.once('leave-full-screen', () => {
|
280
|
+
this.browserWindow.hide();
|
281
|
+
});
|
282
|
+
this.browserWindow.setFullScreen(false);
|
283
|
+
} else {
|
284
|
+
this.browserWindow.hide();
|
285
|
+
}
|
273
286
|
}
|
274
287
|
|
275
288
|
close() {
|
@@ -413,7 +426,7 @@ export default class Browser {
|
|
413
426
|
// logger.error(`[${this.identifier}] Failed to save window state on hide:`, error);
|
414
427
|
// }
|
415
428
|
e.preventDefault();
|
416
|
-
|
429
|
+
this.hide();
|
417
430
|
} else {
|
418
431
|
// Window is actually closing (not keepAlive)
|
419
432
|
logger.debug(
|
@@ -465,7 +478,7 @@ export default class Browser {
|
|
465
478
|
toggleVisible() {
|
466
479
|
logger.debug(`Toggling visibility for window: ${this.identifier}`);
|
467
480
|
if (this._browserWindow.isVisible() && this._browserWindow.isFocused()) {
|
468
|
-
this.
|
481
|
+
this.hide(); // Use the hide() method which handles fullscreen
|
469
482
|
} else {
|
470
483
|
this._browserWindow.show();
|
471
484
|
this._browserWindow.focus();
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.107.
|
3
|
+
"version": "1.107.2",
|
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",
|
package/tsconfig.json
CHANGED
package/vitest.config.server.ts
CHANGED
@@ -4,7 +4,10 @@ import { coverageConfigDefaults, defineConfig } from 'vitest/config';
|
|
4
4
|
export default defineConfig({
|
5
5
|
test: {
|
6
6
|
alias: {
|
7
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
8
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
7
9
|
'@': resolve(__dirname, './src'),
|
10
|
+
/* eslint-enable */
|
8
11
|
},
|
9
12
|
coverage: {
|
10
13
|
all: false,
|
@@ -18,6 +21,9 @@ export default defineConfig({
|
|
18
21
|
reporter: ['text', 'json', 'lcov', 'text-summary'],
|
19
22
|
reportsDirectory: './coverage/server',
|
20
23
|
},
|
24
|
+
env: {
|
25
|
+
TEST_SERVER_DB: '1',
|
26
|
+
},
|
21
27
|
environment: 'node',
|
22
28
|
include: ['src/database/models/**/**/*.test.ts', 'src/database/server/**/**/*.test.ts'],
|
23
29
|
poolOptions: {
|
@@ -26,8 +32,5 @@ export default defineConfig({
|
|
26
32
|
},
|
27
33
|
},
|
28
34
|
setupFiles: './tests/setup-db.ts',
|
29
|
-
env: {
|
30
|
-
TEST_SERVER_DB: '1',
|
31
|
-
},
|
32
35
|
},
|
33
36
|
});
|
package/vitest.config.ts
CHANGED
@@ -8,8 +8,11 @@ export default defineConfig({
|
|
8
8
|
},
|
9
9
|
test: {
|
10
10
|
alias: {
|
11
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
12
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
11
13
|
'@': resolve(__dirname, './src'),
|
12
14
|
'~test-utils': resolve(__dirname, './tests/utils.tsx'),
|
15
|
+
/* eslint-enable */
|
13
16
|
},
|
14
17
|
coverage: {
|
15
18
|
all: false,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { AsyncTaskError, AsyncTaskStatus } from '../asyncTask';
|
2
2
|
|
3
3
|
export interface ImageGenerationTopic {
|
4
|
-
id: string;
|
5
|
-
title?: string | null;
|
6
4
|
coverUrl?: string | null;
|
7
5
|
createdAt: Date;
|
6
|
+
id: string;
|
7
|
+
title?: string | null;
|
8
8
|
updatedAt: Date;
|
9
9
|
}
|
10
10
|
|
@@ -14,68 +14,68 @@ export interface BaseGenerationAsset {
|
|
14
14
|
|
15
15
|
export interface ImageGenerationAsset extends BaseGenerationAsset {
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 图片/视频的高度
|
18
18
|
*/
|
19
|
-
|
19
|
+
height?: number;
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* api provider 家的 cdn url,一般很快就会失效
|
22
22
|
*/
|
23
|
-
|
23
|
+
originalUrl?: string;
|
24
24
|
/**
|
25
25
|
* 缩略图,图片那就是尺寸裁剪过的,视频那就是封面的缩略图
|
26
26
|
*/
|
27
27
|
thumbnailUrl?: string;
|
28
28
|
/**
|
29
|
-
*
|
29
|
+
* 存到自己 oss 的 url, 只存了 key, 完整的 url 需要使用 FileService.getFullFileUrl 获取
|
30
30
|
*/
|
31
|
-
|
31
|
+
url?: string;
|
32
32
|
/**
|
33
|
-
*
|
33
|
+
* 图片/视频的宽度
|
34
34
|
*/
|
35
|
-
|
35
|
+
width?: number;
|
36
36
|
}
|
37
37
|
|
38
38
|
export type GenerationAsset = ImageGenerationAsset;
|
39
39
|
|
40
40
|
export interface GenerationConfig {
|
41
|
-
|
41
|
+
aspectRatio?: string;
|
42
|
+
cfg?: number;
|
43
|
+
height?: number;
|
42
44
|
imageUrl?: string | null;
|
43
45
|
imageUrls?: string[];
|
44
|
-
|
45
|
-
height?: number;
|
46
|
-
aspectRatio?: string;
|
46
|
+
prompt: string;
|
47
47
|
size?: string;
|
48
48
|
steps?: number;
|
49
|
-
|
49
|
+
width?: number;
|
50
50
|
}
|
51
51
|
|
52
52
|
export interface GenerationAsyncTask {
|
53
|
+
error?: AsyncTaskError;
|
53
54
|
id: string;
|
54
55
|
status: AsyncTaskStatus;
|
55
|
-
error?: AsyncTaskError;
|
56
56
|
}
|
57
57
|
|
58
58
|
export interface Generation {
|
59
|
-
id: string;
|
60
59
|
/**
|
61
60
|
* The asset associated with the generation, containing image URLs and dimensions.
|
62
61
|
*/
|
63
62
|
asset?: GenerationAsset | null;
|
64
|
-
seed?: number | null;
|
65
|
-
createdAt: Date;
|
66
63
|
asyncTaskId: string | null;
|
64
|
+
createdAt: Date;
|
65
|
+
id: string;
|
66
|
+
seed?: number | null;
|
67
67
|
|
68
68
|
task: GenerationAsyncTask;
|
69
69
|
}
|
70
70
|
|
71
71
|
export interface GenerationBatch {
|
72
|
+
config?: GenerationConfig;
|
73
|
+
createdAt: Date;
|
74
|
+
generations: Generation[];
|
75
|
+
height?: number | null;
|
72
76
|
id: string;
|
73
|
-
provider: string;
|
74
77
|
model: string;
|
75
78
|
prompt: string;
|
79
|
+
provider: string;
|
76
80
|
width?: number | null;
|
77
|
-
height?: number | null;
|
78
|
-
config?: GenerationConfig;
|
79
|
-
createdAt: Date;
|
80
|
-
generations: Generation[];
|
81
81
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|