diff --git a/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs b/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs index 92e86d46e..82d43ba00 100644 --- a/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs +++ b/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs @@ -1,17 +1,17 @@ import Component from "@glimmer/component"; import { service } from "@ember/service"; import DButton from "discourse/components/d-button"; +import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manager"; export default class AiBotSidebarNewConversation extends Component { - @service router; + @service sidebarState; - get show() { - // don't show the new question button on the conversations home page - return this.router.currentRouteName !== "discourse-ai-bot-conversations"; + get shouldRender() { + return this.sidebarState.isCurrentPanel(AI_CONVERSATIONS_PANEL); }