@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
|
@@ -60,6 +60,7 @@ vi.mock('./ModernAgentOutput/MessageInput', () => ({
|
|
|
60
60
|
onSend: (message: string) => void;
|
|
61
61
|
activeTaskCount?: number;
|
|
62
62
|
activeWorkstreams?: Array<{ workstream_id: string; status: string }>;
|
|
63
|
+
onSelectWorkstream?: (workstreamId: string) => void;
|
|
63
64
|
isCompleted?: boolean;
|
|
64
65
|
isStreaming?: boolean;
|
|
65
66
|
placeholder?: string;
|
|
@@ -85,53 +86,82 @@ vi.mock('./ModernAgentOutput/MessageInput', () => ({
|
|
|
85
86
|
},
|
|
86
87
|
}));
|
|
87
88
|
|
|
88
|
-
vi.mock('./ModernAgentOutput/AllMessagesMixed', () =>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
isCompleted,
|
|
93
|
-
bottomRef,
|
|
94
|
-
onSendMessage,
|
|
95
|
-
showInitialRequest,
|
|
96
|
-
renderRequestInputControls,
|
|
97
|
-
activeWorkstream,
|
|
98
|
-
onActiveWorkstreamChange,
|
|
99
|
-
}: {
|
|
100
|
-
messages: AgentMessage[];
|
|
101
|
-
streamingMessages: Map<string, unknown>;
|
|
102
|
-
isCompleted?: boolean;
|
|
103
|
-
bottomRef: React.RefObject<HTMLDivElement>;
|
|
104
|
-
onSendMessage?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
105
|
-
showInitialRequest?: boolean;
|
|
106
|
-
renderRequestInputControls?: boolean;
|
|
107
|
-
activeWorkstream?: string;
|
|
108
|
-
onActiveWorkstreamChange?: (workstreamId: string) => void;
|
|
109
|
-
}) => {
|
|
110
|
-
mocks.allMessagesMixedProps({
|
|
89
|
+
vi.mock('./ModernAgentOutput/AllMessagesMixed', async () => {
|
|
90
|
+
const { useAgentResourceResolver } = await import('@vertesia/ui/widgets');
|
|
91
|
+
return {
|
|
92
|
+
default: ({
|
|
111
93
|
messages,
|
|
94
|
+
workstreamSourceMessages,
|
|
112
95
|
streamingMessages,
|
|
113
96
|
isCompleted,
|
|
97
|
+
bottomRef,
|
|
114
98
|
onSendMessage,
|
|
99
|
+
onOpenArtifact,
|
|
115
100
|
showInitialRequest,
|
|
116
101
|
renderRequestInputControls,
|
|
117
102
|
activeWorkstream,
|
|
118
103
|
onActiveWorkstreamChange,
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})
|
|
104
|
+
}: {
|
|
105
|
+
messages: AgentMessage[];
|
|
106
|
+
workstreamSourceMessages?: AgentMessage[];
|
|
107
|
+
streamingMessages: Map<string, unknown>;
|
|
108
|
+
isCompleted?: boolean;
|
|
109
|
+
bottomRef: React.RefObject<HTMLDivElement>;
|
|
110
|
+
onSendMessage?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
111
|
+
onOpenArtifact?: (path: string) => void;
|
|
112
|
+
showInitialRequest?: boolean;
|
|
113
|
+
renderRequestInputControls?: boolean;
|
|
114
|
+
activeWorkstream?: string;
|
|
115
|
+
onActiveWorkstreamChange?: (workstreamId: string) => void;
|
|
116
|
+
}) => {
|
|
117
|
+
const resolveResource = useAgentResourceResolver();
|
|
118
|
+
const resourceTarget = resolveResource(
|
|
119
|
+
{ type: 'document', id: 'document-1' },
|
|
120
|
+
{ source: 'structured', workflowRunId: 'agent-run-1' },
|
|
121
|
+
);
|
|
122
|
+
mocks.allMessagesMixedProps({
|
|
123
|
+
messages,
|
|
124
|
+
workstreamSourceMessages,
|
|
125
|
+
streamingMessages,
|
|
126
|
+
isCompleted,
|
|
127
|
+
onSendMessage,
|
|
128
|
+
onOpenArtifact,
|
|
129
|
+
showInitialRequest,
|
|
130
|
+
renderRequestInputControls,
|
|
131
|
+
activeWorkstream,
|
|
132
|
+
onActiveWorkstreamChange,
|
|
133
|
+
});
|
|
134
|
+
return (
|
|
135
|
+
<div>
|
|
136
|
+
<div data-testid="rendered-message-count">{messages.length}</div>
|
|
137
|
+
<div data-testid="rendered-streaming-count">{streamingMessages.size}</div>
|
|
138
|
+
<div data-testid="resource-target">
|
|
139
|
+
{resourceTarget.kind === 'navigate' ? resourceTarget.href : resourceTarget.kind}
|
|
140
|
+
</div>
|
|
141
|
+
<button type="button" disabled={!onSendMessage} onClick={() => onSendMessage?.('follow up')}>
|
|
142
|
+
inline send
|
|
143
|
+
</button>
|
|
144
|
+
<button
|
|
145
|
+
type="button"
|
|
146
|
+
disabled={!onOpenArtifact}
|
|
147
|
+
onClick={() => onOpenArtifact?.('files/report.md')}
|
|
148
|
+
>
|
|
149
|
+
open artifact
|
|
150
|
+
</button>
|
|
151
|
+
<div ref={bottomRef} data-testid="bottom-sentinel" />
|
|
152
|
+
</div>
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
});
|
|
132
157
|
|
|
133
158
|
vi.mock('./AgentRightPanel.js', () => ({
|
|
134
|
-
AgentRightPanel: (props: {
|
|
159
|
+
AgentRightPanel: (props: {
|
|
160
|
+
activeWorkstreams?: Array<{ workstream_id: string; status: string }>;
|
|
161
|
+
onSendMessage?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
162
|
+
selectedArtifactPath?: string | null;
|
|
163
|
+
activeTab?: string;
|
|
164
|
+
}) => {
|
|
135
165
|
mocks.rightPanelProps(props);
|
|
136
166
|
return <div data-testid="agent-right-panel" />;
|
|
137
167
|
},
|
|
@@ -204,6 +234,7 @@ function latestAllMessagesMixedProps() {
|
|
|
204
234
|
return calls[calls.length - 1]?.[0] as
|
|
205
235
|
| {
|
|
206
236
|
messages: AgentMessage[];
|
|
237
|
+
workstreamSourceMessages?: AgentMessage[];
|
|
207
238
|
streamingMessages: Map<string, unknown>;
|
|
208
239
|
isCompleted?: boolean;
|
|
209
240
|
showInitialRequest?: boolean;
|
|
@@ -213,9 +244,21 @@ function latestAllMessagesMixedProps() {
|
|
|
213
244
|
| undefined;
|
|
214
245
|
}
|
|
215
246
|
|
|
247
|
+
function latestRightPanelProps() {
|
|
248
|
+
const calls = mocks.rightPanelProps.mock.calls;
|
|
249
|
+
return calls[calls.length - 1]?.[0] as
|
|
250
|
+
| {
|
|
251
|
+
onSendMessage?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
252
|
+
selectedArtifactPath?: string | null;
|
|
253
|
+
activeTab?: string;
|
|
254
|
+
}
|
|
255
|
+
| undefined;
|
|
256
|
+
}
|
|
257
|
+
|
|
216
258
|
describe('ModernAgentConversation send handling', () => {
|
|
217
259
|
beforeEach(() => {
|
|
218
260
|
vi.clearAllMocks();
|
|
261
|
+
window.sessionStorage.clear();
|
|
219
262
|
mocks.restart.mockResolvedValue({ id: 'agent-run-1' });
|
|
220
263
|
mocks.sendSignal.mockResolvedValue({});
|
|
221
264
|
mocks.getActiveWorkstreams.mockResolvedValue({ running: [] });
|
|
@@ -253,6 +296,63 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
253
296
|
vi.restoreAllMocks();
|
|
254
297
|
});
|
|
255
298
|
|
|
299
|
+
it('reports when the main agent turn starts and returns to idle', async () => {
|
|
300
|
+
const onAgentWorkingChange = vi.fn();
|
|
301
|
+
mockStreamState({
|
|
302
|
+
messages: [createMessage(AgentMessageType.QUESTION, 'make an edit')],
|
|
303
|
+
isCompleted: false,
|
|
304
|
+
agentRunStatus: 'RUNNING',
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
const view = renderConversation({ onAgentWorkingChange });
|
|
308
|
+
|
|
309
|
+
await waitFor(() => expect(onAgentWorkingChange).toHaveBeenLastCalledWith(true));
|
|
310
|
+
|
|
311
|
+
mockStreamState({
|
|
312
|
+
messages: [
|
|
313
|
+
createMessage(AgentMessageType.QUESTION, 'make an edit'),
|
|
314
|
+
createMessage(AgentMessageType.IDLE, 'Waiting for your command...'),
|
|
315
|
+
],
|
|
316
|
+
isCompleted: true,
|
|
317
|
+
agentRunStatus: 'RUNNING',
|
|
318
|
+
});
|
|
319
|
+
view.rerender(
|
|
320
|
+
<ModernAgentConversation
|
|
321
|
+
agentRunId="agent-run-1"
|
|
322
|
+
title="Agent"
|
|
323
|
+
hideHeader
|
|
324
|
+
hideMessageInput
|
|
325
|
+
showRightPanel={false}
|
|
326
|
+
onAgentWorkingChange={onAgentWorkingChange}
|
|
327
|
+
/>,
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
await waitFor(() => expect(onAgentWorkingChange).toHaveBeenLastCalledWith(false));
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it('reports a failed workflow as idle even when its final stream message is an error', async () => {
|
|
334
|
+
const onAgentWorkingChange = vi.fn();
|
|
335
|
+
mockStreamState({
|
|
336
|
+
messages: [createMessage(AgentMessageType.ERROR, 'Agent failed')],
|
|
337
|
+
isCompleted: false,
|
|
338
|
+
agentRunStatus: 'FAILED',
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
renderConversation({ onAgentWorkingChange });
|
|
342
|
+
|
|
343
|
+
await waitFor(() => expect(onAgentWorkingChange).toHaveBeenLastCalledWith(false));
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
it('provides its resourceResolver prop to conversation content', () => {
|
|
347
|
+
mockStreamState({ messages: [createMessage(AgentMessageType.COMPLETE, 'done')] });
|
|
348
|
+
|
|
349
|
+
renderConversation({
|
|
350
|
+
resourceResolver: (resource) => ({ kind: 'navigate', href: `/host/documents/${resource.id}` }),
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
expect(screen.getByTestId('resource-target').textContent).toBe('/host/documents/document-1');
|
|
354
|
+
});
|
|
355
|
+
|
|
256
356
|
it('restarts a terminal continuable run before sending the follow-up message', async () => {
|
|
257
357
|
mockStreamState({
|
|
258
358
|
messages: [createMessage(AgentMessageType.COMPLETE, 'done')],
|
|
@@ -286,6 +386,62 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
286
386
|
expect(mocks.updateOptimisticMessageStatus).toHaveBeenCalledWith(expect.any(String), 'received');
|
|
287
387
|
});
|
|
288
388
|
|
|
389
|
+
it('opens a Markdown artifact in the side panel and allows collaboration for an active run', async () => {
|
|
390
|
+
mocks.useAgentPlans.mockReturnValue({
|
|
391
|
+
plans: [],
|
|
392
|
+
activePlanIndex: 0,
|
|
393
|
+
setActivePlanIndex: vi.fn(),
|
|
394
|
+
workstreamStatusMap: new Map(),
|
|
395
|
+
showInput: true,
|
|
396
|
+
showSlidingPanel: true,
|
|
397
|
+
setShowSlidingPanel: vi.fn(),
|
|
398
|
+
});
|
|
399
|
+
mockStreamState({
|
|
400
|
+
messages: [createMessage(AgentMessageType.IDLE, 'Waiting for your command...')],
|
|
401
|
+
isCompleted: true,
|
|
402
|
+
agentRunStatus: 'RUNNING',
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
renderConversation({ showRightPanel: true, showArtifacts: true, interactive: true });
|
|
406
|
+
|
|
407
|
+
fireEvent.click(screen.getByRole('button', { name: 'open artifact' }));
|
|
408
|
+
|
|
409
|
+
await waitFor(() => {
|
|
410
|
+
expect(latestRightPanelProps()).toEqual(
|
|
411
|
+
expect.objectContaining({
|
|
412
|
+
activeTab: 'artifacts',
|
|
413
|
+
selectedArtifactPath: 'files/report.md',
|
|
414
|
+
onSendMessage: expect.any(Function),
|
|
415
|
+
}),
|
|
416
|
+
);
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
it('keeps artifacts read-only when their originating run is completed', () => {
|
|
421
|
+
mocks.useAgentPlans.mockReturnValue({
|
|
422
|
+
plans: [],
|
|
423
|
+
activePlanIndex: 0,
|
|
424
|
+
setActivePlanIndex: vi.fn(),
|
|
425
|
+
workstreamStatusMap: new Map(),
|
|
426
|
+
showInput: true,
|
|
427
|
+
showSlidingPanel: true,
|
|
428
|
+
setShowSlidingPanel: vi.fn(),
|
|
429
|
+
});
|
|
430
|
+
mockStreamState({
|
|
431
|
+
messages: [createMessage(AgentMessageType.COMPLETE, 'done')],
|
|
432
|
+
agentRunStatus: 'COMPLETED',
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
renderConversation({
|
|
436
|
+
showRightPanel: true,
|
|
437
|
+
showArtifacts: true,
|
|
438
|
+
interactive: true,
|
|
439
|
+
onRestart: vi.fn(),
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
expect(latestRightPanelProps()?.onSendMessage).toBeUndefined();
|
|
443
|
+
});
|
|
444
|
+
|
|
289
445
|
it('binds ready uploaded files into the sent message and clears them after send', async () => {
|
|
290
446
|
const clearProcessingFiles = vi.fn();
|
|
291
447
|
const readyFile: ConversationFile = {
|
|
@@ -325,9 +481,8 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
325
481
|
});
|
|
326
482
|
|
|
327
483
|
const userInputCall = mocks.sendSignal.mock.calls.find((call) => call[1] === 'UserInput');
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
);
|
|
484
|
+
const userInputPayload = userInputCall?.[2] as { message: string } | undefined;
|
|
485
|
+
expect(userInputPayload?.message).toContain('[report.pdf](artifact:files/report.pdf)');
|
|
331
486
|
await waitFor(() => {
|
|
332
487
|
expect(clearProcessingFiles).toHaveBeenCalledTimes(1);
|
|
333
488
|
});
|
|
@@ -412,6 +567,37 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
412
567
|
});
|
|
413
568
|
});
|
|
414
569
|
|
|
570
|
+
it('collapses staged files in the start composer', () => {
|
|
571
|
+
const { container } = renderWithProviders(
|
|
572
|
+
<ModernAgentConversation startWorkflow={vi.fn()} hideHeader initialMessage="" />,
|
|
573
|
+
);
|
|
574
|
+
const input = container.querySelector('input[type="file"]');
|
|
575
|
+
const files = ['alpha.txt', 'beta.txt', 'gamma.txt', 'delta.txt', 'epsilon.txt'].map(
|
|
576
|
+
(name) => new File([name], name, { type: 'text/plain' }),
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
if (!input) {
|
|
580
|
+
throw new Error('Expected hidden file input to be rendered');
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
fireEvent.change(input, {
|
|
584
|
+
target: {
|
|
585
|
+
files,
|
|
586
|
+
},
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
expect(screen.getByText('alpha.txt')).not.toBeNull();
|
|
590
|
+
expect(screen.getByText('gamma.txt')).not.toBeNull();
|
|
591
|
+
expect(screen.queryByText('delta.txt')).toBeNull();
|
|
592
|
+
expect(screen.getByText('+2')).not.toBeNull();
|
|
593
|
+
|
|
594
|
+
fireEvent.click(screen.getByRole('button', { name: /show more/i }));
|
|
595
|
+
|
|
596
|
+
expect(screen.getByText('delta.txt')).not.toBeNull();
|
|
597
|
+
expect(screen.getByText('epsilon.txt')).not.toBeNull();
|
|
598
|
+
expect(screen.getByRole('button', { name: /show less/i })).not.toBeNull();
|
|
599
|
+
});
|
|
600
|
+
|
|
415
601
|
it('signals approval mode changes for an active interactive run', async () => {
|
|
416
602
|
mocks.retrieve.mockResolvedValue({
|
|
417
603
|
tool_approval_mode: 'ask',
|
|
@@ -767,11 +953,13 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
767
953
|
onCompactContext?: () => void | Promise<void>;
|
|
768
954
|
};
|
|
769
955
|
|
|
956
|
+
// Prompt-based, matching the server's checkpoint trigger: `total`
|
|
957
|
+
// includes reasoning/result tokens that never re-enter context.
|
|
770
958
|
expect(latestMessageInputProps.contextWindowUsage).toEqual({
|
|
771
|
-
usedTokens:
|
|
959
|
+
usedTokens: 40_000,
|
|
772
960
|
checkpointTokens: 100_000,
|
|
773
|
-
usedPercent:
|
|
774
|
-
remainingPercent:
|
|
961
|
+
usedPercent: 40,
|
|
962
|
+
remainingPercent: 60,
|
|
775
963
|
});
|
|
776
964
|
|
|
777
965
|
act(() => {
|
|
@@ -910,6 +1098,7 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
910
1098
|
const latestMessageInputProps = mocks.messageInputProps.mock.lastCall?.[0] as {
|
|
911
1099
|
activeTaskCount?: number;
|
|
912
1100
|
activeWorkstreams?: Array<{ workstream_id: string; status: string }>;
|
|
1101
|
+
onSelectWorkstream?: (workstreamId: string) => void;
|
|
913
1102
|
};
|
|
914
1103
|
|
|
915
1104
|
expect(latestRightPanelProps.activeWorkstreams).toEqual([
|
|
@@ -923,6 +1112,12 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
923
1112
|
expect.objectContaining({ workstream_id: 'alpha', status: 'running' }),
|
|
924
1113
|
expect.objectContaining({ workstream_id: 'beta', status: 'running' }),
|
|
925
1114
|
]);
|
|
1115
|
+
|
|
1116
|
+
act(() => {
|
|
1117
|
+
latestMessageInputProps.onSelectWorkstream?.('beta');
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
expect(latestAllMessagesMixedProps()?.activeWorkstream).toBe('beta');
|
|
926
1121
|
});
|
|
927
1122
|
|
|
928
1123
|
it('shows completed workstream lifecycle messages in the panel without counting them as active', async () => {
|
|
@@ -1339,6 +1534,128 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
1339
1534
|
);
|
|
1340
1535
|
});
|
|
1341
1536
|
|
|
1537
|
+
it('does not resurrect an answered request overlay after remounting before the persisted echo arrives', async () => {
|
|
1538
|
+
const requestMessage = {
|
|
1539
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'What is your favorite color?'),
|
|
1540
|
+
details: {
|
|
1541
|
+
request_id: 'ask-user-1',
|
|
1542
|
+
ux: {
|
|
1543
|
+
options: [
|
|
1544
|
+
{ id: 'red', label: 'Red' },
|
|
1545
|
+
{ id: 'blue', label: 'Blue' },
|
|
1546
|
+
],
|
|
1547
|
+
},
|
|
1548
|
+
},
|
|
1549
|
+
};
|
|
1550
|
+
mockStreamState({
|
|
1551
|
+
messages: [requestMessage],
|
|
1552
|
+
isCompleted: false,
|
|
1553
|
+
agentRunStatus: 'RUNNING',
|
|
1554
|
+
});
|
|
1555
|
+
|
|
1556
|
+
const firstView = renderConversation();
|
|
1557
|
+
fireEvent.click(screen.getByRole('button', { name: /Blue/ }));
|
|
1558
|
+
|
|
1559
|
+
await waitFor(() => expect(mocks.sendSignal).toHaveBeenCalledTimes(1));
|
|
1560
|
+
expect(mocks.sendSignal).toHaveBeenCalledWith(
|
|
1561
|
+
'agent-run-1',
|
|
1562
|
+
'UserInput',
|
|
1563
|
+
expect.objectContaining({
|
|
1564
|
+
metadata: expect.objectContaining({
|
|
1565
|
+
request_input_response: { request_id: 'ask-user-1' },
|
|
1566
|
+
}),
|
|
1567
|
+
}),
|
|
1568
|
+
);
|
|
1569
|
+
|
|
1570
|
+
firstView.unmount();
|
|
1571
|
+
renderConversation();
|
|
1572
|
+
|
|
1573
|
+
expect(screen.queryByText('What is your favorite color?')).toBeNull();
|
|
1574
|
+
expect(screen.queryByRole('button', { name: /Blue/ })).toBeNull();
|
|
1575
|
+
});
|
|
1576
|
+
|
|
1577
|
+
it('restores a request overlay after its response fails to send', async () => {
|
|
1578
|
+
mocks.sendSignal.mockRejectedValueOnce(new Error('offline'));
|
|
1579
|
+
const requestMessage = {
|
|
1580
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'What is your favorite color?'),
|
|
1581
|
+
details: {
|
|
1582
|
+
request_id: 'ask-user-1',
|
|
1583
|
+
ux: {
|
|
1584
|
+
options: [
|
|
1585
|
+
{ id: 'red', label: 'Red' },
|
|
1586
|
+
{ id: 'blue', label: 'Blue' },
|
|
1587
|
+
],
|
|
1588
|
+
},
|
|
1589
|
+
},
|
|
1590
|
+
};
|
|
1591
|
+
mockStreamState({
|
|
1592
|
+
messages: [requestMessage],
|
|
1593
|
+
isCompleted: false,
|
|
1594
|
+
agentRunStatus: 'RUNNING',
|
|
1595
|
+
});
|
|
1596
|
+
|
|
1597
|
+
const firstView = renderConversation();
|
|
1598
|
+
fireEvent.click(screen.getByRole('button', { name: /Blue/ }));
|
|
1599
|
+
|
|
1600
|
+
await waitFor(() => {
|
|
1601
|
+
expect(mocks.updateOptimisticMessageStatus).toHaveBeenCalledWith(expect.any(String), 'failed');
|
|
1602
|
+
});
|
|
1603
|
+
|
|
1604
|
+
firstView.unmount();
|
|
1605
|
+
renderConversation();
|
|
1606
|
+
|
|
1607
|
+
expect(screen.getByText('What is your favorite color?')).not.toBeNull();
|
|
1608
|
+
expect(screen.getByRole('button', { name: /Blue/ })).not.toBeNull();
|
|
1609
|
+
});
|
|
1610
|
+
|
|
1611
|
+
it('hides a stale request overlay when a terminal run cannot continue', () => {
|
|
1612
|
+
mockStreamState({
|
|
1613
|
+
messages: [
|
|
1614
|
+
{
|
|
1615
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'What is your favorite color?'),
|
|
1616
|
+
details: {
|
|
1617
|
+
ux: {
|
|
1618
|
+
options: [
|
|
1619
|
+
{ id: 'red', label: 'Red' },
|
|
1620
|
+
{ id: 'blue', label: 'Blue' },
|
|
1621
|
+
],
|
|
1622
|
+
},
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
],
|
|
1626
|
+
agentRunStatus: 'COMPLETED',
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
renderConversation();
|
|
1630
|
+
|
|
1631
|
+
expect(screen.queryByText('What is your favorite color?')).toBeNull();
|
|
1632
|
+
expect(screen.queryByRole('button', { name: /Blue/ })).toBeNull();
|
|
1633
|
+
});
|
|
1634
|
+
|
|
1635
|
+
it('keeps a pending request overlay when a terminal run can restart', () => {
|
|
1636
|
+
mockStreamState({
|
|
1637
|
+
messages: [
|
|
1638
|
+
{
|
|
1639
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'What is your favorite color?'),
|
|
1640
|
+
details: {
|
|
1641
|
+
ux: {
|
|
1642
|
+
options: [
|
|
1643
|
+
{ id: 'red', label: 'Red' },
|
|
1644
|
+
{ id: 'blue', label: 'Blue' },
|
|
1645
|
+
],
|
|
1646
|
+
},
|
|
1647
|
+
},
|
|
1648
|
+
},
|
|
1649
|
+
],
|
|
1650
|
+
agentRunStatus: 'COMPLETED',
|
|
1651
|
+
});
|
|
1652
|
+
|
|
1653
|
+
renderConversation({ onRestart: vi.fn() });
|
|
1654
|
+
|
|
1655
|
+
expect(screen.getByText('What is your favorite color?')).not.toBeNull();
|
|
1656
|
+
expect(screen.getByRole('button', { name: /Blue/ })).not.toBeNull();
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1342
1659
|
it('passes commented approval denial metadata through the request overlay signal', async () => {
|
|
1343
1660
|
mockStreamState({
|
|
1344
1661
|
messages: [
|
|
@@ -2016,6 +2333,78 @@ describe('ModernAgentConversation send handling', () => {
|
|
|
2016
2333
|
);
|
|
2017
2334
|
});
|
|
2018
2335
|
|
|
2336
|
+
it('hides the debug button when the playback toggle is disabled', () => {
|
|
2337
|
+
mockStreamState({
|
|
2338
|
+
messages: [
|
|
2339
|
+
createMessage(AgentMessageType.QUESTION, 'first question'),
|
|
2340
|
+
createMessage(AgentMessageType.ANSWER, 'first answer'),
|
|
2341
|
+
],
|
|
2342
|
+
});
|
|
2343
|
+
|
|
2344
|
+
renderConversation({ hideHeader: false, showPlaybackToggle: false });
|
|
2345
|
+
|
|
2346
|
+
expect(mocks.headerProps).toHaveBeenLastCalledWith(
|
|
2347
|
+
expect.objectContaining({
|
|
2348
|
+
showPlaybackButton: false,
|
|
2349
|
+
}),
|
|
2350
|
+
);
|
|
2351
|
+
});
|
|
2352
|
+
|
|
2353
|
+
it('filters transcript messages as conversation history updates', () => {
|
|
2354
|
+
const question = createMessage(AgentMessageType.QUESTION, 'Summarize the launch plan.');
|
|
2355
|
+
const internalUpdate = createMessage(AgentMessageType.UPDATE, 'Inspecting internal records.');
|
|
2356
|
+
const answer = createMessage(AgentMessageType.ANSWER, 'The launch plan is ready.');
|
|
2357
|
+
const messageFilter = (message: AgentMessage) => message.type !== AgentMessageType.UPDATE;
|
|
2358
|
+
|
|
2359
|
+
mockStreamState({ messages: [question, internalUpdate] });
|
|
2360
|
+
const view = renderConversation({ messageFilter });
|
|
2361
|
+
|
|
2362
|
+
expect(latestAllMessagesMixedProps()?.messages).toEqual([question]);
|
|
2363
|
+
expect(latestAllMessagesMixedProps()?.workstreamSourceMessages).toEqual([question]);
|
|
2364
|
+
|
|
2365
|
+
mockStreamState({ messages: [question, internalUpdate, answer] });
|
|
2366
|
+
view.rerender(
|
|
2367
|
+
<ModernAgentConversation
|
|
2368
|
+
agentRunId="agent-run-1"
|
|
2369
|
+
title="Agent"
|
|
2370
|
+
hideHeader
|
|
2371
|
+
hideMessageInput
|
|
2372
|
+
showRightPanel={false}
|
|
2373
|
+
messageFilter={messageFilter}
|
|
2374
|
+
/>,
|
|
2375
|
+
);
|
|
2376
|
+
|
|
2377
|
+
expect(latestAllMessagesMixedProps()?.messages).toEqual([question, answer]);
|
|
2378
|
+
expect(latestAllMessagesMixedProps()?.workstreamSourceMessages).toEqual([question, answer]);
|
|
2379
|
+
expect(document.querySelector('[data-agent-live-message-count="3"]')).not.toBeNull();
|
|
2380
|
+
expect(document.querySelector('[data-agent-rendered-message-count="2"]')).not.toBeNull();
|
|
2381
|
+
});
|
|
2382
|
+
|
|
2383
|
+
it('keeps pending request input actionable when its transcript row is filtered out', () => {
|
|
2384
|
+
const requestMessage = {
|
|
2385
|
+
...createMessage(AgentMessageType.REQUEST_INPUT, 'Choose a deployment region.'),
|
|
2386
|
+
details: {
|
|
2387
|
+
ux: {
|
|
2388
|
+
options: [
|
|
2389
|
+
{ id: 'us', label: 'United States' },
|
|
2390
|
+
{ id: 'eu', label: 'Europe' },
|
|
2391
|
+
],
|
|
2392
|
+
},
|
|
2393
|
+
},
|
|
2394
|
+
};
|
|
2395
|
+
mockStreamState({
|
|
2396
|
+
messages: [requestMessage],
|
|
2397
|
+
isCompleted: false,
|
|
2398
|
+
agentRunStatus: 'RUNNING',
|
|
2399
|
+
});
|
|
2400
|
+
|
|
2401
|
+
renderConversation({ messageFilter: () => false });
|
|
2402
|
+
|
|
2403
|
+
expect(latestAllMessagesMixedProps()?.messages).toEqual([]);
|
|
2404
|
+
expect(screen.getByText('Choose a deployment region.')).not.toBeNull();
|
|
2405
|
+
expect(screen.getByRole('button', { name: /Europe/ })).not.toBeNull();
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2019
2408
|
it('keeps the replay fixture export action available while messages are empty', () => {
|
|
2020
2409
|
mockStreamState({
|
|
2021
2410
|
messages: [],
|