FIX: Discovery shouldn't re-trigger when no search (#1255)

This update fixes an issue where discobot discoveries was re-triggering when search menu was opened with no query present.
This commit is contained in:
Keegan George 2025-04-10 10:01:53 -07:00 committed by GitHub
parent ef08e5ea45
commit 0024f2d264
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -186,6 +186,12 @@ export default class AiSearchDiscoveries extends Component {
@action
async triggerDiscovery() {
if (this.query?.length === 0) {
this.discobotDiscoveries.resetDiscovery();
this.smoothStreamer.resetStreaming();
return;
}
if (this.discobotDiscoveries.lastQuery === this.query) {
this.hideDiscoveries = false;
return;