|
| 1 | +/* |
| 2 | + * GNU AGPL-3.0 License |
| 3 | + * |
| 4 | + * Copyright (c) 2021 - present core.ai . All rights reserved. |
| 5 | + * |
| 6 | + * This program is free software: you can redistribute it and/or modify it |
| 7 | + * under the terms of the GNU Affero General Public License as published by |
| 8 | + * the Free Software Foundation, either version 3 of the License, or |
| 9 | + * (at your option) any later version. |
| 10 | + * |
| 11 | + * This program is distributed in the hope that it will be useful, but WITHOUT |
| 12 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License |
| 14 | + * for more details. |
| 15 | + * |
| 16 | + * You should have received a copy of the GNU Affero General Public License |
| 17 | + * along with this program. If not, see https://opensource.org/licenses/AGPL-3.0. |
| 18 | + * |
| 19 | + */ |
| 20 | + |
| 21 | +/** |
| 22 | + * Registers a placeholder AI sidebar tab. This serves as a starting point for |
| 23 | + * AI assistant integration. The tab displays a placeholder message until an AI |
| 24 | + * provider extension is installed. |
| 25 | + */ |
| 26 | +define(function (require, exports, module) { |
| 27 | + |
| 28 | + var AppInit = require("utils/AppInit"), |
| 29 | + SidebarTabs = require("view/SidebarTabs"); |
| 30 | + |
| 31 | + AppInit.appReady(function () { |
| 32 | + SidebarTabs.addTab("ai", "AI", "fa-solid fa-wand-magic-sparkles", { priority: 200 }); |
| 33 | + |
| 34 | + var $content = $( |
| 35 | + '<div class="ai-tab-placeholder">' + |
| 36 | + '<div class="ai-tab-icon"><i class="fa-solid fa-wand-magic-sparkles"></i></div>' + |
| 37 | + '<div class="ai-tab-title">AI Assistant</div>' + |
| 38 | + '<div class="ai-tab-message">Please add an AI provider to start using AI</div>' + |
| 39 | + '</div>' |
| 40 | + ); |
| 41 | + |
| 42 | + SidebarTabs.addToTab("ai", $content); |
| 43 | + }); |
| 44 | +}); |
0 commit comments