@vertesia/ui 1.5.0-dev.20260717.131047Z → 1.5.0-dev.20260722.120446Z
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/lib/core/components/SidePanel.js +1 -1
- package/lib/core/components/SidePanel.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts +10 -3
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +41 -9
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +1 -1
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js +1 -1
- package/lib/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentChatPlaybackControls.js +2 -2
- package/lib/features/agent/chat/AgentChatPlaybackControls.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +2 -2
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +5 -2
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/ImageLightbox.d.ts.map +1 -1
- package/lib/features/agent/chat/ImageLightbox.js +1 -1
- package/lib/features/agent/chat/ImageLightbox.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +5 -5
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +4 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +15 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
- package/lib/features/environment/SelectEnvironment.d.ts +28 -0
- package/lib/features/environment/SelectEnvironment.d.ts.map +1 -0
- package/lib/features/environment/SelectEnvironment.js +97 -0
- package/lib/features/environment/SelectEnvironment.js.map +1 -0
- package/lib/features/environment/index.d.ts +2 -0
- package/lib/features/environment/index.d.ts.map +1 -0
- package/lib/features/environment/index.js +2 -0
- package/lib/features/environment/index.js.map +1 -0
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +2 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +12 -12
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.js +3 -17
- package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/features/magic-pdf/ExtractedContentView.js +2 -6
- package/lib/features/magic-pdf/ExtractedContentView.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +25 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +42 -0
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts +27 -0
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js +377 -0
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -0
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts +0 -2
- package/lib/features/magic-pdf/MagicPdfProvider.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfProvider.js +15 -42
- package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.d.ts.map +1 -1
- package/lib/features/magic-pdf/MagicPdfView.js +2 -19
- package/lib/features/magic-pdf/MagicPdfView.js.map +1 -1
- package/lib/features/magic-pdf/index.d.ts +1 -0
- package/lib/features/magic-pdf/index.d.ts.map +1 -1
- package/lib/features/magic-pdf/index.js +1 -0
- package/lib/features/magic-pdf/index.js.map +1 -1
- package/lib/features/magic-pdf/types.d.ts +1 -1
- package/lib/features/magic-pdf/types.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +2 -2
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageSlider.js +2 -2
- package/lib/features/pdf-viewer/PdfPageSlider.js.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.d.ts.map +1 -1
- package/lib/features/pdf-viewer/SimplePdfViewer.js +3 -3
- package/lib/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.js +5 -5
- package/lib/features/store/objects/DocumentQuickFilter.js.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +2 -2
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js +1 -1
- package/lib/features/store/objects/components/ContentDispositionButton.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +78 -21
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentIcon.js +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +1 -2
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +4 -8
- package/lib/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +2 -2
- package/lib/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +4 -4
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +15 -0
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyEditor.js +455 -0
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts +11 -0
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -0
- package/lib/features/store/types/IntakePolicyForm.js +91 -0
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -0
- package/lib/features/store/types/SelectContentTypeModal.js +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/index.d.ts +2 -0
- package/lib/features/store/types/index.d.ts.map +1 -1
- package/lib/features/store/types/index.js +2 -0
- package/lib/features/store/types/index.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +7 -0
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -0
- package/lib/features/store/types/intake-policy-editor.logic.js +60 -0
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -0
- package/lib/features/store/types/typeCatalogCache.d.ts +5 -0
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -0
- package/lib/features/store/types/typeCatalogCache.js +40 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -0
- package/lib/features/user/UserInfo.js +7 -3
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/views/ViewExperience.d.ts +20 -0
- package/lib/features/views/ViewExperience.d.ts.map +1 -0
- package/lib/features/views/ViewExperience.js +188 -0
- package/lib/features/views/ViewExperience.js.map +1 -0
- package/lib/features/views/ViewNavigation.d.ts +3 -0
- package/lib/features/views/ViewNavigation.d.ts.map +1 -0
- package/lib/features/views/ViewNavigation.js +36 -0
- package/lib/features/views/ViewNavigation.js.map +1 -0
- package/lib/features/views/ViewResults.d.ts +9 -0
- package/lib/features/views/ViewResults.d.ts.map +1 -0
- package/lib/features/views/ViewResults.js +229 -0
- package/lib/features/views/ViewResults.js.map +1 -0
- package/lib/features/views/ViewSearch.d.ts +3 -0
- package/lib/features/views/ViewSearch.d.ts.map +1 -0
- package/lib/features/views/ViewSearch.js +74 -0
- package/lib/features/views/ViewSearch.js.map +1 -0
- package/lib/features/views/index.d.ts +7 -0
- package/lib/features/views/index.d.ts.map +1 -0
- package/lib/features/views/index.js +7 -0
- package/lib/features/views/index.js.map +1 -0
- package/lib/features/views/types.d.ts +39 -0
- package/lib/features/views/types.d.ts.map +1 -0
- package/lib/features/views/types.js +2 -0
- package/lib/features/views/types.js.map +1 -0
- package/lib/features/views/viewState.d.ts +14 -0
- package/lib/features/views/viewState.d.ts.map +1 -0
- package/lib/features/views/viewState.js +117 -0
- package/lib/features/views/viewState.js.map +1 -0
- package/lib/i18n/locales/ar.json +16 -0
- package/lib/i18n/locales/de.json +12 -0
- package/lib/i18n/locales/en.json +245 -33
- package/lib/i18n/locales/es.json +13 -0
- package/lib/i18n/locales/fr.json +13 -0
- package/lib/i18n/locales/it.json +13 -0
- package/lib/i18n/locales/ja.json +11 -0
- package/lib/i18n/locales/ko.json +11 -0
- package/lib/i18n/locales/pt.json +13 -0
- package/lib/i18n/locales/ru.json +14 -0
- package/lib/i18n/locales/tr.json +12 -0
- package/lib/i18n/locales/zh-TW.json +11 -0
- package/lib/i18n/locales/zh.json +11 -0
- package/lib/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/router/HistoryNavigator.js +23 -13
- package/lib/router/HistoryNavigator.js.map +1 -1
- package/lib/router/Nav.d.ts.map +1 -1
- package/lib/router/Nav.js +15 -6
- package/lib/router/Nav.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +5 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/vertesia-ui-core.js +4 -4
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +34 -27
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +15 -15
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +7 -7
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/form/Form.js +1 -1
- package/lib/widgets/form/Form.js.map +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js +1 -1
- package/lib/widgets/json-view/JSONSwitcher.js.map +1 -1
- package/lib/widgets/json-view/JSONView.js +6 -6
- package/lib/widgets/json-view/JSONView.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +29 -0
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.d.ts +8 -0
- package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/widgets/schema-editor/ManagedSchema.js +16 -0
- package/lib/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +2 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js +1 -0
- package/lib/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js +4 -1
- package/lib/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.d.ts.map +1 -1
- package/lib/widgets/schema-editor/editor/SchemaEditor.js +22 -11
- package/lib/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/package.json +32 -32
- package/src/__tests__/a11y.test.tsx +73 -0
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +67 -12
- package/src/core/components/shadcn/modal/dialog.tsx +1 -1
- package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +1 -1
- package/src/features/agent/chat/AgentChatPlaybackControls.tsx +0 -5
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +31 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +6 -2
- package/src/features/agent/chat/ArtifactsTab.tsx +19 -9
- package/src/features/agent/chat/ImageLightbox.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +48 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +0 -2
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +6 -1
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -15
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +0 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +4 -1
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +80 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +21 -1
- package/src/features/environment/SelectEnvironment.tsx +186 -0
- package/src/features/environment/index.ts +1 -0
- package/src/features/index.ts +2 -0
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +62 -66
- package/src/features/magic-pdf/DownloadPopover.tsx +5 -48
- package/src/features/magic-pdf/ExtractedContentView.tsx +2 -14
- package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +86 -0
- package/src/features/magic-pdf/GroundedExtractionView.test.tsx +65 -0
- package/src/features/magic-pdf/GroundedExtractionView.tsx +1055 -0
- package/src/features/magic-pdf/MagicPdfProvider.tsx +17 -47
- package/src/features/magic-pdf/MagicPdfView.tsx +3 -51
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -1
- package/src/features/oauth/McpConnectionsButton.tsx +0 -2
- package/src/features/oauth/McpConnectionsDialog.tsx +0 -1
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +0 -1
- package/src/features/pdf-viewer/PdfPageSlider.tsx +5 -5
- package/src/features/pdf-viewer/SimplePdfViewer.tsx +11 -12
- package/src/features/permissions/UserPermissionsProvider.tsx +1 -1
- package/src/features/store/objects/DocumentQuickFilter.tsx +13 -15
- package/src/features/store/objects/DocumentSearchResults.tsx +3 -6
- package/src/features/store/objects/components/ContentDispositionButton.tsx +5 -1
- package/src/features/store/objects/components/ContentOverview.tsx +144 -44
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -1
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/useContentPanelHooks.ts +3 -15
- package/src/features/store/objects/layout/renderers.tsx +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- package/src/features/store/types/ContentObjectTypesTable.tsx +12 -14
- package/src/features/store/types/IntakePolicyEditor.tsx +679 -0
- package/src/features/store/types/IntakePolicyForm.tsx +838 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +2 -2
- package/src/features/store/types/index.ts +2 -0
- package/src/features/store/types/intake-policy-editor.logic.test.ts +109 -0
- package/src/features/store/types/intake-policy-editor.logic.ts +87 -0
- package/src/features/store/types/typeCatalogCache.ts +45 -0
- package/src/features/user/UserInfo.tsx +7 -7
- package/src/features/views/ViewExperience.test.tsx +273 -0
- package/src/features/views/ViewExperience.tsx +408 -0
- package/src/features/views/ViewNavigation.test.tsx +86 -0
- package/src/features/views/ViewNavigation.tsx +187 -0
- package/src/features/views/ViewResults.test.ts +82 -0
- package/src/features/views/ViewResults.tsx +609 -0
- package/src/features/views/ViewSearch.test.tsx +147 -0
- package/src/features/views/ViewSearch.tsx +205 -0
- package/src/features/views/index.ts +6 -0
- package/src/features/views/types.ts +57 -0
- package/src/features/views/viewState.test.ts +111 -0
- package/src/features/views/viewState.ts +132 -0
- package/src/i18n/locales/ar.json +16 -0
- package/src/i18n/locales/de.json +12 -0
- package/src/i18n/locales/en.json +965 -753
- package/src/i18n/locales/es.json +13 -0
- package/src/i18n/locales/fr.json +13 -0
- package/src/i18n/locales/it.json +13 -0
- package/src/i18n/locales/ja.json +11 -0
- package/src/i18n/locales/ko.json +11 -0
- package/src/i18n/locales/pt.json +13 -0
- package/src/i18n/locales/ru.json +14 -0
- package/src/i18n/locales/tr.json +12 -0
- package/src/i18n/locales/zh-TW.json +11 -0
- package/src/i18n/locales/zh.json +11 -0
- package/src/router/HistoryNavigator.test.ts +48 -0
- package/src/router/HistoryNavigator.ts +24 -13
- package/src/router/Nav.tsx +18 -8
- package/src/session/UserSession.test.ts +39 -0
- package/src/session/UserSession.ts +5 -3
- package/src/widgets/form/Form.tsx +1 -1
- package/src/widgets/json-view/JSONSwitcher.tsx +2 -2
- package/src/widgets/json-view/JSONView.tsx +7 -7
- package/src/widgets/monacoEditor/MonacoEditor.tsx +29 -0
- package/src/widgets/schema-editor/ManagedSchema.ts +22 -0
- package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +3 -0
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +14 -3
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +80 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/ui",
|
|
3
|
-
"version": "1.5.0-dev.
|
|
3
|
+
"version": "1.5.0-dev.20260722.120446Z",
|
|
4
4
|
"description": "Vertesia UI components and and hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -21,27 +21,27 @@
|
|
|
21
21
|
"hooks"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@floating-ui/dom": "^1.
|
|
25
|
-
"@floating-ui/react": "^0.27.
|
|
24
|
+
"@floating-ui/dom": "^1.8.0",
|
|
25
|
+
"@floating-ui/react": "^0.27.20",
|
|
26
26
|
"@monaco-editor/react": "^4.7.0",
|
|
27
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
28
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
29
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
27
|
+
"@radix-ui/react-checkbox": "^1.3.7",
|
|
28
|
+
"@radix-ui/react-collapsible": "^1.1.16",
|
|
29
|
+
"@radix-ui/react-dialog": "^1.1.19",
|
|
30
30
|
"@radix-ui/react-direction": "^1.1.2",
|
|
31
|
-
"@radix-ui/react-dismissable-layer": "^1.1.
|
|
32
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
31
|
+
"@radix-ui/react-dismissable-layer": "^1.1.15",
|
|
32
|
+
"@radix-ui/react-dropdown-menu": "^2.1.20",
|
|
33
33
|
"@radix-ui/react-focus-guards": "^1.1.4",
|
|
34
|
-
"@radix-ui/react-focus-scope": "^1.1.
|
|
34
|
+
"@radix-ui/react-focus-scope": "^1.1.12",
|
|
35
35
|
"@radix-ui/react-label": "^2.1.11",
|
|
36
|
-
"@radix-ui/react-popover": "^1.1.
|
|
36
|
+
"@radix-ui/react-popover": "^1.1.19",
|
|
37
37
|
"@radix-ui/react-portal": "^1.1.13",
|
|
38
|
-
"@radix-ui/react-radio-group": "^1.4.
|
|
38
|
+
"@radix-ui/react-radio-group": "^1.4.3",
|
|
39
39
|
"@radix-ui/react-separator": "^1.1.11",
|
|
40
|
-
"@radix-ui/react-slider": "^1.4.
|
|
40
|
+
"@radix-ui/react-slider": "^1.4.3",
|
|
41
41
|
"@radix-ui/react-slot": "^1.3.0",
|
|
42
|
-
"@radix-ui/react-switch": "^1.3.
|
|
43
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
44
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
42
|
+
"@radix-ui/react-switch": "^1.3.3",
|
|
43
|
+
"@radix-ui/react-tabs": "^1.1.17",
|
|
44
|
+
"@radix-ui/react-tooltip": "^1.2.12",
|
|
45
45
|
"ajv": "^8.20.0",
|
|
46
46
|
"ajv-formats": "^3.0.1",
|
|
47
47
|
"aria-hidden": "^1.2.6",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"cmdk": "^1.1.1",
|
|
51
51
|
"dayjs": "^1.11.21",
|
|
52
52
|
"debounce": "^3.0.0",
|
|
53
|
-
"dompurify": "^3.4.
|
|
54
|
-
"fast-xml-parser": "^5.
|
|
55
|
-
"fast-xml-validator": "^1.
|
|
56
|
-
"firebase": "^12.
|
|
53
|
+
"dompurify": "^3.4.12",
|
|
54
|
+
"fast-xml-parser": "^5.10.1",
|
|
55
|
+
"fast-xml-validator": "^1.2.0",
|
|
56
|
+
"firebase": "^12.16.0",
|
|
57
57
|
"framer-motion": "^12.42.2",
|
|
58
|
-
"i18next": "^26.3.
|
|
58
|
+
"i18next": "^26.3.6",
|
|
59
59
|
"jwt-decode": "^4.0.0",
|
|
60
60
|
"katex": "^0.17.0",
|
|
61
61
|
"lodash-es": "^4.18.1",
|
|
62
|
-
"lucide-react": "^1.
|
|
62
|
+
"lucide-react": "^1.24.0",
|
|
63
63
|
"mermaid": "^11.16.0",
|
|
64
64
|
"monaco-editor": "^0.55.1",
|
|
65
65
|
"motion": "^12.42.2",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"react-date-picker": "^12.0.2",
|
|
70
70
|
"react-dom": "19.2.7",
|
|
71
71
|
"react-error-boundary": "^6.1.2",
|
|
72
|
-
"react-i18next": "^17.0.
|
|
72
|
+
"react-i18next": "^17.0.9",
|
|
73
73
|
"react-markdown": "^10.1.0",
|
|
74
74
|
"react-pdf": "^10.4.1",
|
|
75
75
|
"react-remove-scroll": "^2.7.2",
|
|
76
76
|
"react-remove-scroll-bar": "^2.3.8",
|
|
77
|
-
"react-resizable-panels": "^4.12.
|
|
77
|
+
"react-resizable-panels": "^4.12.2",
|
|
78
78
|
"react-style-singleton": "^2.2.3",
|
|
79
79
|
"react-vega": "^8.0.0",
|
|
80
80
|
"rehype-katex": "^7.0.1",
|
|
@@ -90,17 +90,17 @@
|
|
|
90
90
|
"vega": "^6.2.0",
|
|
91
91
|
"vega-embed": "^7.1.0",
|
|
92
92
|
"vega-lite": "^6.4.3",
|
|
93
|
-
"@vertesia/client": "1.5.0-dev.
|
|
94
|
-
"@vertesia/
|
|
95
|
-
"@vertesia/fusion-ux": "1.5.0-dev.
|
|
96
|
-
"@vertesia/
|
|
93
|
+
"@vertesia/client": "1.5.0-dev.20260722.120446Z",
|
|
94
|
+
"@vertesia/json": "1.5.0-dev.20260722.120446Z",
|
|
95
|
+
"@vertesia/fusion-ux": "1.5.0-dev.20260722.120446Z",
|
|
96
|
+
"@vertesia/common": "1.5.0-dev.20260722.120446Z"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@testing-library/react": "^16.3.2",
|
|
100
100
|
"@testing-library/user-event": "^14.6.1",
|
|
101
|
-
"@types/hast": "^3.0.
|
|
101
|
+
"@types/hast": "^3.0.5",
|
|
102
102
|
"@types/lodash-es": "^4.17.12",
|
|
103
|
-
"@types/node": "^24.13.
|
|
103
|
+
"@types/node": "^24.13.3",
|
|
104
104
|
"@types/papaparse": "^5.5.2",
|
|
105
105
|
"@types/react": "19.2.17",
|
|
106
106
|
"@types/react-dom": "19.2.3",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"culori": "^4.0.2",
|
|
109
109
|
"i18next-cli": "^1.65.0",
|
|
110
110
|
"jsdom": "^29.1.1",
|
|
111
|
-
"rolldown": "1.1.
|
|
111
|
+
"rolldown": "1.1.5",
|
|
112
112
|
"typescript": "^6.0.3",
|
|
113
|
-
"vitest": "^4.1.
|
|
113
|
+
"vitest": "^4.1.10",
|
|
114
114
|
"vitest-axe": "^0.1.0",
|
|
115
115
|
"wcag-contrast": "^3.0.0",
|
|
116
116
|
"@vertesia/tsconfig": "0.1.0"
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"url": "https://github.com/vertesia/composableai.git",
|
|
181
181
|
"directory": "packages/ui"
|
|
182
182
|
},
|
|
183
|
-
"gitHead": "
|
|
183
|
+
"gitHead": "203c30e5a8ddc583ac9f1acce0f5445eb38a9551",
|
|
184
184
|
"scripts": {
|
|
185
185
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
|
186
186
|
"clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo",
|
|
@@ -53,6 +53,79 @@ describe('@vertesia/ui accessibility (axe)', () => {
|
|
|
53
53
|
expect(await axe(container)).toHaveNoViolations();
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
+
it('Button.title is forwarded to aria-label so icon-only buttons are labelled', async () => {
|
|
57
|
+
const { container } = renderWithProviders(
|
|
58
|
+
<Button onClick={() => undefined} title="Refresh">
|
|
59
|
+
<span aria-hidden="true">↻</span>
|
|
60
|
+
</Button>,
|
|
61
|
+
);
|
|
62
|
+
const button = container.querySelector('button');
|
|
63
|
+
expect(button?.getAttribute('aria-label')).toBe('Refresh');
|
|
64
|
+
// The native title attribute is intentionally not forwarded — it would stack a second
|
|
65
|
+
// browser tooltip on top of the VTooltip that `title` already renders.
|
|
66
|
+
expect(button?.hasAttribute('title')).toBe(false);
|
|
67
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('Button.title does NOT override the name of a button that shows text', async () => {
|
|
71
|
+
// WCAG 2.5.3 Label in Name: the accessible name must contain the visible label, so a
|
|
72
|
+
// tooltip must never replace it. Regression test for the Playwright failure where
|
|
73
|
+
// getByRole('button', { name: 'Installed' }) stopped matching.
|
|
74
|
+
const { container } = renderWithProviders(
|
|
75
|
+
<Button onClick={() => undefined} title="Show only installed apps">
|
|
76
|
+
Installed
|
|
77
|
+
</Button>,
|
|
78
|
+
);
|
|
79
|
+
const button = container.querySelector('button');
|
|
80
|
+
expect(button?.hasAttribute('aria-label')).toBe(false);
|
|
81
|
+
expect(button?.textContent).toBe('Installed');
|
|
82
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('Button.title does not override a nested text label either', async () => {
|
|
86
|
+
const { container } = renderWithProviders(
|
|
87
|
+
<Button onClick={() => undefined} title="Open the definition editor">
|
|
88
|
+
<span aria-hidden="true">📄</span>
|
|
89
|
+
<span>Definition</span>
|
|
90
|
+
</Button>,
|
|
91
|
+
);
|
|
92
|
+
expect(container.querySelector('button')?.hasAttribute('aria-label')).toBe(false);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('Button.alt keeps overriding the name of a text button (legacy behavior)', async () => {
|
|
96
|
+
// Unlike `title`, the deprecated `alt` overrides the accessible name even when text is
|
|
97
|
+
// present. Call sites such as <Button alt="Launch a new agent."><Rocket/> Run</Button>
|
|
98
|
+
// depend on this, so the WCAG 2.5.3 guard must NOT apply to `alt`.
|
|
99
|
+
const { container } = renderWithProviders(
|
|
100
|
+
<Button onClick={() => undefined} alt="Launch a new agent.">
|
|
101
|
+
Run
|
|
102
|
+
</Button>,
|
|
103
|
+
);
|
|
104
|
+
expect(container.querySelector('button')?.getAttribute('aria-label')).toBe('Launch a new agent.');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('Button.tooltipPlacement does not leak onto the DOM element', async () => {
|
|
108
|
+
const { container } = renderWithProviders(
|
|
109
|
+
<Button onClick={() => undefined} title="Zoom in" tooltipPlacement="bottom">
|
|
110
|
+
<span aria-hidden="true">+</span>
|
|
111
|
+
</Button>,
|
|
112
|
+
);
|
|
113
|
+
const button = container.querySelector('button');
|
|
114
|
+
expect(button?.getAttribute('aria-label')).toBe('Zoom in');
|
|
115
|
+
expect(button?.hasAttribute('tooltipPlacement')).toBe(false);
|
|
116
|
+
expect(button?.hasAttribute('tooltipplacement')).toBe(false);
|
|
117
|
+
expect(await axe(container)).toHaveNoViolations();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it('an explicit aria-label wins over Button.title', async () => {
|
|
121
|
+
const { container } = renderWithProviders(
|
|
122
|
+
<Button onClick={() => undefined} title="Refresh" aria-label="Reload the results">
|
|
123
|
+
<span aria-hidden="true">↻</span>
|
|
124
|
+
</Button>,
|
|
125
|
+
);
|
|
126
|
+
expect(container.querySelector('button')?.getAttribute('aria-label')).toBe('Reload the results');
|
|
127
|
+
});
|
|
128
|
+
|
|
56
129
|
it('CopyButton has an accessible name via internal aria-label', async () => {
|
|
57
130
|
const { container } = renderWithProviders(<CopyButton content="example value" />);
|
|
58
131
|
const button = container.querySelector('button');
|
|
@@ -149,7 +149,7 @@ export function SidePanel({
|
|
|
149
149
|
|
|
150
150
|
function CloseButton({ onClose }: { onClose: () => void }) {
|
|
151
151
|
return (
|
|
152
|
-
<Button
|
|
152
|
+
<Button title="Close panel" variant="ghost" onClick={onClose}>
|
|
153
153
|
<X className="size-6" aria-hidden="true" />
|
|
154
154
|
</Button>
|
|
155
155
|
);
|
|
@@ -23,6 +23,22 @@ function useDeprecationWarning(propName: string, isUsed: boolean, message: strin
|
|
|
23
23
|
}, [isUsed, message, propName]);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Does this subtree contribute any text to the accessible name? Used to decide whether `title`
|
|
27
|
+
// may supply that name. Icons (lucide elements) have no string children and return false, and
|
|
28
|
+
// `aria-hidden` subtrees are skipped because they are excluded from the name computation.
|
|
29
|
+
function hasVisibleText(node: React.ReactNode): boolean {
|
|
30
|
+
return React.Children.toArray(node).some((child) => {
|
|
31
|
+
if (typeof child === 'string') return child.trim().length > 0;
|
|
32
|
+
if (typeof child === 'number') return true;
|
|
33
|
+
if (React.isValidElement(child)) {
|
|
34
|
+
const props = child.props as { children?: React.ReactNode; 'aria-hidden'?: boolean | string };
|
|
35
|
+
if (props['aria-hidden'] === true || props['aria-hidden'] === 'true') return false;
|
|
36
|
+
return hasVisibleText(props.children);
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
const buttonVariants = cva(
|
|
27
43
|
'hover:cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
28
44
|
{
|
|
@@ -60,35 +76,66 @@ export interface ButtonProps
|
|
|
60
76
|
VariantProps<typeof buttonVariants> {
|
|
61
77
|
asChild?: boolean;
|
|
62
78
|
/**
|
|
63
|
-
* @deprecated Use `
|
|
64
|
-
*
|
|
65
|
-
*
|
|
79
|
+
* @deprecated Use `title` instead. `alt` drives the same tooltip but, unlike `title`, it
|
|
80
|
+
* overrides the accessible name even when the button shows a text label — which usually
|
|
81
|
+
* violates WCAG 2.5.3 (Label in Name). That legacy behavior is preserved so existing call
|
|
82
|
+
* sites keep announcing what they always did. Slated for removal in the next major.
|
|
66
83
|
*/
|
|
67
84
|
alt?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Tooltip text. Renders a `<VTooltip>` around the button and doubles as the accessible name,
|
|
87
|
+
* so icon-only buttons need nothing else. Pass `aria-label` to override the name independently.
|
|
88
|
+
*/
|
|
68
89
|
title?: string;
|
|
90
|
+
/** Which side the `title` tooltip opens on. Defaults to `top`. */
|
|
91
|
+
tooltipPlacement?: 'top' | 'right' | 'bottom' | 'left';
|
|
69
92
|
isDisabled?: boolean;
|
|
70
93
|
isLoading?: boolean;
|
|
71
94
|
}
|
|
72
95
|
|
|
73
96
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
74
97
|
(
|
|
75
|
-
{
|
|
98
|
+
{
|
|
99
|
+
className,
|
|
100
|
+
variant,
|
|
101
|
+
size,
|
|
102
|
+
asChild = false,
|
|
103
|
+
alt,
|
|
104
|
+
isDisabled,
|
|
105
|
+
isLoading,
|
|
106
|
+
title,
|
|
107
|
+
tooltipPlacement = 'top',
|
|
108
|
+
onClick,
|
|
109
|
+
type,
|
|
110
|
+
...props
|
|
111
|
+
},
|
|
76
112
|
ref,
|
|
77
113
|
) => {
|
|
78
114
|
useDeprecationWarning(
|
|
79
115
|
'Button.alt',
|
|
80
116
|
alt !== undefined,
|
|
81
|
-
'use
|
|
82
|
-
'`alt`
|
|
117
|
+
'use `title` instead — it drives the same tooltip and the accessible name. ' +
|
|
118
|
+
'`alt` remains an alias for one release.',
|
|
83
119
|
);
|
|
84
120
|
|
|
85
121
|
const Comp = asChild ? Slot : 'button';
|
|
86
122
|
// Default type="button" only when rendering an actual <button>. With asChild,
|
|
87
123
|
// the rendered element may be an <a> or other tag where injecting `type` is wrong.
|
|
88
124
|
const resolvedType = asChild ? type : (type ?? 'button');
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
|
|
125
|
+
// `title` (or its deprecated alias `alt`) drives the VTooltip below. `title` also back-fills
|
|
126
|
+
// the accessible name, so an icon-only <Button title="Refresh"> is labelled without any
|
|
127
|
+
// extra props or a manual <VTooltip> wrap at the call site.
|
|
128
|
+
//
|
|
129
|
+
// That back-fill is skipped when the button already shows text: turning
|
|
130
|
+
// <Button title="Show only installed apps">Installed</Button> into aria-label="Show only
|
|
131
|
+
// installed apps" would replace the visible name with the tooltip, which breaks WCAG 2.5.3
|
|
132
|
+
// (Label in Name) and makes the control unreachable by the label users actually see.
|
|
133
|
+
//
|
|
134
|
+
// `alt` deliberately does NOT get that treatment: it has always overridden the name
|
|
135
|
+
// unconditionally, and callers rely on that. Preserving it keeps every existing call site
|
|
136
|
+
// announcing exactly what it announced before, and confines the new rule to `title`.
|
|
137
|
+
const tooltip = title ?? alt;
|
|
138
|
+
const ariaLabel = props['aria-label'] ?? alt ?? (hasVisibleText(props.children) ? undefined : title);
|
|
92
139
|
|
|
93
140
|
// asChild renders via Radix Slot, which requires exactly one React child.
|
|
94
141
|
// Skip the loader wrap in that case — Slot would reject the multi-child array.
|
|
@@ -116,9 +163,18 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
116
163
|
</Comp>
|
|
117
164
|
);
|
|
118
165
|
|
|
119
|
-
|
|
166
|
+
// Note: the native `title` attribute is deliberately NOT forwarded to the DOM — it would
|
|
167
|
+
// stack a second, delayed browser tooltip on top of the VTooltip. `aria-label` above is
|
|
168
|
+
// what exposes the text to screen readers and to getByRole('button', { name }).
|
|
169
|
+
if (tooltip) {
|
|
120
170
|
return (
|
|
121
|
-
<VTooltip
|
|
171
|
+
<VTooltip
|
|
172
|
+
description={tooltip}
|
|
173
|
+
asChild
|
|
174
|
+
className="cursor-pointer"
|
|
175
|
+
size="xs"
|
|
176
|
+
placement={tooltipPlacement}
|
|
177
|
+
>
|
|
122
178
|
{buttonElement}
|
|
123
179
|
</VTooltip>
|
|
124
180
|
);
|
|
@@ -190,7 +246,6 @@ const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
|
|
|
190
246
|
size={size || 'sm'}
|
|
191
247
|
onClick={handleCopy}
|
|
192
248
|
{...props}
|
|
193
|
-
aria-label={label}
|
|
194
249
|
title={label}
|
|
195
250
|
>
|
|
196
251
|
{isCopied ? <Check className="text-success" /> : <CopyIcon className="size-4" />}
|
|
@@ -88,7 +88,7 @@ export function Modal({
|
|
|
88
88
|
<DialogClose onClick={() => handleOpenChange(false)} asChild autoFocus={false}>
|
|
89
89
|
<Button
|
|
90
90
|
variant="outline"
|
|
91
|
-
|
|
91
|
+
title="Close"
|
|
92
92
|
className="data-[state=open]:bg-accent opacity-70 hover:opacity-100 rounded-sm focus:outline-none focus:ring-2 focus:ring-ring ring-offset-background focus:ring-offset-2 data-[state=open]:text-muted-foreground transition-opacity disabled:pointer-events-none"
|
|
93
93
|
>
|
|
94
94
|
<X className="size-4" />
|
|
@@ -108,7 +108,6 @@ export function AgentChatPlaybackControls({
|
|
|
108
108
|
type="button"
|
|
109
109
|
variant="ghost"
|
|
110
110
|
size="icon"
|
|
111
|
-
aria-label={t('agent.rewind.jumpToStart')}
|
|
112
111
|
title={t('agent.rewind.jumpToStart')}
|
|
113
112
|
disabled={!canJumpToStart}
|
|
114
113
|
onClick={jumpToStart}
|
|
@@ -120,7 +119,6 @@ export function AgentChatPlaybackControls({
|
|
|
120
119
|
type="button"
|
|
121
120
|
variant="ghost"
|
|
122
121
|
size="icon"
|
|
123
|
-
aria-label={t('agent.rewind.previousMessage')}
|
|
124
122
|
title={t('agent.rewind.previousMessage')}
|
|
125
123
|
disabled={!canStepPrevious}
|
|
126
124
|
onClick={setPreviousMessage}
|
|
@@ -165,7 +163,6 @@ export function AgentChatPlaybackControls({
|
|
|
165
163
|
type="button"
|
|
166
164
|
variant="ghost"
|
|
167
165
|
size="icon"
|
|
168
|
-
aria-label={t('agent.rewind.nextMessage')}
|
|
169
166
|
title={t('agent.rewind.nextMessage')}
|
|
170
167
|
disabled={!canStepNext}
|
|
171
168
|
onClick={setNextMessage}
|
|
@@ -177,7 +174,6 @@ export function AgentChatPlaybackControls({
|
|
|
177
174
|
type="button"
|
|
178
175
|
variant="ghost"
|
|
179
176
|
size="icon"
|
|
180
|
-
aria-label={t('agent.rewind.jumpToLatest')}
|
|
181
177
|
title={t('agent.rewind.jumpToLatest')}
|
|
182
178
|
disabled={!canJumpToLatest}
|
|
183
179
|
onClick={jumpToLatest}
|
|
@@ -189,7 +185,6 @@ export function AgentChatPlaybackControls({
|
|
|
189
185
|
type="button"
|
|
190
186
|
variant={isLive ? 'secondary' : 'ghost'}
|
|
191
187
|
size="icon"
|
|
192
|
-
aria-label={t('agent.rewind.jumpToLive')}
|
|
193
188
|
title={t('agent.rewind.jumpToLive')}
|
|
194
189
|
disabled={isLive}
|
|
195
190
|
onClick={() => onChangeCursor('live')}
|
|
@@ -110,6 +110,37 @@ describe('AgentRequestInputOverlay', () => {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
+
it('sends a tool approval option with structured metadata', () => {
|
|
114
|
+
const onSendMessage = vi.fn();
|
|
115
|
+
|
|
116
|
+
renderWithProviders(
|
|
117
|
+
<AgentRequestInputOverlay message={createToolApprovalRequestMessage()} onSendMessage={onSendMessage} />,
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
fireEvent.click(screen.getByRole('button', { name: 'Allow this action for this run' }));
|
|
121
|
+
|
|
122
|
+
expect(onSendMessage).toHaveBeenCalledTimes(1);
|
|
123
|
+
expect(onSendMessage).toHaveBeenCalledWith('allow_for_run', {
|
|
124
|
+
tool_approval_response: {
|
|
125
|
+
decision: 'allow_for_run',
|
|
126
|
+
approval_key: 'write_artifact:name:quotes.md',
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('sends a bare option id for prompts that are not tool approvals', () => {
|
|
132
|
+
const onSendMessage = vi.fn();
|
|
133
|
+
const message = createToolApprovalRequestMessage();
|
|
134
|
+
delete (message.details as Record<string, unknown>).tool_approval;
|
|
135
|
+
|
|
136
|
+
renderWithProviders(<AgentRequestInputOverlay message={message} onSendMessage={onSendMessage} />);
|
|
137
|
+
|
|
138
|
+
fireEvent.click(screen.getByRole('button', { name: 'Allow once' }));
|
|
139
|
+
|
|
140
|
+
expect(onSendMessage).toHaveBeenCalledTimes(1);
|
|
141
|
+
expect(onSendMessage).toHaveBeenCalledWith('allow_once');
|
|
142
|
+
});
|
|
143
|
+
|
|
113
144
|
it('renders legacy field-prefixed tool approval prompts with a friendly target', () => {
|
|
114
145
|
const message = createToolApprovalRequestMessage();
|
|
115
146
|
message.message = 'Approve Write Artifact: name quotes.md?';
|
|
@@ -5,7 +5,11 @@ import { useUserSession } from '@vertesia/ui/session';
|
|
|
5
5
|
import { XIcon } from 'lucide-react';
|
|
6
6
|
import { RemoteMcpConnectionButton } from '../../oauth/RemoteMcpConnectionButton.js';
|
|
7
7
|
import { AskUserWidget } from './AskUserWidget';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
getRequestInputDisplayText,
|
|
10
|
+
getToolApprovalResponseMetadata,
|
|
11
|
+
type RequestInputMessageWithUx,
|
|
12
|
+
} from './ModernAgentOutput/requestInputMessages';
|
|
9
13
|
|
|
10
14
|
export interface AgentRequestInputOverlayProps {
|
|
11
15
|
message?: RequestInputMessageWithUx;
|
|
@@ -118,7 +122,7 @@ export function AgentRequestInputOverlay({
|
|
|
118
122
|
allowFreeResponse={options.length === 0 || !!freeResponse}
|
|
119
123
|
placeholder={freeResponse?.placeholder}
|
|
120
124
|
submitLabel={freeResponse?.submit_label}
|
|
121
|
-
onSelect={send}
|
|
125
|
+
onSelect={(optionId) => send(optionId, getToolApprovalResponseMetadata(message, optionId))}
|
|
122
126
|
onMultiSelect={(optionIds) => send(optionIds.join(', '))}
|
|
123
127
|
onSubmit={(value) => send(value, freeResponse?.metadata)}
|
|
124
128
|
hideBorder
|
|
@@ -14,12 +14,14 @@ import {
|
|
|
14
14
|
RefreshCwIcon,
|
|
15
15
|
} from 'lucide-react';
|
|
16
16
|
import React, { useCallback, useId, useMemo, useState } from 'react';
|
|
17
|
-
import {
|
|
18
|
-
type UniversalDocumentSource,
|
|
19
|
-
UniversalDocumentViewer,
|
|
20
|
-
} from '../../document-viewer/UniversalDocumentViewer.js';
|
|
17
|
+
import type { UniversalDocumentSource } from '../../document-viewer/UniversalDocumentViewer.js';
|
|
21
18
|
import { type ArtifactTreeNode, useArtifacts } from './hooks/useArtifacts.js';
|
|
22
19
|
|
|
20
|
+
const UniversalDocumentViewer = React.lazy(async () => {
|
|
21
|
+
const module = await import('../../document-viewer/UniversalDocumentViewer.js');
|
|
22
|
+
return { default: module.UniversalDocumentViewer };
|
|
23
|
+
});
|
|
24
|
+
|
|
23
25
|
// ---------------------------------------------------------------------------
|
|
24
26
|
// Tree node component
|
|
25
27
|
// ---------------------------------------------------------------------------
|
|
@@ -419,11 +421,19 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
419
421
|
>
|
|
420
422
|
<ModalTitle show={false}>{previewSource.fileName}</ModalTitle>
|
|
421
423
|
<ModalBody className="h-full max-h-none p-0">
|
|
422
|
-
<
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
<React.Suspense
|
|
425
|
+
fallback={
|
|
426
|
+
<Center className="h-full">
|
|
427
|
+
<Loader2Icon className="size-6 animate-spin text-muted" />
|
|
428
|
+
</Center>
|
|
429
|
+
}
|
|
430
|
+
>
|
|
431
|
+
<UniversalDocumentViewer
|
|
432
|
+
source={previewSource}
|
|
433
|
+
className="h-full"
|
|
434
|
+
onDownload={() => previewPath && void handleDownload(previewPath)}
|
|
435
|
+
/>
|
|
436
|
+
</React.Suspense>
|
|
427
437
|
</ModalBody>
|
|
428
438
|
</Modal>
|
|
429
439
|
)}
|
|
@@ -64,7 +64,6 @@ export function ImageLightboxProvider({ children }: ImageLightboxProviderProps)
|
|
|
64
64
|
className="absolute top-2 end-2 text-white bg-black/50 rounded-full p-2 hover:bg-black/70 transition-colors"
|
|
65
65
|
onClick={closeImage}
|
|
66
66
|
title={t('agent.close')}
|
|
67
|
-
aria-label={t('agent.close')}
|
|
68
67
|
>
|
|
69
68
|
<X className="size-6" />
|
|
70
69
|
</Button>
|
|
@@ -1400,6 +1400,54 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
1400
1400
|
);
|
|
1401
1401
|
});
|
|
1402
1402
|
|
|
1403
|
+
it('passes approval option metadata through the request overlay signal', async () => {
|
|
1404
|
+
mockStreamState({
|
|
1405
|
+
messages: [
|
|
1406
|
+
{
|
|
1407
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'Approve Write Artifact: quotes.md?'),
|
|
1408
|
+
details: {
|
|
1409
|
+
tool_approval: {
|
|
1410
|
+
tool_name: 'write_artifact',
|
|
1411
|
+
approval_key: 'write_artifact:name:quotes.md',
|
|
1412
|
+
},
|
|
1413
|
+
ux: {
|
|
1414
|
+
options: [
|
|
1415
|
+
{ id: 'allow_once', label: 'Allow once' },
|
|
1416
|
+
{ id: 'allow_for_run', label: 'Allow this action for this run' },
|
|
1417
|
+
{ id: 'deny', label: 'Deny' },
|
|
1418
|
+
],
|
|
1419
|
+
},
|
|
1420
|
+
},
|
|
1421
|
+
},
|
|
1422
|
+
],
|
|
1423
|
+
isCompleted: false,
|
|
1424
|
+
agentRunStatus: 'RUNNING',
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1427
|
+
renderConversation();
|
|
1428
|
+
|
|
1429
|
+
fireEvent.click(screen.getByRole('button', { name: 'Allow this action for this run' }));
|
|
1430
|
+
|
|
1431
|
+
await waitFor(() => {
|
|
1432
|
+
expect(mocks.sendSignal).toHaveBeenCalledTimes(1);
|
|
1433
|
+
});
|
|
1434
|
+
expect(mocks.sendSignal).toHaveBeenCalledWith(
|
|
1435
|
+
'agent-run-1',
|
|
1436
|
+
'UserInput',
|
|
1437
|
+
expect.objectContaining({
|
|
1438
|
+
message: 'allow_for_run',
|
|
1439
|
+
metadata: expect.objectContaining({
|
|
1440
|
+
tool_approval_response: {
|
|
1441
|
+
decision: 'allow_for_run',
|
|
1442
|
+
approval_key: 'write_artifact:name:quotes.md',
|
|
1443
|
+
},
|
|
1444
|
+
id: expect.any(String),
|
|
1445
|
+
_messageId: expect.any(String),
|
|
1446
|
+
}),
|
|
1447
|
+
}),
|
|
1448
|
+
);
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1403
1451
|
it('sends directly without restart while the run is active', async () => {
|
|
1404
1452
|
mockStreamState({
|
|
1405
1453
|
messages: [createMessage(AgentMessageType.ANSWER, 'still running')],
|
|
@@ -1110,7 +1110,6 @@ function StartWorkflowView({
|
|
|
1110
1110
|
size="xs"
|
|
1111
1111
|
variant="ghost"
|
|
1112
1112
|
onClick={onClose}
|
|
1113
|
-
aria-label={t('agent.close')}
|
|
1114
1113
|
title={t('agent.close')}
|
|
1115
1114
|
className="text-muted hover:text-foreground"
|
|
1116
1115
|
>
|
|
@@ -1216,7 +1215,6 @@ function StartWorkflowView({
|
|
|
1216
1215
|
'disabled:bg-mixer-muted/25 disabled:text-muted disabled:opacity-100',
|
|
1217
1216
|
)}
|
|
1218
1217
|
title={resolvedStartButtonText}
|
|
1219
|
-
aria-label={resolvedStartButtonText}
|
|
1220
1218
|
>
|
|
1221
1219
|
{isSending ? <Spinner size="sm" /> : <ArrowUpIcon className="size-4" />}
|
|
1222
1220
|
</Button>
|
|
@@ -399,7 +399,12 @@ describe('AllMessagesMixed summary view', () => {
|
|
|
399
399
|
|
|
400
400
|
fireEvent.click(screen.getByRole('button', { name: /Allow once/ }));
|
|
401
401
|
|
|
402
|
-
expect(onSendMessage).toHaveBeenCalledWith('allow_once'
|
|
402
|
+
expect(onSendMessage).toHaveBeenCalledWith('allow_once', {
|
|
403
|
+
tool_approval_response: {
|
|
404
|
+
decision: 'allow_once',
|
|
405
|
+
approval_key: 'create_document:name:News Headlines Today',
|
|
406
|
+
},
|
|
407
|
+
});
|
|
403
408
|
});
|
|
404
409
|
|
|
405
410
|
it('keeps an approved tool approval continuation in the same active work row', () => {
|