@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentToolRegistryEditorPage.js","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,M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AAK,OAAO,EAAE,CAAC;gCACf,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,iDAAiD,EAAE,CAAC,CAAC,CAAC;;;;qBACpI,GAAI,EACN,SAAS,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,4BAA4B,mCAAoB,CAAC,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE,EAAC,CAAC,CAAC,CAC1F,KAAC,uBAAuB,IAAC,iBAAiB,EAAC,mBAAmB,EAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,cAAc,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,YAChJ,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,yBAAyB,EAAC,aAAa,EAAC,6BAA6B,EAAC,cAAc,EAAC,8BAA8B,GAAG,GAClL,CAC3B,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,yBAAyB,EAAC,aAAa,EAAC,6BAA6B,EAAC,cAAc,EAAC,8BAA8B,GAAG,IACzM,CAAC;AACV,CAAC","sourcesContent":["import React from \"react\";\nimport { ArrowLeft, RefreshCw } from \"lucide-react\";\nimport { useDispatch } from \"react-redux\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport { createSolidEntityApi } from \"../../../../redux/api/solidEntityApi\";\nimport { showToast } from \"../../../../redux/features/toastSlice\";\nimport { solidPatch } from \"../../../../http/solidHttp\";\nimport { AgentRegistryAuditPanel } from \"./AgentRegistryAuditPanel\";\nimport { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload, type AgentHubTag } from \"./AgentHubTagsField\";\nimport { AgentToolActivationDialog } from \"./AgentToolActivationDialog\";\nimport { AgentToolSessionsPanel } from \"../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel\";\nimport { AgentRegistryCardWidget } from \"../../../../components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget\";\nimport { SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidIconPicker, SolidInput, SolidTabGroup } from \"../../../../components/shad-cn-ui\";\nimport \"./AgentToolRegistryEditorPage.css\";\n\nconst SharedAgentRegistryCard = AgentRegistryCardWidget as React.ComponentType<{ rowData: Record<string, any> }>;\n\ntype Agent = { id?: number | string; name?: string; title?: string; [key: string]: any };\ntype AgentToolLink = { agentRegistry?: Agent | number | string | null };\ntype ToolRecord = {\n id: number;\n name?: string;\n iconName?: string | null;\n description?: string;\n tags?: AgentHubTag[];\n type?: string;\n status?: string | null;\n lastLoadError?: string | null;\n sourceCode?: string;\n checksum?: string;\n agentTools?: AgentToolLink[] | AgentToolLink | null;\n};\n\nfunction extractEntityRecord(response: unknown): Record<string, any> | undefined {\n let candidate: unknown = response;\n for (let depth = 0; depth < 3; depth += 1) {\n if (!candidate || typeof candidate !== \"object\") return undefined;\n const value = candidate as Record<string, unknown>;\n if (\"id\" in value || \"name\" in value) return value;\n candidate = value.data;\n }\n return candidate && typeof candidate === \"object\" ? candidate as Record<string, any> : undefined;\n}\n\nasync function sha256Hex(value: string): Promise<string> {\n const digest = await crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(value));\n return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction formatErrorMessage(value: unknown): string | undefined {\n if (typeof value === \"string\") return value.trim() || undefined;\n if (Array.isArray(value)) {\n const messages = value.map(formatErrorMessage).filter((message): message is string => Boolean(message));\n return messages.length ? messages.join(\"; \") : undefined;\n }\n if (value && typeof value === \"object\") {\n const error = value as Record<string, unknown>;\n return formatErrorMessage(error.message)\n ?? formatErrorMessage(error.constraints)\n ?? formatErrorMessage(error.error);\n }\n return undefined;\n}\n\nfunction getSaveErrorMessage(error: unknown): string {\n if (!error || typeof error !== \"object\") return \"Failed to save tool.\";\n const apiError = error as Record<string, any>;\n return formatErrorMessage(apiError.data?.data?.message)\n ?? formatErrorMessage(apiError.data?.message)\n ?? formatErrorMessage(apiError.data?.error)\n ?? formatErrorMessage(apiError.message)\n ?? \"Failed to save tool.\";\n}\n\nexport function AgentToolRegistryEditorPage() {\n const { id = \"\" } = useParams<{ id: string }>();\n const navigate = useNavigate();\n const dispatch = useDispatch();\n const entityApi = React.useMemo(() => createSolidEntityApi(\"agentToolRegistry\"), []);\n const { useCreateSolidEntityMutation, useGetSolidEntityByIdQuery, useUpdateSolidEntityMutation } = entityApi;\n const { data: response, isLoading, isFetching, refetch } = useGetSolidEntityByIdQuery(\n { id, qs: \"populate[0]=agentTools&populate[1]=agentTools.agentRegistry&populate[2]=tags\" },\n { skip: !id || id === \"new\" },\n );\n const [createTool, { isLoading: isCreating }] = useCreateSolidEntityMutation();\n const [updateTool, { isLoading: isSaving }] = useUpdateSolidEntityMutation();\n const record = extractEntityRecord(response) as ToolRecord | undefined;\n const [activeTab, setActiveTab] = React.useState(\"general\");\n const [name, setName] = React.useState(\"\");\n const [iconName, setIconName] = React.useState(\"\");\n const [description, setDescription] = React.useState(\"\");\n const [type, setType] = React.useState(\"custom\");\n const [sourceCode, setSourceCode] = React.useState(\"\");\n const [tags, setTags] = React.useState<AgentHubTag[]>([]);\n const [creatingTag, setCreatingTag] = React.useState(false);\n const [fieldErrors, setFieldErrors] = React.useState<Record<string, string>>({});\n const [auditRefreshVersion, setAuditRefreshVersion] = React.useState(0);\n const [confirmRefresh, setConfirmRefresh] = React.useState(false);\n const [activationOpen, setActivationOpen] = React.useState(false);\n const [activationTool, setActivationTool] = React.useState<{ id: number; checksum: string; name: string } | null>(null);\n const preparingActivation = React.useRef(false);\n const baseline = React.useRef(\"\");\n\n const currentForm = () => JSON.stringify({ name, iconName, description, type, sourceCode, tags });\n\n React.useEffect(() => {\n const nextTags = agentHubTagsFrom(record?.tags);\n setName(record?.name ?? \"\");\n setIconName(record?.iconName ?? \"\");\n setDescription(record?.description ?? \"\");\n setType(record?.type ?? \"custom\");\n setSourceCode(record?.sourceCode ?? \"\");\n setTags(nextTags);\n baseline.current = JSON.stringify({ name: record?.name ?? \"\", iconName: record?.iconName ?? \"\", description: record?.description ?? \"\", type: record?.type ?? \"custom\", sourceCode: record?.sourceCode ?? \"\", tags: nextTags });\n }, [record]);\n\n const isReadOnly = record?.type === \"solidx\";\n const isDirty = Boolean(record?.id) && currentForm() !== baseline.current;\n const requestRefresh = () => isDirty ? setConfirmRefresh(true) : void refetch();\n\n const save = async (nextStatus?: \"inactive\") => {\n if (creatingTag) return;\n const nextErrors: Record<string, string> = {};\n if (!name.trim()) nextErrors.name = \"Name is required.\";\n if (!description.trim()) nextErrors.description = \"Description is required.\";\n if (!type.trim()) nextErrors.type = \"Tool type is required.\";\n if (!sourceCode.trim()) nextErrors.sourceCode = \"Tool source code is required.\";\n\n setFieldErrors(nextErrors);\n if (Object.keys(nextErrors).length > 0) {\n setActiveTab(nextErrors.sourceCode ? \"tool\" : \"general\");\n dispatch(showToast({ severity: \"error\", summary: \"Missing information\", detail: Object.values(nextErrors).join(\" \") }));\n return;\n }\n const payload = {\n name: name.trim(), iconName: iconName || null, description: description.trim(), type,\n sourceCode, ...agentHubTagsPayload(tags),\n ...([\"custom\", \"thirdparty\"].includes(type) ? { checksum: await sha256Hex(sourceCode) } : {}),\n status: nextStatus ?? (record && (sourceCode !== record.sourceCode || name.trim() !== record.name || type !== record.type)\n ? \"inactive\" : record?.status ?? \"inactive\"),\n };\n try {\n if (record?.id) {\n const result = await updateTool({ id: record.id, data: payload }).unwrap();\n dispatch(showToast({ severity: \"success\", summary: nextStatus ? \"Tool status updated\" : \"Saved\", detail: nextStatus ? `Tool moved to ${nextStatus}. Restart linked agent processes to apply the change.` : \"Tool updated successfully.\" }));\n setAuditRefreshVersion((version) => version + 1);\n refetch();\n return (extractEntityRecord(result) ?? { ...record, ...payload }) as ToolRecord;\n } else {\n const result: any = await createTool(payload).unwrap();\n const createdId = result?.data?.id ?? result?.id;\n dispatch(showToast({ severity: \"success\", summary: \"Created\", detail: \"Tool created successfully.\" }));\n if (createdId) navigate(`/admin/core/solid-core/agent-tool-registry/editor/${createdId}`, { replace: true });\n }\n } catch (error: any) {\n const errorDetail = getSaveErrorMessage(error);\n const serverFieldErrors: Record<string, string> = {};\n if (/required|not be empty|cannot be empty|should not be empty/i.test(errorDetail)) {\n for (const field of [\"name\", \"description\", \"type\", \"sourceCode\"]) {\n if (!new RegExp(`\\\\b${field}\\\\b`, \"i\").test(errorDetail)) continue;\n const label = field === \"sourceCode\" ? \"Tool source code\" : field[0].toUpperCase() + field.slice(1);\n serverFieldErrors[field] = `${label} is required.`;\n }\n }\n if (Object.keys(serverFieldErrors).length > 0) {\n setFieldErrors(serverFieldErrors);\n setActiveTab(serverFieldErrors.sourceCode ? \"tool\" : \"general\");\n }\n dispatch(showToast({ severity: \"error\", summary: \"Save failed\", detail: errorDetail }));\n }\n };\n\n const beginActivation = async () => {\n if (isReadOnly) return;\n if (!record || activationOpen || isSaving || preparingActivation.current) return;\n preparingActivation.current = true;\n try {\n const saved = isDirty || record.status === \"load_failed\" ? await save(\"inactive\") : record;\n if (!saved?.id) return;\n const checksum = await sha256Hex(saved.sourceCode ?? sourceCode);\n setActivationTool({ id: saved.id, checksum, name: saved.name ?? name });\n setActivationOpen(true);\n } catch {\n dispatch(showToast({ severity: \"error\", summary: \"Activation failed\", detail: \"Could not prepare the saved tool source for checks.\" }));\n } finally {\n preparingActivation.current = false;\n }\n };\n\n const agents = React.useMemo(() => {\n const relatedTools = record?.agentTools;\n const links = Array.isArray(relatedTools) ? relatedTools : relatedTools ? [relatedTools] : [];\n const seen = new Set<string>();\n return links.map((link) => link.agentRegistry).filter((agent): agent is Agent => Boolean(agent && typeof agent === \"object\"))\n .filter((agent) => {\n const key = String(agent.id ?? agent.name ?? agent.title ?? \"\");\n if (!key || seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n }, [record?.agentTools]);\n const sessionAgents = React.useMemo(() => agents.filter((agent): agent is Agent & { id: number | string } => agent.id !== undefined && agent.id !== null), [agents]);\n const tabs = [\n { value: \"general\", label: \"General Info\", content: <fieldset className=\"agent-tool-editor__general\" disabled={isReadOnly}>\n {isReadOnly && <p className=\"agent-tool-editor__readonly-note\">SolidX tools are seeded by the AgentHub runtime and cannot be edited.</p>}\n {record?.status && <section className={`agent-tool-editor__runtime-status${record.status === \"load_failed\" ? \" agent-tool-editor__runtime-status--failed\" : \"\"}`} role={record.status === \"load_failed\" ? \"alert\" : \"status\"}>\n <div className=\"agent-tool-editor__runtime-heading\"><strong>Runtime status</strong><span>{record.status.replace(/[_-]+/g, \" \")}</span></div>\n {record.status === \"load_failed\" ? <>\n <p>The AgentHub runtime could not load this tool. After correcting its source or checksum, restart linked agent processes so the runtime retries loading it.</p>\n {record.lastLoadError && <pre>{record.lastLoadError}</pre>}\n </> : <p>{record.lastLoadError || \"No tool load error has been reported.\"}</p>}\n </section>}\n <div className=\"agent-tool-editor__fields\">\n <label className=\"agent-tool-editor__field\"><span>Name <b>*</b></span><SolidInput value={name} aria-invalid={Boolean(fieldErrors.name)} aria-describedby={fieldErrors.name ? \"agent-tool-name-error\" : undefined} className={fieldErrors.name ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setName(e.target.value); setFieldErrors((current) => ({ ...current, name: \"\" })); }} />{fieldErrors.name && <small id=\"agent-tool-name-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.name}</small>}</label>\n <div className=\"agent-tool-editor__field\"><span>Icon</span><SolidIconPicker value={iconName} onChange={setIconName} /></div>\n <label className=\"agent-tool-editor__field\"><span>Description <b>*</b></span><SolidInput value={description} aria-invalid={Boolean(fieldErrors.description)} aria-describedby={fieldErrors.description ? \"agent-tool-description-error\" : undefined} className={fieldErrors.description ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setDescription(e.target.value); setFieldErrors((current) => ({ ...current, description: \"\" })); }} />{fieldErrors.description && <small id=\"agent-tool-description-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.description}</small>}</label>\n </div>\n {!record?.id && <label className=\"agent-tool-editor__field\"><span>Tool status</span><select value=\"inactive\" disabled aria-label=\"Tool status\"><option value=\"inactive\">Inactive</option></select><small>New tools start inactive. Run configuration and initialization checks to activate.</small></label>}\n <label className=\"agent-tool-editor__field\"><span>Tool type <b>*</b></span><select value={type} aria-invalid={Boolean(fieldErrors.type)} aria-describedby={fieldErrors.type ? \"agent-tool-type-error\" : undefined} className={fieldErrors.type ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setType(e.target.value); setFieldErrors((current) => ({ ...current, type: \"\" })); }}>\n {isReadOnly && <option value=\"solidx\">SolidX</option>}<option value=\"thirdparty\">Third Party</option><option value=\"custom\">Custom</option>\n </select>{fieldErrors.type && <small id=\"agent-tool-type-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.type}</small>}</label>\n <AgentHubTagsField value={tags} onChange={setTags} disabled={isReadOnly || isCreating || isSaving} onBusyChange={setCreatingTag} />\n {record?.id && <section className=\"agent-tool-editor__workflow\" aria-labelledby=\"agent-tool-lifecycle-title\">\n <div className=\"agent-tool-editor__workflow-head\"><div><h2 id=\"agent-tool-lifecycle-title\">Tool lifecycle</h2><p>Configuration and initialization must pass before this tool can be activated.</p></div></div>\n <div className=\"agent-tool-editor__workflow-stages\" aria-label={`Current tool stage: ${(record.status ?? \"inactive\").replace(/[_-]+/g, \" \")}`}>\n {([ [\"active\", \"Active\", \"Enabled for loading into linked agents.\"], [\"inactive\", \"Inactive\", \"Not loaded for linked agents.\"], [\"load_failed\", \"Load failed\", \"AgentHub could not load this tool.\"] ] as const).map(([value, label, description], index) => {\n const currentStatus = record.status ?? \"inactive\";\n const isCurrent = currentStatus === value;\n const canRetry = value === \"load_failed\" && isCurrent;\n const disabled = isReadOnly || activationOpen || isCreating || isSaving || (!canRetry && (value === \"load_failed\" || isCurrent));\n return <React.Fragment key={value}>\n {index > 0 && <div className=\"agent-tool-editor__workflow-connector\" aria-hidden=\"true\" />}\n <button type=\"button\" className={`agent-tool-editor__workflow-stage agent-tool-editor__workflow-stage--${value}${isCurrent ? \" is-current\" : \"\"}`}\n aria-current={isCurrent ? \"step\" : undefined} aria-pressed={isCurrent} disabled={disabled}\n onClick={() => value === \"inactive\" ? void save(\"inactive\") : void beginActivation()}>\n <span className=\"agent-tool-editor__workflow-mark\">{index + 1}</span>\n <span className=\"agent-tool-editor__workflow-copy\"><strong>{label}</strong><small>{description}</small><small className=\"agent-tool-editor__workflow-cta\">{canRetry ? \"Run checks and retry activation\" : isCurrent ? \"Current stage\" : value === \"load_failed\" ? \"Set automatically by AgentHub\" : value === \"active\" ? \"Run checks to activate\" : \"Click to deactivate\"}</small></span>\n {isCurrent && <span className=\"agent-tool-editor__workflow-current\">Current</span>}\n </button>\n </React.Fragment>;\n })}\n </div>\n {record.status === \"load_failed\" && <small className=\"agent-tool-editor__workflow-hint\">Fix the source or checksum, then run configuration and initialization checks before retrying activation.</small>}\n <small className=\"agent-tool-editor__workflow-hint\">Activation checks use the saved tool configuration. Restart linked agent processes to apply status changes.</small>\n </section>}\n </fieldset> },\n { value: \"tool\", label: \"Tool\", content: <div className=\"agent-tool-editor__tool\">\n <section className=\"agent-tool-editor__panel\">\n <header><h2>Tool source code <b>*</b></h2><p>Write the tool's Python code here.</p></header>\n <SolidCodeEditor value={sourceCode} onChange={(value) => { setSourceCode(value ?? \"\"); setFieldErrors((current) => ({ ...current, sourceCode: \"\" })); }} language=\"python\" readOnly={isReadOnly} fontSize={11} height=\"max(32rem, calc(100dvh - 18rem))\" className={`agent-tool-editor__code${fieldErrors.sourceCode ? \" agent-tool-editor__code--invalid\" : \"\"}`} />\n {fieldErrors.sourceCode && <small className=\"agent-tool-editor__field-error agent-tool-editor__code-error\">{fieldErrors.sourceCode}</small>}\n </section>\n </div> },\n { value: \"agents\", label: \"Agents\", content: <section className=\"agent-tool-editor__agents\"><div><h2>Associated agents</h2><p>Agents linked to this tool. Associations are read-only here.</p></div>\n {isLoading ? <p>Loading associated agents…</p> : agents.length ? <div className=\"agent-tool-editor__agent-grid\">{agents.map((agent, index) => <div className=\"agent-tool-editor__agent-card\" key={String(agent.id ?? agent.name ?? index)}><SharedAgentRegistryCard rowData={agent} /></div>)}</div> : <div className=\"agent-tool-editor__empty\">No agents are currently associated with this tool.</div>}\n </section> },\n { value: \"sessions\", label: \"Sessions\", content: <AgentToolSessionsPanel agents={sessionAgents} /> },\n ];\n\n return <main className=\"agent-tool-editor\">\n <header className=\"agent-tool-editor__header\"><div><div className=\"agent-tool-editor__heading-with-refresh\"><h1>{record ? \"Edit Tool\" : \"Create Tool\"}</h1>{record?.id && <button type=\"button\" className={`agent-tool-editor__refresh${isFetching ? \" is-loading\" : \"\"}`} aria-label=\"Refresh tool\" title=\"Refresh tool\" disabled={isFetching || isSaving} onClick={requestRefresh}><RefreshCw size={14} /></button>}</div></div><div className=\"agent-tool-editor__actions\">\n <SolidButton variant=\"secondary\" leftIcon={<ArrowLeft size={16} />} onClick={() => navigate(-1)}>Back</SolidButton>\n {!isReadOnly && <SolidButton disabled={activationOpen || creatingTag} loading={isCreating || isSaving} onClick={() => void save()}>Save Tool</SolidButton>}\n </div></header>\n <SolidDialog open={confirmRefresh} onOpenChange={setConfirmRefresh} header=\"Discard unsaved changes?\" style={{ width: \"min(28rem, 94vw)\" }}\n 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></>}>\n <SolidDialogBody><p>You have unsaved changes. Refreshing will discard them and load the latest tool content.</p></SolidDialogBody>\n </SolidDialog>\n {activationOpen && activationTool && <AgentToolActivationDialog open={activationOpen} onOpenChange={setActivationOpen}\n toolId={activationTool.id} checksum={activationTool.checksum} toolName={activationTool.name}\n onActivated={async () => {\n await solidPatch(`/agent-tool-registry/${activationTool.id}`, { status: \"active\", checksum: activationTool.checksum });\n setAuditRefreshVersion((version) => version + 1);\n void refetch();\n dispatch(showToast({ severity: \"success\", summary: \"Tool activated\", detail: \"Configuration and initialization checks passed.\" }));\n }} />}\n {isLoading ? <div className=\"agent-tool-editor__loading\">Loading tool…</div> : record?.id ? (\n <AgentRegistryAuditPanel modelSingularName=\"agentToolRegistry\" recordId={record.id} refreshVersion={auditRefreshVersion} modelUserKey={record.name}>\n <SolidTabGroup tabs={tabs} value={activeTab} onValueChange={setActiveTab} className=\"agent-tool-editor__tabs\" listClassName=\"agent-tool-editor__tab-list\" panelClassName=\"agent-tool-editor__tab-panel\" />\n </AgentRegistryAuditPanel>\n ) : <SolidTabGroup tabs={tabs} value={activeTab} onValueChange={setActiveTab} className=\"agent-tool-editor__tabs\" listClassName=\"agent-tool-editor__tab-list\" panelClassName=\"agent-tool-editor__tab-panel\" />}\n </main>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AgentToolRegistryEditorPage.js","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/AgentToolRegistryEditorPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MA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uB,IAAC,iBAAiB,EAAC,mBAAmB,EAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,cAAc,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,YAChJ,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,yBAAyB,EAAC,aAAa,EAAC,6BAA6B,EAAC,cAAc,EAAC,8BAA8B,GAAG,GAClL,CAC3B,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,yBAAyB,EAAC,aAAa,EAAC,6BAA6B,EAAC,cAAc,EAAC,8BAA8B,GAAG,IACzM,CAAC;AACV,CAAC","sourcesContent":["import React from \"react\";\nimport { ArrowLeft, RefreshCw } from \"lucide-react\";\nimport { useDispatch } from \"react-redux\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport { createSolidEntityApi } from \"../../../../redux/api/solidEntityApi\";\nimport { showToast } from \"../../../../redux/features/toastSlice\";\nimport { solidPatch } from \"../../../../http/solidHttp\";\nimport { AgentRegistryAuditPanel } from \"./AgentRegistryAuditPanel\";\nimport { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload, type AgentHubTag } from \"./AgentHubTagsField\";\nimport { AgentHubModuleField, agentHubModuleFrom, agentHubModulePayload, type AgentHubModule } from \"./AgentHubModuleField\";\nimport { AgentToolActivationDialog } from \"./AgentToolActivationDialog\";\nimport { AgentToolSessionsPanel } from \"../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel\";\nimport { AgentRegistryCardWidget } from \"../../../../components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget\";\nimport { SolidButton, SolidCodeEditor, SolidDialog, SolidDialogBody, SolidIconPicker, SolidInput, SolidTabGroup } from \"../../../../components/shad-cn-ui\";\nimport \"./AgentToolRegistryEditorPage.css\";\n\nconst SharedAgentRegistryCard = AgentRegistryCardWidget as React.ComponentType<{ rowData: Record<string, any> }>;\n\ntype Agent = { id?: number | string; name?: string; title?: string; [key: string]: any };\ntype AgentToolLink = { agentRegistry?: Agent | number | string | null };\ntype ToolRecord = {\n id: number;\n name?: string;\n iconName?: string | null;\n description?: string;\n tags?: AgentHubTag[];\n module?: AgentHubModule | null;\n type?: string;\n status?: string | null;\n lastLoadError?: string | null;\n sourceCode?: string;\n checksum?: string;\n agentTools?: AgentToolLink[] | AgentToolLink | null;\n};\n\nfunction extractEntityRecord(response: unknown): Record<string, any> | undefined {\n let candidate: unknown = response;\n for (let depth = 0; depth < 3; depth += 1) {\n if (!candidate || typeof candidate !== \"object\") return undefined;\n const value = candidate as Record<string, unknown>;\n if (\"id\" in value || \"name\" in value) return value;\n candidate = value.data;\n }\n return candidate && typeof candidate === \"object\" ? candidate as Record<string, any> : undefined;\n}\n\nasync function sha256Hex(value: string): Promise<string> {\n const digest = await crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(value));\n return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction formatErrorMessage(value: unknown): string | undefined {\n if (typeof value === \"string\") return value.trim() || undefined;\n if (Array.isArray(value)) {\n const messages = value.map(formatErrorMessage).filter((message): message is string => Boolean(message));\n return messages.length ? messages.join(\"; \") : undefined;\n }\n if (value && typeof value === \"object\") {\n const error = value as Record<string, unknown>;\n return formatErrorMessage(error.message)\n ?? formatErrorMessage(error.constraints)\n ?? formatErrorMessage(error.error);\n }\n return undefined;\n}\n\nfunction getSaveErrorMessage(error: unknown): string {\n if (!error || typeof error !== \"object\") return \"Failed to save tool.\";\n const apiError = error as Record<string, any>;\n return formatErrorMessage(apiError.data?.data?.message)\n ?? formatErrorMessage(apiError.data?.message)\n ?? formatErrorMessage(apiError.data?.error)\n ?? formatErrorMessage(apiError.message)\n ?? \"Failed to save tool.\";\n}\n\nexport function AgentToolRegistryEditorPage() {\n const { id = \"\" } = useParams<{ id: string }>();\n const navigate = useNavigate();\n const dispatch = useDispatch();\n const entityApi = React.useMemo(() => createSolidEntityApi(\"agentToolRegistry\"), []);\n const { useCreateSolidEntityMutation, useGetSolidEntityByIdQuery, useUpdateSolidEntityMutation } = entityApi;\n const { data: response, isLoading, isFetching, refetch } = useGetSolidEntityByIdQuery(\n { id, qs: \"populate[0]=agentTools&populate[1]=agentTools.agentRegistry&populate[2]=tags&populate[3]=module\" },\n { skip: !id || id === \"new\" },\n );\n const [createTool, { isLoading: isCreating }] = useCreateSolidEntityMutation();\n const [updateTool, { isLoading: isSaving }] = useUpdateSolidEntityMutation();\n const record = extractEntityRecord(response) as ToolRecord | undefined;\n const [activeTab, setActiveTab] = React.useState(\"general\");\n const [name, setName] = React.useState(\"\");\n const [iconName, setIconName] = React.useState(\"\");\n const [description, setDescription] = React.useState(\"\");\n const [type, setType] = React.useState(\"custom\");\n const [sourceCode, setSourceCode] = React.useState(\"\");\n const [tags, setTags] = React.useState<AgentHubTag[]>([]);\n const [module, setModule] = React.useState<AgentHubModule | null>(null);\n const [creatingTag, setCreatingTag] = React.useState(false);\n const [fieldErrors, setFieldErrors] = React.useState<Record<string, string>>({});\n const [auditRefreshVersion, setAuditRefreshVersion] = React.useState(0);\n const [confirmRefresh, setConfirmRefresh] = React.useState(false);\n const [activationOpen, setActivationOpen] = React.useState(false);\n const [activationTool, setActivationTool] = React.useState<{ id: number; checksum: string; name: string } | null>(null);\n const preparingActivation = React.useRef(false);\n const baseline = React.useRef(\"\");\n\n const currentForm = () => JSON.stringify({ name, iconName, description, type, sourceCode, tags, moduleId: module?.id ?? null });\n\n React.useEffect(() => {\n const nextTags = agentHubTagsFrom(record?.tags);\n const nextModule = agentHubModuleFrom(record?.module);\n setName(record?.name ?? \"\");\n setIconName(record?.iconName ?? \"\");\n setDescription(record?.description ?? \"\");\n setType(record?.type ?? \"custom\");\n setSourceCode(record?.sourceCode ?? \"\");\n setTags(nextTags);\n setModule(nextModule);\n baseline.current = JSON.stringify({ name: record?.name ?? \"\", iconName: record?.iconName ?? \"\", description: record?.description ?? \"\", type: record?.type ?? \"custom\", sourceCode: record?.sourceCode ?? \"\", tags: nextTags, moduleId: nextModule?.id ?? null });\n }, [record]);\n\n const isReadOnly = record?.type === \"solidx\";\n const isDirty = Boolean(record?.id) && currentForm() !== baseline.current;\n const requestRefresh = () => isDirty ? setConfirmRefresh(true) : void refetch();\n\n const save = async (nextStatus?: \"inactive\") => {\n if (creatingTag) return;\n const nextErrors: Record<string, string> = {};\n if (!name.trim()) nextErrors.name = \"Name is required.\";\n if (!description.trim()) nextErrors.description = \"Description is required.\";\n if (!type.trim()) nextErrors.type = \"Tool type is required.\";\n if (!sourceCode.trim()) nextErrors.sourceCode = \"Tool source code is required.\";\n if (!module) nextErrors.module = \"Module is required. Select a module before saving this tool.\";\n\n setFieldErrors(nextErrors);\n if (Object.keys(nextErrors).length > 0) {\n setActiveTab(nextErrors.sourceCode ? \"tool\" : \"general\");\n dispatch(showToast({ severity: \"error\", summary: \"Missing information\", detail: Object.values(nextErrors).join(\" \") }));\n return;\n }\n const payload = {\n name: name.trim(), iconName: iconName || null, description: description.trim(), type,\n sourceCode, ...agentHubTagsPayload(tags), ...agentHubModulePayload(module),\n ...([\"custom\", \"thirdparty\"].includes(type) ? { checksum: await sha256Hex(sourceCode) } : {}),\n status: nextStatus ?? (record && (sourceCode !== record.sourceCode || name.trim() !== record.name || type !== record.type)\n ? \"inactive\" : record?.status ?? \"inactive\"),\n };\n try {\n if (record?.id) {\n const result = await updateTool({ id: record.id, data: payload }).unwrap();\n dispatch(showToast({ severity: \"success\", summary: nextStatus ? \"Tool status updated\" : \"Saved\", detail: nextStatus ? `Tool moved to ${nextStatus}. Restart linked agent processes to apply the change.` : \"Tool updated successfully.\" }));\n setAuditRefreshVersion((version) => version + 1);\n refetch();\n return (extractEntityRecord(result) ?? { ...record, ...payload }) as ToolRecord;\n } else {\n const result: any = await createTool(payload).unwrap();\n const createdId = result?.data?.id ?? result?.id;\n dispatch(showToast({ severity: \"success\", summary: \"Created\", detail: \"Tool created successfully.\" }));\n if (createdId) navigate(`/admin/core/solid-core/agent-tool-registry/editor/${createdId}`, { replace: true });\n }\n } catch (error: any) {\n const errorDetail = getSaveErrorMessage(error);\n const serverFieldErrors: Record<string, string> = {};\n if (/required|not be empty|cannot be empty|should not be empty/i.test(errorDetail)) {\n for (const field of [\"name\", \"description\", \"type\", \"sourceCode\", \"module\"]) {\n if (!new RegExp(`\\\\b${field}\\\\b`, \"i\").test(errorDetail)) continue;\n const label = field === \"sourceCode\" ? \"Tool source code\" : field === \"module\" ? \"Module\" : field[0].toUpperCase() + field.slice(1);\n serverFieldErrors[field] = `${label} is required.`;\n }\n }\n if (Object.keys(serverFieldErrors).length > 0) {\n setFieldErrors(serverFieldErrors);\n setActiveTab(serverFieldErrors.sourceCode ? \"tool\" : \"general\");\n }\n dispatch(showToast({ severity: \"error\", summary: \"Save failed\", detail: errorDetail }));\n }\n };\n\n const beginActivation = async () => {\n if (isReadOnly) return;\n if (!record || activationOpen || isSaving || preparingActivation.current) return;\n preparingActivation.current = true;\n try {\n const saved = isDirty || record.status === \"load_failed\" ? await save(\"inactive\") : record;\n if (!saved?.id) return;\n const checksum = await sha256Hex(saved.sourceCode ?? sourceCode);\n setActivationTool({ id: saved.id, checksum, name: saved.name ?? name });\n setActivationOpen(true);\n } catch {\n dispatch(showToast({ severity: \"error\", summary: \"Activation failed\", detail: \"Could not prepare the saved tool source for checks.\" }));\n } finally {\n preparingActivation.current = false;\n }\n };\n\n const agents = React.useMemo(() => {\n const relatedTools = record?.agentTools;\n const links = Array.isArray(relatedTools) ? relatedTools : relatedTools ? [relatedTools] : [];\n const seen = new Set<string>();\n return links.map((link) => link.agentRegistry).filter((agent): agent is Agent => Boolean(agent && typeof agent === \"object\"))\n .filter((agent) => {\n const key = String(agent.id ?? agent.name ?? agent.title ?? \"\");\n if (!key || seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n }, [record?.agentTools]);\n const sessionAgents = React.useMemo(() => agents.filter((agent): agent is Agent & { id: number | string } => agent.id !== undefined && agent.id !== null), [agents]);\n const tabs = [\n { value: \"general\", label: \"General Info\", content: <fieldset className=\"agent-tool-editor__general\" disabled={isReadOnly}>\n {isReadOnly && <p className=\"agent-tool-editor__readonly-note\">SolidX tools cannot be edited.</p>}\n {record?.status && <section className={`agent-tool-editor__runtime-status${record.status === \"load_failed\" ? \" agent-tool-editor__runtime-status--failed\" : \"\"}`} role={record.status === \"load_failed\" ? \"alert\" : \"status\"}>\n <div className=\"agent-tool-editor__runtime-heading\"><strong>Runtime status</strong><span>{record.status.replace(/[_-]+/g, \" \")}</span></div>\n {record.status === \"load_failed\" ? <>\n <p>The AgentHub runtime could not load this tool. After correcting its source or checksum, restart linked agent processes so the runtime retries loading it.</p>\n {record.lastLoadError && <pre>{record.lastLoadError}</pre>}\n </> : <p>{record.lastLoadError || \"No tool load error has been reported.\"}</p>}\n </section>}\n <div className=\"agent-tool-editor__fields\">\n <label className=\"agent-tool-editor__field\"><span>Name <b>*</b></span><SolidInput value={name} aria-invalid={Boolean(fieldErrors.name)} aria-describedby={fieldErrors.name ? \"agent-tool-name-error\" : undefined} className={fieldErrors.name ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setName(e.target.value); setFieldErrors((current) => ({ ...current, name: \"\" })); }} />{fieldErrors.name && <small id=\"agent-tool-name-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.name}</small>}</label>\n <div className=\"agent-tool-editor__field\"><span>Icon</span><SolidIconPicker value={iconName} onChange={setIconName} /></div>\n <label className=\"agent-tool-editor__field\"><span>Description <b>*</b></span><SolidInput value={description} aria-invalid={Boolean(fieldErrors.description)} aria-describedby={fieldErrors.description ? \"agent-tool-description-error\" : undefined} className={fieldErrors.description ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setDescription(e.target.value); setFieldErrors((current) => ({ ...current, description: \"\" })); }} />{fieldErrors.description && <small id=\"agent-tool-description-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.description}</small>}</label>\n </div>\n {!record?.id && <label className=\"agent-tool-editor__field\"><span>Tool status</span><select value=\"inactive\" disabled aria-label=\"Tool status\"><option value=\"inactive\">Inactive</option></select><small>New tools start inactive. Run configuration and initialization checks to activate.</small></label>}\n <label className=\"agent-tool-editor__field\"><span>Tool type <b>*</b></span><select value={type} aria-invalid={Boolean(fieldErrors.type)} aria-describedby={fieldErrors.type ? \"agent-tool-type-error\" : undefined} className={fieldErrors.type ? \"agent-tool-editor__input--invalid\" : undefined} onChange={(e) => { setType(e.target.value); setFieldErrors((current) => ({ ...current, type: \"\" })); }}>\n {isReadOnly && <option value=\"solidx\">SolidX</option>}<option value=\"thirdparty\">Third Party</option><option value=\"custom\">Custom</option>\n </select>{fieldErrors.type && <small id=\"agent-tool-type-error\" className=\"agent-tool-editor__field-error\">{fieldErrors.type}</small>}</label>\n <AgentHubModuleField className=\"agent-tool-editor__field\" value={module} onChange={(value) => { setModule(value); setFieldErrors((current) => ({ ...current, module: \"\" })); }} disabled={isReadOnly || isCreating || isSaving} clearable={false} required error={fieldErrors.module} />\n <AgentHubTagsField value={tags} onChange={setTags} module={module} disabled={isReadOnly || isCreating || isSaving} onBusyChange={setCreatingTag} />\n {record?.id && <section className=\"agent-tool-editor__workflow\" aria-labelledby=\"agent-tool-lifecycle-title\">\n <div className=\"agent-tool-editor__workflow-head\"><div><h2 id=\"agent-tool-lifecycle-title\">Tool lifecycle</h2><p>Configuration and initialization must pass before this tool can be activated.</p></div></div>\n <div className=\"agent-tool-editor__workflow-stages\" aria-label={`Current tool stage: ${(record.status ?? \"inactive\").replace(/[_-]+/g, \" \")}`}>\n {([ [\"active\", \"Active\", \"Enabled for loading into linked agents.\"], [\"inactive\", \"Inactive\", \"Not loaded for linked agents.\"], [\"load_failed\", \"Load failed\", \"AgentHub could not load this tool.\"] ] as const).map(([value, label, description], index) => {\n const currentStatus = record.status ?? \"inactive\";\n const isCurrent = currentStatus === value;\n const canRetry = value === \"load_failed\" && isCurrent;\n const disabled = isReadOnly || activationOpen || isCreating || isSaving || (!canRetry && (value === \"load_failed\" || isCurrent));\n return <React.Fragment key={value}>\n {index > 0 && <div className=\"agent-tool-editor__workflow-connector\" aria-hidden=\"true\" />}\n <button type=\"button\" className={`agent-tool-editor__workflow-stage agent-tool-editor__workflow-stage--${value}${isCurrent ? \" is-current\" : \"\"}`}\n aria-current={isCurrent ? \"step\" : undefined} aria-pressed={isCurrent} disabled={disabled}\n onClick={() => value === \"inactive\" ? void save(\"inactive\") : void beginActivation()}>\n <span className=\"agent-tool-editor__workflow-mark\">{index + 1}</span>\n <span className=\"agent-tool-editor__workflow-copy\"><strong>{label}</strong><small>{description}</small><small className=\"agent-tool-editor__workflow-cta\">{canRetry ? \"Run checks and retry activation\" : isCurrent ? \"Current stage\" : value === \"load_failed\" ? \"Set automatically by AgentHub\" : value === \"active\" ? \"Run checks to activate\" : \"Click to deactivate\"}</small></span>\n {isCurrent && <span className=\"agent-tool-editor__workflow-current\">Current</span>}\n </button>\n </React.Fragment>;\n })}\n </div>\n {record.status === \"load_failed\" && <small className=\"agent-tool-editor__workflow-hint\">Fix the source or checksum, then run configuration and initialization checks before retrying activation.</small>}\n <small className=\"agent-tool-editor__workflow-hint\">Activation checks use the saved tool configuration. Restart linked agent processes to apply status changes.</small>\n </section>}\n </fieldset> },\n { value: \"tool\", label: \"Tool\", content: <div className=\"agent-tool-editor__tool\">\n <section className=\"agent-tool-editor__panel\">\n <header><h2>Tool source code <b>*</b></h2><p>Write the tool's Python code here.</p></header>\n <SolidCodeEditor value={sourceCode} onChange={(value) => { setSourceCode(value ?? \"\"); setFieldErrors((current) => ({ ...current, sourceCode: \"\" })); }} language=\"python\" wordWrap=\"on\" readOnly={isReadOnly} fontSize={11} height=\"max(32rem, calc(100dvh - 18rem))\" className={`agent-tool-editor__code${fieldErrors.sourceCode ? \" agent-tool-editor__code--invalid\" : \"\"}`} />\n {fieldErrors.sourceCode && <small className=\"agent-tool-editor__field-error agent-tool-editor__code-error\">{fieldErrors.sourceCode}</small>}\n </section>\n </div> },\n { value: \"agents\", label: \"Agents\", content: <section className=\"agent-tool-editor__agents\"><div><h2>Associated agents</h2><p>Agents linked to this tool. Associations are read-only here.</p></div>\n {isLoading ? <p>Loading associated agents…</p> : agents.length ? <div className=\"agent-tool-editor__agent-grid\">{agents.map((agent, index) => <div className=\"agent-tool-editor__agent-card\" key={String(agent.id ?? agent.name ?? index)}><SharedAgentRegistryCard rowData={agent} /></div>)}</div> : <div className=\"agent-tool-editor__empty\">No agents are currently associated with this tool.</div>}\n </section> },\n { value: \"sessions\", label: \"Sessions\", content: <AgentToolSessionsPanel agents={sessionAgents} /> },\n ];\n\n return <main className=\"agent-tool-editor\">\n <header className=\"agent-tool-editor__header\"><div><div className=\"agent-tool-editor__heading-with-refresh\"><h1>{record ? \"Edit Tool\" : \"Create Tool\"}</h1>{record?.id && <button type=\"button\" className={`agent-tool-editor__refresh${isFetching ? \" is-loading\" : \"\"}`} aria-label=\"Refresh tool\" title=\"Refresh tool\" disabled={isFetching || isSaving} onClick={requestRefresh}><RefreshCw size={14} /></button>}</div></div><div className=\"agent-tool-editor__actions\">\n <SolidButton variant=\"secondary\" leftIcon={<ArrowLeft size={16} />} onClick={() => navigate(-1)}>Back</SolidButton>\n {!isReadOnly && <SolidButton disabled={activationOpen || creatingTag} loading={isCreating || isSaving} onClick={() => void save()}>Save Tool</SolidButton>}\n </div></header>\n <SolidDialog open={confirmRefresh} onOpenChange={setConfirmRefresh} header=\"Discard unsaved changes?\" style={{ width: \"min(28rem, 94vw)\" }}\n 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></>}>\n <SolidDialogBody><p>You have unsaved changes. Refreshing will discard them and load the latest tool content.</p></SolidDialogBody>\n </SolidDialog>\n {activationOpen && activationTool && <AgentToolActivationDialog open={activationOpen} onOpenChange={setActivationOpen}\n toolId={activationTool.id} checksum={activationTool.checksum} toolName={activationTool.name}\n onActivated={async () => {\n await solidPatch(`/agent-tool-registry/${activationTool.id}`, { status: \"active\", checksum: activationTool.checksum });\n setAuditRefreshVersion((version) => version + 1);\n void refetch();\n dispatch(showToast({ severity: \"success\", summary: \"Tool activated\", detail: \"Configuration and initialization checks passed.\" }));\n }} />}\n {isLoading ? <div className=\"agent-tool-editor__loading\">Loading tool…</div> : record?.id ? (\n <AgentRegistryAuditPanel modelSingularName=\"agentToolRegistry\" recordId={record.id} refreshVersion={auditRefreshVersion} modelUserKey={record.name}>\n <SolidTabGroup tabs={tabs} value={activeTab} onValueChange={setActiveTab} className=\"agent-tool-editor__tabs\" listClassName=\"agent-tool-editor__tab-list\" panelClassName=\"agent-tool-editor__tab-panel\" />\n </AgentRegistryAuditPanel>\n ) : <SolidTabGroup tabs={tabs} value={activeTab} onValueChange={setActiveTab} className=\"agent-tool-editor__tabs\" listClassName=\"agent-tool-editor__tab-list\" panelClassName=\"agent-tool-editor__tab-panel\" />}\n </main>;\n}\n"]}
|
|
@@ -7,6 +7,7 @@ import { showToast } from "../../../../redux/features/toastSlice";
|
|
|
7
7
|
import { solidPatch } from "../../../../http/solidHttp";
|
|
8
8
|
import { AgentRegistryAuditPanel } from "./AgentRegistryAuditPanel";
|
|
9
9
|
import { AgentHubTagsField, agentHubTagsFrom, agentHubTagsPayload, type AgentHubTag } from "./AgentHubTagsField";
|
|
10
|
+
import { AgentHubModuleField, agentHubModuleFrom, agentHubModulePayload, type AgentHubModule } from "./AgentHubModuleField";
|
|
10
11
|
import { AgentToolActivationDialog } from "./AgentToolActivationDialog";
|
|
11
12
|
import { AgentToolSessionsPanel } from "../../../../components/core/extension/solid-core/agentToolRegistry/AgentToolSessionsPanel";
|
|
12
13
|
import { AgentRegistryCardWidget } from "../../../../components/core/extension/solid-core/agentRegistry/card/AgentRegistryCardWidget";
|
|
@@ -23,6 +24,7 @@ type ToolRecord = {
|
|
|
23
24
|
iconName?: string | null;
|
|
24
25
|
description?: string;
|
|
25
26
|
tags?: AgentHubTag[];
|
|
27
|
+
module?: AgentHubModule | null;
|
|
26
28
|
type?: string;
|
|
27
29
|
status?: string | null;
|
|
28
30
|
lastLoadError?: string | null;
|
|
@@ -79,7 +81,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
79
81
|
const entityApi = React.useMemo(() => createSolidEntityApi("agentToolRegistry"), []);
|
|
80
82
|
const { useCreateSolidEntityMutation, useGetSolidEntityByIdQuery, useUpdateSolidEntityMutation } = entityApi;
|
|
81
83
|
const { data: response, isLoading, isFetching, refetch } = useGetSolidEntityByIdQuery(
|
|
82
|
-
{ id, qs: "populate[0]=agentTools&populate[1]=agentTools.agentRegistry&populate[2]=tags" },
|
|
84
|
+
{ id, qs: "populate[0]=agentTools&populate[1]=agentTools.agentRegistry&populate[2]=tags&populate[3]=module" },
|
|
83
85
|
{ skip: !id || id === "new" },
|
|
84
86
|
);
|
|
85
87
|
const [createTool, { isLoading: isCreating }] = useCreateSolidEntityMutation();
|
|
@@ -92,6 +94,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
92
94
|
const [type, setType] = React.useState("custom");
|
|
93
95
|
const [sourceCode, setSourceCode] = React.useState("");
|
|
94
96
|
const [tags, setTags] = React.useState<AgentHubTag[]>([]);
|
|
97
|
+
const [module, setModule] = React.useState<AgentHubModule | null>(null);
|
|
95
98
|
const [creatingTag, setCreatingTag] = React.useState(false);
|
|
96
99
|
const [fieldErrors, setFieldErrors] = React.useState<Record<string, string>>({});
|
|
97
100
|
const [auditRefreshVersion, setAuditRefreshVersion] = React.useState(0);
|
|
@@ -101,17 +104,19 @@ export function AgentToolRegistryEditorPage() {
|
|
|
101
104
|
const preparingActivation = React.useRef(false);
|
|
102
105
|
const baseline = React.useRef("");
|
|
103
106
|
|
|
104
|
-
const currentForm = () => JSON.stringify({ name, iconName, description, type, sourceCode, tags });
|
|
107
|
+
const currentForm = () => JSON.stringify({ name, iconName, description, type, sourceCode, tags, moduleId: module?.id ?? null });
|
|
105
108
|
|
|
106
109
|
React.useEffect(() => {
|
|
107
110
|
const nextTags = agentHubTagsFrom(record?.tags);
|
|
111
|
+
const nextModule = agentHubModuleFrom(record?.module);
|
|
108
112
|
setName(record?.name ?? "");
|
|
109
113
|
setIconName(record?.iconName ?? "");
|
|
110
114
|
setDescription(record?.description ?? "");
|
|
111
115
|
setType(record?.type ?? "custom");
|
|
112
116
|
setSourceCode(record?.sourceCode ?? "");
|
|
113
117
|
setTags(nextTags);
|
|
114
|
-
|
|
118
|
+
setModule(nextModule);
|
|
119
|
+
baseline.current = JSON.stringify({ name: record?.name ?? "", iconName: record?.iconName ?? "", description: record?.description ?? "", type: record?.type ?? "custom", sourceCode: record?.sourceCode ?? "", tags: nextTags, moduleId: nextModule?.id ?? null });
|
|
115
120
|
}, [record]);
|
|
116
121
|
|
|
117
122
|
const isReadOnly = record?.type === "solidx";
|
|
@@ -125,6 +130,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
125
130
|
if (!description.trim()) nextErrors.description = "Description is required.";
|
|
126
131
|
if (!type.trim()) nextErrors.type = "Tool type is required.";
|
|
127
132
|
if (!sourceCode.trim()) nextErrors.sourceCode = "Tool source code is required.";
|
|
133
|
+
if (!module) nextErrors.module = "Module is required. Select a module before saving this tool.";
|
|
128
134
|
|
|
129
135
|
setFieldErrors(nextErrors);
|
|
130
136
|
if (Object.keys(nextErrors).length > 0) {
|
|
@@ -134,7 +140,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
134
140
|
}
|
|
135
141
|
const payload = {
|
|
136
142
|
name: name.trim(), iconName: iconName || null, description: description.trim(), type,
|
|
137
|
-
sourceCode, ...agentHubTagsPayload(tags),
|
|
143
|
+
sourceCode, ...agentHubTagsPayload(tags), ...agentHubModulePayload(module),
|
|
138
144
|
...(["custom", "thirdparty"].includes(type) ? { checksum: await sha256Hex(sourceCode) } : {}),
|
|
139
145
|
status: nextStatus ?? (record && (sourceCode !== record.sourceCode || name.trim() !== record.name || type !== record.type)
|
|
140
146
|
? "inactive" : record?.status ?? "inactive"),
|
|
@@ -156,9 +162,9 @@ export function AgentToolRegistryEditorPage() {
|
|
|
156
162
|
const errorDetail = getSaveErrorMessage(error);
|
|
157
163
|
const serverFieldErrors: Record<string, string> = {};
|
|
158
164
|
if (/required|not be empty|cannot be empty|should not be empty/i.test(errorDetail)) {
|
|
159
|
-
for (const field of ["name", "description", "type", "sourceCode"]) {
|
|
165
|
+
for (const field of ["name", "description", "type", "sourceCode", "module"]) {
|
|
160
166
|
if (!new RegExp(`\\b${field}\\b`, "i").test(errorDetail)) continue;
|
|
161
|
-
const label = field === "sourceCode" ? "Tool source code" : field[0].toUpperCase() + field.slice(1);
|
|
167
|
+
const label = field === "sourceCode" ? "Tool source code" : field === "module" ? "Module" : field[0].toUpperCase() + field.slice(1);
|
|
162
168
|
serverFieldErrors[field] = `${label} is required.`;
|
|
163
169
|
}
|
|
164
170
|
}
|
|
@@ -202,7 +208,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
202
208
|
const sessionAgents = React.useMemo(() => agents.filter((agent): agent is Agent & { id: number | string } => agent.id !== undefined && agent.id !== null), [agents]);
|
|
203
209
|
const tabs = [
|
|
204
210
|
{ value: "general", label: "General Info", content: <fieldset className="agent-tool-editor__general" disabled={isReadOnly}>
|
|
205
|
-
{isReadOnly && <p className="agent-tool-editor__readonly-note">SolidX tools
|
|
211
|
+
{isReadOnly && <p className="agent-tool-editor__readonly-note">SolidX tools cannot be edited.</p>}
|
|
206
212
|
{record?.status && <section className={`agent-tool-editor__runtime-status${record.status === "load_failed" ? " agent-tool-editor__runtime-status--failed" : ""}`} role={record.status === "load_failed" ? "alert" : "status"}>
|
|
207
213
|
<div className="agent-tool-editor__runtime-heading"><strong>Runtime status</strong><span>{record.status.replace(/[_-]+/g, " ")}</span></div>
|
|
208
214
|
{record.status === "load_failed" ? <>
|
|
@@ -219,7 +225,8 @@ export function AgentToolRegistryEditorPage() {
|
|
|
219
225
|
<label className="agent-tool-editor__field"><span>Tool type <b>*</b></span><select value={type} aria-invalid={Boolean(fieldErrors.type)} aria-describedby={fieldErrors.type ? "agent-tool-type-error" : undefined} className={fieldErrors.type ? "agent-tool-editor__input--invalid" : undefined} onChange={(e) => { setType(e.target.value); setFieldErrors((current) => ({ ...current, type: "" })); }}>
|
|
220
226
|
{isReadOnly && <option value="solidx">SolidX</option>}<option value="thirdparty">Third Party</option><option value="custom">Custom</option>
|
|
221
227
|
</select>{fieldErrors.type && <small id="agent-tool-type-error" className="agent-tool-editor__field-error">{fieldErrors.type}</small>}</label>
|
|
222
|
-
<
|
|
228
|
+
<AgentHubModuleField className="agent-tool-editor__field" value={module} onChange={(value) => { setModule(value); setFieldErrors((current) => ({ ...current, module: "" })); }} disabled={isReadOnly || isCreating || isSaving} clearable={false} required error={fieldErrors.module} />
|
|
229
|
+
<AgentHubTagsField value={tags} onChange={setTags} module={module} disabled={isReadOnly || isCreating || isSaving} onBusyChange={setCreatingTag} />
|
|
223
230
|
{record?.id && <section className="agent-tool-editor__workflow" aria-labelledby="agent-tool-lifecycle-title">
|
|
224
231
|
<div className="agent-tool-editor__workflow-head"><div><h2 id="agent-tool-lifecycle-title">Tool lifecycle</h2><p>Configuration and initialization must pass before this tool can be activated.</p></div></div>
|
|
225
232
|
<div className="agent-tool-editor__workflow-stages" aria-label={`Current tool stage: ${(record.status ?? "inactive").replace(/[_-]+/g, " ")}`}>
|
|
@@ -247,7 +254,7 @@ export function AgentToolRegistryEditorPage() {
|
|
|
247
254
|
{ value: "tool", label: "Tool", content: <div className="agent-tool-editor__tool">
|
|
248
255
|
<section className="agent-tool-editor__panel">
|
|
249
256
|
<header><h2>Tool source code <b>*</b></h2><p>Write the tool's Python code here.</p></header>
|
|
250
|
-
<SolidCodeEditor value={sourceCode} onChange={(value) => { setSourceCode(value ?? ""); setFieldErrors((current) => ({ ...current, sourceCode: "" })); }} language="python" readOnly={isReadOnly} fontSize={11} height="max(32rem, calc(100dvh - 18rem))" className={`agent-tool-editor__code${fieldErrors.sourceCode ? " agent-tool-editor__code--invalid" : ""}`} />
|
|
257
|
+
<SolidCodeEditor value={sourceCode} onChange={(value) => { setSourceCode(value ?? ""); setFieldErrors((current) => ({ ...current, sourceCode: "" })); }} language="python" wordWrap="on" readOnly={isReadOnly} fontSize={11} height="max(32rem, calc(100dvh - 18rem))" className={`agent-tool-editor__code${fieldErrors.sourceCode ? " agent-tool-editor__code--invalid" : ""}`} />
|
|
251
258
|
{fieldErrors.sourceCode && <small className="agent-tool-editor__field-error agent-tool-editor__code-error">{fieldErrors.sourceCode}</small>}
|
|
252
259
|
</section>
|
|
253
260
|
</div> },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArchivedChatterMessagesPage.d.ts","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArchivedChatterMessagesPage.d.ts","sourceRoot":"","sources":["../../../../../src/routes/pages/admin/core/ArchivedChatterMessagesPage.tsx"],"names":[],"mappings":"AA+CA,wBAAgB,2BAA2B,4CAkQ1C"}
|
|
@@ -48,61 +48,173 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
49
49
|
import React from 'react';
|
|
50
50
|
import qs from 'qs';
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
51
|
+
import { Loader2 } from 'lucide-react';
|
|
52
|
+
import { SolidAutocomplete } from '../../../../components/shad-cn-ui/SolidAutocomplete';
|
|
53
|
+
import { Column, SolidDataTable } from '../../../../components/core/list/SolidDataTable';
|
|
54
|
+
import { useLazyGetModelsQuery } from '../../../../redux/api/modelApi';
|
|
55
|
+
import { createSolidEntityApi } from '../../../../redux/api/solidEntityApi';
|
|
53
56
|
import { useGetArchivedChatterMessagesQuery, useLazyGetArchivedChatterMessageQuery } from '../../../../redux/api/solidChatterMessageApi';
|
|
54
|
-
var
|
|
57
|
+
var DEFAULT_PAGE_SIZE = 25;
|
|
58
|
+
var PAGE_SIZE_OPTIONS = [10, 25, 50, 100];
|
|
59
|
+
var MESSAGE_TYPES = [
|
|
60
|
+
{ label: 'All types', value: '' },
|
|
61
|
+
{ label: 'Audit', value: 'audit' },
|
|
62
|
+
{ label: 'Custom', value: 'custom' },
|
|
63
|
+
];
|
|
64
|
+
var MESSAGE_SUBTYPES = [
|
|
65
|
+
{ label: 'All subtypes', value: '' },
|
|
66
|
+
{ label: 'Audit insert', value: 'audit_insert' },
|
|
67
|
+
{ label: 'Audit update', value: 'audit_update' },
|
|
68
|
+
{ label: 'Audit delete', value: 'audit_delete' },
|
|
69
|
+
{ label: 'Custom', value: 'custom' },
|
|
70
|
+
{ label: 'Note', value: 'note' },
|
|
71
|
+
{ label: 'Task', value: 'task' },
|
|
72
|
+
];
|
|
73
|
+
var userApi = createSolidEntityApi('User');
|
|
74
|
+
var buildQueryString = function (query) {
|
|
75
|
+
return qs.stringify(query, { encodeValuesOnly: true });
|
|
76
|
+
};
|
|
77
|
+
function toLocalDateBoundary(value, endOfDay) {
|
|
78
|
+
if (endOfDay === void 0) { endOfDay = false; }
|
|
79
|
+
var date = new Date("".concat(value, "T").concat(endOfDay ? '23:59:59.999' : '00:00:00'));
|
|
80
|
+
return date.toISOString();
|
|
81
|
+
}
|
|
55
82
|
export function ArchivedChatterMessagesPage() {
|
|
56
83
|
var _this = this;
|
|
57
84
|
var _a, _b, _c, _d, _e;
|
|
58
|
-
var _f = React.useState({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
85
|
+
var _f = React.useState({
|
|
86
|
+
entity: null,
|
|
87
|
+
entityId: '',
|
|
88
|
+
messageType: '',
|
|
89
|
+
messageSubType: '',
|
|
90
|
+
user: null,
|
|
91
|
+
from: '',
|
|
92
|
+
to: '',
|
|
93
|
+
}), filters = _f[0], setFilters = _f[1];
|
|
94
|
+
var _g = React.useState(0), first = _g[0], setFirst = _g[1];
|
|
95
|
+
var _h = React.useState(DEFAULT_PAGE_SIZE), rows = _h[0], setRows = _h[1];
|
|
96
|
+
var _j = React.useState(null), selectedId = _j[0], setSelectedId = _j[1];
|
|
97
|
+
var _k = React.useState([]), modelOptions = _k[0], setModelOptions = _k[1];
|
|
98
|
+
var _l = React.useState([]), userOptions = _l[0], setUserOptions = _l[1];
|
|
99
|
+
var _m = useLazyGetModelsQuery(), getModels = _m[0], modelsData = _m[1].data;
|
|
100
|
+
var getUsers = userApi.useLazyGetSolidEntitiesQuery()[0];
|
|
101
|
+
var _o = useGetArchivedChatterMessagesQuery(React.useMemo(function () {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
var query = {
|
|
104
|
+
limit: rows,
|
|
105
|
+
offset: first,
|
|
106
|
+
sort: ['createdAt:DESC'],
|
|
107
|
+
};
|
|
63
108
|
var where = {};
|
|
64
|
-
if (filters.
|
|
65
|
-
where.coModelName = { $
|
|
66
|
-
if (filters.entityId.trim() && Number.isFinite(Number(filters.entityId)))
|
|
109
|
+
if ((_a = filters.entity) === null || _a === void 0 ? void 0 : _a.value)
|
|
110
|
+
where.coModelName = { $eq: filters.entity.value };
|
|
111
|
+
if (filters.entityId.trim() && Number.isFinite(Number(filters.entityId))) {
|
|
67
112
|
where.coModelEntityId = { $eq: Number(filters.entityId) };
|
|
113
|
+
}
|
|
68
114
|
if (filters.messageType)
|
|
69
115
|
where.messageType = { $eq: filters.messageType };
|
|
70
|
-
if (filters.messageSubType
|
|
71
|
-
where.messageSubType = { $
|
|
72
|
-
if (filters.user.
|
|
73
|
-
where.user = {
|
|
116
|
+
if (filters.messageSubType)
|
|
117
|
+
where.messageSubType = { $eq: filters.messageSubType };
|
|
118
|
+
if ((_b = filters.user) === null || _b === void 0 ? void 0 : _b.value)
|
|
119
|
+
where.user = { id: { $eq: filters.user.value } };
|
|
74
120
|
if (filters.from || filters.to) {
|
|
75
121
|
where.createdAt = {};
|
|
76
122
|
if (filters.from)
|
|
77
|
-
where.createdAt.$gte =
|
|
123
|
+
where.createdAt.$gte = toLocalDateBoundary(filters.from);
|
|
78
124
|
if (filters.to)
|
|
79
|
-
where.createdAt.$lte =
|
|
125
|
+
where.createdAt.$lte = toLocalDateBoundary(filters.to, true);
|
|
80
126
|
}
|
|
81
127
|
if (Object.keys(where).length)
|
|
82
128
|
query.filters = where;
|
|
83
|
-
query
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var _j = useGetArchivedChatterMessagesQuery(queryString), data = _j.data, isLoading = _j.isLoading, isFetching = _j.isFetching, error = _j.error;
|
|
87
|
-
var _k = useLazyGetArchivedChatterMessageQuery(), fetchOne = _k[0], _l = _k[1], detailData = _l.data, detailLoading = _l.isFetching;
|
|
129
|
+
return buildQueryString(query);
|
|
130
|
+
}, [filters, first, rows])), data = _o.data, isLoading = _o.isLoading, isError = _o.isError;
|
|
131
|
+
var _p = useLazyGetArchivedChatterMessageQuery(), fetchOne = _p[0], _q = _p[1], detailData = _q.currentData, detailLoading = _q.isFetching;
|
|
88
132
|
var records = (_a = data === null || data === void 0 ? void 0 : data.records) !== null && _a !== void 0 ? _a : [];
|
|
89
133
|
var meta = (_b = data === null || data === void 0 ? void 0 : data.meta) !== null && _b !== void 0 ? _b : {};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
134
|
+
React.useEffect(function () {
|
|
135
|
+
getModels('offset=0&limit=1000&sort[0]=displayName%3AASC');
|
|
136
|
+
}, [getModels]);
|
|
137
|
+
React.useEffect(function () {
|
|
138
|
+
var _a;
|
|
139
|
+
var options = ((_a = modelsData === null || modelsData === void 0 ? void 0 : modelsData.records) !== null && _a !== void 0 ? _a : [])
|
|
140
|
+
.filter(function (model) { return model === null || model === void 0 ? void 0 : model.singularName; })
|
|
141
|
+
.map(function (model) { return ({
|
|
142
|
+
label: model.displayName && model.displayName !== model.singularName
|
|
143
|
+
? "".concat(model.displayName, " (").concat(model.singularName, ")")
|
|
144
|
+
: model.singularName,
|
|
145
|
+
value: model.singularName,
|
|
146
|
+
}); });
|
|
147
|
+
setModelOptions(options);
|
|
148
|
+
}, [modelsData]);
|
|
149
|
+
var updateFilter = function (key, value) {
|
|
150
|
+
setFirst(0);
|
|
151
|
+
setFilters(function (current) {
|
|
152
|
+
var _a;
|
|
153
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = value, _a)));
|
|
100
154
|
});
|
|
101
|
-
}
|
|
155
|
+
};
|
|
156
|
+
var completeModels = function (_a) {
|
|
157
|
+
var _b;
|
|
158
|
+
var query = _a.query;
|
|
159
|
+
var normalizedQuery = query.trim().toLocaleLowerCase();
|
|
160
|
+
setModelOptions(((_b = modelsData === null || modelsData === void 0 ? void 0 : modelsData.records) !== null && _b !== void 0 ? _b : [])
|
|
161
|
+
.filter(function (model) { return model === null || model === void 0 ? void 0 : model.singularName; })
|
|
162
|
+
.filter(function (model) {
|
|
163
|
+
var _a;
|
|
164
|
+
return !normalizedQuery ||
|
|
165
|
+
"".concat((_a = model.displayName) !== null && _a !== void 0 ? _a : '', " ").concat(model.singularName).toLocaleLowerCase().includes(normalizedQuery);
|
|
166
|
+
})
|
|
167
|
+
.slice(0, 25)
|
|
168
|
+
.map(function (model) { return ({
|
|
169
|
+
label: model.displayName && model.displayName !== model.singularName
|
|
170
|
+
? "".concat(model.displayName, " (").concat(model.singularName, ")")
|
|
171
|
+
: model.singularName,
|
|
172
|
+
value: model.singularName,
|
|
173
|
+
}); }));
|
|
174
|
+
};
|
|
175
|
+
var completeUsers = function (_a) {
|
|
176
|
+
var query = _a.query;
|
|
177
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
178
|
+
var queryString, response, users;
|
|
179
|
+
var _b, _c;
|
|
180
|
+
return __generator(this, function (_d) {
|
|
181
|
+
switch (_d.label) {
|
|
182
|
+
case 0:
|
|
183
|
+
queryString = buildQueryString({
|
|
184
|
+
offset: 0,
|
|
185
|
+
limit: 10,
|
|
186
|
+
sort: ['fullName:ASC'],
|
|
187
|
+
filters: query.trim() ? { fullName: { $containsi: query.trim() } } : {},
|
|
188
|
+
});
|
|
189
|
+
return [4 /*yield*/, getUsers(queryString)];
|
|
190
|
+
case 1:
|
|
191
|
+
response = _d.sent();
|
|
192
|
+
users = (_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : [];
|
|
193
|
+
setUserOptions(users.map(function (user) { return ({
|
|
194
|
+
label: user.fullName || user.username || "User ".concat(user.id),
|
|
195
|
+
value: user.id,
|
|
196
|
+
}); }));
|
|
197
|
+
return [2 /*return*/];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
var openRecord = function (id) {
|
|
203
|
+
setSelectedId(id);
|
|
204
|
+
void fetchOne(id);
|
|
205
|
+
};
|
|
102
206
|
var selected = detailData === null || detailData === void 0 ? void 0 : detailData.record;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
207
|
+
var emptyMessage = isLoading
|
|
208
|
+
? _jsxs("span", { className: "inline-flex items-center justify-center gap-2", children: [_jsx(Loader2, { className: "animate-spin", size: 16 }), "Loading archived messages\u2026"] })
|
|
209
|
+
: isError
|
|
210
|
+
? _jsx("span", { role: "alert", className: "text-red-600", children: "Unable to load archived messages. Check the archive store connection and try again." })
|
|
211
|
+
: 'No archived messages found';
|
|
212
|
+
return (_jsxs("div", { className: "page-parent-wrapper solid-list-page-wrapper flex h-full min-h-0 overflow-hidden", children: [_jsx("div", { className: "solid-list-content flex min-w-0 flex-grow-1 flex-col", children: _jsxs("div", { className: "solid-list-surface flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "page-header solid-list-toolbar flex-col", children: _jsxs("section", { className: "solid-list-toolbar-left grid w-full grid-cols-1 items-end gap-3 sm:grid-cols-2 xl:grid-cols-7", "aria-label": "Archived message filters", children: [_jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["Entity", _jsx(SolidAutocomplete, { dropdown: true, forceSelection: true, field: "label", value: filters.entity, suggestions: modelOptions, completeMethod: completeModels, onChange: function (event) { return updateFilter('entity', event.value); }, placeholder: "All entities", className: "w-full solid-standard-autocomplete", inputClassName: "w-full solid-filter-compact-control", emptyMessage: "No models found" })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["Entity ID", _jsx("input", { className: "solid-input w-full solid-filter-compact-control", type: "text", value: filters.entityId, onChange: function (event) { return updateFilter('entityId', event.target.value); }, placeholder: "Any entity ID" })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["Message type", _jsx("select", { className: "solid-input w-full solid-filter-compact-control", value: filters.messageType, onChange: function (event) { return updateFilter('messageType', event.target.value); }, children: MESSAGE_TYPES.map(function (option) { return _jsx("option", { value: option.value, children: option.label }, option.value || 'all'); }) })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["Message subtype", _jsx("select", { className: "solid-input w-full solid-filter-compact-control", value: filters.messageSubType, onChange: function (event) { return updateFilter('messageSubType', event.target.value); }, children: MESSAGE_SUBTYPES.map(function (option) { return _jsx("option", { value: option.value, children: option.label }, option.value || 'all'); }) })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["Changed by", _jsx(SolidAutocomplete, { dropdown: true, forceSelection: true, field: "label", value: filters.user, suggestions: userOptions, completeMethod: completeUsers, onChange: function (event) { return updateFilter('user', event.value); }, placeholder: "Any user", className: "w-full solid-standard-autocomplete", inputClassName: "w-full solid-filter-compact-control", emptyMessage: "No users found" })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["From", _jsx("input", { className: "solid-input w-full solid-filter-compact-control", type: "date", value: filters.from, onChange: function (event) { return updateFilter('from', event.target.value); } })] }), _jsxs("label", { className: "flex min-w-0 flex-col gap-1 text-sm", children: ["To", _jsx("input", { className: "solid-input w-full solid-filter-compact-control", type: "date", value: filters.to, onChange: function (event) { return updateFilter('to', event.target.value); } })] })] }) }), (data === null || data === void 0 ? void 0 : data.available) === false ? (_jsxs("section", { className: "m-4 rounded-md border border-border/60 bg-background p-6 text-center", role: "status", children: [_jsx("h2", { className: "m-0 text-base font-semibold", children: "Chatter archival is not enabled" }), _jsx("p", { className: "mb-0 mt-2 text-sm text-muted-foreground", children: "Configure and register an IChatterMessageArchive provider in the consuming project to archive and browse messages." })] })) : (_jsx(_Fragment, { children: _jsx("div", { className: "solid-datatable-wrapper solid-list-table-area min-h-0 flex-1 overflow-hidden", children: _jsxs(SolidDataTable, { value: records, dataKey: "id", rows: rows, first: first, totalRecords: (_c = meta.totalRecords) !== null && _c !== void 0 ? _c : records.length, rowsPerPageOptions: PAGE_SIZE_OPTIONS, onPage: function (event) {
|
|
213
|
+
setFirst(event.first);
|
|
214
|
+
setRows(event.rows);
|
|
215
|
+
}, emptyMessage: emptyMessage, viewportHeight: "100%", rowClassName: function () { return 'cursor-pointer'; }, onRowClick: function (event) { return openRecord(event.data.id); }, currentPageReportTemplate: "{first} - {last} of {totalRecords}", children: [_jsx(Column, { header: "Date", body: function (message) { return message.createdAt ? new Date(message.createdAt).toLocaleString() : '—'; } }), _jsx(Column, { header: "Entity", body: function (message) { return message.modelDisplayName || message.coModelName || '—'; } }), _jsx(Column, { header: "Entity ID", body: function (message) { var _a; return (_a = message.coModelEntityId) !== null && _a !== void 0 ? _a : '—'; } }), _jsx(Column, { header: "Type", body: function (message) { return message.messageType || '—'; } }), _jsx(Column, { header: "Subtype", body: function (message) { return message.messageSubType || '—'; } }), _jsx(Column, { header: "Changed by", body: function (message) { var _a; return ((_a = message.user) === null || _a === void 0 ? void 0 : _a.fullName) || 'System'; } }), _jsx(Column, { header: "Message", body: function (message) { return _jsx("span", { className: "line-clamp-2 min-w-48", children: message.messageBody || 'View message details' }); } })] }) }) }))] }) }), selectedId !== null && (_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4", role: "presentation", onClick: function () { return setSelectedId(null); }, children: _jsxs("section", { role: "dialog", "aria-modal": "true", "aria-label": "Archived chatter message", className: "max-h-[85vh] w-full max-w-3xl overflow-auto rounded-lg bg-background p-6 shadow-xl", onClick: function (event) { return event.stopPropagation(); }, children: [_jsxs("div", { className: "mb-4 flex items-start justify-between", children: [_jsxs("h2", { className: "m-0 text-xl font-semibold", children: ["Archived message #", selectedId] }), _jsx("button", { type: "button", className: "rounded px-2 py-1 hover:bg-muted", onClick: function () { return setSelectedId(null); }, children: "Close" })] }), detailLoading ? _jsx("p", { children: "Loading message\u2026" }) : selected ? _jsxs(_Fragment, { children: [_jsxs("dl", { className: "grid grid-cols-2 gap-3 text-sm", children: [_jsx("dt", { children: "Entity" }), _jsx("dd", { children: selected.modelDisplayName || selected.coModelName }), _jsx("dt", { children: "Entity ID" }), _jsx("dd", { children: selected.coModelEntityId }), _jsx("dt", { children: "Date" }), _jsx("dd", { children: selected.createdAt ? new Date(selected.createdAt).toLocaleString() : '—' }), _jsx("dt", { children: "Changed by" }), _jsx("dd", { children: ((_d = selected.user) === null || _d === void 0 ? void 0 : _d.fullName) || 'System' }), _jsx("dt", { children: "Type" }), _jsx("dd", { children: selected.messageType }), _jsx("dt", { children: "Subtype" }), _jsx("dd", { children: selected.messageSubType })] }), _jsx("h3", { className: "mt-5 text-base font-semibold", children: "Message" }), _jsx("pre", { className: "whitespace-pre-wrap break-words rounded bg-muted p-3 text-sm", children: selected.messageBody || '' }), !!((_e = selected.chatterMessageDetails) === null || _e === void 0 ? void 0 : _e.length) && _jsxs(_Fragment, { children: [_jsx("h3", { className: "mt-5 text-base font-semibold", children: "Change details" }), _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full text-left text-sm", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "p-2", children: "Field" }), _jsx("th", { className: "p-2", children: "Previous" }), _jsx("th", { className: "p-2", children: "Current" })] }) }), _jsx("tbody", { children: selected.chatterMessageDetails.map(function (detail, index) {
|
|
216
|
+
var _a, _b, _c, _d, _e;
|
|
217
|
+
return _jsxs("tr", { className: "border-t", children: [_jsx("td", { className: "p-2", children: detail.fieldDisplayName || detail.fieldName }), _jsx("td", { className: "p-2", children: (_b = (_a = detail.oldValueDisplay) !== null && _a !== void 0 ? _a : detail.oldValue) !== null && _b !== void 0 ? _b : '—' }), _jsx("td", { className: "p-2", children: (_d = (_c = detail.newValueDisplay) !== null && _c !== void 0 ? _c : detail.newValue) !== null && _d !== void 0 ? _d : '—' })] }, (_e = detail.id) !== null && _e !== void 0 ? _e : index);
|
|
218
|
+
}) })] }) })] })] }) : _jsx("p", { role: "alert", children: "Could not load this archived message." })] }) }))] }));
|
|
107
219
|
}
|
|
108
220
|
//# sourceMappingURL=ArchivedChatterMessagesPage.js.map
|