Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import I18n, { i18n } from "discourse-i18n";
import DTooltip from "float-kit/components/d-tooltip";
import AiIndicatorWave from "./ai-indicator-wave";

const AI_RESULTS_TOGGLED = "full-page-search:ai-results-toggled";

export default class AiFullPageSearch extends Component {
@service appEvents;
@service router;
Expand Down Expand Up @@ -123,6 +125,9 @@ export default class AiFullPageSearch extends Component {

@action
toggleAiResults() {
this.appEvents.trigger(AI_RESULTS_TOGGLED, {
enabled: !this.showingAiResults,
});
if (this.showingAiResults) {
this.args.addSearchResults([], "topic_id");
} else {
Expand All @@ -136,6 +141,9 @@ export default class AiFullPageSearch extends Component {
this.AiResults = [];
this.showingAiResults = false;
this.args.addSearchResults([], "topic_id");
this.appEvents.trigger(AI_RESULTS_TOGGLED, {
enabled: false,
});
}

performHyDESearch() {
Expand Down
Loading