@solidxai/core-ui 0.1.21-beta.0 → 0.1.21-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/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 +163 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.module.css +86 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionChatFormWidget.tsx +129 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts +23 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js +270 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.module.css +167 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionComparisonHeaderAction.tsx +270 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js +67 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.module.css +68 -0
- package/dist/components/core/extension/solid-core/agentSession/AgentSessionConfigVersionListWidget.tsx +107 -0
- package/dist/components/core/form/SolidFormFieldRender.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormFieldRender.js +2 -1
- package/dist/components/core/form/SolidFormFieldRender.js.map +1 -1
- package/dist/components/core/form/SolidFormFieldRender.tsx +6 -3
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +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 +4 -1
- package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.js +546 -49
- package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentChat.tsx +757 -48
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts +2 -0
- package/dist/components/core/solid-agent/SolidAgentEmbedded.d.ts.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js +17 -11
- package/dist/components/core/solid-agent/SolidAgentEmbedded.js.map +1 -1
- package/dist/components/core/solid-agent/SolidAgentEmbedded.tsx +33 -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 +21 -3
- package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.js +228 -29
- package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
- package/dist/components/core/solid-agent/client/agentRuntime.ts +197 -17
- 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 +65 -62
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts +2 -2
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js +9 -3
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.js.map +1 -1
- package/dist/components/core/solid-agent/thread/SolidAgentChatItem.tsx +12 -3
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts +15 -0
- package/dist/components/core/solid-agent/thread/inlineWidget.d.ts.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.js +170 -19
- package/dist/components/core/solid-agent/thread/inlineWidget.js.map +1 -1
- package/dist/components/core/solid-agent/thread/inlineWidget.ts +164 -15
- package/dist/components/core/solid-agent/types.d.ts +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/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/routes/pages/admin/core/agentConfigComparison.js +75 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.js.map +1 -0
- package/dist/routes/pages/admin/core/agentConfigComparison.ts +40 -0
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +2 -0
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +2 -0
- package/package.json +1 -1
|
@@ -1,27 +1,176 @@
|
|
|
1
1
|
/** A widget the agent sent as its text reply: `{"widgetName": "...", "data": {...} | "<json>"}`. */
|
|
2
2
|
export type InlineChatWidget = { widget: string; data: Record<string, any> };
|
|
3
|
+
export type InlineChatWidgetState =
|
|
4
|
+
| { state: "widget"; value: InlineChatWidget }
|
|
5
|
+
| { state: "pending" }
|
|
6
|
+
| { state: "text" };
|
|
7
|
+
|
|
8
|
+
const WIDGET_NAME_KEY = "widgetName";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* True while a streamed reply can still become a widget envelope. The agent
|
|
12
|
+
* protocol puts widgetName first, so this checks that key incrementally instead
|
|
13
|
+
* of treating every partial JSON object as a widget.
|
|
14
|
+
*/
|
|
15
|
+
function isPendingWidgetEnvelope(content: string): boolean {
|
|
16
|
+
let candidate = content.trimStart();
|
|
17
|
+
if (!candidate) return false;
|
|
18
|
+
|
|
19
|
+
if (candidate.startsWith("```")) {
|
|
20
|
+
const newline = candidate.indexOf("\n");
|
|
21
|
+
if (newline === -1) return "```json".startsWith(candidate.toLowerCase());
|
|
22
|
+
const fence = candidate.slice(0, newline).trim().toLowerCase();
|
|
23
|
+
if (fence !== "```" && fence !== "```json") return false;
|
|
24
|
+
candidate = candidate.slice(newline + 1).trimStart();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (!candidate.startsWith("{")) return false;
|
|
28
|
+
const afterBrace = candidate.slice(1).trimStart();
|
|
29
|
+
if (!afterBrace) return true;
|
|
30
|
+
if (!afterBrace.startsWith('"')) return false;
|
|
31
|
+
|
|
32
|
+
const closingQuote = afterBrace.indexOf('"', 1);
|
|
33
|
+
if (closingQuote === -1) {
|
|
34
|
+
return WIDGET_NAME_KEY.startsWith(afterBrace.slice(1));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const firstKey = afterBrace.slice(1, closingQuote);
|
|
38
|
+
if (firstKey !== WIDGET_NAME_KEY) return false;
|
|
39
|
+
|
|
40
|
+
const afterKey = afterBrace.slice(closingQuote + 1).trimStart();
|
|
41
|
+
return afterKey === "" || afterKey.startsWith(":");
|
|
42
|
+
}
|
|
3
43
|
|
|
4
44
|
/** Returns the widget in a reply, or null when the reply is not that JSON (it then renders as text). */
|
|
5
45
|
export function parseWidgetContent(content: unknown): InlineChatWidget | null {
|
|
6
46
|
if (typeof content !== "string") return null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
47
|
+
const trimmed = content.trim();
|
|
48
|
+
if (!trimmed) return null;
|
|
49
|
+
|
|
50
|
+
let candidate = trimmed;
|
|
51
|
+
// Strip markdown code fences if wrapped in ```json ... ``` or ``` ... ```
|
|
52
|
+
if (candidate.startsWith("```")) {
|
|
53
|
+
const lines = candidate.split("\n");
|
|
54
|
+
if (lines.length >= 2 && lines[lines.length - 1].trim().startsWith("```")) {
|
|
55
|
+
candidate = lines.slice(1, -1).join("\n").trim();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let parsed: any = null;
|
|
60
|
+
if (candidate.startsWith("{") && candidate.endsWith("}")) {
|
|
61
|
+
try {
|
|
62
|
+
parsed = JSON.parse(candidate);
|
|
63
|
+
} catch {
|
|
64
|
+
// ignore
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// If candidate wasn't a standalone JSON object, look for embedded {"widgetName" envelope
|
|
69
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.widgetName !== "string") {
|
|
70
|
+
const idx = candidate.indexOf('{"widgetName"');
|
|
71
|
+
if (idx !== -1) {
|
|
72
|
+
let depth = 0;
|
|
73
|
+
let inString = false;
|
|
74
|
+
let escape = false;
|
|
75
|
+
for (let i = idx; i < candidate.length; i++) {
|
|
76
|
+
const ch = candidate[i];
|
|
77
|
+
if (escape) {
|
|
78
|
+
escape = false;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (ch === "\\" && inString) {
|
|
82
|
+
escape = true;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (ch === '"') {
|
|
86
|
+
inString = !inString;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (!inString) {
|
|
90
|
+
if (ch === "{") depth++;
|
|
91
|
+
else if (ch === "}") {
|
|
92
|
+
depth--;
|
|
93
|
+
if (depth === 0) {
|
|
94
|
+
try {
|
|
95
|
+
const candidateParsed = JSON.parse(candidate.slice(idx, i + 1));
|
|
96
|
+
if (candidateParsed && typeof candidateParsed === "object" && typeof candidateParsed.widgetName === "string") {
|
|
97
|
+
parsed = candidateParsed;
|
|
98
|
+
}
|
|
99
|
+
} catch {
|
|
100
|
+
// ignore
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
19
106
|
}
|
|
20
107
|
}
|
|
108
|
+
}
|
|
21
109
|
|
|
22
|
-
|
|
23
|
-
return { widget: parsed.widgetName, data };
|
|
24
|
-
} catch {
|
|
110
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.widgetName !== "string") {
|
|
25
111
|
return null;
|
|
26
112
|
}
|
|
113
|
+
|
|
114
|
+
const widgetName = parsed.widgetName.trim().toLowerCase();
|
|
115
|
+
let data = parsed.data;
|
|
116
|
+
|
|
117
|
+
if (typeof data === "string") {
|
|
118
|
+
try {
|
|
119
|
+
data = JSON.parse(data);
|
|
120
|
+
} catch {
|
|
121
|
+
// Assistant envelopes carry text or raw strings for specific widgets
|
|
122
|
+
if (widgetName === "markdown") data = { text: data };
|
|
123
|
+
else if (widgetName === "code") data = { code: data };
|
|
124
|
+
else if (widgetName === "json") data = { json: data };
|
|
125
|
+
else data = { text: data, raw: data };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Support data being an array directly
|
|
130
|
+
if (Array.isArray(data)) {
|
|
131
|
+
if (widgetName === "table") data = { rows: data };
|
|
132
|
+
else if (widgetName === "checklist" || widgetName === "progress") data = { items: data };
|
|
133
|
+
else data = { items: data, data };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (!data || typeof data !== "object") return null;
|
|
137
|
+
return { widget: widgetName, data };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Classifies live assistant content without exposing an incomplete JSON envelope as text. */
|
|
141
|
+
export function classifyWidgetContent(content: unknown): InlineChatWidgetState {
|
|
142
|
+
const widget = parseWidgetContent(content);
|
|
143
|
+
if (widget) return { state: "widget", value: widget };
|
|
144
|
+
if (typeof content === "string" && isPendingWidgetEnvelope(content)) return { state: "pending" };
|
|
145
|
+
return { state: "text" };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Compares two assistant text strings, accounting for JSON serialization / formatting differences
|
|
150
|
+
* and widget markdown envelopes so duplicate turn completions do not append repeated cards.
|
|
151
|
+
*/
|
|
152
|
+
export function isSameAssistantContent(a: string | undefined, b: string | undefined): boolean {
|
|
153
|
+
const trimA = a?.trim() ?? "";
|
|
154
|
+
const trimB = b?.trim() ?? "";
|
|
155
|
+
if (!trimA && !trimB) return true;
|
|
156
|
+
if (!trimA || !trimB) return false;
|
|
157
|
+
if (trimA === trimB) return true;
|
|
158
|
+
|
|
159
|
+
const wa = parseWidgetContent(trimA);
|
|
160
|
+
const wb = parseWidgetContent(trimB);
|
|
161
|
+
if (wa && wb) {
|
|
162
|
+
if (wa.widget !== wb.widget) return false;
|
|
163
|
+
try {
|
|
164
|
+
return JSON.stringify(wa.data) === JSON.stringify(wb.data);
|
|
165
|
+
} catch {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (wa?.widget === "markdown" && typeof wa.data?.text === "string" && wa.data.text.trim() === trimB) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
if (wb?.widget === "markdown" && typeof wb.data?.text === "string" && wb.data.text.trim() === trimA) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
27
176
|
}
|
|
@@ -43,7 +43,54 @@ export type AgentModelAssignments = {
|
|
|
43
43
|
};
|
|
44
44
|
/** @deprecated Use AgentRuntimeType. */
|
|
45
45
|
export type AgentType = AgentRuntimeType;
|
|
46
|
+
export interface AgentProviderInfo {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
installed: boolean;
|
|
50
|
+
version?: string;
|
|
51
|
+
default_model?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ReasoningEffortInfo {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface SpeedTierInfo {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ProviderModelInfo {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
is_default?: boolean;
|
|
67
|
+
description?: string;
|
|
68
|
+
supports_vision?: boolean;
|
|
69
|
+
supports_image?: boolean;
|
|
70
|
+
supports_images?: boolean;
|
|
71
|
+
capabilities?: {
|
|
72
|
+
input?: {
|
|
73
|
+
image?: boolean;
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
};
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
};
|
|
78
|
+
reasoning_efforts?: ReasoningEffortInfo[];
|
|
79
|
+
default_reasoning?: string;
|
|
80
|
+
supports_thinking?: boolean;
|
|
81
|
+
speed_tiers?: SpeedTierInfo[];
|
|
82
|
+
default_speed?: string;
|
|
83
|
+
supports_fast?: boolean;
|
|
84
|
+
}
|
|
46
85
|
export type AgentConnection = "idle" | "connecting" | "open" | "reconnecting" | "offline";
|
|
86
|
+
export interface AgentUsageStats {
|
|
87
|
+
totalCost: number;
|
|
88
|
+
totalInputTokens: number;
|
|
89
|
+
totalOutputTokens: number;
|
|
90
|
+
totalTokens: number;
|
|
91
|
+
contextTokens: number;
|
|
92
|
+
contextLimit: number;
|
|
93
|
+
}
|
|
47
94
|
/** A slash command advertised by the agent in `session_started`. */
|
|
48
95
|
export type AgentCommand = {
|
|
49
96
|
name: string;
|
|
@@ -70,8 +117,10 @@ export type AgentChatEvent = {
|
|
|
70
117
|
export declare const AgentEventTypes: {
|
|
71
118
|
readonly sessionStarted: "session_started";
|
|
72
119
|
readonly sessionEnded: "session_ended";
|
|
120
|
+
readonly sessionUpdated: "session_updated";
|
|
73
121
|
readonly userMessage: "UserMessage";
|
|
74
122
|
readonly agentStarted: "AgentStarted";
|
|
123
|
+
readonly agentThinking: "AgentThinking";
|
|
75
124
|
readonly stepStarted: "StepStarted";
|
|
76
125
|
readonly stepComplete: "StepComplete";
|
|
77
126
|
readonly llmToken: "LlmToken";
|
|
@@ -121,14 +170,32 @@ export type AgentUploadedAttachment = {
|
|
|
121
170
|
mimeType: string;
|
|
122
171
|
size: number;
|
|
123
172
|
};
|
|
124
|
-
export type
|
|
173
|
+
export type AgentSessionOptions = {
|
|
174
|
+
thinking?: boolean;
|
|
175
|
+
fast?: boolean;
|
|
176
|
+
reasoning?: string;
|
|
177
|
+
speed?: string;
|
|
178
|
+
};
|
|
179
|
+
export type AgentAction = ({
|
|
125
180
|
action: "start_session";
|
|
126
181
|
widget_catalog?: AgentChatWidgetMetadata[];
|
|
127
|
-
|
|
182
|
+
provider?: string;
|
|
183
|
+
model?: string;
|
|
184
|
+
runtime?: AgentRuntimeType;
|
|
185
|
+
} & AgentSessionOptions) | ({
|
|
128
186
|
action: "resume_session";
|
|
129
187
|
session_id: string;
|
|
130
188
|
widget_catalog?: AgentChatWidgetMetadata[];
|
|
131
|
-
|
|
189
|
+
provider?: string;
|
|
190
|
+
model?: string;
|
|
191
|
+
runtime?: AgentRuntimeType;
|
|
192
|
+
} & AgentSessionOptions) | ({
|
|
193
|
+
action: "update_session";
|
|
194
|
+
session_id: string;
|
|
195
|
+
provider?: string;
|
|
196
|
+
model?: string;
|
|
197
|
+
runtime?: AgentRuntimeType;
|
|
198
|
+
} & AgentSessionOptions) | ({
|
|
132
199
|
action: "message";
|
|
133
200
|
session_id: string;
|
|
134
201
|
content: string;
|
|
@@ -138,7 +205,9 @@ export type AgentAction = {
|
|
|
138
205
|
inputs?: Record<string, unknown>;
|
|
139
206
|
widget_reply?: WidgetReply | null;
|
|
140
207
|
attachments?: AgentAttachmentPayload[] | AgentUploadedAttachment[];
|
|
141
|
-
|
|
208
|
+
provider?: string;
|
|
209
|
+
model?: string;
|
|
210
|
+
} & AgentSessionOptions) | {
|
|
142
211
|
action: "cancel";
|
|
143
212
|
session_id: string;
|
|
144
213
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAEjF;;;;;;;;GAQG;AAEH,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AACtG,MAAM,MAAM,mBAAmB,GAAG;IAC9B,aAAa,EAAE,CAAC,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,SAAS,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjG,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AACrD,MAAM,MAAM,oBAAoB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAC9E,MAAM,MAAM,qBAAqB,G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AACrC,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
export var AgentEventTypes = {
|
|
3
3
|
sessionStarted: "session_started",
|
|
4
4
|
sessionEnded: "session_ended",
|
|
5
|
+
sessionUpdated: "session_updated",
|
|
5
6
|
userMessage: "UserMessage",
|
|
6
7
|
agentStarted: "AgentStarted",
|
|
8
|
+
agentThinking: "AgentThinking",
|
|
7
9
|
stepStarted: "StepStarted",
|
|
8
10
|
stepComplete: "StepComplete",
|
|
9
11
|
llmToken: "LlmToken",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/types.ts"],"names":[],"mappings":"AAqHA,4GAA4G;AAC5G,MAAM,CAAC,IAAM,eAAe,GAAG;IAC3B,cAAc,EAAE,iBAAiB;IACjC,YAAY,EAAE,eAAe;IAC7B,cAAc,EAAE,iBAAiB;IACjC,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,mBAAmB;IACjC,kBAAkB,EAAE,eAAe;IACnC,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,wBAAwB,EAAE,qBAAqB;IAC/C,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;CACR,CAAC","sourcesContent":["import type { AgentChatWidgetMetadata } from \"../../../types/extension-registry\";\n\n/**\n * Shared types for the SolidX Agent chat (launcher, window, thread).\n *\n * Wire format: every agent payload carries `event_type` and `event_data`. When\n * `event_data.widget` names a registered chat widget, that widget renders the event;\n * otherwise the event is rendered by the default widget for its `event_type`.\n * (Legacy frames `{ type, data }` are normalised to the same shape.)\n * The widget contract itself (SolidChatWidgetProps) lives in types/solid-core.d.ts.\n */\n\n/** Page context passed with a prompt so the agent knows where the user is. */\nexport type AgentContext = {\n module?: string;\n model?: string;\n recordId?: string | number;\n route?: string;\n [key: string]: unknown;\n};\n\nexport type AgentJson = null | boolean | number | string | AgentJson[] | { [key: string]: AgentJson };\nexport type AgentMessageContext = {\n schemaVersion: 1;\n namespaces: Record<string, { context: AgentJson; revision: string; displaySummary?: string }>;\n};\n\nexport type AgentMode = \"bubble\" | \"compact\" | \"docked\" | \"maximized\";\n\n/**\n * Which agent backend a chat talks to: \"solidx\" (setting solidxAgentBackendUrl; the floating\n * launcher) or \"agentHub\" (setting solidxAgentHubBackendUrl).\n */\nexport type AgentRuntimeType = \"solidx\" | \"agentHub\";\nexport type AgentModelAssignment = { provider: string; model: string } | null;\nexport type AgentModelAssignments = { reasoning: AgentModelAssignment; fast: AgentModelAssignment };\n/** @deprecated Use AgentRuntimeType. */\nexport type AgentType = AgentRuntimeType;\n\nexport interface AgentProviderInfo {\n id: string;\n name: string;\n installed: boolean;\n version?: string;\n default_model?: string;\n}\n\nexport interface ReasoningEffortInfo {\n id: string;\n name: string;\n description?: string;\n}\n\nexport interface SpeedTierInfo {\n id: string;\n name: string;\n description?: string;\n}\n\nexport interface ProviderModelInfo {\n id: string;\n name: string;\n is_default?: boolean;\n description?: string;\n supports_vision?: boolean;\n supports_image?: boolean;\n supports_images?: boolean;\n capabilities?: {\n input?: {\n image?: boolean;\n [key: string]: any;\n };\n [key: string]: any;\n };\n reasoning_efforts?: ReasoningEffortInfo[];\n default_reasoning?: string;\n supports_thinking?: boolean;\n speed_tiers?: SpeedTierInfo[];\n default_speed?: string;\n supports_fast?: boolean;\n}\n\nexport type AgentConnection = \"idle\" | \"connecting\" | \"open\" | \"reconnecting\" | \"offline\";\n\nexport interface AgentUsageStats {\n totalCost: number;\n totalInputTokens: number;\n totalOutputTokens: number;\n totalTokens: number;\n contextTokens: number;\n contextLimit: number;\n}\n\n/** A slash command advertised by the agent in `session_started`. */\nexport type AgentCommand = { name: string; description?: string };\n\n// ── Inbound ───────────────────────────────────────────────────────────────────\n\n/** A frame as it arrives on the socket or from session history (before normalisation). */\nexport type AgentWireFrame = {\n event_type?: string;\n event_data?: Record<string, any>;\n type?: string;\n data?: Record<string, any>;\n session_id?: string;\n history_session_id?: string;\n [key: string]: any;\n};\n\n/** The normalised event every reducer and widget works with. */\nexport type AgentChatEvent = {\n eventType: string;\n eventData: Record<string, any>;\n /** Top-level fields of the frame (session_id, history_session_id, commands, ...). */\n frame: AgentWireFrame;\n};\n\n/** Event types the chat knows by name. Anything else is still rendered (via its widget or the fallback). */\nexport const AgentEventTypes = {\n sessionStarted: \"session_started\",\n sessionEnded: \"session_ended\",\n sessionUpdated: \"session_updated\",\n userMessage: \"UserMessage\",\n agentStarted: \"AgentStarted\",\n agentThinking: \"AgentThinking\",\n stepStarted: \"StepStarted\",\n stepComplete: \"StepComplete\",\n llmToken: \"LlmToken\",\n llmComplete: \"LlmComplete\",\n toolCalling: \"ToolCalling\",\n toolProgress: \"ToolProgress\",\n toolResult: \"ToolResult\",\n turnComplete: \"TurnCompleteEvent\",\n turnCompleteLegacy: \"turn_complete\",\n agentComplete: \"AgentComplete\",\n executionCancelled: \"ExecutionCancelled\",\n executionCancelledLegacy: \"execution_cancelled\",\n agentError: \"AgentError\",\n error: \"error\",\n} as const;\n\n// ── Outbound ──────────────────────────────────────────────────────────────────\n\nexport type WidgetReply = { widgetId: string; value: unknown };\n\n/** A file sent inline with a message: text files as text, images base64-encoded (no data: prefix). */\nexport type AgentAttachmentPayload = {\n name: string;\n mimeType: string;\n size: number;\n encoding: \"text\" | \"base64\";\n content: string;\n};\n\n/** What the thread shows for an attachment (history only has name/type/size). */\nexport type AgentAttachmentMeta = {\n mediaId?: number;\n name: string;\n mimeType: string;\n size: number;\n /** data: URL for image thumbnails of files attached in this browser session. */\n previewUrl?: string;\n /** Stored copy in Solid media storage (resolved when a conversation is reopened). */\n url?: string;\n};\n\nexport type AgentAttachment = { payload: AgentAttachmentPayload; meta: AgentAttachmentMeta; file: File };\nexport type AgentUploadedAttachment = { id: number; name: string; mimeType: string; size: number };\n\nexport type AgentSessionOptions = {\n thinking?: boolean;\n fast?: boolean;\n reasoning?: string;\n speed?: string;\n};\n\nexport type AgentAction =\n | ({ action: \"start_session\"; widget_catalog?: AgentChatWidgetMetadata[]; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)\n | ({ action: \"resume_session\"; session_id: string; widget_catalog?: AgentChatWidgetMetadata[]; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)\n | ({ action: \"update_session\"; session_id: string; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)\n | ({\n action: \"message\";\n session_id: string;\n content: string;\n source?: \"composer\" | \"sdk\" | \"prefill\" | \"widget\";\n context?: AgentContext;\n message_context?: AgentMessageContext;\n inputs?: Record<string, unknown>;\n widget_reply?: WidgetReply | null;\n attachments?: AgentAttachmentPayload[] | AgentUploadedAttachment[];\n provider?: string;\n model?: string;\n } & AgentSessionOptions)\n | { action: \"cancel\"; session_id: string }\n | { action: \"end_session\"; session_id: string };\n\n// ── Thread items ──────────────────────────────────────────────────────────────\n\n/**\n * One rendered entry in the thread. `eventData` is the (accumulated) event payload handed to\n * the widget; `widget` is set when the agent named one, otherwise the default for `eventType`.\n */\nexport type AgentChatItem = {\n id: string;\n at: number;\n eventType: string;\n eventData: Record<string, any>;\n widget?: string;\n widgetId?: string;\n /** Live items (a running tool, a streaming reply) are still updating. */\n live?: boolean;\n /** A final widget accepts no more updates or replies. */\n final?: boolean;\n};\n\n/** Options for `solidAgent.open`. */\nexport type SolidAgentOpenOptions = {\n prompt?: string;\n autoSend?: boolean;\n context?: AgentContext;\n mode?: Exclude<AgentMode, \"bubble\">;\n};\n"]}
|
|
@@ -37,8 +37,60 @@ export type AgentModelAssignments = { reasoning: AgentModelAssignment; fast: Age
|
|
|
37
37
|
/** @deprecated Use AgentRuntimeType. */
|
|
38
38
|
export type AgentType = AgentRuntimeType;
|
|
39
39
|
|
|
40
|
+
export interface AgentProviderInfo {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
installed: boolean;
|
|
44
|
+
version?: string;
|
|
45
|
+
default_model?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ReasoningEffortInfo {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface SpeedTierInfo {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ProviderModelInfo {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
is_default?: boolean;
|
|
64
|
+
description?: string;
|
|
65
|
+
supports_vision?: boolean;
|
|
66
|
+
supports_image?: boolean;
|
|
67
|
+
supports_images?: boolean;
|
|
68
|
+
capabilities?: {
|
|
69
|
+
input?: {
|
|
70
|
+
image?: boolean;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
};
|
|
75
|
+
reasoning_efforts?: ReasoningEffortInfo[];
|
|
76
|
+
default_reasoning?: string;
|
|
77
|
+
supports_thinking?: boolean;
|
|
78
|
+
speed_tiers?: SpeedTierInfo[];
|
|
79
|
+
default_speed?: string;
|
|
80
|
+
supports_fast?: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
40
83
|
export type AgentConnection = "idle" | "connecting" | "open" | "reconnecting" | "offline";
|
|
41
84
|
|
|
85
|
+
export interface AgentUsageStats {
|
|
86
|
+
totalCost: number;
|
|
87
|
+
totalInputTokens: number;
|
|
88
|
+
totalOutputTokens: number;
|
|
89
|
+
totalTokens: number;
|
|
90
|
+
contextTokens: number;
|
|
91
|
+
contextLimit: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
42
94
|
/** A slash command advertised by the agent in `session_started`. */
|
|
43
95
|
export type AgentCommand = { name: string; description?: string };
|
|
44
96
|
|
|
@@ -67,8 +119,10 @@ export type AgentChatEvent = {
|
|
|
67
119
|
export const AgentEventTypes = {
|
|
68
120
|
sessionStarted: "session_started",
|
|
69
121
|
sessionEnded: "session_ended",
|
|
122
|
+
sessionUpdated: "session_updated",
|
|
70
123
|
userMessage: "UserMessage",
|
|
71
124
|
agentStarted: "AgentStarted",
|
|
125
|
+
agentThinking: "AgentThinking",
|
|
72
126
|
stepStarted: "StepStarted",
|
|
73
127
|
stepComplete: "StepComplete",
|
|
74
128
|
llmToken: "LlmToken",
|
|
@@ -113,10 +167,18 @@ export type AgentAttachmentMeta = {
|
|
|
113
167
|
export type AgentAttachment = { payload: AgentAttachmentPayload; meta: AgentAttachmentMeta; file: File };
|
|
114
168
|
export type AgentUploadedAttachment = { id: number; name: string; mimeType: string; size: number };
|
|
115
169
|
|
|
170
|
+
export type AgentSessionOptions = {
|
|
171
|
+
thinking?: boolean;
|
|
172
|
+
fast?: boolean;
|
|
173
|
+
reasoning?: string;
|
|
174
|
+
speed?: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
116
177
|
export type AgentAction =
|
|
117
|
-
| { action: "start_session"; widget_catalog?: AgentChatWidgetMetadata[] }
|
|
118
|
-
| { action: "resume_session"; session_id: string; widget_catalog?: AgentChatWidgetMetadata[] }
|
|
119
|
-
| {
|
|
178
|
+
| ({ action: "start_session"; widget_catalog?: AgentChatWidgetMetadata[]; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)
|
|
179
|
+
| ({ action: "resume_session"; session_id: string; widget_catalog?: AgentChatWidgetMetadata[]; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)
|
|
180
|
+
| ({ action: "update_session"; session_id: string; provider?: string; model?: string; runtime?: AgentRuntimeType } & AgentSessionOptions)
|
|
181
|
+
| ({
|
|
120
182
|
action: "message";
|
|
121
183
|
session_id: string;
|
|
122
184
|
content: string;
|
|
@@ -126,7 +188,9 @@ export type AgentAction =
|
|
|
126
188
|
inputs?: Record<string, unknown>;
|
|
127
189
|
widget_reply?: WidgetReply | null;
|
|
128
190
|
attachments?: AgentAttachmentPayload[] | AgentUploadedAttachment[];
|
|
129
|
-
|
|
191
|
+
provider?: string;
|
|
192
|
+
model?: string;
|
|
193
|
+
} & AgentSessionOptions)
|
|
130
194
|
| { action: "cancel"; session_id: string }
|
|
131
195
|
| { action: "end_session"; session_id: string };
|
|
132
196
|
|
|
@@ -2,6 +2,7 @@ import type { AgentRuntimeType } from "./types";
|
|
|
2
2
|
export type AgentAvailability = {
|
|
3
3
|
ready: boolean;
|
|
4
4
|
enabled: boolean;
|
|
5
|
+
loadFailed: boolean;
|
|
5
6
|
/** Backend URL of the "solidx" runtime (the floating launcher). */
|
|
6
7
|
agentUrl: string | null;
|
|
7
8
|
/** Backend URL per agent type; null when that backend is not configured. */
|
|
@@ -11,7 +12,8 @@ export type AgentAvailability = {
|
|
|
11
12
|
/**
|
|
12
13
|
* Whether the SolidX Agent can be shown for the current user: the `solidAgentEnabled` setting,
|
|
13
14
|
* the backend URL settings (`solidxAgentBackendUrl`, `solidxAgentHubBackendUrl`), and
|
|
14
|
-
* `canUseAgent` (agent:invoke) from /iam/me.
|
|
15
|
+
* `canUseAgent` (agent:invoke) from /iam/me. Concurrent mounts share one request;
|
|
16
|
+
* later mounts get current settings and permission values.
|
|
15
17
|
*/
|
|
16
18
|
export declare function useAgentAvailability(enabled?: boolean): AgentAvailability;
|
|
17
19
|
/** Forget the cached availability (e.g. after logout or a settings change). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgentAvailability.d.ts","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/useAgentAvailability.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,MAAM,EAAE,OAAO,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAgentAvailability.d.ts","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/useAgentAvailability.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,MAAM,EAAE,OAAO,CAAC;CACnB,CAAC;AAwCF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,UAAO,GAAG,iBAAiB,CAqBtE;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,SAErC"}
|
|
@@ -38,7 +38,7 @@ import { useEffect, useState } from "react";
|
|
|
38
38
|
import { solidGet } from "../../../http/solidHttp";
|
|
39
39
|
import { getSettingsMap } from "../../../helpers/settingsPayload";
|
|
40
40
|
var NO_URLS = { solidx: null, agentHub: null };
|
|
41
|
-
var UNAVAILABLE = { ready: true, enabled: false, agentUrl: null, agentUrls: NO_URLS, canUse: false };
|
|
41
|
+
var UNAVAILABLE = { ready: true, enabled: false, loadFailed: true, agentUrl: null, agentUrls: NO_URLS, canUse: false };
|
|
42
42
|
/** Settings key holding each agent type's backend URL (see solid-core default settings). */
|
|
43
43
|
var URL_SETTING = {
|
|
44
44
|
solidx: "solidxAgentBackendUrl",
|
|
@@ -61,10 +61,12 @@ var cached = null;
|
|
|
61
61
|
function loadAvailability() {
|
|
62
62
|
var _a;
|
|
63
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
var _b, settingsRes, meRes, settings, enabled, agentUrls, canUse;
|
|
64
|
+
var config, _b, settingsRes, meRes, settings, enabled, agentUrls, canUse;
|
|
65
65
|
return __generator(this, function (_c) {
|
|
66
66
|
switch (_c.label) {
|
|
67
|
-
case 0:
|
|
67
|
+
case 0:
|
|
68
|
+
config = { params: { agentAvailabilityRefresh: Date.now() } };
|
|
69
|
+
return [4 /*yield*/, Promise.all([solidGet("/setting/wrapped", config), solidGet("/iam/me", config)])];
|
|
68
70
|
case 1:
|
|
69
71
|
_b = _c.sent(), settingsRes = _b[0], meRes = _b[1];
|
|
70
72
|
settings = getSettingsMap(settingsRes === null || settingsRes === void 0 ? void 0 : settingsRes.data);
|
|
@@ -74,7 +76,7 @@ function loadAvailability() {
|
|
|
74
76
|
agentHub: urlSetting(settings[URL_SETTING.agentHub]),
|
|
75
77
|
};
|
|
76
78
|
canUse = ((_a = unwrapUser(meRes === null || meRes === void 0 ? void 0 : meRes.data)) === null || _a === void 0 ? void 0 : _a.canUseAgent) === true;
|
|
77
|
-
return [2 /*return*/, { ready: true, enabled: enabled, agentUrl: agentUrls.solidx, agentUrls: agentUrls, canUse: canUse }];
|
|
79
|
+
return [2 /*return*/, { ready: true, enabled: enabled, loadFailed: false, agentUrl: agentUrls.solidx, agentUrls: agentUrls, canUse: canUse }];
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
82
|
});
|
|
@@ -82,11 +84,12 @@ function loadAvailability() {
|
|
|
82
84
|
/**
|
|
83
85
|
* Whether the SolidX Agent can be shown for the current user: the `solidAgentEnabled` setting,
|
|
84
86
|
* the backend URL settings (`solidxAgentBackendUrl`, `solidxAgentHubBackendUrl`), and
|
|
85
|
-
* `canUseAgent` (agent:invoke) from /iam/me.
|
|
87
|
+
* `canUseAgent` (agent:invoke) from /iam/me. Concurrent mounts share one request;
|
|
88
|
+
* later mounts get current settings and permission values.
|
|
86
89
|
*/
|
|
87
90
|
export function useAgentAvailability(enabled) {
|
|
88
91
|
if (enabled === void 0) { enabled = true; }
|
|
89
|
-
var _a = useState({ ready: false, enabled: false, agentUrl: null, agentUrls: NO_URLS, canUse: false }), state = _a[0], setState = _a[1];
|
|
92
|
+
var _a = useState({ ready: false, enabled: false, loadFailed: false, agentUrl: null, agentUrls: NO_URLS, canUse: false }), state = _a[0], setState = _a[1];
|
|
90
93
|
useEffect(function () {
|
|
91
94
|
if (!enabled)
|
|
92
95
|
return;
|
|
@@ -95,7 +98,13 @@ export function useAgentAvailability(enabled) {
|
|
|
95
98
|
cached = null; // retry on the next mount
|
|
96
99
|
return UNAVAILABLE;
|
|
97
100
|
}));
|
|
98
|
-
|
|
101
|
+
var request = cached;
|
|
102
|
+
request.then(function (result) {
|
|
103
|
+
if (cached === request)
|
|
104
|
+
cached = null;
|
|
105
|
+
if (alive)
|
|
106
|
+
setState(result);
|
|
107
|
+
});
|
|
99
108
|
return function () {
|
|
100
109
|
alive = false;
|
|
101
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgentAvailability.js","sourceRoot":"","sources":["../../../../src/components/core/solid-agent/useAgentAvailability.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EA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cAAc;IACzC,IAAA,KAAoB,QAAQ,CAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAtJ,KAAK,QAAA,EAAE,QAAQ,QAAuI,CAAC;IAE9J,SAAS,CAAC;QACN,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,MAAM,aAAN,MAAM,cAAN,MAAM,IAAN,MAAM,GAAK,gBAAgB,EAAE,CAAC,KAAK,CAAC;YAChC,MAAM,GAAG,IAAI,CAAC,CAAC,0BAA0B;YACzC,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC,EAAC;QACH,IAAM,OAAO,GAAG,MAAM,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM;YAChB,IAAI,MAAM,KAAK,OAAO;gBAAE,MAAM,GAAG,IAAI,CAAC;YACtC,IAAI,KAAK;gBAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,OAAO;YACH,KAAK,GAAG,KAAK,CAAC;QAClB,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,sBAAsB;IAClC,MAAM,GAAG,IAAI,CAAC;AAClB,CAAC","sourcesContent":["import { useEffect, useState } from \"react\";\nimport { solidGet } from \"../../../http/solidHttp\";\nimport { getSettingsMap } from \"../../../helpers/settingsPayload\";\nimport type { AgentRuntimeType } from \"./types\";\n\nexport type AgentAvailability = {\n ready: boolean;\n enabled: boolean;\n loadFailed: boolean;\n /** Backend URL of the \"solidx\" runtime (the floating launcher). */\n agentUrl: string | null;\n /** Backend URL per agent type; null when that backend is not configured. */\n agentUrls: Record<AgentRuntimeType, string | null>;\n canUse: boolean;\n};\n\nconst NO_URLS: Record<AgentRuntimeType, string | null> = { solidx: null, agentHub: null };\nconst UNAVAILABLE: AgentAvailability = { ready: true, enabled: false, loadFailed: true, agentUrl: null, agentUrls: NO_URLS, canUse: false };\n\n/** Settings key holding each agent type's backend URL (see solid-core default settings). */\nconst URL_SETTING: Record<AgentRuntimeType, string> = {\n solidx: \"solidxAgentBackendUrl\",\n agentHub: \"solidxAgentHubBackendUrl\",\n};\n\n/** Solid's response interceptor wraps bodies as { data: <payload> }; descend until `user` shows up. */\nfunction unwrapUser(body: any): any {\n let node = body;\n for (let i = 0; i < 4 && node; i++) {\n if (node.user) return node.user;\n node = node.data;\n }\n return null;\n}\n\nfunction urlSetting(value: unknown): string | null {\n return typeof value === \"string\" && value.trim() ? value.trim() : null;\n}\n\nlet cached: Promise<AgentAvailability> | null = null;\n\nasync function loadAvailability(): Promise<AgentAvailability> {\n const config = { params: { agentAvailabilityRefresh: Date.now() } };\n const [settingsRes, meRes] = await Promise.all([solidGet(\"/setting/wrapped\", config), solidGet(\"/iam/me\", config)]);\n const settings = getSettingsMap(settingsRes?.data);\n const enabled = settings.solidAgentEnabled === true || settings.solidAgentEnabled === \"true\";\n const agentUrls: Record<AgentRuntimeType, string | null> = {\n solidx: urlSetting(settings[URL_SETTING.solidx]),\n agentHub: urlSetting(settings[URL_SETTING.agentHub]),\n };\n const canUse = unwrapUser(meRes?.data)?.canUseAgent === true;\n return { ready: true, enabled, loadFailed: false, agentUrl: agentUrls.solidx, agentUrls, canUse };\n}\n\n/**\n * Whether the SolidX Agent can be shown for the current user: the `solidAgentEnabled` setting,\n * the backend URL settings (`solidxAgentBackendUrl`, `solidxAgentHubBackendUrl`), and\n * `canUseAgent` (agent:invoke) from /iam/me. Concurrent mounts share one request;\n * later mounts get current settings and permission values.\n */\nexport function useAgentAvailability(enabled = true): AgentAvailability {\n const [state, setState] = useState<AgentAvailability>({ ready: false, enabled: false, loadFailed: false, agentUrl: null, agentUrls: NO_URLS, canUse: false });\n\n useEffect(() => {\n if (!enabled) return;\n let alive = true;\n cached ??= loadAvailability().catch(() => {\n cached = null; // retry on the next mount\n return UNAVAILABLE;\n });\n const request = cached;\n request.then((result) => {\n if (cached === request) cached = null;\n if (alive) setState(result);\n });\n return () => {\n alive = false;\n };\n }, [enabled]);\n\n return state;\n}\n\n/** Forget the cached availability (e.g. after logout or a settings change). */\nexport function resetAgentAvailability() {\n cached = null;\n}\n"]}
|