11import Component from " @glimmer/component" ;
22import { tracked } from " @glimmer/tracking" ;
3- import { Input } from " @ember/component" ;
3+ import { Input , Textarea } from " @ember/component" ;
44import { concat , fn , get } from " @ember/helper" ;
55import { on } from " @ember/modifier" ;
66import { action , computed } from " @ember/object" ;
@@ -247,10 +247,17 @@ export default class AiEmbeddingEditor extends Component {
247247 </div >
248248
249249 {{else }}
250- <div class =" btn btn-flat back-button" {{on " click" this . resetForm}} >
251- {{icon " chevron-left" }}
252- {{i18n " back_button" }}
253- </div >
250+ {{#if this . editingModel.isNew }}
251+ <div class =" btn btn-flat back-button" {{on " click" this . resetForm}} >
252+ {{icon " chevron-left" }}
253+ {{i18n " back_button" }}
254+ </div >
255+ {{else }}
256+ <BackButton
257+ @ route =" adminPlugins.show.discourse-ai-embeddings"
258+ @ label =" discourse_ai.embeddings.back"
259+ />
260+ {{/if }}
254261 <div class =" control-group" >
255262 <label >{{i18n " discourse_ai.embeddings.display_name" }} </label >
256263 <Input
@@ -332,9 +339,8 @@ export default class AiEmbeddingEditor extends Component {
332339 @ type =" checkbox"
333340 @ checked ={{this .editingModel.matryoshka_dimensions }}
334341 />
335- <label >{{i18n
336- " discourse_ai.embeddings.matryoshka_dimensions"
337- }} </label >
342+ <label >{{i18n " discourse_ai.embeddings.matryoshka_dimensions" }}
343+ </label >
338344 <DTooltip
339345 @ icon =" circle-question"
340346 @ content ={{i18n
@@ -345,10 +351,9 @@ export default class AiEmbeddingEditor extends Component {
345351
346352 <div class =" control-group" >
347353 <label >{{i18n " discourse_ai.embeddings.embed_prompt" }} </label >
348- <Input
349- @ type =" text"
350- @ value ={{this .editingModel.embed_prompt }}
354+ <Textarea
351355 class =" ai-embedding-editor-input ai-embedding-editor__embed_prompt"
356+ @ value ={{this .editingModel.embed_prompt }}
352357 />
353358 <DTooltip
354359 @ icon =" circle-question"
@@ -358,8 +363,7 @@ export default class AiEmbeddingEditor extends Component {
358363
359364 <div class =" control-group" >
360365 <label >{{i18n " discourse_ai.embeddings.search_prompt" }} </label >
361- <Input
362- @ type =" text"
366+ <Textarea
363367 class =" ai-embedding-editor-input ai-embedding-editor__search_prompt"
364368 @ value ={{this .editingModel.search_prompt }}
365369 />
0 commit comments