@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
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
ContentNature,
|
|
3
3
|
type ContentObject,
|
|
4
4
|
ContentObjectStatus,
|
|
5
|
+
type ContentObjectTypeItem,
|
|
5
6
|
type DocAnalyzerProgress,
|
|
6
|
-
type DocProcessorOutputFormat,
|
|
7
7
|
type DocumentMetadata,
|
|
8
8
|
MarkdownRenditionFormat,
|
|
9
9
|
PDF_RENDITION_NAME,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
WorkflowExecutionStatus,
|
|
12
12
|
} from '@vertesia/common';
|
|
13
13
|
import {
|
|
14
|
+
Badge,
|
|
14
15
|
Button,
|
|
15
16
|
Dropdown,
|
|
16
17
|
MenuItem,
|
|
@@ -23,20 +24,36 @@ import {
|
|
|
23
24
|
useToast,
|
|
24
25
|
} from '@vertesia/ui/core';
|
|
25
26
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
26
|
-
import { NavLink } from '@vertesia/ui/router';
|
|
27
|
+
import { NavLink, useNavigate } from '@vertesia/ui/router';
|
|
27
28
|
import { useUserSession } from '@vertesia/ui/session';
|
|
28
29
|
import { JSONDisplay, Progress } from '@vertesia/ui/widgets';
|
|
29
|
-
import { AlertTriangle, Copy, Download, FileSearch, SquarePen } from 'lucide-react';
|
|
30
|
-
import { memo, type RefObject, useEffect, useMemo, useRef, useState } from 'react';
|
|
30
|
+
import { AlertTriangle, Copy, Download, FileSearch, ScanSearch, Sparkles, SquarePen } from 'lucide-react';
|
|
31
|
+
import { memo, type RefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
32
|
+
import type { SendAgentMessageFn } from '../../../agent/chat/ModernAgentConversation.js';
|
|
31
33
|
import {
|
|
32
34
|
type UniversalDocumentConverter,
|
|
33
35
|
type UniversalDocumentSource,
|
|
34
36
|
UniversalDocumentViewer,
|
|
35
37
|
} from '../../../document-viewer/UniversalDocumentViewer.js';
|
|
36
38
|
import { MagicPdfView } from '../../../magic-pdf';
|
|
39
|
+
import {
|
|
40
|
+
GroundedExtractionView,
|
|
41
|
+
useGroundedExtractionAvailable,
|
|
42
|
+
useGroundedSummary,
|
|
43
|
+
} from '../../../magic-pdf/GroundedExtractionView.js';
|
|
37
44
|
import { AudioPanel, ImagePanel, VideoPanel } from '../../../media-viewer';
|
|
38
45
|
import { SecureButton } from '../../../permissions/SecureButton.js';
|
|
39
46
|
import { getWorkflowStatusColor, getWorkflowStatusName, isPreviewableAsPdf } from '../../../utils/index.js';
|
|
47
|
+
import { resolveTypeCached } from '../../types/typeCatalogCache.js';
|
|
48
|
+
import { DocumentEditingPanel } from './DocumentEditingPanel.js';
|
|
49
|
+
import {
|
|
50
|
+
createDocumentEditingScopeKey,
|
|
51
|
+
getDocumentTextActionAccess,
|
|
52
|
+
isDocumentEditingContentType,
|
|
53
|
+
isDocumentEditingScopeOpen,
|
|
54
|
+
isMarkdownContentType,
|
|
55
|
+
setDocumentEditingScopeOpen,
|
|
56
|
+
} from './documentEditingRun.js';
|
|
40
57
|
import { PropertiesEditorModal } from './PropertiesEditorModal';
|
|
41
58
|
import { TextEditorPanel } from './TextEditorPanel.js';
|
|
42
59
|
import { useObjectText, useOfficePdfConversion, usePdfProcessingStatus } from './useContentPanelHooks.js';
|
|
@@ -53,6 +70,9 @@ interface TextActionsProps {
|
|
|
53
70
|
isEditing?: boolean;
|
|
54
71
|
onToggleEdit?: () => void;
|
|
55
72
|
canEdit?: boolean;
|
|
73
|
+
isCollaborating?: boolean;
|
|
74
|
+
onToggleCollaborate?: () => void;
|
|
75
|
+
canCollaborate?: boolean;
|
|
56
76
|
}
|
|
57
77
|
|
|
58
78
|
interface TextPanelProps {
|
|
@@ -171,10 +191,87 @@ interface ContentOverviewProps {
|
|
|
171
191
|
loadText?: boolean;
|
|
172
192
|
refetch?: () => Promise<unknown>;
|
|
173
193
|
canEditProperties?: boolean;
|
|
194
|
+
canCollaborate?: boolean;
|
|
174
195
|
}
|
|
175
|
-
export function ContentOverview({
|
|
196
|
+
export function ContentOverview({
|
|
197
|
+
object,
|
|
198
|
+
loadText,
|
|
199
|
+
refetch,
|
|
200
|
+
canEditProperties = true,
|
|
201
|
+
canCollaborate = false,
|
|
202
|
+
}: ContentOverviewProps) {
|
|
176
203
|
const toast = useToast();
|
|
177
204
|
const { t } = useUITranslation();
|
|
205
|
+
const { project, store } = useUserSession();
|
|
206
|
+
const navigate = useNavigate();
|
|
207
|
+
const documentRootId = object.revision?.root || object.id;
|
|
208
|
+
const editingScopeKey = project?.id ? createDocumentEditingScopeKey(project.id, documentRootId) : undefined;
|
|
209
|
+
const [activeObject, setActiveObject] = useState(object);
|
|
210
|
+
const [isCollaborating, setIsCollaborating] = useState(() =>
|
|
211
|
+
editingScopeKey ? isDocumentEditingScopeOpen(editingScopeKey) : false,
|
|
212
|
+
);
|
|
213
|
+
const sendMessageRef = useRef<SendAgentMessageFn | null>(null);
|
|
214
|
+
const latestDocumentIdRef = useRef(object.id);
|
|
215
|
+
const sourceObjectIdRef = useRef(object.id);
|
|
216
|
+
const editingScopeKeyRef = useRef(editingScopeKey);
|
|
217
|
+
|
|
218
|
+
useEffect(() => {
|
|
219
|
+
if (editingScopeKeyRef.current === editingScopeKey) return;
|
|
220
|
+
editingScopeKeyRef.current = editingScopeKey;
|
|
221
|
+
setIsCollaborating(editingScopeKey ? isDocumentEditingScopeOpen(editingScopeKey) : false);
|
|
222
|
+
}, [editingScopeKey]);
|
|
223
|
+
|
|
224
|
+
const toggleCollaboration = useCallback(() => {
|
|
225
|
+
setIsCollaborating((current) => {
|
|
226
|
+
const next = !current;
|
|
227
|
+
if (editingScopeKey) setDocumentEditingScopeOpen(editingScopeKey, next);
|
|
228
|
+
return next;
|
|
229
|
+
});
|
|
230
|
+
}, [editingScopeKey]);
|
|
231
|
+
|
|
232
|
+
const closeCollaboration = useCallback(() => {
|
|
233
|
+
if (editingScopeKey) setDocumentEditingScopeOpen(editingScopeKey, false);
|
|
234
|
+
setIsCollaborating(false);
|
|
235
|
+
}, [editingScopeKey]);
|
|
236
|
+
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
const sourceObjectChanged = sourceObjectIdRef.current !== object.id;
|
|
239
|
+
sourceObjectIdRef.current = object.id;
|
|
240
|
+
setActiveObject((current) => {
|
|
241
|
+
if (!sourceObjectChanged && current.id !== object.id) return current;
|
|
242
|
+
latestDocumentIdRef.current = object.id;
|
|
243
|
+
return current.id === object.id && current.text && !object.text
|
|
244
|
+
? { ...object, text: current.text }
|
|
245
|
+
: object;
|
|
246
|
+
});
|
|
247
|
+
}, [object]);
|
|
248
|
+
|
|
249
|
+
const handleDocumentUpdated = useCallback(
|
|
250
|
+
async (updatedDocumentId: string, createdVersion: boolean) => {
|
|
251
|
+
latestDocumentIdRef.current = updatedDocumentId;
|
|
252
|
+
|
|
253
|
+
try {
|
|
254
|
+
const [updatedObject, updatedText] = await Promise.all([
|
|
255
|
+
store.objects.retrieve(updatedDocumentId),
|
|
256
|
+
store.objects.getObjectText(updatedDocumentId),
|
|
257
|
+
]);
|
|
258
|
+
if (latestDocumentIdRef.current === updatedDocumentId) {
|
|
259
|
+
setActiveObject({ ...updatedObject, text: updatedText.text });
|
|
260
|
+
}
|
|
261
|
+
} catch (err: unknown) {
|
|
262
|
+
console.error('Failed to load the updated document revision', err);
|
|
263
|
+
toast({
|
|
264
|
+
status: 'error',
|
|
265
|
+
title: t('agent.failedToLoadDocument'),
|
|
266
|
+
description: err instanceof Error ? err.message : undefined,
|
|
267
|
+
duration: 5000,
|
|
268
|
+
});
|
|
269
|
+
} finally {
|
|
270
|
+
if (createdVersion) navigate(`/objects/${updatedDocumentId}`);
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
[navigate, store.objects, t, toast],
|
|
274
|
+
);
|
|
178
275
|
|
|
179
276
|
const handleCopyContent = async (content: string, type: 'text' | 'properties') => {
|
|
180
277
|
try {
|
|
@@ -199,25 +296,41 @@ export function ContentOverview({ object, loadText, refetch, canEditProperties =
|
|
|
199
296
|
};
|
|
200
297
|
|
|
201
298
|
return (
|
|
202
|
-
|
|
203
|
-
<
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
299
|
+
<>
|
|
300
|
+
<ResizablePanelGroup direction="horizontal" className="h-full">
|
|
301
|
+
<ResizablePanel defaultSize={67} className="min-w-[100px]">
|
|
302
|
+
<DataPanel
|
|
303
|
+
object={activeObject}
|
|
304
|
+
loadText={loadText ?? false}
|
|
305
|
+
handleCopyContent={handleCopyContent}
|
|
306
|
+
refetch={refetch}
|
|
307
|
+
canCollaborate={canCollaborate}
|
|
308
|
+
isCollaborating={isCollaborating}
|
|
309
|
+
onToggleCollaborate={toggleCollaboration}
|
|
310
|
+
/>
|
|
311
|
+
</ResizablePanel>
|
|
312
|
+
<ResizableHandle withHandle />
|
|
313
|
+
<ResizablePanel defaultSize={33} className="min-w-[100px]">
|
|
314
|
+
<PropertiesPanel
|
|
315
|
+
object={activeObject}
|
|
316
|
+
refetch={refetch ?? (() => Promise.resolve())}
|
|
317
|
+
handleCopyContent={handleCopyContent}
|
|
318
|
+
canEditProperties={canEditProperties}
|
|
319
|
+
/>
|
|
320
|
+
</ResizablePanel>
|
|
321
|
+
</ResizablePanelGroup>
|
|
322
|
+
{isCollaborating ? (
|
|
323
|
+
<DocumentEditingPanel
|
|
324
|
+
object={activeObject}
|
|
325
|
+
initialContent={activeObject.text ?? ''}
|
|
326
|
+
onClose={closeCollaboration}
|
|
327
|
+
onDocumentUpdated={(updatedDocumentId, createdVersion) =>
|
|
328
|
+
void handleDocumentUpdated(updatedDocumentId, createdVersion)
|
|
329
|
+
}
|
|
330
|
+
sendMessageRef={sendMessageRef}
|
|
218
331
|
/>
|
|
219
|
-
|
|
220
|
-
|
|
332
|
+
) : null}
|
|
333
|
+
</>
|
|
221
334
|
);
|
|
222
335
|
}
|
|
223
336
|
|
|
@@ -235,6 +348,7 @@ function PropertiesPanel({
|
|
|
235
348
|
const { t } = useUITranslation();
|
|
236
349
|
const [viewCode, setViewCode] = useState(false);
|
|
237
350
|
const [isPropertiesModalOpen, setPropertiesModalOpen] = useState(false);
|
|
351
|
+
const groundedSummary = useGroundedSummary(object.id);
|
|
238
352
|
|
|
239
353
|
const handleOpenPropertiesModal = () => {
|
|
240
354
|
setPropertiesModalOpen(true);
|
|
@@ -252,7 +366,7 @@ function PropertiesPanel({
|
|
|
252
366
|
<Button
|
|
253
367
|
variant={`${viewCode ? 'ghost' : 'primary'}`}
|
|
254
368
|
size="sm"
|
|
255
|
-
|
|
369
|
+
title={t('store.previewProperties')}
|
|
256
370
|
onClick={() => setViewCode(!viewCode)}
|
|
257
371
|
>
|
|
258
372
|
Properties
|
|
@@ -260,7 +374,7 @@ function PropertiesPanel({
|
|
|
260
374
|
<Button
|
|
261
375
|
variant={`${viewCode ? 'primary' : 'ghost'}`}
|
|
262
376
|
size="sm"
|
|
263
|
-
|
|
377
|
+
title={t('store.viewInJsonFormat')}
|
|
264
378
|
onClick={() => setViewCode(!viewCode)}
|
|
265
379
|
>
|
|
266
380
|
JSON
|
|
@@ -294,6 +408,26 @@ function PropertiesPanel({
|
|
|
294
408
|
</div>
|
|
295
409
|
</div>
|
|
296
410
|
|
|
411
|
+
{groundedSummary && object.properties && (
|
|
412
|
+
<div className="flex items-center gap-2 px-2 pb-2">
|
|
413
|
+
{typeof groundedSummary.confidence === 'number' && (
|
|
414
|
+
<Badge
|
|
415
|
+
variant={groundedSummary.confidence >= 0.95 ? 'success' : 'attention'}
|
|
416
|
+
title={t('grounded.confidenceHint')}
|
|
417
|
+
>
|
|
418
|
+
{t('grounded.confidence', {
|
|
419
|
+
percent: Math.floor(groundedSummary.confidence * 100),
|
|
420
|
+
})}
|
|
421
|
+
</Badge>
|
|
422
|
+
)}
|
|
423
|
+
<Badge variant={groundedSummary.verified === groundedSummary.total ? 'success' : 'attention'}>
|
|
424
|
+
{t('grounded.verifiedOf', {
|
|
425
|
+
verified: groundedSummary.verified,
|
|
426
|
+
total: groundedSummary.total,
|
|
427
|
+
})}
|
|
428
|
+
</Badge>
|
|
429
|
+
</div>
|
|
430
|
+
)}
|
|
297
431
|
{object.properties ? (
|
|
298
432
|
<div className="flex-1 min-h-0 px-2">
|
|
299
433
|
<JSONDisplay value={object.properties} viewCode={viewCode} />
|
|
@@ -314,17 +448,57 @@ function PropertiesPanel({
|
|
|
314
448
|
);
|
|
315
449
|
}
|
|
316
450
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
handleCopyContent,
|
|
321
|
-
refetch,
|
|
322
|
-
}: {
|
|
451
|
+
type IntakeDefaultView = NonNullable<NonNullable<ContentObjectTypeItem['intake']>['default_view']>;
|
|
452
|
+
|
|
453
|
+
interface DataPanelProps {
|
|
323
454
|
object: ContentObject;
|
|
324
455
|
loadText: boolean;
|
|
325
456
|
handleCopyContent: (content: string, type: 'text' | 'properties') => Promise<void>;
|
|
326
457
|
refetch?: () => Promise<unknown>;
|
|
327
|
-
|
|
458
|
+
canCollaborate: boolean;
|
|
459
|
+
isCollaborating: boolean;
|
|
460
|
+
onToggleCollaborate: () => void;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Resolves the object's content-type intake policy BEFORE the initial panel is chosen so
|
|
465
|
+
* `default_view` can drive it. Renders a spinner until the type is resolved — never the
|
|
466
|
+
* MIME-guessed panel first (no guess-then-flip). Objects without a type render immediately.
|
|
467
|
+
*/
|
|
468
|
+
function DataPanel(props: DataPanelProps) {
|
|
469
|
+
const { client } = useUserSession();
|
|
470
|
+
const typeRef = props.object.type;
|
|
471
|
+
const typeId = typeRef?.id;
|
|
472
|
+
// Fast path: single-object reads carry the display hint on the API-enriched type ref.
|
|
473
|
+
const refView = typeRef?.default_view;
|
|
474
|
+
// Fallback (list-fed contexts, older servers): session-cached catalog lookup.
|
|
475
|
+
// null = resolved with no default view; undefined = not resolved yet.
|
|
476
|
+
const { data: fetchedView } = useFetch<IntakeDefaultView | null>(async () => {
|
|
477
|
+
if (!typeId || refView) return null;
|
|
478
|
+
const type = await resolveTypeCached(client, typeId);
|
|
479
|
+
return type?.intake?.default_view ?? null;
|
|
480
|
+
}, [typeId, refView]);
|
|
481
|
+
const defaultView = refView ?? fetchedView;
|
|
482
|
+
if (typeId && !refView && fetchedView === undefined) {
|
|
483
|
+
return (
|
|
484
|
+
<div className="flex h-full items-center justify-center">
|
|
485
|
+
<Spinner size="lg" />
|
|
486
|
+
</div>
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
return <DataPanelContent {...props} defaultView={defaultView ?? undefined} />;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
function DataPanelContent({
|
|
493
|
+
object,
|
|
494
|
+
loadText,
|
|
495
|
+
handleCopyContent,
|
|
496
|
+
refetch,
|
|
497
|
+
defaultView,
|
|
498
|
+
canCollaborate,
|
|
499
|
+
isCollaborating,
|
|
500
|
+
onToggleCollaborate,
|
|
501
|
+
}: DataPanelProps & { defaultView?: IntakeDefaultView }) {
|
|
328
502
|
const { client } = useUserSession();
|
|
329
503
|
const { t } = useUITranslation();
|
|
330
504
|
const isImage = object?.metadata?.type === ContentNature.Image;
|
|
@@ -339,14 +513,32 @@ function DataPanel({
|
|
|
339
513
|
const metadata = object.metadata as DocumentMetadata;
|
|
340
514
|
const pdfRendition = metadata?.renditions?.find((r) => r.name === PDF_RENDITION_NAME);
|
|
341
515
|
|
|
342
|
-
// Determine initial panel view
|
|
516
|
+
// Determine initial panel view: the type's default_view wins when it applies to this
|
|
517
|
+
// object; otherwise fall back to the nature/MIME heuristics.
|
|
343
518
|
const getInitialView = (): PanelView => {
|
|
519
|
+
switch (defaultView) {
|
|
520
|
+
case 'text':
|
|
521
|
+
return PanelView.Text;
|
|
522
|
+
case 'pdf':
|
|
523
|
+
if (isPdf || isPreviewableAsPdfDoc || pdfRendition) return PanelView.Pdf;
|
|
524
|
+
break;
|
|
525
|
+
case 'image':
|
|
526
|
+
if (isImage) return PanelView.Image;
|
|
527
|
+
break;
|
|
528
|
+
case 'properties':
|
|
529
|
+
// Properties live in the right-hand panel which is always visible; the text
|
|
530
|
+
// panel shows the rendered property card for extraction-only types.
|
|
531
|
+
return PanelView.Text;
|
|
532
|
+
default:
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
344
535
|
if (isVideo) return PanelView.Video;
|
|
345
536
|
if (isAudio) return PanelView.Audio;
|
|
346
537
|
if (isImage) return PanelView.Image;
|
|
347
538
|
return PanelView.Text;
|
|
348
539
|
};
|
|
349
540
|
|
|
541
|
+
const groundedAvailable = useGroundedExtractionAvailable(object.id);
|
|
350
542
|
const [currentPanel, setCurrentPanel] = useState<PanelView>(getInitialView());
|
|
351
543
|
const [hasVisitedPdfPanel, setHasVisitedPdfPanel] = useState(currentPanel === PanelView.Pdf);
|
|
352
544
|
|
|
@@ -359,15 +551,14 @@ function DataPanel({
|
|
|
359
551
|
// Text editing state
|
|
360
552
|
const [isEditing, setIsEditing] = useState(false);
|
|
361
553
|
const canEdit = !!(
|
|
362
|
-
object.content?.source &&
|
|
363
554
|
object.content?.type &&
|
|
364
|
-
!isCreatedOrProcessing &&
|
|
365
555
|
!object.is_locked &&
|
|
366
556
|
object.user_permissions?.can_write !== false &&
|
|
367
557
|
(object.content.type.startsWith('text/') ||
|
|
368
558
|
object.content.type === 'application/json' ||
|
|
369
559
|
object.content.type === 'application/xml')
|
|
370
560
|
);
|
|
561
|
+
const textActionAccess = getDocumentTextActionAccess(canEdit, canCollaborate);
|
|
371
562
|
|
|
372
563
|
// Use custom hooks for text loading, PDF processing, and Office conversion
|
|
373
564
|
const {
|
|
@@ -376,7 +567,7 @@ function DataPanel({
|
|
|
376
567
|
isLoading: isLoadingText,
|
|
377
568
|
isCropped: isTextCropped,
|
|
378
569
|
loadText: reloadText,
|
|
379
|
-
} = useObjectText(object.id, object.text, loadText);
|
|
570
|
+
} = useObjectText(object.id, object.text, loadText, object.revision?.root || object.id);
|
|
380
571
|
|
|
381
572
|
// Only poll while the active panel can actually surface processing progress.
|
|
382
573
|
const shouldPollProgress =
|
|
@@ -386,7 +577,6 @@ function DataPanel({
|
|
|
386
577
|
const {
|
|
387
578
|
progress: pdfProgress,
|
|
388
579
|
status: pdfStatus,
|
|
389
|
-
outputFormat: pdfOutputFormat,
|
|
390
580
|
isComplete: processingComplete,
|
|
391
581
|
} = usePdfProcessingStatus(object.id, shouldPollProgress);
|
|
392
582
|
|
|
@@ -460,7 +650,7 @@ function DataPanel({
|
|
|
460
650
|
<Button
|
|
461
651
|
variant={currentPanel === PanelView.Image ? 'primary' : 'ghost'}
|
|
462
652
|
size="sm"
|
|
463
|
-
|
|
653
|
+
title={t('store.viewImage')}
|
|
464
654
|
onClick={() => setCurrentPanel(PanelView.Image)}
|
|
465
655
|
>
|
|
466
656
|
Image
|
|
@@ -470,7 +660,7 @@ function DataPanel({
|
|
|
470
660
|
<Button
|
|
471
661
|
variant={currentPanel === PanelView.Video ? 'primary' : 'ghost'}
|
|
472
662
|
size="sm"
|
|
473
|
-
|
|
663
|
+
title={t('store.viewVideo')}
|
|
474
664
|
onClick={() => setCurrentPanel(PanelView.Video)}
|
|
475
665
|
>
|
|
476
666
|
Video
|
|
@@ -480,7 +670,7 @@ function DataPanel({
|
|
|
480
670
|
<Button
|
|
481
671
|
variant={currentPanel === PanelView.Audio ? 'primary' : 'ghost'}
|
|
482
672
|
size="sm"
|
|
483
|
-
|
|
673
|
+
title={t('store.viewAudio')}
|
|
484
674
|
onClick={() => setCurrentPanel(PanelView.Audio)}
|
|
485
675
|
>
|
|
486
676
|
Audio
|
|
@@ -490,7 +680,7 @@ function DataPanel({
|
|
|
490
680
|
<Button
|
|
491
681
|
variant={currentPanel === PanelView.Transcript ? 'primary' : 'ghost'}
|
|
492
682
|
size="sm"
|
|
493
|
-
|
|
683
|
+
title={t('store.viewTranscript')}
|
|
494
684
|
onClick={() => setCurrentPanel(PanelView.Transcript)}
|
|
495
685
|
>
|
|
496
686
|
Transcript
|
|
@@ -499,7 +689,7 @@ function DataPanel({
|
|
|
499
689
|
<Button
|
|
500
690
|
variant={currentPanel === PanelView.Text ? 'primary' : 'ghost'}
|
|
501
691
|
size="sm"
|
|
502
|
-
|
|
692
|
+
title={t('store.viewText')}
|
|
503
693
|
onClick={() => setCurrentPanel(PanelView.Text)}
|
|
504
694
|
>
|
|
505
695
|
Text
|
|
@@ -508,7 +698,7 @@ function DataPanel({
|
|
|
508
698
|
<Button
|
|
509
699
|
variant={currentPanel === PanelView.Pdf ? 'primary' : 'ghost'}
|
|
510
700
|
size="sm"
|
|
511
|
-
|
|
701
|
+
title={t('store.viewPdf')}
|
|
512
702
|
onClick={() => setCurrentPanel(PanelView.Pdf)}
|
|
513
703
|
>
|
|
514
704
|
PDF
|
|
@@ -518,7 +708,7 @@ function DataPanel({
|
|
|
518
708
|
<Button
|
|
519
709
|
variant={currentPanel === PanelView.Pdf ? 'primary' : 'ghost'}
|
|
520
710
|
size="sm"
|
|
521
|
-
|
|
711
|
+
title={t('store.viewAsPdf')}
|
|
522
712
|
onClick={() => {
|
|
523
713
|
setCurrentPanel(PanelView.Pdf);
|
|
524
714
|
if (!pdfRendition && !officePdfUrl && !officePdfConverting) {
|
|
@@ -531,7 +721,10 @@ function DataPanel({
|
|
|
531
721
|
</Button>
|
|
532
722
|
)}
|
|
533
723
|
</div>
|
|
534
|
-
<
|
|
724
|
+
<div className="flex items-center gap-1">
|
|
725
|
+
<PdfActions object={object} />
|
|
726
|
+
<GroundedActions objectId={object.id} available={groundedAvailable} />
|
|
727
|
+
</div>
|
|
535
728
|
</div>
|
|
536
729
|
{currentPanel === PanelView.Text && !showProcessingPanel && !isEditing && (
|
|
537
730
|
<TextActions
|
|
@@ -542,7 +735,10 @@ function DataPanel({
|
|
|
542
735
|
textContainerRef={textContainerRef}
|
|
543
736
|
isEditing={isEditing}
|
|
544
737
|
onToggleEdit={() => setIsEditing(true)}
|
|
545
|
-
canEdit={canEdit}
|
|
738
|
+
canEdit={textActionAccess.canEdit}
|
|
739
|
+
isCollaborating={isCollaborating}
|
|
740
|
+
onToggleCollaborate={onToggleCollaborate}
|
|
741
|
+
canCollaborate={textActionAccess.canCollaborate}
|
|
546
742
|
/>
|
|
547
743
|
)}
|
|
548
744
|
{currentPanel === PanelView.Pdf && isPreviewableAsPdfDoc && (pdfRendition || officePdfUrl) && (
|
|
@@ -588,26 +784,29 @@ function DataPanel({
|
|
|
588
784
|
)}
|
|
589
785
|
{showPdfProcessingPanel && (
|
|
590
786
|
<div className={getPanelVisibility(true)}>
|
|
591
|
-
<PdfProcessingPanel progress={pdfProgress} status={pdfStatus}
|
|
787
|
+
<PdfProcessingPanel progress={pdfProgress} status={pdfStatus} />
|
|
592
788
|
</div>
|
|
593
789
|
)}
|
|
594
|
-
{currentPanel === PanelView.Text && !showProcessingPanel && !isEditing && isLoadingText && (
|
|
790
|
+
{currentPanel === PanelView.Text && !showProcessingPanel && !isEditing && isLoadingText && !displayText && (
|
|
595
791
|
<div className={getPanelVisibility(true)}>
|
|
596
792
|
<div className="flex justify-center items-center flex-1">
|
|
597
793
|
<Spinner size="lg" />
|
|
598
794
|
</div>
|
|
599
795
|
</div>
|
|
600
796
|
)}
|
|
601
|
-
{currentPanel === PanelView.Text &&
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
797
|
+
{currentPanel === PanelView.Text &&
|
|
798
|
+
!showProcessingPanel &&
|
|
799
|
+
!isEditing &&
|
|
800
|
+
(!isLoadingText || displayText) && (
|
|
801
|
+
<div className={getPanelVisibility(true)}>
|
|
802
|
+
<TextPanel
|
|
803
|
+
object={object}
|
|
804
|
+
text={displayText}
|
|
805
|
+
isTextCropped={isTextCropped}
|
|
806
|
+
textContainerRef={textContainerRef}
|
|
807
|
+
/>
|
|
808
|
+
</div>
|
|
809
|
+
)}
|
|
611
810
|
{isEditing && currentPanel === PanelView.Text && fullText != null && (
|
|
612
811
|
<TextEditorPanel
|
|
613
812
|
object={object}
|
|
@@ -624,7 +823,17 @@ function DataPanel({
|
|
|
624
823
|
);
|
|
625
824
|
}
|
|
626
825
|
|
|
627
|
-
function TextActions({
|
|
826
|
+
function TextActions({
|
|
827
|
+
object,
|
|
828
|
+
text,
|
|
829
|
+
fullText,
|
|
830
|
+
handleCopyContent,
|
|
831
|
+
onToggleEdit,
|
|
832
|
+
canEdit,
|
|
833
|
+
isCollaborating,
|
|
834
|
+
onToggleCollaborate,
|
|
835
|
+
canCollaborate,
|
|
836
|
+
}: TextActionsProps) {
|
|
628
837
|
const { client, project } = useUserSession();
|
|
629
838
|
const toast = useToast();
|
|
630
839
|
const { t } = useUITranslation();
|
|
@@ -636,10 +845,8 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
636
845
|
);
|
|
637
846
|
const pdfTemplateObjectId = fullProject?.configuration?.pdf_template_object_id;
|
|
638
847
|
|
|
639
|
-
const isMarkdown = content?.type
|
|
640
|
-
|
|
641
|
-
// Get content processor type for file extension detection
|
|
642
|
-
const contentProcessorType = getContentProcessorType(object);
|
|
848
|
+
const isMarkdown = isMarkdownContentType(content?.type);
|
|
849
|
+
const isDocumentEditingContent = isDocumentEditingContentType(content?.type);
|
|
643
850
|
|
|
644
851
|
const handleExportDocument = async (format: MarkdownRenditionFormat, useDefaultTemplate?: boolean) => {
|
|
645
852
|
// Prevent multiple concurrent exports
|
|
@@ -675,10 +882,10 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
675
882
|
// Determine file extension based on content processor type
|
|
676
883
|
let ext = 'txt';
|
|
677
884
|
let mimeType = 'text/plain';
|
|
678
|
-
if (
|
|
885
|
+
if (content?.type === 'application/xml' || content?.type === 'text/xml') {
|
|
679
886
|
ext = 'xml';
|
|
680
887
|
mimeType = 'text/xml';
|
|
681
|
-
} else if (
|
|
888
|
+
} else if (isMarkdown) {
|
|
682
889
|
ext = 'md';
|
|
683
890
|
mimeType = 'text/markdown';
|
|
684
891
|
}
|
|
@@ -702,31 +909,24 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
702
909
|
<div className="h-[41px] text-lg font-semibold flex justify-between items-center px-2">
|
|
703
910
|
<div className="flex items-center gap-2">
|
|
704
911
|
{fullText && (
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
</Button>
|
|
714
|
-
{canEdit && onToggleEdit && (
|
|
715
|
-
<SecureButton
|
|
716
|
-
permission={Permission.content_write}
|
|
717
|
-
variant="ghost"
|
|
718
|
-
size="sm"
|
|
719
|
-
onClick={onToggleEdit}
|
|
720
|
-
title={t('store.editText')}
|
|
721
|
-
className="flex items-center gap-2"
|
|
722
|
-
>
|
|
723
|
-
<SquarePen className="size-4" />
|
|
724
|
-
</SecureButton>
|
|
725
|
-
)}
|
|
726
|
-
</>
|
|
912
|
+
<Button
|
|
913
|
+
variant="ghost"
|
|
914
|
+
size="sm"
|
|
915
|
+
title="Copy text"
|
|
916
|
+
onClick={() => handleCopyContent(fullText, 'text')}
|
|
917
|
+
>
|
|
918
|
+
<Copy className="size-4" />
|
|
919
|
+
</Button>
|
|
727
920
|
)}
|
|
728
921
|
{isDownloading ? (
|
|
729
|
-
<Button
|
|
922
|
+
<Button
|
|
923
|
+
variant="ghost"
|
|
924
|
+
size="sm"
|
|
925
|
+
disabled
|
|
926
|
+
className="h-8 w-8 p-0"
|
|
927
|
+
title={t('agent.download')}
|
|
928
|
+
aria-label={t('agent.download')}
|
|
929
|
+
>
|
|
730
930
|
<Spinner size="sm" />
|
|
731
931
|
</Button>
|
|
732
932
|
) : (
|
|
@@ -736,8 +936,9 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
736
936
|
variant="ghost"
|
|
737
937
|
size="sm"
|
|
738
938
|
disabled={!text}
|
|
739
|
-
className="
|
|
740
|
-
|
|
939
|
+
className="h-8 w-8 p-0"
|
|
940
|
+
title={t('agent.download')}
|
|
941
|
+
aria-label={t('agent.download')}
|
|
741
942
|
>
|
|
742
943
|
<Download className="size-4" />
|
|
743
944
|
</Button>
|
|
@@ -775,6 +976,35 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
775
976
|
)}
|
|
776
977
|
</Dropdown>
|
|
777
978
|
)}
|
|
979
|
+
{fullText && (
|
|
980
|
+
<>
|
|
981
|
+
{canEdit && onToggleEdit && (
|
|
982
|
+
<SecureButton
|
|
983
|
+
permission={Permission.content_write}
|
|
984
|
+
variant="ghost"
|
|
985
|
+
size="sm"
|
|
986
|
+
onClick={onToggleEdit}
|
|
987
|
+
title={t('store.editText')}
|
|
988
|
+
aria-label={t('store.editText')}
|
|
989
|
+
className="h-8 w-8 p-0"
|
|
990
|
+
>
|
|
991
|
+
<SquarePen className="size-4" />
|
|
992
|
+
</SecureButton>
|
|
993
|
+
)}
|
|
994
|
+
{canCollaborate && onToggleCollaborate && isDocumentEditingContent && (
|
|
995
|
+
<Button
|
|
996
|
+
variant={isCollaborating ? 'primary' : 'ghost'}
|
|
997
|
+
size="sm"
|
|
998
|
+
onClick={onToggleCollaborate}
|
|
999
|
+
title={t('agent.editWithAI')}
|
|
1000
|
+
aria-label={t('agent.editWithAI')}
|
|
1001
|
+
className="h-8 w-8 p-0"
|
|
1002
|
+
>
|
|
1003
|
+
<Sparkles className="size-4" />
|
|
1004
|
+
</Button>
|
|
1005
|
+
)}
|
|
1006
|
+
</>
|
|
1007
|
+
)}
|
|
778
1008
|
</div>
|
|
779
1009
|
</div>
|
|
780
1010
|
);
|
|
@@ -783,12 +1013,12 @@ function TextActions({ object, text, fullText, handleCopyContent, onToggleEdit,
|
|
|
783
1013
|
const TextPanel = memo(({ object, text, isTextCropped, textContainerRef }: TextPanelProps) => {
|
|
784
1014
|
const { t } = useUITranslation();
|
|
785
1015
|
const isCreatedOrProcessing = isCreatedOrProcessingStatus(object?.status);
|
|
1016
|
+
const content = object.content;
|
|
786
1017
|
const contentProcessorType = getContentProcessorType(object);
|
|
787
|
-
const isXml = contentProcessorType === 'xml';
|
|
1018
|
+
const isXml = contentProcessorType === 'xml' || content?.type === 'application/xml' || content?.type === 'text/xml';
|
|
788
1019
|
|
|
789
1020
|
// Check if content type is markdown or plain text
|
|
790
|
-
const isMarkdownOrText =
|
|
791
|
-
object.content?.type && (object.content.type === 'text/markdown' || object.content.type === 'text/plain');
|
|
1021
|
+
const isMarkdownOrText = isDocumentEditingContentType(content?.type);
|
|
792
1022
|
|
|
793
1023
|
// Render as markdown if it's markdown/text type OR if text looks like markdown (but not if XML)
|
|
794
1024
|
const shouldRenderAsMarkdown = !isXml && (isMarkdownOrText || looksLikeMarkdown(text));
|
|
@@ -893,9 +1123,8 @@ function TranscriptPanel({
|
|
|
893
1123
|
function PdfActions({ object }: { object: ContentObject }) {
|
|
894
1124
|
const [isPdfPreviewOpen, setPdfPreviewOpen] = useState(false);
|
|
895
1125
|
|
|
896
|
-
// Check if PDF has been processed (content_processor.type is xml or markdown)
|
|
897
1126
|
const contentProcessorType = getContentProcessorType(object);
|
|
898
|
-
const hasPdfAnalysis = contentProcessorType === '
|
|
1127
|
+
const hasPdfAnalysis = contentProcessorType === 'markdown';
|
|
899
1128
|
|
|
900
1129
|
if (!hasPdfAnalysis) return null;
|
|
901
1130
|
|
|
@@ -913,6 +1142,32 @@ function PdfActions({ object }: { object: ContentObject }) {
|
|
|
913
1142
|
);
|
|
914
1143
|
}
|
|
915
1144
|
|
|
1145
|
+
function GroundedActions({ objectId, available }: { objectId: string; available: boolean }) {
|
|
1146
|
+
const { t } = useUITranslation();
|
|
1147
|
+
const [isGroundedOpen, setGroundedOpen] = useState(false);
|
|
1148
|
+
|
|
1149
|
+
if (!available) return null;
|
|
1150
|
+
|
|
1151
|
+
return (
|
|
1152
|
+
<>
|
|
1153
|
+
<Button
|
|
1154
|
+
variant="ghost"
|
|
1155
|
+
size="sm"
|
|
1156
|
+
onClick={() => setGroundedOpen(true)}
|
|
1157
|
+
title={t('grounded.title')}
|
|
1158
|
+
aria-label={t('grounded.title')}
|
|
1159
|
+
>
|
|
1160
|
+
<ScanSearch className="size-4" />
|
|
1161
|
+
</Button>
|
|
1162
|
+
{isGroundedOpen && (
|
|
1163
|
+
<Portal>
|
|
1164
|
+
<GroundedExtractionView objectId={objectId} onClose={() => setGroundedOpen(false)} />
|
|
1165
|
+
</Portal>
|
|
1166
|
+
)}
|
|
1167
|
+
</>
|
|
1168
|
+
);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
916
1171
|
function OfficePdfActions({ object, pdfRendition, officePdfUrl }: OfficePdfActionsProps) {
|
|
917
1172
|
const { client } = useUserSession();
|
|
918
1173
|
const toast = useToast();
|
|
@@ -1057,18 +1312,14 @@ function OfficePdfPreviewPanel({
|
|
|
1057
1312
|
function PdfProcessingPanel({
|
|
1058
1313
|
progress,
|
|
1059
1314
|
status,
|
|
1060
|
-
outputFormat,
|
|
1061
1315
|
}: {
|
|
1062
1316
|
progress?: DocAnalyzerProgress;
|
|
1063
1317
|
status?: WorkflowExecutionStatus;
|
|
1064
|
-
outputFormat?: DocProcessorOutputFormat;
|
|
1065
1318
|
}) {
|
|
1066
1319
|
const { t } = useUITranslation();
|
|
1067
1320
|
const statusColor = getWorkflowStatusColor(status);
|
|
1068
1321
|
const statusName = getWorkflowStatusName(status);
|
|
1069
|
-
|
|
1070
|
-
// Show detailed progress (tables, images, visuals) for XML processing
|
|
1071
|
-
const isXmlProcessing = outputFormat === 'xml';
|
|
1322
|
+
const isGroundedExtraction = progress?.phase === 'grounded_extraction';
|
|
1072
1323
|
|
|
1073
1324
|
// Ensure percent is a valid number (handle undefined and NaN from division by zero)
|
|
1074
1325
|
const percent = progress?.percent != null && !Number.isNaN(progress.percent) ? progress.percent : 0;
|
|
@@ -1079,14 +1330,14 @@ function PdfProcessingPanel({
|
|
|
1079
1330
|
<div className="space-y-2">
|
|
1080
1331
|
<div className="flex flex-col gap-1">
|
|
1081
1332
|
<ProgressLine
|
|
1082
|
-
name={
|
|
1333
|
+
name={isGroundedExtraction ? 'Prepare Evidence' : 'Analyze Page'}
|
|
1083
1334
|
progress={progress.pages}
|
|
1084
1335
|
/>
|
|
1085
|
-
{
|
|
1336
|
+
{isGroundedExtraction && (
|
|
1086
1337
|
<>
|
|
1087
|
-
<ProgressLine name="
|
|
1088
|
-
<ProgressLine name="
|
|
1089
|
-
<ProgressLine name="
|
|
1338
|
+
<ProgressLine name="Run OCR" progress={progress.images} />
|
|
1339
|
+
<ProgressLine name="Extract Grounded Data" progress={progress.tables} />
|
|
1340
|
+
<ProgressLine name="Review and Annotate" progress={progress.visuals} />
|
|
1090
1341
|
</>
|
|
1091
1342
|
)}
|
|
1092
1343
|
</div>
|