From b23a3a86a6e00d77bfb6727a9720cb3400bf745f Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Thu, 20 Jun 2024 15:37:14 -0300 Subject: [PATCH] FIX: SRV warning should not trigger on brand new LLM (#679) --- assets/javascripts/discourse/components/ai-llm-editor.gjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/ai-llm-editor.gjs b/assets/javascripts/discourse/components/ai-llm-editor.gjs index ea89fc2b..cfc5a4a3 100644 --- a/assets/javascripts/discourse/components/ai-llm-editor.gjs +++ b/assets/javascripts/discourse/components/ai-llm-editor.gjs @@ -6,6 +6,7 @@ import { action } from "@ember/object"; import { LinkTo } from "@ember/routing"; import { later } from "@ember/runloop"; import { inject as service } from "@ember/service"; +import { or } from "truth-helpers"; import BackButton from "discourse/components/back-button"; import DButton from "discourse/components/d-button"; import DToggleSwitch from "discourse/components/d-toggle-switch"; @@ -149,7 +150,7 @@ export default class AiLlmEditor extends Component { @route="adminPlugins.show.discourse-ai-llms" @label="discourse_ai.llms.back" /> - {{#unless @model.url_editable}} + {{#unless (or @model.url_editable @model.isNew)}}
{{icon "exclamation-circle"}} {{I18n.t "discourse_ai.llms.srv_warning"}} @@ -183,7 +184,7 @@ export default class AiLlmEditor extends Component { @content={{this.selectedProviders}} />
- {{#if @model.url_editable}} + {{#if (or @model.url_editable @model.isNew)}}