mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-16 12:36:07 +00:00
♻️ refactor: move pglite to client service (#5133)
* update locale * update locale * refactor the service name
This commit is contained in:
@@ -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"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -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);
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
CreateMessageParams,
|
||||
} from '@/types/message';
|
||||
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
|
||||
const userId = 'message-db';
|
||||
const sessionId = '1';
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -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
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -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);
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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',
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClientService as DeprecatedService } from './_deprecated';
|
||||
import { ClientService } from './pglite';
|
||||
import { ClientService } from './client';
|
||||
import { ServerService } from './server';
|
||||
|
||||
const clientService =
|
||||
|
||||
Reference in New Issue
Block a user