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:
yoyoyohamapi committed 2025-05-15 09:36:28 +00:00
1 parent 6224344a4f
commit 6c9f28e08b
25 files changed
+1266 -86

No files matched your search

@@ -1,26 +1,26 @@
{
"ar": 96,
"ar": 95,
"ca": 4,
"da": 4,
"de": 96,
"el-GR": 96,
"de": 95,
"el-GR": 95,
"en": 100,
"es-AR": 96,
"es-AR": 95,
"es-CL": 97,
"es": 96,
"fa": 96,
"fr": 96,
"es": 95,
"fa": 95,
"fr": 95,
"hi": 2,
"it-IT": 96,
"it-IT": 95,
"it": 1,
"ja": 96,
"ja": 95,
"ko": 55,
"pl": 96,
"pt-BR": 96,
"ru": 96,
"sv-SE": 96,
"uk": 96,
"pl": 95,
"pt-BR": 95,
"ru": 95,
"sv-SE": 95,
"uk": 95,
"ur": 2,
"zh-Hans": 96,
"zh-Hant": 96
"zh-Hans": 95,
"zh-Hant": 95
}
+52
View File
@@ -6187,6 +6187,58 @@ export function useAFFiNEI18N(): {
date: string;
time: string;
}>): string;
/**
* `Indexer & Embedding`
*/
["com.affine.settings.workspace.indexer-embedding.title"](): string;
/**
* `Manage AFFiNE indexing and AFFiNE AI Embedding for local content processing`
*/
["com.affine.settings.workspace.indexer-embedding.description"](): string;
/**
* `Embedding`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.title"](): string;
/**
* `Embedding allows AI to retrieve your content. If the indexer uses local settings, it may affect some of the results of the Embedding.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.description"](): string;
/**
* `Select doc`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.select-doc"](): string;
/**
* `Workspace Embedding`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.switch.title"](): string;
/**
* `AI can call files embedded in the workspace.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.switch.description"](): string;
/**
* `Ignore Docs`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.ignore-docs.title"](): string;
/**
* `The Ignored docs will not be embedded into the current workspace.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.ignore-docs.description"](): string;
/**
* `Additional attachments`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.title"](): string;
/**
* `The uploaded file will be embedded in the current workspace.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.description"](): string;
/**
* `Remove the attachment from embedding?`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.title"](): string;
/**
* `Attachment will be removed. AI will not continue to extract content from this attachment.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description"](): string;
/**
* `Sharing doc requires AFFiNE Cloud.`
*/
@@ -1546,6 +1546,19 @@
"com.affine.settings.workspace.backup.import": "Enable local workspace",
"com.affine.settings.workspace.backup.import.success.action": "Open",
"com.affine.settings.workspace.backup.delete-at": "Deleted on {{date}} at {{time}}",
"com.affine.settings.workspace.indexer-embedding.title": "Indexer & Embedding",
"com.affine.settings.workspace.indexer-embedding.description": "Manage AFFiNE indexing and AFFiNE AI Embedding for local content processing",
"com.affine.settings.workspace.indexer-embedding.embedding.title": "Embedding",
"com.affine.settings.workspace.indexer-embedding.embedding.description": "Embedding allows AI to retrieve your content. If the indexer uses local settings, it may affect some of the results of the Embedding.",
"com.affine.settings.workspace.indexer-embedding.embedding.select-doc": "Select doc",
"com.affine.settings.workspace.indexer-embedding.embedding.switch.title": "Workspace Embedding",
"com.affine.settings.workspace.indexer-embedding.embedding.switch.description": "AI can call files embedded in the workspace.",
"com.affine.settings.workspace.indexer-embedding.embedding.ignore-docs.title": "Ignore Docs",
"com.affine.settings.workspace.indexer-embedding.embedding.ignore-docs.description": "The Ignored docs will not be embedded into the current workspace.",
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.title": "Additional attachments",
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.description": "The uploaded file will be embedded in the current workspace.",
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.title": "Remove the attachment from embedding?",
"com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description": "Attachment will be removed. AI will not continue to extract content from this attachment.",
"com.affine.share-menu.EnableCloudDescription": "Sharing doc requires AFFiNE Cloud.",
"com.affine.share-menu.ShareMode": "Share mode",
"com.affine.share-menu.SharePage": "Share doc",