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

Commit 54e5c57

Browse files
committed
Merge branch 'main' into feat-tool-name-validation
2 parents 439bf5b + cf86d27 commit 54e5c57

File tree

587 files changed

+870345
-9183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+870345
-9183
lines changed

.discourse-compatibility

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
< 3.4.0.beta4-dev: a53719ab8eb071459f215227421b3ea4987e5f87
2+
< 3.4.0.beta4-dev: 20612fde52d3f740cad64823ef8aadb0748b567f
13
< 3.4.0.beta3-dev: decf1bb49d737ea15308400f22f89d1d1e71d13d
24
< 3.4.0.beta1-dev: 9d887ad4ace8e33c3fe7dbb39237e882c08b4f0b
35
< 3.3.0.beta5-dev: 4d8090002f6dcd8e34d41033606bf131fa221475

.eslintrc.cjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ inherit_gem:
22
rubocop-discourse: stree-compat.yml
33
RSpec/NamedSubject:
44
Enabled: false
5+
6+
Style/GlobalVars:
7+
AllowedVariables: [$prometheus_client]

Gemfile.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ GEM
3232
rack (3.1.6)
3333
rainbow (3.1.1)
3434
regexp_parser (2.9.2)
35-
rexml (3.3.6)
36-
strscan
35+
rexml (3.3.9)
3736
rubocop (1.64.1)
3837
json (~> 2.3)
3938
language_server-protocol (>= 3.17.0)
@@ -70,7 +69,6 @@ GEM
7069
rubocop (~> 1.61)
7170
rubocop-rspec (~> 3, >= 3.0.1)
7271
ruby-progressbar (1.13.0)
73-
strscan (3.1.0)
7472
syntax_tree (6.2.0)
7573
prettier_print (>= 1.2.0)
7674
tzinfo (2.0.6)

about.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"tests": {
3+
"requiredPlugins": [
4+
"https://github.com/discourse/discourse-prometheus"
5+
]
6+
}
7+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import DiscourseRoute from "discourse/routes/discourse";
2+
3+
export default class AdminPluginsShowDiscourseAiEmbeddingsEdit extends DiscourseRoute {
4+
async model(params) {
5+
const allEmbeddings = this.modelFor(
6+
"adminPlugins.show.discourse-ai-embeddings"
7+
);
8+
const id = parseInt(params.id, 10);
9+
const record = allEmbeddings.findBy("id", id);
10+
record.provider_params = record.provider_params || {};
11+
return record;
12+
}
13+
14+
setupController(controller, model) {
15+
super.setupController(controller, model);
16+
controller.set(
17+
"allEmbeddings",
18+
this.modelFor("adminPlugins.show.discourse-ai-embeddings")
19+
);
20+
}
21+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import DiscourseRoute from "discourse/routes/discourse";
2+
3+
export default class AdminPluginsShowDiscourseAiEmbeddingsNew extends DiscourseRoute {
4+
async model() {
5+
const record = this.store.createRecord("ai-embedding");
6+
record.provider_params = {};
7+
return record;
8+
}
9+
10+
setupController(controller, model) {
11+
super.setupController(controller, model);
12+
controller.set(
13+
"allEmbeddings",
14+
this.modelFor("adminPlugins.show.discourse-ai-embeddings")
15+
);
16+
}
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import DiscourseRoute from "discourse/routes/discourse";
2+
3+
export default class DiscourseAiAiEmbeddingsRoute extends DiscourseRoute {
4+
model() {
5+
return this.store.findAll("ai-embedding");
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import DiscourseRoute from "discourse/routes/discourse";
22

3-
export default DiscourseRoute.extend({
3+
export default class AdminPluginsShowDiscourseAiLlmsEdit extends DiscourseRoute {
44
async model(params) {
55
const allLlms = this.modelFor("adminPlugins.show.discourse-ai-llms");
66
const id = parseInt(params.id, 10);
77
const record = allLlms.findBy("id", id);
88
record.provider_params = record.provider_params || {};
99
return record;
10-
},
10+
}
1111

1212
setupController(controller, model) {
13-
this._super(controller, model);
13+
super.setupController(controller, model);
1414
controller.set(
1515
"allLlms",
1616
this.modelFor("adminPlugins.show.discourse-ai-llms")
1717
);
18-
},
19-
});
18+
}
19+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import DiscourseRoute from "discourse/routes/discourse";
22

3-
export default DiscourseRoute.extend({
4-
queryParams: {
3+
export default class AdminPluginsShowDiscourseAiLlmsNew extends DiscourseRoute {
4+
queryParams = {
55
llmTemplate: { refreshModel: true },
6-
},
6+
};
77

88
async model() {
99
const record = this.store.createRecord("ai-llm");
1010
record.provider_params = {};
1111
return record;
12-
},
12+
}
1313

1414
setupController(controller, model) {
15-
this._super(controller, model);
15+
super.setupController(controller, model);
1616
controller.set(
1717
"allLlms",
1818
this.modelFor("adminPlugins.show.discourse-ai-llms")
@@ -21,5 +21,5 @@ export default DiscourseRoute.extend({
2121
"llmTemplate",
2222
this.paramsFor(this.routeName).llmTemplate || null
2323
);
24-
},
25-
});
24+
}
25+
}

0 commit comments

Comments
 (0)