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

Commit f43137e

Browse files
authored
UX: Show AI bot toggles in the AI bot options section (#1229)
1 parent da2b083 commit f43137e

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

assets/javascripts/discourse/components/ai-persona-editor.gjs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -283,25 +283,6 @@ export default class PersonaEditor extends Component {
283283
/>
284284
<div class="ai-persona-editor" {{didInsert this.updateAllGroups @model.id}}>
285285
<Form @onSubmit={{this.save}} @data={{this.formData}} as |form data|>
286-
<form.Field
287-
@name="enabled"
288-
@title={{i18n "discourse_ai.ai_persona.enabled"}}
289-
@onSet={{fn this.toggleEnabled data}}
290-
as |field|
291-
>
292-
<field.Toggle />
293-
</form.Field>
294-
295-
<form.Field
296-
@name="priority"
297-
@title={{i18n "discourse_ai.ai_persona.priority"}}
298-
@onSet={{fn this.togglePriority data}}
299-
@tooltip={{i18n "discourse_ai.ai_persona.priority_help"}}
300-
as |field|
301-
>
302-
<field.Toggle />
303-
</form.Field>
304-
305286
<form.Field
306287
@name="name"
307288
@title={{i18n "discourse_ai.ai_persona.name"}}
@@ -562,6 +543,25 @@ export default class PersonaEditor extends Component {
562543
{{/if}}
563544

564545
<form.Section @title={{i18n "discourse_ai.ai_persona.ai_bot.title"}}>
546+
<form.Field
547+
@name="enabled"
548+
@title={{i18n "discourse_ai.ai_persona.enabled"}}
549+
@onSet={{fn this.toggleEnabled data}}
550+
as |field|
551+
>
552+
<field.Toggle />
553+
</form.Field>
554+
555+
<form.Field
556+
@name="priority"
557+
@title={{i18n "discourse_ai.ai_persona.priority"}}
558+
@onSet={{fn this.togglePriority data}}
559+
@tooltip={{i18n "discourse_ai.ai_persona.priority_help"}}
560+
as |field|
561+
>
562+
<field.Toggle />
563+
</form.Field>
564+
565565
{{#if @model.isNew}}
566566
<div>{{i18n "discourse_ai.ai_persona.ai_bot.save_first"}}</div>
567567
{{else}}

assets/javascripts/discourse/components/ai-persona-list-editor.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class AiPersonaListEditor extends Component {
6161
<thead>
6262
<tr>
6363
<th>{{i18n "discourse_ai.ai_persona.name"}}</th>
64-
<th>{{i18n "discourse_ai.ai_persona.enabled"}}</th>
64+
<th>{{i18n "discourse_ai.ai_persona.list.enabled"}}</th>
6565
<th></th>
6666
</tr>
6767
</thead>

config/locales/client.en.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,12 @@ en:
307307
rag_conversation_chunks_help: "The number of chunks to use for the RAG model searches. Increase to increase the amount of context the AI can use."
308308
persona_description: "Personas are a powerful feature that allows you to customize the behavior of the AI engine in your Discourse forum. They act as a 'system message' that guides the AI's responses and interactions, helping to create a more personalized and engaging user experience."
309309

310+
list:
311+
enabled: "AI Bot?"
312+
310313
ai_bot:
311314
title: "AI bot options"
312-
save_first: "AI bot options will become available once you save the persona."
315+
save_first: "More AI bot options will become available once you save the persona."
313316

314317
rag:
315318
title: "RAG"

0 commit comments

Comments
 (0)