@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
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { ExecutionEnvironmentRef } from '@vertesia/common';
|
|
2
|
+
import { SelectBox, useFetch, useFetchOnce } from '@vertesia/ui/core';
|
|
3
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
type EnvironmentModel = NonNullable<ExecutionEnvironmentRef['enabled_models']>[number];
|
|
8
|
+
|
|
9
|
+
function environmentLabel(option: ExecutionEnvironmentRef) {
|
|
10
|
+
return option.name;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface SelectEnvironmentProps {
|
|
14
|
+
onChange: (environment?: ExecutionEnvironmentRef) => void;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
ignoreVirtuals?: boolean;
|
|
17
|
+
selectedEnvId?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function SelectEnvironment({
|
|
22
|
+
isClearable = false,
|
|
23
|
+
onChange,
|
|
24
|
+
ignoreVirtuals = false,
|
|
25
|
+
selectedEnvId,
|
|
26
|
+
disabled = false,
|
|
27
|
+
}: SelectEnvironmentProps) {
|
|
28
|
+
const { t } = useUITranslation();
|
|
29
|
+
const { client } = useUserSession();
|
|
30
|
+
const [value, setValue] = useState<ExecutionEnvironmentRef | undefined>();
|
|
31
|
+
const { data: environments, isLoading } = useFetchOnce(() =>
|
|
32
|
+
client.environments.list().then((result) => {
|
|
33
|
+
const available = ignoreVirtuals
|
|
34
|
+
? result.filter((environment) => !environment.provider.startsWith('virtual_'))
|
|
35
|
+
: result;
|
|
36
|
+
return available.slice().sort((left, right) => left.name.localeCompare(right.name));
|
|
37
|
+
}),
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
setValue(environments?.find((environment) => environment.id === selectedEnvId));
|
|
42
|
+
}, [environments, selectedEnvId]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<SelectBox
|
|
46
|
+
isClearable={isClearable}
|
|
47
|
+
optionLabel={environmentLabel}
|
|
48
|
+
options={environments ?? []}
|
|
49
|
+
value={value}
|
|
50
|
+
onChange={(environment) => {
|
|
51
|
+
setValue(environment);
|
|
52
|
+
onChange(environment);
|
|
53
|
+
}}
|
|
54
|
+
placeholder={t('intakePolicy.placeholder.environment')}
|
|
55
|
+
filterBy="name"
|
|
56
|
+
disabled={disabled}
|
|
57
|
+
isLoading={isLoading}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function modelLabel(option: EnvironmentModel) {
|
|
63
|
+
return option.name;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function createModelLabel(greyedModels?: EnvironmentModel[]) {
|
|
67
|
+
if (!greyedModels?.length) {
|
|
68
|
+
return modelLabel;
|
|
69
|
+
}
|
|
70
|
+
return (option: EnvironmentModel) => {
|
|
71
|
+
const isGreyed = greyedModels.some((model) => model.id === option.id);
|
|
72
|
+
return <span className={isGreyed ? 'opacity-50' : ''}>{option.name}</span>;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface SelectModelProps {
|
|
77
|
+
envId: string | undefined;
|
|
78
|
+
onChange: (model?: EnvironmentModel) => void;
|
|
79
|
+
isClearable?: boolean;
|
|
80
|
+
selectedModelId?: string;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
greyedModels?: EnvironmentModel[];
|
|
83
|
+
onModelsLoaded?: (models: EnvironmentModel[]) => void;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function SelectModel({
|
|
87
|
+
envId,
|
|
88
|
+
isClearable,
|
|
89
|
+
onChange,
|
|
90
|
+
selectedModelId,
|
|
91
|
+
disabled = false,
|
|
92
|
+
greyedModels,
|
|
93
|
+
onModelsLoaded,
|
|
94
|
+
}: SelectModelProps) {
|
|
95
|
+
const { t } = useUITranslation();
|
|
96
|
+
const { client } = useUserSession();
|
|
97
|
+
const [value, setValue] = useState<EnvironmentModel | undefined>();
|
|
98
|
+
const { data: models, isLoading } = useFetch(async () => {
|
|
99
|
+
if (!envId) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const environment = await client.environments.retrieve(envId);
|
|
104
|
+
return [...(environment.enabled_models ?? [])].sort((left, right) => left.name.localeCompare(right.name));
|
|
105
|
+
} catch {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
}, [envId]);
|
|
109
|
+
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (!selectedModelId) {
|
|
112
|
+
setValue(undefined);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const selected = models?.find((model) => model.id === selectedModelId);
|
|
116
|
+
setValue(
|
|
117
|
+
selected ?? {
|
|
118
|
+
id: selectedModelId,
|
|
119
|
+
name: selectedModelId,
|
|
120
|
+
provider: 'unknown',
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
}, [models, selectedModelId]);
|
|
124
|
+
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (models) {
|
|
127
|
+
onModelsLoaded?.(models);
|
|
128
|
+
}
|
|
129
|
+
}, [models, onModelsLoaded]);
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<SelectBox
|
|
133
|
+
isClearable={isClearable}
|
|
134
|
+
by="id"
|
|
135
|
+
optionLabel={createModelLabel(greyedModels)}
|
|
136
|
+
options={models ?? []}
|
|
137
|
+
value={value}
|
|
138
|
+
onChange={(model) => {
|
|
139
|
+
setValue(model);
|
|
140
|
+
onChange(model);
|
|
141
|
+
}}
|
|
142
|
+
placeholder={t('intakePolicy.placeholder.model')}
|
|
143
|
+
disabled={disabled}
|
|
144
|
+
isLoading={isLoading}
|
|
145
|
+
/>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface SelectTrainingModelProps {
|
|
150
|
+
env: ExecutionEnvironmentRef | undefined;
|
|
151
|
+
onChange: (model?: EnvironmentModel) => void;
|
|
152
|
+
isClearable?: boolean;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function SelectTrainingModel({ env, isClearable, onChange }: SelectTrainingModelProps) {
|
|
156
|
+
const { t } = useUITranslation();
|
|
157
|
+
const { client } = useUserSession();
|
|
158
|
+
const [value, setValue] = useState<EnvironmentModel | undefined>();
|
|
159
|
+
const { data: models, isLoading } = useFetch(async () => {
|
|
160
|
+
if (!env) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
return client.environments.listTrainableModels(env.id);
|
|
165
|
+
} catch {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
}, [env?.id]);
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
<SelectBox
|
|
172
|
+
isClearable={isClearable}
|
|
173
|
+
by="id"
|
|
174
|
+
optionLabel={modelLabel}
|
|
175
|
+
options={models ?? []}
|
|
176
|
+
value={value}
|
|
177
|
+
onChange={(model) => {
|
|
178
|
+
setValue(model);
|
|
179
|
+
onChange(model);
|
|
180
|
+
}}
|
|
181
|
+
placeholder={t('intakePolicy.placeholder.model')}
|
|
182
|
+
disabled={!env}
|
|
183
|
+
isLoading={isLoading}
|
|
184
|
+
/>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SelectEnvironment.js';
|
package/src/features/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './activity-doc/index.js';
|
|
2
2
|
export * from './agent';
|
|
3
3
|
export * from './document-viewer/index.js';
|
|
4
|
+
export * from './environment/index.js';
|
|
4
5
|
export * from './errors/index.js';
|
|
5
6
|
export * from './facets/index.js';
|
|
6
7
|
export * from './layout/index.js';
|
|
@@ -12,3 +13,4 @@ export * from './permissions/index.js';
|
|
|
12
13
|
export * from './store/index.js';
|
|
13
14
|
export * from './user/index.js';
|
|
14
15
|
export * from './utils/index.js';
|
|
16
|
+
export * from './views/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Center
|
|
1
|
+
import { Button, Center } from '@vertesia/ui/core';
|
|
2
2
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { ChevronsDown, ChevronsUp, Image, Loader2, Maximize, Minus, Plus, ScanSearch } from 'lucide-react';
|
|
@@ -255,7 +255,7 @@ export function AnnotatedImageSlider({ className, currentPage, onChange }: Annot
|
|
|
255
255
|
return (
|
|
256
256
|
<div ref={ref} className={clsx('flex flex-col items-stretch gap-y-2', className)}>
|
|
257
257
|
<div className="relative flex items-center justify-center px-2 h-9">
|
|
258
|
-
<Button variant="ghost" size="xs" onClick={goPrev}
|
|
258
|
+
<Button variant="ghost" size="xs" onClick={goPrev} title={t('pdf.previousPage')}>
|
|
259
259
|
<ChevronsUp className="size-4" />
|
|
260
260
|
</Button>
|
|
261
261
|
<div className="absolute start-2 flex items-center gap-x-1">
|
|
@@ -301,7 +301,7 @@ export function AnnotatedImageSlider({ className, currentPage, onChange }: Annot
|
|
|
301
301
|
))}
|
|
302
302
|
</div>
|
|
303
303
|
<div className="flex items-center justify-center h-9">
|
|
304
|
-
<Button variant="ghost" size="xs" onClick={goNext}
|
|
304
|
+
<Button variant="ghost" size="xs" onClick={goNext} title={t('pdf.nextPage')}>
|
|
305
305
|
<ChevronsDown className="size-4" />
|
|
306
306
|
</Button>
|
|
307
307
|
</div>
|
|
@@ -319,22 +319,21 @@ interface ImageTypeButtonProps {
|
|
|
319
319
|
function ImageTypeButton({ type, currentType, onClick, icon, tooltip }: ImageTypeButtonProps) {
|
|
320
320
|
const isSelected = type === currentType;
|
|
321
321
|
return (
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
</VTooltip>
|
|
322
|
+
<Button
|
|
323
|
+
title={tooltip}
|
|
324
|
+
tooltipPlacement="bottom"
|
|
325
|
+
variant="unstyled"
|
|
326
|
+
aria-pressed={isSelected}
|
|
327
|
+
className={clsx(
|
|
328
|
+
'p-1 rounded cursor-pointer transition-colors',
|
|
329
|
+
isSelected
|
|
330
|
+
? 'text-primary bg-primary/10'
|
|
331
|
+
: 'text-muted-foreground hover:text-foreground hover:bg-muted',
|
|
332
|
+
)}
|
|
333
|
+
onClick={onClick}
|
|
334
|
+
>
|
|
335
|
+
{icon}
|
|
336
|
+
</Button>
|
|
338
337
|
);
|
|
339
338
|
}
|
|
340
339
|
|
|
@@ -350,54 +349,51 @@ function ZoomControls({ zoom, onZoomIn, onZoomOut, onFitToView, canZoomIn, canZo
|
|
|
350
349
|
const { t } = useUITranslation();
|
|
351
350
|
return (
|
|
352
351
|
<div className="flex items-center gap-x-0.5">
|
|
353
|
-
<
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
</VTooltip>
|
|
352
|
+
<Button
|
|
353
|
+
title={t('pdf.zoomOut')}
|
|
354
|
+
tooltipPlacement="bottom"
|
|
355
|
+
variant="unstyled"
|
|
356
|
+
className={clsx(
|
|
357
|
+
'p-1 rounded cursor-pointer transition-colors',
|
|
358
|
+
canZoomOut
|
|
359
|
+
? 'text-muted-foreground hover:text-foreground hover:bg-muted'
|
|
360
|
+
: 'text-muted-foreground/40 cursor-not-allowed',
|
|
361
|
+
)}
|
|
362
|
+
onClick={onZoomOut}
|
|
363
|
+
disabled={!canZoomOut}
|
|
364
|
+
>
|
|
365
|
+
<Minus className="size-4" />
|
|
366
|
+
</Button>
|
|
369
367
|
<span className="text-xs text-muted-foreground min-w-[32px] text-center">{zoom}%</span>
|
|
370
|
-
<
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
</Button>
|
|
400
|
-
</VTooltip>
|
|
368
|
+
<Button
|
|
369
|
+
title={t('pdf.zoomIn')}
|
|
370
|
+
tooltipPlacement="bottom"
|
|
371
|
+
variant="unstyled"
|
|
372
|
+
className={clsx(
|
|
373
|
+
'p-1 rounded cursor-pointer transition-colors',
|
|
374
|
+
canZoomIn
|
|
375
|
+
? 'text-muted-foreground hover:text-foreground hover:bg-muted'
|
|
376
|
+
: 'text-muted-foreground/40 cursor-not-allowed',
|
|
377
|
+
)}
|
|
378
|
+
onClick={onZoomIn}
|
|
379
|
+
disabled={!canZoomIn}
|
|
380
|
+
>
|
|
381
|
+
<Plus className="size-4" />
|
|
382
|
+
</Button>
|
|
383
|
+
<Button
|
|
384
|
+
title={t('pdf.fitToWidth')}
|
|
385
|
+
tooltipPlacement="bottom"
|
|
386
|
+
variant="unstyled"
|
|
387
|
+
className={clsx(
|
|
388
|
+
'p-1 rounded cursor-pointer transition-colors',
|
|
389
|
+
zoom !== DEFAULT_ZOOM
|
|
390
|
+
? 'text-muted-foreground hover:text-foreground hover:bg-muted'
|
|
391
|
+
: 'text-muted-foreground/40',
|
|
392
|
+
)}
|
|
393
|
+
onClick={onFitToView}
|
|
394
|
+
>
|
|
395
|
+
<Maximize className="size-4" />
|
|
396
|
+
</Button>
|
|
401
397
|
</div>
|
|
402
398
|
);
|
|
403
399
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContentObject
|
|
2
|
-
import { Button
|
|
1
|
+
import type { ContentObject } from '@vertesia/common';
|
|
2
|
+
import { Button } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
5
5
|
import { Download } from 'lucide-react';
|
|
@@ -15,52 +15,9 @@ export function DownloadPopover({ object }: DownloadPopoverProps) {
|
|
|
15
15
|
void getResourceUrl(client, object.id, name).then((url) => window.open(url, '_blank'));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const getProcessorType = (): string => {
|
|
19
|
-
if (object.metadata?.type === 'document') {
|
|
20
|
-
const docMetadata = object.metadata as DocumentMetadata;
|
|
21
|
-
return docMetadata.content_processor?.type || 'xml';
|
|
22
|
-
}
|
|
23
|
-
return 'xml'; // default
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const processorType = getProcessorType();
|
|
27
|
-
|
|
28
|
-
const buttonClass = 'p-2 cursor-pointer hover:bg-muted text-start text-sm';
|
|
29
|
-
|
|
30
|
-
// For markdown processor, only one download option - render simple button
|
|
31
|
-
if (processorType === 'markdown') {
|
|
32
|
-
return (
|
|
33
|
-
<Button variant="ghost" size="xs" onClick={() => onDownload('document.md')} alt={t('pdf.download')}>
|
|
34
|
-
<Download className="size-4" />
|
|
35
|
-
</Button>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Default XML processor - multiple options, use popover
|
|
40
18
|
return (
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
<Download className="size-4" />
|
|
45
|
-
</Button>
|
|
46
|
-
</PopoverTrigger>
|
|
47
|
-
<PopoverContent align="start" className="p-0 w-auto">
|
|
48
|
-
<div className="min-w-[200px] flex flex-col divide-y divide-border">
|
|
49
|
-
<Button variant="unstyled" className={buttonClass} onClick={() => onDownload('annotated.pdf')}>
|
|
50
|
-
annotated.pdf
|
|
51
|
-
</Button>
|
|
52
|
-
<Button variant="unstyled" className={buttonClass} onClick={() => onDownload('document.xml')}>
|
|
53
|
-
document.xml
|
|
54
|
-
</Button>
|
|
55
|
-
<Button
|
|
56
|
-
variant="unstyled"
|
|
57
|
-
className={buttonClass}
|
|
58
|
-
onClick={() => onDownload('analyzed-pages.json')}
|
|
59
|
-
>
|
|
60
|
-
analyzed-pages.json
|
|
61
|
-
</Button>
|
|
62
|
-
</div>
|
|
63
|
-
</PopoverContent>
|
|
64
|
-
</Popover>
|
|
19
|
+
<Button variant="ghost" size="xs" onClick={() => onDownload('document.md')} title={t('pdf.download')}>
|
|
20
|
+
<Download className="size-4" />
|
|
21
|
+
</Button>
|
|
65
22
|
);
|
|
66
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSONCode, MarkdownRenderer
|
|
1
|
+
import { JSONCode, MarkdownRenderer } from '@vertesia/ui/widgets';
|
|
2
2
|
import { Loader2 } from 'lucide-react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
import { useMagicPdfContext } from './MagicPdfProvider';
|
|
@@ -23,22 +23,10 @@ export function ExtractedContentView({ viewType, pageNumber }: ExtractedContentV
|
|
|
23
23
|
case 'markdown':
|
|
24
24
|
return <MarkdownPageView pageNumber={pageNumber} />;
|
|
25
25
|
default:
|
|
26
|
-
return <
|
|
26
|
+
return <MarkdownPageView pageNumber={pageNumber} />;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
interface XmlPageViewProps {
|
|
31
|
-
pageNumber: number;
|
|
32
|
-
}
|
|
33
|
-
function XmlPageView({ pageNumber }: XmlPageViewProps) {
|
|
34
|
-
const { xmlPages: pages } = useMagicPdfContext();
|
|
35
|
-
return (
|
|
36
|
-
<div className="px-4 py-2">
|
|
37
|
-
<XMLViewer xml={pages[pageNumber - 1]} collapsible />
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
30
|
interface JsonPageLayoutViewProps {
|
|
43
31
|
pageNumber: number;
|
|
44
32
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
2
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
3
|
+
import { useCallback, useRef, useState } from 'react';
|
|
4
|
+
import { ModernAgentConversation, type StartWorkflowFn } from '../agent/chat';
|
|
5
|
+
|
|
6
|
+
interface GroundedExtractionAssistantPanelProps {
|
|
7
|
+
objectId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Called after the assistant finishes a turn (which may have applied a grounded
|
|
10
|
+
* edit) so the grounded view can re-fetch and re-render the data + citation boxes.
|
|
11
|
+
*/
|
|
12
|
+
onExtractionChanged?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* The field path currently selected in the view. When set (before the
|
|
15
|
+
* conversation starts), it seeds the assistant: the first message is scoped to
|
|
16
|
+
* this field so "click a field, say what's wrong" reaches the model.
|
|
17
|
+
*/
|
|
18
|
+
selectedField?: string;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Interactive assistant embedded in the grounded-extraction view. Starts the
|
|
24
|
+
* server-side GroundedExtractionAssistant conversation (recordRun -> stage the
|
|
25
|
+
* document into the agent space -> launch interactive), then renders the live
|
|
26
|
+
* conversation. Each completed turn triggers `onExtractionChanged` so an operator's
|
|
27
|
+
* grounded edits appear in the data tree + citation overlay without a manual reload.
|
|
28
|
+
*/
|
|
29
|
+
export function GroundedExtractionAssistantPanel({
|
|
30
|
+
objectId,
|
|
31
|
+
onExtractionChanged,
|
|
32
|
+
selectedField,
|
|
33
|
+
onClose,
|
|
34
|
+
}: GroundedExtractionAssistantPanelProps) {
|
|
35
|
+
const { t } = useUITranslation();
|
|
36
|
+
const { client } = useUserSession();
|
|
37
|
+
const [agentRunId, setAgentRunId] = useState<string | undefined>(undefined);
|
|
38
|
+
// Keep the latest callback/selection without re-creating the handlers each render.
|
|
39
|
+
const changedRef = useRef(onExtractionChanged);
|
|
40
|
+
changedRef.current = onExtractionChanged;
|
|
41
|
+
const selectedRef = useRef(selectedField);
|
|
42
|
+
selectedRef.current = selectedField;
|
|
43
|
+
|
|
44
|
+
const startWorkflow: StartWorkflowFn = useCallback(
|
|
45
|
+
async (initialMessage) => {
|
|
46
|
+
const field = selectedRef.current;
|
|
47
|
+
// Scope the opening message to the field the operator had selected, so
|
|
48
|
+
// "click a field, say what's wrong" reaches the model with the target.
|
|
49
|
+
const prompt =
|
|
50
|
+
field && initialMessage ? `Regarding the field "${field}": ${initialMessage}` : initialMessage;
|
|
51
|
+
const res = await client.store.objects
|
|
52
|
+
.analyze(objectId)
|
|
53
|
+
.startGroundedAssistant(prompt ? { user_prompt: prompt } : {});
|
|
54
|
+
setAgentRunId(res.agent_run_id);
|
|
55
|
+
return { agent_run_id: res.agent_run_id };
|
|
56
|
+
},
|
|
57
|
+
[client, objectId],
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// The agent re-enables the follow-up input when a turn completes; that turn may
|
|
61
|
+
// have applied a grounded edit, so refresh the extraction at that point.
|
|
62
|
+
const handleShowInputChange = useCallback((canSendFollowUp: boolean) => {
|
|
63
|
+
if (canSendFollowUp) {
|
|
64
|
+
changedRef.current?.();
|
|
65
|
+
}
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div className="flex h-full flex-col">
|
|
70
|
+
{selectedField && !agentRunId && (
|
|
71
|
+
<div className="shrink-0 border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground">
|
|
72
|
+
{t('grounded.assistantField')} <span className="font-mono text-foreground">{selectedField}</span>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
<ModernAgentConversation
|
|
76
|
+
agentRunId={agentRunId}
|
|
77
|
+
startWorkflow={startWorkflow}
|
|
78
|
+
interactive
|
|
79
|
+
fullWidth
|
|
80
|
+
hideObjectLinking
|
|
81
|
+
onShowInputChange={handleShowInputChange}
|
|
82
|
+
onClose={onClose}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
|
2
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import { renderWithProviders } from '../../__tests__/test-utils.js';
|
|
4
|
+
import { GroundedExtractionPanel } from './GroundedExtractionView.js';
|
|
5
|
+
|
|
6
|
+
const { mockClient } = vi.hoisted(() => {
|
|
7
|
+
const downloadUrl = vi.fn((path: string) => Promise.resolve({ url: `https://files.test/${path}` }));
|
|
8
|
+
return {
|
|
9
|
+
mockClient: { files: { getDownloadUrl: downloadUrl } },
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
vi.mock('@vertesia/ui/session', () => ({
|
|
14
|
+
useUserSession: () => ({
|
|
15
|
+
client: mockClient,
|
|
16
|
+
}),
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
describe('GroundedExtractionPanel', () => {
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
vi.restoreAllMocks();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('switches between the original and checkerboard page and shows the selected A1 range', async () => {
|
|
25
|
+
const extraction = {
|
|
26
|
+
version: 1,
|
|
27
|
+
object_id: 'object-1',
|
|
28
|
+
run_id: 'run-1',
|
|
29
|
+
generated_at: '2026-07-13T16:30:27.418Z',
|
|
30
|
+
pages: { '1': { width: 612, height: 792 } },
|
|
31
|
+
data: { part_number: 'DFVS25' },
|
|
32
|
+
citations: [
|
|
33
|
+
{
|
|
34
|
+
path: 'part_number',
|
|
35
|
+
page: 1,
|
|
36
|
+
block_ids: [],
|
|
37
|
+
cells: { start: 'E38', end: 'J38' },
|
|
38
|
+
verified: false,
|
|
39
|
+
reviewed: true,
|
|
40
|
+
value: 'DFVS25',
|
|
41
|
+
boxes: [{ x: 59.7, y: 552.9, w: 89.6, h: 17.4 }],
|
|
42
|
+
confidence: 0.99,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
vi.spyOn(globalThis, 'fetch').mockResolvedValueOnce(
|
|
47
|
+
new Response(JSON.stringify(extraction), {
|
|
48
|
+
status: 200,
|
|
49
|
+
headers: { 'Content-Type': 'application/json' },
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
renderWithProviders(<GroundedExtractionPanel objectId="object-1" />);
|
|
54
|
+
|
|
55
|
+
const pageImage = await screen.findByAltText('Page 1');
|
|
56
|
+
expect(pageImage.getAttribute('src')).toContain('page-1.original.jpg');
|
|
57
|
+
|
|
58
|
+
fireEvent.click(screen.getByRole('button', { name: 'Checkerboard' }));
|
|
59
|
+
await waitFor(() => expect(screen.getByAltText('Page 1').getAttribute('src')).toContain('page-1.grid.jpg'));
|
|
60
|
+
|
|
61
|
+
fireEvent.click(screen.getByText('DFVS25'));
|
|
62
|
+
expect(screen.getByText('E38:J38')).not.toBeNull();
|
|
63
|
+
expect(screen.getByRole('button', { name: 'part_number' }).getAttribute('title')).toContain('E38:J38');
|
|
64
|
+
});
|
|
65
|
+
});
|