import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { Input } from "@ember/component"; import { fn } from "@ember/helper"; import { action } from "@ember/object"; import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import DButton from "discourse/components/d-button"; import i18n from "discourse-common/helpers/i18n"; import not from "truth-helpers/helpers/not"; export default class AiHelperCustomPrompt extends Component { @tracked _customPromptInput; @action setupCustomPrompt() { this._customPromptInput = document.querySelector( ".ai-custom-prompt__input" ); this._customPromptInput.focus(); } @action sendInput() { return this.args.submit(this.args.promptArgs); } }