@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
|
@@ -15,13 +15,27 @@ type Props = {
|
|
|
15
15
|
onSend: (text: string, attachments: AgentAttachment[]) => void | Promise<void>;
|
|
16
16
|
onStop: () => void;
|
|
17
17
|
modelIndicator?: React.ReactNode;
|
|
18
|
+
contextPill?: React.ReactNode;
|
|
19
|
+
canAttach?: boolean;
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Message box: Enter sends, Shift+Enter adds a line, "/" at the start lists the agent's commands.
|
|
22
24
|
* Files can be attached with the paperclip, dropped onto the box, or pasted.
|
|
23
25
|
*/
|
|
24
|
-
export function AgentComposer({
|
|
26
|
+
export function AgentComposer({
|
|
27
|
+
working,
|
|
28
|
+
disabled,
|
|
29
|
+
placeholder,
|
|
30
|
+
commands,
|
|
31
|
+
seed,
|
|
32
|
+
seedKey,
|
|
33
|
+
onSend,
|
|
34
|
+
onStop,
|
|
35
|
+
modelIndicator,
|
|
36
|
+
contextPill,
|
|
37
|
+
canAttach = true,
|
|
38
|
+
}: Props) {
|
|
25
39
|
const [text, setText] = useState("");
|
|
26
40
|
const [active, setActive] = useState(0);
|
|
27
41
|
const [attachments, setAttachments] = useState<AgentAttachment[]>([]);
|
|
@@ -42,8 +56,8 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
42
56
|
}, [seedKey]);
|
|
43
57
|
|
|
44
58
|
useEffect(() => {
|
|
45
|
-
if (!disabled) ref.current?.focus();
|
|
46
|
-
}, [disabled]);
|
|
59
|
+
if (!disabled && !sending) ref.current?.focus();
|
|
60
|
+
}, [disabled, sending]);
|
|
47
61
|
|
|
48
62
|
const slashQuery = text.startsWith("/") && !text.includes(" ") ? text.slice(1).toLowerCase() : null;
|
|
49
63
|
const matches = useMemo(
|
|
@@ -58,8 +72,15 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
58
72
|
el.style.height = `${Math.min(el.scrollHeight, 200)}px`;
|
|
59
73
|
}
|
|
60
74
|
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (!canAttach && attachments.length > 0) {
|
|
77
|
+
setAttachments([]);
|
|
78
|
+
setAttachErrors([]);
|
|
79
|
+
}
|
|
80
|
+
}, [canAttach]);
|
|
81
|
+
|
|
61
82
|
const addFiles = async (files: File[]) => {
|
|
62
|
-
if (!files.length || disabled || sending) return;
|
|
83
|
+
if (!canAttach || !files.length || disabled || sending) return;
|
|
63
84
|
const { added, errors } = await readAgentAttachments(files, attachments);
|
|
64
85
|
if (added.length) setAttachments((prev) => [...prev, ...added]);
|
|
65
86
|
setAttachErrors(errors);
|
|
@@ -94,6 +115,7 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
94
115
|
};
|
|
95
116
|
|
|
96
117
|
const onKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
|
118
|
+
if (event.nativeEvent.isComposing) return;
|
|
97
119
|
if (matches.length) {
|
|
98
120
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
99
121
|
event.preventDefault();
|
|
@@ -113,6 +135,7 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
113
135
|
};
|
|
114
136
|
|
|
115
137
|
const onPaste = (event: React.ClipboardEvent<HTMLTextAreaElement>) => {
|
|
138
|
+
if (!canAttach) return;
|
|
116
139
|
const files = Array.from(event.clipboardData?.files ?? []);
|
|
117
140
|
if (files.length) {
|
|
118
141
|
event.preventDefault();
|
|
@@ -122,7 +145,7 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
122
145
|
|
|
123
146
|
const dropHandlers = {
|
|
124
147
|
onDragOver: (event: React.DragEvent) => {
|
|
125
|
-
if (disabled || sending || !event.dataTransfer?.types?.includes("Files")) return;
|
|
148
|
+
if (!canAttach || disabled || sending || !event.dataTransfer?.types?.includes("Files")) return;
|
|
126
149
|
event.preventDefault();
|
|
127
150
|
setDragging(true);
|
|
128
151
|
},
|
|
@@ -130,7 +153,7 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
130
153
|
if (!event.currentTarget.contains(event.relatedTarget as Node)) setDragging(false);
|
|
131
154
|
},
|
|
132
155
|
onDrop: (event: React.DragEvent) => {
|
|
133
|
-
if (disabled || sending) return;
|
|
156
|
+
if (!canAttach || disabled || sending) return;
|
|
134
157
|
event.preventDefault();
|
|
135
158
|
setDragging(false);
|
|
136
159
|
void addFiles(Array.from(event.dataTransfer?.files ?? []));
|
|
@@ -160,81 +183,100 @@ export function AgentComposer({ working, disabled, placeholder, commands, seed,
|
|
|
160
183
|
</div>
|
|
161
184
|
)}
|
|
162
185
|
|
|
163
|
-
{attachments.length > 0 && (
|
|
164
|
-
<ul className={styles.attachmentTray} aria-label="Attached files">
|
|
165
|
-
{attachments.map((item, index) => (
|
|
166
|
-
<li key={`${item.meta.name}-${index}`} className={styles.attachmentChip}>
|
|
167
|
-
{item.meta.previewUrl ? (
|
|
168
|
-
<img className={styles.attachmentThumb} src={item.meta.previewUrl} alt="" />
|
|
169
|
-
) : (
|
|
170
|
-
<span className={styles.attachmentIcon}><FileText size={14} /></span>
|
|
171
|
-
)}
|
|
172
|
-
<span className={styles.attachmentText}>
|
|
173
|
-
<span className={styles.attachmentName} title={item.meta.name}>{item.meta.name}</span>
|
|
174
|
-
<span className={styles.attachmentSize}>{formatFileSize(item.meta.size)}</span>
|
|
175
|
-
</span>
|
|
176
|
-
<button type="button" className={styles.attachmentRemove} aria-label={`Remove ${item.meta.name}`} onClick={() => removeAttachment(index)}>
|
|
177
|
-
<X size={12} />
|
|
178
|
-
</button>
|
|
179
|
-
</li>
|
|
180
|
-
))}
|
|
181
|
-
</ul>
|
|
182
|
-
)}
|
|
183
|
-
|
|
184
186
|
{attachErrors.length > 0 && (
|
|
185
187
|
<div className={styles.attachmentErrors} role="alert">
|
|
186
188
|
{attachErrors.map((error) => <div key={error}>{error}</div>)}
|
|
187
189
|
</div>
|
|
188
190
|
)}
|
|
189
191
|
|
|
190
|
-
<
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
placeholder={dragging ? "Drop files to attach" : placeholder ?? "Ask the agent…"}
|
|
198
|
-
onChange={(event) => {
|
|
199
|
-
setText(event.target.value);
|
|
200
|
-
setActive(0);
|
|
201
|
-
autosize();
|
|
192
|
+
<div
|
|
193
|
+
className={styles.composerBox}
|
|
194
|
+
onClick={(e) => {
|
|
195
|
+
const tag = (e.target as HTMLElement).tagName;
|
|
196
|
+
if (tag !== "BUTTON" && tag !== "SUMMARY" && tag !== "INPUT" && tag !== "IMG") {
|
|
197
|
+
ref.current?.focus();
|
|
198
|
+
}
|
|
202
199
|
}}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
200
|
+
>
|
|
201
|
+
{attachments.length > 0 && (
|
|
202
|
+
<ul className={styles.attachmentTray} aria-label="Attached files">
|
|
203
|
+
{attachments.map((item, index) => (
|
|
204
|
+
<li key={`${item.meta.name}-${index}`} className={styles.attachmentChip}>
|
|
205
|
+
{item.meta.previewUrl ? (
|
|
206
|
+
<img className={styles.attachmentThumb} src={item.meta.previewUrl} alt="" />
|
|
207
|
+
) : (
|
|
208
|
+
<span className={styles.attachmentIcon}><FileText size={14} /></span>
|
|
209
|
+
)}
|
|
210
|
+
<span className={styles.attachmentText}>
|
|
211
|
+
<span className={styles.attachmentName} title={item.meta.name}>{item.meta.name}</span>
|
|
212
|
+
<span className={styles.attachmentSize}>{formatFileSize(item.meta.size)}</span>
|
|
213
|
+
</span>
|
|
214
|
+
<button type="button" className={styles.attachmentRemove} aria-label={`Remove ${item.meta.name}`} onClick={() => removeAttachment(index)}>
|
|
215
|
+
<X size={12} />
|
|
216
|
+
</button>
|
|
217
|
+
</li>
|
|
218
|
+
))}
|
|
219
|
+
</ul>
|
|
220
|
+
)}
|
|
221
|
+
|
|
222
|
+
<textarea
|
|
223
|
+
ref={ref}
|
|
224
|
+
className={styles.textarea}
|
|
225
|
+
rows={1}
|
|
226
|
+
value={text}
|
|
227
|
+
disabled={disabled || sending}
|
|
228
|
+
aria-label="Message the SolidX Agent"
|
|
229
|
+
placeholder={dragging ? "Drop files to attach" : placeholder ?? "Ask the agent…"}
|
|
213
230
|
onChange={(event) => {
|
|
214
|
-
|
|
215
|
-
|
|
231
|
+
setText(event.target.value);
|
|
232
|
+
setActive(0);
|
|
233
|
+
autosize();
|
|
216
234
|
}}
|
|
235
|
+
onKeyDown={onKeyDown}
|
|
236
|
+
onPaste={onPaste}
|
|
217
237
|
/>
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
+
<div className={styles.composerRow}>
|
|
239
|
+
<input
|
|
240
|
+
ref={fileInputRef}
|
|
241
|
+
type="file"
|
|
242
|
+
multiple
|
|
243
|
+
accept={AGENT_ATTACHMENT_ACCEPT}
|
|
244
|
+
hidden
|
|
245
|
+
onChange={(event) => {
|
|
246
|
+
void addFiles(Array.from(event.target.files ?? []));
|
|
247
|
+
event.target.value = "";
|
|
248
|
+
}}
|
|
249
|
+
/>
|
|
250
|
+
{canAttach && (
|
|
251
|
+
<button
|
|
252
|
+
type="button"
|
|
253
|
+
className={styles.iconBtn}
|
|
254
|
+
aria-label="Attach files"
|
|
255
|
+
title={`Attach files (up to ${MAX_AGENT_ATTACHMENTS}: images or text files)`}
|
|
256
|
+
disabled={disabled || sending || attachments.length >= MAX_AGENT_ATTACHMENTS}
|
|
257
|
+
onClick={() => fileInputRef.current?.click()}
|
|
258
|
+
>
|
|
259
|
+
<Paperclip size={16} />
|
|
260
|
+
</button>
|
|
261
|
+
)}
|
|
262
|
+
{modelIndicator}
|
|
263
|
+
{contextPill}
|
|
264
|
+
{working ? (
|
|
265
|
+
<button
|
|
266
|
+
type="button"
|
|
267
|
+
className={styles.stopBtn}
|
|
268
|
+
onClick={onStop}
|
|
269
|
+
aria-label="Stop the agent"
|
|
270
|
+
title="Stop the agent"
|
|
271
|
+
>
|
|
272
|
+
<Square size={12} fill="currentColor" />
|
|
273
|
+
</button>
|
|
274
|
+
) : (
|
|
275
|
+
<button type="button" className={styles.sendBtn} onClick={submit} disabled={!canSend} aria-label="Send">
|
|
276
|
+
<ArrowUp size={16} />
|
|
277
|
+
</button>
|
|
278
|
+
)}
|
|
279
|
+
</div>
|
|
238
280
|
</div>
|
|
239
281
|
</div>
|
|
240
282
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentContext, SolidAgentOpenOptions } from "../types";
|
|
1
|
+
import type { AgentContext, AgentRuntimeType, SolidAgentOpenOptions } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* Imperative API for the SolidX Agent chat, usable from any component, hook or extension
|
|
4
4
|
* function (same idea as `showToast`). The chat itself is rendered once by SolidAgentHost.
|
|
@@ -23,6 +23,9 @@ export type SolidAgentEventPayloads = {
|
|
|
23
23
|
};
|
|
24
24
|
sessionChanged: {
|
|
25
25
|
sessionId: string | null;
|
|
26
|
+
agentType?: AgentRuntimeType;
|
|
27
|
+
provider?: string;
|
|
28
|
+
model?: string | null;
|
|
26
29
|
};
|
|
27
30
|
};
|
|
28
31
|
export declare const solidAgent: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidAgent.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/sdk/solidAgent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"solidAgent.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/sdk/solidAgent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtF;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,MAAM,MAAM,uBAAuB,GAAG;IAClC,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,YAAY,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IACnE,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CACxH,CAAC;AAWF,eAAO,MAAM,UAAU;IACnB,6FAA6F;mBAC9E,qBAAqB;IAGpC,uEAAuE;iBAC1D,MAAM,YAAY,YAAY;IAG3C,mFAAmF;;;IAOnF,kEAAkE;iIAC4B,IAAI;CAGrG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidAgent.js","sourceRoot":"","sources":["../../../../../src/components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IAC3D,CAAC;CACJ,CAAC","sourcesContent":["import { eventBus } from \"../../../../helpers/eventBus\";\nimport { getSolidStoreDispatch } from \"../../../../redux/store/solidEntityApiPool\";\nimport { agentClosed, agentModeChanged, agentOpenRequested } from \"../../../../redux/features/agentSlice\";\nimport type { AgentContext, SolidAgentOpenOptions } from \"../types\";\n\n/**\n * Imperative API for the SolidX Agent chat, usable from any component, hook or extension\n * function (same idea as `showToast`). The chat itself is rendered once by SolidAgentHost.\n *\n * solidAgent.open({ prompt: \"Author a login scenario\", autoSend: true, context: { module: \"test-hub\", recordId: 2 } });\n */\n\nexport const SOLID_AGENT_EVENTS = {\n turnComplete: \"solidAgent:turnComplete\",\n widgetAction: \"solidAgent:widgetAction\",\n sessionChanged: \"solidAgent:sessionChanged\",\n} as const;\n\nexport type SolidAgentEventName = keyof typeof SOLID_AGENT_EVENTS;\n\nexport type SolidAgentEventPayloads = {\n turnComplete: { sessionId: string | null; content?: string };\n widgetAction: { widgetId: string; widget: string; value: unknown };\n sessionChanged: { sessionId: string | null };\n};\n\nfunction dispatch(action: any) {\n const storeDispatch = getSolidStoreDispatch();\n if (!storeDispatch) {\n console.warn(\"[solidAgent] The Solid store is not ready yet; call solidAgent after the app has mounted.\");\n return;\n }\n storeDispatch(action);\n}\n\nexport const solidAgent = {\n /** Opens the chat window, optionally prefilling (and sending) a prompt with page context. */\n open(options?: SolidAgentOpenOptions) {\n dispatch(agentOpenRequested(options));\n },\n /** Sends a prompt straight away (opens the window if it is closed). */\n send(prompt: string, context?: AgentContext) {\n dispatch(agentOpenRequested({ prompt, context, autoSend: true }));\n },\n /** Collapses the window back to the floating bubble; the session keeps running. */\n minimize() {\n dispatch(agentModeChanged(\"bubble\"));\n },\n close() {\n dispatch(agentClosed());\n },\n /** Subscribes to chat events; returns an unsubscribe function. */\n on<E extends SolidAgentEventName>(event: E, handler: (payload: SolidAgentEventPayloads[E]) => void) {\n return eventBus.on(SOLID_AGENT_EVENTS[event], handler);\n },\n};\n"]}
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E,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACJ,CAAC","sourcesContent":["import { eventBus } from \"../../../../helpers/eventBus\";\nimport { getSolidStoreDispatch } from \"../../../../redux/store/solidEntityApiPool\";\nimport { agentClosed, agentModeChanged, agentOpenRequested } from \"../../../../redux/features/agentSlice\";\nimport type { AgentContext, AgentRuntimeType, SolidAgentOpenOptions } from \"../types\";\n\n/**\n * Imperative API for the SolidX Agent chat, usable from any component, hook or extension\n * function (same idea as `showToast`). The chat itself is rendered once by SolidAgentHost.\n *\n * solidAgent.open({ prompt: \"Author a login scenario\", autoSend: true, context: { module: \"test-hub\", recordId: 2 } });\n */\n\nexport const SOLID_AGENT_EVENTS = {\n turnComplete: \"solidAgent:turnComplete\",\n widgetAction: \"solidAgent:widgetAction\",\n sessionChanged: \"solidAgent:sessionChanged\",\n} as const;\n\nexport type SolidAgentEventName = keyof typeof SOLID_AGENT_EVENTS;\n\nexport type SolidAgentEventPayloads = {\n turnComplete: { sessionId: string | null; content?: string };\n widgetAction: { widgetId: string; widget: string; value: unknown };\n sessionChanged: { sessionId: string | null; agentType?: AgentRuntimeType; provider?: string; model?: string | null };\n};\n\nfunction dispatch(action: any) {\n const storeDispatch = getSolidStoreDispatch();\n if (!storeDispatch) {\n console.warn(\"[solidAgent] The Solid store is not ready yet; call solidAgent after the app has mounted.\");\n return;\n }\n storeDispatch(action);\n}\n\nexport const solidAgent = {\n /** Opens the chat window, optionally prefilling (and sending) a prompt with page context. */\n open(options?: SolidAgentOpenOptions) {\n dispatch(agentOpenRequested(options));\n },\n /** Sends a prompt straight away (opens the window if it is closed). */\n send(prompt: string, context?: AgentContext) {\n dispatch(agentOpenRequested({ prompt, context, autoSend: true }));\n },\n /** Collapses the window back to the floating bubble; the session keeps running. */\n minimize() {\n dispatch(agentModeChanged(\"bubble\"));\n },\n close() {\n dispatch(agentClosed());\n },\n /** Subscribes to chat events; returns an unsubscribe function. */\n on<E extends SolidAgentEventName>(event: E, handler: (payload: SolidAgentEventPayloads[E]) => void) {\n return eventBus.on(SOLID_AGENT_EVENTS[event], handler);\n },\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { eventBus } from "../../../../helpers/eventBus";
|
|
2
2
|
import { getSolidStoreDispatch } from "../../../../redux/store/solidEntityApiPool";
|
|
3
3
|
import { agentClosed, agentModeChanged, agentOpenRequested } from "../../../../redux/features/agentSlice";
|
|
4
|
-
import type { AgentContext, SolidAgentOpenOptions } from "../types";
|
|
4
|
+
import type { AgentContext, AgentRuntimeType, SolidAgentOpenOptions } from "../types";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Imperative API for the SolidX Agent chat, usable from any component, hook or extension
|
|
@@ -21,7 +21,7 @@ export type SolidAgentEventName = keyof typeof SOLID_AGENT_EVENTS;
|
|
|
21
21
|
export type SolidAgentEventPayloads = {
|
|
22
22
|
turnComplete: { sessionId: string | null; content?: string };
|
|
23
23
|
widgetAction: { widgetId: string; widget: string; value: unknown };
|
|
24
|
-
sessionChanged: { sessionId: string | null };
|
|
24
|
+
sessionChanged: { sessionId: string | null; agentType?: AgentRuntimeType; provider?: string; model?: string | null };
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
function dispatch(action: any) {
|
|
@@ -5,6 +5,7 @@ type Props = {
|
|
|
5
5
|
thinking: boolean;
|
|
6
6
|
working?: boolean;
|
|
7
7
|
hasMore: boolean;
|
|
8
|
+
loadingOlder?: boolean;
|
|
8
9
|
context?: AgentContext;
|
|
9
10
|
emptyState?: React.ReactNode;
|
|
10
11
|
onLoadOlder: () => void;
|
|
@@ -12,6 +13,6 @@ type Props = {
|
|
|
12
13
|
onPrompt: (text: string) => void;
|
|
13
14
|
};
|
|
14
15
|
/** Renders thread items; sticks to the bottom while new content streams unless the user scrolled up. */
|
|
15
|
-
export declare function AgentThread({ items, thinking, working, hasMore, context, emptyState, onLoadOlder, onReply, onPrompt }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function AgentThread({ items, thinking, working, hasMore, loadingOlder, context, emptyState, onLoadOlder, onReply, onPrompt }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=AgentThread.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentThread.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/AgentThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAK5E,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentThread.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/AgentThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAK5E,OAAO,EAAmB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAMlF,KAAK,KAAK,GAAG;IACT,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,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;AAkJF,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAkB,EAAE,OAAO,EAAE,YAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAoH7J"}
|
|
@@ -7,14 +7,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
12
|
-
import {
|
|
12
|
+
import { ChevronRight, LoaderCircle } from "lucide-react";
|
|
13
13
|
import styles from "../SolidAgent.module.css";
|
|
14
14
|
import widgetStyles from "../widgets/solidChatWidgets.module.css";
|
|
15
|
-
import { SolidXAIIcon } from "../SolidXAIIcon";
|
|
16
15
|
import { AgentEventTypes } from "../types";
|
|
17
|
-
import { toolCategory } from "../agentFormat";
|
|
18
16
|
import { SolidAgentMessageCopyButton } from "../SolidAgentMarkdown";
|
|
19
17
|
import { SolidAgentChatItem } from "./SolidAgentChatItem";
|
|
20
18
|
import { parseWidgetContent } from "./inlineWidget";
|
|
@@ -27,11 +25,6 @@ var ASSISTANT_MESSAGE_TYPES = new Set([
|
|
|
27
25
|
AgentEventTypes.turnCompleteLegacy,
|
|
28
26
|
]);
|
|
29
27
|
var isAssistantMessage = function (item) { return !item.widget && ASSISTANT_MESSAGE_TYPES.has(item.eventType); };
|
|
30
|
-
var isVisibleCurrentTool = function (item) {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
return item.eventType === AgentEventTypes.toolCalling
|
|
33
|
-
&& toolCategory((_b = (_a = item.eventData) === null || _a === void 0 ? void 0 : _a.tool_name) !== null && _b !== void 0 ? _b : "") !== "Context";
|
|
34
|
-
};
|
|
35
28
|
var assistantCopyContent = function (item) {
|
|
36
29
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
37
30
|
if (item.widget === "markdown" || item.widget === "SolidMarkdownChatWidget") {
|
|
@@ -72,10 +65,30 @@ function groupItems(items) {
|
|
|
72
65
|
flush();
|
|
73
66
|
return groups;
|
|
74
67
|
}
|
|
68
|
+
function formatWorkedDuration(seconds) {
|
|
69
|
+
var s = Math.max(1, seconds);
|
|
70
|
+
if (s < 60)
|
|
71
|
+
return "".concat(s, "s");
|
|
72
|
+
var m = Math.floor(s / 60);
|
|
73
|
+
var rem = s % 60;
|
|
74
|
+
return rem > 0 ? "".concat(m, "m ").concat(rem, "s") : "".concat(m, "m");
|
|
75
|
+
}
|
|
75
76
|
function AgentActivityDisclosure(_a) {
|
|
76
77
|
var _b;
|
|
77
|
-
var turnKey = _a.turnKey, items = _a.items,
|
|
78
|
-
var _c = useState(
|
|
78
|
+
var turnKey = _a.turnKey, items = _a.items, working = _a.working, renderItem = _a.renderItem;
|
|
79
|
+
var _c = useState(working), expanded = _c[0], setExpanded = _c[1];
|
|
80
|
+
var prevWorkingRef = useRef(working);
|
|
81
|
+
var userToggledRef = useRef(false);
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
if (working && !prevWorkingRef.current) {
|
|
84
|
+
userToggledRef.current = false;
|
|
85
|
+
setExpanded(true);
|
|
86
|
+
}
|
|
87
|
+
else if (!working && prevWorkingRef.current) {
|
|
88
|
+
setExpanded(false);
|
|
89
|
+
}
|
|
90
|
+
prevWorkingRef.current = working;
|
|
91
|
+
}, [working]);
|
|
79
92
|
var _d = useState(function () { return Date.now(); }), now = _d[0], setNow = _d[1];
|
|
80
93
|
var hasLiveTimer = useRef(working);
|
|
81
94
|
var startTime = useRef(working ? Date.now() : (((_b = items[0]) === null || _b === void 0 ? void 0 : _b.at) || Date.now()));
|
|
@@ -91,26 +104,30 @@ function AgentActivityDisclosure(_a) {
|
|
|
91
104
|
}, [working]);
|
|
92
105
|
var toolCount = items.filter(function (item) { return item.eventType === AgentEventTypes.toolCalling; }).length;
|
|
93
106
|
var activeDuration = Math.max(0, Math.floor((now - startTime.current) / 1000));
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var
|
|
107
|
+
var recordedSeconds = 0;
|
|
108
|
+
if (items.length > 1) {
|
|
109
|
+
recordedSeconds = Math.max(0, Math.floor((items[items.length - 1].at - items[0].at) / 1000));
|
|
110
|
+
}
|
|
111
|
+
var sumToolMs = items.reduce(function (acc, item) { var _a; return acc + (Number((_a = item.eventData) === null || _a === void 0 ? void 0 : _a.duration_ms) || 0); }, 0);
|
|
112
|
+
var toolDurationSeconds = Math.round(sumToolMs / 1000);
|
|
113
|
+
var seconds = hasLiveTimer.current
|
|
114
|
+
? activeDuration
|
|
115
|
+
: Math.max(recordedSeconds, toolDurationSeconds, 1);
|
|
116
|
+
var durationLabel = formatWorkedDuration(seconds);
|
|
99
117
|
var summary = working
|
|
100
118
|
? "Working \u00B7 ".concat(toolCount ? "".concat(toolCount, " tool").concat(toolCount === 1 ? "" : "s", " \u00B7 ") : "").concat(durationLabel)
|
|
101
|
-
:
|
|
102
|
-
? "".concat(toolCount, " tool").concat(toolCount === 1 ? "" : "s", " called \u00B7 took ").concat(durationLabel)
|
|
103
|
-
: "Activity \u00B7 took ".concat(durationLabel);
|
|
119
|
+
: "Worked for ".concat(durationLabel);
|
|
104
120
|
var panelId = "agent-activity-".concat(turnKey.replace(/[^a-zA-Z0-9_-]/g, "-"));
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
121
|
+
if (items.length === 0 && !working)
|
|
122
|
+
return null;
|
|
123
|
+
return (_jsxs("section", { className: widgetStyles.ActivityGroup, "aria-label": "Agent activity", children: [_jsxs("button", { type: "button", className: widgetStyles.ActivitySummary, "aria-expanded": expanded, "aria-controls": panelId, onClick: function () {
|
|
124
|
+
userToggledRef.current = true;
|
|
125
|
+
setExpanded(function (value) { return !value; });
|
|
126
|
+
}, children: [working && _jsx(LoaderCircle, { size: 13, className: widgetStyles.ActivitySpinner, "aria-hidden": "true" }), _jsx("span", { className: widgetStyles.ActivitySummaryText, children: summary }), _jsx(ChevronRight, { size: 13, className: "".concat(widgetStyles.ActivityChevron, " ").concat(expanded ? widgetStyles.ActivityChevronOpen : ""), "aria-hidden": "true" })] }), expanded && items.length > 0 && (_jsx("div", { id: panelId, className: widgetStyles.ActivityDetails, children: items.map(renderItem) }))] }));
|
|
110
127
|
}
|
|
111
128
|
/** Renders thread items; sticks to the bottom while new content streams unless the user scrolled up. */
|
|
112
129
|
export function AgentThread(_a) {
|
|
113
|
-
var items = _a.items, thinking = _a.thinking, _b = _a.working, working = _b === void 0 ? thinking : _b, hasMore = _a.hasMore, context = _a.context, emptyState = _a.emptyState, onLoadOlder = _a.onLoadOlder, onReply = _a.onReply, onPrompt = _a.onPrompt;
|
|
130
|
+
var items = _a.items, thinking = _a.thinking, _b = _a.working, working = _b === void 0 ? thinking : _b, hasMore = _a.hasMore, _c = _a.loadingOlder, loadingOlder = _c === void 0 ? false : _c, context = _a.context, emptyState = _a.emptyState, onLoadOlder = _a.onLoadOlder, onReply = _a.onReply, onPrompt = _a.onPrompt;
|
|
114
131
|
var scrollRef = useRef(null);
|
|
115
132
|
var pinned = useRef(true);
|
|
116
133
|
var prevHeight = useRef(0);
|
|
@@ -155,7 +172,7 @@ export function AgentThread(_a) {
|
|
|
155
172
|
});
|
|
156
173
|
}
|
|
157
174
|
var renderItem = function (item, showMessageMeta) { return (_jsx(SolidAgentChatItem, { item: item, agentContext: context, showMessageMeta: showMessageMeta, onReply: onReply, onPrompt: onPrompt }, item.id)); };
|
|
158
|
-
return (_jsxs("div", { ref: scrollRef, className: styles.thread, role: "log", "aria-live": "polite", "aria-relevant": "additions", children: [hasMore && (_jsx("button", { type: "button", className: "".concat(styles.btn, " ").concat(styles.loadMore), onClick: onLoadOlder, children: "Load earlier messages" })), groups.map(function (group) {
|
|
175
|
+
return (_jsxs("div", { ref: scrollRef, className: styles.thread, role: "log", "aria-live": "polite", "aria-relevant": "additions", children: [hasMore && (_jsx("button", { type: "button", className: "".concat(styles.btn, " ").concat(styles.loadMore), onClick: onLoadOlder, disabled: loadingOlder, "aria-label": loadingOlder ? "Loading earlier messages" : "Load earlier messages", title: loadingOlder ? "Loading earlier messages" : undefined, children: loadingOlder ? _jsx(LoaderCircle, { size: 14, className: styles.spinIcon, "aria-hidden": "true" }) : "Load earlier messages" })), groups.map(function (group) {
|
|
159
176
|
if (group.kind === "user")
|
|
160
177
|
return renderItem(group.item);
|
|
161
178
|
var isCurrentTurn = working && group === groups[groups.length - 1];
|
|
@@ -165,17 +182,10 @@ export function AgentThread(_a) {
|
|
|
165
182
|
var turnContent = [];
|
|
166
183
|
var activityItems = [];
|
|
167
184
|
var flushActivity = function (isLatest) {
|
|
168
|
-
var _a;
|
|
169
185
|
if (!activityItems.length)
|
|
170
186
|
return;
|
|
171
|
-
var currentActivity = isCurrentTurn && isLatest
|
|
172
|
-
? (_a = __spreadArray([], activityItems, true).reverse().find(function (item) { return isVisibleCurrentTool(item) && item.live; })) !== null && _a !== void 0 ? _a : __spreadArray([], activityItems, true).reverse().find(isVisibleCurrentTool)
|
|
173
|
-
: undefined;
|
|
174
|
-
var detailItems = activityItems.filter(function (item) { return item !== currentActivity; });
|
|
175
187
|
var activityKey = "".concat(group.key, "-").concat(activityItems[0].id);
|
|
176
|
-
turnContent.push(_jsx(AgentActivityDisclosure, { turnKey: activityKey, items: activityItems,
|
|
177
|
-
if (currentActivity)
|
|
178
|
-
turnContent.push(renderItem(currentActivity));
|
|
188
|
+
turnContent.push(_jsx(AgentActivityDisclosure, { turnKey: activityKey, items: activityItems, working: isCurrentTurn && isLatest, renderItem: renderItem }, "activity-".concat(activityKey)));
|
|
179
189
|
activityItems = [];
|
|
180
190
|
};
|
|
181
191
|
for (var _i = 0, _a = group.items; _i < _a.length; _i++) {
|
|
@@ -190,12 +200,12 @@ export function AgentThread(_a) {
|
|
|
190
200
|
}
|
|
191
201
|
flushActivity(true);
|
|
192
202
|
if (isCurrentTurn && thinking && group.items.length === 0) {
|
|
193
|
-
turnContent.push(_jsx(AgentActivityDisclosure, { turnKey: group.key, items: [],
|
|
203
|
+
turnContent.push(_jsx(AgentActivityDisclosure, { turnKey: group.key, items: [], working: true, renderItem: renderItem }, "activity-".concat(group.key)));
|
|
194
204
|
}
|
|
195
205
|
if (!isCurrentTurn && assistantCopyText) {
|
|
196
206
|
turnContent.push(_jsxs("div", { className: "".concat(widgetStyles.BubbleMeta, " ").concat(widgetStyles.BubbleMetaAssistant, " ").concat(widgetStyles.TurnMeta), children: [_jsx("span", { className: widgetStyles.Timestamp, children: formatChatTime(group.items[group.items.length - 1].at) }), _jsx(SolidAgentMessageCopyButton, { text: assistantCopyText })] }, "meta-".concat(group.key)));
|
|
197
207
|
}
|
|
198
|
-
return (
|
|
208
|
+
return (_jsx("div", { className: widgetStyles.AiTurnGroup, children: _jsx("div", { className: widgetStyles.AiTurnContent, children: turnContent }) }, group.key));
|
|
199
209
|
})] }));
|
|
200
210
|
}
|
|
201
211
|
//# sourceMappingURL=AgentThread.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentThread.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/AgentThread.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAyC,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,C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AE,CAGvB,CACT,CAAC;iBACL;gBAED,OAAO,CACH,eAAqB,SAAS,EAAE,YAAY,CAAC,WAAW,aACpD,cAAK,SAAS,EAAE,UAAG,YAAY,CAAC,MAAM,cAAI,YAAY,CAAC,QAAQ,CAAE,YAC7D,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,GACxB,EACN,cAAK,SAAS,EAAE,YAAY,CAAC,aAAa,YAAG,WAAW,GAAO,KAJzD,KAAK,CAAC,GAAG,CAKb,CACT,CAAC;YACN,CAAC,CAAC,IACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport { CheckCircle2, ChevronDown, LoaderCircle } from \"lucide-react\";\nimport styles from \"../SolidAgent.module.css\";\nimport widgetStyles from \"../widgets/solidChatWidgets.module.css\";\nimport { SolidXAIIcon } from \"../SolidXAIIcon\";\nimport { AgentEventTypes, type AgentChatItem, type AgentContext } from \"../types\";\nimport { toolCategory } from \"../agentFormat\";\nimport { SolidAgentMessageCopyButton } from \"../SolidAgentMarkdown\";\nimport { SolidAgentChatItem } from \"./SolidAgentChatItem\";\nimport { parseWidgetContent } from \"./inlineWidget\";\nimport { formatChatTime } from \"../widgets/chatWidgetUtils\";\n\ntype Props = {\n items: AgentChatItem[];\n thinking: boolean;\n working?: boolean;\n hasMore: boolean;\n context?: AgentContext;\n emptyState?: React.ReactNode;\n onLoadOlder: () => void;\n onReply: (widgetId: string, widget: string, value: unknown) => void;\n onPrompt: (text: string) => void;\n};\n\ntype ItemGroup = { kind: \"user\"; item: AgentChatItem } | { kind: \"agent\"; key: string; items: AgentChatItem[] };\n\nconst isUserItem = (item: AgentChatItem) => item.eventType === AgentEventTypes.userMessage && !item.widget;\nconst ASSISTANT_MESSAGE_TYPES = new Set<string>([\n AgentEventTypes.llmToken,\n AgentEventTypes.llmComplete,\n AgentEventTypes.turnComplete,\n AgentEventTypes.turnCompleteLegacy,\n]);\n\nconst isAssistantMessage = (item: AgentChatItem) => !item.widget && ASSISTANT_MESSAGE_TYPES.has(item.eventType);\nconst isVisibleCurrentTool = (item: AgentChatItem) =>\n item.eventType === AgentEventTypes.toolCalling\n && toolCategory(item.eventData?.tool_name ?? \"\") !== \"Context\";\n\nconst assistantCopyContent = (item: AgentChatItem): string | null => {\n if (item.widget === \"markdown\" || item.widget === \"SolidMarkdownChatWidget\") {\n const data = item.eventData?.props ?? item.eventData;\n return typeof (data?.text ?? data?.content) === \"string\" ? (data.text ?? data.content) : null;\n }\n if (!isAssistantMessage(item)) return null;\n const inline = parseWidgetContent(item.eventData?.content);\n if (inline) {\n if (inline.widget !== \"markdown\" && inline.widget !== \"SolidMarkdownChatWidget\") return null;\n return typeof (inline.data.text ?? inline.data.content) === \"string\" ? (inline.data.text ?? inline.data.content) : null;\n }\n return typeof item.eventData?.content === \"string\" ? item.eventData.content : null;\n};\n\n/** Consecutive agent items form one turn (one avatar); each user message stands alone. */\nfunction groupItems(items: AgentChatItem[]): ItemGroup[] {\n const groups: ItemGroup[] = [];\n let turn: AgentChatItem[] = [];\n let turnKey = \"initial-agent-turn\";\n const flush = () => {\n if (turn.length) groups.push({ kind: \"agent\", key: turnKey, items: turn });\n turn = [];\n };\n for (const item of items) {\n if (isUserItem(item)) {\n flush();\n groups.push({ kind: \"user\", item });\n turnKey = `after-${item.id}`;\n } else {\n turn.push(item);\n }\n }\n flush();\n return groups;\n}\n\nfunction AgentActivityDisclosure({\n turnKey,\n items,\n detailItems,\n working,\n showSummary,\n renderItem,\n}: {\n turnKey: string;\n items: AgentChatItem[];\n detailItems: AgentChatItem[];\n working: boolean;\n showSummary: boolean;\n renderItem: (item: AgentChatItem) => React.ReactNode;\n}) {\n const [expanded, setExpanded] = useState(false);\n const [now, setNow] = useState(() => Date.now());\n const hasLiveTimer = useRef(working);\n const startTime = useRef(working ? Date.now() : (items[0]?.at || Date.now()));\n\n useEffect(() => {\n if (!working) {\n if (hasLiveTimer.current) setNow(Date.now());\n return;\n }\n hasLiveTimer.current = true;\n const timer = window.setInterval(() => setNow(Date.now()), 1000);\n return () => window.clearInterval(timer);\n }, [working]);\n\n const toolCount = items.filter((item) => item.eventType === AgentEventTypes.toolCalling).length;\n const activeDuration = Math.max(0, Math.floor((now - startTime.current) / 1000));\n const recordedDuration = items.length > 1\n ? Math.max(0, Math.floor((items[items.length - 1].at - items[0].at) / 1000))\n : 0;\n const seconds = hasLiveTimer.current ? activeDuration : recordedDuration;\n const durationLabel = `${seconds}s`;\n const summary = working\n ? `Working · ${toolCount ? `${toolCount} tool${toolCount === 1 ? \"\" : \"s\"} · ` : \"\"}${durationLabel}`\n : toolCount\n ? `${toolCount} tool${toolCount === 1 ? \"\" : \"s\"} called · took ${durationLabel}`\n : `Activity · took ${durationLabel}`;\n const panelId = `agent-activity-${turnKey.replace(/[^a-zA-Z0-9_-]/g, \"-\")}`;\n\n return (\n <section className={`${widgetStyles.ActivityGroup} ${showSummary ? \"\" : widgetStyles.ActivityTimerOnly}`} aria-label={showSummary ? \"Agent activity\" : undefined}>\n {showSummary && (\n <>\n {detailItems.length > 0 ? <button\n type=\"button\"\n className={widgetStyles.ActivitySummary}\n aria-expanded={expanded}\n aria-controls={panelId}\n onClick={() => setExpanded((value) => !value)}\n >\n {working\n ? <LoaderCircle size={15} className={widgetStyles.ActivitySpinner} aria-hidden=\"true\" />\n : <CheckCircle2 size={15} className={widgetStyles.ActivityComplete} aria-hidden=\"true\" />}\n <span className={widgetStyles.ActivitySummaryText}>{summary}</span>\n <ChevronDown size={15} className={`${widgetStyles.ActivityChevron} ${expanded ? widgetStyles.ActivityChevronOpen : \"\"}`} aria-hidden=\"true\" />\n </button> : <div className={widgetStyles.ActivitySummary} role=\"status\">\n {working\n ? <LoaderCircle size={15} className={widgetStyles.ActivitySpinner} aria-hidden=\"true\" />\n : <CheckCircle2 size={15} className={widgetStyles.ActivityComplete} aria-hidden=\"true\" />}\n <span className={widgetStyles.ActivitySummaryText}>{summary}</span>\n </div>}\n {expanded && (\n <div id={panelId} className={widgetStyles.ActivityDetails}>\n {detailItems.map(renderItem)}\n </div>\n )}\n </>\n )}\n </section>\n );\n}\n\n/** Renders thread items; sticks to the bottom while new content streams unless the user scrolled up. */\nexport function AgentThread({ items, thinking, working = thinking, hasMore, context, emptyState, onLoadOlder, onReply, onPrompt }: Props) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pinned = useRef(true);\n const prevHeight = useRef(0);\n const prevFirstId = useRef<string | undefined>(undefined);\n\n useLayoutEffect(() => {\n const el = scrollRef.current;\n if (!el) return;\n const firstId = items[0]?.id;\n if (prevFirstId.current && firstId !== prevFirstId.current && prevHeight.current) {\n // Older history was prepended: keep the viewport where it was.\n el.scrollTop = el.scrollHeight - prevHeight.current;\n } else if (pinned.current) {\n el.scrollTop = el.scrollHeight;\n }\n prevFirstId.current = firstId;\n prevHeight.current = el.scrollHeight;\n }, [items]);\n\n useEffect(() => {\n const el = scrollRef.current;\n if (!el) return;\n const onScroll = () => {\n pinned.current = el.scrollHeight - el.scrollTop - el.clientHeight < 48;\n prevHeight.current = el.scrollHeight;\n };\n el.addEventListener(\"scroll\", onScroll, { passive: true });\n return () => el.removeEventListener(\"scroll\", onScroll);\n }, []);\n\n if (!items.length && !thinking && emptyState) {\n return <div className={styles.thread}>{emptyState}</div>;\n }\n\n const groups = groupItems(items);\n const lastGroup = groups[groups.length - 1];\n if (working && (!lastGroup || lastGroup.kind === \"user\")) {\n groups.push({\n kind: \"agent\",\n key: lastGroup?.kind === \"user\" ? `after-${lastGroup.item.id}` : \"working-turn\",\n items: [],\n });\n }\n const renderItem = (item: AgentChatItem, showMessageMeta?: boolean) => (\n <SolidAgentChatItem key={item.id} item={item} agentContext={context} showMessageMeta={showMessageMeta} onReply={onReply} onPrompt={onPrompt} />\n );\n\n return (\n <div ref={scrollRef} className={styles.thread} role=\"log\" aria-live=\"polite\" aria-relevant=\"additions\">\n {hasMore && (\n <button type=\"button\" className={`${styles.btn} ${styles.loadMore}`} onClick={onLoadOlder}>\n Load earlier messages\n </button>\n )}\n {groups.map((group) => {\n if (group.kind === \"user\") return renderItem(group.item);\n\n const isCurrentTurn = working && group === groups[groups.length - 1];\n const assistantCopyText = [...group.items].reverse()\n .map(assistantCopyContent)\n .find((content) => content !== null && content.length > 0);\n const turnContent: React.ReactNode[] = [];\n let activityItems: AgentChatItem[] = [];\n const flushActivity = (isLatest: boolean) => {\n if (!activityItems.length) return;\n const currentActivity = isCurrentTurn && isLatest\n ? [...activityItems].reverse().find((item) => isVisibleCurrentTool(item) && item.live)\n ?? [...activityItems].reverse().find(isVisibleCurrentTool)\n : undefined;\n const detailItems = activityItems.filter((item) => item !== currentActivity);\n const activityKey = `${group.key}-${activityItems[0].id}`;\n turnContent.push(\n <AgentActivityDisclosure\n key={`activity-${activityKey}`}\n turnKey={activityKey}\n items={activityItems}\n detailItems={detailItems}\n working={isCurrentTurn && isLatest}\n showSummary={detailItems.length > 0 || currentActivity !== undefined}\n renderItem={renderItem}\n />,\n );\n if (currentActivity) turnContent.push(renderItem(currentActivity));\n activityItems = [];\n };\n for (const item of group.items) {\n if (isAssistantMessage(item)) {\n flushActivity(false);\n turnContent.push(renderItem(item, false));\n } else {\n activityItems.push(item);\n }\n }\n flushActivity(true);\n if (isCurrentTurn && thinking && group.items.length === 0) {\n turnContent.push(\n <AgentActivityDisclosure\n key={`activity-${group.key}`}\n turnKey={group.key}\n items={[]}\n detailItems={[]}\n working\n showSummary\n renderItem={renderItem}\n />,\n );\n }\n if (!isCurrentTurn && assistantCopyText) {\n turnContent.push(\n <div key={`meta-${group.key}`} className={`${widgetStyles.BubbleMeta} ${widgetStyles.BubbleMetaAssistant} ${widgetStyles.TurnMeta}`}>\n <span className={widgetStyles.Timestamp}>{formatChatTime(group.items[group.items.length - 1].at)}</span>\n <SolidAgentMessageCopyButton text={assistantCopyText} />\n </div>,\n );\n }\n\n return (\n <div key={group.key} className={widgetStyles.AiTurnGroup}>\n <div className={`${widgetStyles.Avatar} ${widgetStyles.AvatarAi}`}>\n <SolidXAIIcon size={14} />\n </div>\n <div className={widgetStyles.AiTurnContent}>{turnContent}</div>\n </div>\n );\n })}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AgentThread.js","sourceRoot":"","sources":["../../../../../src/components/core/solid-agent/thread/AgentThread.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAElE,OAAO,EAAE,eAAe,EAAyC,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAiB5D,IAAM,UAAU,GAAG,UAAC,IAAmB,IAAK,OAAA,IAAI,CAAC,SAAS,KAAK,eAAe,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,EAA9D,CAA8D,CAAC;AAC3G,IAAM,uBAAuB,GAAG,IAAI,GAAG,CAAS;IAC5C,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,WAAW;IAC3B,eAAe,CAAC,YAAY;IAC5B,eAAe,CAAC,kBAAkB;CACrC,CAAC,CAAC;AAEH,IAAM,kBAAkB,GAAG,UAAC,IAAmB,IAAK,OAAA,CAAC,IAAI,CAAC,MAAM,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAA3D,CAA2D,CAAC;AAEhH,IAAM,oBAAoB,GAAG,UAAC,IAAmB;;IAC7C,IAAI,IAAI,CAAC,MA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KAAK,EAAE,EAAE,EACT,OAAO,QACP,UAAU,EAAE,UAAU,IAJjB,mBAAY,KAAK,CAAC,GAAG,CAAE,CAK9B,CACL,CAAC;iBACL;gBACD,IAAI,CAAC,aAAa,IAAI,iBAAiB,EAAE;oBACrC,WAAW,CAAC,IAAI,CACZ,eAA+B,SAAS,EAAE,UAAG,YAAY,CAAC,UAAU,cAAI,YAAY,CAAC,mBAAmB,cAAI,YAAY,CAAC,QAAQ,CAAE,aAC/H,eAAM,SAAS,EAAE,YAAY,CAAC,SAAS,YAAG,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAQ,EACxG,KAAC,2BAA2B,IAAC,IAAI,EAAE,iBAAiB,GAAI,KAFlD,eAAQ,KAAK,CAAC,GAAG,CAAE,CAGvB,CACT,CAAC;iBACL;gBAED,OAAO,CACH,cAAqB,SAAS,EAAE,YAAY,CAAC,WAAW,YACpD,cAAK,SAAS,EAAE,YAAY,CAAC,aAAa,YAAG,WAAW,GAAO,IADzD,KAAK,CAAC,GAAG,CAEb,CACT,CAAC;YACN,CAAC,CAAC,IACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React, { useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport { ChevronRight, LoaderCircle } from \"lucide-react\";\nimport styles from \"../SolidAgent.module.css\";\nimport widgetStyles from \"../widgets/solidChatWidgets.module.css\";\n\nimport { AgentEventTypes, type AgentChatItem, type AgentContext } from \"../types\";\nimport { SolidAgentMessageCopyButton } from \"../SolidAgentMarkdown\";\nimport { SolidAgentChatItem } from \"./SolidAgentChatItem\";\nimport { parseWidgetContent } from \"./inlineWidget\";\nimport { formatChatTime } from \"../widgets/chatWidgetUtils\";\n\ntype Props = {\n items: AgentChatItem[];\n thinking: boolean;\n working?: boolean;\n hasMore: boolean;\n loadingOlder?: boolean;\n context?: AgentContext;\n emptyState?: React.ReactNode;\n onLoadOlder: () => void;\n onReply: (widgetId: string, widget: string, value: unknown) => void;\n onPrompt: (text: string) => void;\n};\n\ntype ItemGroup = { kind: \"user\"; item: AgentChatItem } | { kind: \"agent\"; key: string; items: AgentChatItem[] };\n\nconst isUserItem = (item: AgentChatItem) => item.eventType === AgentEventTypes.userMessage && !item.widget;\nconst ASSISTANT_MESSAGE_TYPES = new Set<string>([\n AgentEventTypes.llmToken,\n AgentEventTypes.llmComplete,\n AgentEventTypes.turnComplete,\n AgentEventTypes.turnCompleteLegacy,\n]);\n\nconst isAssistantMessage = (item: AgentChatItem) => !item.widget && ASSISTANT_MESSAGE_TYPES.has(item.eventType);\n\nconst assistantCopyContent = (item: AgentChatItem): string | null => {\n if (item.widget === \"markdown\" || item.widget === \"SolidMarkdownChatWidget\") {\n const data = item.eventData?.props ?? item.eventData;\n return typeof (data?.text ?? data?.content) === \"string\" ? (data.text ?? data.content) : null;\n }\n if (!isAssistantMessage(item)) return null;\n const inline = parseWidgetContent(item.eventData?.content);\n if (inline) {\n if (inline.widget !== \"markdown\" && inline.widget !== \"SolidMarkdownChatWidget\") return null;\n return typeof (inline.data.text ?? inline.data.content) === \"string\" ? (inline.data.text ?? inline.data.content) : null;\n }\n return typeof item.eventData?.content === \"string\" ? item.eventData.content : null;\n};\n\n/** Consecutive agent items form one turn (one avatar); each user message stands alone. */\nfunction groupItems(items: AgentChatItem[]): ItemGroup[] {\n const groups: ItemGroup[] = [];\n let turn: AgentChatItem[] = [];\n let turnKey = \"initial-agent-turn\";\n const flush = () => {\n if (turn.length) groups.push({ kind: \"agent\", key: turnKey, items: turn });\n turn = [];\n };\n for (const item of items) {\n if (isUserItem(item)) {\n flush();\n groups.push({ kind: \"user\", item });\n turnKey = `after-${item.id}`;\n } else {\n turn.push(item);\n }\n }\n flush();\n return groups;\n}\n\nfunction formatWorkedDuration(seconds: number): string {\n const s = Math.max(1, seconds);\n if (s < 60) return `${s}s`;\n const m = Math.floor(s / 60);\n const rem = s % 60;\n return rem > 0 ? `${m}m ${rem}s` : `${m}m`;\n}\n\nfunction AgentActivityDisclosure({\n turnKey,\n items,\n working,\n renderItem,\n}: {\n turnKey: string;\n items: AgentChatItem[];\n working: boolean;\n renderItem: (item: AgentChatItem) => React.ReactNode;\n}) {\n const [expanded, setExpanded] = useState(working);\n const prevWorkingRef = useRef(working);\n const userToggledRef = useRef(false);\n\n useEffect(() => {\n if (working && !prevWorkingRef.current) {\n userToggledRef.current = false;\n setExpanded(true);\n } else if (!working && prevWorkingRef.current) {\n setExpanded(false);\n }\n prevWorkingRef.current = working;\n }, [working]);\n\n const [now, setNow] = useState(() => Date.now());\n const hasLiveTimer = useRef(working);\n const startTime = useRef(working ? Date.now() : (items[0]?.at || Date.now()));\n\n useEffect(() => {\n if (!working) {\n if (hasLiveTimer.current) setNow(Date.now());\n return;\n }\n hasLiveTimer.current = true;\n const timer = window.setInterval(() => setNow(Date.now()), 1000);\n return () => window.clearInterval(timer);\n }, [working]);\n\n const toolCount = items.filter((item) => item.eventType === AgentEventTypes.toolCalling).length;\n const activeDuration = Math.max(0, Math.floor((now - startTime.current) / 1000));\n \n let recordedSeconds = 0;\n if (items.length > 1) {\n recordedSeconds = Math.max(0, Math.floor((items[items.length - 1].at - items[0].at) / 1000));\n }\n const sumToolMs = items.reduce((acc, item) => acc + (Number(item.eventData?.duration_ms) || 0), 0);\n const toolDurationSeconds = Math.round(sumToolMs / 1000);\n\n const seconds = hasLiveTimer.current\n ? activeDuration\n : Math.max(recordedSeconds, toolDurationSeconds, 1);\n\n const durationLabel = formatWorkedDuration(seconds);\n\n const summary = working\n ? `Working · ${toolCount ? `${toolCount} tool${toolCount === 1 ? \"\" : \"s\"} · ` : \"\"}${durationLabel}`\n : `Worked for ${durationLabel}`;\n\n const panelId = `agent-activity-${turnKey.replace(/[^a-zA-Z0-9_-]/g, \"-\")}`;\n\n if (items.length === 0 && !working) return null;\n\n return (\n <section className={widgetStyles.ActivityGroup} aria-label=\"Agent activity\">\n <button\n type=\"button\"\n className={widgetStyles.ActivitySummary}\n aria-expanded={expanded}\n aria-controls={panelId}\n onClick={() => {\n userToggledRef.current = true;\n setExpanded((value) => !value);\n }}\n >\n {working && <LoaderCircle size={13} className={widgetStyles.ActivitySpinner} aria-hidden=\"true\" />}\n <span className={widgetStyles.ActivitySummaryText}>{summary}</span>\n <ChevronRight size={13} className={`${widgetStyles.ActivityChevron} ${expanded ? widgetStyles.ActivityChevronOpen : \"\"}`} aria-hidden=\"true\" />\n </button>\n {expanded && items.length > 0 && (\n <div id={panelId} className={widgetStyles.ActivityDetails}>\n {items.map(renderItem)}\n </div>\n )}\n </section>\n );\n}\n\n/** Renders thread items; sticks to the bottom while new content streams unless the user scrolled up. */\nexport function AgentThread({ items, thinking, working = thinking, hasMore, loadingOlder = false, context, emptyState, onLoadOlder, onReply, onPrompt }: Props) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pinned = useRef(true);\n const prevHeight = useRef(0);\n const prevFirstId = useRef<string | undefined>(undefined);\n\n useLayoutEffect(() => {\n const el = scrollRef.current;\n if (!el) return;\n const firstId = items[0]?.id;\n if (prevFirstId.current && firstId !== prevFirstId.current && prevHeight.current) {\n // Older history was prepended: keep the viewport where it was.\n el.scrollTop = el.scrollHeight - prevHeight.current;\n } else if (pinned.current) {\n el.scrollTop = el.scrollHeight;\n }\n prevFirstId.current = firstId;\n prevHeight.current = el.scrollHeight;\n }, [items]);\n\n useEffect(() => {\n const el = scrollRef.current;\n if (!el) return;\n const onScroll = () => {\n pinned.current = el.scrollHeight - el.scrollTop - el.clientHeight < 48;\n prevHeight.current = el.scrollHeight;\n };\n el.addEventListener(\"scroll\", onScroll, { passive: true });\n return () => el.removeEventListener(\"scroll\", onScroll);\n }, []);\n\n if (!items.length && !thinking && emptyState) {\n return <div className={styles.thread}>{emptyState}</div>;\n }\n\n const groups = groupItems(items);\n const lastGroup = groups[groups.length - 1];\n if (working && (!lastGroup || lastGroup.kind === \"user\")) {\n groups.push({\n kind: \"agent\",\n key: lastGroup?.kind === \"user\" ? `after-${lastGroup.item.id}` : \"working-turn\",\n items: [],\n });\n }\n const renderItem = (item: AgentChatItem, showMessageMeta?: boolean) => (\n <SolidAgentChatItem key={item.id} item={item} agentContext={context} showMessageMeta={showMessageMeta} onReply={onReply} onPrompt={onPrompt} />\n );\n\n return (\n <div ref={scrollRef} className={styles.thread} role=\"log\" aria-live=\"polite\" aria-relevant=\"additions\">\n {hasMore && (\n <button type=\"button\" className={`${styles.btn} ${styles.loadMore}`} onClick={onLoadOlder} disabled={loadingOlder}\n aria-label={loadingOlder ? \"Loading earlier messages\" : \"Load earlier messages\"} title={loadingOlder ? \"Loading earlier messages\" : undefined}>\n {loadingOlder ? <LoaderCircle size={14} className={styles.spinIcon} aria-hidden=\"true\" /> : \"Load earlier messages\"}\n </button>\n )}\n {groups.map((group) => {\n if (group.kind === \"user\") return renderItem(group.item);\n\n const isCurrentTurn = working && group === groups[groups.length - 1];\n const assistantCopyText = [...group.items].reverse()\n .map(assistantCopyContent)\n .find((content) => content !== null && content.length > 0);\n const turnContent: React.ReactNode[] = [];\n let activityItems: AgentChatItem[] = [];\n const flushActivity = (isLatest: boolean) => {\n if (!activityItems.length) return;\n const activityKey = `${group.key}-${activityItems[0].id}`;\n turnContent.push(\n <AgentActivityDisclosure\n key={`activity-${activityKey}`}\n turnKey={activityKey}\n items={activityItems}\n working={isCurrentTurn && isLatest}\n renderItem={renderItem}\n />,\n );\n activityItems = [];\n };\n for (const item of group.items) {\n if (isAssistantMessage(item)) {\n flushActivity(false);\n turnContent.push(renderItem(item, false));\n } else {\n activityItems.push(item);\n }\n }\n flushActivity(true);\n if (isCurrentTurn && thinking && group.items.length === 0) {\n turnContent.push(\n <AgentActivityDisclosure\n key={`activity-${group.key}`}\n turnKey={group.key}\n items={[]}\n working\n renderItem={renderItem}\n />,\n );\n }\n if (!isCurrentTurn && assistantCopyText) {\n turnContent.push(\n <div key={`meta-${group.key}`} className={`${widgetStyles.BubbleMeta} ${widgetStyles.BubbleMetaAssistant} ${widgetStyles.TurnMeta}`}>\n <span className={widgetStyles.Timestamp}>{formatChatTime(group.items[group.items.length - 1].at)}</span>\n <SolidAgentMessageCopyButton text={assistantCopyText} />\n </div>,\n );\n }\n\n return (\n <div key={group.key} className={widgetStyles.AiTurnGroup}>\n <div className={widgetStyles.AiTurnContent}>{turnContent}</div>\n </div>\n );\n })}\n </div>\n );\n}\n"]}
|