@lobehub/chat 1.103.1 → 1.104.0
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 +60 -0
- package/apps/desktop/build/icon-beta.ico +0 -0
- package/apps/desktop/build/icon-dev.ico +0 -0
- package/apps/desktop/build/icon-nightly.ico +0 -0
- package/apps/desktop/build/icon.ico +0 -0
- package/apps/desktop/electron.vite.config.ts +4 -2
- package/apps/desktop/package.json +1 -0
- package/apps/desktop/src/main/appBrowsers.ts +2 -2
- package/apps/desktop/src/main/const/env.ts +5 -4
- package/apps/desktop/src/main/const/store.ts +1 -0
- package/apps/desktop/src/main/const/theme.ts +11 -0
- package/apps/desktop/src/main/controllers/BrowserWindowsCtr.ts +1 -1
- package/apps/desktop/src/main/controllers/NotificationCtr.ts +2 -4
- package/apps/desktop/src/main/controllers/ShortcutCtr.ts +9 -1
- package/apps/desktop/src/main/controllers/SystemCtr.ts +4 -0
- package/apps/desktop/src/main/controllers/TrayMenuCtr.ts +5 -9
- package/apps/desktop/src/main/controllers/__tests__/ShortcutCtr.test.ts +14 -11
- package/apps/desktop/src/main/controllers/index.ts +1 -1
- package/apps/desktop/src/main/core/App.ts +9 -10
- package/apps/desktop/src/main/core/{Browser.ts → browser/Browser.ts} +129 -88
- package/apps/desktop/src/main/core/{BrowserManager.ts → browser/BrowserManager.ts} +13 -3
- package/apps/desktop/src/main/core/{StaticFileServerManager.ts → infrastructure/StaticFileServerManager.ts} +13 -7
- package/apps/desktop/src/main/core/{StoreManager.ts → infrastructure/StoreManager.ts} +1 -1
- package/apps/desktop/src/main/core/{UpdaterManager.ts → infrastructure/UpdaterManager.ts} +1 -1
- package/apps/desktop/src/main/core/{MenuManager.ts → ui/MenuManager.ts} +2 -2
- package/apps/desktop/src/main/core/{ShortcutManager.ts → ui/ShortcutManager.ts} +78 -6
- package/apps/desktop/src/main/core/{Tray.ts → ui/Tray.ts} +61 -59
- package/apps/desktop/src/main/core/{TrayManager.ts → ui/TrayManager.ts} +5 -5
- package/apps/desktop/src/main/shortcuts/config.ts +4 -2
- package/apps/desktop/src/main/types/store.ts +1 -0
- package/changelog/v1.json +21 -0
- package/docs/development/basic/add-new-image-model.mdx +162 -0
- package/docs/development/basic/add-new-image-model.zh-CN.mdx +162 -0
- package/docs/usage/providers/fal.mdx +1 -1
- package/docs/usage/providers/fal.zh-CN.mdx +1 -1
- package/locales/ar/hotkey.json +10 -4
- package/locales/ar/setting.json +12 -1
- package/locales/bg-BG/hotkey.json +10 -4
- package/locales/bg-BG/setting.json +12 -1
- package/locales/de-DE/hotkey.json +10 -4
- package/locales/de-DE/setting.json +12 -1
- package/locales/en-US/hotkey.json +10 -4
- package/locales/en-US/setting.json +12 -1
- package/locales/es-ES/hotkey.json +10 -4
- package/locales/es-ES/setting.json +12 -1
- package/locales/fa-IR/hotkey.json +10 -4
- package/locales/fa-IR/setting.json +12 -1
- package/locales/fr-FR/hotkey.json +10 -4
- package/locales/fr-FR/setting.json +12 -1
- package/locales/it-IT/hotkey.json +10 -4
- package/locales/it-IT/setting.json +12 -1
- package/locales/ja-JP/hotkey.json +10 -4
- package/locales/ja-JP/setting.json +12 -1
- package/locales/ko-KR/hotkey.json +10 -4
- package/locales/ko-KR/setting.json +12 -1
- package/locales/nl-NL/hotkey.json +10 -4
- package/locales/nl-NL/setting.json +12 -1
- package/locales/pl-PL/hotkey.json +10 -4
- package/locales/pl-PL/setting.json +12 -1
- package/locales/pt-BR/hotkey.json +10 -4
- package/locales/pt-BR/setting.json +12 -1
- package/locales/ru-RU/hotkey.json +10 -4
- package/locales/ru-RU/setting.json +12 -1
- package/locales/tr-TR/hotkey.json +10 -4
- package/locales/tr-TR/setting.json +12 -1
- package/locales/vi-VN/hotkey.json +10 -4
- package/locales/vi-VN/setting.json +12 -1
- package/locales/zh-CN/hotkey.json +10 -4
- package/locales/zh-CN/setting.json +12 -1
- package/locales/zh-TW/hotkey.json +10 -4
- package/locales/zh-TW/setting.json +12 -1
- package/package.json +66 -66
- package/packages/electron-client-ipc/src/events/shortcut.ts +3 -1
- package/packages/electron-client-ipc/src/types/shortcut.ts +11 -0
- package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx +3 -1
- package/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx +4 -2
- package/src/app/[variants]/(main)/image/@menu/components/SeedNumberInput/index.tsx +1 -1
- package/src/app/[variants]/(main)/image/features/GenerationFeed/BatchItem.tsx +39 -3
- package/src/app/[variants]/(main)/image/features/GenerationFeed/ReferenceImages.tsx +122 -0
- package/src/app/[variants]/(main)/settings/hotkey/features/Conversation.tsx +3 -11
- package/src/app/[variants]/(main)/settings/hotkey/features/Desktop.tsx +92 -0
- package/src/app/[variants]/(main)/settings/hotkey/features/Essential.tsx +3 -11
- package/src/app/[variants]/(main)/settings/hotkey/page.tsx +3 -0
- package/src/config/aiModels/fal.ts +31 -7
- package/src/config/aiModels/openai.ts +10 -1
- package/src/const/desktop.ts +9 -0
- package/src/const/hotkeys.ts +20 -16
- package/src/features/ElectronTitlebar/WinControl/index.tsx +85 -90
- package/src/features/ElectronTitlebar/hooks/useWatchThemeUpdate.ts +10 -5
- package/src/features/ImageTopicPanel/index.tsx +0 -1
- package/src/features/PluginDevModal/index.tsx +3 -1
- package/src/features/User/UserPanel/useMenu.tsx +2 -2
- package/src/features/User/__tests__/UserAvatar.test.tsx +5 -4
- package/src/libs/model-runtime/fal/index.ts +1 -1
- package/src/libs/model-runtime/types/image.ts +1 -1
- package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.ts +1 -1
- package/src/libs/model-runtime/utils/response.ts +2 -0
- package/src/libs/model-runtime/utils/streams/google-ai.test.ts +46 -0
- package/src/libs/model-runtime/utils/streams/google-ai.ts +4 -4
- package/src/libs/model-runtime/utils/streams/vertex-ai.ts +6 -8
- package/src/libs/standard-parameters/{meta-schema.test.ts → index.test.ts} +1 -1
- package/src/libs/standard-parameters/index.ts +152 -1
- package/src/locales/default/hotkey.ts +13 -5
- package/src/locales/default/setting.ts +11 -0
- package/src/server/ld.test.ts +4 -3
- package/src/server/routers/async/image.ts +1 -1
- package/src/services/__tests__/chat.test.ts +3 -4
- package/src/services/electron/settings.ts +19 -1
- package/src/store/chat/slices/message/selectors.test.ts +2 -3
- package/src/store/chat/slices/plugin/action.test.ts +2 -1
- package/src/store/electron/actions/settings.ts +42 -1
- package/src/store/electron/initialState.ts +9 -1
- package/src/store/electron/selectors/__tests__/desktopState.test.ts +6 -17
- package/src/store/electron/selectors/hotkey.ts +11 -0
- package/src/store/electron/selectors/index.ts +1 -0
- package/src/store/image/slices/generationConfig/action.test.ts +2 -2
- package/src/store/image/slices/generationConfig/action.ts +1 -1
- package/src/store/image/slices/generationConfig/hooks.test.ts +2 -2
- package/src/store/image/slices/generationConfig/hooks.ts +1 -4
- package/src/store/image/slices/generationConfig/initialState.ts +2 -2
- package/src/store/image/slices/generationConfig/selectors.test.ts +2 -2
- package/src/store/image/slices/generationConfig/selectors.ts +1 -1
- package/src/store/user/slices/auth/selectors.test.ts +3 -2
- package/src/types/generation/index.ts +1 -0
- package/src/types/hotkey.ts +18 -4
- package/docs/development/basic/add-new-ai-image-model.mdx +0 -36
- package/docs/development/basic/add-new-ai-image-model.zh-CN.mdx +0 -0
- package/src/config/paramsSchemas/fal/flux-kontext-dev.ts +0 -8
- package/src/config/paramsSchemas/fal/flux-pro-kontext.ts +0 -11
- package/src/config/paramsSchemas/fal/flux-schnell.ts +0 -9
- package/src/config/paramsSchemas/fal/imagen4.ts +0 -10
- package/src/config/paramsSchemas/openai/gpt-image-1.ts +0 -10
- package/src/libs/standard-parameters/meta-schema.ts +0 -147
- /package/apps/desktop/src/main/core/{I18nManager.ts → infrastructure/I18nManager.ts} +0 -0
- /package/apps/desktop/src/main/core/{IoCContainer.ts → infrastructure/IoCContainer.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,66 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
## [Version 1.104.0](https://github.com/lobehub/lobe-chat/compare/v1.103.2...v1.104.0)
|
6
|
+
|
7
|
+
<sup>Released on **2025-07-24**</sup>
|
8
|
+
|
9
|
+
#### ✨ Features
|
10
|
+
|
11
|
+
- **misc**: Support custom hotkey on desktop.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's improved
|
19
|
+
|
20
|
+
- **misc**: Support custom hotkey on desktop, closes [#8559](https://github.com/lobehub/lobe-chat/issues/8559) ([b50f121](https://github.com/lobehub/lobe-chat/commit/b50f121))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.103.2](https://github.com/lobehub/lobe-chat/compare/v1.103.1...v1.103.2)
|
31
|
+
|
32
|
+
<sup>Released on **2025-07-24**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix chat stream in desktop and update shortcut.
|
37
|
+
|
38
|
+
#### 💄 Styles
|
39
|
+
|
40
|
+
- **misc**: Add cached token count to usage of GoogleAI and VertexAI, fix desktop titlebar style in window, fix sub topic width in md responsive.
|
41
|
+
|
42
|
+
<br/>
|
43
|
+
|
44
|
+
<details>
|
45
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
46
|
+
|
47
|
+
#### What's fixed
|
48
|
+
|
49
|
+
- **misc**: Fix chat stream in desktop and update shortcut, closes [#8520](https://github.com/lobehub/lobe-chat/issues/8520) ([0192140](https://github.com/lobehub/lobe-chat/commit/0192140))
|
50
|
+
|
51
|
+
#### Styles
|
52
|
+
|
53
|
+
- **misc**: Add cached token count to usage of GoogleAI and VertexAI, closes [#8545](https://github.com/lobehub/lobe-chat/issues/8545) ([66dbb24](https://github.com/lobehub/lobe-chat/commit/66dbb24))
|
54
|
+
- **misc**: Fix desktop titlebar style in window, closes [#8439](https://github.com/lobehub/lobe-chat/issues/8439) ([fd7662c](https://github.com/lobehub/lobe-chat/commit/fd7662c))
|
55
|
+
- **misc**: Fix sub topic width in md responsive, closes [#8443](https://github.com/lobehub/lobe-chat/issues/8443) ([9bae13b](https://github.com/lobehub/lobe-chat/commit/9bae13b))
|
56
|
+
|
57
|
+
</details>
|
58
|
+
|
59
|
+
<div align="right">
|
60
|
+
|
61
|
+
[](#readme-top)
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
5
65
|
### [Version 1.103.1](https://github.com/lobehub/lobe-chat/compare/v1.103.0...v1.103.1)
|
6
66
|
|
7
67
|
<sup>Released on **2025-07-23**</sup>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -11,8 +11,9 @@ console.log(`[electron-vite.config.ts] Detected UPDATE_CHANNEL: ${updateChannel}
|
|
11
11
|
export default defineConfig({
|
12
12
|
main: {
|
13
13
|
build: {
|
14
|
+
minify: !isDev,
|
14
15
|
outDir: 'dist/main',
|
15
|
-
sourcemap: isDev,
|
16
|
+
sourcemap: isDev ? 'inline' : false,
|
16
17
|
},
|
17
18
|
// 这里是关键:在构建时进行文本替换
|
18
19
|
define: {
|
@@ -30,8 +31,9 @@ export default defineConfig({
|
|
30
31
|
},
|
31
32
|
preload: {
|
32
33
|
build: {
|
34
|
+
minify: !isDev,
|
33
35
|
outDir: 'dist/preload',
|
34
|
-
sourcemap: isDev,
|
36
|
+
sourcemap: isDev ? 'inline' : false,
|
35
37
|
},
|
36
38
|
plugins: [externalizeDepsPlugin({})],
|
37
39
|
resolve: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { BrowserWindowOpts } from './core/Browser';
|
1
|
+
import type { BrowserWindowOpts } from './core/browser/Browser';
|
2
2
|
|
3
3
|
export const BrowsersIdentifiers = {
|
4
4
|
chat: 'chat',
|
@@ -36,7 +36,7 @@ export const appBrowsers = {
|
|
36
36
|
autoHideMenuBar: true,
|
37
37
|
height: 800,
|
38
38
|
identifier: 'settings',
|
39
|
-
|
39
|
+
keepAlive: true,
|
40
40
|
minWidth: 600,
|
41
41
|
parentIdentifier: 'chat',
|
42
42
|
path: '/settings',
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import { dev, linux, macOS, windows } from 'electron-is';
|
1
2
|
import os from 'node:os';
|
2
3
|
|
3
|
-
export const isDev =
|
4
|
+
export const isDev = dev();
|
4
5
|
|
5
6
|
export const OFFICIAL_CLOUD_SERVER = process.env.OFFICIAL_CLOUD_SERVER || 'https://lobechat.com';
|
6
7
|
|
7
|
-
export const isMac =
|
8
|
-
export const isWindows =
|
9
|
-
export const isLinux =
|
8
|
+
export const isMac = macOS();
|
9
|
+
export const isWindows = windows();
|
10
|
+
export const isLinux = linux();
|
10
11
|
|
11
12
|
function getIsWindows11() {
|
12
13
|
if (!isWindows) return false;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Theme colors
|
2
|
+
export const BACKGROUND_DARK = '#000';
|
3
|
+
export const BACKGROUND_LIGHT = '#f8f8f8';
|
4
|
+
export const SYMBOL_COLOR_DARK = '#ffffff80';
|
5
|
+
export const SYMBOL_COLOR_LIGHT = '#00000080';
|
6
|
+
|
7
|
+
// Window dimensions and constraints
|
8
|
+
export const TITLE_BAR_HEIGHT = 29;
|
9
|
+
|
10
|
+
// Default window configuration
|
11
|
+
export const THEME_CHANGE_DELAY = 100;
|
@@ -7,7 +7,7 @@ import { IpcClientEventSender } from '@/types/ipcClientEvent';
|
|
7
7
|
import { ControllerModule, ipcClientEvent, shortcut } from './index';
|
8
8
|
|
9
9
|
export default class BrowserWindowsCtr extends ControllerModule {
|
10
|
-
@shortcut('
|
10
|
+
@shortcut('showApp')
|
11
11
|
async toggleMainWindow() {
|
12
12
|
const mainWindow = this.app.browserManager.getMainWindow();
|
13
13
|
mainWindow.toggleVisible();
|
@@ -77,10 +77,8 @@ export default class NotificationCtr extends ControllerModule {
|
|
77
77
|
const notification = new Notification({
|
78
78
|
body: params.body,
|
79
79
|
// 添加更多配置以确保通知能正常显示
|
80
|
-
hasReply: false,
|
81
|
-
|
82
|
-
silent: params.silent || false,
|
83
|
-
|
80
|
+
hasReply: false,
|
81
|
+
silent: params.silent || false,
|
84
82
|
timeoutType: 'default',
|
85
83
|
title: params.title,
|
86
84
|
urgency: 'normal',
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { ShortcutUpdateResult } from '@/core/ui/ShortcutManager';
|
2
|
+
|
1
3
|
import { ControllerModule, ipcClientEvent } from '.';
|
2
4
|
|
3
5
|
export default class ShortcutController extends ControllerModule {
|
@@ -13,7 +15,13 @@ export default class ShortcutController extends ControllerModule {
|
|
13
15
|
* 更新单个快捷键配置
|
14
16
|
*/
|
15
17
|
@ipcClientEvent('updateShortcutConfig')
|
16
|
-
updateShortcutConfig(
|
18
|
+
updateShortcutConfig({
|
19
|
+
id,
|
20
|
+
accelerator,
|
21
|
+
}: {
|
22
|
+
accelerator: string;
|
23
|
+
id: string;
|
24
|
+
}): ShortcutUpdateResult {
|
17
25
|
return this.app.shortcutManager.updateShortcutConfig(id, accelerator);
|
18
26
|
}
|
19
27
|
}
|
@@ -83,7 +83,11 @@ export default class SystemController extends ControllerModule {
|
|
83
83
|
|
84
84
|
@ipcClientEvent('updateThemeMode')
|
85
85
|
async updateThemeModeHandler(themeMode: ThemeMode) {
|
86
|
+
this.app.storeManager.set('themeMode', themeMode);
|
86
87
|
this.app.browserManager.broadcastToAllWindows('themeChanged', { themeMode });
|
88
|
+
|
89
|
+
// Apply visual effects to all browser windows when theme mode changes
|
90
|
+
this.app.browserManager.handleAppThemeChange();
|
87
91
|
}
|
88
92
|
|
89
93
|
@ipcServerEvent('getDatabasePath')
|
@@ -6,16 +6,12 @@ import {
|
|
6
6
|
|
7
7
|
import { createLogger } from '@/utils/logger';
|
8
8
|
|
9
|
-
import { ControllerModule, ipcClientEvent
|
9
|
+
import { ControllerModule, ipcClientEvent } from './index';
|
10
10
|
|
11
11
|
// 创建日志记录器
|
12
12
|
const logger = createLogger('controllers:TrayMenuCtr');
|
13
13
|
|
14
14
|
export default class TrayMenuCtr extends ControllerModule {
|
15
|
-
/**
|
16
|
-
* 使用快捷键切换窗口可见性
|
17
|
-
*/
|
18
|
-
@shortcut('toggleMainWindow')
|
19
15
|
async toggleMainWindow() {
|
20
16
|
logger.debug('通过快捷键切换主窗口可见性');
|
21
17
|
const mainWindow = this.app.browserManager.getMainWindow();
|
@@ -47,7 +43,7 @@ export default class TrayMenuCtr extends ControllerModule {
|
|
47
43
|
|
48
44
|
return {
|
49
45
|
error: '托盘通知仅在 Windows 平台支持',
|
50
|
-
success: false
|
46
|
+
success: false,
|
51
47
|
};
|
52
48
|
}
|
53
49
|
|
@@ -71,7 +67,7 @@ export default class TrayMenuCtr extends ControllerModule {
|
|
71
67
|
logger.error('更新托盘图标失败:', error);
|
72
68
|
return {
|
73
69
|
error: String(error),
|
74
|
-
success: false
|
70
|
+
success: false,
|
75
71
|
};
|
76
72
|
}
|
77
73
|
}
|
@@ -79,7 +75,7 @@ export default class TrayMenuCtr extends ControllerModule {
|
|
79
75
|
|
80
76
|
return {
|
81
77
|
error: '托盘功能仅在 Windows 平台支持',
|
82
|
-
success: false
|
78
|
+
success: false,
|
83
79
|
};
|
84
80
|
}
|
85
81
|
|
@@ -103,7 +99,7 @@ export default class TrayMenuCtr extends ControllerModule {
|
|
103
99
|
|
104
100
|
return {
|
105
101
|
error: '托盘功能仅在 Windows 平台支持',
|
106
|
-
success: false
|
102
|
+
success: false,
|
107
103
|
};
|
108
104
|
}
|
109
105
|
}
|
@@ -5,9 +5,9 @@ import type { App } from '@/core/App';
|
|
5
5
|
import ShortcutController from '../ShortcutCtr';
|
6
6
|
|
7
7
|
// 模拟 App 及其依赖项
|
8
|
-
const mockGetShortcutsConfig = vi.fn().mockReturnValue({
|
8
|
+
const mockGetShortcutsConfig = vi.fn().mockReturnValue({
|
9
9
|
toggleMainWindow: 'CommandOrControl+Shift+L',
|
10
|
-
openSettings: 'CommandOrControl+,'
|
10
|
+
openSettings: 'CommandOrControl+,',
|
11
11
|
});
|
12
12
|
const mockUpdateShortcutConfig = vi.fn().mockImplementation((id, accelerator) => {
|
13
13
|
// 简单模拟更新成功
|
@@ -32,11 +32,11 @@ describe('ShortcutController', () => {
|
|
32
32
|
describe('getShortcutsConfig', () => {
|
33
33
|
it('should return shortcuts config from shortcutManager', () => {
|
34
34
|
const result = shortcutController.getShortcutsConfig();
|
35
|
-
|
35
|
+
|
36
36
|
expect(mockGetShortcutsConfig).toHaveBeenCalled();
|
37
37
|
expect(result).toEqual({
|
38
38
|
toggleMainWindow: 'CommandOrControl+Shift+L',
|
39
|
-
openSettings: 'CommandOrControl+,'
|
39
|
+
openSettings: 'CommandOrControl+,',
|
40
40
|
});
|
41
41
|
});
|
42
42
|
});
|
@@ -45,9 +45,9 @@ describe('ShortcutController', () => {
|
|
45
45
|
it('should call shortcutManager.updateShortcutConfig with correct parameters', () => {
|
46
46
|
const id = 'toggleMainWindow';
|
47
47
|
const accelerator = 'CommandOrControl+Alt+L';
|
48
|
-
|
49
|
-
const result = shortcutController.updateShortcutConfig(id, accelerator);
|
50
|
-
|
48
|
+
|
49
|
+
const result = shortcutController.updateShortcutConfig({ id, accelerator });
|
50
|
+
|
51
51
|
expect(mockUpdateShortcutConfig).toHaveBeenCalledWith(id, accelerator);
|
52
52
|
expect(result).toBe(true);
|
53
53
|
});
|
@@ -55,10 +55,13 @@ describe('ShortcutController', () => {
|
|
55
55
|
it('should return the result from shortcutManager.updateShortcutConfig', () => {
|
56
56
|
// 模拟更新失败的情况
|
57
57
|
mockUpdateShortcutConfig.mockReturnValueOnce(false);
|
58
|
-
|
59
|
-
const result = shortcutController.updateShortcutConfig(
|
60
|
-
|
58
|
+
|
59
|
+
const result = shortcutController.updateShortcutConfig({
|
60
|
+
id: 'invalidKey',
|
61
|
+
accelerator: 'invalid+combo',
|
62
|
+
});
|
63
|
+
|
61
64
|
expect(result).toBe(false);
|
62
65
|
});
|
63
66
|
});
|
64
|
-
});
|
67
|
+
});
|
@@ -2,7 +2,7 @@ import type { ClientDispatchEvents } from '@lobechat/electron-client-ipc';
|
|
2
2
|
import type { ServerDispatchEvents } from '@lobechat/electron-server-ipc';
|
3
3
|
|
4
4
|
import type { App } from '@/core/App';
|
5
|
-
import { IoCContainer } from '@/core/IoCContainer';
|
5
|
+
import { IoCContainer } from '@/core/infrastructure/IoCContainer';
|
6
6
|
import { ShortcutActionType } from '@/shortcuts';
|
7
7
|
|
8
8
|
const ipcDecorator =
|
@@ -9,20 +9,19 @@ import { buildDir, nextStandaloneDir } from '@/const/dir';
|
|
9
9
|
import { isDev } from '@/const/env';
|
10
10
|
import { IControlModule } from '@/controllers';
|
11
11
|
import { IServiceModule } from '@/services';
|
12
|
-
import FileService from '@/services/fileSrv';
|
13
12
|
import { IpcClientEventSender } from '@/types/ipcClientEvent';
|
14
13
|
import { createLogger } from '@/utils/logger';
|
15
14
|
import { CustomRequestHandler, createHandler } from '@/utils/next-electron-rsc';
|
16
15
|
|
17
|
-
import BrowserManager from './BrowserManager';
|
18
|
-
import { I18nManager } from './I18nManager';
|
19
|
-
import { IoCContainer } from './IoCContainer';
|
20
|
-
import
|
21
|
-
import {
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import
|
25
|
-
import {
|
16
|
+
import { BrowserManager } from './browser/BrowserManager';
|
17
|
+
import { I18nManager } from './infrastructure/I18nManager';
|
18
|
+
import { IoCContainer } from './infrastructure/IoCContainer';
|
19
|
+
import { StaticFileServerManager } from './infrastructure/StaticFileServerManager';
|
20
|
+
import { StoreManager } from './infrastructure/StoreManager';
|
21
|
+
import { UpdaterManager } from './infrastructure/UpdaterManager';
|
22
|
+
import { MenuManager } from './ui/MenuManager';
|
23
|
+
import { ShortcutManager } from './ui/ShortcutManager';
|
24
|
+
import { TrayManager } from './ui/TrayManager';
|
26
25
|
|
27
26
|
const logger = createLogger('core:App');
|
28
27
|
|