@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
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
|
4
|
+
import type { AgentResourceReference } from '@vertesia/common';
|
|
5
|
+
import {
|
|
6
|
+
Boxes,
|
|
7
|
+
BrainCircuit,
|
|
8
|
+
Database,
|
|
9
|
+
FileType,
|
|
10
|
+
MessagesSquare,
|
|
11
|
+
PanelsTopLeft,
|
|
12
|
+
PlayCircle,
|
|
13
|
+
SquareTerminal,
|
|
14
|
+
Workflow,
|
|
15
|
+
} from 'lucide-react';
|
|
16
|
+
import type React from 'react';
|
|
17
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
18
|
+
import { I18nProvider } from '../../../../i18n/index.js';
|
|
19
|
+
import { ReactRouterContext, type RouterContext } from '../../../../router/index.js';
|
|
20
|
+
import { AgentResourceResolverProvider } from '../../../../widgets/markdown/AgentResourceResolver';
|
|
21
|
+
import { ResourceChangeSummary } from './ResourceChangeSummary';
|
|
22
|
+
import { ResourceChip } from './ResourceChip';
|
|
23
|
+
import { getResourceIcon } from './resourceLinks';
|
|
24
|
+
|
|
25
|
+
function makeRouterContext(): RouterContext {
|
|
26
|
+
return {
|
|
27
|
+
location: window.location,
|
|
28
|
+
route: { path: '/', Component: () => null },
|
|
29
|
+
params: {},
|
|
30
|
+
state: null,
|
|
31
|
+
matchedRoutePath: '/',
|
|
32
|
+
navigate: vi.fn(),
|
|
33
|
+
router: {
|
|
34
|
+
navigate: vi.fn(),
|
|
35
|
+
getTopRouter: () => ({ navigator: { addStickyParams: (href: string) => href } }),
|
|
36
|
+
},
|
|
37
|
+
} as unknown as RouterContext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function renderWithProviders(ui: React.ReactNode) {
|
|
41
|
+
return render(
|
|
42
|
+
<I18nProvider lng="en">
|
|
43
|
+
<ReactRouterContext.Provider value={makeRouterContext()}>{ui}</ReactRouterContext.Provider>
|
|
44
|
+
</I18nProvider>,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const ref = (over: Partial<AgentResourceReference> = {}): AgentResourceReference => ({
|
|
49
|
+
type: 'document',
|
|
50
|
+
id: 'd1',
|
|
51
|
+
label: 'My Document',
|
|
52
|
+
action: 'created',
|
|
53
|
+
...over,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
afterEach(() => cleanup());
|
|
57
|
+
|
|
58
|
+
describe('ResourceChip', () => {
|
|
59
|
+
it('uses the same icons as the Studio navigation', () => {
|
|
60
|
+
expect(getResourceIcon('document')).toBe(Database);
|
|
61
|
+
expect(getResourceIcon('collection')).toBe(Boxes);
|
|
62
|
+
expect(getResourceIcon('content_type')).toBe(FileType);
|
|
63
|
+
expect(getResourceIcon('interaction')).toBe(MessagesSquare);
|
|
64
|
+
expect(getResourceIcon('prompt')).toBe(SquareTerminal);
|
|
65
|
+
expect(getResourceIcon('agent')).toBe(BrainCircuit);
|
|
66
|
+
expect(getResourceIcon('workflow')).toBe(Workflow);
|
|
67
|
+
expect(getResourceIcon('process')).toBe(Workflow);
|
|
68
|
+
expect(getResourceIcon('process_run')).toBe(PlayCircle);
|
|
69
|
+
expect(getResourceIcon('interaction_run')).toBe(PlayCircle);
|
|
70
|
+
expect(getResourceIcon('view')).toBe(PanelsTopLeft);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('renders a navigable link supplied by the host resolver', () => {
|
|
74
|
+
renderWithProviders(
|
|
75
|
+
<AgentResourceResolverProvider value={() => ({ kind: 'navigate', href: '/documents/d1' })}>
|
|
76
|
+
<ResourceChip resource={ref()} />
|
|
77
|
+
</AgentResourceResolverProvider>,
|
|
78
|
+
);
|
|
79
|
+
const link = screen.getByRole('link', { name: /My Document/ });
|
|
80
|
+
expect(link.getAttribute('href')).toContain('/documents/d1');
|
|
81
|
+
expect(screen.getByText('Created')).not.toBeNull();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('renders a non-interactive chip when the host does not configure a resolver', () => {
|
|
85
|
+
renderWithProviders(<ResourceChip resource={ref({ type: 'interaction', id: 'int-1', label: 'Chat' })} />);
|
|
86
|
+
expect(screen.queryByRole('link')).toBeNull();
|
|
87
|
+
expect(screen.getByText('Chat')).not.toBeNull();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('renders a deleted resource as a non-interactive chip (no link)', () => {
|
|
91
|
+
renderWithProviders(<ResourceChip resource={ref({ action: 'deleted', label: 'Gone' })} />);
|
|
92
|
+
expect(screen.queryByRole('link')).toBeNull();
|
|
93
|
+
expect(screen.getByText('Gone')).not.toBeNull();
|
|
94
|
+
expect(screen.getByText('Deleted')).not.toBeNull();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('honors a resolver override from context', () => {
|
|
98
|
+
renderWithProviders(
|
|
99
|
+
<AgentResourceResolverProvider value={() => ({ kind: 'navigate', href: '/custom/path' })}>
|
|
100
|
+
<ResourceChip resource={ref()} />
|
|
101
|
+
</AgentResourceResolverProvider>,
|
|
102
|
+
);
|
|
103
|
+
expect(screen.getByRole('link').getAttribute('href')).toContain('/custom/path');
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('supports a host activation callback instead of navigation', () => {
|
|
107
|
+
const onActivate = vi.fn();
|
|
108
|
+
renderWithProviders(
|
|
109
|
+
<AgentResourceResolverProvider value={() => ({ kind: 'activate', onActivate })}>
|
|
110
|
+
<ResourceChip resource={ref()} />
|
|
111
|
+
</AgentResourceResolverProvider>,
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
fireEvent.click(screen.getByRole('button', { name: /My Document/ }));
|
|
115
|
+
expect(onActivate).toHaveBeenCalledOnce();
|
|
116
|
+
expect(screen.queryByRole('link')).toBeNull();
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
describe('ResourceChangeSummary', () => {
|
|
121
|
+
it('renders nothing when there are no resources', () => {
|
|
122
|
+
const { container } = renderWithProviders(<ResourceChangeSummary resources={[]} />);
|
|
123
|
+
expect(container.querySelector('[data-agent-resource-summary]')).toBeNull();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('renders a header and a chip per resource', () => {
|
|
127
|
+
const { container } = renderWithProviders(
|
|
128
|
+
<ResourceChangeSummary
|
|
129
|
+
resources={[ref({ id: 'd1', label: 'Doc One' }), ref({ type: 'collection', id: 'c1', label: 'Col' })]}
|
|
130
|
+
/>,
|
|
131
|
+
);
|
|
132
|
+
expect(container.querySelector('[data-agent-resource-summary]')?.className).not.toContain('bg-muted');
|
|
133
|
+
expect(screen.getByText('Resources changed')).not.toBeNull();
|
|
134
|
+
expect(screen.getByText('Doc One')).not.toBeNull();
|
|
135
|
+
expect(screen.getByText('Col')).not.toBeNull();
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
it('collapses beyond five resources and expands on click', () => {
|
|
139
|
+
const many = Array.from({ length: 7 }, (_, i) => ref({ id: `d${i}`, label: `Doc ${i}` }));
|
|
140
|
+
renderWithProviders(<ResourceChangeSummary resources={many} />);
|
|
141
|
+
// Only 5 shown initially
|
|
142
|
+
expect(screen.queryByText('Doc 5')).toBeNull();
|
|
143
|
+
const toggle = screen.getByRole('button', { name: /View all 7 changes/ });
|
|
144
|
+
fireEvent.click(toggle);
|
|
145
|
+
expect(screen.getByText('Doc 5')).not.toBeNull();
|
|
146
|
+
expect(screen.getByText('Doc 6')).not.toBeNull();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { AgentResourceReference } from '@vertesia/common';
|
|
2
|
+
import { Badge, Button, cn } from '@vertesia/ui/core';
|
|
3
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
|
+
import { NavLink } from '@vertesia/ui/router';
|
|
5
|
+
import { useAgentResourceResolver } from '@vertesia/ui/widgets';
|
|
6
|
+
import { getResourceActionVariant, getResourceIcon } from './resourceLinks';
|
|
7
|
+
|
|
8
|
+
interface ResourceChipProps {
|
|
9
|
+
resource: AgentResourceReference;
|
|
10
|
+
/** Originating run, passed to the resolver for run-scoped resources. */
|
|
11
|
+
workflowRunId?: string;
|
|
12
|
+
/** Hide the action badge when surrounding text already communicates the action. */
|
|
13
|
+
showAction?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A compact resource chip for something an agent tool created/updated/deleted. The host resolver may
|
|
19
|
+
* make it navigable (NavLink applies tenant sticky params), activate a host callback, or leave it
|
|
20
|
+
* non-interactive.
|
|
21
|
+
*/
|
|
22
|
+
export function ResourceChip({ resource, workflowRunId, showAction = true, className }: ResourceChipProps) {
|
|
23
|
+
const { t } = useUITranslation();
|
|
24
|
+
const resolve = useAgentResourceResolver();
|
|
25
|
+
const target = resolve(resource, { workflowRunId, source: 'structured' });
|
|
26
|
+
const Icon = getResourceIcon(resource.type);
|
|
27
|
+
// Literal keys (not a dynamic lookup) so i18next-cli can statically extract them.
|
|
28
|
+
const actionLabel =
|
|
29
|
+
resource.action === 'created'
|
|
30
|
+
? t('agent.resourceActionCreated')
|
|
31
|
+
: resource.action === 'deleted'
|
|
32
|
+
? t('agent.resourceActionDeleted')
|
|
33
|
+
: t('agent.resourceActionUpdated');
|
|
34
|
+
|
|
35
|
+
const body = (
|
|
36
|
+
<>
|
|
37
|
+
<Icon className="size-3.5 shrink-0 text-foreground" aria-hidden="true" />
|
|
38
|
+
<span className="truncate">{resource.label}</span>
|
|
39
|
+
{showAction && (
|
|
40
|
+
<Badge variant={getResourceActionVariant(resource.action)} className="shrink-0 px-1.5 py-0 text-[10px]">
|
|
41
|
+
{actionLabel}
|
|
42
|
+
</Badge>
|
|
43
|
+
)}
|
|
44
|
+
</>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const baseClass = cn(
|
|
48
|
+
'inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-background px-2 py-1 text-xs',
|
|
49
|
+
className,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
if (target.kind === 'navigate') {
|
|
53
|
+
return (
|
|
54
|
+
<NavLink
|
|
55
|
+
href={target.href}
|
|
56
|
+
topLevelNav
|
|
57
|
+
className={cn(baseClass, 'font-medium transition-colors hover:bg-muted/60')}
|
|
58
|
+
>
|
|
59
|
+
{body}
|
|
60
|
+
</NavLink>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (target.kind === 'activate') {
|
|
65
|
+
return (
|
|
66
|
+
<Button
|
|
67
|
+
variant="unstyled"
|
|
68
|
+
onClick={target.onActivate}
|
|
69
|
+
className={cn(baseClass, 'font-medium transition-colors hover:bg-muted/60')}
|
|
70
|
+
>
|
|
71
|
+
{body}
|
|
72
|
+
</Button>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Deleted or unresolvable resource: no navigation target, render a non-interactive chip.
|
|
77
|
+
return <span className={cn(baseClass, 'text-muted')}>{body}</span>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface ResourceActivityLinkListProps {
|
|
81
|
+
resources: AgentResourceReference[];
|
|
82
|
+
workflowRunId?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Inline action + deep-link presentation for completed tool timeline rows. */
|
|
87
|
+
export function ResourceActivityLinkList({ resources, workflowRunId, className }: ResourceActivityLinkListProps) {
|
|
88
|
+
const { t } = useUITranslation();
|
|
89
|
+
if (resources.length === 0) return null;
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<div
|
|
93
|
+
className={cn('flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1', className)}
|
|
94
|
+
data-agent-resource-activity
|
|
95
|
+
>
|
|
96
|
+
{resources.map((resource) => {
|
|
97
|
+
const actionLabel =
|
|
98
|
+
resource.action === 'created'
|
|
99
|
+
? t('agent.resourceActionCreated')
|
|
100
|
+
: resource.action === 'deleted'
|
|
101
|
+
? t('agent.resourceActionDeleted')
|
|
102
|
+
: t('agent.resourceActionUpdated');
|
|
103
|
+
return (
|
|
104
|
+
<span
|
|
105
|
+
key={`${resource.type}:${resource.id}:${resource.action}`}
|
|
106
|
+
className="inline-flex min-w-0 items-center gap-1.5"
|
|
107
|
+
>
|
|
108
|
+
<span className="shrink-0 text-sm text-muted">{actionLabel}</span>
|
|
109
|
+
<ResourceChip
|
|
110
|
+
resource={resource}
|
|
111
|
+
workflowRunId={workflowRunId}
|
|
112
|
+
showAction={false}
|
|
113
|
+
className="py-0.5"
|
|
114
|
+
/>
|
|
115
|
+
</span>
|
|
116
|
+
);
|
|
117
|
+
})}
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface ResourceChipListProps {
|
|
123
|
+
resources: AgentResourceReference[];
|
|
124
|
+
workflowRunId?: string;
|
|
125
|
+
className?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function ResourceChipList({ resources, workflowRunId, className }: ResourceChipListProps) {
|
|
129
|
+
if (resources.length === 0) return null;
|
|
130
|
+
return (
|
|
131
|
+
<div className={cn('flex flex-wrap gap-1.5', className)}>
|
|
132
|
+
{resources.map((resource) => (
|
|
133
|
+
<ResourceChip
|
|
134
|
+
key={`${resource.type}:${resource.id}:${resource.action}`}
|
|
135
|
+
resource={resource}
|
|
136
|
+
workflowRunId={workflowRunId}
|
|
137
|
+
/>
|
|
138
|
+
))}
|
|
139
|
+
</div>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type AgentMessage,
|
|
3
|
+
AgentMessageType,
|
|
4
|
+
type AgentResourceReference,
|
|
5
|
+
getResourcesFromMessage,
|
|
6
|
+
} from '@vertesia/common';
|
|
2
7
|
import { Button, cn, onActivateKey, useToast } from '@vertesia/ui/core';
|
|
3
8
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
9
|
import { useUserSession } from '@vertesia/ui/session';
|
|
@@ -9,6 +14,7 @@ import { memo, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
9
14
|
import { PulsatingCircle } from '../AnimatedThinkingDots';
|
|
10
15
|
import { useImageLightbox } from '../ImageLightbox';
|
|
11
16
|
import { getArtifactCacheKey, useArtifactUrlCache } from '../useArtifactUrlCache.js';
|
|
17
|
+
import { ResourceChipList } from './ResourceChip';
|
|
12
18
|
import type { ToolExecutionStatus } from './utils';
|
|
13
19
|
|
|
14
20
|
/** Keys that are internal metadata and not interesting to display */
|
|
@@ -27,8 +33,10 @@ const META_KEYS = new Set([
|
|
|
27
33
|
'files',
|
|
28
34
|
'outputFiles',
|
|
29
35
|
'display_role',
|
|
36
|
+
'duration_ms',
|
|
30
37
|
'observation',
|
|
31
38
|
'progress_messages',
|
|
39
|
+
'resources',
|
|
32
40
|
'browseruse',
|
|
33
41
|
'browser_use',
|
|
34
42
|
]);
|
|
@@ -797,6 +805,23 @@ function ToolCallGroupComponent({
|
|
|
797
805
|
// Extract workflow_run_id from messages (any message in the group should have it)
|
|
798
806
|
const artifactRunId = messages.find((m) => m.workflow_run_id)?.workflow_run_id ?? messages[0]?.workflow_run_id;
|
|
799
807
|
|
|
808
|
+
// Aggregate resource references across the whole group so deep links stay visible even when the
|
|
809
|
+
// group is collapsed (mirrors how group images/files are surfaced at the group level).
|
|
810
|
+
const groupResources = useMemo(() => {
|
|
811
|
+
const seen = new Set<string>();
|
|
812
|
+
const out: AgentResourceReference[] = [];
|
|
813
|
+
for (const m of messages) {
|
|
814
|
+
for (const ref of getResourcesFromMessage(m)) {
|
|
815
|
+
const key = `${ref.type}:${ref.id}:${ref.action}`;
|
|
816
|
+
if (!seen.has(key)) {
|
|
817
|
+
seen.add(key);
|
|
818
|
+
out.push(ref);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
return out;
|
|
823
|
+
}, [messages]);
|
|
824
|
+
|
|
800
825
|
// Render status indicator based on tool execution status
|
|
801
826
|
const renderStatusIndicator = () => {
|
|
802
827
|
// Only pulse for the currently active/latest group
|
|
@@ -966,6 +991,13 @@ function ToolCallGroupComponent({
|
|
|
966
991
|
{/* Show all images from the group prominently at the top */}
|
|
967
992
|
<GroupImageDisplay messages={messages} artifactRunId={artifactRunId} />
|
|
968
993
|
|
|
994
|
+
{/* Deep links to resources created/updated/deleted in this group, independent of expansion state. */}
|
|
995
|
+
{groupResources.length > 0 && (
|
|
996
|
+
<div className="px-4 pt-1 pb-2">
|
|
997
|
+
<ResourceChipList resources={groupResources} workflowRunId={artifactRunId} />
|
|
998
|
+
</div>
|
|
999
|
+
)}
|
|
1000
|
+
|
|
969
1001
|
{/* Collapsed summary - show tool calls as single-line rows with expand option */}
|
|
970
1002
|
{isCollapsed && (
|
|
971
1003
|
<div className="px-3 py-0.5 space-y-0">
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type AgentMessage, AgentMessageType } from '@vertesia/common';
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
3
|
import {
|
|
4
|
+
clearRequestInputIdAnsweredForSession,
|
|
5
|
+
getAnsweredRequestInputKeys,
|
|
4
6
|
getAnsweredToolApprovalRequestInputKeys,
|
|
7
|
+
getPendingRequestInputMessage,
|
|
5
8
|
getRequestInputMessageKey,
|
|
9
|
+
getRequestInputResponseIdFromMetadata,
|
|
10
|
+
getRequestInputResponseMetadata,
|
|
6
11
|
getToolApprovalResponseMetadata,
|
|
12
|
+
isRequestInputAnsweredForSession,
|
|
13
|
+
markRequestInputIdAnsweredForSession,
|
|
7
14
|
} from './requestInputMessages';
|
|
8
15
|
|
|
9
16
|
const APPROVAL_KEY = 'create_interaction:name:JDE AR Payment Processing Agent';
|
|
@@ -78,3 +85,91 @@ describe('getAnsweredToolApprovalRequestInputKeys', () => {
|
|
|
78
85
|
expect(answered.size).toBe(0);
|
|
79
86
|
});
|
|
80
87
|
});
|
|
88
|
+
|
|
89
|
+
describe('request input correlation', () => {
|
|
90
|
+
it('does not apply session acknowledgement to non-request-input messages with the same id', () => {
|
|
91
|
+
const agentRunId = 'agent-run-1';
|
|
92
|
+
const requestId = 'request-1';
|
|
93
|
+
const request = {
|
|
94
|
+
...makeApprovalRequest(),
|
|
95
|
+
details: { request_id: requestId, ux: { options: [{ id: 'allow_once' }] } },
|
|
96
|
+
};
|
|
97
|
+
const unrelatedMessage = {
|
|
98
|
+
...makeUserAnswer('Still working'),
|
|
99
|
+
details: { request_id: requestId },
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
markRequestInputIdAnsweredForSession(agentRunId, requestId);
|
|
103
|
+
|
|
104
|
+
expect(isRequestInputAnsweredForSession(agentRunId, request)).toBe(true);
|
|
105
|
+
expect(isRequestInputAnsweredForSession(agentRunId, unrelatedMessage)).toBe(false);
|
|
106
|
+
|
|
107
|
+
clearRequestInputIdAnsweredForSession(agentRunId, requestId);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('correlates a persisted response to the matching request id', () => {
|
|
111
|
+
const firstRequest = {
|
|
112
|
+
...makeApprovalRequest(),
|
|
113
|
+
details: { request_id: 'request-1', ux: { options: [{ id: 'red', label: 'Red' }] } },
|
|
114
|
+
};
|
|
115
|
+
const secondRequest = {
|
|
116
|
+
...makeApprovalRequest(),
|
|
117
|
+
timestamp: 2,
|
|
118
|
+
details: { request_id: 'request-2', ux: { options: [{ id: 'blue', label: 'Blue' }] } },
|
|
119
|
+
};
|
|
120
|
+
const answer = {
|
|
121
|
+
...makeUserAnswer('red'),
|
|
122
|
+
timestamp: 3,
|
|
123
|
+
details: { request_input_response: { request_id: 'request-1' } },
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const answered = getAnsweredRequestInputKeys([firstRequest, secondRequest, answer]);
|
|
127
|
+
|
|
128
|
+
expect(answered.has(getRequestInputMessageKey(firstRequest))).toBe(true);
|
|
129
|
+
expect(answered.has(getRequestInputMessageKey(secondRequest))).toBe(false);
|
|
130
|
+
expect(getPendingRequestInputMessage([firstRequest, secondRequest, answer])).toBe(secondRequest);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('adds the request id without discarding existing response metadata', () => {
|
|
134
|
+
const request = {
|
|
135
|
+
...makeApprovalRequest(),
|
|
136
|
+
details: { request_id: 'request-1', ux: { options: [{ id: 'red', label: 'Red' }] } },
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
expect(getRequestInputResponseMetadata(request, { source: 'free-response' })).toEqual({
|
|
140
|
+
source: 'free-response',
|
|
141
|
+
request_input_response: { request_id: 'request-1' },
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('does not let an earlier response resolve a later prompt that reused its request id', () => {
|
|
146
|
+
const firstRequest = {
|
|
147
|
+
...makeApprovalRequest(),
|
|
148
|
+
details: { request_id: 'reused-request', ux: { options: [{ id: 'allow_once' }] } },
|
|
149
|
+
};
|
|
150
|
+
const firstAnswer = {
|
|
151
|
+
...makeUserAnswer('allow_once'),
|
|
152
|
+
details: { request_input_response: { request_id: 'reused-request' } },
|
|
153
|
+
};
|
|
154
|
+
const secondRequest = {
|
|
155
|
+
...makeApprovalRequest(),
|
|
156
|
+
timestamp: 3,
|
|
157
|
+
details: { request_id: 'reused-request', ux: { options: [{ id: 'allow_once' }] } },
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const answered = getAnsweredRequestInputKeys([firstRequest, firstAnswer, secondRequest]);
|
|
161
|
+
|
|
162
|
+
expect(answered.has(getRequestInputMessageKey(firstRequest))).toBe(true);
|
|
163
|
+
expect(answered.has(getRequestInputMessageKey(secondRequest))).toBe(false);
|
|
164
|
+
expect(getPendingRequestInputMessage([firstRequest, firstAnswer, secondRequest])).toBe(secondRequest);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('reads a request id from response metadata', () => {
|
|
168
|
+
expect(
|
|
169
|
+
getRequestInputResponseIdFromMetadata({
|
|
170
|
+
request_input_response: { request_id: 'request-1' },
|
|
171
|
+
}),
|
|
172
|
+
).toBe('request-1');
|
|
173
|
+
expect(getRequestInputResponseIdFromMetadata({ request_input_response: {} })).toBeUndefined();
|
|
174
|
+
});
|
|
175
|
+
});
|
|
@@ -96,6 +96,65 @@ export function getRequestInputMessageKey(message: AgentMessage): string {
|
|
|
96
96
|
.join('|');
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
export function getRequestInputId(message: AgentMessage): string | undefined {
|
|
100
|
+
const details = message.details as Record<string, unknown> | undefined;
|
|
101
|
+
const requestId = details?.request_id ?? details?.tool_use_id;
|
|
102
|
+
return typeof requestId === 'string' && requestId ? requestId : undefined;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function getRequestInputResolutionKey(message: AgentMessage): string {
|
|
106
|
+
return getRequestInputId(message) ?? getRequestInputMessageKey(message);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const ANSWERED_REQUEST_INPUT_STORAGE_PREFIX = 'vertesia:answered-request-input:';
|
|
110
|
+
|
|
111
|
+
function getAnsweredRequestInputStorageKey(agentRunId: string, requestId: string): string {
|
|
112
|
+
return `${ANSWERED_REQUEST_INPUT_STORAGE_PREFIX}${agentRunId}:${requestId}`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function markRequestInputIdAnsweredForSession(agentRunId: string, requestId: string): void {
|
|
116
|
+
if (typeof window === 'undefined') return;
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
window.sessionStorage.setItem(getAnsweredRequestInputStorageKey(agentRunId, requestId), '1');
|
|
120
|
+
} catch {
|
|
121
|
+
// Session storage can be unavailable in privacy-restricted browser contexts.
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function clearRequestInputIdAnsweredForSession(agentRunId: string, requestId: string): void {
|
|
126
|
+
if (typeof window === 'undefined') return;
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
window.sessionStorage.removeItem(getAnsweredRequestInputStorageKey(agentRunId, requestId));
|
|
130
|
+
} catch {
|
|
131
|
+
// Session storage can be unavailable in privacy-restricted browser contexts.
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function isRequestInputAnsweredForSession(agentRunId: string, message: AgentMessage): boolean {
|
|
136
|
+
if (message.type !== AgentMessageType.REQUEST_INPUT) return false;
|
|
137
|
+
|
|
138
|
+
const requestId = getRequestInputId(message);
|
|
139
|
+
if (!requestId || typeof window === 'undefined') return false;
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
return window.sessionStorage.getItem(getAnsweredRequestInputStorageKey(agentRunId, requestId)) === '1';
|
|
143
|
+
} catch {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function getRequestInputResponseId(message: AgentMessage): string | undefined {
|
|
149
|
+
if (message.type !== AgentMessageType.QUESTION) return undefined;
|
|
150
|
+
|
|
151
|
+
const details = getRecord(message.details);
|
|
152
|
+
const metadata = getRecord(details?.metadata);
|
|
153
|
+
const response = getRecord(details?.request_input_response) ?? getRecord(metadata?.request_input_response);
|
|
154
|
+
const requestId = response?.request_id;
|
|
155
|
+
return typeof requestId === 'string' && requestId ? requestId : undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
99
158
|
export function getRequestInputAnswerMessageKey(message: AgentMessage): string {
|
|
100
159
|
const details = message.details as Record<string, unknown> | undefined;
|
|
101
160
|
const keyParts = [
|
|
@@ -114,10 +173,22 @@ export function getRequestInputAnswerMessageKey(message: AgentMessage): string {
|
|
|
114
173
|
|
|
115
174
|
export function getAnsweredRequestInputKeys(messages: AgentMessage[]): Set<string> {
|
|
116
175
|
const answered = new Set<string>();
|
|
176
|
+
const latestResponseIndexByRequestId = new Map<string, number>();
|
|
177
|
+
messages.forEach((message, index) => {
|
|
178
|
+
const requestId = getRequestInputResponseId(message);
|
|
179
|
+
if (requestId) latestResponseIndexByRequestId.set(requestId, index);
|
|
180
|
+
});
|
|
117
181
|
|
|
118
182
|
messages.forEach((message, index) => {
|
|
119
183
|
if (message.type !== AgentMessageType.REQUEST_INPUT) return;
|
|
120
184
|
|
|
185
|
+
const requestId = getRequestInputId(message);
|
|
186
|
+
const correlatedResponseIndex = requestId ? latestResponseIndexByRequestId.get(requestId) : undefined;
|
|
187
|
+
if (correlatedResponseIndex !== undefined && correlatedResponseIndex > index) {
|
|
188
|
+
answered.add(getRequestInputMessageKey(message));
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
121
192
|
const workstreamId = getWorkstreamId(message);
|
|
122
193
|
for (let nextIndex = index + 1; nextIndex < messages.length; nextIndex += 1) {
|
|
123
194
|
const nextMessage = messages[nextIndex];
|
|
@@ -125,7 +196,9 @@ export function getAnsweredRequestInputKeys(messages: AgentMessage[]): Set<strin
|
|
|
125
196
|
|
|
126
197
|
if (nextMessage.type === AgentMessageType.REQUEST_INPUT) break;
|
|
127
198
|
if (nextMessage.type === AgentMessageType.QUESTION) {
|
|
128
|
-
|
|
199
|
+
if (!getRequestInputResponseId(nextMessage)) {
|
|
200
|
+
answered.add(getRequestInputMessageKey(message));
|
|
201
|
+
}
|
|
129
202
|
break;
|
|
130
203
|
}
|
|
131
204
|
}
|
|
@@ -134,6 +207,41 @@ export function getAnsweredRequestInputKeys(messages: AgentMessage[]): Set<strin
|
|
|
134
207
|
return answered;
|
|
135
208
|
}
|
|
136
209
|
|
|
210
|
+
export function getRequestInputResponseMetadata(
|
|
211
|
+
message: AgentMessage,
|
|
212
|
+
metadata?: Record<string, unknown>,
|
|
213
|
+
): Record<string, unknown> | undefined {
|
|
214
|
+
const requestId = getRequestInputId(message);
|
|
215
|
+
if (!requestId) return metadata;
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
...metadata,
|
|
219
|
+
request_input_response: { request_id: requestId },
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function sendRequestInputResponse(
|
|
224
|
+
onSendMessage: ((message: string, metadata?: Record<string, unknown>) => void) | undefined,
|
|
225
|
+
requestMessage: AgentMessage,
|
|
226
|
+
response: string,
|
|
227
|
+
metadata?: Record<string, unknown>,
|
|
228
|
+
): void {
|
|
229
|
+
if (!onSendMessage) return;
|
|
230
|
+
|
|
231
|
+
const responseMetadata = getRequestInputResponseMetadata(requestMessage, metadata);
|
|
232
|
+
if (responseMetadata) {
|
|
233
|
+
onSendMessage(response, responseMetadata);
|
|
234
|
+
} else {
|
|
235
|
+
onSendMessage(response);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function getRequestInputResponseIdFromMetadata(metadata?: Record<string, unknown>): string | undefined {
|
|
240
|
+
const response = getRecord(metadata?.request_input_response);
|
|
241
|
+
const requestId = response?.request_id;
|
|
242
|
+
return typeof requestId === 'string' && requestId ? requestId : undefined;
|
|
243
|
+
}
|
|
244
|
+
|
|
137
245
|
export function getResolvedToolApprovalKeys(messages: AgentMessage[]): Set<string> {
|
|
138
246
|
const resolved = new Set<string>();
|
|
139
247
|
|
|
@@ -300,6 +408,7 @@ export function isRequestInputAnswered(message: AgentMessage, answeredRequestInp
|
|
|
300
408
|
export function getPendingRequestInputMessage(
|
|
301
409
|
messages: AgentMessage[],
|
|
302
410
|
workstreamId = 'main',
|
|
411
|
+
locallyAnsweredRequestInputKeys?: ReadonlySet<string>,
|
|
303
412
|
): RequestInputMessageWithUx | undefined {
|
|
304
413
|
const answeredRequestInputKeys = getAnsweredRequestInputKeys(messages);
|
|
305
414
|
const resolvedToolApprovalKeys = getResolvedToolApprovalKeys(messages);
|
|
@@ -308,6 +417,7 @@ export function getPendingRequestInputMessage(
|
|
|
308
417
|
const message = messages[index];
|
|
309
418
|
if (!hasRequestInputUx(message)) continue;
|
|
310
419
|
if (getWorkstreamId(message) !== workstreamId) continue;
|
|
420
|
+
if (locallyAnsweredRequestInputKeys?.has(getRequestInputResolutionKey(message))) continue;
|
|
311
421
|
if (isRequestInputAnswered(message, answeredRequestInputKeys)) continue;
|
|
312
422
|
if (isRequestInputResolvedByToolApprovalEvent(message, resolvedToolApprovalKeys)) continue;
|
|
313
423
|
return message;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AgentResourceAction, AgentResourceType } from '@vertesia/common';
|
|
2
|
+
import type { LucideIcon } from 'lucide-react';
|
|
3
|
+
import {
|
|
4
|
+
Boxes,
|
|
5
|
+
BrainCircuit,
|
|
6
|
+
Database,
|
|
7
|
+
FileType,
|
|
8
|
+
MessagesSquare,
|
|
9
|
+
PanelsTopLeft,
|
|
10
|
+
PlayCircle,
|
|
11
|
+
SquareTerminal,
|
|
12
|
+
Workflow,
|
|
13
|
+
} from 'lucide-react';
|
|
14
|
+
|
|
15
|
+
const RESOURCE_ICONS: Record<AgentResourceType, LucideIcon> = {
|
|
16
|
+
document: Database,
|
|
17
|
+
collection: Boxes,
|
|
18
|
+
content_type: FileType,
|
|
19
|
+
interaction: MessagesSquare,
|
|
20
|
+
prompt: SquareTerminal,
|
|
21
|
+
agent: BrainCircuit,
|
|
22
|
+
workflow: Workflow,
|
|
23
|
+
process: Workflow,
|
|
24
|
+
process_run: PlayCircle,
|
|
25
|
+
interaction_run: PlayCircle,
|
|
26
|
+
view: PanelsTopLeft,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export function getResourceIcon(type: AgentResourceType): LucideIcon {
|
|
30
|
+
return RESOURCE_ICONS[type];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Badge variant for a resource action, using the semantic color system. */
|
|
34
|
+
export function getResourceActionVariant(action: AgentResourceAction): 'success' | 'info' | 'outline' {
|
|
35
|
+
switch (action) {
|
|
36
|
+
case 'created':
|
|
37
|
+
return 'success';
|
|
38
|
+
case 'deleted':
|
|
39
|
+
return 'outline';
|
|
40
|
+
default:
|
|
41
|
+
return 'info';
|
|
42
|
+
}
|
|
43
|
+
}
|