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

Commit 0ae4b98

Browse files
committed
DEV: Fix, lint, and make persona a link
1 parent 117918a commit 0ae4b98

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

admin/assets/javascripts/discourse/templates/admin-plugins/show/discourse-ai-features/edit.gjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import RouteTemplate from "ember-route-template";
22
import AiFeatureEditor from "discourse/plugins/discourse-ai/discourse/components/ai-feature-editor";
33

44
export default RouteTemplate(
5-
<template>
6-
<AiFeatureEditor @model={{@model}} />
7-
</template>
5+
<template>
6+
<AiFeatureEditor @model={{@model}} />
7+
</template>
88
);

admin/assets/javascripts/discourse/templates/admin-plugins/show/discourse-ai-features/index.gjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ export default RouteTemplate(
7373
</span>
7474
</td>
7575
<td class="d-admin-row__detail ai-feature-list__row-item">
76-
{{feature.persona.name}}
76+
<DButton
77+
class="btn-flat btn-small ai-feature-list__row-item-persona"
78+
@translatedLabel={{feature.persona.name}}
79+
@route="adminPlugins.show.discourse-ai-personas.edit"
80+
@routeModels={{feature.persona.id}}
81+
/>
7782
</td>
7883
<td class="d-admin-row__detail ai-feature-list__row-item">
7984
{{#if (gt feature.persona.allowed_groups.length 0)}}

assets/stylesheets/common/ai-features.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@
88
display: block;
99
}
1010

11+
&__row-item-persona {
12+
padding: 0;
13+
}
14+
1115
&__row-item-groups {
1216
list-style: none;
1317
margin: 0.5em 0 0 0;
1418
display: flex;
1519

1620
li {
1721
font-size: var(--font-down-2);
18-
border-radius: 0.25em;
22+
border-radius: var(--d-border-radius);
1923
background: var(--primary-very-low);
2024
border: 1px solid var(--primary-low);
2125
padding: 1px 3px;

spec/jobs/regular/stream_discord_reply_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
fab!(:persona) { Fabricate(:ai_persona, default_llm_id: llm_model.id) }
1818

1919
before do
20+
SiteSetting.ai_discord_search_enabled = true
2021
SiteSetting.ai_discord_search_mode = "persona"
2122
SiteSetting.ai_discord_search_persona = persona.id
2223
end

0 commit comments

Comments
 (0)