This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
assets/javascripts/discourse/components Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import { i18n } from "discourse-i18n";
1313import DTooltip from " float-kit/components/d-tooltip" ;
1414import AiIndicatorWave from " ./ai-indicator-wave" ;
1515
16+ const AI_RESULTS_TOGGLED = " full-page-search:ai-results-toggled" ;
17+
1618export default class AiFullPageSearch extends Component {
1719 @service appEvents;
1820 @service router;
@@ -131,6 +133,9 @@ export default class AiFullPageSearch extends Component {
131133
132134 @action
133135 toggleAiResults () {
136+ this .appEvents .trigger (AI_RESULTS_TOGGLED , {
137+ enabled: ! this .showingAiResults ,
138+ });
134139 if (this .showingAiResults ) {
135140 this .args .addSearchResults ([], " topic_id" );
136141 } else {
@@ -144,6 +149,9 @@ export default class AiFullPageSearch extends Component {
144149 this .AiResults = [];
145150 this .showingAiResults = false ;
146151 this .args .addSearchResults ([], " topic_id" );
152+ this .appEvents .trigger (AI_RESULTS_TOGGLED , {
153+ enabled: false ,
154+ });
147155 }
148156
149157 performHyDESearch () {
You can’t perform that action at this time.
0 commit comments