@lobehub/lobehub 2.0.0-next.311 → 2.0.0-next.313

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.
Files changed (151) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/apps/desktop/src/main/controllers/AuthCtr.ts +75 -7
  3. package/changelog/v1.json +21 -0
  4. package/docs/usage/providers/internlm.mdx +2 -2
  5. package/docs/usage/providers/internlm.zh-CN.mdx +3 -3
  6. package/e2e/README.md +1 -1
  7. package/e2e/src/features/community/detail-pages.feature +2 -2
  8. package/e2e/src/features/community/interactions.feature +5 -5
  9. package/e2e/src/features/community/smoke.feature +1 -1
  10. package/e2e/src/steps/community/detail-pages.steps.ts +6 -4
  11. package/e2e/src/steps/community/interactions.steps.ts +3 -3
  12. package/locales/en-US/error.json +10 -1
  13. package/locales/en-US/subscription.json +1 -1
  14. package/locales/zh-CN/desktop-onboarding.json +5 -0
  15. package/locales/zh-CN/error.json +10 -1
  16. package/locales/zh-CN/subscription.json +1 -1
  17. package/package.json +1 -1
  18. package/packages/agent-runtime/src/agents/GeneralChatAgent.ts +14 -2
  19. package/packages/agent-runtime/src/agents/__tests__/GeneralChatAgent.test.ts +275 -1
  20. package/packages/builtin-tool-agent-builder/src/systemRole.ts +9 -0
  21. package/packages/builtin-tool-cloud-sandbox/package.json +1 -0
  22. package/packages/builtin-tool-cloud-sandbox/src/ExecutionRuntime/index.ts +105 -134
  23. package/packages/builtin-tool-cloud-sandbox/src/executor/index.ts +254 -0
  24. package/packages/builtin-tool-cloud-sandbox/src/index.ts +1 -0
  25. package/packages/builtin-tool-cloud-sandbox/src/types/api.ts +22 -0
  26. package/packages/builtin-tool-cloud-sandbox/src/types/index.ts +4 -0
  27. package/packages/builtin-tool-cloud-sandbox/src/types/params.ts +85 -0
  28. package/packages/builtin-tool-cloud-sandbox/src/types/service.ts +48 -0
  29. package/packages/builtin-tool-cloud-sandbox/src/{types.ts → types/state.ts} +0 -23
  30. package/packages/builtin-tool-memory/src/manifest.ts +5 -5
  31. package/packages/editor-runtime/src/__tests__/EditorRuntime.real.test.ts +1 -1
  32. package/packages/editor-runtime/src/__tests__/EditorRuntime.test.ts +1 -1
  33. package/packages/electron-client-ipc/src/events/index.ts +5 -1
  34. package/packages/electron-client-ipc/src/events/remoteServer.ts +23 -0
  35. package/packages/memory-user-memory/src/schemas/index.ts +0 -1
  36. package/packages/model-bank/src/modelProviders/internlm.ts +1 -1
  37. package/packages/model-runtime/src/core/RouterRuntime/createRuntime.ts +5 -15
  38. package/packages/model-runtime/src/providers/internlm/index.test.ts +15 -15
  39. package/packages/model-runtime/src/providers/internlm/index.ts +1 -1
  40. package/packages/types/src/tool/intervention.ts +4 -2
  41. package/packages/types/src/user/preference.ts +1 -0
  42. package/public/favicon-32x-32-error.ico +0 -0
  43. package/public/favicon-32x32-done-dev.ico +0 -0
  44. package/public/favicon-32x32-done.ico +0 -0
  45. package/public/favicon-32x32-error-dev.ico +0 -0
  46. package/public/favicon-32x32-progress-dev.ico +0 -0
  47. package/public/favicon-32x32-progress.ico +0 -0
  48. package/public/favicon-done-dev.ico +0 -0
  49. package/public/favicon-done.ico +0 -0
  50. package/public/favicon-error-dev.ico +0 -0
  51. package/public/favicon-error.ico +0 -0
  52. package/public/favicon-progress-dev.ico +0 -0
  53. package/public/favicon-progress.ico +0 -0
  54. package/src/app/[variants]/(desktop)/desktop-onboarding/features/LoginStep.tsx +84 -26
  55. package/src/app/[variants]/(main)/_layout/DesktopAutoOidcOnFirstOpen.tsx +4 -0
  56. package/src/app/[variants]/(main)/agent/profile/features/Header/AgentPublishButton/PublishResultModal.tsx +1 -1
  57. package/src/app/[variants]/(main)/community/(detail)/_layout/Header.tsx +15 -3
  58. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Overview/TagList.tsx +1 -1
  59. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Related/index.tsx +2 -2
  60. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/SystemRole/TagList.tsx +1 -1
  61. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/SystemRole/index.tsx +1 -1
  62. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Header.tsx +2 -2
  63. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/ActionButton/AddAgent.tsx +1 -1
  64. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/ActionButton/index.tsx +1 -1
  65. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/Related/index.tsx +2 -2
  66. package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/StatusPage/index.tsx +2 -2
  67. package/src/app/[variants]/(main)/community/(detail)/user/features/UserAgentCard.tsx +2 -2
  68. package/src/app/[variants]/(main)/community/(detail)/user/features/UserFavoriteAgents.tsx +1 -1
  69. package/src/app/[variants]/(main)/community/(list)/(home)/index.tsx +2 -2
  70. package/src/app/[variants]/(main)/community/(list)/(home)/loading.tsx +1 -1
  71. package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/Client.tsx +5 -1
  72. package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/Category/index.tsx +1 -1
  73. package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/List/Item.tsx +1 -1
  74. package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/MarketSourceSwitch.tsx +1 -1
  75. package/src/app/[variants]/(main)/community/_layout/Sidebar/Header/Nav.tsx +2 -2
  76. package/src/app/[variants]/(main)/home/features/CommunityAgents/List.tsx +1 -1
  77. package/src/app/[variants]/(main)/home/features/CommunityAgents/index.tsx +1 -1
  78. package/src/app/[variants]/(mobile)/_layout/index.tsx +1 -1
  79. package/src/app/[variants]/(mobile)/router/mobileRouter.config.tsx +6 -6
  80. package/src/app/[variants]/router/desktopRouter.config.tsx +8 -8
  81. package/src/app/[variants]/share/t/[id]/_layout/index.tsx +1 -1
  82. package/src/business/server/user.ts +4 -0
  83. package/src/features/CommandMenu/SearchResults.tsx +1 -1
  84. package/src/features/Conversation/Messages/Task/Actions/index.tsx +0 -2
  85. package/src/features/Conversation/Messages/Task/index.tsx +1 -1
  86. package/src/features/Conversation/Messages/Tasks/shared/ProcessingState.tsx +0 -2
  87. package/src/features/Electron/navigation/routeMetadata.ts +1 -1
  88. package/src/features/NavPanel/components/NavPanelDraggable.tsx +0 -14
  89. package/src/features/ResourceManager/components/Explorer/ItemDropdown/useFileItemDropdown.tsx +4 -3
  90. package/src/features/SharePopover/index.tsx +5 -3
  91. package/src/hooks/useAppOrigin.ts +16 -0
  92. package/src/layout/GlobalProvider/FaviconProvider.tsx +92 -0
  93. package/src/layout/GlobalProvider/index.tsx +15 -11
  94. package/src/layout/GlobalProvider/useUserStateRedirect.ts +37 -24
  95. package/src/libs/next/config/define-config.ts +1 -1
  96. package/src/libs/trusted-client/index.ts +2 -5
  97. package/src/locales/default/desktop-onboarding.ts +5 -0
  98. package/src/locales/default/error.ts +11 -0
  99. package/src/locales/default/subscription.ts +1 -1
  100. package/src/server/modules/AgentRuntime/RuntimeExecutors.ts +2 -0
  101. package/src/server/routers/lambda/user.ts +24 -10
  102. package/src/server/services/agentRuntime/AgentRuntimeService.test.ts +3 -0
  103. package/src/server/services/agentRuntime/AgentRuntimeService.ts +8 -5
  104. package/src/server/services/agentRuntime/types.ts +7 -0
  105. package/src/server/services/aiAgent/__tests__/execGroupSubAgentTask.test.ts +3 -0
  106. package/src/server/services/aiAgent/index.ts +10 -4
  107. package/src/server/services/market/index.ts +7 -0
  108. package/src/server/services/sandbox/index.ts +120 -0
  109. package/src/server/services/toolExecution/builtin.ts +12 -18
  110. package/src/server/services/toolExecution/index.ts +1 -1
  111. package/src/server/services/toolExecution/serverRuntimes/cloudSandbox.ts +31 -0
  112. package/src/server/services/toolExecution/serverRuntimes/index.ts +55 -0
  113. package/src/server/services/toolExecution/serverRuntimes/types.ts +14 -0
  114. package/src/server/services/toolExecution/serverRuntimes/webBrowsing.ts +20 -0
  115. package/src/server/services/toolExecution/types.ts +2 -0
  116. package/src/server/sitemap.test.ts +5 -5
  117. package/src/server/sitemap.ts +3 -3
  118. package/src/services/{codeInterpreter.ts → cloudSandbox.ts} +3 -3
  119. package/src/services/electron/remoteServer.ts +8 -0
  120. package/src/store/chat/agents/GroupOrchestration/__tests__/batch-exec-async-tasks.test.ts +626 -0
  121. package/src/store/chat/agents/GroupOrchestration/createGroupOrchestrationExecutors.ts +294 -0
  122. package/src/store/chat/slices/plugin/action.test.ts +0 -48
  123. package/src/store/chat/slices/plugin/actions/pluginTypes.ts +0 -131
  124. package/src/store/tool/slices/builtin/executors/index.ts +2 -0
  125. package/src/store/user/slices/settings/selectors/toolIntervention.test.ts +143 -0
  126. package/src/store/user/slices/settings/selectors/toolIntervention.ts +11 -2
  127. package/packages/memory-user-memory/src/schemas/jsonSchemas.ts +0 -37
  128. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/DetailProvider.tsx +0 -0
  129. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/Block.tsx +0 -0
  130. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/Knowledge.tsx +0 -0
  131. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/KnowledgeItem.tsx +0 -0
  132. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/PluginItem.tsx +0 -0
  133. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/Plugins.tsx +0 -0
  134. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Capabilities/index.tsx +0 -0
  135. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Nav.tsx +0 -0
  136. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Overview/index.tsx +0 -0
  137. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/Versions/index.tsx +0 -0
  138. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Details/index.tsx +0 -0
  139. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/Related/Item.tsx +0 -0
  140. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/Summary/index.tsx +0 -0
  141. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/TocList/index.tsx +0 -0
  142. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/features/Sidebar/index.tsx +0 -0
  143. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/index.tsx +0 -0
  144. /package/src/app/[variants]/(main)/community/(detail)/{assistant → agent}/loading.tsx +0 -0
  145. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/_layout/index.tsx +0 -0
  146. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/_layout/style.ts +0 -0
  147. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/Category/useCategory.tsx +0 -0
  148. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/List/TokenTag.tsx +0 -0
  149. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/features/List/index.tsx +0 -0
  150. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/index.tsx +0 -0
  151. /package/src/app/[variants]/(main)/community/(list)/{assistant → agent}/loading.tsx +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,65 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.313](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.312...v2.0.0-next.313)
6
+
7
+ <sup>Released on **2026-01-19**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix server agent task run with headless, internlm provider base url and homepage.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix server agent task run with headless, closes [#11600](https://github.com/lobehub/lobe-chat/issues/11600) ([435eede](https://github.com/lobehub/lobe-chat/commit/435eede))
21
+ - **misc**: Internlm provider base url and homepage, closes [#11612](https://github.com/lobehub/lobe-chat/issues/11612) ([38725da](https://github.com/lobehub/lobe-chat/commit/38725da))
22
+
23
+ </details>
24
+
25
+ <div align="right">
26
+
27
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
28
+
29
+ </div>
30
+
31
+ ## [Version 2.0.0-next.312](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.311...v2.0.0-next.312)
32
+
33
+ <sup>Released on **2026-01-19**</sup>
34
+
35
+ #### ♻ Code Refactoring
36
+
37
+ - **misc**: Change the /community/assistant to /agent routes.
38
+
39
+ #### ✨ Features
40
+
41
+ - **misc**: Improve the agentbuilder systemRole.
42
+
43
+ <br/>
44
+
45
+ <details>
46
+ <summary><kbd>Improvements and Fixes</kbd></summary>
47
+
48
+ #### Code refactoring
49
+
50
+ - **misc**: Change the /community/assistant to /agent routes, closes [#11606](https://github.com/lobehub/lobe-chat/issues/11606) ([7f004c5](https://github.com/lobehub/lobe-chat/commit/7f004c5))
51
+
52
+ #### What's improved
53
+
54
+ - **misc**: Improve the agentbuilder systemRole, closes [#11608](https://github.com/lobehub/lobe-chat/issues/11608) ([2f032d4](https://github.com/lobehub/lobe-chat/commit/2f032d4))
55
+
56
+ </details>
57
+
58
+ <div align="right">
59
+
60
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
61
+
62
+ </div>
63
+
5
64
  ## [Version 2.0.0-next.311](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.310...v2.0.0-next.311)
6
65
 
7
66
  <sup>Released on **2026-01-19**</sup>
@@ -1,4 +1,9 @@
1
- import { DataSyncConfig, MarketAuthorizationParams } from '@lobechat/electron-client-ipc';
1
+ import {
2
+ AuthorizationPhase,
3
+ AuthorizationProgress,
4
+ DataSyncConfig,
5
+ MarketAuthorizationParams,
6
+ } from '@lobechat/electron-client-ipc';
2
7
  import { BrowserWindow, shell } from 'electron';
3
8
  import crypto from 'node:crypto';
4
9
  import querystring from 'node:querystring';
@@ -9,9 +14,11 @@ import { createLogger } from '@/utils/logger';
9
14
  import RemoteServerConfigCtr from './RemoteServerConfigCtr';
10
15
  import { ControllerModule, IpcMethod } from './index';
11
16
 
12
- // Create logger
13
17
  const logger = createLogger('controllers:AuthCtr');
14
18
 
19
+ const MAX_POLL_TIME = 2 * 60 * 1000; // 2 minutes (reduced from 5 minutes for better UX)
20
+ const POLL_INTERVAL = 3000; // 3 seconds
21
+
15
22
  /**
16
23
  * Authentication Controller
17
24
  * Implements OAuth authorization flow using intermediate page + polling mechanism
@@ -107,6 +114,12 @@ export default class AuthCtr extends ControllerModule {
107
114
  await shell.openExternal(authUrl.toString());
108
115
  logger.debug('Opening authorization URL in default browser');
109
116
 
117
+ this.broadcastAuthorizationProgress({
118
+ elapsed: 0,
119
+ maxPollTime: MAX_POLL_TIME,
120
+ phase: 'browser_opened',
121
+ });
122
+
110
123
  // Start polling for credentials
111
124
  this.startPolling();
112
125
 
@@ -117,6 +130,24 @@ export default class AuthCtr extends ControllerModule {
117
130
  }
118
131
  }
119
132
 
133
+ /**
134
+ * Cancel current authorization process
135
+ */
136
+ @IpcMethod()
137
+ async cancelAuthorization() {
138
+ if (this.authRequestState) {
139
+ logger.info('User cancelled authorization');
140
+ this.clearAuthorizationState();
141
+ this.broadcastAuthorizationProgress({
142
+ elapsed: 0,
143
+ maxPollTime: MAX_POLL_TIME,
144
+ phase: 'cancelled',
145
+ });
146
+ return { success: true };
147
+ }
148
+ return { error: 'No active authorization', success: false };
149
+ }
150
+
120
151
  /**
121
152
  * Request Market OAuth authorization (desktop)
122
153
  */
@@ -152,14 +183,29 @@ export default class AuthCtr extends ControllerModule {
152
183
  }
153
184
 
154
185
  logger.info('Starting credential polling');
155
- const pollInterval = 3000; // 3 seconds
156
- const maxPollTime = 5 * 60 * 1000; // 5 minutes
186
+
157
187
  const startTime = Date.now();
158
188
 
189
+ // Broadcast initial state
190
+ this.broadcastAuthorizationProgress({
191
+ elapsed: 0,
192
+ maxPollTime: MAX_POLL_TIME,
193
+ phase: 'waiting_for_auth',
194
+ });
195
+
159
196
  this.pollingInterval = setInterval(async () => {
197
+ const elapsed = Date.now() - startTime;
198
+
199
+ // Broadcast progress on every tick
200
+ this.broadcastAuthorizationProgress({
201
+ elapsed,
202
+ maxPollTime: MAX_POLL_TIME,
203
+ phase: 'waiting_for_auth',
204
+ });
205
+
160
206
  try {
161
207
  // Check if polling has timed out
162
- if (Date.now() - startTime > maxPollTime) {
208
+ if (elapsed > MAX_POLL_TIME) {
163
209
  logger.warn('Credential polling timed out');
164
210
  this.clearAuthorizationState();
165
211
  this.broadcastAuthorizationFailed('Authorization timed out');
@@ -173,6 +219,13 @@ export default class AuthCtr extends ControllerModule {
173
219
  logger.info('Successfully received credentials from polling');
174
220
  this.stopPolling();
175
221
 
222
+ // Broadcast verifying state
223
+ this.broadcastAuthorizationProgress({
224
+ elapsed,
225
+ maxPollTime: MAX_POLL_TIME,
226
+ phase: 'verifying',
227
+ });
228
+
176
229
  // Validate state parameter
177
230
  if (result.state !== this.authRequestState) {
178
231
  logger.error(
@@ -198,7 +251,7 @@ export default class AuthCtr extends ControllerModule {
198
251
  this.clearAuthorizationState();
199
252
  this.broadcastAuthorizationFailed('Polling error: ' + error.message);
200
253
  }
201
- }, pollInterval);
254
+ }, POLL_INTERVAL);
202
255
  }
203
256
 
204
257
  /**
@@ -511,6 +564,21 @@ export default class AuthCtr extends ControllerModule {
511
564
  }
512
565
  }
513
566
 
567
+ /**
568
+ * Broadcast authorization progress event
569
+ */
570
+ private broadcastAuthorizationProgress(progress: AuthorizationProgress) {
571
+ // Avoid logging too frequently
572
+ // logger.debug('Broadcasting authorizationProgress event');
573
+ const allWindows = BrowserWindow.getAllWindows();
574
+
575
+ for (const win of allWindows) {
576
+ if (!win.isDestroyed()) {
577
+ win.webContents.send('authorizationProgress', progress);
578
+ }
579
+ }
580
+ }
581
+
514
582
  /**
515
583
  * Broadcast authorization failed event
516
584
  */
@@ -563,7 +631,7 @@ export default class AuthCtr extends ControllerModule {
563
631
  // Hash codeVerifier using SHA-256
564
632
  const encoder = new TextEncoder();
565
633
  const data = encoder.encode(codeVerifier);
566
- const digest = await crypto.subtle.digest('SHA-256', data as unknown as NodeJS.BufferSource);
634
+ const digest = await crypto.subtle.digest('SHA-256', data.buffer);
567
635
 
568
636
  // Convert hash result to base64url encoding
569
637
  const challenge = Buffer.from(digest)
package/changelog/v1.json CHANGED
@@ -1,4 +1,25 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix server agent task run with headless, internlm provider base url and homepage."
6
+ ]
7
+ },
8
+ "date": "2026-01-19",
9
+ "version": "2.0.0-next.313"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Change the /community/assistant to /agent routes."
15
+ ],
16
+ "features": [
17
+ "Improve the agentbuilder systemRole."
18
+ ]
19
+ },
20
+ "date": "2026-01-19",
21
+ "version": "2.0.0-next.312"
22
+ },
2
23
  {
3
24
  "children": {
4
25
  "improvements": [
@@ -14,7 +14,7 @@ tags:
14
14
 
15
15
  <Image cover src={'https://github.com/user-attachments/assets/be7dcd49-0165-4f7b-bf90-0739cc9dd212'} />
16
16
 
17
- [InternLM](https://platform.sensenova.cn/home) is a large pre-trained language model jointly launched by the Shanghai Artificial Intelligence Laboratory and Shusheng Group. This model focuses on natural language processing, aimed at understanding and generating human language, boasting powerful semantic comprehension and text generation capabilities.
17
+ [InternLM](https://internlm.intern-ai.org.cn/) is a large pre-trained language model jointly launched by the Shanghai Artificial Intelligence Laboratory and Shusheng Group. This model focuses on natural language processing, aimed at understanding and generating human language, boasting powerful semantic comprehension and text generation capabilities.
18
18
 
19
19
  This article will guide you on how to use InternLM in LobeChat.
20
20
 
@@ -39,7 +39,7 @@ This article will guide you on how to use InternLM in LobeChat.
39
39
 
40
40
  <Image alt={'Enter API Key'} inStep src={'https://github.com/user-attachments/assets/8ec7656e-1e3d-41e0-95a0-f6883135c2fc'} />
41
41
 
42
- - Enter the obtained `AccessKey ID` and `AccessKey Secret`
42
+ - Enter the obtained API Key
43
43
  - Choose a InternLM model for your AI assistant to start a conversation
44
44
 
45
45
  <Image alt={'Select InternLM Model and Start Conversation'} inStep src={'https://github.com/user-attachments/assets/76ad163e-ee19-4f95-a712-85bea764d3ec'} />
@@ -12,7 +12,7 @@ tags:
12
12
 
13
13
  <Image cover src={'https://github.com/user-attachments/assets/be7dcd49-0165-4f7b-bf90-0739cc9dd212'} />
14
14
 
15
- [书生浦语(InternLM)](https://platform.sensenova.cn/home) 是由上海人工智能实验室与书生集团联合推出的一款大型预训练语言模型。该模型专注于自然语言处理,旨在理解和生成自然语言,具备强大的语义理解和文本生成能力。
15
+ [书生浦语(InternLM)](https://internlm.intern-ai.org.cn/) 是由上海人工智能实验室与书生集团联合推出的一款大型预训练语言模型。该模型专注于自然语言处理,旨在理解和生成自然语言,具备强大的语义理解和文本生成能力。
16
16
 
17
17
  本文将指导你如何在 LobeChat 中使用书生浦语。
18
18
 
@@ -32,11 +32,11 @@ tags:
32
32
  ### 步骤二:在 LobeChat 中配置书生浦语
33
33
 
34
34
  - 访问 LobeChat 的`设置`界面
35
- - 在`AI 服务商`下找到 `书生浦语` 的设置项
35
+ - 在`AI 服务商`下找到 `书生` 的设置项
36
36
 
37
37
  <Image alt={'填入 API 密钥'} inStep src={'https://github.com/user-attachments/assets/8ec7656e-1e3d-41e0-95a0-f6883135c2fc'} />
38
38
 
39
- - 填入获得的 `AccessKey ID` 和 `AccessKey Secret`
39
+ - 填入获得的 API Key
40
40
  - 为你的 AI 助手选择一个书生浦语的模型即可开始对话
41
41
 
42
42
  <Image alt={'选择书生浦语模型并开始对话'} inStep src={'https://github.com/user-attachments/assets/76ad163e-ee19-4f95-a712-85bea764d3ec'} />
package/e2e/README.md CHANGED
@@ -90,7 +90,7 @@ Feature: Community Smoke Tests
90
90
 
91
91
  @COMMUNITY-SMOKE-001 @P0
92
92
  Scenario: Load community assistant list page
93
- Given I navigate to "/community/assistant"
93
+ Given I navigate to "/community/agent"
94
94
  Then the page should load without errors
95
95
  And I should see the page body
96
96
  And I should see the search bar
@@ -11,7 +11,7 @@ Feature: Discover Detail Pages
11
11
 
12
12
  @COMMUNITY-DETAIL-001 @P1
13
13
  Scenario: Load assistant detail page and verify content
14
- Given I navigate to "/community/assistant"
14
+ Given I navigate to "/community/agent"
15
15
  And I wait for the page to fully load
16
16
  When I click on the first assistant card
17
17
  Then I should be on an assistant detail page
@@ -22,7 +22,7 @@ Feature: Discover Detail Pages
22
22
 
23
23
  @COMMUNITY-DETAIL-002 @P1
24
24
  Scenario: Navigate back from assistant detail page
25
- Given I navigate to "/community/assistant"
25
+ Given I navigate to "/community/agent"
26
26
  And I wait for the page to fully load
27
27
  And I click on the first assistant card
28
28
  When I click the back button
@@ -11,14 +11,14 @@ Feature: Discover Interactions
11
11
 
12
12
  @COMMUNITY-INTERACT-001 @P1
13
13
  Scenario: Search for assistants
14
- Given I navigate to "/community/assistant"
14
+ Given I navigate to "/community/agent"
15
15
  When I type "developer" in the search bar
16
16
  And I wait for the search results to load
17
17
  Then I should see filtered assistant cards
18
18
 
19
19
  @COMMUNITY-INTERACT-002 @P1
20
20
  Scenario: Filter assistants by category
21
- Given I navigate to "/community/assistant"
21
+ Given I navigate to "/community/agent"
22
22
  When I click on a category in the category menu
23
23
  And I wait for the filtered results to load
24
24
  Then I should see assistant cards filtered by the selected category
@@ -26,7 +26,7 @@ Feature: Discover Interactions
26
26
 
27
27
  @COMMUNITY-INTERACT-003 @P1
28
28
  Scenario: Navigate to next page of assistants
29
- Given I navigate to "/community/assistant"
29
+ Given I navigate to "/community/agent"
30
30
  When I click the next page button
31
31
  And I wait for the next page to load
32
32
  Then I should see different assistant cards
@@ -34,7 +34,7 @@ Feature: Discover Interactions
34
34
 
35
35
  @COMMUNITY-INTERACT-004 @P1
36
36
  Scenario: Navigate to assistant detail page
37
- Given I navigate to "/community/assistant"
37
+ Given I navigate to "/community/agent"
38
38
  When I click on the first assistant card
39
39
  Then I should be navigated to the assistant detail page
40
40
  And I should see the assistant detail content
@@ -95,7 +95,7 @@ Feature: Discover Interactions
95
95
  Scenario: Navigate from home to assistant list
96
96
  Given I navigate to "/community"
97
97
  When I click on the "more" link in the featured assistants section
98
- Then I should be navigated to "/community/assistant"
98
+ Then I should be navigated to "/community/agent"
99
99
  And I should see the page body
100
100
 
101
101
  @COMMUNITY-INTERACT-011 @P1
@@ -12,7 +12,7 @@ Feature: Community Smoke Tests
12
12
 
13
13
  @COMMUNITY-SMOKE-002 @P0
14
14
  Scenario: Load Assistant List Page
15
- Given I navigate to "/community/assistant"
15
+ Given I navigate to "/community/agent"
16
16
  Then the page should load without errors
17
17
  And I should see the page body
18
18
  And I should see the search bar
@@ -8,7 +8,7 @@ import { CustomWorld } from '../../support/world';
8
8
  // ============================================
9
9
 
10
10
  Given('I wait for the page to fully load', async function (this: CustomWorld) {
11
- // Use domcontentloaded instead of networkidle to avoid hanging on persistent connections
11
+ // Use domcontentloaded instead of networkidle to avoid hanging on persistent connections
12
12
  await this.page.waitForLoadState('domcontentloaded', { timeout: 10_000 });
13
13
  // Short wait for React hydration
14
14
  await this.page.waitForTimeout(1000);
@@ -135,9 +135,9 @@ Then('I should be on the assistant list page', async function (this: CustomWorld
135
135
 
136
136
  const currentUrl = this.page.url();
137
137
  // Check if URL is assistant list (not detail page) or community home
138
- // After back navigation, URL should be /community/assistant or /community
138
+ // After back navigation, URL should be /community/agent or /community
139
139
  const isListPage =
140
- (currentUrl.includes('/community/assistant') &&
140
+ (currentUrl.includes('/community/agent') &&
141
141
  !/\/community\/assistant\/[\dA-Za-z-]+$/.test(currentUrl)) ||
142
142
  currentUrl.endsWith('/community') ||
143
143
  currentUrl.includes('/community#');
@@ -176,7 +176,9 @@ Then('I should see the model description', async function (this: CustomWorld) {
176
176
 
177
177
  // Model detail page shows description below the title, it might be a placeholder like "model.description"
178
178
  // or actual content. Just verify the page structure is correct.
179
- const descriptionArea = this.page.locator('main, article, [class*="detail"], [class*="content"]').first();
179
+ const descriptionArea = this.page
180
+ .locator('main, article, [class*="detail"], [class*="content"]')
181
+ .first();
180
182
  const isVisible = await descriptionArea.isVisible().catch(() => false);
181
183
 
182
184
  // Pass if any content area is visible - the description might be a placeholder
@@ -376,11 +376,11 @@ Then('the URL should contain the category parameter', async function (this: Cust
376
376
  console.log(` 📍 Selected category: ${this.testContext.selectedCategory}`);
377
377
 
378
378
  // Check if URL contains a category-related parameter
379
- // The URL format is: /community/assistant?category=xxx
379
+ // The URL format is: /community/agent?category=xxx
380
380
  const hasCategory =
381
381
  currentUrl.includes('category=') ||
382
382
  currentUrl.includes('tag=') ||
383
- // For path-based routing like /community/assistant/category-name
383
+ // For path-based routing like /community/agent/category-name
384
384
  /\/community\/assistant\/[^/?]+/.test(currentUrl);
385
385
 
386
386
  expect(
@@ -418,7 +418,7 @@ Then('the URL should contain the page parameter', async function (this: CustomWo
418
418
  if (this.testContext.usedInfiniteScroll) {
419
419
  console.log(' 📍 Used infinite scroll, page parameter not expected');
420
420
  // Just verify we're still on the assistant page
421
- expect(currentUrl.includes('/community/assistant')).toBeTruthy();
421
+ expect(currentUrl.includes('/community/agent')).toBeTruthy();
422
422
  return;
423
423
  }
424
424
 
@@ -12,6 +12,11 @@
12
12
  "import.importConfigFile.title": "Import Failed",
13
13
  "import.incompatible.description": "This file was exported from a higher version. Please try upgrading to the latest version and then re-importing.",
14
14
  "import.incompatible.title": "Current application does not support importing this file",
15
+ "inviteCode.currentEmail": "Current account: {{email}}",
16
+ "inviteCode.desc": "An invite code is required to access LobeHub. Please enter a valid invite code to continue.",
17
+ "inviteCode.friends": "Friends",
18
+ "inviteCode.getCodeHint": "Get an invite code from:",
19
+ "inviteCode.title": "Invite Code Required",
15
20
  "loginRequired.desc": "You will be redirected to the login page shortly",
16
21
  "loginRequired.title": "Please log in to use this feature",
17
22
  "notFound.backHome": "Back to Home",
@@ -144,5 +149,9 @@
144
149
  "upload.networkError": "Please check your network connection and ensure that the file storage service's cross-origin configuration is correct.",
145
150
  "upload.title": "File upload failed. Please check your network connection or try again later",
146
151
  "upload.unknownError": "Error reason: {{reason}}",
147
- "upload.uploadFailed": "File upload failed."
152
+ "upload.uploadFailed": "File upload failed.",
153
+ "waitlist.currentEmail": "Current account: {{email}}",
154
+ "waitlist.desc": "Your account is not on the whitelist. Please contact the administrator to request access.",
155
+ "waitlist.switchAccount": "Switch Account",
156
+ "waitlist.title": "Access Restricted"
148
157
  }
@@ -288,7 +288,7 @@
288
288
  "referral.rules.backfill.description": "Forgot to enter invite code? You can backfill within 3 days of registration",
289
289
  "referral.rules.backfill.expiredTip": "Backfill period has expired. Cannot backfill after 3 days of registration",
290
290
  "referral.rules.backfill.link": "Backfill Invite Code",
291
- "referral.rules.backfill.placeholder": "Enter invite code",
291
+ "referral.rules.backfill.placeholder": "Enter invite code or link",
292
292
  "referral.rules.backfill.submit": "Confirm Binding",
293
293
  "referral.rules.backfill.success": "Invite code bound successfully",
294
294
  "referral.rules.backfill.title": "Backfill Invite Code",
@@ -58,6 +58,7 @@
58
58
  "screen4.title": "您希望如何共享数据?",
59
59
  "screen4.title2": "您的选择将帮助我们改进",
60
60
  "screen4.title3": "您可以随时在设置中更改",
61
+ "screen5.actions.cancel": "取消",
61
62
  "screen5.actions.connectToServer": "连接服务器",
62
63
  "screen5.actions.connecting": "正在连接…",
63
64
  "screen5.actions.signInCloud": "登录 LobeHub Cloud",
@@ -65,6 +66,10 @@
65
66
  "screen5.actions.signingIn": "正在登录…",
66
67
  "screen5.actions.signingOut": "正在退出…",
67
68
  "screen5.actions.tryAgain": "重试",
69
+ "screen5.auth.phase.browserOpened": "浏览器已打开,请前往登录…",
70
+ "screen5.auth.phase.verifying": "正在验证凭证…",
71
+ "screen5.auth.phase.waitingForAuth": "等待授权完成…",
72
+ "screen5.auth.remaining": "剩余时间:{{time}}秒",
68
73
  "screen5.badge": "登录",
69
74
  "screen5.description": "登录以在所有设备间同步代理、群组、设置和上下文。",
70
75
  "screen5.errors.desktopOnlyOidc": "OIDC 授权仅在桌面端运行时可用。",
@@ -12,6 +12,11 @@
12
12
  "import.importConfigFile.title": "导入遇到了问题",
13
13
  "import.incompatible.description": "该文件由更高版本导出。请升级到最新版后再导入",
14
14
  "import.incompatible.title": "版本不兼容",
15
+ "inviteCode.currentEmail": "当前账号:{{email}}",
16
+ "inviteCode.desc": "需要邀请码才能访问 LobeHub。请输入有效的邀请码以继续。",
17
+ "inviteCode.friends": "好友",
18
+ "inviteCode.getCodeHint": "获取邀请码:",
19
+ "inviteCode.title": "需要邀请码",
15
20
  "loginRequired.desc": "将为你跳转到登录页。登录后即可继续",
16
21
  "loginRequired.title": "需要登录后继续",
17
22
  "notFound.backHome": "返回首页",
@@ -144,5 +149,9 @@
144
149
  "upload.networkError": "网络异常或跨域配置不正确。请检查文件存储服务的 CORS 设置后重试",
145
150
  "upload.title": "上传未能完成",
146
151
  "upload.unknownError": "原因:{{reason}}",
147
- "upload.uploadFailed": "上传未能完成"
152
+ "upload.uploadFailed": "上传未能完成",
153
+ "waitlist.currentEmail": "当前账号:{{email}}",
154
+ "waitlist.desc": "你的账号不在白名单中。请联系管理员申请访问权限。",
155
+ "waitlist.switchAccount": "切换账号",
156
+ "waitlist.title": "访问受限"
148
157
  }
@@ -288,7 +288,7 @@
288
288
  "referral.rules.backfill.description": "忘记填写邀请码?注册三天内可以补填",
289
289
  "referral.rules.backfill.expiredTip": "补填期限已过,注册超过三天后无法补填",
290
290
  "referral.rules.backfill.link": "补填邀请码",
291
- "referral.rules.backfill.placeholder": "请输入邀请码",
291
+ "referral.rules.backfill.placeholder": "请输入邀请码或链接",
292
292
  "referral.rules.backfill.submit": "确认绑定",
293
293
  "referral.rules.backfill.success": "邀请码绑定成功",
294
294
  "referral.rules.backfill.title": "补填邀请码",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.311",
3
+ "version": "2.0.0-next.313",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent 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",
@@ -88,10 +88,22 @@ export class GeneralChatAgent implements Agent {
88
88
  }
89
89
 
90
90
  // Priority 0: CRITICAL - Check security blacklist FIRST
91
- // This overrides ALL other settings, including auto-run mode
92
91
  const securityCheck = InterventionChecker.checkSecurityBlacklist(securityBlacklist, toolArgs);
92
+
93
+ // Priority 0.5: Headless mode - fully automated for async tasks
94
+ // In headless mode: blacklisted tools are skipped, all other tools execute directly
95
+ if (approvalMode === 'headless') {
96
+ if (securityCheck.blocked) {
97
+ // Skip blacklisted tools entirely (don't execute, don't wait for approval)
98
+ continue;
99
+ }
100
+ // All other tools execute directly
101
+ toolsToExecute.push(toolCalling);
102
+ continue;
103
+ }
104
+
105
+ // For non-headless modes: security blacklist requires intervention
93
106
  if (securityCheck.blocked) {
94
- // Security blacklist always requires intervention
95
107
  toolsNeedingIntervention.push(toolCalling);
96
108
  continue;
97
109
  }