2024-03-21 00:29:56 -04:00
|
|
|
import { PLUGIN_NAV_MODE_TOP } from "discourse/lib/admin-plugin-config-nav";
|
|
|
|
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) => {
|
|
|
|
api.addAdminPluginConfigurationNav("discourse-ai", PLUGIN_NAV_MODE_TOP, [
|
2024-06-27 03:27:40 -04:00
|
|
|
{
|
|
|
|
label: "discourse_ai.llms.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-llms",
|
|
|
|
},
|
2024-03-21 00:29:56 -04:00
|
|
|
{
|
|
|
|
label: "discourse_ai.ai_persona.short_title",
|
2024-05-01 22:42:30 -04:00
|
|
|
route: "adminPlugins.show.discourse-ai-personas",
|
2024-03-21 00:29:56 -04:00
|
|
|
},
|
2024-05-13 11:46:42 -04:00
|
|
|
{
|
2024-06-27 03:27:40 -04:00
|
|
|
label: "discourse_ai.tools.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-tools",
|
2024-05-13 11:46:42 -04:00
|
|
|
},
|
2024-11-28 14:26:48 -05:00
|
|
|
{
|
|
|
|
label: "discourse_ai.usage.short_title",
|
|
|
|
route: "adminPlugins.show.discourse-ai-usage",
|
|
|
|
},
|
2024-03-21 00:29:56 -04:00
|
|
|
]);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|