@lobehub/chat 1.123.1 → 1.123.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 +25 -0
- package/changelog/v1.json +9 -0
- package/locales/ar/common.json +1 -0
- package/locales/bg-BG/common.json +1 -0
- package/locales/de-DE/common.json +1 -0
- package/locales/en-US/common.json +1 -0
- package/locales/es-ES/common.json +1 -0
- package/locales/fa-IR/common.json +1 -0
- package/locales/fr-FR/common.json +1 -0
- package/locales/it-IT/common.json +1 -0
- package/locales/ja-JP/common.json +1 -0
- package/locales/ko-KR/common.json +1 -0
- package/locales/nl-NL/common.json +1 -0
- package/locales/pl-PL/common.json +1 -0
- package/locales/pt-BR/common.json +1 -0
- package/locales/ru-RU/common.json +1 -0
- package/locales/tr-TR/common.json +1 -0
- package/locales/vi-VN/common.json +1 -0
- package/locales/zh-CN/common.json +1 -0
- package/locales/zh-TW/common.json +1 -0
- package/package.json +1 -1
- package/packages/database/src/models/__tests__/file.test.ts +4 -4
- package/packages/database/src/models/__tests__/session.test.ts +3 -3
- package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +7 -0
- package/src/libs/next-auth/auth.config.ts +1 -0
- package/src/locales/default/common.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.123.2](https://github.com/lobehub/lobe-chat/compare/v1.123.1...v1.123.2)
|
6
|
+
|
7
|
+
<sup>Released on **2025-09-05**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Not use branch topic when this topic is not save.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Not use branch topic when this topic is not save, closes [#9083](https://github.com/lobehub/lobe-chat/issues/9083) ([f534d19](https://github.com/lobehub/lobe-chat/commit/f534d19))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.123.1](https://github.com/lobehub/lobe-chat/compare/v1.123.0...v1.123.1)
|
6
31
|
|
7
32
|
<sup>Released on **2025-09-05**</sup>
|
package/changelog/v1.json
CHANGED
package/locales/ar/common.json
CHANGED
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "مدونة المنتجات",
|
33
33
|
"branching": "إنشاء موضوع فرعي",
|
34
34
|
"branchingDisable": "ميزة \"الموضوع الفرعي\" متاحة فقط في إصدار الخادم. إذا كنت بحاجة إلى هذه الميزة، يرجى التبديل إلى وضع نشر الخادم أو استخدام LobeChat Cloud",
|
35
|
+
"branchingRequiresSavedTopic": "الموضوع الحالي غير محفوظ، يجب الحفظ قبل استخدام ميزة الموضوع الفرعي",
|
35
36
|
"cancel": "إلغاء",
|
36
37
|
"changelog": "سجل التغييرات",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Продуктов блог",
|
33
33
|
"branching": "Създаване на подтема",
|
34
34
|
"branchingDisable": "Функцията „подтема“ е налична само в сървърната версия. Ако искате да използвате тази функция, моля, превключете на режим на сървърно разполагане или използвайте LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Текущата тема не е запазена, моля запазете я, за да използвате функцията за под-теми",
|
35
36
|
"cancel": "Отказ",
|
36
37
|
"changelog": "Дневник на промените",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Produkt-Blog",
|
33
33
|
"branching": "Unterthema erstellen",
|
34
34
|
"branchingDisable": "Die Funktion „Unterthema“ ist nur in der Serverversion verfügbar. Wenn Sie diese Funktion benötigen, wechseln Sie bitte in den Serverbereitstellungsmodus oder verwenden Sie LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Das aktuelle Thema wurde nicht gespeichert. Speichern Sie es, um die Unterthemenfunktion nutzen zu können.",
|
35
36
|
"cancel": "Abbrechen",
|
36
37
|
"changelog": "Änderungsprotokoll",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Product Blog",
|
33
33
|
"branching": "Create Subtopic",
|
34
34
|
"branchingDisable": "The 'Subtopic' feature is only available in the server version. If you need this feature, please switch to server deployment mode or use LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Current topic is not saved, please save it first to use subtopic feature",
|
35
36
|
"cancel": "Cancel",
|
36
37
|
"changelog": "Changelog",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog de productos",
|
33
33
|
"branching": "Crear subtemas",
|
34
34
|
"branchingDisable": "La función de «subtemas» solo está disponible en la versión del servidor. Si necesita esta función, cambie al modo de implementación del servidor o utilice LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "El tema actual no está guardado, guárdalo para poder usar la función de subtemas",
|
35
36
|
"cancel": "Cancelar",
|
36
37
|
"changelog": "Registro de cambios",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "وبلاگ محصولات",
|
33
33
|
"branching": "ایجاد زیرموضوع",
|
34
34
|
"branchingDisable": "ویژگی «زیرموضوع» تنها در نسخه سرور قابل استفاده است، اگر به این ویژگی نیاز دارید، لطفاً به حالت استقرار سرور تغییر دهید یا از LobeChat Cloud استفاده کنید.",
|
35
|
+
"branchingRequiresSavedTopic": "موضوع فعلی ذخیره نشده است، پس از ذخیره میتوانید از قابلیت زیرموضوع استفاده کنید",
|
35
36
|
"cancel": "لغو",
|
36
37
|
"changelog": "تغییرات",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog des produits",
|
33
33
|
"branching": "Créer un sous-sujet",
|
34
34
|
"branchingDisable": "La fonction « sous-sujet » n'est disponible que dans la version serveur. Si vous avez besoin de cette fonctionnalité, veuillez passer en mode de déploiement serveur ou utiliser LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Le sujet actuel n'est pas enregistré, veuillez enregistrer avant d'utiliser la fonction de sous-sujet",
|
35
36
|
"cancel": "Annuler",
|
36
37
|
"changelog": "Journal des modifications",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog sui prodotti",
|
33
33
|
"branching": "Crea un sottotema",
|
34
34
|
"branchingDisable": "La funzione «sottotema» è disponibile solo nella versione server. Se desideri utilizzare questa funzione, passa alla modalità di distribuzione server o utilizza LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "L'argomento corrente non è salvato, è necessario salvarlo prima di poter utilizzare la funzione di sottoargomento",
|
35
36
|
"cancel": "Annulla",
|
36
37
|
"changelog": "Registro modifiche",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "製品ブログ",
|
33
33
|
"branching": "サブトピックを作成",
|
34
34
|
"branchingDisable": "「サブトピック」機能はサーバー版のみで利用可能です。この機能が必要な場合は、サーバー展開モードに切り替えるか、LobeChat Cloudを使用してください。",
|
35
|
+
"branchingRequiresSavedTopic": "現在のトピックが保存されていません。保存後にサブトピック機能を使用できます。",
|
35
36
|
"cancel": "キャンセル",
|
36
37
|
"changelog": "変更履歴",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "제품 블로그",
|
33
33
|
"branching": "하위 주제 만들기",
|
34
34
|
"branchingDisable": "「하위 주제」 기능은 서버 버전에서만 사용할 수 있습니다. 이 기능이 필요하시면 서버 배포 모드로 전환하거나 LobeChat Cloud를 사용하세요.",
|
35
|
+
"branchingRequiresSavedTopic": "현재 주제가 저장되지 않았습니다. 저장한 후에 하위 주제 기능을 사용할 수 있습니다.",
|
35
36
|
"cancel": "취소",
|
36
37
|
"changelog": "변경 로그",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Product Blog",
|
33
33
|
"branching": "Subonderwerp aanmaken",
|
34
34
|
"branchingDisable": "De functie 'Subonderwerp' is alleen beschikbaar in de serverversie. Als je deze functie wilt gebruiken, schakel dan over naar de serverimplementatiemodus of gebruik LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Het huidige onderwerp is niet opgeslagen. Sla het op om de subonderwerpfunctie te kunnen gebruiken.",
|
35
36
|
"cancel": "Annuleren",
|
36
37
|
"changelog": "Wijzigingslogboek",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog produktowy",
|
33
33
|
"branching": "Utwórz podtemat",
|
34
34
|
"branchingDisable": "Funkcja „podtemat” jest dostępna tylko w wersji serwerowej. Aby skorzystać z tej funkcji, przełącz się na tryb wdrożenia serwera lub użyj LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Aktualny temat nie został zapisany, zapisz go, aby móc korzystać z funkcji podtematów",
|
35
36
|
"cancel": "Anuluj",
|
36
37
|
"changelog": "Dziennik zmian",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog de Produtos",
|
33
33
|
"branching": "Criar subtópico",
|
34
34
|
"branchingDisable": "A funcionalidade de \"subtópico\" está disponível apenas na versão do servidor. Se precisar dessa funcionalidade, mude para o modo de implantação no servidor ou use o LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "O tópico atual não foi salvo. Salve-o para poder usar a funcionalidade de subtópicos.",
|
35
36
|
"cancel": "Cancelar",
|
36
37
|
"changelog": "Registro de alterações",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Блог о продуктах",
|
33
33
|
"branching": "Создать подтему",
|
34
34
|
"branchingDisable": "Функция «Подтема» доступна только в серверной версии. Если вам нужна эта функция, переключитесь на серверный режим развертывания или используйте LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Текущая тема не сохранена, сохраните её, чтобы использовать функцию подтем.",
|
35
36
|
"cancel": "Отмена",
|
36
37
|
"changelog": "История изменений",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Ürün Blogu",
|
33
33
|
"branching": "Alt konu oluştur",
|
34
34
|
"branchingDisable": "«Alt konu» özelliği yalnızca sunucu sürümünde mevcuttur. Bu özelliği kullanmak için lütfen sunucu dağıtım moduna geçin veya LobeChat Cloud'u kullanın.",
|
35
|
+
"branchingRequiresSavedTopic": "Geçerli konu kaydedilmedi, alt konu özelliğini kullanmak için önce kaydedilmelidir",
|
35
36
|
"cancel": "İptal",
|
36
37
|
"changelog": "Changelog",
|
37
38
|
"clientDB": {
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"blog": "Blog sản phẩm",
|
33
33
|
"branching": "Tạo chủ đề con",
|
34
34
|
"branchingDisable": "Chức năng «Chủ đề con» chỉ có sẵn trong phiên bản máy chủ. Nếu bạn cần chức năng này, hãy chuyển sang chế độ triển khai máy chủ hoặc sử dụng LobeChat Cloud.",
|
35
|
+
"branchingRequiresSavedTopic": "Chủ đề hiện tại chưa được lưu, vui lòng lưu trước khi sử dụng chức năng chủ đề con",
|
35
36
|
"cancel": "Hủy",
|
36
37
|
"changelog": "Nhật ký cập nhật",
|
37
38
|
"clientDB": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.123.
|
3
|
+
"version": "1.123.2",
|
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",
|
@@ -1025,7 +1025,7 @@ describe('FileModel', () => {
|
|
1025
1025
|
it('should handle unknown file category', async () => {
|
1026
1026
|
// This tests the default case in switch statement (line 312-313)
|
1027
1027
|
const unknownCategory = 'unknown' as FilesTabs;
|
1028
|
-
|
1028
|
+
|
1029
1029
|
// We need to access the private method indirectly by testing the query method
|
1030
1030
|
// that uses getFileTypePrefix internally
|
1031
1031
|
const params = {
|
@@ -1033,7 +1033,7 @@ describe('FileModel', () => {
|
|
1033
1033
|
current: 1,
|
1034
1034
|
pageSize: 10,
|
1035
1035
|
};
|
1036
|
-
|
1036
|
+
|
1037
1037
|
// This should not throw an error and should handle the unknown category gracefully
|
1038
1038
|
const result = await fileModel.query(params);
|
1039
1039
|
expect(result).toBeDefined();
|
@@ -1054,7 +1054,7 @@ describe('FileModel', () => {
|
|
1054
1054
|
};
|
1055
1055
|
|
1056
1056
|
const { id: fileId } = await fileModel.create(testFile, true);
|
1057
|
-
|
1057
|
+
|
1058
1058
|
// Create many chunks for this file to trigger batch processing
|
1059
1059
|
// Note: This is a simplified test since we can't easily create 3000+ chunks
|
1060
1060
|
// But it will still exercise the batch deletion code path
|
@@ -1069,7 +1069,7 @@ describe('FileModel', () => {
|
|
1069
1069
|
// Insert chunks (this might need to be done through proper API)
|
1070
1070
|
// For testing purposes, we'll delete the file which should trigger the batch deletion
|
1071
1071
|
await fileModel.delete(fileId, true);
|
1072
|
-
|
1072
|
+
|
1073
1073
|
// Verify the file is deleted
|
1074
1074
|
const deletedFile = await serverDB.query.files.findFirst({
|
1075
1075
|
where: eq(files.id, fileId),
|
@@ -1152,14 +1152,14 @@ describe('SessionModel', () => {
|
|
1152
1152
|
// 这个测试旨在覆盖 findSessionsByKeywords 中的错误处理逻辑 (lines 484-486)
|
1153
1153
|
// 通过模拟一个可能导致错误的场景来触发 catch 块
|
1154
1154
|
const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
|
1155
|
-
|
1155
|
+
|
1156
1156
|
// 创建一个会导致错误的场景
|
1157
1157
|
// 我们可以通过传递一个会导致数据库查询问题的关键词来测试错误处理
|
1158
1158
|
const result = await sessionModel.findSessionsByKeywords({ keyword: 'test' });
|
1159
|
-
|
1159
|
+
|
1160
1160
|
// 即使发生错误,方法也应该返回一个空数组
|
1161
1161
|
expect(Array.isArray(result)).toBe(true);
|
1162
|
-
|
1162
|
+
|
1163
1163
|
consoleSpy.mockRestore();
|
1164
1164
|
});
|
1165
1165
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ActionIconGroup, type ActionIconGroupEvent, type ActionIconGroupProps } from '@lobehub/ui';
|
2
2
|
import { App } from 'antd';
|
3
3
|
import isEqual from 'fast-deep-equal';
|
4
|
+
import { useSearchParams } from 'next/navigation';
|
4
5
|
import { memo, use, useCallback, useState } from 'react';
|
5
6
|
import { useTranslation } from 'react-i18next';
|
6
7
|
|
@@ -38,6 +39,8 @@ interface ActionsProps {
|
|
38
39
|
const Actions = memo<ActionsProps>(({ id, inPortalThread, index }) => {
|
39
40
|
const item = useChatStore(chatSelectors.getMessageById(id), isEqual);
|
40
41
|
const { t } = useTranslation('common');
|
42
|
+
const searchParams = useSearchParams();
|
43
|
+
const topic = searchParams.get('topic');
|
41
44
|
const [
|
42
45
|
deleteMessage,
|
43
46
|
regenerateMessage,
|
@@ -84,6 +87,10 @@ const Actions = memo<ActionsProps>(({ id, inPortalThread, index }) => {
|
|
84
87
|
break;
|
85
88
|
}
|
86
89
|
case 'branching': {
|
90
|
+
if (!topic) {
|
91
|
+
message.warning(t('branchingRequiresSavedTopic'));
|
92
|
+
break;
|
93
|
+
}
|
87
94
|
openThreadCreator(id);
|
88
95
|
break;
|
89
96
|
}
|