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

Commit ad5c48d

Browse files
authored
DEV: Add appEvents trigger for AI New Question button (#1379)
* DEV: Add appEvents trigger for AI New Question button * appEvent name update
1 parent d99c335 commit ad5c48d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import DButton from "discourse/components/d-button";
55
import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manager";
66

77
export default class AiBotSidebarNewConversation extends Component {
8+
@service appEvents;
89
@service router;
910
@service sidebarState;
1011

@@ -14,6 +15,8 @@ export default class AiBotSidebarNewConversation extends Component {
1415

1516
@action
1617
routeTo() {
18+
this.appEvents.trigger("discourse-ai:new-conversation-btn-clicked");
19+
1720
if (this.router.currentRouteName !== "discourse-ai-bot-conversations") {
1821
this.router.transitionTo("/discourse-ai/ai-bot/conversations");
1922
}

0 commit comments

Comments
 (0)