@solidxai/core-ui 0.1.19 → 0.1.20-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/Link.d.ts.map +1 -1
- package/dist/components/common/Link.js +2 -1
- package/dist/components/common/Link.js.map +1 -1
- package/dist/components/common/Link.tsx +2 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts +1 -0
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js +109 -23
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +155 -34
- package/dist/components/core/chatter/SolidChatter.js +2 -2
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.tsx +2 -2
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js +20 -19
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +16 -16
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget.js +3 -10
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget.tsx +3 -8
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ExportModulePackageRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ExportModulePackageRowAction.js +36 -9
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ExportModulePackageRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ExportModulePackageRowAction.tsx +78 -7
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ModuleImportListHeaderAction.d.ts +1 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ModuleImportListHeaderAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ModuleImportListHeaderAction.js +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ModuleImportListHeaderAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/ModuleImportListHeaderAction.tsx +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/RestoreModulePackageRowAction.d.ts +4 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/RestoreModulePackageRowAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/RestoreModulePackageRowAction.js +131 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/RestoreModulePackageRowAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/RestoreModulePackageRowAction.tsx +151 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/UpdateModulePackageRowAction.d.ts +4 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/UpdateModulePackageRowAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/UpdateModulePackageRowAction.js +13 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/UpdateModulePackageRowAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/moduleMetadata/list/UpdateModulePackageRowAction.tsx +20 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +4 -0
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +4 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +50 -15
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +22 -3
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +16 -3
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +16 -2
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +4 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +4 -1
- package/dist/components/core/module/ModulePackageDialog.css +102 -0
- package/dist/components/core/module/ModulePackageDialog.d.ts +2 -1
- package/dist/components/core/module/ModulePackageDialog.d.ts.map +1 -1
- package/dist/components/core/module/ModulePackageDialog.js +216 -68
- package/dist/components/core/module/ModulePackageDialog.js.map +1 -1
- package/dist/components/core/module/ModulePackageDialog.tsx +356 -76
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +9 -3
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +9 -4
- package/dist/components/core/solid-agent/SolidAgentMarkdown.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentMarkdown.js +25 -6
- package/dist/components/core/solid-agent/SolidAgentMarkdown.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentMarkdown.tsx +15 -1
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts +5 -0
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +77 -20
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +29 -1
- package/dist/components/core/solid-agent/client/agentSocket.d.ts +5 -1
- package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.js +27 -4
- package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.ts +14 -3
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +2 -2
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +5 -5
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts +2 -0
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +2 -2
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +4 -4
- package/dist/components/core/solid-agent/thread/AgentThread.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/AgentThread.js +61 -26
- package/dist/components/core/solid-agent/thread/AgentThread.js.map +1 -1
- package/dist/components/core/solid-agent/thread/AgentThread.tsx +74 -40
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts +2 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js +2 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.tsx +3 -1
- package/dist/components/core/solid-agent/types.d.ts +3 -0
- package/dist/components/core/solid-agent/types.d.ts.map +1 -1
- package/dist/components/core/solid-agent/types.js +0 -9
- package/dist/components/core/solid-agent/types.js.map +1 -1
- package/dist/components/core/solid-agent/types.ts +4 -2
- package/dist/components/core/solid-agent/widgets/DefaultAssistantMessageChatWidget.d.ts +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultAssistantMessageChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultAssistantMessageChatWidget.js +5 -2
- package/dist/components/core/solid-agent/widgets/DefaultAssistantMessageChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultAssistantMessageChatWidget.tsx +11 -5
- package/dist/components/core/solid-agent/widgets/DefaultErrorChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultErrorChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultErrorChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/DefaultNoticeChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultNoticeChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultNoticeChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/DefaultUnknownChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultUnknownChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUnknownChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidChecklistChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidChecklistChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidChecklistChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidCodeChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidCodeChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidCodeChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidDiffListChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidGalleryChatWidget.js +19 -0
- package/dist/components/core/solid-agent/widgets/SolidGalleryChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidGalleryChatWidget.tsx +20 -0
- package/dist/components/core/solid-agent/widgets/SolidJsonChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidJsonChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidJsonChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidLinkCardChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidLinkCardChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidLinkCardChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidMarkdownChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidMarkdownChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidMarkdownChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js +3 -0
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.tsx +4 -0
- package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +9 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +23 -8
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +10 -6
- package/dist/components/layout/AdminHeaderActions.d.ts.map +1 -1
- package/dist/components/layout/AdminHeaderActions.js +1 -29
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +0 -42
- package/dist/components/layout/AdminTopHeader.js +2 -2
- package/dist/components/layout/AdminTopHeader.js.map +1 -1
- package/dist/components/layout/AdminTopHeader.tsx +2 -2
- package/dist/components/layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.js +21 -5
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/AppSidebar.tsx +24 -6
- package/dist/components/layout/SolidAiStudioLayout.d.ts +0 -1
- package/dist/components/layout/SolidAiStudioLayout.d.ts.map +1 -1
- package/dist/components/layout/SolidAiStudioLayout.js +8 -161
- package/dist/components/layout/SolidAiStudioLayout.js.map +1 -1
- package/dist/components/layout/SolidAiStudioLayout.tsx +6 -136
- package/dist/components/layout/user-profile-menu.js +10 -10
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.tsx +3 -3
- package/dist/components/shad-cn-ui/SolidLightbox.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidLightbox.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidLightbox.js +11 -4
- package/dist/components/shad-cn-ui/SolidLightbox.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidLightbox.tsx +14 -1
- package/dist/helpers/modelViewPersistence.d.ts +2 -0
- package/dist/helpers/modelViewPersistence.d.ts.map +1 -1
- package/dist/helpers/modelViewPersistence.js +72 -0
- package/dist/helpers/modelViewPersistence.js.map +1 -1
- package/dist/helpers/modelViewPersistence.ts +79 -0
- package/dist/helpers/registry.d.ts +6 -2
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +68 -3
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +62 -4
- package/dist/hooks/useModelsDevModels.d.ts +43 -0
- package/dist/hooks/useModelsDevModels.d.ts.map +1 -0
- package/dist/hooks/useModelsDevModels.js +81 -0
- package/dist/hooks/useModelsDevModels.js.map +1 -0
- package/dist/hooks/useModelsDevModels.ts +106 -0
- package/dist/hooks/useRouter.d.ts.map +1 -1
- package/dist/hooks/useRouter.js +3 -2
- package/dist/hooks/useRouter.js.map +1 -1
- package/dist/hooks/useRouter.ts +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.ts +4 -1
- package/dist/modules/solidUiModule.d.ts +3 -2
- package/dist/modules/solidUiModule.d.ts.map +1 -1
- package/dist/modules/solidUiModule.js +1 -1
- package/dist/modules/solidUiModule.js.map +1 -1
- package/dist/modules/solidUiModule.ts +5 -1
- package/dist/redux/api/moduleApi.d.ts +12 -2
- package/dist/redux/api/moduleApi.d.ts.map +1 -1
- package/dist/redux/api/moduleApi.js +33 -3
- package/dist/redux/api/moduleApi.js.map +1 -1
- package/dist/redux/api/moduleApi.ts +17 -2
- package/dist/redux/api/solidChatterMessageApi.d.ts +3 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.js +9 -1
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.ts +9 -1
- package/dist/redux/store/defaultStoreConfig.d.ts +9 -1
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/resources/globals.css +30 -0
- package/dist/resources/solid-custom.css +10 -6
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/routes/AppEventListener.d.ts.map +1 -1
- package/dist/routes/AppEventListener.js +3 -3
- package/dist/routes/AppEventListener.js.map +1 -1
- package/dist/routes/AppEventListener.tsx +2 -3
- package/dist/routes/pages/admin/core/AgentHubTagsField.css +21 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts +17 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.js +171 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.tsx +125 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.css +130 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.d.ts +7 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.js +228 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentPersonaHistory.tsx +234 -0
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +13 -14
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +218 -165
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +221 -127
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js +14 -69
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx +15 -83
- package/dist/routes/pages/admin/core/AgentToolActivationDialog.d.ts +11 -0
- package/dist/routes/pages/admin/core/AgentToolActivationDialog.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentToolActivationDialog.js +166 -0
- package/dist/routes/pages/admin/core/AgentToolActivationDialog.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentToolActivationDialog.tsx +140 -0
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.css +26 -0
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js +94 -71
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx +60 -52
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.d.ts +2 -0
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js +108 -0
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js.map +1 -0
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx +96 -0
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +2 -0
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +2 -0
- package/dist/types/extension-registry.d.ts +12 -0
- package/dist/types/extension-registry.d.ts.map +1 -1
- package/dist/types/extension-registry.js.map +1 -1
- package/dist/types/extension-registry.ts +15 -0
- package/dist/types/solid-core.d.ts +2 -0
- package/package.json +2 -1
|
@@ -56,8 +56,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
58
58
|
import React from "react";
|
|
59
|
-
import {
|
|
60
|
-
import { ArrowLeft, ChevronDown, ExternalLink, FlaskConical, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
|
|
59
|
+
import { ArrowLeft, Ellipsis, ExternalLink, Eye, FlaskConical, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
|
|
61
60
|
import { useDispatch } from "react-redux";
|
|
62
61
|
import { useNavigate, useParams } from "react-router-dom";
|
|
63
62
|
import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
|
|
@@ -65,13 +64,16 @@ import { useGetSolidSettingsQuery } from "../../../../redux/api/solidSettingsApi
|
|
|
65
64
|
import { getSettingsMap } from "../../../../helpers/settingsPayload";
|
|
66
65
|
import { showToast } from "../../../../redux/features/toastSlice";
|
|
67
66
|
import { AgentRegistryAuditPanel } from "./AgentRegistryAuditPanel";
|
|
67
|
+
import { AgentPersonaHistory } from "./AgentPersonaHistory";
|
|
68
|
+
import { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload } from "./AgentHubTagsField";
|
|
68
69
|
import { AgentResourceCardWidget } from "../../../../components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget";
|
|
69
70
|
import { AgentSessionsPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel";
|
|
70
71
|
import { AgentProcessesPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentProcessesPanel";
|
|
71
72
|
import { SolidWorkflowStatusPill } from "../../../../components/core/form/SolidDraftPublishWorkflow";
|
|
72
|
-
import {
|
|
73
|
-
import { SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidIconPicker, SolidInput, SolidTabGroup } from "../../../../components/shad-cn-ui";
|
|
73
|
+
import { getModelsDevModels, useModelsDevCatalog } from "../../../../hooks/useModelsDevModels";
|
|
74
|
+
import { SolidAutocomplete, SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidDropdownMenu, SolidDropdownMenuContent, SolidDropdownMenuItem, SolidDropdownMenuTrigger, SolidIconPicker, SolidInput, SolidTabGroup } from "../../../../components/shad-cn-ui";
|
|
74
75
|
import { SolidAgentEmbedded } from "../../../../components/core/solid-agent/SolidAgentEmbedded";
|
|
76
|
+
import { SolidAgentMarkdown } from "../../../../components/core/solid-agent/SolidAgentMarkdown";
|
|
75
77
|
import { AgentEmbeddingPanel } from "../../../../components/core/solid-agent/embed/AgentEmbeddingPanel";
|
|
76
78
|
import "./AgentRegistryEditorPage.css";
|
|
77
79
|
var PROVIDER_LABELS = {
|
|
@@ -79,85 +81,76 @@ var PROVIDER_LABELS = {
|
|
|
79
81
|
openai: "OpenAI",
|
|
80
82
|
openrouter: "OpenRouter",
|
|
81
83
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return "".concat(PROVIDER_LABELS[option.provider], " ").concat(option.model).toLowerCase().includes(query.trim().toLowerCase());
|
|
84
|
+
var BUILT_IN_PROVIDER_TYPES = ["openai", "anthropic"];
|
|
85
|
+
/**
|
|
86
|
+
* Build picker options from the AI settings: every provider with an API key, its models from
|
|
87
|
+
* models.dev, plus the models chosen in settings and any already-saved values for this agent.
|
|
88
|
+
*/
|
|
89
|
+
function buildModelOptions(providers, settingsModels, catalog, savedValues) {
|
|
90
|
+
var enabled = Object.entries(providers)
|
|
91
|
+
.filter(function (_a) {
|
|
92
|
+
var entry = _a[1];
|
|
93
|
+
return typeof (entry === null || entry === void 0 ? void 0 : entry.apiKey) === "string" && entry.apiKey.trim().length > 0;
|
|
93
94
|
});
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
var options = [];
|
|
96
|
+
var seen = new Set();
|
|
97
|
+
var add = function (provider, model, note) {
|
|
98
|
+
var _a;
|
|
99
|
+
var value = "".concat(provider, ":").concat(model);
|
|
100
|
+
if (!model || seen.has(value))
|
|
99
101
|
return;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var bounds = (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
103
|
-
if (!bounds)
|
|
104
|
-
return;
|
|
105
|
-
var gap = 6;
|
|
106
|
-
var maxMenuHeight = Math.min(288, window.innerHeight - 24);
|
|
107
|
-
var spaceBelow = window.innerHeight - bounds.bottom - gap - 12;
|
|
108
|
-
var spaceAbove = bounds.top - gap - 12;
|
|
109
|
-
var openAbove = spaceBelow < Math.min(220, maxMenuHeight) && spaceAbove > spaceBelow;
|
|
110
|
-
var availableHeight = Math.max(120, Math.min(maxMenuHeight, openAbove ? spaceAbove : spaceBelow));
|
|
111
|
-
setMenuStyle(__assign({ position: "fixed", left: bounds.left, width: bounds.width, maxHeight: availableHeight }, (openAbove
|
|
112
|
-
? { bottom: window.innerHeight - bounds.top + gap }
|
|
113
|
-
: { top: bounds.bottom + gap })));
|
|
114
|
-
};
|
|
115
|
-
positionMenu();
|
|
116
|
-
window.addEventListener("resize", positionMenu);
|
|
117
|
-
window.addEventListener("scroll", positionMenu, true);
|
|
118
|
-
var handleOutsideClick = function (event) {
|
|
119
|
-
var _a, _b;
|
|
120
|
-
var target = event.target;
|
|
121
|
-
if (!((_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.contains(target)) && !((_b = menuRef.current) === null || _b === void 0 ? void 0 : _b.contains(target)))
|
|
122
|
-
setOpen(false);
|
|
123
|
-
};
|
|
124
|
-
document.addEventListener("mousedown", handleOutsideClick);
|
|
125
|
-
return function () {
|
|
126
|
-
window.removeEventListener("resize", positionMenu);
|
|
127
|
-
window.removeEventListener("scroll", positionMenu, true);
|
|
128
|
-
document.removeEventListener("mousedown", handleOutsideClick);
|
|
129
|
-
};
|
|
130
|
-
}, [open]);
|
|
131
|
-
var choose = function (option) {
|
|
132
|
-
onChange(option.value);
|
|
133
|
-
setQuery("");
|
|
134
|
-
setOpen(false);
|
|
102
|
+
seen.add(value);
|
|
103
|
+
options.push({ provider: provider, providerLabel: (_a = PROVIDER_LABELS[provider]) !== null && _a !== void 0 ? _a : provider, model: model, value: value, note: note });
|
|
135
104
|
};
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
105
|
+
for (var _i = 0, enabled_1 = enabled; _i < enabled_1.length; _i++) {
|
|
106
|
+
var _a = enabled_1[_i], provider = _a[0], entry = _a[1];
|
|
107
|
+
for (var _b = 0, _c = Object.entries(settingsModels); _b < _c.length; _b++) {
|
|
108
|
+
var _d = _c[_b], role = _d[0], config = _d[1];
|
|
109
|
+
if ((config === null || config === void 0 ? void 0 : config.providerId) === provider && config.model)
|
|
110
|
+
add(provider, config.model, "".concat(role, " model in AI settings"));
|
|
111
|
+
}
|
|
112
|
+
for (var _e = 0, savedValues_1 = savedValues; _e < savedValues_1.length; _e++) {
|
|
113
|
+
var value = savedValues_1[_e];
|
|
114
|
+
if (value.startsWith("".concat(provider, ":")))
|
|
115
|
+
add(provider, value.slice(provider.length + 1), "currently saved");
|
|
116
|
+
}
|
|
117
|
+
var type = entry.type && BUILT_IN_PROVIDER_TYPES.includes(entry.type) ? entry.type : undefined;
|
|
118
|
+
for (var _f = 0, _g = getModelsDevModels(catalog, [provider, type]); _f < _g.length; _f++) {
|
|
119
|
+
var model = _g[_f];
|
|
120
|
+
add(provider, model.id);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return options;
|
|
124
|
+
}
|
|
125
|
+
var OTHER_MODEL = "__other_model__";
|
|
126
|
+
function SearchableSelect(_a) {
|
|
127
|
+
var _b;
|
|
128
|
+
var value = _a.value, options = _a.options, placeholder = _a.placeholder, disabled = _a.disabled, onChange = _a.onChange;
|
|
129
|
+
var _c = React.useState(""), query = _c[0], setQuery = _c[1];
|
|
130
|
+
var selectedLabel = (_b = options.find(function (option) { return option.value === value; })) === null || _b === void 0 ? void 0 : _b.label;
|
|
131
|
+
var selected = React.useMemo(function () { return selectedLabel ? { label: selectedLabel, value: value } : null; }, [selectedLabel, value]);
|
|
132
|
+
var suggestions = options.filter(function (option) {
|
|
133
|
+
return "".concat(option.label, " ").concat(option.value).toLowerCase().includes(query.trim().toLowerCase());
|
|
134
|
+
});
|
|
135
|
+
return _jsx(SolidAutocomplete, { className: "solid-standard-autocomplete w-full", value: selected, suggestions: suggestions, completeMethod: function (_a) {
|
|
136
|
+
var next = _a.query;
|
|
137
|
+
return setQuery(next);
|
|
138
|
+
}, onChange: function (event) { var _a, _b; return onChange((_b = (_a = event.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ""); }, field: "label", placeholder: placeholder, disabled: disabled, dropdown: true, forceSelection: true, portal: true });
|
|
139
|
+
}
|
|
140
|
+
function ModelPicker(_a) {
|
|
141
|
+
var _b, _c;
|
|
142
|
+
var value = _a.value, options = _a.options, providers = _a.providers, providerConfig = _a.providerConfig, onChange = _a.onChange;
|
|
143
|
+
var separator = value.indexOf(":");
|
|
144
|
+
var provider = separator < 0 ? "" : value.slice(0, separator);
|
|
145
|
+
var model = separator < 0 ? "" : value.slice(separator + 1);
|
|
146
|
+
var availableModels = options.filter(function (option) { return option.provider === provider; });
|
|
147
|
+
var _d = React.useState(false), otherSelected = _d[0], setOtherSelected = _d[1];
|
|
148
|
+
var showOther = !!provider && (otherSelected || (!!model && !availableModels.some(function (option) { return option.model === model; })));
|
|
149
|
+
return _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Provider *" }), _jsx(SearchableSelect, { value: provider, options: providers, placeholder: "Select provider", onChange: function (next) { setOtherSelected(false); onChange("".concat(next, ":")); } }), ((_b = providerConfig[provider]) === null || _b === void 0 ? void 0 : _b.type) === "bedrock" && ((_c = providerConfig[provider]) === null || _c === void 0 ? void 0 : _c.region) &&
|
|
150
|
+
_jsx("small", { children: _jsxs("em", { children: ["Region: ", providerConfig[provider].region] }) })] }), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Model *" }), _jsx(SearchableSelect, { value: showOther ? OTHER_MODEL : model, options: __spreadArray(__spreadArray([], availableModels.map(function (option) { return ({ label: option.model, value: option.model }); }), true), [{ label: "Other", value: OTHER_MODEL }], false), placeholder: "Select model", disabled: !provider, onChange: function (next) {
|
|
151
|
+
setOtherSelected(next === OTHER_MODEL);
|
|
152
|
+
onChange("".concat(provider, ":").concat(next === OTHER_MODEL ? "" : next));
|
|
153
|
+
} }), showOther && _jsx(SolidInput, { className: "w-full", "aria-label": "Custom model ID", placeholder: "Enter model ID", value: model, onChange: function (event) { return onChange("".concat(provider, ":").concat(event.target.value)); } })] })] });
|
|
161
154
|
}
|
|
162
155
|
var entityApi = createSolidEntityApi("agentRegistry");
|
|
163
156
|
var skillApi = createSolidEntityApi("agentSkillRegistry");
|
|
@@ -169,7 +162,7 @@ var agentToolApi = createSolidEntityApi("agentTool");
|
|
|
169
162
|
var agentRoleApi = createSolidEntityApi("agentRole");
|
|
170
163
|
var agentSecretApi = createSolidEntityApi("agentSecret");
|
|
171
164
|
var jobApi = createSolidEntityApi("agentJob");
|
|
172
|
-
var skillFields = ["id", "name", "iconName", "description"
|
|
165
|
+
var skillFields = ["id", "name", "iconName", "description"];
|
|
173
166
|
var toolFields = __spreadArray(__spreadArray([], skillFields, true), ["type", "status", "lastLoadError"], false);
|
|
174
167
|
function fieldsQuery(fields) {
|
|
175
168
|
return fields.map(function (name) { return "fields=".concat(encodeURIComponent(name)); }).join("&");
|
|
@@ -179,7 +172,7 @@ var detailFields = [
|
|
|
179
172
|
"reasoningModelKey", "fastModelKey", "status", "stepLimit", "turnStepLimit", "costLimit", "configVersion",
|
|
180
173
|
];
|
|
181
174
|
var detailQuery = [
|
|
182
|
-
"agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret",
|
|
175
|
+
"agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret", "tags",
|
|
183
176
|
].map(function (name, index) { return "populate[".concat(index, "]=").concat(name); }).join("&") + "&" + fieldsQuery(detailFields);
|
|
184
177
|
// Group by link ID to project summary columns without populating full registry records.
|
|
185
178
|
function resourceLinksQuery(id, relation, registry, setting, fields) {
|
|
@@ -219,7 +212,7 @@ function agentFormFromRecord(record) {
|
|
|
219
212
|
name: (_a = record.name) !== null && _a !== void 0 ? _a : "", title: (_b = record.title) !== null && _b !== void 0 ? _b : "", description: (_c = record.description) !== null && _c !== void 0 ? _c : "", iconName: (_d = record.iconName) !== null && _d !== void 0 ? _d : "",
|
|
220
213
|
inputs: parseInputs(record.requiredInputs), reasoningModelKey: (_e = record.reasoningModelKey) !== null && _e !== void 0 ? _e : "", fastModelKey: (_f = record.fastModelKey) !== null && _f !== void 0 ? _f : "",
|
|
221
214
|
systemPrompt: (_g = record.systemPrompt) !== null && _g !== void 0 ? _g : "", stepLimit: (_h = record.stepLimit) !== null && _h !== void 0 ? _h : 100, turnStepLimit: (_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20,
|
|
222
|
-
costLimit: Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3), skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
|
|
215
|
+
costLimit: Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3), tags: agentHubTagsFrom(record.tags), skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
|
|
223
216
|
toolIds: tools.map(function (link) { var _a; return (_a = link.agentToolRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
|
|
224
217
|
roleIds: items(record.agentRoles).map(function (link) { var _a; return (_a = link.roleMetadata) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
|
|
225
218
|
secretIds: secrets.map(function (link) { var _a; return (_a = link.secret) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
|
|
@@ -242,27 +235,55 @@ function parseInputs(value) {
|
|
|
242
235
|
var parsed = typeof value === "string" ? JSON.parse(value) : value;
|
|
243
236
|
if (Array.isArray(parsed))
|
|
244
237
|
return parsed.map(function (input) {
|
|
245
|
-
var _a, _b, _c, _d, _e;
|
|
238
|
+
var _a, _b, _c, _d, _e, _f;
|
|
246
239
|
return ({
|
|
247
240
|
name: String((_b = (_a = input.name) !== null && _a !== void 0 ? _a : input.variableName) !== null && _b !== void 0 ? _b : ""), description: String((_c = input.description) !== null && _c !== void 0 ? _c : ""),
|
|
248
|
-
dataType: String((_e = (_d = input.dataType) !== null && _d !== void 0 ? _d : input.type) !== null && _e !== void 0 ? _e : "string"),
|
|
241
|
+
dataType: String((_e = (_d = input.dataType) !== null && _d !== void 0 ? _d : input.type) !== null && _e !== void 0 ? _e : "string"), defaultValue: (_f = input.defaultValue) !== null && _f !== void 0 ? _f : null,
|
|
242
|
+
optional: input.optional === true,
|
|
249
243
|
});
|
|
250
244
|
});
|
|
251
245
|
// Existing agent definitions may use a name-keyed object.
|
|
252
246
|
if (parsed && typeof parsed === "object")
|
|
253
247
|
return Object.entries(parsed).map(function (_a) {
|
|
254
|
-
var _b, _c, _d;
|
|
248
|
+
var _b, _c, _d, _e;
|
|
255
249
|
var name = _a[0], definition = _a[1];
|
|
256
250
|
return ({
|
|
257
251
|
name: name,
|
|
258
252
|
description: String((_b = definition === null || definition === void 0 ? void 0 : definition.description) !== null && _b !== void 0 ? _b : ""),
|
|
259
|
-
dataType: String((_d = (_c = definition === null || definition === void 0 ? void 0 : definition.dataType) !== null && _c !== void 0 ? _c : definition === null || definition === void 0 ? void 0 : definition.type) !== null && _d !== void 0 ? _d : "string"),
|
|
253
|
+
dataType: String((_d = (_c = definition === null || definition === void 0 ? void 0 : definition.dataType) !== null && _c !== void 0 ? _c : definition === null || definition === void 0 ? void 0 : definition.type) !== null && _d !== void 0 ? _d : "string"), defaultValue: (_e = definition === null || definition === void 0 ? void 0 : definition.defaultValue) !== null && _e !== void 0 ? _e : null,
|
|
254
|
+
optional: (definition === null || definition === void 0 ? void 0 : definition.optional) === true,
|
|
260
255
|
});
|
|
261
256
|
});
|
|
262
257
|
}
|
|
263
258
|
catch ( /* Keep malformed historical values from crashing the editor. */_a) { /* Keep malformed historical values from crashing the editor. */ }
|
|
264
259
|
return [];
|
|
265
260
|
}
|
|
261
|
+
function parseDefaultValue(raw, dataType) {
|
|
262
|
+
if (dataType === "string" || dataType === "date" || dataType === "datetime")
|
|
263
|
+
return raw;
|
|
264
|
+
if (dataType === "boolean") {
|
|
265
|
+
if (raw !== "true" && raw !== "false")
|
|
266
|
+
throw new Error("Default value must be true or false for ".concat(dataType, "."));
|
|
267
|
+
return raw === "true";
|
|
268
|
+
}
|
|
269
|
+
if (dataType === "number" || dataType === "integer") {
|
|
270
|
+
var value_1 = Number(raw);
|
|
271
|
+
if (!Number.isFinite(value_1) || (dataType === "integer" && !Number.isSafeInteger(value_1)))
|
|
272
|
+
throw new Error("Default value must be a valid ".concat(dataType, "."));
|
|
273
|
+
return value_1;
|
|
274
|
+
}
|
|
275
|
+
var value = JSON.parse(raw);
|
|
276
|
+
if (dataType === "array" && !Array.isArray(value))
|
|
277
|
+
throw new Error("Default value must be a JSON array.");
|
|
278
|
+
if (dataType === "object" && (!value || typeof value !== "object" || Array.isArray(value)))
|
|
279
|
+
throw new Error("Default value must be a JSON object.");
|
|
280
|
+
return value;
|
|
281
|
+
}
|
|
282
|
+
function formatDefaultValue(value) {
|
|
283
|
+
if (value == null)
|
|
284
|
+
return "";
|
|
285
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
286
|
+
}
|
|
266
287
|
function apiError(error) {
|
|
267
288
|
var _a, _b, _c, _d, _e;
|
|
268
289
|
var value = (_e = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : (_d = error === null || error === void 0 ? void 0 : error.data) === null || _d === void 0 ? void 0 : _d.message) !== null && _e !== void 0 ? _e : error === null || error === void 0 ? void 0 : error.message;
|
|
@@ -273,27 +294,43 @@ function useCatalog(api, query) {
|
|
|
273
294
|
var _a = api.useGetSolidEntitiesQuery(query), data = _a.data, isLoading = _a.isLoading, refetch = _a.refetch;
|
|
274
295
|
return { records: items(data === null || data === void 0 ? void 0 : data.records), isLoading: isLoading, refetch: refetch };
|
|
275
296
|
}
|
|
297
|
+
function ResourcePreviewDialog(_a) {
|
|
298
|
+
var _b, _c;
|
|
299
|
+
var item = _a.item, kind = _a.kind, onClose = _a.onClose;
|
|
300
|
+
var api = kind === "skill" ? skillApi : toolApi;
|
|
301
|
+
var field = kind === "skill" ? "body" : "sourceCode";
|
|
302
|
+
var _d = api.useGetSolidEntityByIdQuery({ id: item.id, qs: fieldsQuery(["id", field]) }, { refetchOnMountOrArgChange: true }), currentData = _d.currentData, isFetching = _d.isFetching, isError = _d.isError, refetch = _d.refetch;
|
|
303
|
+
var record = recordFrom(currentData);
|
|
304
|
+
var content = (_b = record === null || record === void 0 ? void 0 : record[field]) !== null && _b !== void 0 ? _b : "";
|
|
305
|
+
return _jsx(SolidDialog, { open: true, onOpenChange: function (open) { if (!open)
|
|
306
|
+
onClose(); }, header: (_c = item.name) !== null && _c !== void 0 ? _c : "View ".concat(kind), style: { width: "min(64rem, 94vw)", maxWidth: "94vw" }, children: _jsx(SolidDialogBody, { className: "agent-editor__resource-preview-body", children: isFetching ? _jsxs("div", { className: "agent-editor__empty", role: "status", children: ["Loading ", kind, "\u2026"] })
|
|
307
|
+
: isError || !record ? _jsxs("div", { className: "agent-editor__empty", children: [_jsxs("p", { role: "alert", children: ["This ", kind, " could not be loaded."] }), _jsx(SolidButton, { variant: "secondary", onClick: function () { return void refetch(); }, children: "Retry" })] })
|
|
308
|
+
: !content ? _jsxs("div", { className: "agent-editor__empty", children: ["No ", kind === "skill" ? "skill body" : "source code", " available."] })
|
|
309
|
+
: kind === "skill" ? _jsx(SolidAgentMarkdown, { text: content })
|
|
310
|
+
: _jsx(SolidCodeEditor, { value: content, language: "python", readOnly: true, fontSize: 12, height: "min(65vh, 42rem)" }) }) });
|
|
311
|
+
}
|
|
276
312
|
function LinkPicker(_a) {
|
|
277
|
-
var label = _a.label, description = _a.description, options = _a.options, selected = _a.selected, onAdd = _a.onAdd, onRemove = _a.onRemove, createUrl = _a.createUrl, render = _a.render, renderSettings = _a.renderSettings, linkFor = _a.linkFor;
|
|
313
|
+
var label = _a.label, description = _a.description, options = _a.options, selected = _a.selected, onAdd = _a.onAdd, onRemove = _a.onRemove, createUrl = _a.createUrl, render = _a.render, renderSettings = _a.renderSettings, linkFor = _a.linkFor, onView = _a.onView, editUrlFor = _a.editUrlFor;
|
|
278
314
|
var _b = React.useState(""), search = _b[0], setSearch = _b[1];
|
|
279
315
|
var _c = React.useState(false), open = _c[0], setOpen = _c[1];
|
|
316
|
+
var showAssociatedCount = label === "Skills" || label === "Tools";
|
|
280
317
|
var available = options.filter(function (item) {
|
|
281
318
|
var _a, _b, _c, _d;
|
|
282
319
|
return !selected.some(function (selectedItem) { return selectedItem.id === item.id; })
|
|
283
320
|
&& "".concat((_c = (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key) !== null && _c !== void 0 ? _c : "", " ").concat((_d = item.description) !== null && _d !== void 0 ? _d : "").toLowerCase().includes(search.toLowerCase());
|
|
284
321
|
}).slice(0, 20);
|
|
285
|
-
return _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: label }), _jsx("p", { children: description })] }), createUrl && _jsxs("a", { href: createUrl, target: "_blank", rel: "noopener noreferrer", className: "agent-editor__new-link", children: ["Create ", label === "Skills" ? "skill" : "tool", " ", _jsx(ExternalLink, { size: 14 })] })] }), _jsxs("div", { className: "agent-editor__picker", children: [_jsx(SolidInput, { value: search, placeholder: "Search and add ".concat(label.toLowerCase(), "\u2026"), "aria-label": "Search ".concat(label.toLowerCase()), onFocus: function () { return setOpen(true); }, onChange: function (event) { setSearch(event.target.value); setOpen(true); } }), open && _jsx("div", { className: "agent-editor__picker-results", children: available.length ? available.map(function (item) {
|
|
322
|
+
return _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: label }), _jsx("p", { children: description })] }), createUrl && _jsxs("a", { href: createUrl, target: "_blank", rel: "noopener noreferrer", className: "agent-editor__new-link", children: ["Create ", label === "Skills" ? "skill" : "tool", " ", _jsx(ExternalLink, { size: 14 })] })] }), showAssociatedCount && _jsxs("div", { className: "agent-editor__linked-count", role: "status", children: [selected.length, " ", label.toLowerCase(), " associated"] }), _jsxs("div", { className: "agent-editor__picker", children: [_jsx(SolidInput, { value: search, placeholder: "Search and add ".concat(label.toLowerCase(), "\u2026"), "aria-label": "Search ".concat(label.toLowerCase()), onFocus: function () { return setOpen(true); }, onChange: function (event) { setSearch(event.target.value); setOpen(true); } }), open && _jsx("div", { className: "agent-editor__picker-results", children: available.length ? available.map(function (item) {
|
|
286
323
|
var _a, _b;
|
|
287
324
|
return _jsxs("button", { type: "button", onClick: function () { onAdd(item.id); setSearch(""); setOpen(false); }, children: [_jsx("strong", { children: (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key }), _jsx("span", { children: item.description })] }, item.id);
|
|
288
325
|
}) : _jsxs("p", { children: ["No available ", label.toLowerCase(), " found."] }) })] }), selected.length ? _jsx("div", { className: "agent-editor__cards", children: selected.map(function (item) {
|
|
289
|
-
var _a, _b;
|
|
290
|
-
return _jsxs("div", { className: "agent-editor__linked-card", children: [_jsx("div", { className: "agent-editor__card-content", children: render(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)) }), renderSettings === null || renderSettings === void 0 ? void 0 : renderSettings(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)), _jsx("button", { type: "button", "aria-label": "
|
|
326
|
+
var _a, _b, _c, _d;
|
|
327
|
+
return _jsxs("div", { className: "agent-editor__linked-card", children: [_jsx("div", { className: "agent-editor__card-content", children: render(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)) }), renderSettings === null || renderSettings === void 0 ? void 0 : renderSettings(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)), onView && editUrlFor ? _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-editor__resource-menu-trigger", "aria-label": "Actions for ".concat((_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key), children: _jsx(Ellipsis, { size: 18 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "agent-editor__resource-menu", children: [_jsxs(SolidDropdownMenuItem, { onSelect: function () { return onView(item); }, children: [_jsx(Eye, { size: 16 }), " View"] }), _jsx(SolidDropdownMenuItem, { asChild: true, children: _jsxs("a", { href: editUrlFor(item), target: "_blank", rel: "noopener noreferrer", children: [_jsx(Pencil, { size: 16 }), " Edit"] }) }), _jsxs(SolidDropdownMenuItem, { className: "agent-editor__resource-delete", onSelect: function () { return onRemove(item.id); }, children: [_jsx(Trash2, { size: 16 }), " Delete"] })] })] }) : _jsx("button", { type: "button", "aria-label": "Remove ".concat((_d = (_c = item.name) !== null && _c !== void 0 ? _c : item.displayName) !== null && _d !== void 0 ? _d : item.key), onClick: function () { return onRemove(item.id); }, children: _jsx(Trash2, { size: 16 }) })] }, item.id);
|
|
291
328
|
}) }) : _jsxs("div", { className: "agent-editor__empty", children: ["No ", label.toLowerCase(), " linked yet."] })] });
|
|
292
329
|
}
|
|
293
330
|
export function AgentRegistryEditorPage() {
|
|
294
331
|
var _this = this;
|
|
295
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
296
|
-
var
|
|
332
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
333
|
+
var _t = useParams().id, id = _t === void 0 ? "new" : _t;
|
|
297
334
|
var navigate = useNavigate();
|
|
298
335
|
var dispatch = useDispatch();
|
|
299
336
|
var agentResult = entityApi.useGetSolidEntityByIdQuery({ id: id, qs: detailQuery }, { skip: id === "new" });
|
|
@@ -308,13 +345,13 @@ export function AgentRegistryEditorPage() {
|
|
|
308
345
|
return undefined;
|
|
309
346
|
return __assign(__assign({}, agent), { agentSkills: resourceLinksFrom(skillLinks.currentData, "agentSkills", "agentSkillRegistry", "alwaysInclude", skillFields), agentTools: resourceLinksFrom(toolLinks.currentData, "agentTools", "agentToolRegistry", "requiresApproval", toolFields) });
|
|
310
347
|
}, [agentResult.currentData, skillLinks.currentData, toolLinks.currentData]);
|
|
311
|
-
var
|
|
312
|
-
var skills = useCatalog(skillApi, "offset=0&limit=1000&".concat(fieldsQuery(skillFields)));
|
|
313
|
-
var tools = useCatalog(toolApi, "offset=0&limit=1000&".concat(fieldsQuery(toolFields)));
|
|
348
|
+
var _u = useGetSolidSettingsQuery(undefined), settings = _u.data, settingsError = _u.isError;
|
|
349
|
+
var skills = useCatalog(skillApi, "offset=0&limit=1000&populate[0]=tags&".concat(fieldsQuery(skillFields)));
|
|
350
|
+
var tools = useCatalog(toolApi, "offset=0&limit=1000&populate[0]=tags&".concat(fieldsQuery(toolFields)));
|
|
314
351
|
var roles = useCatalog(roleApi, "offset=0&limit=1000&populate[0]=module");
|
|
315
352
|
var secrets = useCatalog(secretApi, "offset=0&limit=1000&fields[0]=id&fields[1]=key&fields[2]=displayName&fields[3]=description");
|
|
316
|
-
var
|
|
317
|
-
var
|
|
353
|
+
var _v = entityApi.useCreateSolidEntityMutation(), createAgent = _v[0], creating = _v[1].isLoading;
|
|
354
|
+
var _w = entityApi.useUpdateSolidEntityMutation(), updateAgent = _w[0], updating = _w[1].isLoading;
|
|
318
355
|
var createSkillLink = agentSkillApi.useCreateSolidEntityMutation()[0];
|
|
319
356
|
var deleteSkillLink = agentSkillApi.useDeleteSolidEntityMutation()[0];
|
|
320
357
|
var updateSkillLink = agentSkillApi.useUpdateSolidEntityMutation()[0];
|
|
@@ -327,7 +364,7 @@ export function AgentRegistryEditorPage() {
|
|
|
327
364
|
var deleteSecretLink = agentSecretApi.useDeleteSolidEntityMutation()[0];
|
|
328
365
|
var updateSecretLink = agentSecretApi.useUpdateSolidEntityMutation()[0];
|
|
329
366
|
var record = recordFrom(response);
|
|
330
|
-
var
|
|
367
|
+
var _x = React.useState("basics"), tab = _x[0], setTab = _x[1];
|
|
331
368
|
var jobs = jobApi.useGetSolidEntitiesQuery("offset=0&limit=1000&filters[agent][id][$eq]=".concat(encodeURIComponent(id), "&").concat(fieldsQuery(["id", "status"])), { skip: id === "new" || tab !== "jobs" });
|
|
332
369
|
var refetch = function () {
|
|
333
370
|
void agentResult.refetch();
|
|
@@ -336,34 +373,37 @@ export function AgentRegistryEditorPage() {
|
|
|
336
373
|
if (tab === "jobs")
|
|
337
374
|
void jobs.refetch();
|
|
338
375
|
};
|
|
339
|
-
var
|
|
340
|
-
var
|
|
341
|
-
var
|
|
342
|
-
var
|
|
343
|
-
var
|
|
344
|
-
var
|
|
345
|
-
var
|
|
346
|
-
var
|
|
347
|
-
var
|
|
348
|
-
var
|
|
349
|
-
var
|
|
350
|
-
var
|
|
351
|
-
var
|
|
352
|
-
var
|
|
353
|
-
var
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var
|
|
357
|
-
var
|
|
358
|
-
var
|
|
359
|
-
var
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
var
|
|
363
|
-
var
|
|
364
|
-
var
|
|
376
|
+
var _y = React.useState(false), testAgentOpen = _y[0], setTestAgentOpen = _y[1];
|
|
377
|
+
var _z = React.useState(null), preview = _z[0], setPreview = _z[1];
|
|
378
|
+
var _0 = React.useState("maximized"), testAgentWindowMode = _0[0], setTestAgentWindowMode = _0[1];
|
|
379
|
+
var _1 = React.useState(""), name = _1[0], setName = _1[1];
|
|
380
|
+
var _2 = React.useState(""), title = _2[0], setTitle = _2[1];
|
|
381
|
+
var _3 = React.useState(""), description = _3[0], setDescription = _3[1];
|
|
382
|
+
var _4 = React.useState(""), iconName = _4[0], setIconName = _4[1];
|
|
383
|
+
var _5 = React.useState([]), inputs = _5[0], setInputs = _5[1];
|
|
384
|
+
var _6 = React.useState(""), reasoningModelKey = _6[0], setReasoningModelKey = _6[1];
|
|
385
|
+
var _7 = React.useState(""), fastModelKey = _7[0], setFastModelKey = _7[1];
|
|
386
|
+
var _8 = React.useState(""), systemPrompt = _8[0], setSystemPrompt = _8[1];
|
|
387
|
+
var _9 = React.useState(100), stepLimit = _9[0], setStepLimit = _9[1];
|
|
388
|
+
var _10 = React.useState(20), turnStepLimit = _10[0], setTurnStepLimit = _10[1];
|
|
389
|
+
var _11 = React.useState(3), costLimit = _11[0], setCostLimit = _11[1];
|
|
390
|
+
var _12 = React.useState([]), tags = _12[0], setTags = _12[1];
|
|
391
|
+
var _13 = React.useState(false), creatingTag = _13[0], setCreatingTag = _13[1];
|
|
392
|
+
var _14 = React.useState([]), skillIds = _14[0], setSkillIds = _14[1];
|
|
393
|
+
var _15 = React.useState([]), toolIds = _15[0], setToolIds = _15[1];
|
|
394
|
+
var _16 = React.useState([]), roleIds = _16[0], setRoleIds = _16[1];
|
|
395
|
+
var _17 = React.useState([]), secretIds = _17[0], setSecretIds = _17[1];
|
|
396
|
+
var _18 = React.useState({}), alwaysIncludeValues = _18[0], setAlwaysIncludeValues = _18[1];
|
|
397
|
+
var _19 = React.useState({}), requiresApprovalValues = _19[0], setRequiresApprovalValues = _19[1];
|
|
398
|
+
var _20 = React.useState({}), secretEnvVarNames = _20[0], setSecretEnvVarNames = _20[1];
|
|
399
|
+
var _21 = React.useState(null), pendingSecret = _21[0], setPendingSecret = _21[1];
|
|
400
|
+
var _22 = React.useState(""), secretEnvVarDraft = _22[0], setSecretEnvVarDraft = _22[1];
|
|
401
|
+
var _23 = React.useState(""), secretEnvVarError = _23[0], setSecretEnvVarError = _23[1];
|
|
402
|
+
var _24 = React.useState({}), errors = _24[0], setErrors = _24[1];
|
|
403
|
+
var _25 = React.useState(0), auditVersion = _25[0], setAuditVersion = _25[1];
|
|
404
|
+
var _26 = React.useState(false), confirmRefresh = _26[0], setConfirmRefresh = _26[1];
|
|
365
405
|
var baseline = React.useRef("");
|
|
366
|
-
var currentForm = function () { return JSON.stringify({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames }); };
|
|
406
|
+
var currentForm = function () { return JSON.stringify({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags: tags, skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames }); };
|
|
367
407
|
React.useEffect(function () {
|
|
368
408
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
369
409
|
if (!record)
|
|
@@ -380,6 +420,7 @@ export function AgentRegistryEditorPage() {
|
|
|
380
420
|
setStepLimit((_h = record.stepLimit) !== null && _h !== void 0 ? _h : 100);
|
|
381
421
|
setTurnStepLimit((_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20);
|
|
382
422
|
setCostLimit(Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3));
|
|
423
|
+
setTags(agentHubTagsFrom(record.tags));
|
|
383
424
|
setSkillIds(items(record.agentSkills).map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
|
|
384
425
|
setToolIds(items(record.agentTools).map(function (link) { var _a; return (_a = link.agentToolRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
|
|
385
426
|
setRoleIds(items(record.agentRoles).map(function (link) { var _a; return (_a = link.roleMetadata) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
|
|
@@ -409,19 +450,29 @@ export function AgentRegistryEditorPage() {
|
|
|
409
450
|
return function () { return window.removeEventListener("focus", refresh); };
|
|
410
451
|
}, [skills.refetch, tools.refetch]);
|
|
411
452
|
var configValue = getSettingsMap(settings).solidXGenAiCodeBuilderConfig;
|
|
412
|
-
var
|
|
453
|
+
var aiConfig = {};
|
|
413
454
|
try {
|
|
414
|
-
|
|
415
|
-
enabledProviders = (_a = config === null || config === void 0 ? void 0 : config.providers) !== null && _a !== void 0 ? _a : {};
|
|
455
|
+
aiConfig = (_a = (typeof configValue === "string" ? JSON.parse(configValue) : configValue)) !== null && _a !== void 0 ? _a : {};
|
|
416
456
|
}
|
|
417
|
-
catch ( /* Invalid configuration has no enabled providers. */
|
|
418
|
-
var
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
457
|
+
catch ( /* Invalid configuration has no enabled providers. */_27) { /* Invalid configuration has no enabled providers. */ }
|
|
458
|
+
var modelsCatalog = useModelsDevCatalog().catalog;
|
|
459
|
+
var savedModelKeys = [record === null || record === void 0 ? void 0 : record.reasoningModelKey, record === null || record === void 0 ? void 0 : record.fastModelKey].filter(function (key) { return !!key; });
|
|
460
|
+
var modelOptions = buildModelOptions((_b = aiConfig.providers) !== null && _b !== void 0 ? _b : {}, { Reasoning: (_d = (_c = aiConfig.models) === null || _c === void 0 ? void 0 : _c.default) !== null && _d !== void 0 ? _d : (_e = aiConfig.models) === null || _e === void 0 ? void 0 : _e.main, Fast: (_f = aiConfig.models) === null || _f === void 0 ? void 0 : _f.fast }, modelsCatalog, savedModelKeys);
|
|
461
|
+
var providerOptions = Object.entries((_g = aiConfig.providers) !== null && _g !== void 0 ? _g : {})
|
|
462
|
+
.filter(function (_a) {
|
|
463
|
+
var entry = _a[1];
|
|
464
|
+
return typeof (entry === null || entry === void 0 ? void 0 : entry.apiKey) === "string" && entry.apiKey.trim().length > 0;
|
|
465
|
+
})
|
|
466
|
+
.map(function (_a) {
|
|
467
|
+
var _b, _c, _d;
|
|
468
|
+
var provider = _a[0];
|
|
469
|
+
return ({ label: (_d = (_c = (_b = modelsCatalog === null || modelsCatalog === void 0 ? void 0 : modelsCatalog[provider]) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : PROVIDER_LABELS[provider]) !== null && _d !== void 0 ? _d : provider, value: provider });
|
|
470
|
+
});
|
|
471
|
+
var isValidModelKey = function (value) {
|
|
472
|
+
var separator = value.indexOf(":");
|
|
473
|
+
return separator > 0 && providerOptions.some(function (provider) { return provider.value === value.slice(0, separator); }) &&
|
|
474
|
+
!!value.slice(separator + 1).trim();
|
|
475
|
+
};
|
|
425
476
|
var toggle = function (setter, value) {
|
|
426
477
|
return setter(function (current) { return current.includes(value) ? current.filter(function (id) { return id !== value; }) : __spreadArray(__spreadArray([], current, true), [value], false); });
|
|
427
478
|
};
|
|
@@ -493,11 +544,13 @@ export function AgentRegistryEditorPage() {
|
|
|
493
544
|
});
|
|
494
545
|
};
|
|
495
546
|
var save = function (nextStatus) { return __awaiter(_this, void 0, void 0, function () {
|
|
496
|
-
var next, payload, newlyCreatedId, scalarSaved, result, _a, savedId, error_1;
|
|
547
|
+
var next, normalizedInputs, payload, newlyCreatedId, scalarSaved, result, _a, savedId, error_1;
|
|
497
548
|
var _b, _c, _d;
|
|
498
549
|
return __generator(this, function (_e) {
|
|
499
550
|
switch (_e.label) {
|
|
500
551
|
case 0:
|
|
552
|
+
if (creatingTag)
|
|
553
|
+
return [2 /*return*/];
|
|
501
554
|
next = {};
|
|
502
555
|
if (!name.trim())
|
|
503
556
|
next.name = "Name is required.";
|
|
@@ -505,9 +558,9 @@ export function AgentRegistryEditorPage() {
|
|
|
505
558
|
next.title = "Title is required.";
|
|
506
559
|
if (!systemPrompt.trim())
|
|
507
560
|
next.systemPrompt = "Persona instructions are required.";
|
|
508
|
-
if (!
|
|
561
|
+
if (!isValidModelKey(reasoningModelKey))
|
|
509
562
|
next.reasoningModelKey = "Choose an enabled reasoning provider and model.";
|
|
510
|
-
if (!
|
|
563
|
+
if (!isValidModelKey(fastModelKey))
|
|
511
564
|
next.fastModelKey = "Choose an enabled fast provider and model.";
|
|
512
565
|
if (inputs.some(function (input) { return !input.name.trim() || !input.dataType; }))
|
|
513
566
|
next.inputs = "Each input needs a name and data type.";
|
|
@@ -521,17 +574,16 @@ export function AgentRegistryEditorPage() {
|
|
|
521
574
|
dispatch(showToast({ severity: "error", summary: "Missing information", detail: Object.values(next).join(" ") }));
|
|
522
575
|
return [2 /*return*/];
|
|
523
576
|
}
|
|
524
|
-
|
|
525
|
-
name: name.trim(),
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
};
|
|
577
|
+
try {
|
|
578
|
+
normalizedInputs = inputs.map(function (input) { return (__assign(__assign({}, input), { name: input.name.trim(), description: input.description.trim(), defaultValue: input.defaultValue === "" || input.defaultValue == null ? null : parseDefaultValue(String(input.defaultValue), input.dataType) })); });
|
|
579
|
+
}
|
|
580
|
+
catch (error) {
|
|
581
|
+
next.inputs = error instanceof Error ? error.message : "Check the default input values.";
|
|
582
|
+
setErrors(next);
|
|
583
|
+
setTab("basics");
|
|
584
|
+
return [2 /*return*/];
|
|
585
|
+
}
|
|
586
|
+
payload = __assign(__assign({ name: name.trim(), title: title.trim(), description: description.trim(), iconName: iconName, requiredInputs: JSON.stringify(normalizedInputs), reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit) }, agentHubTagsPayload(tags)), { status: (_b = nextStatus !== null && nextStatus !== void 0 ? nextStatus : record === null || record === void 0 ? void 0 : record.status) !== null && _b !== void 0 ? _b : "draft" });
|
|
535
587
|
scalarSaved = false;
|
|
536
588
|
_e.label = 1;
|
|
537
589
|
case 1:
|
|
@@ -637,14 +689,15 @@ export function AgentRegistryEditorPage() {
|
|
|
637
689
|
var linkSetting = function (label, checked, onChange, hint) {
|
|
638
690
|
return _jsxs("label", { className: "agent-editor__link-setting", children: [_jsx("input", { type: "checkbox", checked: checked, onChange: function (event) { return onChange(event.target.checked); } }), _jsxs("span", { children: [_jsx("strong", { children: label }), _jsx("small", { children: hint })] })] });
|
|
639
691
|
};
|
|
640
|
-
var agentStatus = (
|
|
692
|
+
var agentStatus = (_h = record === null || record === void 0 ? void 0 : record.status) !== null && _h !== void 0 ? _h : "draft";
|
|
641
693
|
var tabs = __spreadArray(__spreadArray(__spreadArray(__spreadArray([
|
|
642
|
-
{ value: "basics", label: "Basics", content: _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__grid", children: [field("Name", name, setName, "name", true), field("Title", title, setTitle, "title", true), field("Description", description, setDescription, "description"), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Icon" }), _jsx(SolidIconPicker, { value: iconName, onChange: setIconName })] })] }), _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "
|
|
643
|
-
: _jsx("div", { className: "agent-editor__inputs", children: inputs.map(function (input, index) { return _jsxs("div", { className: "agent-editor__input-row", children: [_jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " name"), placeholder: "Variable name", value: input.name, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { name: event.target.value }) : item; }); }); } }), _jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " description"), placeholder: "Description", value: input.description, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { description: event.target.value }) : item; }); }); } }), _jsx("select", { "aria-label": "Input ".concat(index + 1, " data type"), value: input.dataType, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { dataType: event.target.value }) : item; }); }); }, children: ["string", "number", "integer", "boolean", "date", "datetime", "object", "array"].map(function (type) { return _jsx("option", { value: type, children: type }, type); }) }), _jsx("button", { type: "button", "aria-label": "Remove input ".concat(index + 1), onClick: function () { return setInputs(function (current) { return current.filter(function (_, i) { return i !== index; }); }); }, children: _jsx(Trash2, { size: 17 }) })] }, index); }) }), errors.inputs && _jsx("small", { className: "agent-editor__error", children: errors.inputs })] }), _jsxs("section", { className: "agent-editor__section", children: [_jsx("h2", { children: "Models" }), _jsx("p", { children: "Choose
|
|
694
|
+
{ value: "basics", label: "Basics", content: _jsxs("div", { className: "agent-editor__stack", children: [_jsxs("div", { className: "agent-editor__grid", children: [field("Name", name, setName, "name", true), field("Title", title, setTitle, "title", true), field("Description", description, setDescription, "description"), _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: "Icon" }), _jsx(SolidIconPicker, { value: iconName, onChange: setIconName })] })] }), _jsx(AgentHubTagsField, { value: tags, onChange: setTags, disabled: creating || updating || isLoading || isFetching || isError, onBusyChange: setCreatingTag }), _jsxs("section", { className: "agent-editor__section", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "Inputs" }), _jsx("p", { children: "Define the variables this agent can use. Mark inputs optional or provide a default value when people do not need to enter them." })] }), inputs.length > 0 && _jsxs(SolidButton, { type: "button", variant: "secondary", size: "small", onClick: function () { return setInputs(function (current) { return __spreadArray(__spreadArray([], current, true), [{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }], false); }); }, children: [_jsx(Plus, { size: 15 }), " Add input"] })] }), !inputs.length ? _jsxs("div", { className: "agent-editor__empty", children: ["This agent has no inputs. ", _jsxs("button", { type: "button", onClick: function () { return setInputs([{ name: "", description: "", dataType: "string", defaultValue: null, optional: false }]); }, children: [_jsx(Plus, { size: 15 }), " Add an input variable"] })] })
|
|
695
|
+
: _jsx("div", { className: "agent-editor__inputs", children: inputs.map(function (input, index) { return _jsxs("div", { className: "agent-editor__input-row", children: [_jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " name"), placeholder: "Variable name", value: input.name, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { name: event.target.value }) : item; }); }); } }), _jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " description"), placeholder: "Description", value: input.description, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { description: event.target.value }) : item; }); }); } }), _jsx(SolidInput, { "aria-label": "Input ".concat(index + 1, " default value"), placeholder: "Default value", value: formatDefaultValue(input.defaultValue), onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { defaultValue: event.target.value }) : item; }); }); } }), _jsx("select", { "aria-label": "Input ".concat(index + 1, " data type"), value: input.dataType, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { dataType: event.target.value }) : item; }); }); }, children: ["string", "number", "integer", "boolean", "date", "datetime", "object", "array"].map(function (type) { return _jsx("option", { value: type, children: type }, type); }) }), _jsxs("label", { className: "agent-editor__input-optional", children: [_jsx("input", { type: "checkbox", checked: input.optional, onChange: function (event) { return setInputs(function (current) { return current.map(function (item, i) { return i === index ? __assign(__assign({}, item), { optional: event.target.checked }) : item; }); }); } }), " Optional"] }), _jsx("button", { type: "button", "aria-label": "Remove input ".concat(index + 1), onClick: function () { return setInputs(function (current) { return current.filter(function (_, i) { return i !== index; }); }); }, children: _jsx(Trash2, { size: 17 }) })] }, index); }) }), errors.inputs && _jsx("small", { className: "agent-editor__error", children: errors.inputs })] }), _jsxs("section", { className: "agent-editor__section agent-editor__models", children: [_jsx("h2", { children: "Models" }), _jsx("p", { children: "Choose a configured provider and model for each role. Select Other to enter a model ID manually." }), _jsx("div", { className: "agent-editor__grid", children: [["Reasoning model", reasoningModelKey, setReasoningModelKey, "reasoningModelKey"], ["Fast model", fastModelKey, setFastModelKey, "fastModelKey"]].map(function (_a) {
|
|
696
|
+
var _b;
|
|
644
697
|
var label = _a[0], value = _a[1], setter = _a[2], key = _a[3];
|
|
645
|
-
return _jsxs("
|
|
698
|
+
return _jsxs("div", { className: "agent-editor__field", children: [_jsx("span", { children: label }), _jsx(ModelPicker, { value: value, options: modelOptions, providers: providerOptions, providerConfig: (_b = aiConfig.providers) !== null && _b !== void 0 ? _b : {}, onChange: setter }), errors[key] && _jsx("small", { className: "agent-editor__error", children: errors[key] })] }, key);
|
|
646
699
|
}) }), settingsError ? _jsx("p", { className: "agent-editor__hint", children: "Settings could not be loaded. Try refreshing this page." })
|
|
647
|
-
: !
|
|
700
|
+
: !providerOptions.length && _jsx("p", { className: "agent-editor__hint", children: "No enabled providers are available. Check the AI settings and your permission to view encrypted settings." })] }), _jsxs("section", { className: "agent-editor__section agent-editor__workflow", "aria-labelledby": "agent-lifecycle-title", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { id: "agent-lifecycle-title", children: "Agent lifecycle" }), _jsx("p", { children: "Track this agent through its available stages. Select a stage to update its status." })] }), _jsxs("div", { className: "agent-editor__workflow-meta", children: [(record === null || record === void 0 ? void 0 : record.configVersion) != null && _jsxs("span", { className: "agent-editor__config-version", "aria-label": "Configuration version ".concat(record.configVersion), children: ["Config v", record.configVersion] }), _jsx(SolidWorkflowStatusPill, { label: agentStatus })] })] }), _jsx("div", { className: "agent-editor__workflow-stages", "aria-label": "Current agent stage: ".concat(agentStatus), children: [[
|
|
648
701
|
"draft", "Draft", "Editable configuration; not available to users."
|
|
649
702
|
],
|
|
650
703
|
["active", "Active", "Available to authorized users and the AgentHub runtime."],
|
|
@@ -653,15 +706,15 @@ export function AgentRegistryEditorPage() {
|
|
|
653
706
|
var value = _a[0], label = _a[1], description = _a[2];
|
|
654
707
|
return _jsxs(React.Fragment, { children: [index > 0 && _jsx("div", { className: "agent-editor__workflow-connector", "aria-hidden": "true" }), _jsxs("button", { type: "button", className: "agent-editor__workflow-stage".concat(agentStatus === value ? " is-current" : ""), "aria-current": agentStatus === value ? "step" : undefined, "aria-pressed": agentStatus === value, disabled: creating || updating || agentStatus === value, onClick: function () { return void save(value); }, children: [_jsx("span", { className: "agent-editor__workflow-stage-mark", children: index + 1 }), _jsxs("div", { className: "agent-editor__workflow-stage-copy", children: [_jsx("strong", { children: label }), _jsx("small", { children: description }), _jsx("small", { className: "agent-editor__workflow-stage-cta", children: agentStatus === value ? "Current stage" : "Click to move to this stage" })] }), agentStatus === value && _jsx("span", { className: "agent-editor__workflow-current", children: "Current" })] })] }, value);
|
|
655
708
|
}) }), _jsx("small", { className: "agent-editor__workflow-save-hint", children: "Changing stage saves the current form and its linked skills, tools, roles, and secrets." })] })] }) },
|
|
656
|
-
{ value: "persona", label: "Persona", content: _jsxs("section", { className: "agent-editor__section agent-editor__persona", children: [
|
|
657
|
-
{ value: "skills", label: "Skills", content: _jsx(LinkPicker, { label: "Skills", description: "Skills available to this agent.", options: skills.records, selected: linked(skillIds, skills.records, items(record === null || record === void 0 ? void 0 : record.agentSkills).map(function (link) { return link.agentSkillRegistry; }).filter(Boolean)), onAdd: function (id) { return toggle(setSkillIds, id); }, onRemove: function (id) { return toggle(setSkillIds, id); }, createUrl: "/admin/core/solid-core/agent-skill-registry/editor/new", linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentSkills, "agentSkillRegistry", id); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
|
|
709
|
+
{ value: "persona", label: "Persona", content: _jsxs("section", { className: "agent-editor__section agent-editor__persona", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "System prompt *" }), _jsx("p", { children: "Describe the agent's role, behavior, and instructions in Markdown." })] }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(AgentPersonaHistory, { agentId: record.id, savedPrompt: (_j = record.systemPrompt) !== null && _j !== void 0 ? _j : "", refreshVersion: auditVersion })] }), _jsx(SolidCodeEditor, { value: systemPrompt, onChange: function (value) { setSystemPrompt(value !== null && value !== void 0 ? value : ""); setErrors(function (current) { return (__assign(__assign({}, current), { systemPrompt: "" })); }); }, language: "markdown", fontSize: 11, height: "max(34rem, calc(100dvh - 18rem))" }), errors.systemPrompt && _jsx("small", { className: "agent-editor__error", children: errors.systemPrompt })] }) },
|
|
710
|
+
{ value: "skills", label: "Skills", content: _jsx(LinkPicker, { label: "Skills", description: "Skills available to this agent.", options: skills.records, selected: linked(skillIds, skills.records, items(record === null || record === void 0 ? void 0 : record.agentSkills).map(function (link) { return link.agentSkillRegistry; }).filter(Boolean)), onAdd: function (id) { return toggle(setSkillIds, id); }, onRemove: function (id) { return toggle(setSkillIds, id); }, createUrl: "/admin/core/solid-core/agent-skill-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "skill" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-skill-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentSkills, "agentSkillRegistry", id); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
|
|
658
711
|
var _a;
|
|
659
712
|
return _jsx("div", { className: "agent-editor__link-settings", children: linkSetting("Always include", (_a = alwaysIncludeValues[item.id]) !== null && _a !== void 0 ? _a : true, function (checked) { return setAlwaysIncludeValues(function (current) {
|
|
660
713
|
var _a;
|
|
661
714
|
return (__assign(__assign({}, current), (_a = {}, _a[item.id] = checked, _a)));
|
|
662
715
|
}); }, "Add the full skill to the agent prompt. Turn off to load it on demand.") });
|
|
663
716
|
} }) },
|
|
664
|
-
{ value: "tools", label: "Tools", content: _jsx(LinkPicker, { label: "Tools", description: "Tools available to this agent.", options: tools.records, selected: linked(toolIds, tools.records, items(record === null || record === void 0 ? void 0 : record.agentTools).map(function (link) { return link.agentToolRegistry; }).filter(Boolean)), onAdd: function (id) { return toggle(setToolIds, id); }, onRemove: function (id) { return toggle(setToolIds, id); }, createUrl: "/admin/core/solid-core/agent-tool-registry/editor/new", linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentTools, "agentToolRegistry", id); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
|
|
717
|
+
{ value: "tools", label: "Tools", content: _jsx(LinkPicker, { label: "Tools", description: "Tools available to this agent.", options: tools.records, selected: linked(toolIds, tools.records, items(record === null || record === void 0 ? void 0 : record.agentTools).map(function (link) { return link.agentToolRegistry; }).filter(Boolean)), onAdd: function (id) { return toggle(setToolIds, id); }, onRemove: function (id) { return toggle(setToolIds, id); }, createUrl: "/admin/core/solid-core/agent-tool-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "tool" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-tool-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentTools, "agentToolRegistry", id); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
|
|
665
718
|
var _a;
|
|
666
719
|
return _jsx("div", { className: "agent-editor__link-settings", children: linkSetting("Require approval", (_a = requiresApprovalValues[item.id]) !== null && _a !== void 0 ? _a : false, function (checked) { return setRequiresApprovalValues(function (current) {
|
|
667
720
|
var _a;
|
|
@@ -680,23 +733,23 @@ export function AgentRegistryEditorPage() {
|
|
|
680
733
|
var _a, _b, _c, _d, _e, _f;
|
|
681
734
|
return _jsxs("div", { className: "agent-editor__secret", children: [_jsx("strong", { children: (_b = (_a = item.displayName) !== null && _a !== void 0 ? _a : item.name) !== null && _b !== void 0 ? _b : item.key }), _jsx("span", { children: item.key }), _jsx("p", { children: item.description }), _jsxs("div", { className: "agent-editor__secret-env", children: [_jsx("span", { children: "Process environment" }), _jsx("code", { children: (_e = (_d = (_c = secretEnvVarNames[item.id]) !== null && _c !== void 0 ? _c : link === null || link === void 0 ? void 0 : link.envVarName) !== null && _d !== void 0 ? _d : item.key) !== null && _e !== void 0 ? _e : item.name }), _jsx("button", { type: "button", "aria-label": "Edit environment variable name for ".concat((_f = item.displayName) !== null && _f !== void 0 ? _f : item.key), onClick: function () { return beginSecretEnvVarEdit(item); }, children: _jsx(Pencil, { size: 14 }) })] })] });
|
|
682
735
|
} }) }
|
|
683
|
-
], ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "processes", label: "Processes", content: _jsx(AgentProcessesPanel, { agentId: record.id, agentLabel: (
|
|
684
|
-
["jobs", "Jobs", (
|
|
736
|
+
], ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "processes", label: "Processes", content: _jsx(AgentProcessesPanel, { agentId: record.id, agentLabel: (_k = record.name) !== null && _k !== void 0 ? _k : record.title }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [
|
|
737
|
+
["jobs", "Jobs", (_l = jobs.currentData) === null || _l === void 0 ? void 0 : _l.records],
|
|
685
738
|
] : []).map(function (_a) {
|
|
686
739
|
var value = _a[0], label = _a[1], related = _a[2];
|
|
687
740
|
return ({ value: value, label: label, content: _jsxs("section", { className: "agent-editor__section", children: [_jsx("h2", { children: label }), jobs.isLoading || jobs.isFetching ? _jsx("div", { className: "agent-editor__empty", children: "Loading jobs\u2026" })
|
|
688
741
|
: jobs.isError ? _jsx("div", { className: "agent-editor__empty", children: "Jobs could not be loaded." })
|
|
689
742
|
: items(related).length ? _jsx("div", { className: "agent-editor__related", children: items(related).map(function (item) { var _a, _b, _c; return _jsxs("article", { children: [_jsx("strong", { children: (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.title) !== null && _b !== void 0 ? _b : "#".concat(item.id) }), _jsx("span", { children: (_c = item.status) !== null && _c !== void 0 ? _c : "" })] }, item.id); }) })
|
|
690
743
|
: _jsxs("div", { className: "agent-editor__empty", children: ["No ", label.toLowerCase(), " for this agent yet."] })] }) });
|
|
691
|
-
}), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "sessions", label: "Sessions", content: _jsx(AgentSessionsPanel, { agentId: record.id, agentLabel: (
|
|
744
|
+
}), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "sessions", label: "Sessions", content: _jsx(AgentSessionsPanel, { agentId: record.id, agentLabel: (_m = record.name) !== null && _m !== void 0 ? _m : record.title }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "embedding", label: "Embedding", content: _jsx(AgentEmbeddingPanel, { agentId: record.id, fields: parseInputs(record.requiredInputs), active: record.status === "active", hubUrl: String((_o = getSettingsMap(settings).solidxAgentHubBackendUrl) !== null && _o !== void 0 ? _o : "") }) }] : []), true);
|
|
692
745
|
var content = _jsx(SolidTabGroup, { tabs: tabs, value: tab, onValueChange: setTab, className: "agent-editor__tabs", listClassName: "agent-editor__tab-list", panelClassName: "agent-editor__tab-panel" });
|
|
693
|
-
return _jsxs("main", { className: "agent-editor", children: [_jsxs("header", { className: "agent-editor__header", children: [_jsxs("div", { className: "agent-editor__heading-with-refresh", children: [_jsx("h1", { children: (record === null || record === void 0 ? void 0 : record.id) ? "Edit Agent" : "Create Agent" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx("button", { type: "button", className: "agent-editor__refresh".concat(isFetching ? " is-loading" : ""), "aria-label": "Refresh agent", title: "Refresh agent", disabled: isFetching || updating, onClick: requestRefresh, children: _jsx(RefreshCw, { size: 14 }) })] }), _jsxs("div", { className: "agent-editor__actions", children: [_jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () { return navigate(-1); }, children: "Back" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(FlaskConical, { size: 16 }), onClick: openAgentTest, children: "Test Agent" }), _jsx(SolidButton, { loading: creating || updating, disabled: isLoading || isFetching || isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)), onClick: function () { return void save(); }, children: "Save Agent" })] })] }), _jsx(SolidDialog, { open: confirmRefresh, onOpenChange: setConfirmRefresh, header: "Discard unsaved changes?", style: { width: "min(28rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { return setConfirmRefresh(false); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: isFetching, onClick: function () { setConfirmRefresh(false); void refetch(); }, children: "Refresh and discard" })] }), children: _jsx(SolidDialogBody, { children: _jsx("p", { children: "You have unsaved changes. Refreshing will discard them and load the latest agent content." }) }) }), isLoading ? _jsx("div", { className: "agent-editor__empty", children: "Loading agent\u2026" }) : isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)) ?
|
|
746
|
+
return _jsxs("main", { className: "agent-editor", children: [_jsxs("header", { className: "agent-editor__header", children: [_jsxs("div", { className: "agent-editor__heading-with-refresh", children: [_jsx("h1", { children: (record === null || record === void 0 ? void 0 : record.id) ? "Edit Agent" : "Create Agent" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx("button", { type: "button", className: "agent-editor__refresh".concat(isFetching ? " is-loading" : ""), "aria-label": "Refresh agent", title: "Refresh agent", disabled: isFetching || updating, onClick: requestRefresh, children: _jsx(RefreshCw, { size: 14 }) })] }), _jsxs("div", { className: "agent-editor__actions", children: [_jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(ArrowLeft, { size: 16 }), onClick: function () { return navigate(-1); }, children: "Back" }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidButton, { variant: "secondary", leftIcon: _jsx(FlaskConical, { size: 16 }), onClick: openAgentTest, children: "Test Agent" }), _jsx(SolidButton, { loading: creating || updating, disabled: creatingTag || isLoading || isFetching || isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)), onClick: function () { return void save(); }, children: "Save Agent" })] })] }), preview && _jsx(ResourcePreviewDialog, { item: preview.item, kind: preview.kind, onClose: function () { return setPreview(null); } }), _jsx(SolidDialog, { open: confirmRefresh, onOpenChange: setConfirmRefresh, header: "Discard unsaved changes?", style: { width: "min(28rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { return setConfirmRefresh(false); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: isFetching, onClick: function () { setConfirmRefresh(false); void refetch(); }, children: "Refresh and discard" })] }), children: _jsx(SolidDialogBody, { children: _jsx("p", { children: "You have unsaved changes. Refreshing will discard them and load the latest agent content." }) }) }), isLoading ? _jsx("div", { className: "agent-editor__empty", children: "Loading agent\u2026" }) : isError || (id !== "new" && !(record === null || record === void 0 ? void 0 : record.id)) ?
|
|
694
747
|
_jsx("div", { className: "agent-editor__empty", children: "This agent could not be loaded." }) : (record === null || record === void 0 ? void 0 : record.id) ?
|
|
695
748
|
_jsx(AgentRegistryAuditPanel, { modelSingularName: "agentRegistry", recordId: record.id, refreshVersion: auditVersion, modelUserKey: record.name, children: content }) : content, _jsx(SolidDialog, { open: Boolean(pendingSecret), onOpenChange: function (open) { if (!open) {
|
|
696
749
|
setPendingSecret(null);
|
|
697
750
|
setSecretEnvVarError("");
|
|
698
|
-
} }, header: "Set secret environment variable", style: { width: "min(34rem, 94vw)" }, footer: _jsxs("div", { className: "agent-editor__secret-dialog-actions", children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { setPendingSecret(null); setSecretEnvVarError(""); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", onClick: commitSecretEnvVar, children: "Use secret" })] }), children: _jsx(SolidDialogBody, { className: "agent-editor__secret-dialog-body", children: _jsxs("div", { className: "agent-editor__secret-dialog", children: [_jsxs("p", { children: ["Choose the environment variable name AgentHub will set for ", _jsx("strong", { children: (
|
|
751
|
+
} }, header: "Set secret environment variable", style: { width: "min(34rem, 94vw)" }, footer: _jsxs("div", { className: "agent-editor__secret-dialog-actions", children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: function () { setPendingSecret(null); setSecretEnvVarError(""); }, children: "Cancel" }), _jsx(SolidButton, { type: "button", onClick: commitSecretEnvVar, children: "Use secret" })] }), children: _jsx(SolidDialogBody, { className: "agent-editor__secret-dialog-body", children: _jsxs("div", { className: "agent-editor__secret-dialog", children: [_jsxs("p", { children: ["Choose the environment variable name AgentHub will set for ", _jsx("strong", { children: (_q = (_p = pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.displayName) !== null && _p !== void 0 ? _p : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.name) !== null && _q !== void 0 ? _q : pendingSecret === null || pendingSecret === void 0 ? void 0 : pendingSecret.key }), ". The default is the secret name."] }), _jsxs("label", { className: "agent-editor__field", children: [_jsx("span", { children: "Environment variable name" }), _jsx(SolidInput, { autoFocus: true, value: secretEnvVarDraft, "aria-invalid": Boolean(secretEnvVarError), onChange: function (event) { setSecretEnvVarDraft(event.target.value); setSecretEnvVarError(""); } }), secretEnvVarError && _jsx("small", { className: "agent-editor__error", children: secretEnvVarError })] })] }) }) }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(SolidDialog, { open: testAgentOpen, onOpenChange: setTestAgentOpen, onHide: function () { return setTestAgentOpen(false); }, showHeader: false, overlayClassName: "agent-editor__test-dialog-overlay", ariaLabel: "Test ".concat((_r = record.name) !== null && _r !== void 0 ? _r : "SolidX Agent"), className: "agent-editor__test-dialog", style: testAgentWindowMode === "maximized"
|
|
699
752
|
? { position: "fixed", inset: 16, width: "auto", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }
|
|
700
|
-
: { position: "fixed", top: 16, right: 16, bottom: 16, left: "auto", width: "min(28rem, calc(100vw - 32px))", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: _jsx("div", { className: "agent-editor__test-dialog-body", children: _jsx(SolidAgentEmbedded, { agentRuntime: "agentHub", agentId: record.id, title: (
|
|
753
|
+
: { position: "fixed", top: 16, right: 16, bottom: 16, left: "auto", width: "min(28rem, calc(100vw - 32px))", maxWidth: "none", height: "auto", maxHeight: "none", transform: "none", borderRadius: 14, padding: 0, display: "flex", flexDirection: "column", overflow: "hidden" }, children: _jsx("div", { className: "agent-editor__test-dialog-body", children: _jsx(SolidAgentEmbedded, { agentRuntime: "agentHub", agentId: record.id, title: (_s = record.name) !== null && _s !== void 0 ? _s : "SolidX Agent", requiredInputs: parseInputs(record.requiredInputs), height: "100%", className: "agent-editor__test-chat", windowControls: { mode: testAgentWindowMode, onDock: function () { return setTestAgentWindowMode("docked"); }, onMaximize: function () { return setTestAgentWindowMode("maximized"); }, onRestore: function () { return setTestAgentWindowMode("docked"); }, onClose: function () { return setTestAgentOpen(false); } } }) }) })] });
|
|
701
754
|
}
|
|
702
755
|
//# sourceMappingURL=AgentRegistryEditorPage.js.map
|