Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions assets/javascripts/discourse/components/ai-llms-list-editor.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,17 @@ export default class AiLlmsListEditor extends Component {
@llmTemplate={{@llmTemplate}}
/>
{{else}}
<DPageSubheader
@titleLabel={{i18n "discourse_ai.llms.short_title"}}
@descriptionLabel={{i18n
"discourse_ai.llms.preconfigured.description"
}}
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
/>
{{#if this.hasLlmElements}}
<section class="ai-llms-list-editor__configured">
<DPageSubheader
@titleLabel={{i18n "discourse_ai.llms.configured.title"}}
@descriptionLabel={{i18n
"discourse_ai.llms.preconfigured.description"
}}
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
/>
<table class="d-admin-table">
<thead>
Expand Down Expand Up @@ -185,18 +188,7 @@ export default class AiLlmsListEditor extends Component {
</section>
{{/if}}
<section class="ai-llms-list-editor__templates">
<DPageSubheader
@titleLabel={{i18n this.preconfiguredTitle}}
@descriptionLabel={{unless
this.hasLlmElements
(i18n "discourse_ai.llms.preconfigured.description")
}}
@learnMoreUrl={{unless
this.hasLlmElements
"https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
}}
/>

<DPageSubheader @titleLabel={{i18n this.preconfiguredTitle}} />
<AdminSectionLandingWrapper
class="ai-llms-list-editor__templates-list"
>
Expand Down
34 changes: 32 additions & 2 deletions assets/stylesheets/modules/llms/common/ai-llms-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
margin: 0 0 1em 0;
}

&__configured + &__templates {
margin-top: 3em;
&__configured,
&__templates {
margin-top: 2em;
}
}

Expand Down Expand Up @@ -66,12 +67,41 @@
}
}

.ai-llms-list-editor__configured,
.ai-llms-list-editor__templates {
h2 {
font-size: var(--font-up-1);
}
}

.ai-llms-list-editor__configured {
.d-toggle-switch {
justify-content: center;
}
}

.ai-tool-list-editor__current,
.ai-persona-list-editor__current,
.ai-llms-list-editor__configured {
.d-admin-table {
tr:hover {
background: inherit;
}
th,
td {
&:first-child {
padding-left: 0;
}
}
th,
td {
&:last-child {
padding-right: 0;
}
}
}
}

.ai-llms-list-editor__templates {
&-list {
display: grid;
Expand Down
Loading