UNPKG

json-object-editor

Version:

JOE the Json Object Editor | Platform Edition

99 lines (87 loc) 3.87 kB
var App = function () { this.title = 'AIHub'; this.description = 'Central hub for managing AI assistants, prompts, tools, conversations, and widget chats in JOE.'; // Core AI-related schemas in JOE this.collections = [ 'thought', 'ai_assistant', 'ai_prompt', 'ai_tool', 'ai_response', 'ai_conversation', 'ai_widget_conversation' ].concat(JOE.webconfig.default_schemas); this.dashboard = [ // Standard app home: shows AIHub schemas plus default schemas JOE.Apps.Cards.appHome({ cssclass: 'w2 h3' }), // Small MCP test portal card { type: 'Card', config: { title: 'MCP Test Portal', left: 0, top: 3, cssclass: 'w2 h1', content: function () { return '' + '<div class="spaced">' + '<div><b>MCP Tools & Tests</b></div>' + '<ul style="margin:6px 0 0 16px; padding:0; list-style:disc;">' + '<li><a href="/mcp-test.html" target="mcp_test_win" rel="noopener">MCP Test</a></li>' + '<li><a href="/mcp-export.html" target="mcp_export_win" rel="noopener">MCP Export</a></li>' + '<li><a href="/mcp-schemas.html" target="mcp_schemas_win" rel="noopener">Schemas</a></li>' + '<li><a href="/mcp-prompt.html" target="mcp_prompt_win" rel="noopener">MCP Prompt</a></li>' + '<li><a href="/ai-widget-test.html" target="ai_widget_test_win">AI Widget</a></li>'+ '</ul>' + '</div>'; } } }, // Cap card with an embedded joe-ai-widget that fills the panel { type: 'Card', config: { title: 'AIHub Chat', left: 2, top: 0, cssclass: 'w4 h4', content: function () { return '' + '<div style="width:100%;height:100%;display:flex;flex-direction:column;">' + '<joe-ai-assistant-picker for_widget="aihub_widget"></joe-ai-assistant-picker>' + '<joe-ai-widget ' + 'id="aihub_widget" ' + 'title="AIHub Assistant" ' + 'source="aihub_card" ' + 'user_id="' + ((_joe && _joe.User && _joe.User._id) || '') + '" ' + 'style="flex:1 1 auto;width:100%;height:100%;">' + '</joe-ai-widget>' + '</div>'; } } }, // Widget conversations list (replaces Recently Updated AI Items card for now) { type: 'Card', config: { title: 'Widget Conversations', left: 6, top: 1, cssclass: 'w2 h3', content: function () { return '' + '<div style="width:100%;height:100%;display:flex;flex-direction:column;">' + '<joe-ai-conversation-list ' + 'for_widget="aihub_widget" ' + 'source="aihub_card">' + '</joe-ai-conversation-list>' + '</div>'; } } }, // Platform/system stats in the context of AIHub JOE.Apps.Cards.systemStats({ top: 0, left: 6 }) ]; return this; }; module.exports = new App();