@solidxai/core-ui 0.1.21-beta.0 → 0.1.21-beta.5
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/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/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/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 +164 -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 +133 -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 +15 -4
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +14 -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 +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +5 -3
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +5 -3
- 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/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 +5 -1
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +557 -49
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +786 -49
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts +3 -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 +35 -11
- package/dist/components/core/solid-agent/SolidAgentHost.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.js +5 -0
- package/dist/components/core/solid-agent/SolidAgentHost.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentHost.tsx +6 -0
- 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 -25
- package/dist/components/core/solid-agent/agentEvents.js.map +1 -1
- package/dist/components/core/solid-agent/agentEvents.ts +100 -11
- 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/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 +22 -4
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +234 -34
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +203 -21
- package/dist/components/core/solid-agent/client/agentSocket.d.ts +25 -6
- package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.js +187 -38
- package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentSocket.ts +142 -23
- 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/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 +66 -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 +73 -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 +68 -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 +4 -3
- package/dist/components/core/solid-agent/useAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/useAgentChat.ts +4 -3
- 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/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 +62 -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/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +6 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +6 -0
- package/dist/helpers/routePaths.d.ts +3 -0
- package/dist/helpers/routePaths.d.ts.map +1 -1
- package/dist/helpers/routePaths.js +32 -0
- package/dist/helpers/routePaths.js.map +1 -1
- package/dist/helpers/routePaths.ts +27 -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 +2 -1
- package/dist/redux/features/agentSlice.d.ts.map +1 -1
- package/dist/redux/features/agentSlice.js +5 -1
- package/dist/redux/features/agentSlice.js.map +1 -1
- package/dist/redux/features/agentSlice.ts +9 -2
- 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 +94 -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/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 +252 -111
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +167 -21
- 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/agentConfigComparison.d.ts +84 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.d.ts.map +1 -0
- package/dist/{components/core/kanban/SolidSelectionDynamicFilterElement.js → routes/pages/admin/core/agentConfigComparison.js} +36 -34
- 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 +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.js.map +1 -1
- package/dist/routes/pages/embed/AgentEmbedPage.tsx +3 -1
- 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
- package/dist/components/auth/SolidOTPVerify.d.ts +0 -3
- package/dist/components/auth/SolidOTPVerify.d.ts.map +0 -1
- package/dist/components/auth/SolidOTPVerify.js +0 -67
- package/dist/components/auth/SolidOTPVerify.js.map +0 -1
- package/dist/components/auth/SolidOTPVerify.tsx +0 -133
- package/dist/components/common/AuthBanner.d.ts +0 -3
- package/dist/components/common/AuthBanner.d.ts.map +0 -1
- package/dist/components/common/AuthBanner.js +0 -15
- package/dist/components/common/AuthBanner.js.map +0 -1
- package/dist/components/common/AuthBanner.tsx +0 -41
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts +0 -2
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +0 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js +0 -92
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +0 -1
- package/dist/components/common/SingleSelectAutoCompleteField.tsx +0 -73
- package/dist/components/common/SolidExportStepper.d.ts +0 -12
- package/dist/components/common/SolidExportStepper.d.ts.map +0 -1
- package/dist/components/common/SolidExportStepper.js +0 -30
- package/dist/components/common/SolidExportStepper.js.map +0 -1
- package/dist/components/common/SolidExportStepper.tsx +0 -135
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +0 -2
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +0 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js +0 -50
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +0 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +0 -70
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts +0 -2
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.d.ts.map +0 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js +0 -16
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.js.map +0 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +0 -29
- package/dist/components/core/dashboard/DashboardFilter.d.ts +0 -13
- package/dist/components/core/dashboard/DashboardFilter.d.ts.map +0 -1
- package/dist/components/core/dashboard/DashboardFilter.js +0 -299
- package/dist/components/core/dashboard/DashboardFilter.js.map +0 -1
- package/dist/components/core/dashboard/DashboardFilter.tsx +0 -348
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts +0 -3
- package/dist/components/core/dashboard/PrimeDataTableWrapper.d.ts.map +0 -1
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js +0 -21
- package/dist/components/core/dashboard/PrimeDataTableWrapper.js.map +0 -1
- package/dist/components/core/dashboard/PrimeDataTableWrapper.tsx +0 -40
- package/dist/components/core/dashboard/SolidDashboard.d.ts +0 -28
- package/dist/components/core/dashboard/SolidDashboard.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboard.js +0 -183
- package/dist/components/core/dashboard/SolidDashboard.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboard.module.css +0 -83
- package/dist/components/core/dashboard/SolidDashboard.tsx +0 -263
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts +0 -24
- package/dist/components/core/dashboard/SolidDashboardBody.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardBody.js +0 -162
- package/dist/components/core/dashboard/SolidDashboardBody.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardBody.tsx +0 -168
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js +0 -11
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +0 -28
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts +0 -3
- package/dist/components/core/dashboard/SolidDashboardHeader.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardHeader.js +0 -6
- package/dist/components/core/dashboard/SolidDashboardHeader.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardHeader.tsx +0 -10
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardLoading.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardLoading.js +0 -10
- package/dist/components/core/dashboard/SolidDashboardLoading.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardLoading.tsx +0 -61
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts +0 -3
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js +0 -12
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +0 -32
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts +0 -2
- package/dist/components/core/dashboard/SolidDashboardRenderError.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardRenderError.js +0 -11
- package/dist/components/core/dashboard/SolidDashboardRenderError.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardRenderError.tsx +0 -28
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts +0 -19
- package/dist/components/core/dashboard/SolidDashboardVariable.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.js +0 -171
- package/dist/components/core/dashboard/SolidDashboardVariable.js.map +0 -1
- package/dist/components/core/dashboard/SolidDashboardVariable.tsx +0 -259
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts +0 -9
- package/dist/components/core/dashboard/SolidQuestionRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/SolidQuestionRenderer.js +0 -42
- package/dist/components/core/dashboard/SolidQuestionRenderer.js.map +0 -1
- package/dist/components/core/dashboard/SolidQuestionRenderer.tsx +0 -99
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts +0 -9
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js +0 -35
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +0 -48
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts +0 -7
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js +0 -22
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +0 -51
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts +0 -2
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.d.ts.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js +0 -4
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.js.map +0 -1
- package/dist/components/core/dashboard/chart-renderers/init-chartjs.ts +0 -25
- package/dist/components/core/dashboard/dashboard-utils.d.ts +0 -2
- package/dist/components/core/dashboard/dashboard-utils.d.ts.map +0 -1
- package/dist/components/core/dashboard/dashboard-utils.js +0 -38
- package/dist/components/core/dashboard/dashboard-utils.js.map +0 -1
- package/dist/components/core/dashboard/dashboard-utils.ts +0 -39
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts +0 -10
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js +0 -16
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardFormViewChangeHandler.ts +0 -19
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts +0 -8
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js +0 -64
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionFieldChangeHandler.ts +0 -30
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts +0 -8
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js +0 -62
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboard/dashboardQuestionOnFormLoadHandler.ts +0 -29
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts +0 -4
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js +0 -23
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.js.map +0 -1
- package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +0 -36
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts +0 -2
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js +0 -4
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.js.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorHeaderAction.ts +0 -3
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts +0 -8
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.d.ts.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js +0 -9
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.js.map +0 -1
- package/dist/components/core/extension/solid-core/workflowDefinition/list/openWorkflowDefinitionEditorRowAction.ts +0 -17
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts +0 -3
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js +0 -92
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.js.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidChatterMessageCoModelEntityIdFormViewWidget.tsx +0 -68
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts +0 -3
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.d.ts.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js +0 -111
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.js.map +0 -1
- package/dist/components/core/form/fields/widgets/SolidLovTypeChangeFormEditWidget.tsx +0 -122
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts +0 -12
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.js +0 -145
- package/dist/components/core/kanban/SolidKanbanViewFields.js.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.tsx +0 -164
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js +0 -87
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +0 -59
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +0 -50
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js +0 -20
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +0 -32
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js +0 -81
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +0 -16
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js +0 -21
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +0 -23
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js +0 -16
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +0 -20
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +0 -56
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +0 -140
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +0 -42
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +0 -164
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js +0 -11
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +0 -9
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +0 -14
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +0 -37
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +0 -121
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +0 -12
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js +0 -8
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +0 -13
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts +0 -4
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts.map +0 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js +0 -7
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +0 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +0 -16
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +0 -2
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +0 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +0 -39
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +0 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +0 -40
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/list/SolidVarInputsFilterElement.js +0 -81
- package/dist/components/core/list/SolidVarInputsFilterElement.js.map +0 -1
- package/dist/components/core/list/SolidVarInputsFilterElement.tsx +0 -184
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js +0 -87
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.js.map +0 -1
- package/dist/components/core/list/widgets/SolidChatterMessageCoModelEntityIdListViewWidget.tsx +0 -70
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js +0 -33
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.js.map +0 -1
- package/dist/components/core/list/widgets/SolidMqMessageStageListViewWidget.tsx +0 -50
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts +0 -3
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.d.ts.map +0 -1
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js +0 -158
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.js.map +0 -1
- package/dist/components/core/list/widgets/SolidSummarizeListHeaderActionMqMessages.tsx +0 -185
- package/dist/components/layout/DashboardHeader.d.ts +0 -3
- package/dist/components/layout/DashboardHeader.d.ts.map +0 -1
- package/dist/components/layout/DashboardHeader.js +0 -20
- package/dist/components/layout/DashboardHeader.js.map +0 -1
- package/dist/components/layout/DashboardHeader.tsx +0 -94
- package/dist/helpers/# no such endpoints exist, need to calle +0 -3
- package/dist/helpers/ToastContainer.d.ts +0 -4
- package/dist/helpers/ToastContainer.d.ts.map +0 -1
- package/dist/helpers/ToastContainer.js +0 -49
- package/dist/helpers/ToastContainer.js.map +0 -1
- package/dist/helpers/ToastContainer.tsx +0 -94
- package/dist/helpers/showToast.d.ts +0 -5
- package/dist/helpers/showToast.d.ts.map +0 -1
- package/dist/helpers/showToast.js +0 -17
- package/dist/helpers/showToast.js.map +0 -1
- package/dist/helpers/showToast.ts +0 -13
- package/dist/helpers/studioSandbox.d.ts +0 -31
- package/dist/helpers/studioSandbox.d.ts.map +0 -1
- package/dist/helpers/studioSandbox.js +0 -104
- package/dist/helpers/studioSandbox.js.map +0 -1
- package/dist/helpers/studioSandbox.ts +0 -117
- package/dist/nextAuth/authProviders.d.ts +0 -4
- package/dist/nextAuth/authProviders.d.ts.map +0 -1
- package/dist/nextAuth/authProviders.js +0 -198
- package/dist/nextAuth/authProviders.js.map +0 -1
- package/dist/nextAuth/authProviders.tsx +0 -232
- package/dist/nextAuth/handleLogout.d.ts +0 -2
- package/dist/nextAuth/handleLogout.d.ts.map +0 -1
- package/dist/nextAuth/handleLogout.js +0 -36
- package/dist/nextAuth/handleLogout.js.map +0 -1
- package/dist/nextAuth/handleLogout.tsx +0 -39
- package/dist/nextAuth/refreshAccessToken.d.ts +0 -2
- package/dist/nextAuth/refreshAccessToken.d.ts.map +0 -1
- package/dist/nextAuth/refreshAccessToken.js +0 -24
- package/dist/nextAuth/refreshAccessToken.js.map +0 -1
- package/dist/nextAuth/refreshAccessToken.tsx +0 -28
- package/dist/redux/api/dashboardApi.d.ts +0 -23
- package/dist/redux/api/dashboardApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardApi.js +0 -35
- package/dist/redux/api/dashboardApi.js.map +0 -1
- package/dist/redux/api/dashboardApi.ts +0 -56
- package/dist/redux/api/dashboardLayoutApi.d.ts +0 -24
- package/dist/redux/api/dashboardLayoutApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardLayoutApi.js +0 -34
- package/dist/redux/api/dashboardLayoutApi.js.map +0 -1
- package/dist/redux/api/dashboardLayoutApi.ts +0 -55
- package/dist/redux/api/dashboardQuestionApi.d.ts +0 -5
- package/dist/redux/api/dashboardQuestionApi.d.ts.map +0 -1
- package/dist/redux/api/dashboardQuestionApi.js +0 -18
- package/dist/redux/api/dashboardQuestionApi.js.map +0 -1
- package/dist/redux/api/dashboardQuestionApi.ts +0 -17
- package/dist/redux/features/settingsSlice.d.ts +0 -20
- package/dist/redux/features/settingsSlice.d.ts.map +0 -1
- package/dist/redux/features/settingsSlice.js +0 -39
- package/dist/redux/features/settingsSlice.js.map +0 -1
- package/dist/redux/features/settingsSlice.ts +0 -60
- package/dist/resources/images/Footerbg.png +0 -0
- package/dist/resources/images/LoginBanner.png +0 -0
- package/dist/resources/images/dashboard/Ellipse 1.svg +0 -10
- package/dist/resources/images/dashboard/Rectangle 17.svg +0 -10
- package/dist/resources/images/dashboard/Rectangle 25.svg +0 -11
- package/dist/resources/images/dashboard/image 5.svg +0 -9
- package/dist/resources/images/loginhero.png +0 -0
- package/dist/resources/images/logo.png +0 -0
- package/dist/resources/images/radix-logo-white.png +0 -0
- package/dist/resources/images/radix-logo.png +0 -0
- package/dist/resources/images/signupBanner.png +0 -0
- package/dist/resources/shadcn-base.css +0 -6506
- package/dist/resources/solid-primereact.css +0 -2988
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.css +0 -217
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts +0 -3
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.d.ts.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js +0 -268
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.js.map +0 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionListPage.tsx +0 -510
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ChevronRight, LoaderCircle } from "lucide-react";
|
|
3
3
|
import styles from "../SolidAgent.module.css";
|
|
4
4
|
import widgetStyles from "../widgets/solidChatWidgets.module.css";
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import { AgentEventTypes, type AgentChatItem, type AgentContext } from "../types";
|
|
7
|
-
import { toolCategory } from "../agentFormat";
|
|
8
7
|
import { SolidAgentMessageCopyButton } from "../SolidAgentMarkdown";
|
|
9
8
|
import { SolidAgentChatItem } from "./SolidAgentChatItem";
|
|
10
9
|
import { parseWidgetContent } from "./inlineWidget";
|
|
@@ -15,6 +14,7 @@ type Props = {
|
|
|
15
14
|
thinking: boolean;
|
|
16
15
|
working?: boolean;
|
|
17
16
|
hasMore: boolean;
|
|
17
|
+
loadingOlder?: boolean;
|
|
18
18
|
context?: AgentContext;
|
|
19
19
|
emptyState?: React.ReactNode;
|
|
20
20
|
onLoadOlder: () => void;
|
|
@@ -33,9 +33,6 @@ const ASSISTANT_MESSAGE_TYPES = new Set<string>([
|
|
|
33
33
|
]);
|
|
34
34
|
|
|
35
35
|
const isAssistantMessage = (item: AgentChatItem) => !item.widget && ASSISTANT_MESSAGE_TYPES.has(item.eventType);
|
|
36
|
-
const isVisibleCurrentTool = (item: AgentChatItem) =>
|
|
37
|
-
item.eventType === AgentEventTypes.toolCalling
|
|
38
|
-
&& toolCategory(item.eventData?.tool_name ?? "") !== "Context";
|
|
39
36
|
|
|
40
37
|
const assistantCopyContent = (item: AgentChatItem): string | null => {
|
|
41
38
|
if (item.widget === "markdown" || item.widget === "SolidMarkdownChatWidget") {
|
|
@@ -73,22 +70,39 @@ function groupItems(items: AgentChatItem[]): ItemGroup[] {
|
|
|
73
70
|
return groups;
|
|
74
71
|
}
|
|
75
72
|
|
|
73
|
+
function formatWorkedDuration(seconds: number): string {
|
|
74
|
+
const s = Math.max(1, seconds);
|
|
75
|
+
if (s < 60) return `${s}s`;
|
|
76
|
+
const m = Math.floor(s / 60);
|
|
77
|
+
const rem = s % 60;
|
|
78
|
+
return rem > 0 ? `${m}m ${rem}s` : `${m}m`;
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
function AgentActivityDisclosure({
|
|
77
82
|
turnKey,
|
|
78
83
|
items,
|
|
79
|
-
detailItems,
|
|
80
84
|
working,
|
|
81
|
-
showSummary,
|
|
82
85
|
renderItem,
|
|
83
86
|
}: {
|
|
84
87
|
turnKey: string;
|
|
85
88
|
items: AgentChatItem[];
|
|
86
|
-
detailItems: AgentChatItem[];
|
|
87
89
|
working: boolean;
|
|
88
|
-
showSummary: boolean;
|
|
89
90
|
renderItem: (item: AgentChatItem) => React.ReactNode;
|
|
90
91
|
}) {
|
|
91
|
-
const [expanded, setExpanded] = useState(
|
|
92
|
+
const [expanded, setExpanded] = useState(working);
|
|
93
|
+
const prevWorkingRef = useRef(working);
|
|
94
|
+
const userToggledRef = useRef(false);
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (working && !prevWorkingRef.current) {
|
|
98
|
+
userToggledRef.current = false;
|
|
99
|
+
setExpanded(true);
|
|
100
|
+
} else if (!working && prevWorkingRef.current) {
|
|
101
|
+
setExpanded(false);
|
|
102
|
+
}
|
|
103
|
+
prevWorkingRef.current = working;
|
|
104
|
+
}, [working]);
|
|
105
|
+
|
|
92
106
|
const [now, setNow] = useState(() => Date.now());
|
|
93
107
|
const hasLiveTimer = useRef(working);
|
|
94
108
|
const startTime = useRef(working ? Date.now() : (items[0]?.at || Date.now()));
|
|
@@ -105,53 +119,55 @@ function AgentActivityDisclosure({
|
|
|
105
119
|
|
|
106
120
|
const toolCount = items.filter((item) => item.eventType === AgentEventTypes.toolCalling).length;
|
|
107
121
|
const activeDuration = Math.max(0, Math.floor((now - startTime.current) / 1000));
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
|
|
123
|
+
let recordedSeconds = 0;
|
|
124
|
+
if (items.length > 1) {
|
|
125
|
+
recordedSeconds = Math.max(0, Math.floor((items[items.length - 1].at - items[0].at) / 1000));
|
|
126
|
+
}
|
|
127
|
+
const sumToolMs = items.reduce((acc, item) => acc + (Number(item.eventData?.duration_ms) || 0), 0);
|
|
128
|
+
const toolDurationSeconds = Math.round(sumToolMs / 1000);
|
|
129
|
+
|
|
130
|
+
const seconds = hasLiveTimer.current
|
|
131
|
+
? activeDuration
|
|
132
|
+
: Math.max(recordedSeconds, toolDurationSeconds, 1);
|
|
133
|
+
|
|
134
|
+
const durationLabel = formatWorkedDuration(seconds);
|
|
135
|
+
|
|
113
136
|
const summary = working
|
|
114
137
|
? `Working · ${toolCount ? `${toolCount} tool${toolCount === 1 ? "" : "s"} · ` : ""}${durationLabel}`
|
|
115
|
-
:
|
|
116
|
-
|
|
117
|
-
: `Activity · took ${durationLabel}`;
|
|
138
|
+
: `Worked for ${durationLabel}`;
|
|
139
|
+
|
|
118
140
|
const panelId = `agent-activity-${turnKey.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
119
141
|
|
|
142
|
+
if (items.length === 0 && !working) return null;
|
|
143
|
+
|
|
120
144
|
return (
|
|
121
|
-
<section className={
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<span className={widgetStyles.ActivitySummaryText}>{summary}</span>
|
|
141
|
-
</div>}
|
|
142
|
-
{expanded && (
|
|
143
|
-
<div id={panelId} className={widgetStyles.ActivityDetails}>
|
|
144
|
-
{detailItems.map(renderItem)}
|
|
145
|
-
</div>
|
|
146
|
-
)}
|
|
147
|
-
</>
|
|
145
|
+
<section className={widgetStyles.ActivityGroup} aria-label="Agent activity">
|
|
146
|
+
<button
|
|
147
|
+
type="button"
|
|
148
|
+
className={widgetStyles.ActivitySummary}
|
|
149
|
+
aria-expanded={expanded}
|
|
150
|
+
aria-controls={panelId}
|
|
151
|
+
onClick={() => {
|
|
152
|
+
userToggledRef.current = true;
|
|
153
|
+
setExpanded((value) => !value);
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
{working && <LoaderCircle size={13} className={widgetStyles.ActivitySpinner} aria-hidden="true" />}
|
|
157
|
+
<span className={widgetStyles.ActivitySummaryText}>{summary}</span>
|
|
158
|
+
<ChevronRight size={13} className={`${widgetStyles.ActivityChevron} ${expanded ? widgetStyles.ActivityChevronOpen : ""}`} aria-hidden="true" />
|
|
159
|
+
</button>
|
|
160
|
+
{expanded && items.length > 0 && (
|
|
161
|
+
<div id={panelId} className={widgetStyles.ActivityDetails}>
|
|
162
|
+
{items.map(renderItem)}
|
|
163
|
+
</div>
|
|
148
164
|
)}
|
|
149
165
|
</section>
|
|
150
166
|
);
|
|
151
167
|
}
|
|
152
168
|
|
|
153
169
|
/** Renders thread items; sticks to the bottom while new content streams unless the user scrolled up. */
|
|
154
|
-
export function AgentThread({ items, thinking, working = thinking, hasMore, context, emptyState, onLoadOlder, onReply, onPrompt }: Props) {
|
|
170
|
+
export function AgentThread({ items, thinking, working = thinking, hasMore, loadingOlder = false, context, emptyState, onLoadOlder, onReply, onPrompt }: Props) {
|
|
155
171
|
const scrollRef = useRef<HTMLDivElement>(null);
|
|
156
172
|
const pinned = useRef(true);
|
|
157
173
|
const prevHeight = useRef(0);
|
|
@@ -202,8 +218,9 @@ export function AgentThread({ items, thinking, working = thinking, hasMore, cont
|
|
|
202
218
|
return (
|
|
203
219
|
<div ref={scrollRef} className={styles.thread} role="log" aria-live="polite" aria-relevant="additions">
|
|
204
220
|
{hasMore && (
|
|
205
|
-
<button type="button" className={`${styles.btn} ${styles.loadMore}`} onClick={onLoadOlder}
|
|
206
|
-
Load earlier messages
|
|
221
|
+
<button type="button" className={`${styles.btn} ${styles.loadMore}`} onClick={onLoadOlder} disabled={loadingOlder}
|
|
222
|
+
aria-label={loadingOlder ? "Loading earlier messages" : "Load earlier messages"} title={loadingOlder ? "Loading earlier messages" : undefined}>
|
|
223
|
+
{loadingOlder ? <LoaderCircle size={14} className={styles.spinIcon} aria-hidden="true" /> : "Load earlier messages"}
|
|
207
224
|
</button>
|
|
208
225
|
)}
|
|
209
226
|
{groups.map((group) => {
|
|
@@ -217,24 +234,16 @@ export function AgentThread({ items, thinking, working = thinking, hasMore, cont
|
|
|
217
234
|
let activityItems: AgentChatItem[] = [];
|
|
218
235
|
const flushActivity = (isLatest: boolean) => {
|
|
219
236
|
if (!activityItems.length) return;
|
|
220
|
-
const currentActivity = isCurrentTurn && isLatest
|
|
221
|
-
? [...activityItems].reverse().find((item) => isVisibleCurrentTool(item) && item.live)
|
|
222
|
-
?? [...activityItems].reverse().find(isVisibleCurrentTool)
|
|
223
|
-
: undefined;
|
|
224
|
-
const detailItems = activityItems.filter((item) => item !== currentActivity);
|
|
225
237
|
const activityKey = `${group.key}-${activityItems[0].id}`;
|
|
226
238
|
turnContent.push(
|
|
227
239
|
<AgentActivityDisclosure
|
|
228
240
|
key={`activity-${activityKey}`}
|
|
229
241
|
turnKey={activityKey}
|
|
230
242
|
items={activityItems}
|
|
231
|
-
detailItems={detailItems}
|
|
232
243
|
working={isCurrentTurn && isLatest}
|
|
233
|
-
showSummary={detailItems.length > 0 || currentActivity !== undefined}
|
|
234
244
|
renderItem={renderItem}
|
|
235
245
|
/>,
|
|
236
246
|
);
|
|
237
|
-
if (currentActivity) turnContent.push(renderItem(currentActivity));
|
|
238
247
|
activityItems = [];
|
|
239
248
|
};
|
|
240
249
|
for (const item of group.items) {
|
|
@@ -252,9 +261,7 @@ export function AgentThread({ items, thinking, working = thinking, hasMore, cont
|
|
|
252
261
|
key={`activity-${group.key}`}
|
|
253
262
|
turnKey={group.key}
|
|
254
263
|
items={[]}
|
|
255
|
-
detailItems={[]}
|
|
256
264
|
working
|
|
257
|
-
showSummary
|
|
258
265
|
renderItem={renderItem}
|
|
259
266
|
/>,
|
|
260
267
|
);
|
|
@@ -270,9 +277,6 @@ export function AgentThread({ items, thinking, working = thinking, hasMore, cont
|
|
|
270
277
|
|
|
271
278
|
return (
|
|
272
279
|
<div key={group.key} className={widgetStyles.AiTurnGroup}>
|
|
273
|
-
<div className={`${widgetStyles.Avatar} ${widgetStyles.AvatarAi}`}>
|
|
274
|
-
<SolidXAIIcon size={14} />
|
|
275
|
-
</div>
|
|
276
280
|
<div className={widgetStyles.AiTurnContent}>{turnContent}</div>
|
|
277
281
|
</div>
|
|
278
282
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type AgentChatItem, type AgentContext } from "../types";
|
|
3
|
-
export { parseWidgetContent, type InlineChatWidget } from "./inlineWidget";
|
|
3
|
+
export { classifyWidgetContent, parseWidgetContent, type InlineChatWidget, type InlineChatWidgetState } from "./inlineWidget";
|
|
4
4
|
/** Registry name of the widget that renders an event when `event_data.widget` is absent. */
|
|
5
5
|
export declare const getDefaultChatWidgetName: (eventType: string) => string;
|
|
6
6
|
type ErrorBoundaryProps = {
|
|
@@ -33,5 +33,5 @@ type SolidAgentChatItemProps = {
|
|
|
33
33
|
* through the extension registry, so a UI module can register new chat widgets or override a
|
|
34
34
|
* default by registering the same name.
|
|
35
35
|
*/
|
|
36
|
-
export declare const SolidAgentChatItem: ({ item, agentContext, showMessageMeta, onReply, onPrompt }: SolidAgentChatItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const SolidAgentChatItem: ({ item, agentContext, showMessageMeta, onReply, onPrompt }: SolidAgentChatItemProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
37
37
|
//# sourceMappingURL=SolidAgentChatItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidAgentChatItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/SolidAgentChatItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAGlF,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SolidAgentChatItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/SolidAgentChatItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE9H,4FAA4F;AAC5F,eAAO,MAAM,wBAAwB,cAAe,MAAM,KAAG,MAwB5D,CAAC;AAUF,KAAK,kBAAkB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;AACxG,KAAK,kBAAkB,GAAG;IAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAAC;AAElD,2FAA2F;AAC3F,qBAAa,4BAA6B,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACrG,KAAK,EAAE,kBAAkB,CAAmB;IAE5C,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAI9B,kBAAkB,CAAC,IAAI,EAAE,kBAAkB;IAK3C,MAAM;CAST;AAED,KAAK,uBAAuB,GAAG;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,+DAAgE,uBAAuB,mDAoCrH,CAAC"}
|
|
@@ -29,8 +29,8 @@ import React, { useMemo } from "react";
|
|
|
29
29
|
import { getExtensionComponent } from "../../../../helpers/registry";
|
|
30
30
|
import styles from "../SolidAgent.module.css";
|
|
31
31
|
import { AgentEventTypes } from "../types";
|
|
32
|
-
import {
|
|
33
|
-
export { parseWidgetContent } from "./inlineWidget";
|
|
32
|
+
import { classifyWidgetContent } from "./inlineWidget";
|
|
33
|
+
export { classifyWidgetContent, parseWidgetContent } from "./inlineWidget";
|
|
34
34
|
/** Registry name of the widget that renders an event when `event_data.widget` is absent. */
|
|
35
35
|
export var getDefaultChatWidgetName = function (eventType) {
|
|
36
36
|
switch (eventType) {
|
|
@@ -51,6 +51,7 @@ export var getDefaultChatWidgetName = function (eventType) {
|
|
|
51
51
|
return "DefaultNoticeChatWidget";
|
|
52
52
|
case AgentEventTypes.agentStarted:
|
|
53
53
|
case AgentEventTypes.stepStarted:
|
|
54
|
+
case AgentEventTypes.agentThinking:
|
|
54
55
|
return "DefaultThinkingChatWidget";
|
|
55
56
|
default:
|
|
56
57
|
return "DefaultUnknownChatWidget";
|
|
@@ -127,7 +128,12 @@ export var SolidAgentChatItem = function (_a) {
|
|
|
127
128
|
var item = _a.item, agentContext = _a.agentContext, showMessageMeta = _a.showMessageMeta, onReply = _a.onReply, onPrompt = _a.onPrompt;
|
|
128
129
|
var isText = !item.widget && TEXT_EVENT_TYPES.has(item.eventType);
|
|
129
130
|
var content = (_b = item.eventData) === null || _b === void 0 ? void 0 : _b.content;
|
|
130
|
-
var
|
|
131
|
+
var inlineState = useMemo(function () { return (isText ? classifyWidgetContent(content) : { state: "text" }); }, [isText, content]);
|
|
132
|
+
var inline = inlineState.state === "widget" ? inlineState.value : null;
|
|
133
|
+
// A widget envelope is not valid JSON until its closing delimiters arrive.
|
|
134
|
+
// Keep it out of the markdown fallback during that live-only interval.
|
|
135
|
+
if (item.live && inlineState.state === "pending")
|
|
136
|
+
return null;
|
|
131
137
|
var widgetName = (_d = (_c = item.widget) !== null && _c !== void 0 ? _c : inline === null || inline === void 0 ? void 0 : inline.widget) !== null && _d !== void 0 ? _d : getDefaultChatWidgetName(item.eventType);
|
|
132
138
|
var DynamicWidget = (_e = getExtensionComponent(widgetName)) !== null && _e !== void 0 ? _e : getExtensionComponent("DefaultUnknownChatWidget");
|
|
133
139
|
var widgetId = (_f = item.widgetId) !== null && _f !== void 0 ? _f : item.id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidAgentChatItem.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/SolidAgentChatItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAyC,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SolidAgentChatItem.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/SolidAgentChatItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAyC,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAqD,MAAM,gBAAgB,CAAC;AAE9H,4FAA4F;AAC5F,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAC,SAAiB;IACtD,QAAQ,SAAS,EAAE;QACf,KAAK,eAAe,CAAC,WAAW;YAC5B,OAAO,8BAA8B,CAAC;QAC1C,KAAK,eAAe,CAAC,QAAQ,CAAC;QAC9B,KAAK,eAAe,CAAC,WAAW,CAAC;QACjC,KAAK,eAAe,CAAC,YAAY,CAAC;QAClC,KAAK,eAAe,CAAC,kBAAkB;YACnC,OAAO,mCAAmC,CAAC;QAC/C,KAAK,eAAe,CAAC,WAAW;YAC5B,OAAO,2BAA2B,CAAC;QACvC,KAAK,eAAe,CAAC,UAAU,CAAC;QAChC,KAAK,eAAe,CAAC,KAAK;YACtB,OAAO,wBAAwB,CAAC;QACpC,KAAK,eAAe,CAAC,kBAAkB,CAAC;QACxC,KAAK,eAAe,CAAC,wBAAwB;YACzC,OAAO,yBAAyB,CAAC;QACrC,KAAK,eAAe,CAAC,YAAY,CAAC;QAClC,KAAK,eAAe,CAAC,WAAW,CAAC;QACjC,KAAK,eAAe,CAAC,aAAa;YAC9B,OAAO,2BAA2B,C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IAAI,CAAC,EAAE,CAAC;IAC1C,IAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IAExD,IAAM,WAAW,GAAyB;QACtC,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,SAAS,WAAA;QACT,QAAQ,UAAA;QACR,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI;QACjB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK;QACnB,SAAS,EAAE,IAAI,CAAC,EAAE;QAClB,eAAe,iBAAA;QACf,KAAK,EAAE,UAAC,KAAc,IAAK,OAAA,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,EAApC,CAAoC;QAC/D,UAAU,EAAE,QAAQ;QACpB,YAAY,cAAA;KACf,CAAC;IAEF,OAAO,CACH,KAAC,4BAA4B,IAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,YACjE,aAAa,IAAI,KAAC,aAAa,eAAK,WAAW,EAAI,GACzB,CAClC,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React, { useMemo } from \"react\";\nimport { getExtensionComponent } from \"../../../../helpers/registry\";\nimport { SolidChatWidgetProps } from \"../../../../types/solid-core\";\nimport styles from \"../SolidAgent.module.css\";\nimport { AgentEventTypes, type AgentChatItem, type AgentContext } from \"../types\";\nimport { classifyWidgetContent } from \"./inlineWidget\";\n\nexport { classifyWidgetContent, parseWidgetContent, type InlineChatWidget, type InlineChatWidgetState } from \"./inlineWidget\";\n\n/** Registry name of the widget that renders an event when `event_data.widget` is absent. */\nexport const getDefaultChatWidgetName = (eventType: string): string => {\n switch (eventType) {\n case AgentEventTypes.userMessage:\n return \"DefaultUserMessageChatWidget\";\n case AgentEventTypes.llmToken:\n case AgentEventTypes.llmComplete:\n case AgentEventTypes.turnComplete:\n case AgentEventTypes.turnCompleteLegacy:\n return \"DefaultAssistantMessageChatWidget\";\n case AgentEventTypes.toolCalling:\n return \"DefaultToolCallChatWidget\";\n case AgentEventTypes.agentError:\n case AgentEventTypes.error:\n return \"DefaultErrorChatWidget\";\n case AgentEventTypes.executionCancelled:\n case AgentEventTypes.executionCancelledLegacy:\n return \"DefaultNoticeChatWidget\";\n case AgentEventTypes.agentStarted:\n case AgentEventTypes.stepStarted:\n case AgentEventTypes.agentThinking:\n return \"DefaultThinkingChatWidget\";\n default:\n return \"DefaultUnknownChatWidget\";\n }\n};\n\n/** Assistant text events whose content may carry a widget as JSON (see parseWidgetContent). */\nconst TEXT_EVENT_TYPES = new Set<string>([\n AgentEventTypes.llmToken,\n AgentEventTypes.llmComplete,\n AgentEventTypes.turnComplete,\n AgentEventTypes.turnCompleteLegacy,\n]);\n\ntype ErrorBoundaryProps = { widget: string; eventData: Record<string, any>; children: React.ReactNode };\ntype ErrorBoundaryState = { error: Error | null };\n\n/** Keeps a throwing widget inside its own bubble; the rest of the thread keeps working. */\nexport class SolidChatWidgetErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n state: ErrorBoundaryState = { error: null };\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error) {\n console.error(`[solidAgent] chat widget \"${this.props.widget}\" failed to render`, error);\n }\n\n componentDidUpdate(prev: ErrorBoundaryProps) {\n // A later update of the same widget gets a fresh attempt.\n if (this.state.error && prev.eventData !== this.props.eventData) this.setState({ error: null });\n }\n\n render() {\n if (!this.state.error) return this.props.children;\n return (\n <div className={styles.widgetFallback} role=\"alert\">\n <span>The “{this.props.widget}” widget failed to render.</span>\n <pre className={styles.pre} style={{ maxHeight: 180 }}>{JSON.stringify(this.props.eventData, null, 2)}</pre>\n </div>\n );\n }\n}\n\ntype SolidAgentChatItemProps = {\n item: AgentChatItem;\n agentContext?: AgentContext;\n showMessageMeta?: boolean;\n onReply: (widgetId: string, widget: string, value: unknown) => void;\n onPrompt: (text: string) => void;\n};\n\n/**\n * Renders one thread item. The widget named in `event_data.widget` wins; then a widget the agent\n * sent as its text reply (`{\"widgetName\", \"data\"}`, see parseWidgetContent; a reply that does not\n * parse renders as text, unchanged); otherwise the default widget for the event type. All resolve\n * through the extension registry, so a UI module can register new chat widgets or override a\n * default by registering the same name.\n */\nexport const SolidAgentChatItem = ({ item, agentContext, showMessageMeta, onReply, onPrompt }: SolidAgentChatItemProps) => {\n const isText = !item.widget && TEXT_EVENT_TYPES.has(item.eventType);\n const content = item.eventData?.content;\n const inlineState = useMemo(\n () => (isText ? classifyWidgetContent(content) : { state: \"text\" as const }),\n [isText, content],\n );\n const inline = inlineState.state === \"widget\" ? inlineState.value : null;\n\n // A widget envelope is not valid JSON until its closing delimiters arrive.\n // Keep it out of the markdown fallback during that live-only interval.\n if (item.live && inlineState.state === \"pending\") return null;\n\n const widgetName = item.widget ?? inline?.widget ?? getDefaultChatWidgetName(item.eventType);\n const DynamicWidget = getExtensionComponent(widgetName) ?? getExtensionComponent(\"DefaultUnknownChatWidget\");\n const widgetId = item.widgetId ?? item.id;\n const eventData = inline ? inline.data : item.eventData;\n\n const widgetProps: SolidChatWidgetProps = {\n eventType: item.eventType,\n eventData,\n widgetId,\n live: !!item.live,\n final: !!item.final,\n timestamp: item.at,\n showMessageMeta,\n reply: (value: unknown) => onReply(widgetId, widgetName, value),\n sendPrompt: onPrompt,\n agentContext,\n };\n\n return (\n <SolidChatWidgetErrorBoundary widget={widgetName} eventData={eventData}>\n {DynamicWidget && <DynamicWidget {...widgetProps} />}\n </SolidChatWidgetErrorBoundary>\n );\n};\n"]}
|
|
@@ -3,9 +3,9 @@ import { getExtensionComponent } from "../../../../helpers/registry";
|
|
|
3
3
|
import { SolidChatWidgetProps } from "../../../../types/solid-core";
|
|
4
4
|
import styles from "../SolidAgent.module.css";
|
|
5
5
|
import { AgentEventTypes, type AgentChatItem, type AgentContext } from "../types";
|
|
6
|
-
import {
|
|
6
|
+
import { classifyWidgetContent } from "./inlineWidget";
|
|
7
7
|
|
|
8
|
-
export { parseWidgetContent, type InlineChatWidget } from "./inlineWidget";
|
|
8
|
+
export { classifyWidgetContent, parseWidgetContent, type InlineChatWidget, type InlineChatWidgetState } from "./inlineWidget";
|
|
9
9
|
|
|
10
10
|
/** Registry name of the widget that renders an event when `event_data.widget` is absent. */
|
|
11
11
|
export const getDefaultChatWidgetName = (eventType: string): string => {
|
|
@@ -27,6 +27,7 @@ export const getDefaultChatWidgetName = (eventType: string): string => {
|
|
|
27
27
|
return "DefaultNoticeChatWidget";
|
|
28
28
|
case AgentEventTypes.agentStarted:
|
|
29
29
|
case AgentEventTypes.stepStarted:
|
|
30
|
+
case AgentEventTypes.agentThinking:
|
|
30
31
|
return "DefaultThinkingChatWidget";
|
|
31
32
|
default:
|
|
32
33
|
return "DefaultUnknownChatWidget";
|
|
@@ -90,7 +91,15 @@ type SolidAgentChatItemProps = {
|
|
|
90
91
|
export const SolidAgentChatItem = ({ item, agentContext, showMessageMeta, onReply, onPrompt }: SolidAgentChatItemProps) => {
|
|
91
92
|
const isText = !item.widget && TEXT_EVENT_TYPES.has(item.eventType);
|
|
92
93
|
const content = item.eventData?.content;
|
|
93
|
-
const
|
|
94
|
+
const inlineState = useMemo(
|
|
95
|
+
() => (isText ? classifyWidgetContent(content) : { state: "text" as const }),
|
|
96
|
+
[isText, content],
|
|
97
|
+
);
|
|
98
|
+
const inline = inlineState.state === "widget" ? inlineState.value : null;
|
|
99
|
+
|
|
100
|
+
// A widget envelope is not valid JSON until its closing delimiters arrive.
|
|
101
|
+
// Keep it out of the markdown fallback during that live-only interval.
|
|
102
|
+
if (item.live && inlineState.state === "pending") return null;
|
|
94
103
|
|
|
95
104
|
const widgetName = item.widget ?? inline?.widget ?? getDefaultChatWidgetName(item.eventType);
|
|
96
105
|
const DynamicWidget = getExtensionComponent(widgetName) ?? getExtensionComponent("DefaultUnknownChatWidget");
|
|
@@ -3,6 +3,21 @@ export type InlineChatWidget = {
|
|
|
3
3
|
widget: string;
|
|
4
4
|
data: Record<string, any>;
|
|
5
5
|
};
|
|
6
|
+
export type InlineChatWidgetState = {
|
|
7
|
+
state: "widget";
|
|
8
|
+
value: InlineChatWidget;
|
|
9
|
+
} | {
|
|
10
|
+
state: "pending";
|
|
11
|
+
} | {
|
|
12
|
+
state: "text";
|
|
13
|
+
};
|
|
6
14
|
/** Returns the widget in a reply, or null when the reply is not that JSON (it then renders as text). */
|
|
7
15
|
export declare function parseWidgetContent(content: unknown): InlineChatWidget | null;
|
|
16
|
+
/** Classifies live assistant content without exposing an incomplete JSON envelope as text. */
|
|
17
|
+
export declare function classifyWidgetContent(content: unknown): InlineChatWidgetState;
|
|
18
|
+
/**
|
|
19
|
+
* Compares two assistant text strings, accounting for JSON serialization / formatting differences
|
|
20
|
+
* and widget markdown envelopes so duplicate turn completions do not append repeated cards.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isSameAssistantContent(a: string | undefined, b: string | undefined): boolean;
|
|
8
23
|
//# sourceMappingURL=inlineWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inlineWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/inlineWidget.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,MAAM,gBAAgB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"inlineWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/inlineWidget.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,MAAM,gBAAgB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAC3B;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAC5C;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAsCxB,wGAAwG;AACxG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CA6F5E;AAED,8FAA8F;AAC9F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,qBAAqB,CAK7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAwB5F"}
|
|
@@ -1,30 +1,181 @@
|
|
|
1
|
+
var WIDGET_NAME_KEY = "widgetName";
|
|
2
|
+
/**
|
|
3
|
+
* True while a streamed reply can still become a widget envelope. The agent
|
|
4
|
+
* protocol puts widgetName first, so this checks that key incrementally instead
|
|
5
|
+
* of treating every partial JSON object as a widget.
|
|
6
|
+
*/
|
|
7
|
+
function isPendingWidgetEnvelope(content) {
|
|
8
|
+
var candidate = content.trimStart();
|
|
9
|
+
if (!candidate)
|
|
10
|
+
return false;
|
|
11
|
+
if (candidate.startsWith("```")) {
|
|
12
|
+
var newline = candidate.indexOf("\n");
|
|
13
|
+
if (newline === -1)
|
|
14
|
+
return "```json".startsWith(candidate.toLowerCase());
|
|
15
|
+
var fence = candidate.slice(0, newline).trim().toLowerCase();
|
|
16
|
+
if (fence !== "```" && fence !== "```json")
|
|
17
|
+
return false;
|
|
18
|
+
candidate = candidate.slice(newline + 1).trimStart();
|
|
19
|
+
}
|
|
20
|
+
if (!candidate.startsWith("{"))
|
|
21
|
+
return false;
|
|
22
|
+
var afterBrace = candidate.slice(1).trimStart();
|
|
23
|
+
if (!afterBrace)
|
|
24
|
+
return true;
|
|
25
|
+
if (!afterBrace.startsWith('"'))
|
|
26
|
+
return false;
|
|
27
|
+
var closingQuote = afterBrace.indexOf('"', 1);
|
|
28
|
+
if (closingQuote === -1) {
|
|
29
|
+
return WIDGET_NAME_KEY.startsWith(afterBrace.slice(1));
|
|
30
|
+
}
|
|
31
|
+
var firstKey = afterBrace.slice(1, closingQuote);
|
|
32
|
+
if (firstKey !== WIDGET_NAME_KEY)
|
|
33
|
+
return false;
|
|
34
|
+
var afterKey = afterBrace.slice(closingQuote + 1).trimStart();
|
|
35
|
+
return afterKey === "" || afterKey.startsWith(":");
|
|
36
|
+
}
|
|
1
37
|
/** Returns the widget in a reply, or null when the reply is not that JSON (it then renders as text). */
|
|
2
38
|
export function parseWidgetContent(content) {
|
|
3
39
|
if (typeof content !== "string")
|
|
4
40
|
return null;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
var trimmed = content.trim();
|
|
42
|
+
if (!trimmed)
|
|
43
|
+
return null;
|
|
44
|
+
var candidate = trimmed;
|
|
45
|
+
// Strip markdown code fences if wrapped in ```json ... ``` or ``` ... ```
|
|
46
|
+
if (candidate.startsWith("```")) {
|
|
47
|
+
var lines = candidate.split("\n");
|
|
48
|
+
if (lines.length >= 2 && lines[lines.length - 1].trim().startsWith("```")) {
|
|
49
|
+
candidate = lines.slice(1, -1).join("\n").trim();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
var parsed = null;
|
|
53
|
+
if (candidate.startsWith("{") && candidate.endsWith("}")) {
|
|
54
|
+
try {
|
|
55
|
+
parsed = JSON.parse(candidate);
|
|
56
|
+
}
|
|
57
|
+
catch (_a) {
|
|
58
|
+
// ignore
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// If candidate wasn't a standalone JSON object, look for embedded {"widgetName" envelope
|
|
62
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.widgetName !== "string") {
|
|
63
|
+
var idx = candidate.indexOf('{"widgetName"');
|
|
64
|
+
if (idx !== -1) {
|
|
65
|
+
var depth = 0;
|
|
66
|
+
var inString = false;
|
|
67
|
+
var escape_1 = false;
|
|
68
|
+
for (var i = idx; i < candidate.length; i++) {
|
|
69
|
+
var ch = candidate[i];
|
|
70
|
+
if (escape_1) {
|
|
71
|
+
escape_1 = false;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (ch === "\\" && inString) {
|
|
75
|
+
escape_1 = true;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (ch === '"') {
|
|
79
|
+
inString = !inString;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (!inString) {
|
|
83
|
+
if (ch === "{")
|
|
84
|
+
depth++;
|
|
85
|
+
else if (ch === "}") {
|
|
86
|
+
depth--;
|
|
87
|
+
if (depth === 0) {
|
|
88
|
+
try {
|
|
89
|
+
var candidateParsed = JSON.parse(candidate.slice(idx, i + 1));
|
|
90
|
+
if (candidateParsed && typeof candidateParsed === "object" && typeof candidateParsed.widgetName === "string") {
|
|
91
|
+
parsed = candidateParsed;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch (_b) {
|
|
95
|
+
// ignore
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
20
101
|
}
|
|
21
102
|
}
|
|
22
|
-
if (!data || typeof data !== "object" || Array.isArray(data))
|
|
23
|
-
return null;
|
|
24
|
-
return { widget: parsed.widgetName, data: data };
|
|
25
103
|
}
|
|
26
|
-
|
|
104
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.widgetName !== "string") {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
var widgetName = parsed.widgetName.trim().toLowerCase();
|
|
108
|
+
var data = parsed.data;
|
|
109
|
+
if (typeof data === "string") {
|
|
110
|
+
try {
|
|
111
|
+
data = JSON.parse(data);
|
|
112
|
+
}
|
|
113
|
+
catch (_c) {
|
|
114
|
+
// Assistant envelopes carry text or raw strings for specific widgets
|
|
115
|
+
if (widgetName === "markdown")
|
|
116
|
+
data = { text: data };
|
|
117
|
+
else if (widgetName === "code")
|
|
118
|
+
data = { code: data };
|
|
119
|
+
else if (widgetName === "json")
|
|
120
|
+
data = { json: data };
|
|
121
|
+
else
|
|
122
|
+
data = { text: data, raw: data };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Support data being an array directly
|
|
126
|
+
if (Array.isArray(data)) {
|
|
127
|
+
if (widgetName === "table")
|
|
128
|
+
data = { rows: data };
|
|
129
|
+
else if (widgetName === "checklist" || widgetName === "progress")
|
|
130
|
+
data = { items: data };
|
|
131
|
+
else
|
|
132
|
+
data = { items: data, data: data };
|
|
133
|
+
}
|
|
134
|
+
if (!data || typeof data !== "object")
|
|
27
135
|
return null;
|
|
136
|
+
return { widget: widgetName, data: data };
|
|
137
|
+
}
|
|
138
|
+
/** Classifies live assistant content without exposing an incomplete JSON envelope as text. */
|
|
139
|
+
export function classifyWidgetContent(content) {
|
|
140
|
+
var widget = parseWidgetContent(content);
|
|
141
|
+
if (widget)
|
|
142
|
+
return { state: "widget", value: widget };
|
|
143
|
+
if (typeof content === "string" && isPendingWidgetEnvelope(content))
|
|
144
|
+
return { state: "pending" };
|
|
145
|
+
return { state: "text" };
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Compares two assistant text strings, accounting for JSON serialization / formatting differences
|
|
149
|
+
* and widget markdown envelopes so duplicate turn completions do not append repeated cards.
|
|
150
|
+
*/
|
|
151
|
+
export function isSameAssistantContent(a, b) {
|
|
152
|
+
var _a, _b, _c, _d;
|
|
153
|
+
var trimA = (_a = a === null || a === void 0 ? void 0 : a.trim()) !== null && _a !== void 0 ? _a : "";
|
|
154
|
+
var trimB = (_b = b === null || b === void 0 ? void 0 : b.trim()) !== null && _b !== void 0 ? _b : "";
|
|
155
|
+
if (!trimA && !trimB)
|
|
156
|
+
return true;
|
|
157
|
+
if (!trimA || !trimB)
|
|
158
|
+
return false;
|
|
159
|
+
if (trimA === trimB)
|
|
160
|
+
return true;
|
|
161
|
+
var wa = parseWidgetContent(trimA);
|
|
162
|
+
var wb = parseWidgetContent(trimB);
|
|
163
|
+
if (wa && wb) {
|
|
164
|
+
if (wa.widget !== wb.widget)
|
|
165
|
+
return false;
|
|
166
|
+
try {
|
|
167
|
+
return JSON.stringify(wa.data) === JSON.stringify(wb.data);
|
|
168
|
+
}
|
|
169
|
+
catch (_e) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if ((wa === null || wa === void 0 ? void 0 : wa.widget) === "markdown" && typeof ((_c = wa.data) === null || _c === void 0 ? void 0 : _c.text) === "string" && wa.data.text.trim() === trimB) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
if ((wb === null || wb === void 0 ? void 0 : wb.widget) === "markdown" && typeof ((_d = wb.data) === null || _d === void 0 ? void 0 : _d.text) === "string" && wb.data.text.trim() === trimA) {
|
|
177
|
+
return true;
|
|
28
178
|
}
|
|
179
|
+
return false;
|
|
29
180
|
}
|
|
30
181
|
//# sourceMappingURL=inlineWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inlineWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/inlineWidget.ts"],"names":[],"mappings":"AAGA,wGAAwG;AACxG,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IAC/C,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC7C,IAAI;QACA,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,OAAO,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,CAAA,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAExD,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACvB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,IAAI;gBACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAC3B;YAAC,WAAM;gBACJ,sEAAsE;gBACtE,IAAI,MAAM,CAAC,UAAU,KAAK,UAAU;oBAAE,IAAI,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;oBACvD,OAAO,IAAI,CAAC;aACpB;SACJ;QAED,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,MAAA,EAAE,CAAC;KAC9C;IAAC,WAAM;QACJ,OAAO,IAAI,CAAC;KACf;AACL,CAAC","sourcesContent":["/** A widget the agent sent as its text reply: `{\"widgetName\": \"...\", \"data\": {...} | \"<json>\"}`. */\nexport type InlineChatWidget = { widget: string; data: Record<string, any> };\n\n/** Returns the widget in a reply, or null when the reply is not that JSON (it then renders as text). */\nexport function parseWidgetContent(content: unknown): InlineChatWidget | null {\n if (typeof content !== \"string\") return null;\n try {\n const parsed = JSON.parse(content);\n if (typeof parsed?.widgetName !== \"string\") return null;\n\n let data = parsed.data;\n if (typeof data === \"string\") {\n try {\n data = JSON.parse(data);\n } catch {\n // Assistant markdown envelopes carry the markdown itself as a string.\n if (parsed.widgetName === \"markdown\") data = { text: data };\n else return null;\n }\n }\n\n if (!data || typeof data !== \"object\" || Array.isArray(data)) return null;\n return { widget: parsed.widgetName, data };\n } catch {\n return null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"inlineWidget.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/inlineWidget.ts"],"names":[],"mappings":"AAOA,IAAM,eAAe,GAAG,YAAY,CAAC;AAErC;;;;GAIG;AACH,SAAS,uBAAuB,CAA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C9D;QAAC,WAAM;YACJ,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,IAAI,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,MAAK,UAAU,IAAI,OAAO,CAAA,MAAA,EAAE,CAAC,IAAI,0CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE;QACjG,OAAO,IAAI,CAAC;KACf;IACD,IAAI,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,MAAM,MAAK,UAAU,IAAI,OAAO,CAAA,MAAA,EAAE,CAAC,IAAI,0CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE;QACjG,OAAO,IAAI,CAAC;KACf;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["/** A widget the agent sent as its text reply: `{\"widgetName\": \"...\", \"data\": {...} | \"<json>\"}`. */\nexport type InlineChatWidget = { widget: string; data: Record<string, any> };\nexport type InlineChatWidgetState =\n | { state: \"widget\"; value: InlineChatWidget }\n | { state: \"pending\" }\n | { state: \"text\" };\n\nconst WIDGET_NAME_KEY = \"widgetName\";\n\n/**\n * True while a streamed reply can still become a widget envelope. The agent\n * protocol puts widgetName first, so this checks that key incrementally instead\n * of treating every partial JSON object as a widget.\n */\nfunction isPendingWidgetEnvelope(content: string): boolean {\n let candidate = content.trimStart();\n if (!candidate) return false;\n\n if (candidate.startsWith(\"```\")) {\n const newline = candidate.indexOf(\"\\n\");\n if (newline === -1) return \"```json\".startsWith(candidate.toLowerCase());\n const fence = candidate.slice(0, newline).trim().toLowerCase();\n if (fence !== \"```\" && fence !== \"```json\") return false;\n candidate = candidate.slice(newline + 1).trimStart();\n }\n\n if (!candidate.startsWith(\"{\")) return false;\n const afterBrace = candidate.slice(1).trimStart();\n if (!afterBrace) return true;\n if (!afterBrace.startsWith('\"')) return false;\n\n const closingQuote = afterBrace.indexOf('\"', 1);\n if (closingQuote === -1) {\n return WIDGET_NAME_KEY.startsWith(afterBrace.slice(1));\n }\n\n const firstKey = afterBrace.slice(1, closingQuote);\n if (firstKey !== WIDGET_NAME_KEY) return false;\n\n const afterKey = afterBrace.slice(closingQuote + 1).trimStart();\n return afterKey === \"\" || afterKey.startsWith(\":\");\n}\n\n/** Returns the widget in a reply, or null when the reply is not that JSON (it then renders as text). */\nexport function parseWidgetContent(content: unknown): InlineChatWidget | null {\n if (typeof content !== \"string\") return null;\n const trimmed = content.trim();\n if (!trimmed) return null;\n\n let candidate = trimmed;\n // Strip markdown code fences if wrapped in ```json ... ``` or ``` ... ```\n if (candidate.startsWith(\"```\")) {\n const lines = candidate.split(\"\\n\");\n if (lines.length >= 2 && lines[lines.length - 1].trim().startsWith(\"```\")) {\n candidate = lines.slice(1, -1).join(\"\\n\").trim();\n }\n }\n\n let parsed: any = null;\n if (candidate.startsWith(\"{\") && candidate.endsWith(\"}\")) {\n try {\n parsed = JSON.parse(candidate);\n } catch {\n // ignore\n }\n }\n\n // If candidate wasn't a standalone JSON object, look for embedded {\"widgetName\" envelope\n if (!parsed || typeof parsed !== \"object\" || typeof parsed.widgetName !== \"string\") {\n const idx = candidate.indexOf('{\"widgetName\"');\n if (idx !== -1) {\n let depth = 0;\n let inString = false;\n let escape = false;\n for (let i = idx; i < candidate.length; i++) {\n const ch = candidate[i];\n if (escape) {\n escape = false;\n continue;\n }\n if (ch === \"\\\\\" && inString) {\n escape = true;\n continue;\n }\n if (ch === '\"') {\n inString = !inString;\n continue;\n }\n if (!inString) {\n if (ch === \"{\") depth++;\n else if (ch === \"}\") {\n depth--;\n if (depth === 0) {\n try {\n const candidateParsed = JSON.parse(candidate.slice(idx, i + 1));\n if (candidateParsed && typeof candidateParsed === \"object\" && typeof candidateParsed.widgetName === \"string\") {\n parsed = candidateParsed;\n }\n } catch {\n // ignore\n }\n break;\n }\n }\n }\n }\n }\n }\n\n if (!parsed || typeof parsed !== \"object\" || typeof parsed.widgetName !== \"string\") {\n return null;\n }\n\n const widgetName = parsed.widgetName.trim().toLowerCase();\n let data = parsed.data;\n\n if (typeof data === \"string\") {\n try {\n data = JSON.parse(data);\n } catch {\n // Assistant envelopes carry text or raw strings for specific widgets\n if (widgetName === \"markdown\") data = { text: data };\n else if (widgetName === \"code\") data = { code: data };\n else if (widgetName === \"json\") data = { json: data };\n else data = { text: data, raw: data };\n }\n }\n\n // Support data being an array directly\n if (Array.isArray(data)) {\n if (widgetName === \"table\") data = { rows: data };\n else if (widgetName === \"checklist\" || widgetName === \"progress\") data = { items: data };\n else data = { items: data, data };\n }\n\n if (!data || typeof data !== \"object\") return null;\n return { widget: widgetName, data };\n}\n\n/** Classifies live assistant content without exposing an incomplete JSON envelope as text. */\nexport function classifyWidgetContent(content: unknown): InlineChatWidgetState {\n const widget = parseWidgetContent(content);\n if (widget) return { state: \"widget\", value: widget };\n if (typeof content === \"string\" && isPendingWidgetEnvelope(content)) return { state: \"pending\" };\n return { state: \"text\" };\n}\n\n/**\n * Compares two assistant text strings, accounting for JSON serialization / formatting differences\n * and widget markdown envelopes so duplicate turn completions do not append repeated cards.\n */\nexport function isSameAssistantContent(a: string | undefined, b: string | undefined): boolean {\n const trimA = a?.trim() ?? \"\";\n const trimB = b?.trim() ?? \"\";\n if (!trimA && !trimB) return true;\n if (!trimA || !trimB) return false;\n if (trimA === trimB) return true;\n\n const wa = parseWidgetContent(trimA);\n const wb = parseWidgetContent(trimB);\n if (wa && wb) {\n if (wa.widget !== wb.widget) return false;\n try {\n return JSON.stringify(wa.data) === JSON.stringify(wb.data);\n } catch {\n return false;\n }\n }\n if (wa?.widget === \"markdown\" && typeof wa.data?.text === \"string\" && wa.data.text.trim() === trimB) {\n return true;\n }\n if (wb?.widget === \"markdown\" && typeof wb.data?.text === \"string\" && wb.data.text.trim() === trimA) {\n return true;\n }\n return false;\n}\n"]}
|