diff --git a/packages/backend/server/src/models/copilot-session.ts b/packages/backend/server/src/models/copilot-session.ts index 1d9586768e..76e895bd33 100644 --- a/packages/backend/server/src/models/copilot-session.ts +++ b/packages/backend/server/src/models/copilot-session.ts @@ -580,7 +580,6 @@ export class CopilotSessionModel extends BaseModel { .reduce((prev, cost) => prev + cost, 0); } - @Transactional() async cleanupEmptySessions(earlyThen: Date) { // delete never used sessions const { count: removed } = await this.db.aiSession.deleteMany({ diff --git a/packages/backend/server/src/models/copilot-workspace.ts b/packages/backend/server/src/models/copilot-workspace.ts index b59a9ebe43..0dc0e5b466 100644 --- a/packages/backend/server/src/models/copilot-workspace.ts +++ b/packages/backend/server/src/models/copilot-workspace.ts @@ -185,7 +185,6 @@ export class CopilotWorkspaceConfigModel extends BaseModel { return { workspaceId, AND: condition }; } - @Transactional() async listEmbeddableDocIds(workspaceId: string) { const condition = this.getEmbeddableCondition(workspaceId); const rows = await this.db.snapshot.findMany({ diff --git a/packages/backend/server/src/plugins/copilot/embedding/job.ts b/packages/backend/server/src/plugins/copilot/embedding/job.ts index 5fd6413501..b4880b22b6 100644 --- a/packages/backend/server/src/plugins/copilot/embedding/job.ts +++ b/packages/backend/server/src/plugins/copilot/embedding/job.ts @@ -416,12 +416,12 @@ export class CopilotEmbeddingJob { workspaceId, docId ); - this.logger.log( + this.logger.debug( `Check if doc ${docId} in workspace ${workspaceId} needs embedding: ${needEmbedding}` ); if (needEmbedding) { if (signal.aborted) { - this.logger.log( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} is aborted, skipping embedding.` ); return; @@ -442,7 +442,7 @@ export class CopilotEmbeddingJob { existsContent && this.normalize(existsContent) === this.normalize(fragment.summary) ) { - this.logger.log( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} has no content change, skipping embedding.` ); return; @@ -464,12 +464,12 @@ export class CopilotEmbeddingJob { chunks ); } - this.logger.log( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} has summary, embedding done.` ); } else { // for empty doc, insert empty embedding - this.logger.warn( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} has no summary, fulfilling empty embedding.` ); await this.models.copilotContext.fulfillEmptyEmbedding( @@ -478,7 +478,7 @@ export class CopilotEmbeddingJob { ); } } else { - this.logger.warn( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} has no fragment, fulfilling empty embedding.` ); await this.models.copilotContext.fulfillEmptyEmbedding( @@ -498,7 +498,7 @@ export class CopilotEmbeddingJob { error instanceof CopilotContextFileNotSupported && error.message.includes('no content found') ) { - this.logger.warn( + this.logger.debug( `Doc ${docId} in workspace ${workspaceId} has no content, fulfilling empty embedding.` ); // if the doc is empty, we still need to fulfill the embedding