@lobehub/chat 0.107.0 → 0.107.2
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 +50 -0
- package/locales/en_US/migration.json +1 -1
- package/locales/ja_JP/migration.json +1 -1
- package/locales/ko_KR/migration.json +1 -1
- package/locales/ru_RU/migration.json +1 -1
- package/locales/zh_CN/migration.json +1 -1
- package/locales/zh_TW/migration.json +1 -1
- package/package.json +1 -1
- package/src/database/models/message.ts +4 -0
- package/src/locales/default/migration.ts +1 -1
- package/src/services/config.ts +1 -1
- package/src/services/message.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.107.2](https://github.com/lobehub/lobe-chat/compare/v0.107.1...v0.107.2)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-11-30**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix a bug that export a session without messages.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix a bug that export a session without messages ([8e84f35](https://github.com/lobehub/lobe-chat/commit/8e84f35))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.107.1](https://github.com/lobehub/lobe-chat/compare/v0.107.0...v0.107.1)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-11-30**</sup>
|
|
33
|
+
|
|
34
|
+
#### 💄 Styles
|
|
35
|
+
|
|
36
|
+
- **misc**: 优化文案.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Styles
|
|
44
|
+
|
|
45
|
+
- **misc**: 优化文案 ([aaa03c5](https://github.com/lobehub/lobe-chat/commit/aaa03c5))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 0.107.0](https://github.com/lobehub/lobe-chat/compare/v0.106.0...v0.107.0)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-11-30**</sup>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"title": "Database Upgrade Successful"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"upgradeTip": "The upgrade process will take approximately
|
|
39
|
+
"upgradeTip": "The upgrade process will take approximately 10 to 20 seconds. Please do not close LobeChat during the upgrade."
|
|
40
40
|
},
|
|
41
41
|
"migrateError": {
|
|
42
42
|
"missVersion": "Imported data is missing a version number. Please check the file and try again.",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"title": "データベースのアップグレードに成功しました"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"upgradeTip": "
|
|
39
|
+
"upgradeTip": "アップグレードには約10〜20秒かかります。アップグレード中はLobeChatを閉じないでください。"
|
|
40
40
|
},
|
|
41
41
|
"migrateError": {
|
|
42
42
|
"missVersion": "インポートデータにバージョン番号がありません。ファイルを確認してからもう一度お試しください",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"title": "데이터베이스 업그레이드 성공"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"upgradeTip": "
|
|
39
|
+
"upgradeTip": "업그레이드에는 대략 10~20초가 소요되며, 업그레이드 중에는 LobeChat을 닫지 말아주세요"
|
|
40
40
|
},
|
|
41
41
|
"migrateError": {
|
|
42
42
|
"missVersion": "데이터 가져오기에 버전 번호가 누락되었습니다. 파일을 확인한 후 다시 시도하십시오.",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"title": "Успешное обновление базы данных"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"upgradeTip": "Обновление займет примерно
|
|
39
|
+
"upgradeTip": "Обновление займет примерно 10-20 секунд, пожалуйста, не закрывайте LobeChat во время обновления"
|
|
40
40
|
},
|
|
41
41
|
"migrateError": {
|
|
42
42
|
"missVersion": "Отсутствует номер версии импортируемых данных. Пожалуйста, проверьте файл и повторите попытку.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.2",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -163,6 +163,10 @@ class _MessageModel extends BaseModel {
|
|
|
163
163
|
return count === 0;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
async queryBySessionId(sessionId: string) {
|
|
167
|
+
return this.table.where('sessionId').equals(sessionId).toArray();
|
|
168
|
+
}
|
|
169
|
+
|
|
166
170
|
private mapChatMessageToDBMessage(message: ChatMessage): DB_Message {
|
|
167
171
|
const { extra, ...messageData } = message;
|
|
168
172
|
|
package/src/services/config.ts
CHANGED
|
@@ -118,7 +118,7 @@ class ConfigService {
|
|
|
118
118
|
const session = this.getSession(id);
|
|
119
119
|
if (!session) return;
|
|
120
120
|
|
|
121
|
-
const messages = await messageService.
|
|
121
|
+
const messages = await messageService.getAllMessagesInSession(id);
|
|
122
122
|
const topics = await topicService.getTopics({ sessionId: id });
|
|
123
123
|
|
|
124
124
|
const config = createConfigFile('singleSession', { messages, sessions: [session], topics });
|
package/src/services/message.ts
CHANGED
|
@@ -32,6 +32,10 @@ export class MessageService {
|
|
|
32
32
|
return MessageModel.delete(id);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
async getAllMessagesInSession(sessionId: string) {
|
|
36
|
+
return MessageModel.queryBySessionId(sessionId);
|
|
37
|
+
}
|
|
38
|
+
|
|
35
39
|
async updateMessageContent(id: string, content: string) {
|
|
36
40
|
return MessageModel.update(id, { content });
|
|
37
41
|
}
|