2024-03-21 14:29:56 +10:00
|
|
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "discourse-ai-admin-plugin-configuration-nav",
|
|
|
|
|
|
|
|
initialize(container) {
|
|
|
|
const currentUser = container.lookup("service:current-user");
|
|
|
|
if (!currentUser || !currentUser.admin) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
withPluginApi("1.1.0", (api) => {
|
2025-01-28 12:04:32 +08:00
|
|
|
api.addAdminPluginConfigurationNav("discourse-ai", [
|
2025-01-21 12:23:19 -03:00
|
|
|
{
|
2025-01-23 18:14:52 -05:00
|
|
|
label: "discourse_ai.usage.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-usage",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.usage.subheader_description",
|
2025-01-21 12:23:19 -03:00
|
|
|
},
|
2024-06-27 17:27:40 +10:00
|
|
|
{
|
|
|
|
label: "discourse_ai.llms.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-llms",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.llms.preconfigured.description",
|
2024-06-27 17:27:40 +10:00
|
|
|
},
|
2024-03-21 14:29:56 +10:00
|
|
|
{
|
|
|
|
label: "discourse_ai.ai_persona.short_title",
|
2024-05-02 12:42:30 +10:00
|
|
|
route: "adminPlugins.show.discourse-ai-personas",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.ai_persona.persona_description",
|
2024-03-21 14:29:56 +10:00
|
|
|
},
|
2025-01-23 18:14:52 -05:00
|
|
|
{
|
|
|
|
label: "discourse_ai.embeddings.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-embeddings",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.embeddings.description",
|
2025-01-23 18:14:52 -05:00
|
|
|
},
|
2024-05-13 12:46:42 -03:00
|
|
|
{
|
2024-06-27 17:27:40 +10:00
|
|
|
label: "discourse_ai.tools.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-tools",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.tools.subheader_description",
|
2024-05-13 12:46:42 -03:00
|
|
|
},
|
2024-12-12 09:17:25 +11:00
|
|
|
{
|
|
|
|
label: "discourse_ai.spam.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-spam",
|
2025-02-26 10:54:45 +10:00
|
|
|
description: "discourse_ai.spam.spam_description",
|
2024-12-12 09:17:25 +11:00
|
|
|
},
|
2024-03-21 14:29:56 +10:00
|
|
|
]);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|