Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit b47ef35

Browse files
committed
FIX: Discovery shouldn't re-trigger when no search
1 parent ef08e5e commit b47ef35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

assets/javascripts/discourse/components/ai-search-discoveries.gjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ export default class AiSearchDiscoveries extends Component {
186186

187187
@action
188188
async triggerDiscovery() {
189+
if (this.query?.length === 0) {
190+
this.discobotDiscoveries.resetDiscovery();
191+
this.smoothStreamer.resetStreaming();
192+
return;
193+
}
194+
189195
if (this.discobotDiscoveries.lastQuery === this.query) {
190196
this.hideDiscoveries = false;
191197
return;

0 commit comments

Comments
 (0)