@lobehub/lobehub 2.0.0-next.195 → 2.0.0-next.197
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 +58 -0
- package/changelog/v1.json +21 -0
- package/locales/ar/setting.json +0 -3
- package/locales/bg-BG/setting.json +0 -3
- package/locales/de-DE/setting.json +0 -3
- package/locales/en-US/setting.json +0 -3
- package/locales/es-ES/setting.json +0 -3
- package/locales/fa-IR/setting.json +0 -3
- package/locales/fr-FR/setting.json +0 -3
- package/locales/it-IT/setting.json +0 -3
- package/locales/ja-JP/setting.json +0 -3
- package/locales/ko-KR/setting.json +0 -3
- package/locales/nl-NL/setting.json +0 -3
- package/locales/pl-PL/setting.json +0 -3
- package/locales/pt-BR/setting.json +0 -3
- package/locales/ru-RU/setting.json +0 -3
- package/locales/tr-TR/setting.json +0 -3
- package/locales/vi-VN/setting.json +0 -3
- package/locales/zh-CN/setting.json +0 -3
- package/locales/zh-TW/setting.json +0 -3
- package/package.json +2 -3
- package/packages/const/src/fetch.ts +1 -4
- package/packages/database/src/core/getTestDB.ts +50 -0
- package/packages/database/src/models/__tests__/_test_template.ts +1 -1
- package/packages/database/src/models/__tests__/agent.test.ts +1 -1
- package/packages/database/src/models/__tests__/aiModel.test.ts +1 -1
- package/packages/database/src/models/__tests__/aiProvider.test.ts +1 -1
- package/packages/database/src/models/__tests__/apiKey.test.ts +1 -1
- package/packages/database/src/models/__tests__/asyncTask.test.ts +1 -1
- package/packages/database/src/models/__tests__/chatGroup.test.ts +1 -1
- package/packages/database/src/models/__tests__/chunk.test.ts +1 -1
- package/packages/database/src/models/__tests__/document.test.ts +1 -1
- package/packages/database/src/models/__tests__/drizzleMigration.test.ts +1 -1
- package/packages/database/src/models/__tests__/embedding.test.ts +1 -1
- package/packages/database/src/models/__tests__/file.test.ts +1 -1
- package/packages/database/src/models/__tests__/generation.test.ts +1 -1
- package/packages/database/src/models/__tests__/generationBatch.test.ts +1 -1
- package/packages/database/src/models/__tests__/generationTopic.test.ts +1 -1
- package/packages/database/src/models/__tests__/knowledgeBase.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.create.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.delete.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.query.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.stats.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.thread-query.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/message.update.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/messageWithTask.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/queryWithMessageGroup.perf.test.ts +1 -1
- package/packages/database/src/models/__tests__/messages/queryWithMessageGroup.test.ts +1 -1
- package/packages/database/src/models/__tests__/oauthHandoff.test.ts +1 -1
- package/packages/database/src/models/__tests__/plugin.test.ts +1 -1
- package/packages/database/src/models/__tests__/session.test.ts +1 -1
- package/packages/database/src/models/__tests__/sessionGroup.test.ts +1 -1
- package/packages/database/src/models/__tests__/thread.test.ts +1 -1
- package/packages/database/src/models/__tests__/topicDocument.test.ts +1 -1
- package/packages/database/src/models/__tests__/topics/topic.create.test.ts +1 -1
- package/packages/database/src/models/__tests__/topics/topic.delete.test.ts +1 -1
- package/packages/database/src/models/__tests__/topics/topic.query.test.ts +1 -1
- package/packages/database/src/models/__tests__/topics/topic.stats.test.ts +1 -1
- package/packages/database/src/models/__tests__/topics/topic.update.test.ts +1 -1
- package/packages/database/src/models/__tests__/user.test.ts +1 -1
- package/packages/database/src/models/__tests__/userMemories.test.ts +1 -1
- package/packages/database/src/models/__tests__/userMemoryIdentity.test.ts +1 -1
- package/packages/database/src/models/userMemory/__tests__/context.test.ts +1 -1
- package/packages/database/src/models/userMemory/__tests__/experience.test.ts +1 -1
- package/packages/database/src/models/userMemory/__tests__/identity.test.ts +1 -1
- package/packages/database/src/models/userMemory/__tests__/preference.test.ts +1 -1
- package/packages/database/src/repositories/agentGroup/index.test.ts +1 -1
- package/packages/database/src/repositories/agentMigration/__tests__/agentMigrationRepo.test.ts +1 -1
- package/packages/database/src/repositories/aiInfra/index.test.ts +1 -1
- package/packages/database/src/repositories/compression/index.test.ts +1 -1
- package/packages/database/src/repositories/dataExporter/index.test.ts +1 -1
- package/packages/database/src/repositories/dataImporter/__tests__/index.test.ts +1 -1
- package/packages/database/src/repositories/dataImporter/deprecated/__tests__/index.test.ts +2 -2
- package/packages/database/src/repositories/home/__tests__/index.test.ts +1 -1
- package/packages/database/src/repositories/home/index.test.ts +1 -1
- package/packages/database/src/repositories/knowledge/index.test.ts +1 -1
- package/packages/database/src/repositories/search/index.test.ts +1 -1
- package/packages/database/src/repositories/topicImporter/__tests__/importTopic.test.ts +1 -1
- package/packages/database/src/repositories/userMemory/__tests__/UserMemoryTopicRepository.test.ts +1 -1
- package/packages/database/src/server/models/__tests__/adapter.test.ts +2 -2
- package/packages/database/src/server/models/__tests__/user.test.ts +2 -2
- package/packages/database/tests/test-utils.ts +1 -1
- package/packages/types/src/auth.ts +0 -4
- package/packages/types/src/export.ts +1 -1
- package/packages/types/src/index.ts +0 -1
- package/packages/utils/src/server/xor.test.ts +1 -2
- package/src/app/(backend)/_deprecated/createBizOpenAI/auth.test.ts +7 -41
- package/src/app/(backend)/_deprecated/createBizOpenAI/auth.ts +1 -15
- package/src/app/(backend)/_deprecated/createBizOpenAI/index.ts +2 -9
- package/src/app/(backend)/middleware/auth/index.ts +0 -1
- package/src/app/(backend)/middleware/auth/utils.test.ts +2 -42
- package/src/app/(backend)/middleware/auth/utils.ts +3 -17
- package/src/app/(backend)/webapi/chat/[provider]/route.test.ts +0 -5
- package/src/app/(backend)/webapi/models/[provider]/route.test.ts +0 -6
- package/src/app/(backend)/webapi/plugin/gateway/route.ts +2 -32
- package/src/app/[variants]/(main)/settings/common/features/Common/Common.tsx +1 -16
- package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +1 -0
- package/src/features/LibraryModal/AssignKnowledgeBase/List.tsx +12 -13
- package/src/features/ResourceManager/components/Explorer/MasonryView/index.tsx +1 -0
- package/src/locales/default/setting.ts +0 -3
- package/src/server/routers/lambda/__tests__/file.test.ts +76 -3
- package/src/server/routers/lambda/file.ts +13 -1
- package/src/services/config.ts +2 -16
- package/packages/database/src/core/dbForTest.ts +0 -43
- package/packages/database/src/core/migrations.json +0 -1080
- package/packages/database/src/models/__tests__/_util.ts +0 -30
- package/packages/database/src/repositories/tableViewer/index.test.ts +0 -255
- package/packages/database/src/repositories/tableViewer/index.ts +0 -251
- package/packages/types/src/tableViewer.ts +0 -30
- package/scripts/migrateClientDB/compile-migrations.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.197](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.196...v2.0.0-next.197)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-03**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Remove client db and refactor test.
|
|
12
|
+
|
|
13
|
+
#### 🐛 Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **misc**: Fix file upload issue.
|
|
16
|
+
|
|
17
|
+
<br/>
|
|
18
|
+
|
|
19
|
+
<details>
|
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
21
|
+
|
|
22
|
+
#### Code refactoring
|
|
23
|
+
|
|
24
|
+
- **misc**: Remove client db and refactor test, closes [#11123](https://github.com/lobehub/lobe-chat/issues/11123) ([bb2799d](https://github.com/lobehub/lobe-chat/commit/bb2799d))
|
|
25
|
+
|
|
26
|
+
#### What's fixed
|
|
27
|
+
|
|
28
|
+
- **misc**: Fix file upload issue, closes [#11122](https://github.com/lobehub/lobe-chat/issues/11122) ([1ae327a](https://github.com/lobehub/lobe-chat/commit/1ae327a))
|
|
29
|
+
|
|
30
|
+
</details>
|
|
31
|
+
|
|
32
|
+
<div align="right">
|
|
33
|
+
|
|
34
|
+
[](#readme-top)
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
## [Version 2.0.0-next.196](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.195...v2.0.0-next.196)
|
|
39
|
+
|
|
40
|
+
<sup>Released on **2026-01-03**</sup>
|
|
41
|
+
|
|
42
|
+
#### ♻ Code Refactoring
|
|
43
|
+
|
|
44
|
+
- **misc**: Refactor to remove access code.
|
|
45
|
+
|
|
46
|
+
<br/>
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
50
|
+
|
|
51
|
+
#### Code refactoring
|
|
52
|
+
|
|
53
|
+
- **misc**: Refactor to remove access code, closes [#11120](https://github.com/lobehub/lobe-chat/issues/11120) ([0e9f98c](https://github.com/lobehub/lobe-chat/commit/0e9f98c))
|
|
54
|
+
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
<div align="right">
|
|
58
|
+
|
|
59
|
+
[](#readme-top)
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
|
|
5
63
|
## [Version 2.0.0-next.195](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.194...v2.0.0-next.195)
|
|
6
64
|
|
|
7
65
|
<sup>Released on **2026-01-03**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"improvements": [
|
|
5
|
+
"Remove client db and refactor test."
|
|
6
|
+
],
|
|
7
|
+
"fixes": [
|
|
8
|
+
"Fix file upload issue."
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"date": "2026-01-03",
|
|
12
|
+
"version": "2.0.0-next.197"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"children": {
|
|
16
|
+
"improvements": [
|
|
17
|
+
"Refactor to remove access code."
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"date": "2026-01-03",
|
|
21
|
+
"version": "2.0.0-next.196"
|
|
22
|
+
},
|
|
2
23
|
{
|
|
3
24
|
"children": {
|
|
4
25
|
"fixes": [
|
package/locales/ar/setting.json
CHANGED
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "الأسئلة الافتتاحية",
|
|
385
385
|
"settingOpening.title": "إعدادات البداية",
|
|
386
386
|
"settingPlugin.title": "قائمة المهارات",
|
|
387
|
-
"settingSystem.accessCode.desc": "تم تفعيل الوصول المشفر من قبل المسؤول",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "أدخل كلمة مرور الوصول",
|
|
389
|
-
"settingSystem.accessCode.title": "كلمة مرور الوصول",
|
|
390
387
|
"settingSystem.oauth.info.desc": "تم تسجيل الدخول",
|
|
391
388
|
"settingSystem.oauth.info.title": "معلومات الحساب",
|
|
392
389
|
"settingSystem.oauth.signin.action": "تسجيل الدخول",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Начални въпроси",
|
|
385
385
|
"settingOpening.title": "Настройки за начало",
|
|
386
386
|
"settingPlugin.title": "Списък с умения",
|
|
387
|
-
"settingSystem.accessCode.desc": "Достъпът с шифроване е активиран от администратора",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Въведете парола за достъп",
|
|
389
|
-
"settingSystem.accessCode.title": "Парола за достъп",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Вход изпълнен",
|
|
391
388
|
"settingSystem.oauth.info.title": "Информация за акаунта",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Вход",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Einstiegsfragen",
|
|
385
385
|
"settingOpening.title": "Begrüßungseinstellungen",
|
|
386
386
|
"settingPlugin.title": "Fähigkeitenliste",
|
|
387
|
-
"settingSystem.accessCode.desc": "Zugriff mit Verschlüsselung ist vom Administrator aktiviert",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Zugangspasswort eingeben",
|
|
389
|
-
"settingSystem.accessCode.title": "Zugangspasswort",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Angemeldet",
|
|
391
388
|
"settingSystem.oauth.info.title": "Kontoinformationen",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Anmelden",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Opening Questions",
|
|
385
385
|
"settingOpening.title": "Opening Settings",
|
|
386
386
|
"settingPlugin.title": "Skill List",
|
|
387
|
-
"settingSystem.accessCode.desc": "Encryption access is enabled by the administrator",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Enter access password",
|
|
389
|
-
"settingSystem.accessCode.title": "Access Password",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Logged in",
|
|
391
388
|
"settingSystem.oauth.info.title": "Account Information",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Sign In",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Preguntas de Apertura",
|
|
385
385
|
"settingOpening.title": "Configuración de Apertura",
|
|
386
386
|
"settingPlugin.title": "Lista de Habilidades",
|
|
387
|
-
"settingSystem.accessCode.desc": "El administrador ha habilitado el acceso cifrado",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Introduce la contraseña de acceso",
|
|
389
|
-
"settingSystem.accessCode.title": "Contraseña de Acceso",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Sesión iniciada",
|
|
391
388
|
"settingSystem.oauth.info.title": "Información de la Cuenta",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Iniciar Sesión",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "سؤالات آغازین",
|
|
385
385
|
"settingOpening.title": "تنظیمات آغازین",
|
|
386
386
|
"settingPlugin.title": "فهرست مهارتها",
|
|
387
|
-
"settingSystem.accessCode.desc": "دسترسی رمزگذاریشده توسط مدیر فعال شده است",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "رمز عبور دسترسی را وارد کنید",
|
|
389
|
-
"settingSystem.accessCode.title": "رمز عبور دسترسی",
|
|
390
387
|
"settingSystem.oauth.info.desc": "وارد شدهاید",
|
|
391
388
|
"settingSystem.oauth.info.title": "اطلاعات حساب",
|
|
392
389
|
"settingSystem.oauth.signin.action": "ورود",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Questions d’accueil",
|
|
385
385
|
"settingOpening.title": "Paramètres d’accueil",
|
|
386
386
|
"settingPlugin.title": "Liste des compétences",
|
|
387
|
-
"settingSystem.accessCode.desc": "L’accès chiffré est activé par l’administrateur",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Saisir le mot de passe d’accès",
|
|
389
|
-
"settingSystem.accessCode.title": "Mot de passe d’accès",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Connecté",
|
|
391
388
|
"settingSystem.oauth.info.title": "Informations du compte",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Se connecter",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Domande di Apertura",
|
|
385
385
|
"settingOpening.title": "Impostazioni di Apertura",
|
|
386
386
|
"settingPlugin.title": "Elenco Competenze",
|
|
387
|
-
"settingSystem.accessCode.desc": "L'accesso crittografato è abilitato dall'amministratore",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Inserisci la password di accesso",
|
|
389
|
-
"settingSystem.accessCode.title": "Password di Accesso",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Accesso effettuato",
|
|
391
388
|
"settingSystem.oauth.info.title": "Informazioni Account",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Accedi",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "オープニング質問",
|
|
385
385
|
"settingOpening.title": "オープニング設定",
|
|
386
386
|
"settingPlugin.title": "スキルリスト",
|
|
387
|
-
"settingSystem.accessCode.desc": "管理者が暗号化アクセスを有効にしています",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "アクセスコードを入力してください",
|
|
389
|
-
"settingSystem.accessCode.title": "アクセスコード",
|
|
390
387
|
"settingSystem.oauth.info.desc": "ログイン済み",
|
|
391
388
|
"settingSystem.oauth.info.title": "アカウント情報",
|
|
392
389
|
"settingSystem.oauth.signin.action": "ログイン",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "오프닝 질문",
|
|
385
385
|
"settingOpening.title": "오프닝 설정",
|
|
386
386
|
"settingPlugin.title": "기능 목록",
|
|
387
|
-
"settingSystem.accessCode.desc": "관리자가 암호화된 액세스를 활성화했습니다",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "액세스 암호를 입력하세요",
|
|
389
|
-
"settingSystem.accessCode.title": "액세스 암호",
|
|
390
387
|
"settingSystem.oauth.info.desc": "로그인됨",
|
|
391
388
|
"settingSystem.oauth.info.title": "계정 정보",
|
|
392
389
|
"settingSystem.oauth.signin.action": "로그인",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Openingsvragen",
|
|
385
385
|
"settingOpening.title": "Openingsinstellingen",
|
|
386
386
|
"settingPlugin.title": "Vaardighedenlijst",
|
|
387
|
-
"settingSystem.accessCode.desc": "Versleutelde toegang is ingeschakeld door de beheerder",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Voer toegangswachtwoord in",
|
|
389
|
-
"settingSystem.accessCode.title": "Toegangswachtwoord",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Ingelogd",
|
|
391
388
|
"settingSystem.oauth.info.title": "Accountinformatie",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Inloggen",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Pytania wprowadzające",
|
|
385
385
|
"settingOpening.title": "Ustawienia powitania",
|
|
386
386
|
"settingPlugin.title": "Lista umiejętności",
|
|
387
|
-
"settingSystem.accessCode.desc": "Dostęp szyfrowany został włączony przez administratora",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Wprowadź hasło dostępu",
|
|
389
|
-
"settingSystem.accessCode.title": "Hasło dostępu",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Zalogowano",
|
|
391
388
|
"settingSystem.oauth.info.title": "Informacje o koncie",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Zaloguj się",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Perguntas de Abertura",
|
|
385
385
|
"settingOpening.title": "Configurações de Abertura",
|
|
386
386
|
"settingPlugin.title": "Lista de Habilidades",
|
|
387
|
-
"settingSystem.accessCode.desc": "O acesso criptografado foi ativado pelo administrador",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Digite a senha de acesso",
|
|
389
|
-
"settingSystem.accessCode.title": "Senha de Acesso",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Conectado",
|
|
391
388
|
"settingSystem.oauth.info.title": "Informações da Conta",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Entrar",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Вводные вопросы",
|
|
385
385
|
"settingOpening.title": "Настройки приветствия",
|
|
386
386
|
"settingPlugin.title": "Список навыков",
|
|
387
|
-
"settingSystem.accessCode.desc": "Доступ по паролю включён администратором",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Введите пароль доступа",
|
|
389
|
-
"settingSystem.accessCode.title": "Пароль доступа",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Вы вошли в систему",
|
|
391
388
|
"settingSystem.oauth.info.title": "Информация об аккаунте",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Войти",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Açılış Soruları",
|
|
385
385
|
"settingOpening.title": "Açılış Ayarları",
|
|
386
386
|
"settingPlugin.title": "Yetenek Listesi",
|
|
387
|
-
"settingSystem.accessCode.desc": "Şifreli erişim, yönetici tarafından etkinleştirilmiştir",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Erişim şifresini girin",
|
|
389
|
-
"settingSystem.accessCode.title": "Erişim Şifresi",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Giriş yapıldı",
|
|
391
388
|
"settingSystem.oauth.info.title": "Hesap Bilgileri",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Giriş Yap",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "Câu Hỏi Mở Đầu",
|
|
385
385
|
"settingOpening.title": "Cài Đặt Mở Đầu",
|
|
386
386
|
"settingPlugin.title": "Danh Sách Kỹ Năng",
|
|
387
|
-
"settingSystem.accessCode.desc": "Mã truy cập được mã hóa do quản trị viên bật",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "Nhập mật khẩu truy cập",
|
|
389
|
-
"settingSystem.accessCode.title": "Mật Khẩu Truy Cập",
|
|
390
387
|
"settingSystem.oauth.info.desc": "Đã đăng nhập",
|
|
391
388
|
"settingSystem.oauth.info.title": "Thông Tin Tài Khoản",
|
|
392
389
|
"settingSystem.oauth.signin.action": "Đăng Nhập",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "开场问题",
|
|
385
385
|
"settingOpening.title": "开场设置",
|
|
386
386
|
"settingPlugin.title": "技能列表",
|
|
387
|
-
"settingSystem.accessCode.desc": "管理员已开启加密访问",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "请输入访问密码",
|
|
389
|
-
"settingSystem.accessCode.title": "访问密码",
|
|
390
387
|
"settingSystem.oauth.info.desc": "已登录",
|
|
391
388
|
"settingSystem.oauth.info.title": "账户信息",
|
|
392
389
|
"settingSystem.oauth.signin.action": "登录",
|
|
@@ -384,9 +384,6 @@
|
|
|
384
384
|
"settingOpening.openingQuestions.title": "開場問題",
|
|
385
385
|
"settingOpening.title": "開場設定",
|
|
386
386
|
"settingPlugin.title": "插件列表",
|
|
387
|
-
"settingSystem.accessCode.desc": "管理員已開啟加密訪問",
|
|
388
|
-
"settingSystem.accessCode.placeholder": "請輸入訪問密碼",
|
|
389
|
-
"settingSystem.accessCode.title": "訪問密碼",
|
|
390
387
|
"settingSystem.oauth.info.desc": "已登錄",
|
|
391
388
|
"settingSystem.oauth.info.title": "帳戶資訊",
|
|
392
389
|
"settingSystem.oauth.signin.action": "登錄",
|
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.197",
|
|
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",
|
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
"build:electron": "cross-env NODE_OPTIONS=--max-old-space-size=8192 NEXT_PUBLIC_IS_DESKTOP_APP=1 tsx scripts/electronWorkflow/buildNextApp.mts",
|
|
43
43
|
"build:vercel": "npm run prebuild && cross-env NODE_OPTIONS=--max-old-space-size=6144 next build --webpack",
|
|
44
44
|
"clean:node_modules": "bash -lc 'set -e; echo \"Removing all node_modules...\"; rm -rf node_modules; pnpm -r exec rm -rf node_modules; rm -rf apps/desktop/node_modules; echo \"All node_modules removed.\"'",
|
|
45
|
-
"db:generate": "drizzle-kit generate && npm run
|
|
46
|
-
"db:generate-client": "tsx ./scripts/migrateClientDB/compile-migrations.ts",
|
|
45
|
+
"db:generate": "drizzle-kit generate && npm run workflow:dbml",
|
|
47
46
|
"db:migrate": "MIGRATION_DB=1 tsx ./scripts/migrateServerDB/index.ts",
|
|
48
47
|
"db:studio": "drizzle-kit studio",
|
|
49
48
|
"db:visualize": "dbdocs build docs/development/database-schema.dbml --project lobe-chat",
|
|
@@ -6,8 +6,6 @@ export const USE_AZURE_OPENAI = 'X-use-azure-openai';
|
|
|
6
6
|
|
|
7
7
|
export const AZURE_OPENAI_API_VERSION = 'X-azure-openai-api-version';
|
|
8
8
|
|
|
9
|
-
export const LOBE_CHAT_ACCESS_CODE = 'X-lobe-chat-access-code';
|
|
10
|
-
|
|
11
9
|
export const OAUTH_AUTHORIZED = 'X-oauth-authorized';
|
|
12
10
|
|
|
13
11
|
/**
|
|
@@ -16,7 +14,6 @@ export const OAUTH_AUTHORIZED = 'X-oauth-authorized';
|
|
|
16
14
|
export const getOpenAIAuthFromRequest = (req: Request) => {
|
|
17
15
|
const apiKey = req.headers.get(OPENAI_API_KEY_HEADER_KEY);
|
|
18
16
|
const endpoint = req.headers.get(OPENAI_END_POINT);
|
|
19
|
-
const accessCode = req.headers.get(LOBE_CHAT_ACCESS_CODE);
|
|
20
17
|
const useAzureStr = req.headers.get(USE_AZURE_OPENAI);
|
|
21
18
|
const apiVersion = req.headers.get(AZURE_OPENAI_API_VERSION);
|
|
22
19
|
const oauthAuthorizedStr = req.headers.get(OAUTH_AUTHORIZED);
|
|
@@ -25,5 +22,5 @@ export const getOpenAIAuthFromRequest = (req: Request) => {
|
|
|
25
22
|
const oauthAuthorized = !!oauthAuthorizedStr;
|
|
26
23
|
const useAzure = !!useAzureStr;
|
|
27
24
|
|
|
28
|
-
return {
|
|
25
|
+
return { apiKey, apiVersion, endpoint, oauthAuthorized, useAzure, userId };
|
|
29
26
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PGlite } from '@electric-sql/pglite';
|
|
2
|
+
import { vector } from '@electric-sql/pglite/vector';
|
|
3
|
+
import { drizzle as pgliteDrizzle } from 'drizzle-orm/pglite';
|
|
4
|
+
import { migrate as pgliteMigrate } from 'drizzle-orm/pglite/migrator';
|
|
5
|
+
import { drizzle as nodeDrizzle } from 'drizzle-orm/node-postgres';
|
|
6
|
+
import { migrate as nodeMigrate } from 'drizzle-orm/node-postgres/migrator';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { Pool as NodePool } from 'pg';
|
|
9
|
+
|
|
10
|
+
import { serverDBEnv } from '@/config/db';
|
|
11
|
+
|
|
12
|
+
import * as schema from '../schemas';
|
|
13
|
+
import { LobeChatDatabase } from '../type';
|
|
14
|
+
|
|
15
|
+
const migrationsFolder = join(__dirname, '../../migrations');
|
|
16
|
+
|
|
17
|
+
const isServerDBMode = process.env.TEST_SERVER_DB === '1';
|
|
18
|
+
|
|
19
|
+
let testClientDB: ReturnType<typeof pgliteDrizzle<typeof schema>> | null = null;
|
|
20
|
+
let testServerDB: ReturnType<typeof nodeDrizzle<typeof schema>> | null = null;
|
|
21
|
+
|
|
22
|
+
export const getTestDB = async (): Promise<LobeChatDatabase> => {
|
|
23
|
+
// Server DB mode (node-postgres)
|
|
24
|
+
if (isServerDBMode) {
|
|
25
|
+
if (testServerDB) return testServerDB as unknown as LobeChatDatabase;
|
|
26
|
+
|
|
27
|
+
const connectionString = serverDBEnv.DATABASE_TEST_URL;
|
|
28
|
+
|
|
29
|
+
if (!connectionString) {
|
|
30
|
+
throw new Error('DATABASE_TEST_URL is not set');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const client = new NodePool({ connectionString });
|
|
34
|
+
testServerDB = nodeDrizzle(client, { schema });
|
|
35
|
+
|
|
36
|
+
await nodeMigrate(testServerDB, { migrationsFolder });
|
|
37
|
+
|
|
38
|
+
return testServerDB as unknown as LobeChatDatabase;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Client DB mode (PGlite)
|
|
42
|
+
if (testClientDB) return testClientDB as unknown as LobeChatDatabase;
|
|
43
|
+
|
|
44
|
+
const pglite = new PGlite({ extensions: { vector } });
|
|
45
|
+
testClientDB = pgliteDrizzle({ client: pglite, schema });
|
|
46
|
+
|
|
47
|
+
await pgliteMigrate(testClientDB, { migrationsFolder });
|
|
48
|
+
|
|
49
|
+
return testClientDB as unknown as LobeChatDatabase;
|
|
50
|
+
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { eq } from 'drizzle-orm';
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
4
4
|
|
|
5
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
5
6
|
import { sessionGroups, users } from '../../schemas';
|
|
6
7
|
import { LobeChatDatabase } from '../../type';
|
|
7
8
|
import { SessionGroupModel } from '../sessionGroup';
|
|
8
|
-
import { getTestDB } from './_util';
|
|
9
9
|
|
|
10
10
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '../../schemas';
|
|
17
17
|
import { LobeChatDatabase } from '../../type';
|
|
18
18
|
import { AgentModel } from '../agent';
|
|
19
|
-
import { getTestDB } from '
|
|
19
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
20
20
|
|
|
21
21
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
22
22
|
|
|
@@ -6,7 +6,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
|
6
6
|
import { AiModelSelectItem, NewAiModelItem, aiModels, users } from '../../schemas';
|
|
7
7
|
import { LobeChatDatabase } from '../../type';
|
|
8
8
|
import { AiModelModel } from '../aiModel';
|
|
9
|
-
import { getTestDB } from '
|
|
9
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
10
10
|
|
|
11
11
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
12
12
|
|
|
@@ -8,7 +8,7 @@ import { sleep } from '@/utils/sleep';
|
|
|
8
8
|
import { aiProviders, users } from '../../schemas';
|
|
9
9
|
import { LobeChatDatabase } from '../../type';
|
|
10
10
|
import { AiProviderModel } from '../aiProvider';
|
|
11
|
-
import { getTestDB } from '
|
|
11
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
12
12
|
|
|
13
13
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
14
14
|
|
|
@@ -5,7 +5,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
|
5
5
|
import { apiKeys, users } from '../../schemas';
|
|
6
6
|
import { LobeChatDatabase } from '../../type';
|
|
7
7
|
import { ApiKeyModel } from '../apiKey';
|
|
8
|
-
import { getTestDB } from '
|
|
8
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
9
9
|
|
|
10
10
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
|
7
7
|
import { asyncTasks, users } from '../../schemas';
|
|
8
8
|
import { LobeChatDatabase } from '../../type';
|
|
9
9
|
import { AsyncTaskModel } from '../asyncTask';
|
|
10
|
-
import { getTestDB } from '
|
|
10
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
11
11
|
|
|
12
12
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@ import { LobeChatDatabase } from '../../type';import { uuid } from '@/utils/uuid
|
|
|
6
6
|
|
|
7
7
|
import { chunks, embeddings, fileChunks, files, unstructuredChunks, users } from '../../schemas';
|
|
8
8
|
import { ChunkModel } from '../chunk';
|
|
9
|
-
import { getTestDB } from '
|
|
9
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
10
10
|
import { codeEmbedding, designThinkingQuery, designThinkingQuery2 } from './fixtures/embedding';
|
|
11
11
|
|
|
12
12
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
@@ -5,7 +5,7 @@ import { documents, files, users } from '../../schemas';
|
|
|
5
5
|
import { LobeChatDatabase } from '../../type';
|
|
6
6
|
import { DocumentModel } from '../document';
|
|
7
7
|
import { FileModel } from '../file';
|
|
8
|
-
import { getTestDB } from '
|
|
8
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
9
9
|
|
|
10
10
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it } from 'vitest';
|
|
|
3
3
|
|
|
4
4
|
import { LobeChatDatabase } from '../../type';
|
|
5
5
|
import { DrizzleMigrationModel } from '../drizzleMigration';
|
|
6
|
-
import { getTestDB } from '
|
|
6
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
7
7
|
|
|
8
8
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
|
4
4
|
import { chunks, embeddings, users } from '../../schemas';
|
|
5
5
|
import { LobeChatDatabase } from '../../type';
|
|
6
6
|
import { EmbeddingModel } from '../embedding';
|
|
7
|
-
import { getTestDB } from '
|
|
7
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
8
8
|
import { designThinkingQuery } from './fixtures/embedding';
|
|
9
9
|
|
|
10
10
|
const userId = 'embedding-user-test';
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from '../../schemas';
|
|
16
16
|
import { LobeChatDatabase } from '../../type';
|
|
17
17
|
import { FileModel } from '../file';
|
|
18
|
-
import { getTestDB } from '
|
|
18
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
19
19
|
|
|
20
20
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from '../../schemas';
|
|
16
16
|
import { LobeChatDatabase } from '../../type';
|
|
17
17
|
import { GenerationModel } from '../generation';
|
|
18
|
-
import { getTestDB } from '
|
|
18
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
19
19
|
|
|
20
20
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
21
21
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from '../../schemas';
|
|
14
14
|
import { LobeChatDatabase } from '../../type';
|
|
15
15
|
import { GenerationBatchModel } from '../generationBatch';
|
|
16
|
-
import { getTestDB } from '
|
|
16
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
17
17
|
|
|
18
18
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
19
19
|
|
|
@@ -6,7 +6,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
|
6
6
|
import { generationBatches, generationTopics, generations, users } from '../../schemas';
|
|
7
7
|
import { LobeChatDatabase } from '../../type';
|
|
8
8
|
import { GenerationTopicModel } from '../generationTopic';
|
|
9
|
-
import { getTestDB } from '
|
|
9
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
10
10
|
|
|
11
11
|
// Mock FileService
|
|
12
12
|
const mockGetFullFileUrl = vi.fn();
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../../schemas';
|
|
15
15
|
import { LobeChatDatabase } from '../../type';
|
|
16
16
|
import { KnowledgeBaseModel } from '../knowledgeBase';
|
|
17
|
-
import { getTestDB } from '
|
|
17
|
+
import { getTestDB } from '../../core/getTestDB';
|
|
18
18
|
|
|
19
19
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
20
20
|
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from '../../../schemas';
|
|
20
20
|
import { LobeChatDatabase } from '../../../type';
|
|
21
21
|
import { MessageModel } from '../../message';
|
|
22
|
-
import { getTestDB } from '
|
|
22
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
23
23
|
import { codeEmbedding } from '../fixtures/embedding';
|
|
24
24
|
|
|
25
25
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from '../../../schemas';
|
|
19
19
|
import { LobeChatDatabase } from '../../../type';
|
|
20
20
|
import { MessageModel } from '../../message';
|
|
21
|
-
import { getTestDB } from '
|
|
21
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
22
22
|
import { codeEmbedding } from '../fixtures/embedding';
|
|
23
23
|
|
|
24
24
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from '../../../schemas';
|
|
29
29
|
import { LobeChatDatabase } from '../../../type';
|
|
30
30
|
import { MessageModel } from '../../message';
|
|
31
|
-
import { getTestDB } from '
|
|
31
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
32
32
|
import { codeEmbedding } from '../fixtures/embedding';
|
|
33
33
|
|
|
34
34
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
@@ -7,7 +7,7 @@ import { uuid } from '@/utils/uuid';
|
|
|
7
7
|
import { embeddings, files, messageQueries, messages, sessions, users } from '../../../schemas';
|
|
8
8
|
import { LobeChatDatabase } from '../../../type';
|
|
9
9
|
import { MessageModel } from '../../message';
|
|
10
|
-
import { getTestDB } from '
|
|
10
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
11
11
|
import { codeEmbedding } from '../fixtures/embedding';
|
|
12
12
|
|
|
13
13
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
|
4
4
|
import { agents, messages, sessions, threads, topics, users } from '../../../schemas';
|
|
5
5
|
import { LobeChatDatabase } from '../../../type';
|
|
6
6
|
import { MessageModel } from '../../message';
|
|
7
|
-
import { getTestDB } from '
|
|
7
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
8
8
|
|
|
9
9
|
const serverDB: LobeChatDatabase = await getTestDB();
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from '../../../schemas';
|
|
24
24
|
import { LobeChatDatabase } from '../../../type';
|
|
25
25
|
import { MessageModel } from '../../message';
|
|
26
|
-
import { getTestDB } from '
|
|
26
|
+
import { getTestDB } from '../../../core/getTestDB';
|
|
27
27
|
import { codeEmbedding } from '../fixtures/embedding';
|
|
28
28
|
|
|
29
29
|
const serverDB: LobeChatDatabase = await getTestDB();
|