refactor(core): indexer & embedding -> embedding (#12387)

### TL;DR

refactor: rename settings, indexer embedding -> embedding

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Unified naming in workspace settings from "Indexer & Embedding" to "Embedding" for improved clarity.
  - Updated sidebar labels, tab keys, and test IDs to reflect the new naming convention.
  - Streamlined the layout and organization of the embedding settings interface for a more consistent user experience.
  - Simplified the export and component structure for embedding settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
yoyoyohamapi
2025-05-21 02:28:43 +00:00
parent 65a14f50c7
commit ae0dbb9faf
6 changed files with 91 additions and 111 deletions
@@ -2,7 +2,7 @@ import { useWorkspaceInfo } from '@affine/core/components/hooks/use-workspace-in
import { ServerService } from '@affine/core/modules/cloud';
import type { SettingTab } from '@affine/core/modules/dialogs/constant';
import { WorkspaceService } from '@affine/core/modules/workspace';
import { IndexerEmbeddingSettings } from '@affine/core/modules/workspace-indexer-embedding';
import { EmbeddingSettings } from '@affine/core/modules/workspace-indexer-embedding';
import { ServerDeploymentType } from '@affine/graphql';
import { useI18n } from '@affine/i18n';
import {
@@ -54,8 +54,8 @@ export const WorkspaceSetting = ({
return <WorkspaceSettingLicense onCloseSetting={onCloseSetting} />;
case 'workspace:integrations':
return <IntegrationSetting />;
case 'workspace:indexer-embedding':
return <IndexerEmbeddingSettings />;
case 'workspace:embedding':
return <EmbeddingSettings />;
default:
return null;
}
@@ -110,10 +110,13 @@ export const useWorkspaceSettingList = (): SettingSidebarItem[] => {
testId: 'workspace-setting:storage',
},
{
key: 'workspace:indexer-embedding',
title: t['Indexer & Embedding'](),
key: 'workspace:embedding',
title:
t[
'com.affine.settings.workspace.indexer-embedding.embedding.title'
](),
icon: <SettingsIcon />,
testId: 'workspace-setting:indexer-embedding',
testId: 'workspace-setting:embedding',
},
showBilling && {
key: 'workspace:billing' as SettingTab,