mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
feat(core): workspace embedding settings (#11801)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced "Indexer & Embedding" workspace settings to manage AI embedding for local content, including document ignoring and attachment uploads. - Added UI components for embedding settings, attachments, and ignored documents with pagination and deletion capabilities. - Provided comprehensive file-type icons for attachments. - **Improvements** - Added a new tab for indexing and embedding in workspace settings navigation. - Included test identifiers on key UI elements to enhance automated testing. - **Localization** - Added English localization strings covering all embedding-related UI text and actions. - **Bug Fixes** - Enabled previously skipped end-to-end tests for embedding settings to improve reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -2,6 +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 { ServerDeploymentType } from '@affine/graphql';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import {
|
||||
@@ -53,6 +54,8 @@ export const WorkspaceSetting = ({
|
||||
return <WorkspaceSettingLicense onCloseSetting={onCloseSetting} />;
|
||||
case 'workspace:integrations':
|
||||
return <IntegrationSetting />;
|
||||
case 'workspace:indexer-embedding':
|
||||
return <IndexerEmbeddingSettings />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -106,6 +109,12 @@ export const useWorkspaceSettingList = (): SettingSidebarItem[] => {
|
||||
icon: <SaveIcon />,
|
||||
testId: 'workspace-setting:storage',
|
||||
},
|
||||
{
|
||||
key: 'workspace:indexer-embedding',
|
||||
title: t['Indexer & Embedding'](),
|
||||
icon: <SettingsIcon />,
|
||||
testId: 'workspace-setting:indexer-embedding',
|
||||
},
|
||||
showBilling && {
|
||||
key: 'workspace:billing' as SettingTab,
|
||||
title: t['com.affine.settings.workspace.billing'](),
|
||||
|
||||
Reference in New Issue
Block a user