@lobehub/chat 1.82.10 → 1.83.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/.env.desktop +1 -2
- package/.github/workflows/{release-desktop.yml → desktop-pr-build.yml} +59 -137
- package/.github/workflows/release-desktop-beta.yml +196 -0
- package/CHANGELOG.md +25 -0
- package/apps/desktop/.i18nrc.js +31 -0
- package/apps/desktop/Development.md +47 -0
- package/apps/desktop/README.md +6 -0
- package/apps/desktop/build/Icon-beta.icns +0 -0
- package/apps/desktop/build/Icon-nightly.icns +0 -0
- package/apps/desktop/build/Icon.icns +0 -0
- package/apps/desktop/build/entitlements.mac.plist +12 -0
- package/apps/desktop/build/favicon.ico +0 -0
- package/apps/desktop/build/icon-beta.png +0 -0
- package/apps/desktop/build/icon-dev.png +0 -0
- package/apps/desktop/build/icon-nightly.ico +0 -0
- package/apps/desktop/build/icon-nightly.png +0 -0
- package/apps/desktop/build/icon.ico +0 -0
- package/apps/desktop/build/icon.png +0 -0
- package/apps/desktop/dev-app-update.yml +6 -0
- package/apps/desktop/electron-builder.js +92 -0
- package/apps/desktop/electron.vite.config.ts +40 -0
- package/apps/desktop/package.json +72 -0
- package/apps/desktop/pnpm-workspace.yaml +5 -0
- package/apps/desktop/resources/error.html +136 -0
- package/apps/desktop/resources/locales/ar/common.json +32 -0
- package/apps/desktop/resources/locales/ar/dialog.json +31 -0
- package/apps/desktop/resources/locales/ar/menu.json +70 -0
- package/apps/desktop/resources/locales/bg-BG/common.json +32 -0
- package/apps/desktop/resources/locales/bg-BG/dialog.json +31 -0
- package/apps/desktop/resources/locales/bg-BG/menu.json +70 -0
- package/apps/desktop/resources/locales/de-DE/common.json +32 -0
- package/apps/desktop/resources/locales/de-DE/dialog.json +31 -0
- package/apps/desktop/resources/locales/de-DE/menu.json +70 -0
- package/apps/desktop/resources/locales/en-US/common.json +32 -0
- package/apps/desktop/resources/locales/en-US/dialog.json +31 -0
- package/apps/desktop/resources/locales/en-US/menu.json +70 -0
- package/apps/desktop/resources/locales/es-ES/common.json +32 -0
- package/apps/desktop/resources/locales/es-ES/dialog.json +31 -0
- package/apps/desktop/resources/locales/es-ES/menu.json +70 -0
- package/apps/desktop/resources/locales/fa-IR/common.json +32 -0
- package/apps/desktop/resources/locales/fa-IR/dialog.json +31 -0
- package/apps/desktop/resources/locales/fa-IR/menu.json +70 -0
- package/apps/desktop/resources/locales/fr-FR/common.json +32 -0
- package/apps/desktop/resources/locales/fr-FR/dialog.json +31 -0
- package/apps/desktop/resources/locales/fr-FR/menu.json +70 -0
- package/apps/desktop/resources/locales/it-IT/common.json +32 -0
- package/apps/desktop/resources/locales/it-IT/dialog.json +31 -0
- package/apps/desktop/resources/locales/it-IT/menu.json +70 -0
- package/apps/desktop/resources/locales/ja-JP/common.json +32 -0
- package/apps/desktop/resources/locales/ja-JP/dialog.json +31 -0
- package/apps/desktop/resources/locales/ja-JP/menu.json +70 -0
- package/apps/desktop/resources/locales/ko-KR/common.json +32 -0
- package/apps/desktop/resources/locales/ko-KR/dialog.json +31 -0
- package/apps/desktop/resources/locales/ko-KR/menu.json +70 -0
- package/apps/desktop/resources/locales/nl-NL/common.json +32 -0
- package/apps/desktop/resources/locales/nl-NL/dialog.json +31 -0
- package/apps/desktop/resources/locales/nl-NL/menu.json +70 -0
- package/apps/desktop/resources/locales/pl-PL/common.json +32 -0
- package/apps/desktop/resources/locales/pl-PL/dialog.json +31 -0
- package/apps/desktop/resources/locales/pl-PL/menu.json +70 -0
- package/apps/desktop/resources/locales/pt-BR/common.json +32 -0
- package/apps/desktop/resources/locales/pt-BR/dialog.json +31 -0
- package/apps/desktop/resources/locales/pt-BR/menu.json +70 -0
- package/apps/desktop/resources/locales/ru-RU/common.json +32 -0
- package/apps/desktop/resources/locales/ru-RU/dialog.json +31 -0
- package/apps/desktop/resources/locales/ru-RU/menu.json +70 -0
- package/apps/desktop/resources/locales/tr-TR/common.json +32 -0
- package/apps/desktop/resources/locales/tr-TR/dialog.json +31 -0
- package/apps/desktop/resources/locales/tr-TR/menu.json +70 -0
- package/apps/desktop/resources/locales/vi-VN/common.json +32 -0
- package/apps/desktop/resources/locales/vi-VN/dialog.json +31 -0
- package/apps/desktop/resources/locales/vi-VN/menu.json +70 -0
- package/apps/desktop/resources/locales/zh-CN/common.json +32 -0
- package/apps/desktop/resources/locales/zh-CN/dialog.json +31 -0
- package/apps/desktop/resources/locales/zh-CN/menu.json +70 -0
- package/apps/desktop/resources/locales/zh-TW/common.json +32 -0
- package/apps/desktop/resources/locales/zh-TW/dialog.json +31 -0
- package/apps/desktop/resources/locales/zh-TW/menu.json +70 -0
- package/apps/desktop/resources/splash.html +88 -0
- package/apps/desktop/scripts/i18nWorkflow/const.ts +18 -0
- package/apps/desktop/scripts/i18nWorkflow/genDefaultLocale.ts +35 -0
- package/apps/desktop/scripts/i18nWorkflow/genDiff.ts +57 -0
- package/apps/desktop/scripts/i18nWorkflow/index.ts +35 -0
- package/apps/desktop/scripts/i18nWorkflow/utils.ts +54 -0
- package/apps/desktop/scripts/pglite-server.ts +14 -0
- package/apps/desktop/src/common/routes.ts +78 -0
- package/apps/desktop/src/main/appBrowsers.ts +47 -0
- package/apps/desktop/src/main/const/dir.ts +29 -0
- package/apps/desktop/src/main/const/env.ts +3 -0
- package/apps/desktop/src/main/const/store.ts +22 -0
- package/apps/desktop/src/main/controllers/AuthCtr.ts +390 -0
- package/apps/desktop/src/main/controllers/BrowserWindowsCtr.ts +95 -0
- package/apps/desktop/src/main/controllers/DevtoolsCtr.ts +9 -0
- package/apps/desktop/src/main/controllers/LocalFileCtr.ts +380 -0
- package/apps/desktop/src/main/controllers/MenuCtr.ts +29 -0
- package/apps/desktop/src/main/controllers/RemoteServerConfigCtr.ts +335 -0
- package/apps/desktop/src/main/controllers/RemoteServerSyncCtr.ts +321 -0
- package/apps/desktop/src/main/controllers/ShortcutCtr.ts +19 -0
- package/apps/desktop/src/main/controllers/SystemCtr.ts +93 -0
- package/apps/desktop/src/main/controllers/UpdaterCtr.ts +43 -0
- package/apps/desktop/src/main/controllers/UploadFileCtr.ts +34 -0
- package/apps/desktop/src/main/controllers/_template.ts +9 -0
- package/apps/desktop/src/main/controllers/index.ts +58 -0
- package/apps/desktop/src/main/core/App.ts +370 -0
- package/apps/desktop/src/main/core/Browser.ts +345 -0
- package/apps/desktop/src/main/core/BrowserManager.ts +154 -0
- package/apps/desktop/src/main/core/I18nManager.ts +185 -0
- package/apps/desktop/src/main/core/IoCContainer.ts +12 -0
- package/apps/desktop/src/main/core/MenuManager.ts +64 -0
- package/apps/desktop/src/main/core/ShortcutManager.ts +173 -0
- package/apps/desktop/src/main/core/StoreManager.ts +89 -0
- package/apps/desktop/src/main/core/UpdaterManager.ts +321 -0
- package/apps/desktop/src/main/index.ts +5 -0
- package/apps/desktop/src/main/locales/default/common.ts +34 -0
- package/apps/desktop/src/main/locales/default/dialog.ts +33 -0
- package/apps/desktop/src/main/locales/default/index.ts +11 -0
- package/apps/desktop/src/main/locales/default/menu.ts +72 -0
- package/apps/desktop/src/main/locales/resources.ts +35 -0
- package/apps/desktop/src/main/menus/impls/BaseMenuPlatform.ts +10 -0
- package/apps/desktop/src/main/menus/impls/linux.ts +243 -0
- package/apps/desktop/src/main/menus/impls/macOS.ts +360 -0
- package/apps/desktop/src/main/menus/impls/windows.ts +226 -0
- package/apps/desktop/src/main/menus/index.ts +34 -0
- package/apps/desktop/src/main/menus/types.ts +28 -0
- package/apps/desktop/src/main/modules/fileSearch/impl/macOS.ts +577 -0
- package/apps/desktop/src/main/modules/fileSearch/index.ts +23 -0
- package/apps/desktop/src/main/modules/fileSearch/type.ts +27 -0
- package/apps/desktop/src/main/modules/updater/configs.ts +22 -0
- package/apps/desktop/src/main/modules/updater/utils.ts +33 -0
- package/apps/desktop/src/main/services/fileSearchSrv.ts +35 -0
- package/apps/desktop/src/main/services/fileSrv.ts +255 -0
- package/apps/desktop/src/main/services/index.ts +9 -0
- package/apps/desktop/src/main/shortcuts/config.ts +18 -0
- package/apps/desktop/src/main/shortcuts/index.ts +1 -0
- package/apps/desktop/src/main/types/fileSearch.ts +51 -0
- package/apps/desktop/src/main/types/store.ts +14 -0
- package/apps/desktop/src/main/utils/file-system.ts +15 -0
- package/apps/desktop/src/main/utils/logger.ts +44 -0
- package/apps/desktop/src/main/utils/next-electron-rsc.ts +383 -0
- package/apps/desktop/src/preload/electronApi.ts +18 -0
- package/apps/desktop/src/preload/index.ts +14 -0
- package/apps/desktop/src/preload/invoke.ts +10 -0
- package/apps/desktop/src/preload/routeInterceptor.ts +162 -0
- package/apps/desktop/tsconfig.json +21 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/packages/electron-client-ipc/src/events/remoteServer.ts +11 -4
- package/packages/electron-client-ipc/src/types/dataSync.ts +15 -0
- package/packages/electron-client-ipc/src/types/index.ts +2 -1
- package/packages/electron-client-ipc/src/types/proxyTRPCRequest.ts +21 -0
- package/packages/electron-server-ipc/src/const.ts +3 -3
- package/packages/electron-server-ipc/src/ipcClient.test.ts +7 -6
- package/packages/electron-server-ipc/src/ipcClient.ts +17 -8
- package/packages/electron-server-ipc/src/ipcServer.ts +7 -3
- package/scripts/electronWorkflow/setDesktopVersion.ts +60 -43
- package/src/app/[variants]/(main)/_layout/Desktop/index.tsx +1 -1
- package/src/components/Analytics/Desktop.tsx +19 -0
- package/src/components/Analytics/index.tsx +3 -0
- package/src/database/core/db-adaptor.ts +4 -1
- package/src/database/core/electron.ts +317 -0
- package/src/{app/[variants]/(main)/_layout/Desktop/ElectronTitlebar/Connection/Mode.tsx → features/ElectronTitlebar/Connection/ConnectionMode.tsx} +24 -21
- package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/Connection/Option.tsx +3 -5
- package/src/{app/[variants]/(main)/_layout/Desktop/ElectronTitlebar/Connection/Sync.tsx → features/ElectronTitlebar/Connection/RemoteStatus.tsx} +10 -7
- package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/Connection/index.tsx +4 -4
- package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/UpdateModal.tsx +2 -1
- package/src/libs/trpc/client/async.ts +6 -0
- package/src/libs/trpc/client/edge.ts +6 -0
- package/src/libs/trpc/client/helpers/desktopRemoteRPCFetch.ts +72 -0
- package/src/libs/trpc/client/index.ts +1 -0
- package/src/libs/trpc/client/lambda.ts +10 -1
- package/src/libs/trpc/client/tools.ts +6 -0
- package/src/server/globalConfig/index.ts +0 -3
- package/src/server/modules/ElectronIPCClient/index.ts +3 -1
- package/src/server/routers/desktop/index.ts +2 -0
- package/src/server/routers/desktop/mcp.ts +47 -0
- package/src/server/routers/lambda/user.ts +38 -23
- package/src/server/routers/tools/mcp.ts +0 -6
- package/src/services/electron/remoteServer.ts +4 -4
- package/src/services/mcp.ts +17 -7
- package/src/services/upload.ts +9 -0
- package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +11 -2
- package/src/store/chat/slices/builtinTool/actions/localFile.ts +110 -53
- package/src/store/electron/actions/sync.ts +20 -19
- package/src/store/electron/initialState.ts +3 -3
- package/src/store/electron/selectors/sync.ts +6 -3
- package/src/store/electron/store.ts +2 -0
- package/src/store/file/slices/upload/action.ts +11 -3
- package/src/store/tool/selectors/tool.ts +10 -1
- package/src/utils/fetch/headers.ts +27 -0
- package/src/utils/fetch/index.ts +2 -0
- package/src/utils/fetch/request.ts +28 -0
- package/packages/electron-client-ipc/src/types/remoteServer.ts +0 -8
- /package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/Connection/Waiting.tsx +0 -0
- /package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/UpdateNotification.tsx +0 -0
- /package/src/{app/[variants]/(main)/_layout/Desktop → features}/ElectronTitlebar/index.tsx +0 -0
Binary file
|
Binary file
|
@@ -0,0 +1,92 @@
|
|
1
|
+
const dotenv = require('dotenv');
|
2
|
+
|
3
|
+
dotenv.config();
|
4
|
+
|
5
|
+
const packageJSON = require('./package.json');
|
6
|
+
|
7
|
+
const channel = process.env.UPDATE_CHANNEL || 'stable';
|
8
|
+
|
9
|
+
console.log(`🚄 Build Version ${packageJSON.version}, Channel: ${channel}`);
|
10
|
+
|
11
|
+
const isNightly = channel === 'nightly';
|
12
|
+
/**
|
13
|
+
* @type {import('electron-builder').Configuration}
|
14
|
+
* @see https://www.electron.build/configuration
|
15
|
+
*/
|
16
|
+
const config = {
|
17
|
+
appId: isNightly ? 'com.lobehub.lobehub-desktop-nightly' : 'com.lobehub.lobehub-desktop',
|
18
|
+
appImage: {
|
19
|
+
artifactName: '${productName}-${version}.${ext}',
|
20
|
+
},
|
21
|
+
asar: true,
|
22
|
+
detectUpdateChannel: true,
|
23
|
+
directories: {
|
24
|
+
buildResources: 'build',
|
25
|
+
output: 'release',
|
26
|
+
},
|
27
|
+
dmg: {
|
28
|
+
artifactName: '${productName}-${version}-${arch}.${ext}',
|
29
|
+
},
|
30
|
+
electronDownload: {
|
31
|
+
mirror: 'https://npmmirror.com/mirrors/electron/',
|
32
|
+
},
|
33
|
+
files: [
|
34
|
+
'dist',
|
35
|
+
'resources',
|
36
|
+
'!resources/locales',
|
37
|
+
'!dist/next/docs',
|
38
|
+
'!dist/next/packages',
|
39
|
+
'!dist/next/.next/server/app/sitemap',
|
40
|
+
'!dist/next/.next/static/media',
|
41
|
+
],
|
42
|
+
generateUpdatesFilesForAllChannels: true,
|
43
|
+
linux: {
|
44
|
+
category: 'Utility',
|
45
|
+
maintainer: 'electronjs.org',
|
46
|
+
target: ['AppImage', 'snap', 'deb'],
|
47
|
+
},
|
48
|
+
mac: {
|
49
|
+
compression: 'maximum',
|
50
|
+
entitlementsInherit: 'build/entitlements.mac.plist',
|
51
|
+
extendInfo: [
|
52
|
+
{ NSCameraUsageDescription: "Application requests access to the device's camera." },
|
53
|
+
{ NSMicrophoneUsageDescription: "Application requests access to the device's microphone." },
|
54
|
+
{
|
55
|
+
NSDocumentsFolderUsageDescription:
|
56
|
+
"Application requests access to the user's Documents folder.",
|
57
|
+
},
|
58
|
+
{
|
59
|
+
NSDownloadsFolderUsageDescription:
|
60
|
+
"Application requests access to the user's Downloads folder.",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
gatekeeperAssess: false,
|
64
|
+
hardenedRuntime: true,
|
65
|
+
notarize: true,
|
66
|
+
target: [
|
67
|
+
{ arch: ['x64', 'arm64'], target: 'dmg' },
|
68
|
+
{ arch: ['x64', 'arm64'], target: 'zip' },
|
69
|
+
],
|
70
|
+
},
|
71
|
+
npmRebuild: true,
|
72
|
+
nsis: {
|
73
|
+
artifactName: '${productName}-${version}-setup.${ext}',
|
74
|
+
createDesktopShortcut: 'always',
|
75
|
+
// allowToChangeInstallationDirectory: true,
|
76
|
+
// oneClick: false,
|
77
|
+
shortcutName: '${productName}',
|
78
|
+
uninstallDisplayName: '${productName}',
|
79
|
+
},
|
80
|
+
publish: [
|
81
|
+
{
|
82
|
+
owner: 'lobehub',
|
83
|
+
provider: 'github',
|
84
|
+
repo: 'lobe-chat',
|
85
|
+
},
|
86
|
+
],
|
87
|
+
win: {
|
88
|
+
executableName: 'LobeHub',
|
89
|
+
},
|
90
|
+
};
|
91
|
+
|
92
|
+
module.exports = config;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import dotenv from 'dotenv';
|
2
|
+
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
|
3
|
+
import { resolve } from 'node:path';
|
4
|
+
|
5
|
+
dotenv.config();
|
6
|
+
|
7
|
+
const updateChannel = process.env.UPDATE_CHANNEL || 'stable';
|
8
|
+
console.log(`[electron-vite.config.ts] Detected UPDATE_CHANNEL: ${updateChannel}`); // 添加日志确认
|
9
|
+
|
10
|
+
export default defineConfig({
|
11
|
+
main: {
|
12
|
+
build: {
|
13
|
+
outDir: 'dist/main',
|
14
|
+
},
|
15
|
+
// 这里是关键:在构建时进行文本替换
|
16
|
+
define: {
|
17
|
+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
18
|
+
'process.env.OFFICIAL_CLOUD_SERVER': JSON.stringify(process.env.OFFICIAL_CLOUD_SERVER),
|
19
|
+
'process.env.UPDATE_CHANNEL': JSON.stringify(process.env.UPDATE_CHANNEL),
|
20
|
+
},
|
21
|
+
plugins: [externalizeDepsPlugin({})],
|
22
|
+
resolve: {
|
23
|
+
alias: {
|
24
|
+
'@': resolve(__dirname, 'src/main'),
|
25
|
+
'~common': resolve(__dirname, 'src/common'),
|
26
|
+
},
|
27
|
+
},
|
28
|
+
},
|
29
|
+
preload: {
|
30
|
+
build: {
|
31
|
+
outDir: 'dist/preload',
|
32
|
+
},
|
33
|
+
plugins: [externalizeDepsPlugin({})],
|
34
|
+
resolve: {
|
35
|
+
alias: {
|
36
|
+
'~common': resolve(__dirname, 'src/common'),
|
37
|
+
},
|
38
|
+
},
|
39
|
+
},
|
40
|
+
});
|
@@ -0,0 +1,72 @@
|
|
1
|
+
{
|
2
|
+
"name": "lobehub-desktop-dev",
|
3
|
+
"version": "0.0.10",
|
4
|
+
"description": "LobeHub Desktop Application",
|
5
|
+
"homepage": "https://lobehub.com",
|
6
|
+
"repository": {
|
7
|
+
"type": "git",
|
8
|
+
"url": "https://github.com/lobehub/lobe-chat.git"
|
9
|
+
},
|
10
|
+
"author": "LobeHub",
|
11
|
+
"main": "./dist/main/index.js",
|
12
|
+
"scripts": {
|
13
|
+
"build": "npm run typecheck && electron-vite build",
|
14
|
+
"build-local": "npm run build && electron-builder --dir --config electron-builder.js --c.mac.notarize=false -c.mac.identity=null --c.asar=false",
|
15
|
+
"build:linux": "npm run build && electron-builder --linux --config electron-builder.js",
|
16
|
+
"build:mac": "npm run build && electron-builder --mac --config electron-builder.js",
|
17
|
+
"build:win": "npm run build && electron-builder --win --config electron-builder.js",
|
18
|
+
"electron:dev": "electron-vite dev",
|
19
|
+
"electron:run-unpack": "electron .",
|
20
|
+
"format": "prettier --write ",
|
21
|
+
"i18n": "bun run scripts/i18nWorkflow/index.ts && lobe-i18n",
|
22
|
+
"postinstall": "electron-builder install-app-deps",
|
23
|
+
"install-isolated": "pnpm install",
|
24
|
+
"lint": "eslint --cache ",
|
25
|
+
"pg-server": "bun run scripts/pglite-server.ts",
|
26
|
+
"start": "electron-vite preview",
|
27
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
28
|
+
},
|
29
|
+
"dependencies": {
|
30
|
+
"electron-updater": "^6.6.2",
|
31
|
+
"get-port-please": "^3.1.2",
|
32
|
+
"pdfjs-dist": "4.8.69"
|
33
|
+
},
|
34
|
+
"devDependencies": {
|
35
|
+
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
|
36
|
+
"@electron-toolkit/eslint-config-ts": "^3.0.0",
|
37
|
+
"@electron-toolkit/preload": "^3.0.1",
|
38
|
+
"@electron-toolkit/tsconfig": "^1.0.1",
|
39
|
+
"@electron-toolkit/utils": "^4.0.0",
|
40
|
+
"@lobechat/electron-client-ipc": "workspace:*",
|
41
|
+
"@lobechat/electron-server-ipc": "workspace:*",
|
42
|
+
"@lobechat/file-loaders": "workspace:*",
|
43
|
+
"@lobehub/i18n-cli": "^1.20.3",
|
44
|
+
"@types/lodash": "^4.17.0",
|
45
|
+
"@types/resolve": "^1.20.6",
|
46
|
+
"@types/semver": "^7.7.0",
|
47
|
+
"@types/set-cookie-parser": "^2.4.10",
|
48
|
+
"consola": "^3.1.0",
|
49
|
+
"cookie": "^1.0.2",
|
50
|
+
"electron": "^35.2.0",
|
51
|
+
"electron-builder": "^26.0.12",
|
52
|
+
"electron-is": "^3.0.0",
|
53
|
+
"electron-log": "^5.3.3",
|
54
|
+
"electron-store": "^8.2.0",
|
55
|
+
"electron-vite": "^3.0.0",
|
56
|
+
"execa": "^9.5.2",
|
57
|
+
"just-diff": "^6.0.2",
|
58
|
+
"lodash": "^4.17.21",
|
59
|
+
"pglite-server": "^0.1.4",
|
60
|
+
"resolve": "^1.22.8",
|
61
|
+
"semver": "^7.5.4",
|
62
|
+
"set-cookie-parser": "^2.7.1",
|
63
|
+
"tsx": "^4.19.3",
|
64
|
+
"typescript": "^5.7.3",
|
65
|
+
"vite": "^6.2.5"
|
66
|
+
},
|
67
|
+
"pnpm": {
|
68
|
+
"onlyBuiltDependencies": [
|
69
|
+
"electron"
|
70
|
+
]
|
71
|
+
}
|
72
|
+
}
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<title>LobeHub - 连接错误</title>
|
7
|
+
<style>
|
8
|
+
body {
|
9
|
+
-webkit-app-region: drag;
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
height: 100vh;
|
13
|
+
display: flex;
|
14
|
+
justify-content: center;
|
15
|
+
align-items: center;
|
16
|
+
font-family:
|
17
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
18
|
+
color: #1f1f1f;
|
19
|
+
overflow: hidden;
|
20
|
+
}
|
21
|
+
|
22
|
+
/* 添加暗色模式支持 */
|
23
|
+
@media (prefers-color-scheme: dark) {
|
24
|
+
body {
|
25
|
+
color: #f5f5f5;
|
26
|
+
background-color: #121212;
|
27
|
+
}
|
28
|
+
.error-message {
|
29
|
+
color: #f5f5f5;
|
30
|
+
}
|
31
|
+
.retry-button {
|
32
|
+
background-color: #2a2a2a;
|
33
|
+
color: #f5f5f5;
|
34
|
+
border: 1px solid #3a3a3a;
|
35
|
+
}
|
36
|
+
.retry-button:hover {
|
37
|
+
background-color: #3a3a3a;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
.container {
|
42
|
+
text-align: center;
|
43
|
+
padding: 2rem;
|
44
|
+
max-width: 500px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.lobe-brand {
|
48
|
+
width: 120px;
|
49
|
+
height: auto;
|
50
|
+
margin-bottom: 2rem;
|
51
|
+
}
|
52
|
+
|
53
|
+
.lobe-brand path {
|
54
|
+
fill: currentcolor;
|
55
|
+
}
|
56
|
+
|
57
|
+
.error-icon {
|
58
|
+
font-size: 3rem;
|
59
|
+
margin-bottom: 1rem;
|
60
|
+
color: #ff4d4f;
|
61
|
+
}
|
62
|
+
|
63
|
+
.error-title {
|
64
|
+
font-size: 1.5rem;
|
65
|
+
font-weight: 600;
|
66
|
+
margin-bottom: 1rem;
|
67
|
+
}
|
68
|
+
|
69
|
+
.error-message {
|
70
|
+
margin-bottom: 2rem;
|
71
|
+
line-height: 1.5;
|
72
|
+
color: #666;
|
73
|
+
}
|
74
|
+
|
75
|
+
.retry-button {
|
76
|
+
-webkit-app-region: no-drag;
|
77
|
+
padding: 0.75rem 1.5rem;
|
78
|
+
background-color: #f5f5f5;
|
79
|
+
color: #1f1f1f;
|
80
|
+
border: 1px solid #e0e0e0;
|
81
|
+
border-radius: 6px;
|
82
|
+
font-size: 1rem;
|
83
|
+
cursor: pointer;
|
84
|
+
transition: all 0.2s ease;
|
85
|
+
}
|
86
|
+
|
87
|
+
.retry-button:hover {
|
88
|
+
background-color: #e9e9e9;
|
89
|
+
}
|
90
|
+
</style>
|
91
|
+
</head>
|
92
|
+
<body>
|
93
|
+
<div class="container">
|
94
|
+
<div class="error-icon">⚠️</div>
|
95
|
+
<h1 class="error-title">Connection Error</h1>
|
96
|
+
<p class="error-message">
|
97
|
+
Unable to connect to the application, please check your network connection or confirm if the
|
98
|
+
development server is running.
|
99
|
+
</p>
|
100
|
+
|
101
|
+
<button id="retry-button" class="retry-button">Retry</button>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<script>
|
105
|
+
// 当按钮被点击时,通知主进程重试连接
|
106
|
+
const retryButton = document.getElementById('retry-button');
|
107
|
+
const errorMessage = document.querySelector('.error-message');
|
108
|
+
|
109
|
+
if (retryButton) {
|
110
|
+
retryButton.addEventListener('click', () => {
|
111
|
+
// 更新UI状态
|
112
|
+
retryButton.disabled = true;
|
113
|
+
retryButton.textContent = 'Retrying...';
|
114
|
+
errorMessage.textContent = 'Attempting to reconnect to the next server, please wait...';
|
115
|
+
|
116
|
+
// 调用主进程的重试逻辑
|
117
|
+
if (window.electron && window.electron.ipcRenderer) {
|
118
|
+
window.electron.ipcRenderer.invoke('retry-connection')
|
119
|
+
.then((result) => {
|
120
|
+
if (result && result.success) {
|
121
|
+
// 连接成功,无需额外操作,页面会自动导航
|
122
|
+
} else {
|
123
|
+
// 连接失败,重置按钮状态
|
124
|
+
setTimeout(() => {
|
125
|
+
retryButton.disabled = false;
|
126
|
+
retryButton.textContent = 'Retry';
|
127
|
+
errorMessage.textContent = 'Unable to connect to the application, please check your network connection or confirm if the development server is running.';
|
128
|
+
}, 1000);
|
129
|
+
}
|
130
|
+
});
|
131
|
+
}
|
132
|
+
});
|
133
|
+
}
|
134
|
+
</script>
|
135
|
+
</body>
|
136
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"add": "إضافة",
|
4
|
+
"back": "عودة",
|
5
|
+
"cancel": "إلغاء",
|
6
|
+
"close": "إغلاق",
|
7
|
+
"confirm": "تأكيد",
|
8
|
+
"delete": "حذف",
|
9
|
+
"edit": "تعديل",
|
10
|
+
"more": "المزيد",
|
11
|
+
"next": "التالي",
|
12
|
+
"ok": "حسناً",
|
13
|
+
"previous": "السابق",
|
14
|
+
"refresh": "تحديث",
|
15
|
+
"remove": "إزالة",
|
16
|
+
"retry": "إعادة المحاولة",
|
17
|
+
"save": "حفظ",
|
18
|
+
"search": "بحث",
|
19
|
+
"submit": "إرسال"
|
20
|
+
},
|
21
|
+
"app": {
|
22
|
+
"description": "منصة تعاون مساعدك الذكي",
|
23
|
+
"name": "LobeHub"
|
24
|
+
},
|
25
|
+
"status": {
|
26
|
+
"error": "خطأ",
|
27
|
+
"info": "معلومات",
|
28
|
+
"loading": "جارٍ التحميل",
|
29
|
+
"success": "نجاح",
|
30
|
+
"warning": "تحذير"
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"about": {
|
3
|
+
"button": "تأكيد",
|
4
|
+
"detail": "تطبيق دردشة يعتمد على نموذج لغة كبير",
|
5
|
+
"message": "{{appName}} {{appVersion}}",
|
6
|
+
"title": "حول"
|
7
|
+
},
|
8
|
+
"confirm": {
|
9
|
+
"cancel": "إلغاء",
|
10
|
+
"no": "لا",
|
11
|
+
"title": "تأكيد",
|
12
|
+
"yes": "نعم"
|
13
|
+
},
|
14
|
+
"error": {
|
15
|
+
"button": "تأكيد",
|
16
|
+
"detail": "حدث خطأ أثناء العملية، يرجى المحاولة لاحقًا",
|
17
|
+
"message": "حدث خطأ",
|
18
|
+
"title": "خطأ"
|
19
|
+
},
|
20
|
+
"update": {
|
21
|
+
"downloadAndInstall": "تنزيل وتثبيت",
|
22
|
+
"downloadComplete": "اكتمل التنزيل",
|
23
|
+
"downloadCompleteMessage": "تم تنزيل حزمة التحديث، هل ترغب في التثبيت الآن؟",
|
24
|
+
"installLater": "تثبيت لاحقًا",
|
25
|
+
"installNow": "تثبيت الآن",
|
26
|
+
"later": "تذكير لاحقًا",
|
27
|
+
"newVersion": "تم اكتشاف إصدار جديد",
|
28
|
+
"newVersionAvailable": "تم اكتشاف إصدار جديد: {{version}}",
|
29
|
+
"skipThisVersion": "تخطي هذا الإصدار"
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"common": {
|
3
|
+
"checkUpdates": "التحقق من التحديثات..."
|
4
|
+
},
|
5
|
+
"dev": {
|
6
|
+
"devPanel": "لوحة المطور",
|
7
|
+
"devTools": "أدوات المطور",
|
8
|
+
"forceReload": "إعادة تحميل قسري",
|
9
|
+
"openStore": "فتح ملف التخزين",
|
10
|
+
"refreshMenu": "تحديث القائمة",
|
11
|
+
"reload": "إعادة تحميل",
|
12
|
+
"title": "تطوير"
|
13
|
+
},
|
14
|
+
"edit": {
|
15
|
+
"copy": "نسخ",
|
16
|
+
"cut": "قص",
|
17
|
+
"paste": "لصق",
|
18
|
+
"redo": "إعادة",
|
19
|
+
"selectAll": "تحديد الكل",
|
20
|
+
"speech": "صوت",
|
21
|
+
"startSpeaking": "بدء القراءة",
|
22
|
+
"stopSpeaking": "إيقاف القراءة",
|
23
|
+
"title": "تحرير",
|
24
|
+
"undo": "تراجع"
|
25
|
+
},
|
26
|
+
"file": {
|
27
|
+
"preferences": "التفضيلات",
|
28
|
+
"quit": "خروج",
|
29
|
+
"title": "ملف"
|
30
|
+
},
|
31
|
+
"help": {
|
32
|
+
"about": "حول",
|
33
|
+
"githubRepo": "مستودع GitHub",
|
34
|
+
"reportIssue": "الإبلاغ عن مشكلة",
|
35
|
+
"title": "مساعدة",
|
36
|
+
"visitWebsite": "زيارة الموقع الرسمي"
|
37
|
+
},
|
38
|
+
"macOS": {
|
39
|
+
"about": "حول {{appName}}",
|
40
|
+
"devTools": "أدوات مطور LobeHub",
|
41
|
+
"hide": "إخفاء {{appName}}",
|
42
|
+
"hideOthers": "إخفاء الآخرين",
|
43
|
+
"preferences": "إعدادات مفضلة...",
|
44
|
+
"services": "خدمات",
|
45
|
+
"unhide": "إظهار الكل"
|
46
|
+
},
|
47
|
+
"tray": {
|
48
|
+
"open": "فتح {{appName}}",
|
49
|
+
"quit": "خروج",
|
50
|
+
"show": "عرض {{appName}}"
|
51
|
+
},
|
52
|
+
"view": {
|
53
|
+
"forceReload": "إعادة تحميل قسري",
|
54
|
+
"reload": "إعادة تحميل",
|
55
|
+
"resetZoom": "إعادة تعيين التكبير",
|
56
|
+
"title": "عرض",
|
57
|
+
"toggleFullscreen": "تبديل وضع ملء الشاشة",
|
58
|
+
"zoomIn": "تكبير",
|
59
|
+
"zoomOut": "تصغير"
|
60
|
+
},
|
61
|
+
"window": {
|
62
|
+
"bringAllToFront": "إحضار جميع النوافذ إلى الأمام",
|
63
|
+
"close": "إغلاق",
|
64
|
+
"front": "إحضار جميع النوافذ إلى الأمام",
|
65
|
+
"minimize": "تصغير",
|
66
|
+
"title": "نافذة",
|
67
|
+
"toggleFullscreen": "تبديل وضع ملء الشاشة",
|
68
|
+
"zoom": "تكبير"
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"add": "Добави",
|
4
|
+
"back": "Назад",
|
5
|
+
"cancel": "Отмени",
|
6
|
+
"close": "Затвори",
|
7
|
+
"confirm": "Потвърди",
|
8
|
+
"delete": "Изтрий",
|
9
|
+
"edit": "Редактирай",
|
10
|
+
"more": "Повече",
|
11
|
+
"next": "Следващ",
|
12
|
+
"ok": "Добре",
|
13
|
+
"previous": "Предишен",
|
14
|
+
"refresh": "Освежи",
|
15
|
+
"remove": "Премахни",
|
16
|
+
"retry": "Опитай отново",
|
17
|
+
"save": "Запази",
|
18
|
+
"search": "Търси",
|
19
|
+
"submit": "Изпрати"
|
20
|
+
},
|
21
|
+
"app": {
|
22
|
+
"description": "Твоята платформа за сътрудничество с AI асистент",
|
23
|
+
"name": "LobeHub"
|
24
|
+
},
|
25
|
+
"status": {
|
26
|
+
"error": "Грешка",
|
27
|
+
"info": "Информация",
|
28
|
+
"loading": "Зареждане",
|
29
|
+
"success": "Успех",
|
30
|
+
"warning": "Предупреждение"
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"about": {
|
3
|
+
"button": "Потвърди",
|
4
|
+
"detail": "Приложение за чат, базирано на голям езиков модел",
|
5
|
+
"message": "{{appName}} {{appVersion}}",
|
6
|
+
"title": "За нас"
|
7
|
+
},
|
8
|
+
"confirm": {
|
9
|
+
"cancel": "Отказ",
|
10
|
+
"no": "Не",
|
11
|
+
"title": "Потвърждение",
|
12
|
+
"yes": "Да"
|
13
|
+
},
|
14
|
+
"error": {
|
15
|
+
"button": "Потвърди",
|
16
|
+
"detail": "Възникна грешка по време на операцията, моля опитайте отново по-късно",
|
17
|
+
"message": "Възникна грешка",
|
18
|
+
"title": "Грешка"
|
19
|
+
},
|
20
|
+
"update": {
|
21
|
+
"downloadAndInstall": "Изтегли и инсталирай",
|
22
|
+
"downloadComplete": "Изтеглянето е завършено",
|
23
|
+
"downloadCompleteMessage": "Актуализационният пакет е изтеглен, желаете ли да го инсталирате веднага?",
|
24
|
+
"installLater": "Инсталирай по-късно",
|
25
|
+
"installNow": "Инсталирай сега",
|
26
|
+
"later": "Напомни по-късно",
|
27
|
+
"newVersion": "Открита нова версия",
|
28
|
+
"newVersionAvailable": "Открита нова версия: {{version}}",
|
29
|
+
"skipThisVersion": "Пропусни тази версия"
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"common": {
|
3
|
+
"checkUpdates": "Проверка за актуализации..."
|
4
|
+
},
|
5
|
+
"dev": {
|
6
|
+
"devPanel": "Панел на разработчика",
|
7
|
+
"devTools": "Инструменти за разработчици",
|
8
|
+
"forceReload": "Принудително презареждане",
|
9
|
+
"openStore": "Отворете файла за съхранение",
|
10
|
+
"refreshMenu": "Освежаване на менюто",
|
11
|
+
"reload": "Презареждане",
|
12
|
+
"title": "Разработка"
|
13
|
+
},
|
14
|
+
"edit": {
|
15
|
+
"copy": "Копиране",
|
16
|
+
"cut": "Изрязване",
|
17
|
+
"paste": "Поставяне",
|
18
|
+
"redo": "Повторно",
|
19
|
+
"selectAll": "Избери всичко",
|
20
|
+
"speech": "Глас",
|
21
|
+
"startSpeaking": "Започни четене",
|
22
|
+
"stopSpeaking": "Спри четенето",
|
23
|
+
"title": "Редактиране",
|
24
|
+
"undo": "Отмяна"
|
25
|
+
},
|
26
|
+
"file": {
|
27
|
+
"preferences": "Предпочитания",
|
28
|
+
"quit": "Изход",
|
29
|
+
"title": "Файл"
|
30
|
+
},
|
31
|
+
"help": {
|
32
|
+
"about": "За",
|
33
|
+
"githubRepo": "GitHub хранилище",
|
34
|
+
"reportIssue": "Докладвай проблем",
|
35
|
+
"title": "Помощ",
|
36
|
+
"visitWebsite": "Посети уебсайта"
|
37
|
+
},
|
38
|
+
"macOS": {
|
39
|
+
"about": "За {{appName}}",
|
40
|
+
"devTools": "Инструменти за разработчици на LobeHub",
|
41
|
+
"hide": "Скрий {{appName}}",
|
42
|
+
"hideOthers": "Скрий другите",
|
43
|
+
"preferences": "Настройки...",
|
44
|
+
"services": "Услуги",
|
45
|
+
"unhide": "Покажи всичко"
|
46
|
+
},
|
47
|
+
"tray": {
|
48
|
+
"open": "Отвори {{appName}}",
|
49
|
+
"quit": "Изход",
|
50
|
+
"show": "Покажи {{appName}}"
|
51
|
+
},
|
52
|
+
"view": {
|
53
|
+
"forceReload": "Принудително презареждане",
|
54
|
+
"reload": "Презареждане",
|
55
|
+
"resetZoom": "Нулиране на мащаба",
|
56
|
+
"title": "Изглед",
|
57
|
+
"toggleFullscreen": "Превключи на цял екран",
|
58
|
+
"zoomIn": "Увеличи",
|
59
|
+
"zoomOut": "Намали"
|
60
|
+
},
|
61
|
+
"window": {
|
62
|
+
"bringAllToFront": "Премести всички прозорци напред",
|
63
|
+
"close": "Затвори",
|
64
|
+
"front": "Премести всички прозорци напред",
|
65
|
+
"minimize": "Минимизирай",
|
66
|
+
"title": "Прозорец",
|
67
|
+
"toggleFullscreen": "Превключи на цял екран",
|
68
|
+
"zoom": "Мащаб"
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"actions": {
|
3
|
+
"add": "Hinzufügen",
|
4
|
+
"back": "Zurück",
|
5
|
+
"cancel": "Abbrechen",
|
6
|
+
"close": "Schließen",
|
7
|
+
"confirm": "Bestätigen",
|
8
|
+
"delete": "Löschen",
|
9
|
+
"edit": "Bearbeiten",
|
10
|
+
"more": "Mehr",
|
11
|
+
"next": "Weiter",
|
12
|
+
"ok": "OK",
|
13
|
+
"previous": "Zurück",
|
14
|
+
"refresh": "Aktualisieren",
|
15
|
+
"remove": "Entfernen",
|
16
|
+
"retry": "Erneut versuchen",
|
17
|
+
"save": "Speichern",
|
18
|
+
"search": "Suchen",
|
19
|
+
"submit": "Einreichen"
|
20
|
+
},
|
21
|
+
"app": {
|
22
|
+
"description": "Ihre KI-Assistenten-Kollaborationsplattform",
|
23
|
+
"name": "LobeHub"
|
24
|
+
},
|
25
|
+
"status": {
|
26
|
+
"error": "Fehler",
|
27
|
+
"info": "Information",
|
28
|
+
"loading": "Lädt",
|
29
|
+
"success": "Erfolg",
|
30
|
+
"warning": "Warnung"
|
31
|
+
}
|
32
|
+
}
|