@lobehub/chat 1.29.0 → 1.29.1
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/package.json +1 -1
- package/src/database/server/models/topic.ts +1 -15
- package/src/features/Portal/Artifacts/Body/Renderer/React/index.tsx +1 -0
- package/src/server/routers/lambda/topic.ts +1 -1
- package/src/store/chat/slices/aiChat/actions/memory.ts +1 -1
- package/src/store/chat/slices/topic/selectors.ts +1 -1
- package/src/types/topic.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.29.1](https://github.com/lobehub/lobe-chat/compare/v1.29.0...v1.29.1)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-09**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix topic summary field on server db.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix topic summary field on server db, closes [#4655](https://github.com/lobehub/lobe-chat/issues/4655) ([ce10f9a](https://github.com/lobehub/lobe-chat/commit/ce10f9a))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
## [Version 1.29.0](https://github.com/lobehub/lobe-chat/compare/v1.28.6...v1.29.0)
|
6
31
|
|
7
32
|
<sup>Released on **2024-11-09**</sup>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.29.
|
3
|
+
"version": "1.29.1",
|
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",
|
@@ -35,9 +35,9 @@ export class TopicModel {
|
|
35
35
|
.select({
|
36
36
|
createdAt: topics.createdAt,
|
37
37
|
favorite: topics.favorite,
|
38
|
+
historySummary: topics.historySummary,
|
38
39
|
id: topics.id,
|
39
40
|
metadata: topics.metadata,
|
40
|
-
summary: topics.historySummary,
|
41
41
|
title: topics.title,
|
42
42
|
updatedAt: topics.updatedAt,
|
43
43
|
})
|
@@ -49,20 +49,6 @@ export class TopicModel {
|
|
49
49
|
.limit(pageSize)
|
50
50
|
.offset(offset)
|
51
51
|
);
|
52
|
-
|
53
|
-
// return result.map(({ summary, metadata, ...item }) => {
|
54
|
-
// const meta = metadata as ChatTopicMetadata;
|
55
|
-
// return {
|
56
|
-
// ...item,
|
57
|
-
// summary: !!summary
|
58
|
-
// ? ({
|
59
|
-
// content: summary,
|
60
|
-
// model: meta?.model,
|
61
|
-
// provider: meta?.provider,
|
62
|
-
// } as ChatTopicSummary)
|
63
|
-
// : undefined,
|
64
|
-
// };
|
65
|
-
// });
|
66
52
|
}
|
67
53
|
|
68
54
|
async findById(id: string) {
|
@@ -17,6 +17,7 @@ const ReactRenderer = memo<ReactRendererProps>(({ code }) => {
|
|
17
17
|
<SandpackProvider
|
18
18
|
customSetup={{
|
19
19
|
dependencies: {
|
20
|
+
'@ant-design/icons': 'latest',
|
20
21
|
'@lshay/ui': 'latest',
|
21
22
|
'@radix-ui/react-alert-dialog': 'latest',
|
22
23
|
'@radix-ui/react-dialog': 'latest',
|
@@ -120,6 +120,7 @@ export const topicRouter = router({
|
|
120
120
|
id: z.string(),
|
121
121
|
value: z.object({
|
122
122
|
favorite: z.boolean().optional(),
|
123
|
+
historySummary: z.string().optional(),
|
123
124
|
messages: z.array(z.string()).optional(),
|
124
125
|
metadata: z
|
125
126
|
.object({
|
@@ -128,7 +129,6 @@ export const topicRouter = router({
|
|
128
129
|
})
|
129
130
|
.optional(),
|
130
131
|
sessionId: z.string().optional(),
|
131
|
-
summary: z.string().optional(),
|
132
132
|
title: z.string().optional(),
|
133
133
|
}),
|
134
134
|
}),
|
@@ -33,7 +33,7 @@ const currentActiveTopicSummary = (s: ChatStoreState): ChatTopicSummary | undefi
|
|
33
33
|
if (!activeTopic) return undefined;
|
34
34
|
|
35
35
|
return {
|
36
|
-
content: activeTopic.
|
36
|
+
content: activeTopic.historySummary || '',
|
37
37
|
model: activeTopic.metadata?.model || '',
|
38
38
|
provider: activeTopic.metadata?.provider || '',
|
39
39
|
};
|
package/src/types/topic.ts
CHANGED
@@ -37,9 +37,9 @@ export interface ChatTopicSummary {
|
|
37
37
|
|
38
38
|
export interface ChatTopic extends Omit<BaseDataModel, 'meta'> {
|
39
39
|
favorite?: boolean;
|
40
|
+
historySummary?: string;
|
40
41
|
metadata?: ChatTopicMetadata;
|
41
42
|
sessionId?: string;
|
42
|
-
summary?: string;
|
43
43
|
title: string;
|
44
44
|
}
|
45
45
|
|