@vertesia/ui 1.5.0-dev.20260717.131047Z → 1.5.0-dev.20260725.083715Z
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/filters/filterBar.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +3 -1
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/tabs.d.ts +12 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +12 -4
- package/lib/core/components/shadcn/tabs.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/AgentRightPanel.d.ts +5 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +2 -2
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts +5 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +53 -13
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/DocumentEditingActionCard.d.ts +6 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.d.ts.map +1 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.js +129 -0
- package/lib/features/agent/chat/DocumentEditingActionCard.js.map +1 -0
- 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.d.ts +19 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +125 -27
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts +45 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js +40 -0
- package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +96 -51
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +9 -5
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts +25 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js +33 -0
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js.map +1 -0
- 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 +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +23 -24
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts +14 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js +21 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts +30 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js +53 -0
- package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +21 -2
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.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/agent/chat/ModernAgentOutput/resourceLinks.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js +29 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts +33 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js +129 -0
- package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +7 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js +11 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +24 -9
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +2 -1
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js +3 -0
- package/lib/features/agent/chat/index.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 +4 -4
- 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 +2 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +159 -31
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts +16 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js +116 -0
- package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts +7 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.js +13 -0
- package/lib/features/store/objects/components/DocumentEditingLockStatus.js.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.d.ts +48 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.d.ts.map +1 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.js +720 -0
- package/lib/features/store/objects/components/DocumentEditingPanel.js.map +1 -0
- package/lib/features/store/objects/components/DocumentIcon.js +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.js +22 -9
- package/lib/features/store/objects/components/TextEditorPanel.js.map +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/documentArtifactRefs.d.ts +26 -0
- package/lib/features/store/objects/components/documentArtifactRefs.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentArtifactRefs.js +52 -0
- package/lib/features/store/objects/components/documentArtifactRefs.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts +4 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.js +40 -0
- package/lib/features/store/objects/components/documentEditingAgentConfig.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingPrompts.d.ts +3 -0
- package/lib/features/store/objects/components/documentEditingPrompts.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingPrompts.js +13 -0
- package/lib/features/store/objects/components/documentEditingPrompts.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingRun.d.ts +27 -0
- package/lib/features/store/objects/components/documentEditingRun.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingRun.js +126 -0
- package/lib/features/store/objects/components/documentEditingRun.js.map +1 -0
- package/lib/features/store/objects/components/documentEditingTarget.d.ts +20 -0
- package/lib/features/store/objects/components/documentEditingTarget.d.ts.map +1 -0
- package/lib/features/store/objects/components/documentEditingTarget.js +40 -0
- package/lib/features/store/objects/components/documentEditingTarget.js.map +1 -0
- package/lib/features/store/objects/components/index.d.ts +1 -0
- package/lib/features/store/objects/components/index.d.ts.map +1 -1
- package/lib/features/store/objects/components/index.js +1 -0
- package/lib/features/store/objects/components/index.js.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts +6 -3
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +57 -37
- package/lib/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/features/store/objects/components/useDownloadFile.d.ts +2 -1
- package/lib/features/store/objects/components/useDownloadFile.d.ts.map +1 -1
- package/lib/features/store/objects/components/useDownloadFile.js +3 -0
- package/lib/features/store/objects/components/useDownloadFile.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/objects/selection/actions/StartWorkflowButton.js +1 -1
- package/lib/features/store/objects/selection/actions/StartWorkflowButton.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 +134 -1
- package/lib/i18n/locales/de.json +130 -1
- package/lib/i18n/locales/en.json +363 -33
- package/lib/i18n/locales/es.json +131 -1
- package/lib/i18n/locales/fr.json +131 -1
- package/lib/i18n/locales/it.json +131 -1
- package/lib/i18n/locales/ja.json +129 -1
- package/lib/i18n/locales/ko.json +129 -1
- package/lib/i18n/locales/pt.json +131 -1
- package/lib/i18n/locales/ru.json +132 -1
- package/lib/i18n/locales/tr.json +130 -1
- package/lib/i18n/locales/zh-TW.json +129 -1
- package/lib/i18n/locales/zh.json +129 -1
- package/lib/rich-text/EditorToolbar.d.ts +37 -0
- package/lib/rich-text/EditorToolbar.d.ts.map +1 -0
- package/lib/rich-text/EditorToolbar.js +215 -0
- package/lib/rich-text/EditorToolbar.js.map +1 -0
- package/lib/rich-text/VertesiaRichTextEditor.d.ts +26 -0
- package/lib/rich-text/VertesiaRichTextEditor.d.ts.map +1 -0
- package/lib/rich-text/VertesiaRichTextEditor.js +67 -0
- package/lib/rich-text/VertesiaRichTextEditor.js.map +1 -0
- package/lib/rich-text/index.d.ts +2 -0
- package/lib/rich-text/index.d.ts.map +1 -0
- package/lib/rich-text/index.js +2 -0
- package/lib/rich-text/index.js.map +1 -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 +40 -28
- 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-rich-text.js +5 -0
- package/lib/vertesia-ui-rich-text.js.map +1 -0
- 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 +25 -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/markdown/AgentResourceResolver.d.ts +31 -0
- package/lib/widgets/markdown/AgentResourceResolver.d.ts.map +1 -0
- package/lib/widgets/markdown/AgentResourceResolver.js +39 -0
- package/lib/widgets/markdown/AgentResourceResolver.js.map +1 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.d.ts +63 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.d.ts.map +1 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.js +582 -0
- package/lib/widgets/markdown/ArtifactEditingSurface.js.map +1 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts +69 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts.map +1 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js +374 -0
- package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js.map +1 -0
- package/lib/widgets/markdown/MarkdownLink.d.ts +3 -1
- package/lib/widgets/markdown/MarkdownLink.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownLink.js +41 -14
- package/lib/widgets/markdown/MarkdownLink.js.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts +8 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.js +20 -4
- package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/widgets/markdown/index.d.ts +5 -1
- package/lib/widgets/markdown/index.d.ts.map +1 -1
- package/lib/widgets/markdown/index.js +5 -1
- package/lib/widgets/markdown/index.js.map +1 -1
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -1
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.js +14 -2
- package/lib/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -1
- package/lib/widgets/markdown/textDiff.d.ts +52 -0
- package/lib/widgets/markdown/textDiff.d.ts.map +1 -0
- package/lib/widgets/markdown/textDiff.js +362 -0
- package/lib/widgets/markdown/textDiff.js.map +1 -0
- package/lib/widgets/markdown/useArtifactContent.d.ts +5 -3
- package/lib/widgets/markdown/useArtifactContent.d.ts.map +1 -1
- package/lib/widgets/markdown/useArtifactContent.js +6 -3
- package/lib/widgets/markdown/useArtifactContent.js.map +1 -1
- package/lib/widgets/markdown/useResolvedUrl.d.ts +1 -5
- package/lib/widgets/markdown/useResolvedUrl.d.ts.map +1 -1
- package/lib/widgets/markdown/useResolvedUrl.js +19 -31
- package/lib/widgets/markdown/useResolvedUrl.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/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts +9 -0
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js +20 -17
- package/lib/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -1
- package/package.json +37 -33
- package/src/__tests__/a11y.test.tsx +77 -1
- package/src/__tests__/axe-helper.ts +17 -7
- package/src/__tests__/setup.ts +25 -0
- package/src/core/components/SidePanel.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +67 -12
- package/src/core/components/shadcn/filters/filterBar.tsx +1 -0
- package/src/core/components/shadcn/modal/dialog.tsx +4 -2
- package/src/core/components/shadcn/tabs.test.tsx +65 -0
- package/src/core/components/shadcn/tabs.tsx +25 -3
- 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/AgentRightPanel.tsx +16 -1
- package/src/features/agent/chat/ArtifactsTab.test.tsx +55 -0
- package/src/features/agent/chat/ArtifactsTab.tsx +222 -61
- package/src/features/agent/chat/DocumentEditingActionCard.test.tsx +105 -0
- package/src/features/agent/chat/DocumentEditingActionCard.tsx +210 -0
- package/src/features/agent/chat/ImageLightbox.tsx +0 -1
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +285 -40
- package/src/features/agent/chat/ModernAgentConversation.tsx +247 -77
- package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.test.tsx +79 -0
- package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.tsx +94 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +263 -35
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +236 -118
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +17 -0
- package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.test.tsx +44 -0
- package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.tsx +88 -0
- 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 +34 -47
- package/src/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.tsx +40 -0
- package/src/features/agent/chat/ModernAgentOutput/ResourceChip.test.tsx +148 -0
- package/src/features/agent/chat/ModernAgentOutput/ResourceChip.tsx +141 -0
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +33 -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/agent/chat/ModernAgentOutput/resourceLinks.tsx +43 -0
- package/src/features/agent/chat/ModernAgentOutput/resourceSummary.test.ts +229 -0
- package/src/features/agent/chat/ModernAgentOutput/resourceSummary.ts +152 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +17 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +14 -1
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +188 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +28 -8
- package/src/features/agent/chat/index.ts +11 -0
- 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 +5 -8
- package/src/features/store/objects/components/ContentDispositionButton.tsx +5 -1
- package/src/features/store/objects/components/ContentOverview.tsx +356 -105
- package/src/features/store/objects/components/DocumentEditingConfigurationSelector.test.ts +34 -0
- package/src/features/store/objects/components/DocumentEditingConfigurationSelector.tsx +211 -0
- package/src/features/store/objects/components/DocumentEditingLockStatus.test.tsx +32 -0
- package/src/features/store/objects/components/DocumentEditingLockStatus.tsx +45 -0
- package/src/features/store/objects/components/DocumentEditingPanel.test.tsx +336 -0
- package/src/features/store/objects/components/DocumentEditingPanel.tsx +1236 -0
- package/src/features/store/objects/components/DocumentIcon.tsx +1 -1
- package/src/features/store/objects/components/TextEditorPanel.test.tsx +48 -0
- package/src/features/store/objects/components/TextEditorPanel.tsx +41 -20
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/documentArtifactRefs.test.ts +65 -0
- package/src/features/store/objects/components/documentArtifactRefs.ts +72 -0
- package/src/features/store/objects/components/documentEditingAgentConfig.test.ts +28 -0
- package/src/features/store/objects/components/documentEditingAgentConfig.ts +41 -0
- package/src/features/store/objects/components/documentEditingPrompts.test.ts +26 -0
- package/src/features/store/objects/components/documentEditingPrompts.ts +12 -0
- package/src/features/store/objects/components/documentEditingRun.test.ts +176 -0
- package/src/features/store/objects/components/documentEditingRun.ts +184 -0
- package/src/features/store/objects/components/documentEditingTarget.test.ts +96 -0
- package/src/features/store/objects/components/documentEditingTarget.ts +63 -0
- package/src/features/store/objects/components/index.ts +1 -0
- package/src/features/store/objects/components/useContentPanelHooks.ts +55 -42
- package/src/features/store/objects/components/useDownloadFile.test.ts +20 -0
- package/src/features/store/objects/components/useDownloadFile.ts +5 -1
- package/src/features/store/objects/layout/renderers.tsx +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
- package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +2 -2
- 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 +134 -1
- package/src/i18n/locales/de.json +130 -1
- package/src/i18n/locales/en.json +1083 -753
- package/src/i18n/locales/es.json +131 -1
- package/src/i18n/locales/fr.json +131 -1
- package/src/i18n/locales/it.json +131 -1
- package/src/i18n/locales/ja.json +129 -1
- package/src/i18n/locales/ko.json +129 -1
- package/src/i18n/locales/pt.json +131 -1
- package/src/i18n/locales/ru.json +132 -1
- package/src/i18n/locales/tr.json +130 -1
- package/src/i18n/locales/zh-TW.json +129 -1
- package/src/i18n/locales/zh.json +129 -1
- package/src/rich-text/EditorToolbar.tsx +708 -0
- package/src/rich-text/VertesiaRichTextEditor.test.tsx +211 -0
- package/src/rich-text/VertesiaRichTextEditor.tsx +241 -0
- package/src/rich-text/index.ts +9 -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/markdown/AgentResourceResolver.test.ts +24 -0
- package/src/widgets/markdown/AgentResourceResolver.tsx +70 -0
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +537 -0
- package/src/widgets/markdown/ArtifactEditingSurface.tsx +878 -0
- package/src/widgets/markdown/CollaborativeMarkdownRenderer.test.tsx +484 -0
- package/src/widgets/markdown/CollaborativeMarkdownRenderer.tsx +825 -0
- package/src/widgets/markdown/MarkdownLink.test.tsx +122 -0
- package/src/widgets/markdown/MarkdownLink.tsx +102 -17
- package/src/widgets/markdown/MarkdownRenderer.tsx +30 -3
- package/src/widgets/markdown/index.ts +39 -1
- package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +15 -2
- package/src/widgets/markdown/textDiff.test.ts +156 -0
- package/src/widgets/markdown/textDiff.ts +399 -0
- package/src/widgets/markdown/useArtifactContent.ts +9 -3
- package/src/widgets/markdown/useResolvedUrl.test.ts +29 -40
- package/src/widgets/markdown/useResolvedUrl.ts +33 -35
- 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/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +26 -0
- package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +23 -18
|
@@ -16,7 +16,7 @@ interface ModalProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
allowOverflow?: boolean;
|
|
18
18
|
disableCloseOnClickOutside?: boolean;
|
|
19
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
19
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
20
20
|
action?: React.ReactNode;
|
|
21
21
|
}
|
|
22
22
|
const ModalContext = createContext<boolean>(false);
|
|
@@ -54,6 +54,8 @@ export function Modal({
|
|
|
54
54
|
return 'max-w-[80vw] md:max-w-[60vw]';
|
|
55
55
|
case 'xl':
|
|
56
56
|
return 'max-w-[95vw] lg:max-w-[80vw]';
|
|
57
|
+
case 'full':
|
|
58
|
+
return 'h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)]';
|
|
57
59
|
default:
|
|
58
60
|
return 'max-w-[60vw] lg:max-w-[40vw]';
|
|
59
61
|
}
|
|
@@ -88,7 +90,7 @@ export function Modal({
|
|
|
88
90
|
<DialogClose onClick={() => handleOpenChange(false)} asChild autoFocus={false}>
|
|
89
91
|
<Button
|
|
90
92
|
variant="outline"
|
|
91
|
-
|
|
93
|
+
title="Close"
|
|
92
94
|
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
95
|
>
|
|
94
96
|
<X className="size-4" />
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import { Tabs, TabsBar, TabsPanel } from './tabs';
|
|
4
|
+
|
|
5
|
+
const TABS = [
|
|
6
|
+
{ name: 'first', label: 'First', href: '#first', content: <div>First panel</div> },
|
|
7
|
+
{ name: 'second', label: 'Second', href: '#second', content: <div>Second panel</div> },
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
function renderTabs(canChangeTab?: (nextTab: string, currentTab?: string) => boolean) {
|
|
11
|
+
return render(
|
|
12
|
+
<Tabs tabs={TABS} defaultValue="first" canChangeTab={canChangeTab}>
|
|
13
|
+
<TabsBar />
|
|
14
|
+
<TabsPanel />
|
|
15
|
+
</Tabs>,
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
describe('Tabs canChangeTab', () => {
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
window.history.replaceState(null, '', '/');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('cancels the switch and leaves the hash alone when the guard returns false', () => {
|
|
25
|
+
const canChangeTab = vi.fn().mockReturnValue(false);
|
|
26
|
+
renderTabs(canChangeTab);
|
|
27
|
+
|
|
28
|
+
fireEvent.click(screen.getByRole('tab', { name: 'Second' }));
|
|
29
|
+
|
|
30
|
+
expect(canChangeTab).toHaveBeenCalledWith('second', 'first');
|
|
31
|
+
expect(screen.getByText('First panel')).toBeDefined();
|
|
32
|
+
expect(screen.queryByText('Second panel')).toBeNull();
|
|
33
|
+
expect(window.location.hash).toBe('');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('allows the switch when the guard returns true', () => {
|
|
37
|
+
const canChangeTab = vi.fn().mockReturnValue(true);
|
|
38
|
+
renderTabs(canChangeTab);
|
|
39
|
+
|
|
40
|
+
fireEvent.click(screen.getByRole('tab', { name: 'Second' }));
|
|
41
|
+
|
|
42
|
+
expect(screen.getByText('Second panel')).toBeDefined();
|
|
43
|
+
expect(window.location.hash).toBe('#second');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('does not consult the guard when the active tab is clicked again', () => {
|
|
47
|
+
const canChangeTab = vi.fn().mockReturnValue(false);
|
|
48
|
+
renderTabs(canChangeTab);
|
|
49
|
+
|
|
50
|
+
fireEvent.click(screen.getByRole('tab', { name: 'First' }));
|
|
51
|
+
|
|
52
|
+
expect(canChangeTab).not.toHaveBeenCalled();
|
|
53
|
+
expect(screen.getByText('First panel')).toBeDefined();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('still switches from a hash change so a cancelled switch can be resumed', () => {
|
|
57
|
+
const canChangeTab = vi.fn().mockReturnValue(false);
|
|
58
|
+
renderTabs(canChangeTab);
|
|
59
|
+
|
|
60
|
+
window.location.hash = 'second';
|
|
61
|
+
fireEvent(window, new HashChangeEvent('hashchange'));
|
|
62
|
+
|
|
63
|
+
expect(screen.getByText('Second panel')).toBeDefined();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -15,6 +15,17 @@ export interface Tab {
|
|
|
15
15
|
is_allowed?: boolean;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Guard consulted before switching to another tab. Return `false` to cancel the switch — the active
|
|
20
|
+
* tab, the URL hash and the browser history are all left untouched, so the guard can hold the user
|
|
21
|
+
* on a tab that has unsaved changes while a confirmation is shown.
|
|
22
|
+
*
|
|
23
|
+
* It is only called when the target tab differs from the active one, but it may be called more than
|
|
24
|
+
* once for a single attempted switch (a click reaches both the trigger and the Radix root), so any
|
|
25
|
+
* side effect it performs must be idempotent.
|
|
26
|
+
*/
|
|
27
|
+
export type CanChangeTab = (nextTab: string, currentTab?: string) => boolean;
|
|
28
|
+
|
|
18
29
|
const TabsContext = React.createContext<{
|
|
19
30
|
size?: number;
|
|
20
31
|
tabs?: Tab[];
|
|
@@ -23,6 +34,7 @@ const TabsContext = React.createContext<{
|
|
|
23
34
|
responsive?: boolean;
|
|
24
35
|
variant?: 'tabs' | 'pills';
|
|
25
36
|
updateHash?: boolean;
|
|
37
|
+
canChangeTab?: CanChangeTab;
|
|
26
38
|
}>({
|
|
27
39
|
size: undefined,
|
|
28
40
|
tabs: undefined,
|
|
@@ -45,6 +57,7 @@ interface TabsProps {
|
|
|
45
57
|
responsive?: boolean;
|
|
46
58
|
variant?: 'tabs' | 'pills';
|
|
47
59
|
updateHash?: boolean;
|
|
60
|
+
canChangeTab?: CanChangeTab;
|
|
48
61
|
}
|
|
49
62
|
|
|
50
63
|
const Tabs = ({
|
|
@@ -59,6 +72,7 @@ const Tabs = ({
|
|
|
59
72
|
responsive = false,
|
|
60
73
|
variant = 'tabs',
|
|
61
74
|
updateHash = true,
|
|
75
|
+
canChangeTab,
|
|
62
76
|
}: TabsProps) => {
|
|
63
77
|
// Filter tabs based on is_allowed (undefined or true means visible)
|
|
64
78
|
const visibleTabs = React.useMemo(
|
|
@@ -121,6 +135,9 @@ const Tabs = ({
|
|
|
121
135
|
|
|
122
136
|
const handleValueChange = React.useCallback(
|
|
123
137
|
(newValue: string) => {
|
|
138
|
+
// Bail before touching the value or the history so a cancelled switch is a no-op.
|
|
139
|
+
if (newValue !== value && canChangeTab && !canChangeTab(newValue, value)) return;
|
|
140
|
+
|
|
124
141
|
setValue(newValue);
|
|
125
142
|
|
|
126
143
|
// Update the URL hash when tab changes (only if updateHash is true and not controlled by parent)
|
|
@@ -135,7 +152,7 @@ const Tabs = ({
|
|
|
135
152
|
onTabChange(newValue);
|
|
136
153
|
}
|
|
137
154
|
},
|
|
138
|
-
[current, onTabChange, updateHash],
|
|
155
|
+
[current, onTabChange, updateHash, canChangeTab, value],
|
|
139
156
|
);
|
|
140
157
|
|
|
141
158
|
const setTab = React.useCallback(
|
|
@@ -155,6 +172,7 @@ const Tabs = ({
|
|
|
155
172
|
responsive: responsive,
|
|
156
173
|
variant,
|
|
157
174
|
updateHash,
|
|
175
|
+
canChangeTab,
|
|
158
176
|
}}
|
|
159
177
|
>
|
|
160
178
|
<TabsPrimitive.Root
|
|
@@ -176,13 +194,17 @@ interface TabsBarProps {
|
|
|
176
194
|
}
|
|
177
195
|
|
|
178
196
|
const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
179
|
-
const { tabs, size, current, setTab, responsive, variant, updateHash } =
|
|
197
|
+
const { tabs, size, current, setTab, responsive, variant, updateHash, canChangeTab } =
|
|
198
|
+
React.useContext(TabsContext);
|
|
180
199
|
|
|
181
200
|
const fullWidth = size !== 0;
|
|
182
201
|
|
|
183
202
|
const handleTabChange = React.useCallback(
|
|
184
203
|
(tabName: string) => {
|
|
185
204
|
if (!tabs || !setTab) return;
|
|
205
|
+
// Consulted here too: this path pushes the tab href before `setTab` reaches the guard in
|
|
206
|
+
// `Tabs`, so a cancelled switch would otherwise leave the URL pointing at the other tab.
|
|
207
|
+
if (tabName !== current && canChangeTab && !canChangeTab(tabName, current)) return;
|
|
186
208
|
|
|
187
209
|
const tab = tabs.find((t) => t.name === tabName);
|
|
188
210
|
|
|
@@ -194,7 +216,7 @@ const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
|
194
216
|
|
|
195
217
|
setTab(tabName);
|
|
196
218
|
},
|
|
197
|
-
[tabs, setTab, updateHash],
|
|
219
|
+
[tabs, setTab, updateHash, canChangeTab, current],
|
|
198
220
|
);
|
|
199
221
|
|
|
200
222
|
if (!tabs || !setTab) {
|
|
@@ -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
|
|
@@ -633,6 +633,10 @@ export interface AgentRightPanelProps {
|
|
|
633
633
|
/** Show the Artifacts tab (opt-in, default false) */
|
|
634
634
|
showArtifacts?: boolean;
|
|
635
635
|
artifactRefreshKey?: number;
|
|
636
|
+
artifactRefreshDetails?: Record<string, unknown>;
|
|
637
|
+
selectedArtifactPath?: string | null;
|
|
638
|
+
onSelectedArtifactPathChange?: (path: string | null) => void;
|
|
639
|
+
onSendMessage?: (message: string, inputMetadata?: Record<string, unknown>) => void;
|
|
636
640
|
|
|
637
641
|
// Panel control
|
|
638
642
|
onClose: () => void;
|
|
@@ -672,6 +676,10 @@ function AgentRightPanelComponent({
|
|
|
672
676
|
// Artifacts
|
|
673
677
|
showArtifacts = false,
|
|
674
678
|
artifactRefreshKey = 0,
|
|
679
|
+
artifactRefreshDetails,
|
|
680
|
+
selectedArtifactPath,
|
|
681
|
+
onSelectedArtifactPathChange,
|
|
682
|
+
onSendMessage,
|
|
675
683
|
|
|
676
684
|
// Payload
|
|
677
685
|
payloadContent,
|
|
@@ -811,7 +819,14 @@ function AgentRightPanelComponent({
|
|
|
811
819
|
label: t('agent.artifacts'),
|
|
812
820
|
content: withTabBoundary(
|
|
813
821
|
t('agent.artifacts'),
|
|
814
|
-
<ArtifactsTab
|
|
822
|
+
<ArtifactsTab
|
|
823
|
+
runId={runId}
|
|
824
|
+
refreshKey={artifactRefreshKey}
|
|
825
|
+
refreshDetails={artifactRefreshDetails}
|
|
826
|
+
selectedPath={selectedArtifactPath}
|
|
827
|
+
onSelectedPathChange={onSelectedArtifactPathChange}
|
|
828
|
+
onSendMessage={onSendMessage}
|
|
829
|
+
/>,
|
|
815
830
|
),
|
|
816
831
|
is_allowed: showArtifacts,
|
|
817
832
|
},
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** @vitest-environment jsdom */
|
|
2
|
+
|
|
3
|
+
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
|
4
|
+
import type { ComponentProps } from 'react';
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
6
|
+
import { I18nProvider } from '../../../i18n/index.js';
|
|
7
|
+
import { ArtifactsTab } from './ArtifactsTab.js';
|
|
8
|
+
|
|
9
|
+
vi.mock('@vertesia/ui/session', () => ({
|
|
10
|
+
useUserSession: () => ({ client: {} }),
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
vi.mock('@vertesia/ui/widgets', () => ({
|
|
14
|
+
ArtifactEditingSurface: ({ viewMode }: { viewMode?: 'components' | 'document' }) => (
|
|
15
|
+
<div data-testid="artifact-editing-surface" data-view-mode={viewMode} />
|
|
16
|
+
),
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
vi.mock('./hooks/useArtifacts.js', () => ({
|
|
20
|
+
useArtifacts: () => ({
|
|
21
|
+
tree: [],
|
|
22
|
+
flatFiles: [{ path: 'drafts/brief.md' }],
|
|
23
|
+
isLoading: false,
|
|
24
|
+
error: undefined,
|
|
25
|
+
refresh: vi.fn(),
|
|
26
|
+
}),
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
afterEach(cleanup);
|
|
30
|
+
|
|
31
|
+
function renderArtifactEditor(props?: Partial<ComponentProps<typeof ArtifactsTab>>) {
|
|
32
|
+
return render(
|
|
33
|
+
<I18nProvider lng="en">
|
|
34
|
+
<ArtifactsTab runId="run-1" selectedPath="drafts/brief.md" onSendMessage={vi.fn()} {...props} />
|
|
35
|
+
</I18nProvider>,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
describe('ArtifactsTab', () => {
|
|
40
|
+
it('opens editable artifacts in block mode by default', () => {
|
|
41
|
+
renderArtifactEditor();
|
|
42
|
+
|
|
43
|
+
expect(screen.getByTestId('artifact-editing-surface').getAttribute('data-view-mode')).toBe('components');
|
|
44
|
+
expect(screen.getByRole('button', { name: 'Block mode' }).getAttribute('aria-pressed')).toBe('true');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('allows switching from block mode to the full editor', () => {
|
|
48
|
+
renderArtifactEditor();
|
|
49
|
+
|
|
50
|
+
fireEvent.click(screen.getByRole('button', { name: 'Edit mode' }));
|
|
51
|
+
|
|
52
|
+
expect(screen.getByTestId('artifact-editing-surface').getAttribute('data-view-mode')).toBe('document');
|
|
53
|
+
expect(screen.getByRole('button', { name: 'Edit mode' }).getAttribute('aria-pressed')).toBe('true');
|
|
54
|
+
});
|
|
55
|
+
});
|