@lobehub/chat 1.83.7 → 1.83.8

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.
@@ -75,7 +75,7 @@ jobs:
75
75
  # PR 构建:在基础版本号上添加 PR 信息
76
76
  pr_number="${{ github.event.pull_request.number }}"
77
77
  ci_build_number="${{ github.run_number }}" # CI 构建编号
78
- version="${base_version}-nightly.pr${pr_number}.${ci_build_number}"
78
+ version="0.0.0-nightly.pr${pr_number}.${ci_build_number}"
79
79
  echo "version=${version}" >> $GITHUB_OUTPUT
80
80
  echo "📦 Release Version: ${version} (based on base version ${base_version})"
81
81
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.83.8](https://github.com/lobehub/lobe-chat/compare/v1.83.7...v1.83.8)
6
+
7
+ <sup>Released on **2025-04-28**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix cloud data sync.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix cloud data sync, closes [#7600](https://github.com/lobehub/lobe-chat/issues/7600) ([1214544](https://github.com/lobehub/lobe-chat/commit/1214544))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.83.7](https://github.com/lobehub/lobe-chat/compare/v1.83.6...v1.83.7)
6
31
 
7
32
  <sup>Released on **2025-04-27**</sup>
@@ -86,8 +86,6 @@ export default class RemoteServerSyncCtr extends ControllerModule {
86
86
  // 1. Determine target URL and prepare request options
87
87
  const targetUrl = new URL(urlPath, remoteServerUrl); // Combine base URL and path
88
88
 
89
- logger.debug(`${logPrefix} Forwarding to ${targetUrl.pathname.toString()}`); // Enhanced log
90
-
91
89
  // Prepare headers, cloning and adding Authorization
92
90
  const requestHeaders: OutgoingHttpHeaders = { ...originalHeaders }; // Use OutgoingHttpHeaders
93
91
  requestHeaders['Authorization'] = `Bearer ${accessToken}`;
@@ -120,9 +118,6 @@ export default class RemoteServerSyncCtr extends ControllerModule {
120
118
 
121
119
  clientRes.on('end', () => {
122
120
  const responseBody = Buffer.concat(chunks);
123
- logger.debug(
124
- `${logPrefix} Received response from ${targetUrl.toString()}: ${clientRes.statusCode}`,
125
- ); // Enhanced log
126
121
  resolve({
127
122
  // These are IncomingHttpHeaders
128
123
  body: responseBody,
@@ -193,7 +188,8 @@ export default class RemoteServerSyncCtr extends ControllerModule {
193
188
  urlPath: args.urlPath, // Log headers too for context
194
189
  });
195
190
 
196
- const logPrefix = `[ProxyTRPC ${args.method} ${args.urlPath}]`; // Prefix for this specific request
191
+ const url = new URL(args.urlPath, 'http://a.b');
192
+ const logPrefix = `[ProxyTRPC ${args.method} ${url.pathname}]`; // Prefix for this specific request
197
193
 
198
194
  try {
199
195
  const config = await this.remoteServerConfigCtr.getRemoteServerConfig();
@@ -1,6 +1,7 @@
1
1
  import { ElectronIPCEventHandler, ElectronIPCServer } from '@lobechat/electron-server-ipc';
2
2
  import { Session, app, ipcMain, protocol } from 'electron';
3
3
  import { macOS, windows } from 'electron-is';
4
+ import os from 'node:os';
4
5
  import { join } from 'node:path';
5
6
 
6
7
  import { name } from '@/../../package.json';
@@ -54,6 +55,13 @@ export class App {
54
55
  }
55
56
 
56
57
  constructor() {
58
+ logger.info('----------------------------------------------');
59
+ // Log system information
60
+ logger.info(` OS: ${os.platform()} (${os.arch()})`);
61
+ logger.info(` CPU: ${os.cpus().length} cores`);
62
+ logger.info(` RAM: ${Math.round(os.totalmem() / 1024 / 1024 / 1024)} GB`);
63
+ logger.info(`PATH: ${app.getAppPath()}`);
64
+ logger.info(` lng: ${app.getLocale()}`);
57
65
  logger.info('----------------------------------------------');
58
66
  logger.info('Starting LobeHub...');
59
67
 
@@ -251,6 +251,12 @@ export class MacOSMenu extends BaseMenuPlatform implements IMenuPlatform {
251
251
  },
252
252
  label: '更新缓存目录',
253
253
  },
254
+ {
255
+ click: () => {
256
+ this.app.storeManager.openInEditor();
257
+ },
258
+ label: '打开 Settings 配置文件',
259
+ },
254
260
  { type: 'separator' },
255
261
  {
256
262
  label: '自动更新测试模拟',
@@ -24,8 +24,9 @@ export const createLogger = (namespace: string) => {
24
24
  },
25
25
  info: (message, ...args) => {
26
26
  if (process.env.NODE_ENV === 'production') {
27
- electronLog.info(message, ...args);
27
+ electronLog.info(`[${namespace}]`, message, ...args);
28
28
  }
29
+
29
30
  debugLogger(`INFO: ${message}`, ...args);
30
31
  },
31
32
  verbose: (message, ...args) => {
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix cloud data sync."
6
+ ]
7
+ },
8
+ "date": "2025-04-28",
9
+ "version": "1.83.8"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.83.7",
3
+ "version": "1.83.8",
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",
@@ -12,17 +12,14 @@ interface SyncProps {
12
12
  const RemoteStatus = memo<SyncProps>(({ onClick }) => {
13
13
  const { t } = useTranslation('electron');
14
14
 
15
- const [isIniting, isSyncActive, useRemoteServerConfig, useRefreshDataWhenActive] =
16
- useElectronStore((s) => [
17
- !s.isInitRemoteServerConfig,
18
- electronSyncSelectors.isSyncActive(s),
19
- s.useDataSyncConfig,
20
- s.useRefreshDataWhenActive,
21
- ]);
15
+ const [isIniting, isSyncActive, useRemoteServerConfig] = useElectronStore((s) => [
16
+ !s.isInitRemoteServerConfig,
17
+ electronSyncSelectors.isSyncActive(s),
18
+ s.useDataSyncConfig,
19
+ ]);
22
20
 
23
21
  // 使用useSWR获取远程服务器配置
24
22
  useRemoteServerConfig();
25
- useRefreshDataWhenActive(isSyncActive);
26
23
 
27
24
  return (
28
25
  <ActionIcon
@@ -1,5 +1,7 @@
1
1
  import useSWR, { SWRHook } from 'swr';
2
2
 
3
+ import { isDesktop } from '@/const/version';
4
+
3
5
  /**
4
6
  * This type of request method is relatively flexible data, which will be triggered on the first time
5
7
  *
@@ -25,7 +27,12 @@ export const useClientDataSWR: SWRHook = (key, fetch, config) =>
25
27
  // Cause issue like this: https://github.com/lobehub/lobe-chat/issues/532
26
28
  // we need to set it to 0.
27
29
  dedupingInterval: 0,
28
- focusThrottleInterval: 5 * 60 * 1000,
30
+ focusThrottleInterval:
31
+ // desktop 1.5s
32
+ isDesktop
33
+ ? 1500
34
+ : // web 300s
35
+ 5 * 60 * 1000,
29
36
  refreshWhenOffline: false,
30
37
  revalidateOnFocus: true,
31
38
  revalidateOnReconnect: true,
@@ -17,7 +17,6 @@ export interface ElectronRemoteServerAction {
17
17
  refreshServerConfig: () => Promise<void>;
18
18
  refreshUserData: () => Promise<void>;
19
19
  useDataSyncConfig: () => SWRResponse;
20
- useRefreshDataWhenActive: (active?: boolean) => SWRResponse;
21
20
  }
22
21
 
23
22
  const REMOTE_SERVER_CONFIG_KEY = 'electron:getRemoteServerConfig';
@@ -109,14 +108,12 @@ export const remoteSyncSlice: StateCreator<
109
108
  },
110
109
  {
111
110
  onSuccess: (data) => {
111
+ if (!isEqual(data, get().dataSyncConfig)) {
112
+ get().refreshUserData();
113
+ }
114
+
112
115
  set({ dataSyncConfig: data, isInitRemoteServerConfig: true });
113
116
  },
114
117
  },
115
118
  ),
116
- useRefreshDataWhenActive: (active) =>
117
- useSWR(['refreshDataWhenActive', active], async () => {
118
- if (!active) return;
119
-
120
- await get().refreshUserData();
121
- }),
122
119
  });
@@ -1,6 +0,0 @@
1
- # LobeHub Desktop
2
-
3
- 构建路径:
4
-
5
- - dist: 构建产物路径
6
- - release: 发布产物路径