@@ -44,6 +44,7 @@ export default class PersonaEditor extends Component {
4444 @tracked selectedTools = [];
4545 @tracked selectedToolNames = [];
4646 @tracked forcedToolNames = [];
47+ @tracked hasDefaultLlm = false ;
4748
4849 get chatPluginEnabled () {
4950 return this .siteSettings .chat_enabled ;
@@ -81,6 +82,7 @@ export default class PersonaEditor extends Component {
8182 @action
8283 updateModel () {
8384 this .editingModel = this .args .model .workingCopy ();
85+ this .hasDefaultLlm = !! this .editingModel .default_llm ;
8486 this .showDelete = ! this .args .model .isNew && ! this .args .model .system ;
8587 this .maxPixelsValue = this .findClosestPixelValue (
8688 this .editingModel .vision_max_pixels
@@ -183,8 +185,10 @@ export default class PersonaEditor extends Component {
183185 set mappedDefaultLlm (value ) {
184186 if (value === " blank" ) {
185187 this .editingModel .default_llm = null ;
188+ this .hasDefaultLlm = false ;
186189 } else {
187190 this .editingModel .default_llm = value;
191+ this .hasDefaultLlm = true ;
188192 }
189193 }
190194
@@ -344,6 +348,16 @@ export default class PersonaEditor extends Component {
344348 @ content ={{I18n.t " discourse_ai.ai_persona.default_llm_help" }}
345349 />
346350 </div >
351+ {{#if this . hasDefaultLlm }}
352+ <div class =" control-group" >
353+ <label >
354+ <Input
355+ @ type =" checkbox"
356+ @ checked ={{this .editingModel.force_default_llm }}
357+ />
358+ {{I18n.t " discourse_ai.ai_persona.force_default_llm" }} </label >
359+ </div >
360+ {{/if }}
347361 {{#unless @ model.isNew }}
348362 <div class =" control-group" >
349363 <label >{{I18n.t " discourse_ai.ai_persona.user" }} </label >
@@ -429,33 +443,73 @@ export default class PersonaEditor extends Component {
429443 disabled ={{this .editingModel.system }}
430444 />
431445 </div >
446+ <div class =" control-group ai-persona-editor__allow_personal_messages" >
447+ <label >
448+ <Input
449+ @ type =" checkbox"
450+ @ checked ={{this .editingModel.allow_personal_messages }}
451+ />
452+ {{I18n.t " discourse_ai.ai_persona.allow_personal_messages" }} </label >
453+ <DTooltip
454+ @ icon =" question-circle"
455+ @ content ={{I18n.t
456+ " discourse_ai.ai_persona.allow_personal_messages_help"
457+ }}
458+ />
459+ </div >
432460 {{#if this . editingModel.user }}
461+ <div class =" control-group ai-persona-editor__allow_topic_mentions" >
462+ <label >
463+ <Input
464+ @ type =" checkbox"
465+ @ checked ={{this .editingModel.allow_topic_mentions }}
466+ />
467+ {{I18n.t " discourse_ai.ai_persona.allow_topic_mentions" }} </label >
468+ <DTooltip
469+ @ icon =" question-circle"
470+ @ content ={{I18n.t
471+ " discourse_ai.ai_persona.allow_topic_mentions_help"
472+ }}
473+ />
474+ </div >
433475 {{#if this . chatPluginEnabled }}
434- <div class =" control-group ai-persona-editor__allow_chat" >
476+ <div
477+ class =" control-group ai-persona-editor__allow_chat_direct_messages"
478+ >
435479 <label >
436480 <Input
437481 @ type =" checkbox"
438- @ checked ={{this .editingModel.allow_chat }}
482+ @ checked ={{this .editingModel.allow_chat_direct_messages }}
439483 />
440- {{I18n.t " discourse_ai.ai_persona.allow_chat" }} </label >
484+ {{I18n.t
485+ " discourse_ai.ai_persona.allow_chat_direct_messages"
486+ }} </label >
441487 <DTooltip
442488 @ icon =" question-circle"
443- @ content ={{I18n.t " discourse_ai.ai_persona.allow_chat_help" }}
489+ @ content ={{I18n.t
490+ " discourse_ai.ai_persona.allow_chat_direct_messages_help"
491+ }}
444492 />
445493 </div >
446- {{/if }}
447- <div class =" control-group ai-persona-editor__mentionable" >
448- <label >
449- <Input
450- @ type =" checkbox"
451- @ checked ={{this .editingModel.mentionable }}
494+ <div
495+ class =" control-group ai-persona-editor__allow_chat_channel_mentions"
496+ >
497+ <label >
498+ <Input
499+ @ type =" checkbox"
500+ @ checked ={{this .editingModel.allow_chat_channel_mentions }}
501+ />
502+ {{I18n.t
503+ " discourse_ai.ai_persona.allow_chat_channel_mentions"
504+ }} </label >
505+ <DTooltip
506+ @ icon =" question-circle"
507+ @ content ={{I18n.t
508+ " discourse_ai.ai_persona.allow_chat_channel_mentions_help"
509+ }}
452510 />
453- {{I18n.t " discourse_ai.ai_persona.mentionable" }} </label >
454- <DTooltip
455- @ icon =" question-circle"
456- @ content ={{I18n.t " discourse_ai.ai_persona.mentionable_help" }}
457- />
458- </div >
511+ </div >
512+ {{/if }}
459513 {{/if }}
460514 <div class =" control-group ai-persona-editor__tool-details" >
461515 <label >
0 commit comments