mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(server): exclude outdated doc id style in embedding count (#13269)
fix AI-392 fix AI-393 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved filtering of outdated document ID styles in embedding status reporting, ensuring more accurate counts of embedded documents. * Stricter rate limiting applied to workspace embedding status queries for enhanced system reliability. * **Bug Fixes** * Resolved issues with duplicate or outdated document IDs affecting embedding status totals. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -356,6 +356,7 @@ export class CopilotContextRootResolver {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Throttle('strict')
|
||||
@Query(() => ContextWorkspaceEmbeddingStatus, {
|
||||
description: 'query workspace embedding status',
|
||||
})
|
||||
@@ -372,9 +373,7 @@ export class CopilotContextRootResolver {
|
||||
|
||||
if (this.context.canEmbedding) {
|
||||
const { total, embedded } =
|
||||
await this.models.copilotWorkspace.getWorkspaceEmbeddingStatus(
|
||||
workspaceId
|
||||
);
|
||||
await this.models.copilotWorkspace.getEmbeddingStatus(workspaceId);
|
||||
return { total, embedded };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user