From c2ded24e1e6d2a23474a6e738937591daeed2b75 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Sun, 22 Dec 2024 20:50:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20move=20pgl?= =?UTF-8?q?ite=20to=20client=20service=20(#5133)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update locale * update locale * refactor the service name --- locales/en-US/common.json | 4 ++-- src/services/file/{pglite.test.ts => client.test.ts} | 2 +- src/services/file/{pglite.ts => client.ts} | 0 src/services/file/index.ts | 2 +- src/services/import/{pglite.test.ts => client.test.ts} | 2 +- src/services/import/{pglite.ts => client.ts} | 0 src/services/import/index.ts | 2 +- src/services/message/{pglite.test.ts => client.test.ts} | 2 +- src/services/message/{pglite.ts => client.ts} | 0 src/services/message/index.ts | 2 +- src/services/plugin/{pglite.test.ts => client.test.ts} | 2 +- src/services/plugin/{pglite.ts => client.ts} | 0 src/services/plugin/index.ts | 2 +- src/services/session/{pglite.test.ts => client.test.ts} | 2 +- src/services/session/{pglite.ts => client.ts} | 0 src/services/session/index.ts | 2 +- src/services/topic/{client.test.ts => _deprecated.test.ts} | 0 src/services/topic/{pglite.ts => client.ts} | 0 src/services/topic/index.ts | 2 +- src/services/topic/pglite.test.ts | 2 +- src/services/user/{pglite.test.ts => client.test.ts} | 2 +- src/services/user/{pglite.ts => client.ts} | 0 src/services/user/index.ts | 2 +- 23 files changed, 16 insertions(+), 16 deletions(-) rename src/services/file/{pglite.test.ts => client.test.ts} (99%) rename src/services/file/{pglite.ts => client.ts} (100%) rename src/services/import/{pglite.test.ts => client.test.ts} (99%) rename src/services/import/{pglite.ts => client.ts} (100%) rename src/services/message/{pglite.test.ts => client.test.ts} (99%) rename src/services/message/{pglite.ts => client.ts} (100%) rename src/services/plugin/{pglite.test.ts => client.test.ts} (99%) rename src/services/plugin/{pglite.ts => client.ts} (100%) rename src/services/session/{pglite.test.ts => client.test.ts} (99%) rename src/services/session/{pglite.ts => client.ts} (100%) rename src/services/topic/{client.test.ts => _deprecated.test.ts} (100%) rename src/services/topic/{pglite.ts => client.ts} (100%) rename src/services/user/{pglite.test.ts => client.test.ts} (98%) rename src/services/user/{pglite.ts => client.ts} (100%) diff --git a/locales/en-US/common.json b/locales/en-US/common.json index bb4b7c432d67..3fd1d357cb0d 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -59,14 +59,14 @@ "features": { "knowledgeBase": { "desc": "Build your personal knowledge base and easily start conversations with your assistant (coming soon)", - "title": "Support for knowledge base conversations, unlock your second brain" + "title": "Support for knowledge base conversations" }, "localFirst": { "desc": "Chat data is stored entirely in the browser, keeping your data always under your control.", "title": "Local first, privacy first" }, "pglite": { - "desc": "Built on PGlite, natively supports AI Native advanced features (vector retrieval)", + "desc": "Built on PGlite, natively supports AI Native advanced features (vector search)", "title": "Next-generation client storage architecture" } }, diff --git a/src/services/file/pglite.test.ts b/src/services/file/client.test.ts similarity index 99% rename from src/services/file/pglite.test.ts rename to src/services/file/client.test.ts index 5166f6d3138a..32c3c57f3b1c 100644 --- a/src/services/file/pglite.test.ts +++ b/src/services/file/client.test.ts @@ -6,7 +6,7 @@ import { files, globalFiles, users } from '@/database/schemas'; import { clientS3Storage } from '@/services/file/ClientS3'; import { UploadFileParams } from '@/types/files'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; const userId = 'file-user'; diff --git a/src/services/file/pglite.ts b/src/services/file/client.ts similarity index 100% rename from src/services/file/pglite.ts rename to src/services/file/client.ts diff --git a/src/services/file/index.ts b/src/services/file/index.ts index 655d487974b9..53be6a9bc758 100644 --- a/src/services/file/index.ts +++ b/src/services/file/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/import/pglite.test.ts b/src/services/import/client.test.ts similarity index 99% rename from src/services/import/pglite.test.ts rename to src/services/import/client.test.ts index 25d526b78a93..1104a3298cd2 100644 --- a/src/services/import/pglite.test.ts +++ b/src/services/import/client.test.ts @@ -15,7 +15,7 @@ import { import { CURRENT_CONFIG_VERSION } from '@/migrations'; import { ImportResults, ImporterEntryData } from '@/types/importer'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; const userId = 'test-user-id'; const service = new ClientService(userId); diff --git a/src/services/import/pglite.ts b/src/services/import/client.ts similarity index 100% rename from src/services/import/pglite.ts rename to src/services/import/client.ts diff --git a/src/services/import/index.ts b/src/services/import/index.ts index 304b60ca3ef9..e1d22eae3896 100644 --- a/src/services/import/index.ts +++ b/src/services/import/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/message/pglite.test.ts b/src/services/message/client.test.ts similarity index 99% rename from src/services/message/pglite.test.ts rename to src/services/message/client.test.ts index 23629732859c..2372330aabf2 100644 --- a/src/services/message/pglite.test.ts +++ b/src/services/message/client.test.ts @@ -23,7 +23,7 @@ import { CreateMessageParams, } from '@/types/message'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; const userId = 'message-db'; const sessionId = '1'; diff --git a/src/services/message/pglite.ts b/src/services/message/client.ts similarity index 100% rename from src/services/message/pglite.ts rename to src/services/message/client.ts diff --git a/src/services/message/index.ts b/src/services/message/index.ts index 9a195919be66..2ab36c5bc6e9 100644 --- a/src/services/message/index.ts +++ b/src/services/message/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/plugin/pglite.test.ts b/src/services/plugin/client.test.ts similarity index 99% rename from src/services/plugin/pglite.test.ts rename to src/services/plugin/client.test.ts index 018c4eaab4ef..4f4c45df3aca 100644 --- a/src/services/plugin/pglite.test.ts +++ b/src/services/plugin/client.test.ts @@ -7,7 +7,7 @@ import { installedPlugins, users } from '@/database/schemas'; import { LobeTool } from '@/types/tool'; import { LobeToolCustomPlugin } from '@/types/tool/plugin'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { InstallPluginParams } from './type'; // Mocking modules and functions diff --git a/src/services/plugin/pglite.ts b/src/services/plugin/client.ts similarity index 100% rename from src/services/plugin/pglite.ts rename to src/services/plugin/client.ts diff --git a/src/services/plugin/index.ts b/src/services/plugin/index.ts index 4d7751bda346..b3342cdd6fb2 100644 --- a/src/services/plugin/index.ts +++ b/src/services/plugin/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/session/pglite.test.ts b/src/services/session/client.test.ts similarity index 99% rename from src/services/session/pglite.test.ts rename to src/services/session/client.test.ts index 832259a13d8a..e4eaa7a75019 100644 --- a/src/services/session/pglite.test.ts +++ b/src/services/session/client.test.ts @@ -15,7 +15,7 @@ import { import { LobeAgentChatConfig, LobeAgentConfig } from '@/types/agent'; import { LobeAgentSession, LobeSessionType, SessionGroups } from '@/types/session'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; const userId = 'message-db'; const sessionService = new ClientService(userId); diff --git a/src/services/session/pglite.ts b/src/services/session/client.ts similarity index 100% rename from src/services/session/pglite.ts rename to src/services/session/client.ts diff --git a/src/services/session/index.ts b/src/services/session/index.ts index ca99054e04cb..ec3c976de85d 100644 --- a/src/services/session/index.ts +++ b/src/services/session/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/topic/client.test.ts b/src/services/topic/_deprecated.test.ts similarity index 100% rename from src/services/topic/client.test.ts rename to src/services/topic/_deprecated.test.ts diff --git a/src/services/topic/pglite.ts b/src/services/topic/client.ts similarity index 100% rename from src/services/topic/pglite.ts rename to src/services/topic/client.ts diff --git a/src/services/topic/index.ts b/src/services/topic/index.ts index 891fecbbb011..ddb95abeb197 100644 --- a/src/services/topic/index.ts +++ b/src/services/topic/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = diff --git a/src/services/topic/pglite.test.ts b/src/services/topic/pglite.test.ts index c900de550443..476dbb36a6f0 100644 --- a/src/services/topic/pglite.test.ts +++ b/src/services/topic/pglite.test.ts @@ -5,7 +5,7 @@ import { clientDB, initializeDB } from '@/database/client/db'; import { sessions, topics, users } from '@/database/schemas'; import { ChatTopic } from '@/types/topic'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; // Mock data const userId = 'topic-user-test'; diff --git a/src/services/user/pglite.test.ts b/src/services/user/client.test.ts similarity index 98% rename from src/services/user/pglite.test.ts rename to src/services/user/client.test.ts index cab8a0741d03..abb57b37baab 100644 --- a/src/services/user/pglite.test.ts +++ b/src/services/user/client.test.ts @@ -7,7 +7,7 @@ import { userSettings, users } from '@/database/schemas'; import { UserPreference } from '@/types/user'; import { UserSettings } from '@/types/user/settings'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; const mockUser = { avatar: 'avatar.png', diff --git a/src/services/user/pglite.ts b/src/services/user/client.ts similarity index 100% rename from src/services/user/pglite.ts rename to src/services/user/client.ts diff --git a/src/services/user/index.ts b/src/services/user/index.ts index a81a931641a3..56225dc562c8 100644 --- a/src/services/user/index.ts +++ b/src/services/user/index.ts @@ -1,5 +1,5 @@ import { ClientService as DeprecatedService } from './_deprecated'; -import { ClientService } from './pglite'; +import { ClientService } from './client'; import { ServerService } from './server'; const clientService = From bd5d43601cdff807c90c22ec28908c5c186a2578 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 22 Dec 2024 12:59:05 +0000 Subject: [PATCH 2/3] :bookmark: chore(release): v1.37.2 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### [Version 1.37.2](https://github.com/lobehub/lobe-chat/compare/v1.37.1...v1.37.2) Released on **2024-12-22** #### ♻ Code Refactoring - **misc**: Move pglite to client service.
Improvements and Fixes #### Code refactoring * **misc**: Move pglite to client service, closes [#5133](https://github.com/lobehub/lobe-chat/issues/5133) ([c2ded24](https://github.com/lobehub/lobe-chat/commit/c2ded24))
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
--- CHANGELOG.md | 25 +++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5927c7a929..6f8f5c3ae902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ # Changelog +### [Version 1.37.2](https://github.com/lobehub/lobe-chat/compare/v1.37.1...v1.37.2) + +Released on **2024-12-22** + +#### ♻ Code Refactoring + +- **misc**: Move pglite to client service. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move pglite to client service, closes [#5133](https://github.com/lobehub/lobe-chat/issues/5133) ([c2ded24](https://github.com/lobehub/lobe-chat/commit/c2ded24)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 1.37.1](https://github.com/lobehub/lobe-chat/compare/v1.37.0...v1.37.1) Released on **2024-12-22** diff --git a/package.json b/package.json index 031722bf4c03..ccfdaea410e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lobehub/chat", - "version": "1.37.1", + "version": "1.37.2", "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.", "keywords": [ "framework", From 3bb0d32fbd7e7f583207de1de7b29eac4bebdbb7 Mon Sep 17 00:00:00 2001 From: lobehubbot Date: Sun, 22 Dec 2024 13:00:02 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=9D=20docs(bot):=20Auto=20sync=20a?= =?UTF-8?q?gents=20&=20plugin=20to=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog/v1.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog/v1.json b/changelog/v1.json index 1d05fafa44df..cad6ab8f83ff 100644 --- a/changelog/v1.json +++ b/changelog/v1.json @@ -1,4 +1,11 @@ [ + { + "children": { + "improvements": ["Move pglite to client service."] + }, + "date": "2024-12-22", + "version": "1.37.2" + }, { "children": { "improvements": ["Refactor the client service to deprecated."]