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:
德布劳外 · 贾贵
2025-07-11 15:31:12 +08:00
committed by GitHub
parent b23f380539
commit 58dc53581f

View File

@@ -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