feat(core): embedding progress (#12367)

### TL;DR

feat: show embedding progress in settings panel

![截屏2025-05-19 20.25.19.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyktQ6Qwc7H6TiRCFoYN/59d8f9ef-0876-4ed5-9c09-db12686adb47.png)

### What changed

* show embedding progress in settings panel
* polling embedding status based on RxJS

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

- **New Features**
  - Added real-time embedding progress tracking and display in embedding settings, including a visual progress bar and status messages.
  - Introduced localized text for embedding progress statuses.
  - Added an optional test ID attribute to the progress bar component for improved testing.
- **Style**
  - Added new styles for embedding progress UI elements.
- **Tests**
  - Added an end-to-end test to verify embedding progress is displayed correctly in the settings UI.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
yoyoyohamapi
2025-05-21 05:07:13 +00:00
parent 8f352580a7
commit d70f09b498
9 changed files with 225 additions and 5 deletions

View File

@@ -6215,6 +6215,22 @@ export function useAFFiNEI18N(): {
* `AI can call files embedded in the workspace.`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.switch.description"](): string;
/**
* `Embedding progress`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.progress.title"](): string;
/**
* `Syncing`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.progress.syncing"](): string;
/**
* `Synced`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.progress.synced"](): string;
/**
* `Loading sync status...`
*/
["com.affine.settings.workspace.indexer-embedding.embedding.progress.loading-sync-status"](): string;
/**
* `Ignore Docs`
*/

View File

@@ -1553,6 +1553,10 @@
"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.progress.title": "Embedding progress",
"com.affine.settings.workspace.indexer-embedding.embedding.progress.syncing": "Syncing",
"com.affine.settings.workspace.indexer-embedding.embedding.progress.synced": "Synced",
"com.affine.settings.workspace.indexer-embedding.embedding.progress.loading-sync-status": "Loading sync status...",
"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",