@lobehub/lobehub 2.0.0-next.254 → 2.0.0-next.255
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 +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Render/Intervention/ApprovalActions.tsx +2 -2
- package/src/features/Conversation/Messages/AssistantGroup/Tool/index.tsx +18 -15
- package/src/features/Conversation/Messages/AssistantGroup/components/Group.tsx +3 -3
- package/src/features/Conversation/Messages/Contexts/MessageAggregationContext.ts +15 -0
- package/src/features/Conversation/Messages/Supervisor/components/Group.tsx +3 -3
- package/src/libs/next/config/define-config.ts +4 -1
- package/src/features/Conversation/Messages/AssistantGroup/components/GroupContext.ts +0 -15
- package/src/features/Conversation/Messages/Supervisor/components/GroupContext.ts +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.255](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.254...v2.0.0-next.255)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-10**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix auto add group member crash.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix auto add group member crash, closes [#11387](https://github.com/lobehub/lobe-chat/issues/11387) ([fe4ff91](https://github.com/lobehub/lobe-chat/commit/fe4ff91))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 2.0.0-next.254](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.253...v2.0.0-next.254)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2026-01-10**</sup>
|
package/changelog/v1.json
CHANGED
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.255",
|
|
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",
|
|
@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { useUserStore } from '@/store/user';
|
|
8
8
|
|
|
9
9
|
import { useConversationStore } from '../../../../../store';
|
|
10
|
-
import {
|
|
10
|
+
import { useMessageAggregationContext } from '../../../../Contexts/MessageAggregationContext';
|
|
11
11
|
import { type ApprovalMode } from './index';
|
|
12
12
|
|
|
13
13
|
interface ApprovalActionsProps {
|
|
@@ -34,7 +34,7 @@ const ApprovalActions = memo<ApprovalActionsProps>(
|
|
|
34
34
|
// Disable actions while message is still being created (temp ID)
|
|
35
35
|
const isMessageCreating = messageId.startsWith('tmp_');
|
|
36
36
|
|
|
37
|
-
const { assistantGroupId } =
|
|
37
|
+
const { assistantGroupId } = useMessageAggregationContext();
|
|
38
38
|
const [approveToolCall, rejectToolCall, rejectAndContinueToolCall] = useConversationStore(
|
|
39
39
|
(s) => [s.approveToolCall, s.rejectToolCall, s.rejectAndContinueToolCall],
|
|
40
40
|
);
|
|
@@ -12,6 +12,7 @@ import { toolSelectors } from '@/store/tool/selectors';
|
|
|
12
12
|
import { getBuiltinRender } from '@/tools/renders';
|
|
13
13
|
import { getBuiltinStreaming } from '@/tools/streamings';
|
|
14
14
|
|
|
15
|
+
import { ToolErrorBoundary } from '../../Tool/ErrorBoundary';
|
|
15
16
|
import Actions from './Actions';
|
|
16
17
|
import Inspectors from './Inspector';
|
|
17
18
|
|
|
@@ -145,21 +146,23 @@ const Tool = memo<GroupToolProps>(
|
|
|
145
146
|
type={type}
|
|
146
147
|
/>
|
|
147
148
|
)}
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
149
|
+
<ToolErrorBoundary apiName={apiName} identifier={identifier}>
|
|
150
|
+
<Render
|
|
151
|
+
apiName={apiName}
|
|
152
|
+
arguments={requestArgs}
|
|
153
|
+
identifier={identifier}
|
|
154
|
+
intervention={intervention}
|
|
155
|
+
isArgumentsStreaming={isArgumentsStreaming}
|
|
156
|
+
isToolCalling={isToolCalling}
|
|
157
|
+
messageId={assistantMessageId}
|
|
158
|
+
result={result}
|
|
159
|
+
setShowPluginRender={setShowPluginRender}
|
|
160
|
+
showPluginRender={showPluginRender}
|
|
161
|
+
toolCallId={id}
|
|
162
|
+
toolMessageId={toolMessageId}
|
|
163
|
+
type={type}
|
|
164
|
+
/>
|
|
165
|
+
</ToolErrorBoundary>
|
|
163
166
|
<Divider dashed style={{ marginBottom: 0, marginTop: 8 }} />
|
|
164
167
|
</Flexbox>
|
|
165
168
|
</AccordionItem>
|
|
@@ -6,8 +6,8 @@ import { memo, useMemo } from 'react';
|
|
|
6
6
|
import { type AssistantContentBlock } from '@/types/index';
|
|
7
7
|
|
|
8
8
|
import { messageStateSelectors, useConversationStore } from '../../../store';
|
|
9
|
+
import { MessageAggregationContext } from '../../Contexts/MessageAggregationContext';
|
|
9
10
|
import { CollapsedMessage } from './CollapsedMessage';
|
|
10
|
-
import { GroupMessageContext } from './GroupContext';
|
|
11
11
|
import GroupItem from './GroupItem';
|
|
12
12
|
|
|
13
13
|
const styles = createStaticStyles(({ css }) => {
|
|
@@ -44,7 +44,7 @@ const Group = memo<GroupChildrenProps>(
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
return (
|
|
47
|
-
<
|
|
47
|
+
<MessageAggregationContext value={contextValue}>
|
|
48
48
|
<Flexbox className={styles.container} gap={8}>
|
|
49
49
|
{blocks.map((item) => {
|
|
50
50
|
return (
|
|
@@ -59,7 +59,7 @@ const Group = memo<GroupChildrenProps>(
|
|
|
59
59
|
);
|
|
60
60
|
})}
|
|
61
61
|
</Flexbox>
|
|
62
|
-
</
|
|
62
|
+
</MessageAggregationContext>
|
|
63
63
|
);
|
|
64
64
|
},
|
|
65
65
|
isEqual,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
interface GroupMessageContextValue {
|
|
4
|
+
assistantGroupId: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const MessageAggregationContext = createContext<GroupMessageContextValue | null>(null);
|
|
8
|
+
|
|
9
|
+
export const useMessageAggregationContext = () => {
|
|
10
|
+
const context = useContext(MessageAggregationContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('useMessageAggregationContext must be used within MessageAggregationContext');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
@@ -6,9 +6,9 @@ import { memo, useMemo } from 'react';
|
|
|
6
6
|
import { type AssistantContentBlock } from '@/types/index';
|
|
7
7
|
|
|
8
8
|
import { messageStateSelectors, useConversationStore } from '../../../store';
|
|
9
|
+
import { MessageAggregationContext } from '../../Contexts/MessageAggregationContext';
|
|
9
10
|
import { CollapsedMessage } from './CollapsedMessage';
|
|
10
11
|
import ContentBlock from './ContentBlock';
|
|
11
|
-
import { GroupMessageContext } from './GroupContext';
|
|
12
12
|
|
|
13
13
|
const styles = createStaticStyles(({ css }) => {
|
|
14
14
|
return {
|
|
@@ -43,13 +43,13 @@ const Group = memo<GroupChildrenProps>(({ blocks, id, content }) => {
|
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
return (
|
|
46
|
-
<
|
|
46
|
+
<MessageAggregationContext value={contextValue}>
|
|
47
47
|
<Flexbox className={styles.container} gap={8}>
|
|
48
48
|
{blocks.map((item) => {
|
|
49
49
|
return <ContentBlock {...item} key={id + '.' + item.id} />;
|
|
50
50
|
})}
|
|
51
51
|
</Flexbox>
|
|
52
|
-
</
|
|
52
|
+
</MessageAggregationContext>
|
|
53
53
|
);
|
|
54
54
|
}, isEqual);
|
|
55
55
|
|
|
@@ -9,6 +9,7 @@ interface CustomNextConfig {
|
|
|
9
9
|
experimental?: NextConfig['experimental'];
|
|
10
10
|
headers?: Header[];
|
|
11
11
|
redirects?: Redirect[];
|
|
12
|
+
serverExternalPackages?: NextConfig['serverExternalPackages'];
|
|
12
13
|
turbopack?: NextConfig['turbopack'];
|
|
13
14
|
webpack?: NextConfig['webpack'];
|
|
14
15
|
}
|
|
@@ -311,7 +312,9 @@ export function defineConfig(config: CustomNextConfig) {
|
|
|
311
312
|
],
|
|
312
313
|
|
|
313
314
|
// when external packages in dev mode with turbopack, this config will lead to bundle error
|
|
314
|
-
serverExternalPackages:
|
|
315
|
+
serverExternalPackages: config.serverExternalPackages
|
|
316
|
+
? config.serverExternalPackages
|
|
317
|
+
: ['pdfkit'],
|
|
315
318
|
|
|
316
319
|
transpilePackages: ['pdfjs-dist', 'mermaid', 'better-auth-harmony'],
|
|
317
320
|
turbopack: {
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
|
|
3
|
-
interface GroupMessageContextValue {
|
|
4
|
-
assistantGroupId: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const GroupMessageContext = createContext<GroupMessageContextValue | null>(null);
|
|
8
|
-
|
|
9
|
-
export const useGroupMessage = () => {
|
|
10
|
-
const context = useContext(GroupMessageContext);
|
|
11
|
-
if (!context) {
|
|
12
|
-
throw new Error('useGroupMessage must be used within GroupMessageContext');
|
|
13
|
-
}
|
|
14
|
-
return context;
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
2
|
-
|
|
3
|
-
interface GroupMessageContextValue {
|
|
4
|
-
assistantGroupId: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const GroupMessageContext = createContext<GroupMessageContextValue | null>(null);
|
|
8
|
-
|
|
9
|
-
export const useGroupMessage = () => {
|
|
10
|
-
const context = useContext(GroupMessageContext);
|
|
11
|
-
if (!context) {
|
|
12
|
-
throw new Error('useGroupMessage must be used within GroupMessageContext');
|
|
13
|
-
}
|
|
14
|
-
return context;
|
|
15
|
-
};
|