@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
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
import { Button, Center, ErrorBox, Input, Modal, ModalBody, ModalTitle, Switch } from '@vertesia/ui/core';
|
|
1
|
+
import { Button, Center, cn, ErrorBox, Input, Modal, ModalBody, ModalTitle, Switch, VTooltip } from '@vertesia/ui/core';
|
|
2
2
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
3
|
import { useUserSession } from '@vertesia/ui/session';
|
|
4
|
+
import { ArtifactEditingSurface, type ArtifactSaveStatus, type MarkdownEditingAction } from '@vertesia/ui/widgets';
|
|
4
5
|
import {
|
|
6
|
+
ArrowLeftIcon,
|
|
7
|
+
CheckIcon,
|
|
5
8
|
ChevronDownIcon,
|
|
6
9
|
ChevronRightIcon,
|
|
7
10
|
DownloadIcon,
|
|
8
|
-
EyeIcon,
|
|
9
11
|
FileIcon,
|
|
10
12
|
FolderIcon,
|
|
11
13
|
FolderOpenIcon,
|
|
12
14
|
Loader2Icon,
|
|
13
15
|
PackageIcon,
|
|
16
|
+
PenLineIcon,
|
|
14
17
|
RefreshCwIcon,
|
|
18
|
+
Rows3Icon,
|
|
15
19
|
} from 'lucide-react';
|
|
16
20
|
import React, { useCallback, useId, useMemo, useState } from 'react';
|
|
17
|
-
import {
|
|
18
|
-
type UniversalDocumentSource,
|
|
19
|
-
UniversalDocumentViewer,
|
|
20
|
-
} from '../../document-viewer/UniversalDocumentViewer.js';
|
|
21
|
+
import type { UniversalDocumentSource } from '../../document-viewer/UniversalDocumentViewer.js';
|
|
21
22
|
import { type ArtifactTreeNode, useArtifacts } from './hooks/useArtifacts.js';
|
|
22
23
|
|
|
24
|
+
const UniversalDocumentViewer = React.lazy(async () => {
|
|
25
|
+
const module = await import('../../document-viewer/UniversalDocumentViewer.js');
|
|
26
|
+
return { default: module.UniversalDocumentViewer };
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** Artifact file extensions that open in the Markdown editor rather than downloading. */
|
|
30
|
+
const EDITABLE_ARTIFACT_EXTENSIONS = new Set(['md', 'markdown', 'mdx', 'txt']);
|
|
31
|
+
|
|
32
|
+
function isEditableArtifact(path: string): boolean {
|
|
33
|
+
const extension = path.split('.').pop()?.toLowerCase();
|
|
34
|
+
return extension !== undefined && EDITABLE_ARTIFACT_EXTENSIONS.has(extension);
|
|
35
|
+
}
|
|
36
|
+
|
|
23
37
|
// ---------------------------------------------------------------------------
|
|
24
38
|
// Tree node component
|
|
25
39
|
// ---------------------------------------------------------------------------
|
|
@@ -28,26 +42,18 @@ interface TreeNodeProps {
|
|
|
28
42
|
node: ArtifactTreeNode;
|
|
29
43
|
depth: number;
|
|
30
44
|
runId: string;
|
|
31
|
-
|
|
45
|
+
onOpen: (relativePath: string) => void;
|
|
32
46
|
onDownload: (relativePath: string) => void;
|
|
33
47
|
downloadingPath: string | null;
|
|
34
48
|
forceExpanded?: boolean;
|
|
35
49
|
}
|
|
36
|
-
|
|
37
50
|
//** Convert a raw directory segment (e.g. "out_files") into a readable label ("Out Files"). */
|
|
38
51
|
function formatDirectoryLabel(name: string): string {
|
|
39
52
|
return name.replace(/[_-]/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
40
53
|
}
|
|
41
54
|
|
|
42
|
-
function TreeNode({
|
|
43
|
-
|
|
44
|
-
depth,
|
|
45
|
-
runId,
|
|
46
|
-
onPreview,
|
|
47
|
-
onDownload,
|
|
48
|
-
downloadingPath,
|
|
49
|
-
forceExpanded = false,
|
|
50
|
-
}: TreeNodeProps) {
|
|
55
|
+
function TreeNode({ node, depth, runId, onOpen, onDownload, downloadingPath, forceExpanded = false }: TreeNodeProps) {
|
|
56
|
+
const { t } = useUITranslation();
|
|
51
57
|
const [expanded, setExpanded] = useState(false);
|
|
52
58
|
const isExpanded = forceExpanded || expanded;
|
|
53
59
|
|
|
@@ -82,7 +88,7 @@ function TreeNode({
|
|
|
82
88
|
node={child}
|
|
83
89
|
depth={depth + 1}
|
|
84
90
|
runId={runId}
|
|
85
|
-
|
|
91
|
+
onOpen={onOpen}
|
|
86
92
|
onDownload={onDownload}
|
|
87
93
|
downloadingPath={downloadingPath}
|
|
88
94
|
forceExpanded={forceExpanded}
|
|
@@ -95,45 +101,33 @@ function TreeNode({
|
|
|
95
101
|
const isDownloading = downloadingPath === node.path;
|
|
96
102
|
|
|
97
103
|
return (
|
|
98
|
-
<div
|
|
99
|
-
className="group flex min-w-0 items-center gap-1.5 rounded text-sm hover:bg-muted/30"
|
|
100
|
-
style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
|
|
101
|
-
>
|
|
104
|
+
<div className="flex min-w-0 items-center gap-1">
|
|
102
105
|
<Button
|
|
103
106
|
variant="unstyled"
|
|
104
|
-
className="flex min-w-0 flex-1 items-center justify-start gap-1.5 px-1 py-1 text-start"
|
|
105
|
-
|
|
107
|
+
className="flex min-w-0 flex-1 items-center justify-start gap-1.5 rounded px-1 py-1 text-start text-sm hover:bg-muted/30"
|
|
108
|
+
style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
|
|
109
|
+
onClick={() => onOpen(node.path)}
|
|
106
110
|
title={node.path}
|
|
107
111
|
>
|
|
108
112
|
<span className="size-3.5 shrink-0" />
|
|
109
113
|
<FileIcon className="size-4 shrink-0 text-muted" />
|
|
110
114
|
<span className="min-w-0 truncate">{node.name}</span>
|
|
111
115
|
</Button>
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
disabled={isDownloading}
|
|
128
|
-
aria-label="Download artifact"
|
|
129
|
-
>
|
|
130
|
-
{isDownloading ? (
|
|
131
|
-
<Loader2Icon className="size-3.5 animate-spin text-info" />
|
|
132
|
-
) : (
|
|
133
|
-
<DownloadIcon className="size-3.5" />
|
|
134
|
-
)}
|
|
135
|
-
</Button>
|
|
136
|
-
</div>
|
|
116
|
+
<Button
|
|
117
|
+
variant="ghost"
|
|
118
|
+
size="sm"
|
|
119
|
+
className="h-7 w-7 shrink-0 p-0"
|
|
120
|
+
onClick={() => onDownload(node.path)}
|
|
121
|
+
disabled={isDownloading}
|
|
122
|
+
aria-label={t('agent.download')}
|
|
123
|
+
title={t('agent.download')}
|
|
124
|
+
>
|
|
125
|
+
{isDownloading ? (
|
|
126
|
+
<Loader2Icon className="size-3.5 animate-spin text-info" />
|
|
127
|
+
) : (
|
|
128
|
+
<DownloadIcon className="size-3.5" />
|
|
129
|
+
)}
|
|
130
|
+
</Button>
|
|
137
131
|
</div>
|
|
138
132
|
);
|
|
139
133
|
}
|
|
@@ -182,8 +176,8 @@ function downloadUrl(url: string, filename: string) {
|
|
|
182
176
|
}
|
|
183
177
|
|
|
184
178
|
function getArtifactContentType(path: string): string | undefined {
|
|
185
|
-
const
|
|
186
|
-
switch (
|
|
179
|
+
const extension = path.split('.').pop()?.toLowerCase();
|
|
180
|
+
switch (extension) {
|
|
187
181
|
case 'css':
|
|
188
182
|
return 'text/css';
|
|
189
183
|
case 'gif':
|
|
@@ -224,6 +218,128 @@ function getArtifactContentType(path: string): string | undefined {
|
|
|
224
218
|
interface ArtifactsTabProps {
|
|
225
219
|
runId?: string;
|
|
226
220
|
refreshKey?: number;
|
|
221
|
+
refreshDetails?: Record<string, unknown>;
|
|
222
|
+
selectedPath?: string | null;
|
|
223
|
+
onSelectedPathChange?: (path: string | null) => void;
|
|
224
|
+
onSendMessage?: (message: string, inputMetadata?: Record<string, unknown>) => void;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface ArtifactMarkdownEditorProps {
|
|
228
|
+
runId: string;
|
|
229
|
+
path: string;
|
|
230
|
+
onBack: () => void;
|
|
231
|
+
onDownload: (path: string) => void;
|
|
232
|
+
refreshKey?: number;
|
|
233
|
+
refreshDetails?: Record<string, unknown>;
|
|
234
|
+
onSendMessage?: (message: string, inputMetadata?: Record<string, unknown>) => void;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function ArtifactMarkdownEditor({
|
|
238
|
+
runId,
|
|
239
|
+
path,
|
|
240
|
+
onBack,
|
|
241
|
+
onDownload,
|
|
242
|
+
refreshKey,
|
|
243
|
+
refreshDetails,
|
|
244
|
+
onSendMessage,
|
|
245
|
+
}: ArtifactMarkdownEditorProps) {
|
|
246
|
+
const { t } = useUITranslation();
|
|
247
|
+
const [viewMode, setViewMode] = useState<'components' | 'document'>('components');
|
|
248
|
+
const [saveStatus, setSaveStatus] = useState<ArtifactSaveStatus>('idle');
|
|
249
|
+
|
|
250
|
+
const handleAction = (action: MarkdownEditingAction) => {
|
|
251
|
+
if (!onSendMessage) return;
|
|
252
|
+
const blockType = action.anchor.block_type.replaceAll('_', ' ');
|
|
253
|
+
const displayMessage = action.comment?.trim() || t('agent.editedSelectionMessage', { blockType });
|
|
254
|
+
onSendMessage(displayMessage, { editing_action: action });
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<div className="flex h-full min-h-0 flex-col">
|
|
259
|
+
<div className="flex shrink-0 items-center gap-1 border-b border-border/60 px-2 py-1">
|
|
260
|
+
<Button
|
|
261
|
+
variant="ghost"
|
|
262
|
+
size="sm"
|
|
263
|
+
className="size-8 shrink-0 rounded-md p-0"
|
|
264
|
+
onClick={onBack}
|
|
265
|
+
aria-label={t('agent.backToArtifacts')}
|
|
266
|
+
title={t('agent.backToArtifacts')}
|
|
267
|
+
>
|
|
268
|
+
<ArrowLeftIcon className="size-4 cn-rtl-flip" />
|
|
269
|
+
</Button>
|
|
270
|
+
<div className="flex min-w-0 flex-1 items-center gap-1.5">
|
|
271
|
+
<span className="truncate text-sm font-medium" title={path}>
|
|
272
|
+
{path.split('/').pop()}
|
|
273
|
+
</span>
|
|
274
|
+
{saveStatus === 'saving' ? (
|
|
275
|
+
<VTooltip description={t('agent.savingWorkingCopy')} asChild>
|
|
276
|
+
<Loader2Icon
|
|
277
|
+
className="size-3.5 shrink-0 animate-spin text-muted"
|
|
278
|
+
aria-label={t('agent.savingWorkingCopy')}
|
|
279
|
+
/>
|
|
280
|
+
</VTooltip>
|
|
281
|
+
) : saveStatus === 'saved' ? (
|
|
282
|
+
<VTooltip description={t('agent.savedToWorkingCopy')} asChild>
|
|
283
|
+
<CheckIcon
|
|
284
|
+
className="size-3.5 shrink-0 text-success"
|
|
285
|
+
aria-label={t('agent.savedToWorkingCopy')}
|
|
286
|
+
/>
|
|
287
|
+
</VTooltip>
|
|
288
|
+
) : null}
|
|
289
|
+
</div>
|
|
290
|
+
<div className="flex items-center gap-0.5">
|
|
291
|
+
<Button
|
|
292
|
+
variant={viewMode === 'components' ? 'primary' : 'ghost'}
|
|
293
|
+
size="sm"
|
|
294
|
+
className="size-8 shrink-0 rounded-md p-0"
|
|
295
|
+
onClick={() => setViewMode('components')}
|
|
296
|
+
aria-label={t('agent.blockMode')}
|
|
297
|
+
aria-pressed={viewMode === 'components'}
|
|
298
|
+
title={t('agent.blockMode')}
|
|
299
|
+
>
|
|
300
|
+
<Rows3Icon className="size-4" />
|
|
301
|
+
</Button>
|
|
302
|
+
<Button
|
|
303
|
+
variant={viewMode === 'document' ? 'primary' : 'ghost'}
|
|
304
|
+
size="sm"
|
|
305
|
+
className="size-8 shrink-0 rounded-md p-0"
|
|
306
|
+
onClick={() => setViewMode('document')}
|
|
307
|
+
aria-label={t('agent.editMode')}
|
|
308
|
+
aria-pressed={viewMode === 'document'}
|
|
309
|
+
title={t('agent.editMode')}
|
|
310
|
+
>
|
|
311
|
+
<PenLineIcon className="size-4" />
|
|
312
|
+
</Button>
|
|
313
|
+
</div>
|
|
314
|
+
<Button
|
|
315
|
+
variant="ghost"
|
|
316
|
+
size="sm"
|
|
317
|
+
className="size-8 shrink-0 rounded-md p-0"
|
|
318
|
+
onClick={() => onDownload(path)}
|
|
319
|
+
aria-label={t('agent.download')}
|
|
320
|
+
title={t('agent.download')}
|
|
321
|
+
>
|
|
322
|
+
<DownloadIcon className="size-4" />
|
|
323
|
+
</Button>
|
|
324
|
+
</div>
|
|
325
|
+
<ArtifactEditingSurface
|
|
326
|
+
runId={runId}
|
|
327
|
+
path={path}
|
|
328
|
+
viewMode={viewMode}
|
|
329
|
+
refreshKey={refreshKey}
|
|
330
|
+
refreshDetails={refreshDetails}
|
|
331
|
+
readOnly={!onSendMessage}
|
|
332
|
+
onAction={handleAction}
|
|
333
|
+
onSaveStatusChange={setSaveStatus}
|
|
334
|
+
onSendMessage={onSendMessage ? (message) => onSendMessage(message) : undefined}
|
|
335
|
+
className={cn(
|
|
336
|
+
'relative min-h-0 flex-1',
|
|
337
|
+
// Edit mode self-scrolls; block mode needs the surface to scroll and pad its blocks.
|
|
338
|
+
viewMode === 'document' ? 'overflow-hidden' : 'overflow-y-auto px-6 py-5',
|
|
339
|
+
)}
|
|
340
|
+
/>
|
|
341
|
+
</div>
|
|
342
|
+
);
|
|
227
343
|
}
|
|
228
344
|
|
|
229
345
|
function ArtifactEmptyState({
|
|
@@ -244,7 +360,14 @@ function ArtifactEmptyState({
|
|
|
244
360
|
);
|
|
245
361
|
}
|
|
246
362
|
|
|
247
|
-
function ArtifactsTabComponent({
|
|
363
|
+
function ArtifactsTabComponent({
|
|
364
|
+
runId,
|
|
365
|
+
refreshKey = 0,
|
|
366
|
+
refreshDetails,
|
|
367
|
+
selectedPath,
|
|
368
|
+
onSelectedPathChange,
|
|
369
|
+
onSendMessage,
|
|
370
|
+
}: ArtifactsTabProps) {
|
|
248
371
|
const { t } = useUITranslation();
|
|
249
372
|
const { client } = useUserSession();
|
|
250
373
|
const [showSystem, setShowSystem] = useState(false);
|
|
@@ -257,6 +380,15 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
257
380
|
const [downloadingPath, setDownloadingPath] = useState<string | null>(null);
|
|
258
381
|
const [previewPath, setPreviewPath] = useState<string | null>(null);
|
|
259
382
|
const [filterValue, setFilterValue] = useState('');
|
|
383
|
+
const [internalSelectedPath, setInternalSelectedPath] = useState<string | null>(null);
|
|
384
|
+
const activeSelectedPath = selectedPath === undefined ? internalSelectedPath : selectedPath;
|
|
385
|
+
const setSelectedPath = useCallback(
|
|
386
|
+
(path: string | null) => {
|
|
387
|
+
if (selectedPath === undefined) setInternalSelectedPath(path);
|
|
388
|
+
onSelectedPathChange?.(path);
|
|
389
|
+
},
|
|
390
|
+
[onSelectedPathChange, selectedPath],
|
|
391
|
+
);
|
|
260
392
|
const normalizedFilterValue = filterValue.trim();
|
|
261
393
|
const filteredTree = useMemo(() => filterArtifactTree(tree, normalizedFilterValue), [tree, normalizedFilterValue]);
|
|
262
394
|
const visibleFileCount = useMemo(() => countTreeFiles(filteredTree), [filteredTree]);
|
|
@@ -278,9 +410,16 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
278
410
|
[client, runId],
|
|
279
411
|
);
|
|
280
412
|
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
413
|
+
const handleOpen = useCallback(
|
|
414
|
+
(relativePath: string) => {
|
|
415
|
+
if (isEditableArtifact(relativePath)) {
|
|
416
|
+
setSelectedPath(relativePath);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
setPreviewPath(relativePath);
|
|
420
|
+
},
|
|
421
|
+
[setSelectedPath],
|
|
422
|
+
);
|
|
284
423
|
|
|
285
424
|
const previewSource: UniversalDocumentSource | null =
|
|
286
425
|
runId && previewPath
|
|
@@ -343,6 +482,20 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
343
482
|
);
|
|
344
483
|
}
|
|
345
484
|
|
|
485
|
+
if (activeSelectedPath) {
|
|
486
|
+
return (
|
|
487
|
+
<ArtifactMarkdownEditor
|
|
488
|
+
runId={runId}
|
|
489
|
+
path={activeSelectedPath}
|
|
490
|
+
refreshKey={refreshKey}
|
|
491
|
+
refreshDetails={refreshDetails}
|
|
492
|
+
onBack={() => setSelectedPath(null)}
|
|
493
|
+
onDownload={(path) => void handleDownload(path)}
|
|
494
|
+
onSendMessage={onSendMessage}
|
|
495
|
+
/>
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
|
|
346
499
|
return (
|
|
347
500
|
<div className="flex flex-col h-full">
|
|
348
501
|
{/* Top bar */}
|
|
@@ -394,7 +547,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
394
547
|
node={node}
|
|
395
548
|
depth={0}
|
|
396
549
|
runId={runId}
|
|
397
|
-
|
|
550
|
+
onOpen={handleOpen}
|
|
398
551
|
onDownload={handleDownload}
|
|
399
552
|
downloadingPath={downloadingPath}
|
|
400
553
|
forceExpanded={!!normalizedFilterValue}
|
|
@@ -419,11 +572,19 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
419
572
|
>
|
|
420
573
|
<ModalTitle show={false}>{previewSource.fileName}</ModalTitle>
|
|
421
574
|
<ModalBody className="h-full max-h-none p-0">
|
|
422
|
-
<
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
575
|
+
<React.Suspense
|
|
576
|
+
fallback={
|
|
577
|
+
<Center className="h-full">
|
|
578
|
+
<Loader2Icon className="size-6 animate-spin text-muted" />
|
|
579
|
+
</Center>
|
|
580
|
+
}
|
|
581
|
+
>
|
|
582
|
+
<UniversalDocumentViewer
|
|
583
|
+
source={previewSource}
|
|
584
|
+
className="h-full"
|
|
585
|
+
onDownload={() => previewPath && void handleDownload(previewPath)}
|
|
586
|
+
/>
|
|
587
|
+
</React.Suspense>
|
|
427
588
|
</ModalBody>
|
|
428
589
|
</Modal>
|
|
429
590
|
)}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/** @vitest-environment jsdom */
|
|
2
|
+
|
|
3
|
+
import { cleanup, render, screen } from '@testing-library/react';
|
|
4
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { I18nProvider } from '../../../i18n/index.js';
|
|
6
|
+
import { DocumentEditingActionCard, parseMarkdownEditingAction } from './DocumentEditingActionCard.js';
|
|
7
|
+
|
|
8
|
+
afterEach(cleanup);
|
|
9
|
+
|
|
10
|
+
const action = {
|
|
11
|
+
operation_id: 'operation-1',
|
|
12
|
+
resource: { kind: 'store_document', document_id: 'document-1', name: 'Launch plan' },
|
|
13
|
+
action: 'comment',
|
|
14
|
+
anchor: {
|
|
15
|
+
block_id: 'list_item:10:24',
|
|
16
|
+
block_type: 'list_item',
|
|
17
|
+
exact_text: '- Preserve unrelated sections.',
|
|
18
|
+
},
|
|
19
|
+
comment: 'Add one concrete example.',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('DocumentEditingActionCard', () => {
|
|
23
|
+
it('parses and renders a compact comment card', () => {
|
|
24
|
+
const parsed = parseMarkdownEditingAction(action);
|
|
25
|
+
expect(parsed).toBeDefined();
|
|
26
|
+
if (!parsed) throw new Error('Expected a valid editing action');
|
|
27
|
+
|
|
28
|
+
render(
|
|
29
|
+
<I18nProvider lng="en">
|
|
30
|
+
<DocumentEditingActionCard action={parsed} />
|
|
31
|
+
</I18nProvider>,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
expect(screen.getByText('Add one concrete example.')).not.toBeNull();
|
|
35
|
+
expect(screen.getByText('list item')).not.toBeNull();
|
|
36
|
+
expect(screen.getByText('Launch plan')).not.toBeNull();
|
|
37
|
+
expect(screen.queryByText('operation-1')).toBeNull();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('renders an applied edit as a saved notification', () => {
|
|
41
|
+
const parsed = parseMarkdownEditingAction({
|
|
42
|
+
operation_id: 'operation-2',
|
|
43
|
+
resource: { kind: 'store_document', document_id: 'document-1', name: 'Launch plan' },
|
|
44
|
+
action: 'edit',
|
|
45
|
+
anchor: {
|
|
46
|
+
block_id: 'list:10:24',
|
|
47
|
+
block_type: 'list',
|
|
48
|
+
exact_text: '- Preserve unrelated sections.',
|
|
49
|
+
},
|
|
50
|
+
user_change: {
|
|
51
|
+
before: '- Preserve unrelated sections.',
|
|
52
|
+
after: '- Preserve unrelated sections.\n- And be fun',
|
|
53
|
+
},
|
|
54
|
+
applied: true,
|
|
55
|
+
updated_document_id: 'document-2',
|
|
56
|
+
});
|
|
57
|
+
expect(parsed).toBeDefined();
|
|
58
|
+
if (!parsed) throw new Error('Expected a valid editing action');
|
|
59
|
+
expect(parsed.applied).toBe(true);
|
|
60
|
+
expect(parsed.updated_document_id).toBe('document-2');
|
|
61
|
+
|
|
62
|
+
render(
|
|
63
|
+
<I18nProvider lng="en">
|
|
64
|
+
<DocumentEditingActionCard action={parsed} />
|
|
65
|
+
</I18nProvider>,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
expect(screen.getByText('Edit applied')).not.toBeNull();
|
|
69
|
+
expect(screen.getByText('list')).not.toBeNull();
|
|
70
|
+
expect(screen.getByText('Launch plan')).not.toBeNull();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('highlights the change as an inline diff', () => {
|
|
74
|
+
const parsed = parseMarkdownEditingAction({
|
|
75
|
+
operation_id: 'operation-3',
|
|
76
|
+
resource: { kind: 'store_document', document_id: 'document-1', name: 'Launch plan' },
|
|
77
|
+
action: 'edit',
|
|
78
|
+
anchor: {
|
|
79
|
+
block_id: 'paragraph:30:40',
|
|
80
|
+
block_type: 'paragraph',
|
|
81
|
+
exact_text: 'Keep the tone light.',
|
|
82
|
+
},
|
|
83
|
+
user_change: {
|
|
84
|
+
before: 'Keep the tone light.',
|
|
85
|
+
after: 'Keep the tone light. Session edit A.',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
if (!parsed) throw new Error('Expected a valid editing action');
|
|
89
|
+
|
|
90
|
+
const { container } = render(
|
|
91
|
+
<I18nProvider lng="en">
|
|
92
|
+
<DocumentEditingActionCard action={parsed} />
|
|
93
|
+
</I18nProvider>,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const inserted = container.querySelector('ins');
|
|
97
|
+
expect(inserted?.textContent).toBe(' Session edit A.');
|
|
98
|
+
expect(container.querySelector('del')).toBeNull();
|
|
99
|
+
expect(screen.getByText('Keep the tone light.')).not.toBeNull();
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('rejects malformed editing metadata', () => {
|
|
103
|
+
expect(parseMarkdownEditingAction({ action: 'comment' })).toBeUndefined();
|
|
104
|
+
});
|
|
105
|
+
});
|