@vertesia/ui 1.5.0-dev.20260722.120446Z → 1.5.0-dev.20260804.124748Z
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/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 +2 -0
- 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/hooks/useScrollableSearch.d.ts +1 -1
- package/lib/core/hooks/useScrollableSearch.d.ts.map +1 -1
- package/lib/core/hooks/useScrollableSearch.js +15 -2
- package/lib/core/hooks/useScrollableSearch.js.map +1 -1
- package/lib/env/index.d.ts +4 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +3 -8
- 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 +48 -11
- 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/ModernAgentConversation.d.ts +27 -2
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +174 -40
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +25 -10
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.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 +118 -58
- 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 +23 -7
- 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.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -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 -25
- 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 +9 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +97 -2
- 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 +34 -10
- 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/facets/PromptsFacetsNav.d.ts +8 -6
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +8 -3
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +2 -2
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/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 +90 -16
- 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/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/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 +36 -4
- package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/features/store/objects/components/useContentPanelHooks.js +53 -29
- 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/search/DocumentSearchContext.d.ts +128 -6
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -2
- package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.d.ts +2 -2
- package/lib/features/store/objects/selection/SelectionActions.d.ts.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/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts +2 -2
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +5 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyForm.js +2 -2
- package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.d.ts +2 -2
- package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.d.ts +2 -2
- package/lib/features/store/types/SelectContentType.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentType.js.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.d.ts +2 -2
- package/lib/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.d.ts +2 -2
- package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +1267 -6
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/TypeRegistry.js +5 -0
- package/lib/features/store/types/TypeRegistry.js.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -1
- package/lib/features/store/types/intake-policy-editor.logic.js +9 -1
- package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +1251 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/store/types/typeCatalogCache.d.ts +2 -2
- package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -1
- package/lib/features/store/types/typeCatalogCache.js +4 -0
- package/lib/features/store/types/typeCatalogCache.js.map +1 -1
- package/lib/features/user/UserInfo.d.ts +118 -7
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/i18n/locales/ar.json +120 -2
- package/lib/i18n/locales/de.json +120 -2
- package/lib/i18n/locales/en.json +123 -1
- package/lib/i18n/locales/es.json +120 -2
- package/lib/i18n/locales/fr.json +120 -2
- package/lib/i18n/locales/it.json +120 -2
- package/lib/i18n/locales/ja.json +120 -2
- package/lib/i18n/locales/ko.json +120 -2
- package/lib/i18n/locales/pt.json +120 -2
- package/lib/i18n/locales/ru.json +120 -2
- package/lib/i18n/locales/tr.json +120 -2
- package/lib/i18n/locales/zh-TW.json +120 -2
- package/lib/i18n/locales/zh.json +120 -2
- 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/session/UserSession.d.ts +18 -4
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/shell/apps/AppInstallationProvider.d.ts +222 -2
- package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
- package/lib/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/vertesia-ui-core.js +3 -3
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +35 -30
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +14 -14
- 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-widgets.js +25 -7
- package/lib/vertesia-ui-widgets.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 +7 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +62 -6
- package/lib/widgets/monacoEditor/MonacoEditor.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 +36 -32
- package/src/__tests__/a11y.test.tsx +4 -1
- package/src/__tests__/axe-helper.ts +17 -7
- package/src/__tests__/setup.ts +25 -0
- package/src/core/components/shadcn/filters/filterBar.tsx +1 -0
- package/src/core/components/shadcn/modal/dialog.tsx +3 -1
- package/src/core/components/shadcn/tabs.test.tsx +65 -0
- package/src/core/components/shadcn/tabs.tsx +25 -3
- package/src/core/hooks/useScrollableSearch.test.tsx +139 -0
- package/src/core/hooks/useScrollableSearch.tsx +17 -3
- package/src/env/index.ts +2 -0
- package/src/features/agent/chat/AgentChatPlaybackControls.test.tsx +2 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +51 -6
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +5 -7
- 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 +203 -52
- package/src/features/agent/chat/DocumentEditingActionCard.test.tsx +105 -0
- package/src/features/agent/chat/DocumentEditingActionCard.tsx +210 -0
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +432 -43
- package/src/features/agent/chat/ModernAgentConversation.tsx +352 -96
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +75 -20
- 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 +369 -34
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +279 -115
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +53 -4
- 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 +2 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +71 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +3 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +48 -50
- 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 +95 -0
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +111 -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 +245 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +38 -9
- package/src/features/agent/chat/index.ts +12 -0
- package/src/features/facets/PromptsFacetsNav.tsx +17 -9
- package/src/features/store/objects/DocumentSearchResults.tsx +2 -2
- package/src/features/store/objects/components/ContentOverview.tsx +220 -66
- 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/TextEditorPanel.test.tsx +48 -0
- package/src/features/store/objects/components/TextEditorPanel.tsx +41 -20
- 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 +52 -27
- 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/selection/ObjectsActionContext.tsx +2 -2
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -2
- package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +2 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +2 -2
- package/src/features/store/types/IntakePolicyEditor.tsx +12 -4
- package/src/features/store/types/IntakePolicyForm.tsx +25 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +2 -2
- package/src/features/store/types/SelectContentType.tsx +9 -9
- package/src/features/store/types/SelectContentTypeModal.tsx +5 -5
- package/src/features/store/types/TableLayoutEditor.tsx +2 -2
- package/src/features/store/types/TypeRegistry.ts +8 -3
- package/src/features/store/types/intake-policy-editor.logic.ts +10 -2
- package/src/features/store/types/typeCatalogCache.ts +10 -3
- package/src/i18n/locales/ar.json +120 -2
- package/src/i18n/locales/de.json +120 -2
- package/src/i18n/locales/en.json +123 -1
- package/src/i18n/locales/es.json +120 -2
- package/src/i18n/locales/fr.json +120 -2
- package/src/i18n/locales/it.json +120 -2
- package/src/i18n/locales/ja.json +120 -2
- package/src/i18n/locales/ko.json +120 -2
- package/src/i18n/locales/pt.json +120 -2
- package/src/i18n/locales/ru.json +120 -2
- package/src/i18n/locales/tr.json +120 -2
- package/src/i18n/locales/zh-TW.json +120 -2
- package/src/i18n/locales/zh.json +120 -2
- 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/session/UserSession.test.ts +11 -11
- package/src/shell/login/InviteAcceptModal.tsx +4 -4
- package/src/widgets/markdown/AgentResourceResolver.test.ts +24 -0
- package/src/widgets/markdown/AgentResourceResolver.tsx +70 -0
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +541 -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 +83 -7
- package/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +26 -0
- package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +23 -18
|
@@ -124,6 +124,251 @@ describe('useAgentStream', () => {
|
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
it('retains structured update events even when their display message is empty', async () => {
|
|
128
|
+
const structuredUpdate: AgentMessage = {
|
|
129
|
+
...createMessage(AgentMessageType.UPDATE, 1_000, ''),
|
|
130
|
+
details: { event_class: 'document_updated', document_id: 'document-1' },
|
|
131
|
+
};
|
|
132
|
+
const streamMessages = vi.fn<
|
|
133
|
+
(
|
|
134
|
+
id: string,
|
|
135
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
136
|
+
since?: number,
|
|
137
|
+
signal?: AbortSignal,
|
|
138
|
+
options?: AgentRunStreamMessagesOptions,
|
|
139
|
+
) => Promise<unknown>
|
|
140
|
+
>(async (_id, _onMessage, _since, _signal, options) => {
|
|
141
|
+
options?.onHistoryLoaded?.([structuredUpdate]);
|
|
142
|
+
return null;
|
|
143
|
+
});
|
|
144
|
+
const client = createClient(streamMessages);
|
|
145
|
+
|
|
146
|
+
const { result } = renderHook(() => useAgentStream(client, 'agent-run-1'));
|
|
147
|
+
|
|
148
|
+
await waitFor(() => {
|
|
149
|
+
expect(result.current.messages).toEqual([structuredUpdate]);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it('retains resource-bearing lifecycle messages loaded from history even when their text is empty', async () => {
|
|
154
|
+
const resourceMessage: AgentMessage = {
|
|
155
|
+
...createMessage(AgentMessageType.THOUGHT, 1_000, ''),
|
|
156
|
+
details: {
|
|
157
|
+
event_class: 'activity',
|
|
158
|
+
tool: 'create_document',
|
|
159
|
+
tool_event: 'completed',
|
|
160
|
+
resources: [{ type: 'document', id: 'doc-1', label: 'Doc One', action: 'created' }],
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
const streamMessages = vi.fn<
|
|
164
|
+
(
|
|
165
|
+
id: string,
|
|
166
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
167
|
+
since?: number,
|
|
168
|
+
signal?: AbortSignal,
|
|
169
|
+
options?: AgentRunStreamMessagesOptions,
|
|
170
|
+
) => Promise<unknown>
|
|
171
|
+
>(async (_id, _onMessage, _since, _signal, options) => {
|
|
172
|
+
options?.onHistoryLoaded?.([resourceMessage]);
|
|
173
|
+
return null;
|
|
174
|
+
});
|
|
175
|
+
const client = createClient(streamMessages);
|
|
176
|
+
|
|
177
|
+
const { result } = renderHook(() => useAgentStream(client, 'agent-run-1'));
|
|
178
|
+
|
|
179
|
+
await waitFor(() => {
|
|
180
|
+
expect(result.current.messages).toEqual([resourceMessage]);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it('retains resource-bearing lifecycle messages received from the live stream', async () => {
|
|
185
|
+
let onStreamMessage: ((message: AgentMessage) => void) | undefined;
|
|
186
|
+
const streamMessages = vi.fn<
|
|
187
|
+
(
|
|
188
|
+
id: string,
|
|
189
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
190
|
+
since?: number,
|
|
191
|
+
signal?: AbortSignal,
|
|
192
|
+
) => Promise<unknown>
|
|
193
|
+
>(async (_id, onMessage) => {
|
|
194
|
+
onStreamMessage = onMessage;
|
|
195
|
+
return null;
|
|
196
|
+
});
|
|
197
|
+
const client = createClient(streamMessages);
|
|
198
|
+
const resourceMessage: AgentMessage = {
|
|
199
|
+
...createMessage(AgentMessageType.THOUGHT, 1_000, ''),
|
|
200
|
+
details: {
|
|
201
|
+
event_class: 'activity',
|
|
202
|
+
tool: 'create_interaction',
|
|
203
|
+
tool_event: 'completed',
|
|
204
|
+
resources: [{ type: 'interaction', id: 'interaction-1', label: 'Daily News Agent', action: 'created' }],
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
const { result } = renderHook(() => useAgentStream(client, 'agent-run-1'));
|
|
209
|
+
|
|
210
|
+
await waitFor(() => {
|
|
211
|
+
expect(onStreamMessage).toBeDefined();
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
act(() => {
|
|
215
|
+
onStreamMessage?.(resourceMessage);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
await waitFor(() => {
|
|
219
|
+
expect(result.current.messages).toEqual([resourceMessage]);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it('continues to discard empty housekeeping messages without resources', async () => {
|
|
224
|
+
const emptyThought = createMessage(AgentMessageType.THOUGHT, 1_000, '');
|
|
225
|
+
const streamMessages = vi.fn<
|
|
226
|
+
(
|
|
227
|
+
id: string,
|
|
228
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
229
|
+
since?: number,
|
|
230
|
+
signal?: AbortSignal,
|
|
231
|
+
options?: AgentRunStreamMessagesOptions,
|
|
232
|
+
) => Promise<unknown>
|
|
233
|
+
>(async (_id, onMessage, _since, _signal, options) => {
|
|
234
|
+
options?.onHistoryLoaded?.([emptyThought]);
|
|
235
|
+
onMessage?.(emptyThought);
|
|
236
|
+
return null;
|
|
237
|
+
});
|
|
238
|
+
const client = createClient(streamMessages);
|
|
239
|
+
|
|
240
|
+
const { result } = renderHook(() => useAgentStream(client, 'agent-run-1'));
|
|
241
|
+
|
|
242
|
+
await waitFor(() => {
|
|
243
|
+
expect(result.current.initialHistoryStatus).toBe('has_messages');
|
|
244
|
+
});
|
|
245
|
+
expect(result.current.messages).toEqual([]);
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it('forwards delivered stream messages without reconnecting when the callback changes', async () => {
|
|
249
|
+
let deliver: ((message: AgentMessage) => void) | undefined;
|
|
250
|
+
const streamMessages = vi.fn<
|
|
251
|
+
(
|
|
252
|
+
id: string,
|
|
253
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
254
|
+
since?: number,
|
|
255
|
+
signal?: AbortSignal,
|
|
256
|
+
options?: AgentRunStreamMessagesOptions,
|
|
257
|
+
) => Promise<unknown>
|
|
258
|
+
>(async (_id, onMessage, _since, _signal, options) => {
|
|
259
|
+
deliver = onMessage;
|
|
260
|
+
options?.onHistoryLoaded?.([]);
|
|
261
|
+
return null;
|
|
262
|
+
});
|
|
263
|
+
const client = createClient(streamMessages);
|
|
264
|
+
const firstCallback = vi.fn();
|
|
265
|
+
const secondCallback = vi.fn();
|
|
266
|
+
const { rerender } = renderHook(
|
|
267
|
+
({ onMessage }: { onMessage: (message: AgentMessage) => void }) =>
|
|
268
|
+
useAgentStream(client, 'agent-run-1', onMessage),
|
|
269
|
+
{ initialProps: { onMessage: firstCallback } },
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
await waitFor(() => expect(deliver).toBeDefined());
|
|
273
|
+
act(() => deliver?.(createMessage(AgentMessageType.UPDATE, 1_000, 'first update')));
|
|
274
|
+
expect(firstCallback).toHaveBeenCalledTimes(1);
|
|
275
|
+
|
|
276
|
+
rerender({ onMessage: secondCallback });
|
|
277
|
+
act(() => deliver?.(createMessage(AgentMessageType.UPDATE, 1_100, 'second update')));
|
|
278
|
+
|
|
279
|
+
expect(firstCallback).toHaveBeenCalledTimes(1);
|
|
280
|
+
expect(secondCallback).toHaveBeenCalledTimes(1);
|
|
281
|
+
expect(streamMessages).toHaveBeenCalledTimes(1);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
it('does not forward replayed history deliveries to onMessage', async () => {
|
|
285
|
+
let deliver: ((message: AgentMessage) => void) | undefined;
|
|
286
|
+
const historical = createMessage(AgentMessageType.UPDATE, 1_000, 'historical update');
|
|
287
|
+
const streamMessages = vi.fn<
|
|
288
|
+
(
|
|
289
|
+
id: string,
|
|
290
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
291
|
+
since?: number,
|
|
292
|
+
signal?: AbortSignal,
|
|
293
|
+
options?: AgentRunStreamMessagesOptions,
|
|
294
|
+
) => Promise<unknown>
|
|
295
|
+
>(async (_id, onMessage, _since, _signal, options) => {
|
|
296
|
+
deliver = onMessage;
|
|
297
|
+
options?.onHistoryLoaded?.([historical]);
|
|
298
|
+
// Mirror completed-run behavior where archived events can be replayed
|
|
299
|
+
// immediately, before React has rendered the history state update.
|
|
300
|
+
onMessage?.(historical);
|
|
301
|
+
onMessage?.(createMessage(AgentMessageType.UPDATE, 900, 'older replay'));
|
|
302
|
+
return null;
|
|
303
|
+
});
|
|
304
|
+
const client = createClient(streamMessages);
|
|
305
|
+
const onMessage = vi.fn();
|
|
306
|
+
renderHook(() => useAgentStream(client, 'agent-run-1', onMessage));
|
|
307
|
+
|
|
308
|
+
await waitFor(() => expect(deliver).toBeDefined());
|
|
309
|
+
expect(onMessage).not.toHaveBeenCalled();
|
|
310
|
+
|
|
311
|
+
act(() => deliver?.(createMessage(AgentMessageType.UPDATE, 1_100, 'live update')));
|
|
312
|
+
expect(onMessage).toHaveBeenCalledTimes(1);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
it('does not apply replayed file_processing snapshots to server file updates', async () => {
|
|
316
|
+
let deliver: ((message: AgentMessage) => void) | undefined;
|
|
317
|
+
const fileSnapshot = (timestamp: number, id: string): AgentMessage => ({
|
|
318
|
+
timestamp,
|
|
319
|
+
workflow_run_id: 'run-1',
|
|
320
|
+
type: AgentMessageType.SYSTEM,
|
|
321
|
+
message: '',
|
|
322
|
+
workstream_id: 'main',
|
|
323
|
+
details: {
|
|
324
|
+
system_type: 'file_processing',
|
|
325
|
+
batch_id: 'batch-1',
|
|
326
|
+
files: [
|
|
327
|
+
{
|
|
328
|
+
id,
|
|
329
|
+
name: `${id}.pdf`,
|
|
330
|
+
content_type: 'application/pdf',
|
|
331
|
+
size: 1,
|
|
332
|
+
status: FileProcessingStatus.READY,
|
|
333
|
+
artifact_path: `files/${id}.pdf`,
|
|
334
|
+
reference: `artifact:files/${id}.pdf`,
|
|
335
|
+
started_at: timestamp,
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
pending_count: 0,
|
|
339
|
+
ready_count: 1,
|
|
340
|
+
error_count: 0,
|
|
341
|
+
},
|
|
342
|
+
});
|
|
343
|
+
const historical = fileSnapshot(1_000, 'old-upload');
|
|
344
|
+
const streamMessages = vi.fn<
|
|
345
|
+
(
|
|
346
|
+
id: string,
|
|
347
|
+
onMessage?: (message: AgentMessage, exitFn?: (payload: unknown) => void) => void,
|
|
348
|
+
since?: number,
|
|
349
|
+
signal?: AbortSignal,
|
|
350
|
+
options?: AgentRunStreamMessagesOptions,
|
|
351
|
+
) => Promise<unknown>
|
|
352
|
+
>(async (_id, onMessage, _since, _signal, options) => {
|
|
353
|
+
deliver = onMessage;
|
|
354
|
+
options?.onHistoryLoaded?.([historical]);
|
|
355
|
+
// Completed runs replay archived file_processing snapshots through the
|
|
356
|
+
// live callback; applying them would rehydrate every historical upload
|
|
357
|
+
// as a staged composer chip on reopen.
|
|
358
|
+
onMessage?.(historical);
|
|
359
|
+
return null;
|
|
360
|
+
});
|
|
361
|
+
const client = createClient(streamMessages);
|
|
362
|
+
const { result } = renderHook(() => useAgentStream(client, 'agent-run-1', vi.fn()));
|
|
363
|
+
|
|
364
|
+
await waitFor(() => expect(deliver).toBeDefined());
|
|
365
|
+
expect(result.current.serverFileUpdates.size).toBe(0);
|
|
366
|
+
|
|
367
|
+
act(() => deliver?.(fileSnapshot(1_100, 'new-upload')));
|
|
368
|
+
expect(result.current.serverFileUpdates.size).toBe(1);
|
|
369
|
+
expect(result.current.serverFileUpdates.has('new-upload')).toBe(true);
|
|
370
|
+
});
|
|
371
|
+
|
|
127
372
|
it('marks initial history as errored when the history fetch fails', async () => {
|
|
128
373
|
const streamMessages = vi.fn<
|
|
129
374
|
(
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
AgentMessageType,
|
|
6
6
|
type ConversationFile,
|
|
7
7
|
type FileProcessingDetails,
|
|
8
|
+
getResourcesFromMessage,
|
|
8
9
|
} from '@vertesia/common';
|
|
9
10
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
10
11
|
import {
|
|
@@ -98,12 +99,16 @@ function isTimelineStateMessage(message: AgentMessage): boolean {
|
|
|
98
99
|
function shouldStoreTimelineMessage(message: AgentMessage): boolean {
|
|
99
100
|
if (message.type === AgentMessageType.STREAMING_CHUNK) return false;
|
|
100
101
|
|
|
102
|
+
// Structured resource events must survive replay even if a producer accidentally
|
|
103
|
+
// omits the human-readable display message.
|
|
104
|
+
if (message.type === AgentMessageType.UPDATE && typeof message.details?.event_class === 'string') return true;
|
|
105
|
+
|
|
101
106
|
if (message.type === AgentMessageType.SYSTEM) {
|
|
102
107
|
const details = message.details as FileProcessingDetails | undefined;
|
|
103
108
|
if (details?.system_type === 'file_processing' && details.files) return false;
|
|
104
109
|
}
|
|
105
110
|
|
|
106
|
-
return Boolean(message.message) || isTimelineStateMessage(message);
|
|
111
|
+
return Boolean(message.message) || isTimelineStateMessage(message) || getResourcesFromMessage(message).length > 0;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
function summarizeMessage(message: AgentMessage | undefined): Record<string, unknown> | undefined {
|
|
@@ -210,13 +215,19 @@ function getStreamingReplacementKeys(message: AgentMessage): string[] {
|
|
|
210
215
|
* File-processing SYSTEM messages are passed through to the messages array
|
|
211
216
|
* (Option A from the plan) so downstream hooks can react to them.
|
|
212
217
|
*/
|
|
213
|
-
export function useAgentStream(
|
|
218
|
+
export function useAgentStream(
|
|
219
|
+
client: VertesiaClient,
|
|
220
|
+
agentRunId: string,
|
|
221
|
+
onMessage?: (message: AgentMessage) => void,
|
|
222
|
+
): UseAgentStreamResult {
|
|
214
223
|
const [messages, setMessages] = useState<AgentMessage[]>([]);
|
|
215
224
|
const [isCompleted, setIsCompleted] = useState(false);
|
|
216
225
|
const [initialHistoryStatus, setInitialHistoryStatus] =
|
|
217
226
|
useState<UseAgentStreamResult['initialHistoryStatus']>('loading');
|
|
218
227
|
const [agentRunStatus, setAgentRunStatus] = useState<string | null>(null);
|
|
219
228
|
const [workflowRunId, setWorkflowRunId] = useState<string | null>(null);
|
|
229
|
+
const onMessageRef = useRef(onMessage);
|
|
230
|
+
onMessageRef.current = onMessage;
|
|
220
231
|
|
|
221
232
|
// Server-side file processing status updates
|
|
222
233
|
const [serverFileUpdates, setServerFileUpdates] = useState<Map<string, ConversationFile>>(new Map());
|
|
@@ -345,6 +356,15 @@ export function useAgentStream(client: VertesiaClient, agentRunId: string): UseA
|
|
|
345
356
|
agentRunId,
|
|
346
357
|
(message) => {
|
|
347
358
|
if (abortController.signal.aborted) return;
|
|
359
|
+
// Completed and idle runs replay their archived history through the live
|
|
360
|
+
// stream. Track replay status once, before the cursor advances below —
|
|
361
|
+
// every replay-sensitive consumer in this callback must use it.
|
|
362
|
+
const isReplay = Boolean(message.timestamp && message.timestamp <= lastDeliveredTsRef.current);
|
|
363
|
+
// Only forward genuinely new deliveries so onMessage consumers
|
|
364
|
+
// never treat replayed events as fresh ones.
|
|
365
|
+
if (!isReplay) {
|
|
366
|
+
onMessageRef.current?.(message);
|
|
367
|
+
}
|
|
348
368
|
|
|
349
369
|
debugAgentChat('stream message', {
|
|
350
370
|
agentRunId,
|
|
@@ -409,7 +429,13 @@ export function useAgentStream(client: VertesiaClient, agentRunId: string): UseA
|
|
|
409
429
|
if (message.type === AgentMessageType.SYSTEM) {
|
|
410
430
|
const details = message.details as FileProcessingDetails | undefined;
|
|
411
431
|
if (details?.system_type === 'file_processing' && details.files) {
|
|
412
|
-
|
|
432
|
+
// Replayed snapshots list every file ever uploaded to the run as
|
|
433
|
+
// READY; applying them on reconnect would rehydrate historical
|
|
434
|
+
// uploads as staged composer chips. Only genuinely new updates
|
|
435
|
+
// may touch the file state.
|
|
436
|
+
if (!isReplay) {
|
|
437
|
+
setServerFileUpdates(new Map(details.files.map((file) => [file.id, file])));
|
|
438
|
+
}
|
|
413
439
|
return;
|
|
414
440
|
}
|
|
415
441
|
// Other SYSTEM messages fall through to normal handling
|
|
@@ -450,6 +476,14 @@ export function useAgentStream(client: VertesiaClient, agentRunId: string): UseA
|
|
|
450
476
|
onHistoryLoaded: (historical) => {
|
|
451
477
|
if (abortController.signal.aborted) return;
|
|
452
478
|
const timelineMessages = historical.filter(shouldStoreTimelineMessage);
|
|
479
|
+
// Advance the watermark synchronously before React processes the
|
|
480
|
+
// history state update. Some completed streams replay history via
|
|
481
|
+
// the live callback immediately after onHistoryLoaded returns.
|
|
482
|
+
for (const message of historical) {
|
|
483
|
+
if (message.timestamp && message.timestamp > lastDeliveredTsRef.current) {
|
|
484
|
+
lastDeliveredTsRef.current = message.timestamp;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
453
487
|
debugAgentChat('history loaded', {
|
|
454
488
|
agentRunId,
|
|
455
489
|
count: historical.length,
|
|
@@ -461,12 +495,7 @@ export function useAgentStream(client: VertesiaClient, agentRunId: string): UseA
|
|
|
461
495
|
setInitialHistoryStatus(historical.length > 0 ? 'has_messages' : 'empty');
|
|
462
496
|
if (timelineMessages.length > 0) {
|
|
463
497
|
setMessages((prev) =>
|
|
464
|
-
timelineMessages.reduce((next, message) =>
|
|
465
|
-
if (message.timestamp && message.timestamp > lastDeliveredTsRef.current) {
|
|
466
|
-
lastDeliveredTsRef.current = message.timestamp;
|
|
467
|
-
}
|
|
468
|
-
return insertTimelineMessage(next, message);
|
|
469
|
-
}, prev),
|
|
498
|
+
timelineMessages.reduce((next, message) => insertTimelineMessage(next, message), prev),
|
|
470
499
|
);
|
|
471
500
|
}
|
|
472
501
|
},
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
// Resource deep-link resolver — lets an embedding app override how agent resource references
|
|
2
|
+
// (documents, collections, interactions, ...) map to routes/links in the chat.
|
|
3
|
+
export {
|
|
4
|
+
type AgentResourceLinkReference,
|
|
5
|
+
type AgentResourceResolver,
|
|
6
|
+
AgentResourceResolverProvider,
|
|
7
|
+
type AgentResourceTarget,
|
|
8
|
+
type ResourceResolveContext,
|
|
9
|
+
useAgentResourceResolver,
|
|
10
|
+
} from '@vertesia/ui/widgets';
|
|
1
11
|
export {
|
|
2
12
|
AgentApprovalModeSelector,
|
|
3
13
|
type AgentApprovalModeSelectorProps,
|
|
@@ -29,8 +39,10 @@ export {
|
|
|
29
39
|
} from './AskUserWidget';
|
|
30
40
|
export * from './JumpingDots';
|
|
31
41
|
export {
|
|
42
|
+
type AgentMessageFilter,
|
|
32
43
|
ModernAgentConversation,
|
|
33
44
|
type ModernAgentConversationProps,
|
|
45
|
+
type SendAgentMessageFn,
|
|
34
46
|
type StartWorkflowFn,
|
|
35
47
|
type StartWorkflowOptions,
|
|
36
48
|
} from './ModernAgentConversation';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FacetBucket } from '@vertesia/common';
|
|
1
|
+
import type { ComputedFacetResponse, FacetBucket } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -11,11 +11,13 @@ import { useState } from 'react';
|
|
|
11
11
|
import { filterValueToQueryValue, type SearchInterface, setSearchQueryValue } from './utils/SearchInterface';
|
|
12
12
|
|
|
13
13
|
interface PromptsFacetsNavProps {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The facet response as the endpoint publishes it: `total` plus one entry per facet the caller
|
|
16
|
+
* asked for. The names are chosen per request, so the buckets are narrowed below rather than
|
|
17
|
+
* declared here — the previous `{ role, status, tags }` shape named facets this component never
|
|
18
|
+
* requests and could not describe a caller that asks for a different one.
|
|
19
|
+
*/
|
|
20
|
+
facets: ComputedFacetResponse;
|
|
19
21
|
search: SearchInterface;
|
|
20
22
|
/**
|
|
21
23
|
* Optional controlled filter state. When provided, the parent owns the filter list (and is
|
|
@@ -28,8 +30,14 @@ interface PromptsFacetsNavProps {
|
|
|
28
30
|
filterGroups?: FilterGroup[];
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
function facetBuckets(facets: ComputedFacetResponse, name: string): FacetBucket[] {
|
|
34
|
+
const value = facets[name];
|
|
35
|
+
return Array.isArray(value) ? (value as FacetBucket[]) : [];
|
|
36
|
+
}
|
|
37
|
+
|
|
31
38
|
// Hook to create filter groups for prompts
|
|
32
39
|
export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']): FilterGroup[] {
|
|
40
|
+
const roleBuckets = facetBuckets(facets, 'role');
|
|
33
41
|
const customFilterGroups: FilterGroup[] = [];
|
|
34
42
|
|
|
35
43
|
// Add name filter as text type
|
|
@@ -42,12 +50,12 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
|
|
|
42
50
|
customFilterGroups.push(nameFilterGroup);
|
|
43
51
|
|
|
44
52
|
// Add role filter as select type if role facets are available
|
|
45
|
-
if (
|
|
53
|
+
if (roleBuckets.length > 0) {
|
|
46
54
|
const rolesFilterGroup = {
|
|
47
55
|
name: 'role',
|
|
48
56
|
placeholder: 'Role',
|
|
49
57
|
type: 'select' as const,
|
|
50
|
-
options:
|
|
58
|
+
options: roleBuckets.map((facet) => ({
|
|
51
59
|
label: facet._id,
|
|
52
60
|
value: facet._id,
|
|
53
61
|
count: facet.count,
|
|
@@ -62,7 +70,7 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
|
|
|
62
70
|
placeholder: 'Tags',
|
|
63
71
|
type: 'stringList' as const,
|
|
64
72
|
multiple: true,
|
|
65
|
-
options: (facets
|
|
73
|
+
options: facetBuckets(facets, 'tags').map((facet) => ({
|
|
66
74
|
label: facet._id,
|
|
67
75
|
value: facet._id,
|
|
68
76
|
})),
|
|
@@ -23,7 +23,7 @@ import type { TypeRegistry } from '../types/TypeRegistry.js';
|
|
|
23
23
|
import { useTypeRegistry } from '../types/TypeRegistryProvider.js';
|
|
24
24
|
import { ContentDispositionButton } from './components/ContentDispositionButton';
|
|
25
25
|
import { ContentOverview } from './components/ContentOverview';
|
|
26
|
-
import { useDownloadFile } from './components/useDownloadFile';
|
|
26
|
+
import { getContentObjectDownloadName, useDownloadFile } from './components/useDownloadFile';
|
|
27
27
|
import { VectorSearchWidget } from './components/VectorSearchWidget';
|
|
28
28
|
import { DocumentQuickFilterProvider } from './DocumentQuickFilter';
|
|
29
29
|
import { DocumentTable } from './DocumentTable';
|
|
@@ -483,7 +483,7 @@ function OverviewDrawer({ object, onClose }: OverviewDrawerProps) {
|
|
|
483
483
|
variant="ghost"
|
|
484
484
|
size="sm"
|
|
485
485
|
title="Download"
|
|
486
|
-
onClick={() => downloadFromContentSource(contentSource, object
|
|
486
|
+
onClick={() => downloadFromContentSource(contentSource, getContentObjectDownloadName(object))}
|
|
487
487
|
>
|
|
488
488
|
<Download className="size-4" />
|
|
489
489
|
</Button>
|