@lobehub/lobehub 2.0.0-next.112 → 2.0.0-next.114
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/.github/workflows/sync.yml +2 -2
- package/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/package.json +1 -1
- package/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/TopicContent.tsx +9 -8
- package/src/app/[variants]/(main)/chat/components/topic/features/Topic/TopicListContent/TopicItem/index.tsx +3 -0
- package/src/layout/GlobalProvider/StoreInitialization.tsx +5 -1
- package/src/store/aiInfra/slices/aiProvider/action.ts +26 -10
|
@@ -30,8 +30,8 @@ jobs:
|
|
|
30
30
|
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
|
|
31
31
|
with:
|
|
32
32
|
upstream_sync_repo: lobehub/lobe-chat
|
|
33
|
-
upstream_sync_branch:
|
|
34
|
-
target_sync_branch:
|
|
33
|
+
upstream_sync_branch: next
|
|
34
|
+
target_sync_branch: next
|
|
35
35
|
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
|
|
36
36
|
test_mode: false
|
|
37
37
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.114](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.113...v2.0.0-next.114)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-11-25**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fixed the topic link dropdown error.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fixed the topic link dropdown error, closes [#10408](https://github.com/lobehub/lobe-chat/issues/10408) ([864e3d5](https://github.com/lobehub/lobe-chat/commit/864e3d5))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 2.0.0-next.113](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.112...v2.0.0-next.113)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2025-11-25**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fixed when desktop userId was change manytimes the aimodel not right.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fixed when desktop userId was change manytimes the aimodel not right, closes [#10389](https://github.com/lobehub/lobe-chat/issues/10389) ([3ed8153](https://github.com/lobehub/lobe-chat/commit/3ed8153))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 2.0.0-next.112](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.111...v2.0.0-next.112)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2025-11-24**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"fixes": [
|
|
5
|
+
"Fixed the topic link dropdown error."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2025-11-25",
|
|
9
|
+
"version": "2.0.0-next.114"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {
|
|
13
|
+
"fixes": [
|
|
14
|
+
"Fixed when desktop userId was change manytimes the aimodel not right."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"date": "2025-11-25",
|
|
18
|
+
"version": "2.0.0-next.113"
|
|
19
|
+
},
|
|
2
20
|
{
|
|
3
21
|
"children": {
|
|
4
22
|
"improvements": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.114",
|
|
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",
|
|
@@ -97,15 +97,15 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
|
|
|
97
97
|
},
|
|
98
98
|
...(isDesktop
|
|
99
99
|
? [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
100
|
+
{
|
|
101
|
+
icon: <Icon icon={ExternalLink} />,
|
|
102
|
+
key: 'openInNewWindow',
|
|
103
|
+
label: t('actions.openInNewWindow'),
|
|
104
|
+
onClick: () => {
|
|
105
|
+
openTopicInNewWindow(activeId, id);
|
|
107
106
|
},
|
|
108
|
-
|
|
107
|
+
},
|
|
108
|
+
]
|
|
109
109
|
: []),
|
|
110
110
|
{
|
|
111
111
|
type: 'divider',
|
|
@@ -237,6 +237,7 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
|
|
|
237
237
|
className="topic-more"
|
|
238
238
|
icon={MoreVertical}
|
|
239
239
|
onClick={(e) => {
|
|
240
|
+
e.preventDefault();
|
|
240
241
|
e.stopPropagation();
|
|
241
242
|
}}
|
|
242
243
|
size={'small'}
|
|
@@ -67,6 +67,9 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
|
|
|
67
67
|
<Flexbox style={{ position: 'relative' }}>
|
|
68
68
|
<Link
|
|
69
69
|
onClick={(e) => {
|
|
70
|
+
if (e.button === 0 && (e.metaKey || e.ctrlKey)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
70
73
|
e.preventDefault();
|
|
71
74
|
toggleTopic(id);
|
|
72
75
|
toggleConfig(false);
|
|
@@ -15,6 +15,8 @@ import { serverConfigSelectors } from '@/store/serverConfig/selectors';
|
|
|
15
15
|
import { useUrlHydrationStore } from '@/store/urlHydration';
|
|
16
16
|
import { useUserStore } from '@/store/user';
|
|
17
17
|
import { authSelectors } from '@/store/user/selectors';
|
|
18
|
+
import { electronSyncSelectors } from '@/store/electron/selectors';
|
|
19
|
+
import { useElectronStore } from '@/store/electron';
|
|
18
20
|
|
|
19
21
|
const StoreInitialization = memo(() => {
|
|
20
22
|
// prefetch error ns to avoid don't show error content correctly
|
|
@@ -63,8 +65,10 @@ const StoreInitialization = memo(() => {
|
|
|
63
65
|
// init inbox agent and default agent config
|
|
64
66
|
useInitAgentStore(isLoginOnInit, serverConfig.defaultAgent?.config);
|
|
65
67
|
|
|
68
|
+
const isSyncActive = useElectronStore((s) => electronSyncSelectors.isSyncActive(s));
|
|
69
|
+
|
|
66
70
|
// init user provider key vaults
|
|
67
|
-
useInitAiProviderKeyVaults(isLoginOnInit);
|
|
71
|
+
useInitAiProviderKeyVaults(isLoginOnInit,isSyncActive);
|
|
68
72
|
|
|
69
73
|
// init user state
|
|
70
74
|
useInitUserState(isLoginOnInit, serverConfig, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDesktop } from '@lobechat/const';
|
|
1
|
+
import { DESKTOP_USER_ID, isDesktop } from '@lobechat/const';
|
|
2
2
|
import { getModelPropertyWithFallback, resolveImageSinglePrice } from '@lobechat/model-runtime';
|
|
3
3
|
import { uniqBy } from 'lodash-es';
|
|
4
4
|
import {
|
|
@@ -16,7 +16,7 @@ import { useClientDataSWR } from '@/libs/swr';
|
|
|
16
16
|
import { aiProviderService } from '@/services/aiProvider';
|
|
17
17
|
import { AiInfraStore } from '@/store/aiInfra/store';
|
|
18
18
|
import { useUserStore } from '@/store/user';
|
|
19
|
-
import { authSelectors } from '@/store/user/selectors';
|
|
19
|
+
import { authSelectors, userProfileSelectors } from '@/store/user/selectors';
|
|
20
20
|
import {
|
|
21
21
|
AiProviderDetailItem,
|
|
22
22
|
AiProviderListItem,
|
|
@@ -77,10 +77,10 @@ export const normalizeImageModel = async (
|
|
|
77
77
|
const fallbackParametersPromise = model.parameters
|
|
78
78
|
? Promise.resolve<ModelParamsSchema | undefined>(model.parameters)
|
|
79
79
|
: getModelPropertyWithFallback<ModelParamsSchema | undefined>(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
model.id,
|
|
81
|
+
'parameters',
|
|
82
|
+
model.providerId,
|
|
83
|
+
);
|
|
84
84
|
|
|
85
85
|
const modelWithPricing = model as AIImageModelCard;
|
|
86
86
|
const fallbackPricingPromise = modelWithPricing.pricing
|
|
@@ -194,6 +194,7 @@ export interface AiProviderAction {
|
|
|
194
194
|
*/
|
|
195
195
|
useFetchAiProviderRuntimeState: (
|
|
196
196
|
isLoginOnInit: boolean | undefined,
|
|
197
|
+
isSyncActive?: boolean,
|
|
197
198
|
) => SWRResponse<AiProviderRuntimeStateWithBuiltinModels | undefined>;
|
|
198
199
|
}
|
|
199
200
|
|
|
@@ -318,11 +319,27 @@ export const createAiProviderSlice: StateCreator<
|
|
|
318
319
|
},
|
|
319
320
|
),
|
|
320
321
|
|
|
321
|
-
useFetchAiProviderRuntimeState: (isLogin) => {
|
|
322
|
-
const isAuthLoaded = authSelectors.isLoaded
|
|
322
|
+
useFetchAiProviderRuntimeState: (isLogin, isSyncActive?) => {
|
|
323
|
+
const isAuthLoaded = useUserStore(authSelectors.isLoaded);
|
|
324
|
+
const userId = useUserStore(userProfileSelectors.userId);
|
|
323
325
|
// Only fetch when auth is loaded and login status is explicitly defined (true or false)
|
|
324
326
|
// Prevents unnecessary requests when login state is null/undefined
|
|
325
|
-
|
|
327
|
+
let shouldFetch = isAuthLoaded && isLogin !== null && isLogin !== undefined;
|
|
328
|
+
|
|
329
|
+
if (isDesktop) {
|
|
330
|
+
if (isSyncActive) {
|
|
331
|
+
if (userId === undefined || userId === DESKTOP_USER_ID) {
|
|
332
|
+
shouldFetch = false;
|
|
333
|
+
} else {
|
|
334
|
+
shouldFetch = true;
|
|
335
|
+
}
|
|
336
|
+
} else if (userId === undefined) {
|
|
337
|
+
shouldFetch = false;
|
|
338
|
+
} else {
|
|
339
|
+
shouldFetch = true;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
326
343
|
return useClientDataSWR<AiProviderRuntimeStateWithBuiltinModels | undefined>(
|
|
327
344
|
shouldFetch ? [AiProviderSwrKey.fetchAiProviderRuntimeState, isLogin] : null,
|
|
328
345
|
async ([, isLogin]) => {
|
|
@@ -331,7 +348,6 @@ export const createAiProviderSlice: StateCreator<
|
|
|
331
348
|
|
|
332
349
|
if (isLogin) {
|
|
333
350
|
const data = await aiProviderService.getAiProviderRuntimeState();
|
|
334
|
-
|
|
335
351
|
// Build model lists with proper async handling
|
|
336
352
|
const [enabledChatModelList, enabledImageModelList] = await Promise.all([
|
|
337
353
|
buildChatProviderModelLists(data.enabledChatAiProviders, data.enabledAiModels),
|