mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: hide embedding status tip if embedding completed (#13156)
> CLOSE AI-334 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved the responsiveness of embedding status updates in the AI chat composer, reducing unnecessary refreshes when the status has not changed. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -317,12 +317,11 @@ export class AIChatComposer extends SignalWatcher(
|
||||
this.embeddingCompleted = false;
|
||||
return;
|
||||
}
|
||||
const prevCompleted = this.embeddingCompleted;
|
||||
const completed = status.embedded === status.total;
|
||||
this.embeddingCompleted = completed;
|
||||
if (completed) {
|
||||
this.embeddingCompleted = true;
|
||||
} else {
|
||||
this.embeddingCompleted = false;
|
||||
if (prevCompleted !== completed) {
|
||||
this.requestUpdate();
|
||||
}
|
||||
},
|
||||
signal
|
||||
|
||||
Reference in New Issue
Block a user