Skip to content

Commit

Permalink
♻️ refactor: refactor the client service to deprecated (#5132)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Dec 22, 2024
1 parent 50cef98 commit e603234
Show file tree
Hide file tree
Showing 22 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { clientS3Storage } from '@/services/file/ClientS3';
import { serverConfigSelectors } from '@/store/serverConfig/selectors';
import { createServerConfigStore } from '@/store/serverConfig/store';

import { ClientService } from './client';
import { ClientService } from './_deprecated';

const fileService = new ClientService();

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/file/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/import/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ChatTranslate,
} from '@/types/message';

import { ClientService } from './client';
import { ClientService } from './_deprecated';

const messageService = new ClientService();

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/message/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DB_Plugin } from '@/database/_deprecated/schemas/plugin';
import { LobeTool } from '@/types/tool';
import { LobeToolCustomPlugin } from '@/types/tool/plugin';

import { ClientService } from './client';
import { ClientService } from './_deprecated';
import { InstallPluginParams } from './type';

const pluginService = new ClientService();
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SessionGroupModel } from '@/database/_deprecated/models/sessionGroup';
import { LobeAgentConfig } from '@/types/agent';
import { LobeAgentSession, LobeSessionType, SessionGroups } from '@/types/session';

import { ClientService } from './client';
import { ClientService } from './_deprecated';

const sessionService = new ClientService();

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/session/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/topic/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SessionModel } from '@/database/_deprecated/models/session';
import { CreateTopicParams, TopicModel } from '@/database/_deprecated/models/topic';
import { ChatTopic } from '@/types/topic';

import { ClientService } from './client';
import { ClientService } from './_deprecated';

const topicService = new ClientService();
// Mock the TopicModel
Expand Down
2 changes: 1 addition & 1 deletion src/services/topic/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UserModel } from '@/database/_deprecated/models/user';
import { UserPreference } from '@/types/user';
import { UserSettings } from '@/types/user/settings';

import { ClientService } from './client';
import { ClientService } from './_deprecated';

vi.mock('@/database/_deprecated/models/user', () => ({
UserModel: {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/services/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClientService as DeprecatedService } from './client';
import { ClientService as DeprecatedService } from './_deprecated';
import { ClientService } from './pglite';
import { ServerService } from './server';

Expand Down
2 changes: 1 addition & 1 deletion src/store/chat/slices/builtinTool/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { act, renderHook } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';

import { fileService } from '@/services/file';
import { ClientService } from '@/services/file/client';
import { ClientService } from '@/services/file/_deprecated';
import { messageService } from '@/services/message';
import { imageGenerationService } from '@/services/textToImage';
import { uploadService } from '@/services/upload';
Expand Down
2 changes: 1 addition & 1 deletion src/store/user/slices/common/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withSWR } from '~test-utils';

import { DEFAULT_PREFERENCE } from '@/const/user';
import { userService } from '@/services/user';
import { ClientService } from '@/services/user/client';
import { ClientService } from '@/services/user/_deprecated';
import { useUserStore } from '@/store/user';
import { preferenceSelectors } from '@/store/user/selectors';
import { GlobalServerConfig } from '@/types/serverConfig';
Expand Down

0 comments on commit e603234

Please sign in to comment.