@solidxai/core-ui 0.1.20 → 0.1.21-beta.2
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/FileReaderExt.d.ts.map +1 -1
- package/dist/components/common/FileReaderExt.js +22 -11
- package/dist/components/common/FileReaderExt.js.map +1 -1
- package/dist/components/common/FileReaderExt.tsx +27 -14
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
- package/dist/components/common/SocialMediaLogin.js +1 -1
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.tsx +50 -19
- package/dist/components/common/SolidPopupContainer.js +1 -1
- package/dist/components/common/SolidPopupContainer.js.map +1 -1
- package/dist/components/common/SolidPopupContainer.tsx +1 -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 +46 -19
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +69 -14
- package/dist/components/common/solid-export.css +75 -0
- package/dist/components/core/card/CardItem.d.ts.map +1 -1
- package/dist/components/core/card/CardItem.js +13 -2
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +13 -2
- package/dist/components/core/card/SolidCardView.js +2 -2
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +2 -2
- package/dist/components/core/chatter/SolidChatterAuditMessage.css +68 -0
- package/dist/components/core/chatter/SolidChatterAuditMessage.d.ts +1 -0
- package/dist/components/core/chatter/SolidChatterAuditMessage.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.js +20 -2
- package/dist/components/core/chatter/SolidChatterAuditMessage.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterAuditMessage.tsx +49 -12
- package/dist/components/core/common/SolidGenericImport/SolidImport.module.css +71 -0
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.js +83 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.module.css +45 -1
- package/dist/components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget.tsx +106 -2
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.js +163 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.module.css +86 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.tsx +129 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts +23 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js +270 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.module.css +167 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.tsx +270 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js +67 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.module.css +68 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.tsx +107 -0
- package/dist/components/core/form/SolidFormFieldRender.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormFieldRender.js +2 -1
- package/dist/components/core/form/SolidFormFieldRender.js.map +1 -1
- package/dist/components/core/form/SolidFormFieldRender.tsx +6 -3
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +29 -4
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +27 -5
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.tsx +15 -3
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +1 -1
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.tsx +5 -4
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +3 -5
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.tsx +7 -8
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +2 -1
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.tsx +6 -1
- package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.js +2 -1
- package/dist/components/core/form/fields/SolidEmailField.js.map +1 -1
- package/dist/components/core/form/fields/SolidEmailField.tsx +6 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +3 -3
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.tsx +11 -5
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.tsx +5 -3
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.tsx +10 -4
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +4 -4
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +8 -6
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +3 -3
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +7 -5
- package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.js +4 -3
- package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
- package/dist/components/core/form/fields/SolidPasswordField.tsx +21 -4
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +2 -1
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.tsx +5 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +2 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +6 -3
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +6 -5
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +26 -7
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +3 -2
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.tsx +11 -2
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.tsx +5 -3
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +13 -2
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +13 -2
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +18 -11
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +10 -6
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +49 -38
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +20 -21
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +2 -2
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +4 -4
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +3 -3
- package/dist/components/core/solid-agent/AgentContextPill.d.ts +9 -0
- package/dist/components/core/solid-agent/AgentContextPill.d.ts.map +1 -0
- package/dist/components/core/solid-agent/AgentContextPill.js +92 -0
- package/dist/components/core/solid-agent/AgentContextPill.js.map +1 -0
- package/dist/components/core/solid-agent/AgentContextPill.tsx +175 -0
- package/dist/components/core/solid-agent/AgentModelIndicator.d.ts +29 -3
- package/dist/components/core/solid-agent/AgentModelIndicator.d.ts.map +1 -1
- package/dist/components/core/solid-agent/AgentModelIndicator.js +279 -4
- package/dist/components/core/solid-agent/AgentModelIndicator.js.map +1 -1
- package/dist/components/core/solid-agent/AgentModelIndicator.tsx +546 -18
- package/dist/components/core/solid-agent/SolidAgent.module.css +1271 -128
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts +6 -1
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +693 -68
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +832 -62
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts +4 -0
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js +19 -13
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.tsx +40 -12
- package/dist/components/core/solid-agent/SolidAgentHost.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.js +84 -1
- package/dist/components/core/solid-agent/SolidAgentHost.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.tsx +75 -2
- package/dist/components/core/solid-agent/agentEvents.d.ts +4 -1
- package/dist/components/core/solid-agent/agentEvents.d.ts.map +1 -1
- package/dist/components/core/solid-agent/agentEvents.js +108 -27
- package/dist/components/core/solid-agent/agentEvents.js.map +1 -1
- package/dist/components/core/solid-agent/agentEvents.ts +105 -14
- package/dist/components/core/solid-agent/agentFormat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/agentFormat.js +80 -9
- package/dist/components/core/solid-agent/agentFormat.js.map +1 -1
- package/dist/components/core/solid-agent/agentFormat.ts +85 -8
- package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts +88 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.d.ts.map +1 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.js +26 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.js.map +1 -0
- package/dist/components/core/solid-agent/client/agentPublicEvents.ts +66 -0
- package/dist/components/core/solid-agent/client/agentRest.d.ts +23 -2
- package/dist/components/core/solid-agent/client/agentRest.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRest.js +223 -1
- package/dist/components/core/solid-agent/client/agentRest.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRest.ts +173 -5
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts +38 -5
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +400 -59
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +322 -32
- package/dist/components/core/solid-agent/client/agentSocket.d.ts +28 -6
- package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.js +206 -39
- package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.ts +153 -24
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts +9 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.d.ts.map +1 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.js +53 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.js.map +1 -0
- package/dist/components/core/solid-agent/client/beforeUserMessageSend.ts +26 -0
- package/dist/components/core/solid-agent/composer/AgentComposer.d.ts +3 -1
- package/dist/components/core/solid-agent/composer/AgentComposer.d.ts.map +1 -1
- package/dist/components/core/solid-agent/composer/AgentComposer.js +37 -21
- package/dist/components/core/solid-agent/composer/AgentComposer.js.map +1 -1
- package/dist/components/core/solid-agent/composer/AgentComposer.tsx +113 -71
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js +4 -3
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.js.map +1 -1
- package/dist/components/core/solid-agent/embed/AgentEmbeddingPanel.tsx +4 -2
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts +29 -0
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js +45 -2
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedProtocol.ts +49 -2
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts +1 -0
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.d.ts.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js +2 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.js.map +1 -1
- package/dist/components/core/solid-agent/embed/agentEmbedSamples.ts +15 -1
- package/dist/components/core/solid-agent/sdk/solidAgent.d.ts +4 -1
- package/dist/components/core/solid-agent/sdk/solidAgent.d.ts.map +1 -1
- package/dist/components/core/solid-agent/sdk/solidAgent.js.map +1 -1
- package/dist/components/core/solid-agent/sdk/solidAgent.ts +2 -2
- package/dist/components/core/solid-agent/thread/AgentThread.d.ts +2 -1
- package/dist/components/core/solid-agent/thread/AgentThread.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/AgentThread.js +46 -36
- package/dist/components/core/solid-agent/thread/AgentThread.js.map +1 -1
- package/dist/components/core/solid-agent/thread/AgentThread.tsx +65 -62
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts +2 -2
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js +9 -3
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.tsx +12 -3
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts +15 -0
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.js +170 -19
- package/dist/components/core/solid-agent/thread/inlineWidget.js.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.ts +164 -15
- package/dist/components/core/solid-agent/types.d.ts +86 -4
- package/dist/components/core/solid-agent/types.d.ts.map +1 -1
- package/dist/components/core/solid-agent/types.js +2 -0
- package/dist/components/core/solid-agent/types.js.map +1 -1
- package/dist/components/core/solid-agent/types.ts +76 -4
- package/dist/components/core/solid-agent/useAgentAvailability.d.ts +3 -1
- package/dist/components/core/solid-agent/useAgentAvailability.d.ts.map +1 -1
- package/dist/components/core/solid-agent/useAgentAvailability.js +16 -7
- package/dist/components/core/solid-agent/useAgentAvailability.js.map +1 -1
- package/dist/components/core/solid-agent/useAgentAvailability.ts +13 -6
- package/dist/components/core/solid-agent/useAgentChat.d.ts +1 -1
- package/dist/components/core/solid-agent/useAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/useAgentChat.js +7 -4
- package/dist/components/core/solid-agent/useAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/useAgentChat.ts +9 -5
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.d.ts +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js +7 -38
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultToolCallChatWidget.tsx +8 -51
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js +12 -4
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/DefaultUserMessageChatWidget.tsx +18 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts +4 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.d.ts.map +1 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js +30 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.js.map +1 -0
- package/dist/components/core/solid-agent/widgets/SolidNavigationIntentChatWidget.tsx +41 -0
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js +2 -1
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidProgressChatWidget.tsx +2 -2
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js +3 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidStatusChatWidget.tsx +3 -2
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.d.ts +1 -1
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js +77 -10
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidTableChatWidget.tsx +96 -18
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js +1 -2
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.js.map +1 -1
- package/dist/components/core/solid-agent/widgets/SolidToolActivityChatWidget.tsx +1 -3
- package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +101 -76
- package/dist/components/core/solid-ai/SolidAiChat.d.ts.map +1 -1
- package/dist/components/core/solid-ai/SolidAiChat.js +2 -2
- package/dist/components/core/solid-ai/SolidAiChat.js.map +1 -1
- package/dist/components/core/solid-ai/SolidAiChat.tsx +12 -10
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +42 -44
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +2 -20
- package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
- package/dist/components/layout/AdminTopHeader.js +20 -4
- package/dist/components/layout/AdminTopHeader.js.map +1 -1
- package/dist/components/layout/AdminTopHeader.tsx +19 -4
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +12 -8
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.tsx +26 -7
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.js +3 -2
- package/dist/components/shad-cn-ui/SolidCodeEditor.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.tsx +3 -0
- package/dist/helpers/adminViewRefresh.d.ts +13 -0
- package/dist/helpers/adminViewRefresh.d.ts.map +1 -0
- package/dist/helpers/adminViewRefresh.js +14 -0
- package/dist/helpers/adminViewRefresh.js.map +1 -0
- package/dist/helpers/adminViewRefresh.ts +26 -0
- package/dist/helpers/eventBus.d.ts +1 -0
- package/dist/helpers/eventBus.d.ts.map +1 -1
- package/dist/helpers/eventBus.js +1 -0
- package/dist/helpers/eventBus.js.map +1 -1
- package/dist/helpers/eventBus.ts +1 -0
- package/dist/helpers/fileTypeIcon.d.ts.map +1 -1
- package/dist/helpers/fileTypeIcon.js +4 -1
- package/dist/helpers/fileTypeIcon.js.map +1 -1
- package/dist/helpers/fileTypeIcon.tsx +15 -0
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +8 -0
- package/dist/helpers/routePaths.d.ts +16 -0
- package/dist/helpers/routePaths.d.ts.map +1 -1
- package/dist/helpers/routePaths.js +71 -0
- package/dist/helpers/routePaths.js.map +1 -1
- package/dist/helpers/routePaths.ts +75 -0
- package/dist/redux/api/solidEntityApi.d.ts +1 -1
- package/dist/redux/api/solidEntityApi.js +5 -2
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/api/solidEntityApi.tsx +5 -2
- package/dist/redux/features/agentSlice.d.ts +3 -1
- package/dist/redux/features/agentSlice.d.ts.map +1 -1
- package/dist/redux/features/agentSlice.js +7 -3
- package/dist/redux/features/agentSlice.js.map +1 -1
- package/dist/redux/features/agentSlice.ts +17 -5
- package/dist/redux/store/StoreProvider.d.ts.map +1 -1
- package/dist/redux/store/StoreProvider.js +46 -5
- package/dist/redux/store/StoreProvider.js.map +1 -1
- package/dist/redux/store/StoreProvider.tsx +48 -5
- package/dist/redux/store/createSolidStore.d.ts +3 -1
- package/dist/redux/store/createSolidStore.d.ts.map +1 -1
- package/dist/redux/store/createSolidStore.js +2 -1
- package/dist/redux/store/createSolidStore.js.map +1 -1
- package/dist/redux/store/createSolidStore.ts +2 -1
- package/dist/resources/globals.css +31 -4
- package/dist/resources/solid-custom.css +136 -0
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.css +124 -0
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js +144 -0
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentConfigComparisonPage.tsx +164 -0
- package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.d.ts +6 -0
- package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.js +52 -0
- package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentConfigVersionsPanel.tsx +53 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.css +15 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts +22 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.js +42 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.js.map +1 -0
- package/dist/routes/pages/admin/core/AgentHubModuleField.tsx +54 -0
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts +3 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.js +3 -3
- package/dist/routes/pages/admin/core/AgentHubTagsField.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentHubTagsField.tsx +7 -3
- package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.js +6 -2
- package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryAuditPanel.tsx +5 -3
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +23 -2
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +284 -135
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +179 -27
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js +22 -15
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx +17 -7
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js +21 -15
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx +16 -9
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js +149 -37
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx +283 -73
- package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.js +9 -1
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +9 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.css +361 -37
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +2 -0
- package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +9 -1
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +9 -1
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +10 -1
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +10 -1
- package/dist/routes/pages/admin/core/TreePage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/TreePage.js +9 -1
- package/dist/routes/pages/admin/core/TreePage.js.map +1 -1
- package/dist/routes/pages/admin/core/TreePage.tsx +9 -1
- package/dist/routes/pages/admin/core/agentConfigComparison.d.ts +84 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.js +75 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.js.map +1 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.ts +40 -0
- package/dist/routes/pages/embed/AgentEmbedPage.d.ts.map +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.js +67 -4
- package/dist/routes/pages/embed/AgentEmbedPage.js.map +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.tsx +61 -4
- 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/package.json +1 -1
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ArrowLeft, Ellipsis, ExternalLink, Eye, FlaskConical, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
|
|
2
|
+
import { ArrowLeft, Ellipsis, ExternalLink, Eye, FlaskConical, GitBranch, Pencil, Plus, RefreshCw, Trash2 } from "lucide-react";
|
|
3
3
|
import { useDispatch } from "react-redux";
|
|
4
|
-
import { useNavigate, useParams } from "react-router-dom";
|
|
4
|
+
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
|
|
5
5
|
import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
|
|
6
|
+
import { solidPost } from "../../../../http/solidHttp";
|
|
6
7
|
import { useGetSolidSettingsQuery } from "../../../../redux/api/solidSettingsApi";
|
|
7
8
|
import { getSettingsMap } from "../../../../helpers/settingsPayload";
|
|
8
9
|
import { showToast } from "../../../../redux/features/toastSlice";
|
|
9
10
|
import { AgentRegistryAuditPanel } from "./AgentRegistryAuditPanel";
|
|
10
11
|
import { AgentPersonaHistory } from "./AgentPersonaHistory";
|
|
12
|
+
import { AgentConfigVersionsPanel } from "./AgentConfigVersionsPanel";
|
|
11
13
|
import { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload, type AgentHubTag } from "./AgentHubTagsField";
|
|
14
|
+
import { AgentHubModuleField, agentHubModuleFrom, agentHubModulePayload, type AgentHubModule } from "./AgentHubModuleField";
|
|
12
15
|
import { AgentResourceCardWidget } from "../../../../components/core/extension/solid-core/agentRegistry/card/AgentResourceCardWidget";
|
|
13
16
|
import { AgentSessionsPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel";
|
|
14
17
|
import { AgentProcessesPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentProcessesPanel";
|
|
15
18
|
import type { SolidKanbanCardWidgetProps } from "../../../../types/solid-core";
|
|
16
19
|
import { SolidWorkflowStatusPill } from "../../../../components/core/form/SolidDraftPublishWorkflow";
|
|
17
20
|
import { getModelsDevModels, useModelsDevCatalog } from "../../../../hooks/useModelsDevModels";
|
|
21
|
+
import { isOtherProvider } from "../../../../components/common/SolidSettings/LlmSettings/AiModelConfigTab";
|
|
18
22
|
import { SolidAutocomplete, SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidDropdownMenu, SolidDropdownMenuContent, SolidDropdownMenuItem, SolidDropdownMenuTrigger, SolidIconPicker, SolidInput, SolidTabGroup } from "../../../../components/shad-cn-ui";
|
|
19
23
|
import { SolidAgentEmbedded } from "../../../../components/core/solid-agent/SolidAgentEmbedded";
|
|
20
24
|
import { SolidAgentMarkdown } from "../../../../components/core/solid-agent/SolidAgentMarkdown";
|
|
@@ -77,6 +81,9 @@ function buildModelOptions(
|
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
const OTHER_MODEL = "__other_model__";
|
|
84
|
+
const ACTIVATION_WAIT_MS = 10_000;
|
|
85
|
+
const activationWaitKey = (agentId: number | string) => `agent-activation-wait:${agentId}`;
|
|
86
|
+
const savedActivationReadyAt = (agentId: number | string) => Number(sessionStorage.getItem(activationWaitKey(agentId))) || null;
|
|
80
87
|
|
|
81
88
|
function SearchableSelect({ value, options, placeholder, disabled, onChange }: {
|
|
82
89
|
value: string;
|
|
@@ -128,6 +135,8 @@ function ModelPicker({ value, options, providers, providerConfig, onChange }: {
|
|
|
128
135
|
<small><em>Region: {providerConfig[provider].region}</em></small>}
|
|
129
136
|
</div>
|
|
130
137
|
<div className="agent-editor__field"><span>Model *</span>
|
|
138
|
+
{isOtherProvider(provider) ? <SolidInput className="w-full" aria-label="Model ID" placeholder="Enter model ID" value={model}
|
|
139
|
+
onChange={(event) => onChange(`${provider}:${event.target.value}`)} /> : <>
|
|
131
140
|
<SearchableSelect value={showOther ? OTHER_MODEL : model}
|
|
132
141
|
options={[...availableModels.map((option) => ({ label: option.model, value: option.model })), { label: "Other", value: OTHER_MODEL }]}
|
|
133
142
|
placeholder="Select model" disabled={!provider}
|
|
@@ -137,6 +146,7 @@ function ModelPicker({ value, options, providers, providerConfig, onChange }: {
|
|
|
137
146
|
}} />
|
|
138
147
|
{showOther && <SolidInput className="w-full" aria-label="Custom model ID" placeholder="Enter model ID" value={model}
|
|
139
148
|
onChange={(event) => onChange(`${provider}:${event.target.value}`)} />}
|
|
149
|
+
</>}
|
|
140
150
|
</div>
|
|
141
151
|
</div>;
|
|
142
152
|
}
|
|
@@ -165,7 +175,7 @@ const detailFields = [
|
|
|
165
175
|
];
|
|
166
176
|
|
|
167
177
|
const detailQuery = [
|
|
168
|
-
"agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret", "tags",
|
|
178
|
+
"agentRoles", "agentRoles.roleMetadata", "agentSecrets", "agentSecrets.secret", "tags", "module",
|
|
169
179
|
].map((name, index) => `populate[${index}]=${name}`).join("&") + "&" + fieldsQuery(detailFields);
|
|
170
180
|
|
|
171
181
|
// Group by link ID to project summary columns without populating full registry records.
|
|
@@ -205,7 +215,7 @@ function agentFormFromRecord(record: Agent) {
|
|
|
205
215
|
name: record.name ?? "", title: record.title ?? "", description: record.description ?? "", iconName: record.iconName ?? "",
|
|
206
216
|
inputs: parseInputs(record.requiredInputs), reasoningModelKey: record.reasoningModelKey ?? "", fastModelKey: record.fastModelKey ?? "",
|
|
207
217
|
systemPrompt: record.systemPrompt ?? "", stepLimit: record.stepLimit ?? 100, turnStepLimit: record.turnStepLimit ?? 20,
|
|
208
|
-
costLimit: Number(record.costLimit ?? 3), tags: agentHubTagsFrom(record.tags), skillIds: skills.map((link) => link.agentSkillRegistry?.id).filter(Boolean),
|
|
218
|
+
costLimit: Number(record.costLimit ?? 3), tags: agentHubTagsFrom(record.tags), moduleId: agentHubModuleFrom(record.module)?.id ?? null, skillIds: skills.map((link) => link.agentSkillRegistry?.id).filter(Boolean),
|
|
209
219
|
toolIds: tools.map((link) => link.agentToolRegistry?.id).filter(Boolean),
|
|
210
220
|
roleIds: items(record.agentRoles).map((link) => link.roleMetadata?.id).filter(Boolean),
|
|
211
221
|
secretIds: secrets.map((link) => link.secret?.id).filter(Boolean),
|
|
@@ -332,6 +342,7 @@ function LinkPicker({ label, description, options, selected, onAdd, onRemove, cr
|
|
|
332
342
|
|
|
333
343
|
export function AgentRegistryEditorPage() {
|
|
334
344
|
const { id = "new" } = useParams<{ id: string }>();
|
|
345
|
+
const [searchParams] = useSearchParams();
|
|
335
346
|
const navigate = useNavigate();
|
|
336
347
|
const dispatch = useDispatch();
|
|
337
348
|
const agentResult = entityApi.useGetSolidEntityByIdQuery({ id, qs: detailQuery }, { skip: id === "new" });
|
|
@@ -369,7 +380,7 @@ export function AgentRegistryEditorPage() {
|
|
|
369
380
|
const [deleteSecretLink] = agentSecretApi.useDeleteSolidEntityMutation();
|
|
370
381
|
const [updateSecretLink] = agentSecretApi.useUpdateSolidEntityMutation();
|
|
371
382
|
const record = recordFrom(response) as Agent | undefined;
|
|
372
|
-
const [tab, setTab] = React.useState("basics");
|
|
383
|
+
const [tab, setTab] = React.useState(searchParams.get("tab") === "config-versions" ? "config-versions" : "basics");
|
|
373
384
|
const jobs = jobApi.useGetSolidEntitiesQuery(
|
|
374
385
|
`offset=0&limit=1000&filters[agent][id][$eq]=${encodeURIComponent(id)}&${fieldsQuery(["id", "status"])}`,
|
|
375
386
|
{ skip: id === "new" || tab !== "jobs" });
|
|
@@ -377,9 +388,37 @@ export function AgentRegistryEditorPage() {
|
|
|
377
388
|
void agentResult.refetch(); void skillLinks.refetch(); void toolLinks.refetch();
|
|
378
389
|
if (tab === "jobs") void jobs.refetch();
|
|
379
390
|
};
|
|
380
|
-
|
|
391
|
+
|
|
392
|
+
const TEST_AGENT_PREFS_KEY = "solid-agent.test-dialog";
|
|
393
|
+
const readTestAgentPrefs = (agentId?: string | number): { open: boolean; mode: "docked" | "maximized" } => {
|
|
394
|
+
try {
|
|
395
|
+
const raw = localStorage.getItem(`${TEST_AGENT_PREFS_KEY}.${agentId ?? "global"}`);
|
|
396
|
+
if (raw) {
|
|
397
|
+
const parsed = JSON.parse(raw);
|
|
398
|
+
return {
|
|
399
|
+
open: parsed.open === true,
|
|
400
|
+
mode: parsed.mode === "maximized" ? "maximized" : "docked",
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
} catch {
|
|
404
|
+
// ignore
|
|
405
|
+
}
|
|
406
|
+
return { open: false, mode: "docked" };
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const writeTestAgentPrefs = (agentId: string | number | undefined, prefs: Partial<{ open: boolean; mode: "docked" | "maximized" }>) => {
|
|
410
|
+
try {
|
|
411
|
+
const key = `${TEST_AGENT_PREFS_KEY}.${agentId ?? "global"}`;
|
|
412
|
+
const current = readTestAgentPrefs(agentId);
|
|
413
|
+
localStorage.setItem(key, JSON.stringify({ ...current, ...prefs }));
|
|
414
|
+
} catch {
|
|
415
|
+
// ignore
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
const [testAgentOpen, setTestAgentOpen] = React.useState(() => readTestAgentPrefs(id).open);
|
|
381
420
|
const [preview, setPreview] = React.useState<{ item: Item; kind: "skill" | "tool" } | null>(null);
|
|
382
|
-
const [testAgentWindowMode, setTestAgentWindowMode] = React.useState<"docked" | "maximized">(
|
|
421
|
+
const [testAgentWindowMode, setTestAgentWindowMode] = React.useState<"docked" | "maximized">(() => readTestAgentPrefs(id).mode);
|
|
383
422
|
const [name, setName] = React.useState("");
|
|
384
423
|
const [title, setTitle] = React.useState("");
|
|
385
424
|
const [description, setDescription] = React.useState("");
|
|
@@ -392,6 +431,7 @@ export function AgentRegistryEditorPage() {
|
|
|
392
431
|
const [turnStepLimit, setTurnStepLimit] = React.useState(20);
|
|
393
432
|
const [costLimit, setCostLimit] = React.useState(3);
|
|
394
433
|
const [tags, setTags] = React.useState<AgentHubTag[]>([]);
|
|
434
|
+
const [module, setModule] = React.useState<AgentHubModule | null>(null);
|
|
395
435
|
const [creatingTag, setCreatingTag] = React.useState(false);
|
|
396
436
|
const [skillIds, setSkillIds] = React.useState<number[]>([]);
|
|
397
437
|
const [toolIds, setToolIds] = React.useState<number[]>([]);
|
|
@@ -406,10 +446,42 @@ export function AgentRegistryEditorPage() {
|
|
|
406
446
|
const [errors, setErrors] = React.useState<Record<string, string>>({});
|
|
407
447
|
const [auditVersion, setAuditVersion] = React.useState(0);
|
|
408
448
|
const [confirmRefresh, setConfirmRefresh] = React.useState(false);
|
|
449
|
+
const [activateDialogOpen, setActivateDialogOpen] = React.useState(false);
|
|
450
|
+
const [includeVersionDetails, setIncludeVersionDetails] = React.useState(false);
|
|
451
|
+
const [versionName, setVersionName] = React.useState("");
|
|
452
|
+
const [versionDescription, setVersionDescription] = React.useState("");
|
|
453
|
+
const [activating, setActivating] = React.useState(false);
|
|
454
|
+
const [activationReadyAt, setActivationReadyAt] = React.useState<number | null>(() => id === "new" ? null : savedActivationReadyAt(id));
|
|
455
|
+
const [countdownNow, setCountdownNow] = React.useState(Date.now());
|
|
409
456
|
const baseline = React.useRef("");
|
|
410
457
|
|
|
458
|
+
React.useEffect(() => {
|
|
459
|
+
if (id === "new") {
|
|
460
|
+
setActivationReadyAt(null);
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
const readyAt = savedActivationReadyAt(id);
|
|
464
|
+
setActivationReadyAt(readyAt !== null && readyAt > Date.now() ? readyAt : null);
|
|
465
|
+
if (readyAt !== null && readyAt <= Date.now()) sessionStorage.removeItem(activationWaitKey(id));
|
|
466
|
+
}, [id]);
|
|
467
|
+
|
|
468
|
+
React.useEffect(() => {
|
|
469
|
+
if (!activationReadyAt) return;
|
|
470
|
+
const tick = () => {
|
|
471
|
+
const now = Date.now();
|
|
472
|
+
setCountdownNow(now);
|
|
473
|
+
if (now >= activationReadyAt) {
|
|
474
|
+
sessionStorage.removeItem(activationWaitKey(id));
|
|
475
|
+
setActivationReadyAt(null);
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
tick();
|
|
479
|
+
const timer = window.setInterval(tick, 100);
|
|
480
|
+
return () => window.clearInterval(timer);
|
|
481
|
+
}, [activationReadyAt, id]);
|
|
482
|
+
|
|
411
483
|
const currentForm = () => JSON.stringify({ name, title, description, iconName, inputs, reasoningModelKey, fastModelKey, systemPrompt,
|
|
412
|
-
stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags, skillIds, toolIds, roleIds, secretIds,
|
|
484
|
+
stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags, moduleId: module?.id ?? null, skillIds, toolIds, roleIds, secretIds,
|
|
413
485
|
alwaysIncludeValues, requiresApprovalValues, secretEnvVarNames });
|
|
414
486
|
|
|
415
487
|
React.useEffect(() => {
|
|
@@ -421,6 +493,7 @@ export function AgentRegistryEditorPage() {
|
|
|
421
493
|
setSystemPrompt(record.systemPrompt ?? ""); setStepLimit(record.stepLimit ?? 100);
|
|
422
494
|
setTurnStepLimit(record.turnStepLimit ?? 20); setCostLimit(Number(record.costLimit ?? 3));
|
|
423
495
|
setTags(agentHubTagsFrom(record.tags));
|
|
496
|
+
setModule(agentHubModuleFrom(record.module));
|
|
424
497
|
setSkillIds(items(record.agentSkills).map((link) => link.agentSkillRegistry?.id).filter(Boolean));
|
|
425
498
|
setToolIds(items(record.agentTools).map((link) => link.agentToolRegistry?.id).filter(Boolean));
|
|
426
499
|
setRoleIds(items(record.agentRoles).map((link) => link.roleMetadata?.id).filter(Boolean));
|
|
@@ -430,11 +503,21 @@ export function AgentRegistryEditorPage() {
|
|
|
430
503
|
setSecretEnvVarNames(Object.fromEntries(items(record.agentSecrets).map((link) => [link.secret?.id, link.envVarName ?? link.secret?.key ?? link.secret?.name ?? ""]).filter(([key]) => key)));
|
|
431
504
|
}, [record?.id, response]);
|
|
432
505
|
|
|
506
|
+
React.useEffect(() => {
|
|
507
|
+
if (!record?.id) return;
|
|
508
|
+
const prefs = readTestAgentPrefs(record.id);
|
|
509
|
+
if (prefs.open) {
|
|
510
|
+
setTestAgentOpen(true);
|
|
511
|
+
if (prefs.mode) setTestAgentWindowMode(prefs.mode);
|
|
512
|
+
}
|
|
513
|
+
}, [record?.id]);
|
|
514
|
+
|
|
433
515
|
const isDirty = Boolean(record?.id) && currentForm() !== baseline.current;
|
|
434
516
|
const requestRefresh = () => isDirty ? setConfirmRefresh(true) : void refetch();
|
|
435
517
|
const openAgentTest = () => {
|
|
436
|
-
setTestAgentWindowMode("
|
|
518
|
+
setTestAgentWindowMode("docked");
|
|
437
519
|
setTestAgentOpen(true);
|
|
520
|
+
writeTestAgentPrefs(record?.id ?? id, { open: true, mode: "docked" });
|
|
438
521
|
};
|
|
439
522
|
|
|
440
523
|
React.useEffect(() => {
|
|
@@ -482,16 +565,18 @@ export function AgentRegistryEditorPage() {
|
|
|
482
565
|
}
|
|
483
566
|
const existing = links.find((link) => (link as any)[field]?.id === targetId);
|
|
484
567
|
if (existing && Object.entries(values).some(([key, value]) => (existing as any)[key] !== value)) {
|
|
485
|
-
await update({ id: existing.id, data: values }).unwrap();
|
|
568
|
+
await update({ id: existing.id, data: { agentRegistryId: agentId, [`${field}Id`]: targetId, ...values } }).unwrap();
|
|
486
569
|
}
|
|
487
570
|
}
|
|
488
571
|
};
|
|
489
572
|
|
|
490
|
-
const save = async (nextStatus?: "draft" | "active" | "disabled") => {
|
|
491
|
-
if (
|
|
573
|
+
const save = async (nextStatus?: "draft" | "active" | "disabled", versionDetails: { name?: string; description?: string } = {}): Promise<boolean> => {
|
|
574
|
+
if (nextStatus === "active" && activationReadyAt && Date.now() < activationReadyAt) return false;
|
|
575
|
+
if (creatingTag) return false;
|
|
492
576
|
const next: Record<string, string> = {};
|
|
493
577
|
if (!name.trim()) next.name = "Name is required.";
|
|
494
578
|
if (!title.trim()) next.title = "Title is required.";
|
|
579
|
+
if (!module) next.module = "Module is required. Select a module before saving this agent.";
|
|
495
580
|
if (!systemPrompt.trim()) next.systemPrompt = "Persona instructions are required.";
|
|
496
581
|
if (!isValidModelKey(reasoningModelKey)) next.reasoningModelKey = "Choose an enabled reasoning provider and model.";
|
|
497
582
|
if (!isValidModelKey(fastModelKey)) next.fastModelKey = "Choose an enabled fast provider and model.";
|
|
@@ -502,7 +587,7 @@ export function AgentRegistryEditorPage() {
|
|
|
502
587
|
if (Object.keys(next).length) {
|
|
503
588
|
setTab(next.systemPrompt ? "persona" : next.limits ? "policies" : "basics");
|
|
504
589
|
dispatch(showToast({ severity: "error", summary: "Missing information", detail: Object.values(next).join(" ") }));
|
|
505
|
-
return;
|
|
590
|
+
return false;
|
|
506
591
|
}
|
|
507
592
|
let normalizedInputs: Input[];
|
|
508
593
|
try {
|
|
@@ -512,7 +597,7 @@ export function AgentRegistryEditorPage() {
|
|
|
512
597
|
next.inputs = error instanceof Error ? error.message : "Check the default input values.";
|
|
513
598
|
setErrors(next);
|
|
514
599
|
setTab("basics");
|
|
515
|
-
return;
|
|
600
|
+
return false;
|
|
516
601
|
}
|
|
517
602
|
const payload = {
|
|
518
603
|
name: name.trim(), title: title.trim(), description: description.trim(), iconName,
|
|
@@ -520,10 +605,12 @@ export function AgentRegistryEditorPage() {
|
|
|
520
605
|
reasoningModelKey, fastModelKey, systemPrompt, stepLimit: Number(stepLimit),
|
|
521
606
|
turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit),
|
|
522
607
|
...agentHubTagsPayload(tags),
|
|
523
|
-
|
|
608
|
+
...agentHubModulePayload(module),
|
|
609
|
+
status: nextStatus === "active" ? record?.status ?? "draft" : nextStatus ?? "draft",
|
|
524
610
|
};
|
|
525
611
|
let newlyCreatedId: number | undefined;
|
|
526
612
|
let scalarSaved = false;
|
|
613
|
+
let activationAttempted = false;
|
|
527
614
|
try {
|
|
528
615
|
const result = record?.id ? await updateAgent({ id: record.id, data: payload }).unwrap() : await createAgent(payload).unwrap();
|
|
529
616
|
scalarSaved = true;
|
|
@@ -537,14 +624,29 @@ export function AgentRegistryEditorPage() {
|
|
|
537
624
|
await syncLinks(savedId, record?.agentRoles, roleIds, "roleMetadata", createRoleLink, deleteRoleLink, undefined);
|
|
538
625
|
await syncLinks(savedId, record?.agentSecrets, secretIds, "secret", createSecretLink, deleteSecretLink, updateSecretLink,
|
|
539
626
|
(targetId) => ({ envVarName: secretEnvVarNames[targetId] ?? "" }));
|
|
540
|
-
|
|
627
|
+
if (nextStatus === "active") {
|
|
628
|
+
activationAttempted = true;
|
|
629
|
+
await solidPost(`/agent-registry/${savedId}/activate`, versionDetails);
|
|
630
|
+
}
|
|
631
|
+
if (!nextStatus || nextStatus === "draft") {
|
|
632
|
+
const readyAt = Date.now() + ACTIVATION_WAIT_MS;
|
|
633
|
+
sessionStorage.setItem(activationWaitKey(savedId), String(readyAt));
|
|
634
|
+
setCountdownNow(Date.now());
|
|
635
|
+
setActivationReadyAt(readyAt);
|
|
636
|
+
} else {
|
|
637
|
+
sessionStorage.removeItem(activationWaitKey(savedId));
|
|
638
|
+
setActivationReadyAt(null);
|
|
639
|
+
}
|
|
640
|
+
dispatch(showToast({ severity: "success", summary: nextStatus === "active" ? "Agent activated" : nextStatus ? "Agent status updated" : "Saved", detail: nextStatus === "active" ? "A new config version was created and the agent was activated." : nextStatus ? `Agent moved to ${nextStatus}.` : "Agent and its associations saved." }));
|
|
541
641
|
setAuditVersion((version) => version + 1);
|
|
542
642
|
if (record?.id) refetch();
|
|
543
643
|
else navigate(`/admin/core/solid-core/agent-registry/editor/${savedId}`, { replace: true });
|
|
644
|
+
return true;
|
|
544
645
|
} catch (error) {
|
|
545
|
-
dispatch(showToast({ severity: "error", summary: scalarSaved ? "Agent saved; links incomplete" : "Save failed", detail: apiError(error) }));
|
|
646
|
+
dispatch(showToast({ severity: "error", summary: activationAttempted ? "Agent saved; activation failed" : scalarSaved ? "Agent saved; links incomplete" : "Save failed", detail: apiError(error) }));
|
|
546
647
|
if (record?.id) refetch();
|
|
547
648
|
else if (newlyCreatedId) navigate(`/admin/core/solid-core/agent-registry/editor/${newlyCreatedId}`, { replace: true });
|
|
649
|
+
return false;
|
|
548
650
|
}
|
|
549
651
|
};
|
|
550
652
|
|
|
@@ -589,12 +691,16 @@ export function AgentRegistryEditorPage() {
|
|
|
589
691
|
const linkSetting = (label: string, checked: boolean, onChange: (checked: boolean) => void, hint: string) =>
|
|
590
692
|
<label className="agent-editor__link-setting"><input type="checkbox" checked={checked} onChange={(event) => onChange(event.target.checked)} /><span><strong>{label}</strong><small>{hint}</small></span></label>;
|
|
591
693
|
const agentStatus = record?.status ?? "draft";
|
|
694
|
+
const activationRemainingMs = Math.max(0, (activationReadyAt ?? 0) - countdownNow);
|
|
695
|
+
const activationRemainingSeconds = Math.ceil(activationRemainingMs / 1000);
|
|
696
|
+
const activationWaiting = agentStatus === "draft" && activationRemainingSeconds > 0;
|
|
592
697
|
const tabs = [
|
|
593
698
|
{ value: "basics", label: "Basics", content: <div className="agent-editor__stack">
|
|
594
699
|
<div className="agent-editor__grid">{field("Name", name, setName, "name", true)}{field("Title", title, setTitle, "title", true)}
|
|
595
700
|
{field("Description", description, setDescription, "description")}<div className="agent-editor__field"><span>Icon</span><SolidIconPicker value={iconName} onChange={setIconName} /></div>
|
|
701
|
+
<AgentHubModuleField className="agent-editor__field" value={module} onChange={(value) => { setModule(value); setErrors((current) => ({ ...current, module: "" })); }} disabled={creating || updating || isLoading || isFetching || isError} clearable={false} required error={errors.module} />
|
|
596
702
|
</div>
|
|
597
|
-
<AgentHubTagsField value={tags} onChange={setTags} disabled={creating || updating || isLoading || isFetching || isError} onBusyChange={setCreatingTag} />
|
|
703
|
+
<AgentHubTagsField value={tags} onChange={setTags} module={module} disabled={creating || updating || isLoading || isFetching || isError} onBusyChange={setCreatingTag} />
|
|
598
704
|
<section className="agent-editor__section"><div className="agent-editor__section-head"><div><h2>Inputs</h2><p>Define the variables this agent can use. Mark inputs optional or provide a default value when people do not need to enter them.</p></div>
|
|
599
705
|
{inputs.length > 0 && <SolidButton type="button" variant="secondary" size="small" onClick={() => setInputs((current) => [...current, { name: "", description: "", dataType: "string", defaultValue: null, optional: false }])}><Plus size={15} /> Add input</SolidButton>}
|
|
600
706
|
</div>
|
|
@@ -626,9 +732,19 @@ export function AgentRegistryEditorPage() {
|
|
|
626
732
|
] as const).map(([value, label, description], index) => <React.Fragment key={value}>
|
|
627
733
|
{index > 0 && <div className="agent-editor__workflow-connector" aria-hidden="true" />}
|
|
628
734
|
<button type="button" className={`agent-editor__workflow-stage${agentStatus === value ? " is-current" : ""}`} aria-current={agentStatus === value ? "step" : undefined}
|
|
629
|
-
aria-pressed={agentStatus === value} disabled={creating || updating || agentStatus === value} onClick={() =>
|
|
630
|
-
|
|
631
|
-
|
|
735
|
+
aria-pressed={agentStatus === value} disabled={creating || updating || activating || agentStatus === value || (value === "active" && activationWaiting)} onClick={() => {
|
|
736
|
+
if (value === "active") {
|
|
737
|
+
setIncludeVersionDetails(false);
|
|
738
|
+
setVersionName("");
|
|
739
|
+
setVersionDescription("");
|
|
740
|
+
setActivateDialogOpen(true);
|
|
741
|
+
} else void save(value);
|
|
742
|
+
}}>
|
|
743
|
+
{value === "active" && activationWaiting ? <span className="agent-editor__activation-countdown" aria-label={`Active available in ${activationRemainingSeconds} seconds`}>
|
|
744
|
+
<svg viewBox="0 0 36 36" aria-hidden="true"><circle className="agent-editor__activation-countdown-track" cx="18" cy="18" r="15" /><circle className="agent-editor__activation-countdown-progress" cx="18" cy="18" r="15" pathLength="100" strokeDasharray="100" strokeDashoffset={100 - activationRemainingMs / ACTIVATION_WAIT_MS * 100} /></svg>
|
|
745
|
+
<span>{activationRemainingSeconds}</span>
|
|
746
|
+
</span> : <span className="agent-editor__workflow-stage-mark">{index + 1}</span>}
|
|
747
|
+
<div className="agent-editor__workflow-stage-copy"><strong>{label}</strong><small>{description}</small><small className="agent-editor__workflow-stage-cta">{agentStatus === value ? "Current stage" : value === "active" && activationWaiting ? `Available in ${activationRemainingSeconds}s` : "Click to move to this stage"}</small></div>
|
|
632
748
|
{agentStatus === value && <span className="agent-editor__workflow-current">Current</span>}
|
|
633
749
|
</button>
|
|
634
750
|
</React.Fragment>)}
|
|
@@ -636,9 +752,9 @@ export function AgentRegistryEditorPage() {
|
|
|
636
752
|
<small className="agent-editor__workflow-save-hint">Changing stage saves the current form and its linked skills, tools, roles, and secrets.</small>
|
|
637
753
|
</section>
|
|
638
754
|
</div> },
|
|
639
|
-
{ value: "persona", label: "
|
|
755
|
+
{ value: "persona", label: "System Prompt", content: <section className="agent-editor__section agent-editor__persona"><div className="agent-editor__section-head"><div><h2>System prompt *</h2><p>Describe the agent's role, behavior, and instructions in Markdown.</p></div>
|
|
640
756
|
{record?.id && <AgentPersonaHistory agentId={record.id} savedPrompt={record.systemPrompt ?? ""} refreshVersion={auditVersion} />}</div>
|
|
641
|
-
<SolidCodeEditor value={systemPrompt} onChange={(value) => { setSystemPrompt(value ?? ""); setErrors((current) => ({ ...current, systemPrompt: "" })); }} language="markdown" fontSize={11} height="max(34rem, calc(100dvh - 18rem))" />
|
|
757
|
+
<SolidCodeEditor value={systemPrompt} onChange={(value) => { setSystemPrompt(value ?? ""); setErrors((current) => ({ ...current, systemPrompt: "" })); }} language="markdown" wordWrap="on" fontSize={11} height="max(34rem, calc(100dvh - 18rem))" />
|
|
642
758
|
{errors.systemPrompt && <small className="agent-editor__error">{errors.systemPrompt}</small>}</section> },
|
|
643
759
|
{ value: "skills", label: "Skills", content: <LinkPicker label="Skills" description="Skills available to this agent." options={skills.records} selected={linked(skillIds, skills.records, items(record?.agentSkills).map((link) => link.agentSkillRegistry).filter(Boolean))}
|
|
644
760
|
onAdd={(id) => toggle(setSkillIds, id)} onRemove={(id) => toggle(setSkillIds, id)} createUrl="/admin/core/solid-core/agent-skill-registry/editor/new"
|
|
@@ -677,6 +793,7 @@ export function AgentRegistryEditorPage() {
|
|
|
677
793
|
: items(related).length ? <div className="agent-editor__related">{items(related).map((item) => <article key={item.id}><strong>{item.name ?? item.title ?? `#${item.id}`}</strong><span>{item.status ?? ""}</span></article>)}</div>
|
|
678
794
|
: <div className="agent-editor__empty">No {label.toLowerCase()} for this agent yet.</div>}</section> })),
|
|
679
795
|
...(record?.id ? [{ value: "sessions", label: "Sessions", content: <AgentSessionsPanel agentId={record.id} agentLabel={record.name ?? record.title} /> }] : []),
|
|
796
|
+
...(record?.id ? [{ value: "config-versions", label: "Config versions", content: <AgentConfigVersionsPanel agentId={record.id} active={tab === "config-versions"} /> }] : []),
|
|
680
797
|
...(record?.id ? [{ value: "embedding", label: "Embedding", content: <AgentEmbeddingPanel agentId={record.id}
|
|
681
798
|
fields={parseInputs(record.requiredInputs)} active={record.status === "active"}
|
|
682
799
|
hubUrl={String(getSettingsMap(settings).solidxAgentHubBackendUrl ?? "")} /> }] : []),
|
|
@@ -692,6 +809,28 @@ export function AgentRegistryEditorPage() {
|
|
|
692
809
|
footer={<><SolidButton type="button" variant="secondary" onClick={() => setConfirmRefresh(false)}>Cancel</SolidButton><SolidButton type="button" disabled={isFetching} onClick={() => { setConfirmRefresh(false); void refetch(); }}>Refresh and discard</SolidButton></>}>
|
|
693
810
|
<SolidDialogBody><p>You have unsaved changes. Refreshing will discard them and load the latest agent content.</p></SolidDialogBody>
|
|
694
811
|
</SolidDialog>
|
|
812
|
+
<SolidDialog open={activateDialogOpen} onOpenChange={(open) => { if (!activating) setActivateDialogOpen(open); }} header="Activate agent with a new config version?" style={{ width: "min(34rem, 94vw)" }}
|
|
813
|
+
footer={<><SolidButton type="button" variant="secondary" disabled={activating} onClick={() => setActivateDialogOpen(false)}>Cancel</SolidButton><SolidButton type="button" loading={activating || creating || updating} disabled={creatingTag || creating || updating || activating || activationWaiting} onClick={async () => {
|
|
814
|
+
setActivating(true);
|
|
815
|
+
const saved = await save("active", includeVersionDetails ? { name: versionName.trim(), description: versionDescription.trim() } : {});
|
|
816
|
+
setActivating(false);
|
|
817
|
+
if (saved) setActivateDialogOpen(false);
|
|
818
|
+
}}>Create version and activate</SolidButton></>}>
|
|
819
|
+
<SolidDialogBody><div className="agent-editor__activation-dialog">
|
|
820
|
+
<div className="agent-editor__activation-intro">
|
|
821
|
+
<span className="agent-editor__activation-icon"><GitBranch size={18} /></span>
|
|
822
|
+
<div><strong>A new config version will be created</strong><p>Activating saves this agent as the next version and makes it available to users.</p></div>
|
|
823
|
+
</div>
|
|
824
|
+
<label className={`agent-editor__version-details-toggle${includeVersionDetails ? " is-selected" : ""}`}>
|
|
825
|
+
<input type="checkbox" checked={includeVersionDetails} onChange={(event) => setIncludeVersionDetails(event.target.checked)} />
|
|
826
|
+
<span className="agent-editor__version-details-copy"><strong>Add a name and description</strong><small>Optional details help identify this version later.</small></span>
|
|
827
|
+
</label>
|
|
828
|
+
{includeVersionDetails && <div className="agent-editor__version-details-fields">
|
|
829
|
+
<label className="agent-editor__field"><span>Version name <small>Optional</small></span><SolidInput autoFocus placeholder="e.g. Updated support workflow" value={versionName} onChange={(event) => setVersionName(event.target.value)} /></label>
|
|
830
|
+
<label className="agent-editor__field"><span>Description <small>Optional</small></span><textarea placeholder="What changed in this version?" value={versionDescription} rows={3} onChange={(event) => setVersionDescription(event.target.value)} /></label>
|
|
831
|
+
</div>}
|
|
832
|
+
</div></SolidDialogBody>
|
|
833
|
+
</SolidDialog>
|
|
695
834
|
{isLoading ? <div className="agent-editor__empty">Loading agent…</div> : isError || (id !== "new" && !record?.id) ?
|
|
696
835
|
<div className="agent-editor__empty">This agent could not be loaded.</div> : record?.id ?
|
|
697
836
|
<AgentRegistryAuditPanel modelSingularName="agentRegistry" recordId={record.id} refreshVersion={auditVersion} modelUserKey={record.name}>{content}</AgentRegistryAuditPanel> : content}
|
|
@@ -705,8 +844,15 @@ export function AgentRegistryEditorPage() {
|
|
|
705
844
|
</SolidDialog>
|
|
706
845
|
{record?.id && <SolidDialog
|
|
707
846
|
open={testAgentOpen}
|
|
708
|
-
|
|
709
|
-
|
|
847
|
+
dismissible={false}
|
|
848
|
+
onOpenChange={(open) => {
|
|
849
|
+
setTestAgentOpen(open);
|
|
850
|
+
writeTestAgentPrefs(record.id, { open });
|
|
851
|
+
}}
|
|
852
|
+
onHide={() => {
|
|
853
|
+
setTestAgentOpen(false);
|
|
854
|
+
writeTestAgentPrefs(record.id, { open: false });
|
|
855
|
+
}}
|
|
710
856
|
showHeader={false}
|
|
711
857
|
overlayClassName="agent-editor__test-dialog-overlay"
|
|
712
858
|
ariaLabel={`Test ${record.name ?? "SolidX Agent"}`}
|
|
@@ -716,8 +862,14 @@ export function AgentRegistryEditorPage() {
|
|
|
716
862
|
: { 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" }}
|
|
717
863
|
>
|
|
718
864
|
<div className="agent-editor__test-dialog-body">
|
|
719
|
-
<SolidAgentEmbedded agentRuntime="agentHub" agentId={record.id} title={record.name ?? "SolidX Agent"} requiredInputs={parseInputs(record.requiredInputs)} height="100%" className="agent-editor__test-chat"
|
|
720
|
-
windowControls={{
|
|
865
|
+
<SolidAgentEmbedded agentRuntime="agentHub" agentId={record.id} agentVersion={record.configVersion} title={record.name ?? "SolidX Agent"} requiredInputs={parseInputs(record.requiredInputs)} height="100%" className="agent-editor__test-chat"
|
|
866
|
+
windowControls={{
|
|
867
|
+
mode: testAgentWindowMode,
|
|
868
|
+
onDock: () => { setTestAgentWindowMode("docked"); writeTestAgentPrefs(record.id, { mode: "docked" }); },
|
|
869
|
+
onMaximize: () => { setTestAgentWindowMode("maximized"); writeTestAgentPrefs(record.id, { mode: "maximized" }); },
|
|
870
|
+
onRestore: () => { setTestAgentWindowMode("docked"); writeTestAgentPrefs(record.id, { mode: "docked" }); },
|
|
871
|
+
onClose: () => { setTestAgentOpen(false); writeTestAgentPrefs(record.id, { open: false }); },
|
|
872
|
+
}} />
|
|
721
873
|
</div>
|
|
722
874
|
</SolidDialog>}
|
|
723
875
|
</main>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSkillRegistryEditorPage.d.ts","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentSkillRegistryEditorPage.d.ts","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/AgentSkillRegistryEditorPage.tsx"],"names":[],"mappings":"AAkBA,OAAO,oCAAoC,CAAC;AA+E5C,wBAAgB,4BAA4B,4CAgT3C"}
|
|
@@ -54,6 +54,7 @@ import { createSolidEntityApi } from "../../../../redux/api/solidEntityApi";
|
|
|
54
54
|
import { showToast } from "../../../../redux/features/toastSlice";
|
|
55
55
|
import { AgentRegistryAuditPanel } from "./AgentRegistryAuditPanel";
|
|
56
56
|
import { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload } from "./AgentHubTagsField";
|
|
57
|
+
import { AgentHubModuleField, agentHubModuleFrom, agentHubModulePayload } from "./AgentHubModuleField";
|
|
57
58
|
import { SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidIconPicker, SolidInput, SolidTabGroup, } from "../../../../components/shad-cn-ui";
|
|
58
59
|
import "./AgentSkillRegistryEditorPage.css";
|
|
59
60
|
function extractEntityRecord(response) {
|
|
@@ -120,7 +121,7 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
120
121
|
var useCreateSolidEntityMutation = entityApi.useCreateSolidEntityMutation, useGetSolidEntityByIdQuery = entityApi.useGetSolidEntityByIdQuery, useUpdateSolidEntityMutation = entityApi.useUpdateSolidEntityMutation;
|
|
121
122
|
var _b = useGetSolidEntityByIdQuery({
|
|
122
123
|
id: id,
|
|
123
|
-
qs: "populate[0]=agentSkills&populate[1]=agentSkills.agentRegistry&populate[2]=tags",
|
|
124
|
+
qs: "populate[0]=agentSkills&populate[1]=agentSkills.agentRegistry&populate[2]=tags&populate[3]=module",
|
|
124
125
|
}, { skip: !id || id === "new" }), response = _b.data, isLoading = _b.isLoading, isFetching = _b.isFetching, refetch = _b.refetch;
|
|
125
126
|
var _c = useCreateSolidEntityMutation(), createSkill = _c[0], isCreating = _c[1].isLoading;
|
|
126
127
|
var _d = useUpdateSolidEntityMutation(), updateSkill = _d[0], isSaving = _d[1].isLoading;
|
|
@@ -132,28 +133,31 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
132
133
|
var _j = React.useState(""), description = _j[0], setDescription = _j[1];
|
|
133
134
|
var _k = React.useState(""), body = _k[0], setBody = _k[1];
|
|
134
135
|
var _l = React.useState([]), tags = _l[0], setTags = _l[1];
|
|
135
|
-
var _m = React.useState(
|
|
136
|
-
var _o = React.useState(
|
|
137
|
-
var _p = React.useState(
|
|
138
|
-
var _q = React.useState(
|
|
136
|
+
var _m = React.useState(null), module = _m[0], setModule = _m[1];
|
|
137
|
+
var _o = React.useState(false), creatingTag = _o[0], setCreatingTag = _o[1];
|
|
138
|
+
var _p = React.useState({}), fieldErrors = _p[0], setFieldErrors = _p[1];
|
|
139
|
+
var _q = React.useState(0), auditRefreshVersion = _q[0], setAuditRefreshVersion = _q[1];
|
|
140
|
+
var _r = React.useState(false), confirmRefresh = _r[0], setConfirmRefresh = _r[1];
|
|
139
141
|
var baseline = React.useRef("");
|
|
140
|
-
var currentForm = function () { return JSON.stringify({ name: name, type: type, iconName: iconName, description: description, body: body, tags: tags }); };
|
|
142
|
+
var currentForm = function () { var _a; return JSON.stringify({ name: name, type: type, iconName: iconName, description: description, body: body, tags: tags, moduleId: (_a = module === null || module === void 0 ? void 0 : module.id) !== null && _a !== void 0 ? _a : null }); };
|
|
141
143
|
React.useEffect(function () {
|
|
142
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
144
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
143
145
|
var nextTags = agentHubTagsFrom(record === null || record === void 0 ? void 0 : record.tags);
|
|
146
|
+
var nextModule = agentHubModuleFrom(record === null || record === void 0 ? void 0 : record.module);
|
|
144
147
|
setName((_a = record === null || record === void 0 ? void 0 : record.name) !== null && _a !== void 0 ? _a : "");
|
|
145
148
|
setType((_b = record === null || record === void 0 ? void 0 : record.type) !== null && _b !== void 0 ? _b : "custom");
|
|
146
149
|
setIconName((_c = record === null || record === void 0 ? void 0 : record.iconName) !== null && _c !== void 0 ? _c : "");
|
|
147
150
|
setDescription((_d = record === null || record === void 0 ? void 0 : record.description) !== null && _d !== void 0 ? _d : "");
|
|
148
151
|
setBody((_e = record === null || record === void 0 ? void 0 : record.body) !== null && _e !== void 0 ? _e : "");
|
|
149
152
|
setTags(nextTags);
|
|
150
|
-
|
|
153
|
+
setModule(nextModule);
|
|
154
|
+
baseline.current = JSON.stringify({ name: (_f = record === null || record === void 0 ? void 0 : record.name) !== null && _f !== void 0 ? _f : "", type: (_g = record === null || record === void 0 ? void 0 : record.type) !== null && _g !== void 0 ? _g : "custom", iconName: (_h = record === null || record === void 0 ? void 0 : record.iconName) !== null && _h !== void 0 ? _h : "", description: (_j = record === null || record === void 0 ? void 0 : record.description) !== null && _j !== void 0 ? _j : "", body: (_k = record === null || record === void 0 ? void 0 : record.body) !== null && _k !== void 0 ? _k : "", tags: nextTags, moduleId: (_l = nextModule === null || nextModule === void 0 ? void 0 : nextModule.id) !== null && _l !== void 0 ? _l : null });
|
|
151
155
|
}, [record]);
|
|
152
156
|
var isReadOnly = (record === null || record === void 0 ? void 0 : record.type) === "solidx";
|
|
153
157
|
var isDirty = Boolean(record === null || record === void 0 ? void 0 : record.id) && currentForm() !== baseline.current;
|
|
154
158
|
var requestRefresh = function () { return isDirty ? setConfirmRefresh(true) : void refetch(); };
|
|
155
159
|
var handleSave = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
-
var nextErrors, payload, result, createdId, error_1, errorDetail, serverFieldErrors, _i, _a, field;
|
|
160
|
+
var nextErrors, payload, result, createdId, error_1, errorDetail, serverFieldErrors, _i, _a, field, label;
|
|
157
161
|
var _b, _c;
|
|
158
162
|
return __generator(this, function (_d) {
|
|
159
163
|
switch (_d.label) {
|
|
@@ -169,6 +173,8 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
169
173
|
nextErrors.description = "Description is required.";
|
|
170
174
|
if (!body.trim())
|
|
171
175
|
nextErrors.body = "Skill instructions are required.";
|
|
176
|
+
if (!module)
|
|
177
|
+
nextErrors.module = "Module is required. Select a module before saving this skill.";
|
|
172
178
|
setFieldErrors(nextErrors);
|
|
173
179
|
if (Object.keys(nextErrors).length > 0) {
|
|
174
180
|
setActiveTab(nextErrors.body ? "skill" : "general");
|
|
@@ -179,7 +185,7 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
179
185
|
}));
|
|
180
186
|
return [2 /*return*/];
|
|
181
187
|
}
|
|
182
|
-
payload = __assign({ name: name.trim(), type: type, iconName: iconName || null, description: description.trim(), body: body }, agentHubTagsPayload(tags));
|
|
188
|
+
payload = __assign(__assign({ name: name.trim(), type: type, iconName: iconName || null, description: description.trim(), body: body }, agentHubTagsPayload(tags)), agentHubModulePayload(module));
|
|
183
189
|
_d.label = 1;
|
|
184
190
|
case 1:
|
|
185
191
|
_d.trys.push([1, 6, , 7]);
|
|
@@ -216,11 +222,12 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
216
222
|
errorDetail = getSaveErrorMessage(error_1);
|
|
217
223
|
serverFieldErrors = {};
|
|
218
224
|
if (/required|not be empty|cannot be empty|should not be empty/i.test(errorDetail)) {
|
|
219
|
-
for (_i = 0, _a = ["name", "type", "description", "body"]; _i < _a.length; _i++) {
|
|
225
|
+
for (_i = 0, _a = ["name", "type", "description", "body", "module"]; _i < _a.length; _i++) {
|
|
220
226
|
field = _a[_i];
|
|
221
227
|
if (!new RegExp("\\b".concat(field, "\\b"), "i").test(errorDetail))
|
|
222
228
|
continue;
|
|
223
|
-
|
|
229
|
+
label = field === "body" ? "Skill instructions" : field === "module" ? "Module" : field[0].toUpperCase() + field.slice(1);
|
|
230
|
+
serverFieldErrors[field] = "".concat(label, " is required.");
|
|
224
231
|
}
|
|
225
232
|
}
|
|
226
233
|
if (Object.keys(serverFieldErrors).length > 0) {
|
|
@@ -242,7 +249,7 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
242
249
|
{
|
|
243
250
|
value: "general",
|
|
244
251
|
label: "General Info",
|
|
245
|
-
content: (_jsxs("fieldset", { className: "agent-skill-editor__general", disabled: isReadOnly, children: [isReadOnly && _jsx("p", { className: "agent-skill-editor__readonly-note", children: "SolidX skills
|
|
252
|
+
content: (_jsxs("fieldset", { className: "agent-skill-editor__general", disabled: isReadOnly, children: [isReadOnly && _jsx("p", { className: "agent-skill-editor__readonly-note", children: "SolidX skills cannot be edited." }), _jsxs("div", { className: "agent-skill-editor__fields", children: [_jsxs("label", { className: "agent-skill-editor__field", children: [_jsxs("span", { children: ["Name ", _jsx("b", { children: "*" })] }), _jsx(SolidInput, { value: name, "aria-invalid": Boolean(fieldErrors.name), "aria-describedby": fieldErrors.name ? "agent-skill-name-error" : undefined, className: fieldErrors.name ? "agent-skill-editor__input--invalid" : undefined, onChange: function (event) {
|
|
246
253
|
setName(event.target.value);
|
|
247
254
|
setFieldErrors(function (current) { return (__assign(__assign({}, current), { name: "" })); });
|
|
248
255
|
} }), fieldErrors.name && _jsx("small", { id: "agent-skill-name-error", className: "agent-skill-editor__field-error", children: fieldErrors.name })] }), _jsxs("div", { className: "agent-skill-editor__field", children: [_jsx("span", { children: "Icon" }), _jsx(SolidIconPicker, { value: iconName, onChange: setIconName })] }), _jsxs("label", { className: "agent-skill-editor__field", children: [_jsxs("span", { children: ["Description ", _jsx("b", { children: "*" })] }), _jsx(SolidInput, { value: description, "aria-invalid": Boolean(fieldErrors.description), "aria-describedby": fieldErrors.description ? "agent-skill-description-error" : undefined, className: fieldErrors.description ? "agent-skill-editor__input--invalid" : undefined, onChange: function (event) {
|
|
@@ -251,7 +258,7 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
251
258
|
} }), fieldErrors.description && _jsx("small", { id: "agent-skill-description-error", className: "agent-skill-editor__field-error", children: fieldErrors.description })] })] }), _jsxs("label", { className: "agent-skill-editor__field", children: [_jsxs("span", { children: ["Skill type ", _jsx("b", { children: "*" })] }), _jsxs("select", { value: type, "aria-invalid": Boolean(fieldErrors.type), "aria-describedby": fieldErrors.type ? "agent-skill-type-error" : undefined, className: fieldErrors.type ? "agent-skill-editor__input--invalid" : undefined, onChange: function (event) {
|
|
252
259
|
setType(event.target.value);
|
|
253
260
|
setFieldErrors(function (current) { return (__assign(__assign({}, current), { type: "" })); });
|
|
254
|
-
}, children: [isReadOnly && _jsx("option", { value: "solidx", children: "SolidX" }), _jsx("option", { value: "thirdparty", children: "Third Party" }), _jsx("option", { value: "custom", children: "Custom" })] }), fieldErrors.type && _jsx("small", { id: "agent-skill-type-error", className: "agent-skill-editor__field-error", children: fieldErrors.type })] }), _jsx(AgentHubTagsField, { value: tags, onChange: setTags, disabled: isReadOnly || isCreating || isSaving, onBusyChange: setCreatingTag })] })),
|
|
261
|
+
}, children: [isReadOnly && _jsx("option", { value: "solidx", children: "SolidX" }), _jsx("option", { value: "thirdparty", children: "Third Party" }), _jsx("option", { value: "custom", children: "Custom" })] }), fieldErrors.type && _jsx("small", { id: "agent-skill-type-error", className: "agent-skill-editor__field-error", children: fieldErrors.type })] }), _jsx(AgentHubModuleField, { className: "agent-skill-editor__field", value: module, onChange: function (value) { setModule(value); setFieldErrors(function (current) { return (__assign(__assign({}, current), { module: "" })); }); }, disabled: isReadOnly || isCreating || isSaving, clearable: false, required: true, error: fieldErrors.module }), _jsx(AgentHubTagsField, { value: tags, onChange: setTags, module: module, disabled: isReadOnly || isCreating || isSaving, onBusyChange: setCreatingTag })] })),
|
|
255
262
|
},
|
|
256
263
|
{
|
|
257
264
|
value: "skill",
|
|
@@ -259,7 +266,7 @@ export function AgentSkillRegistryEditorPage() {
|
|
|
259
266
|
content: (_jsx("div", { className: "agent-skill-editor__skill", children: _jsxs("section", { className: "agent-skill-editor__panel", children: [_jsxs("header", { children: [_jsxs("h2", { children: ["Skill instructions ", _jsx("b", { children: "*" })] }), _jsx("p", { children: "Write the skill's Markdown body here." })] }), _jsx(SolidCodeEditor, { value: body, onChange: function (value) {
|
|
260
267
|
setBody(value !== null && value !== void 0 ? value : "");
|
|
261
268
|
setFieldErrors(function (current) { return (__assign(__assign({}, current), { body: "" })); });
|
|
262
|
-
}, language: "markdown", readOnly: isReadOnly, fontSize: 11, height: "max(32rem, calc(100dvh - 18rem))", className: "agent-skill-editor__code".concat(fieldErrors.body ? " agent-skill-editor__code--invalid" : "") }), fieldErrors.body && _jsx("small", { className: "agent-skill-editor__field-error agent-skill-editor__body-error", children: fieldErrors.body })] }) })),
|
|
269
|
+
}, language: "markdown", wordWrap: "on", readOnly: isReadOnly, fontSize: 11, height: "max(32rem, calc(100dvh - 18rem))", className: "agent-skill-editor__code".concat(fieldErrors.body ? " agent-skill-editor__code--invalid" : "") }), fieldErrors.body && _jsx("small", { className: "agent-skill-editor__field-error agent-skill-editor__body-error", children: fieldErrors.body })] }) })),
|
|
263
270
|
},
|
|
264
271
|
{
|
|
265
272
|
value: "agents",
|