@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Button, cn } from '@vertesia/ui/core';
|
|
2
2
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
3
|
import { UserSessionContext } from '@vertesia/ui/session';
|
|
4
|
-
import { FileTextIcon, ImageIcon, XIcon } from 'lucide-react';
|
|
4
|
+
import { ChevronDown, FileTextIcon, ImageIcon, XIcon } from 'lucide-react';
|
|
5
5
|
import type React from 'react';
|
|
6
|
-
import { useContext, useEffect, useState } from 'react';
|
|
6
|
+
import { useContext, useEffect, useId, useState } from 'react';
|
|
7
7
|
import { useImageLightbox } from '../ImageLightbox';
|
|
8
8
|
import { getArtifactCacheKey, useArtifactUrlCache } from '../useArtifactUrlCache';
|
|
9
9
|
|
|
@@ -26,6 +26,7 @@ const TEXT_EXTENSIONS = new Set([
|
|
|
26
26
|
'yaml',
|
|
27
27
|
'yml',
|
|
28
28
|
]);
|
|
29
|
+
const DEFAULT_COLLAPSED_ATTACHMENT_COUNT = 3;
|
|
29
30
|
|
|
30
31
|
export interface AttachmentPreviewItem {
|
|
31
32
|
id: string;
|
|
@@ -47,6 +48,7 @@ export interface ParsedUserAttachments {
|
|
|
47
48
|
interface AttachmentPreviewListProps {
|
|
48
49
|
items: AttachmentPreviewItem[];
|
|
49
50
|
artifactRunId?: string;
|
|
51
|
+
onOpenArtifact?: (path: string) => void;
|
|
50
52
|
className?: string;
|
|
51
53
|
align?: 'start' | 'end';
|
|
52
54
|
variant?: 'composer' | 'message';
|
|
@@ -103,17 +105,28 @@ function isCollectionHref(href: string | undefined): boolean {
|
|
|
103
105
|
function AttachmentLink({
|
|
104
106
|
item,
|
|
105
107
|
children,
|
|
108
|
+
onOpenArtifact,
|
|
106
109
|
StoreLinkComponent,
|
|
107
110
|
CollectionLinkComponent,
|
|
108
111
|
}: {
|
|
109
112
|
item: AttachmentPreviewItem;
|
|
110
113
|
children: React.ReactNode;
|
|
114
|
+
onOpenArtifact?: (path: string) => void;
|
|
111
115
|
StoreLinkComponent?: AttachmentPreviewListProps['StoreLinkComponent'];
|
|
112
116
|
CollectionLinkComponent?: AttachmentPreviewListProps['CollectionLinkComponent'];
|
|
113
117
|
}) {
|
|
114
118
|
const href = item.href;
|
|
115
119
|
if (!href) return <>{children}</>;
|
|
116
120
|
|
|
121
|
+
const artifactPath = getArtifactPath(item);
|
|
122
|
+
if (artifactPath && /\.md$/i.test(artifactPath) && onOpenArtifact) {
|
|
123
|
+
return (
|
|
124
|
+
<button type="button" className="max-w-full text-start" onClick={() => onOpenArtifact(artifactPath)}>
|
|
125
|
+
{children}
|
|
126
|
+
</button>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
117
130
|
if (isStoreObjectHref(href)) {
|
|
118
131
|
const documentId = getStoreObjectId(href);
|
|
119
132
|
if (StoreLinkComponent) {
|
|
@@ -158,6 +171,7 @@ function AttachmentPreview({
|
|
|
158
171
|
artifactRunId,
|
|
159
172
|
variant,
|
|
160
173
|
onRemove,
|
|
174
|
+
onOpenArtifact,
|
|
161
175
|
StoreLinkComponent,
|
|
162
176
|
CollectionLinkComponent,
|
|
163
177
|
}: {
|
|
@@ -165,6 +179,7 @@ function AttachmentPreview({
|
|
|
165
179
|
artifactRunId?: string;
|
|
166
180
|
variant: 'composer' | 'message';
|
|
167
181
|
onRemove?: (fileId: string) => void;
|
|
182
|
+
onOpenArtifact?: (path: string) => void;
|
|
168
183
|
StoreLinkComponent?: AttachmentPreviewListProps['StoreLinkComponent'];
|
|
169
184
|
CollectionLinkComponent?: AttachmentPreviewListProps['CollectionLinkComponent'];
|
|
170
185
|
}) {
|
|
@@ -338,6 +353,7 @@ function AttachmentPreview({
|
|
|
338
353
|
<span className="relative inline-flex max-w-full">
|
|
339
354
|
<AttachmentLink
|
|
340
355
|
item={item}
|
|
356
|
+
onOpenArtifact={onOpenArtifact}
|
|
341
357
|
StoreLinkComponent={StoreLinkComponent}
|
|
342
358
|
CollectionLinkComponent={CollectionLinkComponent}
|
|
343
359
|
>
|
|
@@ -355,24 +371,57 @@ export function AttachmentPreviewList({
|
|
|
355
371
|
align = 'start',
|
|
356
372
|
variant = 'message',
|
|
357
373
|
onRemove,
|
|
374
|
+
onOpenArtifact,
|
|
358
375
|
StoreLinkComponent,
|
|
359
376
|
CollectionLinkComponent,
|
|
360
377
|
}: AttachmentPreviewListProps) {
|
|
378
|
+
const { t } = useUITranslation();
|
|
379
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
380
|
+
const attachmentListId = useId();
|
|
381
|
+
const isCollapsible = variant === 'composer' && items.length > DEFAULT_COLLAPSED_ATTACHMENT_COUNT;
|
|
382
|
+
const visibleItems = isCollapsible && !isExpanded ? items.slice(0, DEFAULT_COLLAPSED_ATTACHMENT_COUNT) : items;
|
|
383
|
+
const hiddenItemCount = items.length - DEFAULT_COLLAPSED_ATTACHMENT_COUNT;
|
|
384
|
+
|
|
385
|
+
useEffect(() => {
|
|
386
|
+
if (items.length <= DEFAULT_COLLAPSED_ATTACHMENT_COUNT) {
|
|
387
|
+
setIsExpanded(false);
|
|
388
|
+
}
|
|
389
|
+
}, [items.length]);
|
|
390
|
+
|
|
361
391
|
if (items.length === 0) return null;
|
|
362
392
|
|
|
363
393
|
return (
|
|
364
|
-
<div className={cn('flex flex-wrap gap-2', align === 'end' && 'justify-end', className)}>
|
|
365
|
-
{
|
|
394
|
+
<div id={attachmentListId} className={cn('flex flex-wrap gap-2', align === 'end' && 'justify-end', className)}>
|
|
395
|
+
{visibleItems.map((item) => (
|
|
366
396
|
<AttachmentPreview
|
|
367
397
|
key={item.id}
|
|
368
398
|
item={item}
|
|
369
399
|
artifactRunId={artifactRunId}
|
|
370
400
|
variant={variant}
|
|
371
401
|
onRemove={onRemove}
|
|
402
|
+
onOpenArtifact={onOpenArtifact}
|
|
372
403
|
StoreLinkComponent={StoreLinkComponent}
|
|
373
404
|
CollectionLinkComponent={CollectionLinkComponent}
|
|
374
405
|
/>
|
|
375
406
|
))}
|
|
407
|
+
{isCollapsible && (
|
|
408
|
+
<Button
|
|
409
|
+
type="button"
|
|
410
|
+
variant="ghost"
|
|
411
|
+
size="sm"
|
|
412
|
+
aria-controls={attachmentListId}
|
|
413
|
+
aria-expanded={isExpanded}
|
|
414
|
+
onClick={() => setIsExpanded((expanded) => !expanded)}
|
|
415
|
+
className="h-8 shrink-0 gap-1 rounded-xl px-2.5 text-xs text-muted"
|
|
416
|
+
>
|
|
417
|
+
{!isExpanded && <span>+{hiddenItemCount}</span>}
|
|
418
|
+
{isExpanded ? t('agent.showLess') : t('agent.showMore')}
|
|
419
|
+
<ChevronDown
|
|
420
|
+
className={cn('size-3.5 transition-transform', isExpanded && 'rotate-180')}
|
|
421
|
+
aria-hidden="true"
|
|
422
|
+
/>
|
|
423
|
+
</Button>
|
|
424
|
+
)}
|
|
376
425
|
</div>
|
|
377
426
|
);
|
|
378
427
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** @vitest-environment jsdom */
|
|
2
|
+
|
|
3
|
+
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
|
|
4
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { I18nProvider } from '../../../../i18n/index.js';
|
|
6
|
+
import { AGENT_LINE_CLAMP_CLASS, CollapsibleAgentMarkdown } from './CollapsibleAgentMarkdown.js';
|
|
7
|
+
|
|
8
|
+
afterEach(cleanup);
|
|
9
|
+
|
|
10
|
+
const renderMarkdown = (markdown: string, testId = 'prose') =>
|
|
11
|
+
render(
|
|
12
|
+
<I18nProvider lng="en">
|
|
13
|
+
<CollapsibleAgentMarkdown data-testid={testId}>{markdown}</CollapsibleAgentMarkdown>
|
|
14
|
+
</I18nProvider>,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
describe('CollapsibleAgentMarkdown', () => {
|
|
18
|
+
it('renders markdown without a toggle when the content is short', () => {
|
|
19
|
+
renderMarkdown('A **short** note.');
|
|
20
|
+
expect(screen.getByText('short')).not.toBeNull();
|
|
21
|
+
expect(screen.queryByRole('button', { name: /Show more/ })).toBeNull();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('renders a markdown table', () => {
|
|
25
|
+
renderMarkdown('| A | B |\n| - | - |\n| 1 | 2 |');
|
|
26
|
+
expect(screen.getByRole('table')).not.toBeNull();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('collapses long content behind a show more / show less toggle', () => {
|
|
30
|
+
const long = Array.from({ length: 10 }, (_, i) => `Line number ${i + 1} of the reference block.`).join('\n\n');
|
|
31
|
+
renderMarkdown(long);
|
|
32
|
+
|
|
33
|
+
const prose = screen.getByTestId('prose');
|
|
34
|
+
const showMore = screen.getByRole('button', { name: /Show more/ });
|
|
35
|
+
expect(showMore.getAttribute('aria-expanded')).toBe('false');
|
|
36
|
+
expect(prose.getAttribute('class') ?? '').toContain(AGENT_LINE_CLAMP_CLASS.split(' ')[0]);
|
|
37
|
+
|
|
38
|
+
fireEvent.click(showMore);
|
|
39
|
+
|
|
40
|
+
const showLess = screen.getByRole('button', { name: /Show less/ });
|
|
41
|
+
expect(showLess.getAttribute('aria-expanded')).toBe('true');
|
|
42
|
+
expect(prose.getAttribute('class') ?? '').not.toContain('[-webkit-line-clamp:6]');
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { cn } from '@vertesia/ui/core';
|
|
2
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
|
+
import { MarkdownRenderer, type MarkdownRendererProps } from '@vertesia/ui/widgets';
|
|
4
|
+
import { ChevronDown } from 'lucide-react';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
|
|
7
|
+
/** Prose styling used for agent/model message markdown, shared across the conversation UI. */
|
|
8
|
+
export const AGENT_PROSE_CLASS = [
|
|
9
|
+
'agent-markdown vprose prose max-w-none break-words text-sm leading-6 text-foreground/80',
|
|
10
|
+
'prose-p:my-2 prose-p:leading-6 prose-li:my-0.5 prose-pre:my-3 prose-headings:tracking-normal',
|
|
11
|
+
'prose-headings:text-foreground prose-strong:text-foreground prose-code:text-foreground',
|
|
12
|
+
'prose-a:text-foreground prose-a:underline prose-a:decoration-muted prose-a:underline-offset-4',
|
|
13
|
+
'[&_p]:text-foreground/80 [&_li]:text-foreground/80 [&_li::marker]:text-muted',
|
|
14
|
+
].join(' ');
|
|
15
|
+
|
|
16
|
+
/** Clamp applied to collapsed markdown. Kept as a literal so Tailwind emits the utility. */
|
|
17
|
+
export const AGENT_LINE_CLAMP_CLASS =
|
|
18
|
+
'[display:-webkit-box] overflow-hidden [-webkit-box-orient:vertical] [-webkit-line-clamp:6]';
|
|
19
|
+
|
|
20
|
+
export const AGENT_COLLAPSE_LINES = 6;
|
|
21
|
+
export const AGENT_COLLAPSE_THRESHOLD = 520;
|
|
22
|
+
|
|
23
|
+
interface CollapsibleAgentMarkdownProps {
|
|
24
|
+
/** Raw markdown to render. */
|
|
25
|
+
children: string;
|
|
26
|
+
artifactRunId?: string;
|
|
27
|
+
components?: MarkdownRendererProps['components'];
|
|
28
|
+
/** Disable the show more/less affordance regardless of length. */
|
|
29
|
+
disableCollapse?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
'data-testid'?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Renders agent/model markdown with the shared prose styling and, when the content is long,
|
|
36
|
+
* collapses it to a few lines behind a "Show more" / "Show less" toggle. Mirrors the treatment
|
|
37
|
+
* used for summary thought prose so edit/comment cards read like ordinary model messages.
|
|
38
|
+
*/
|
|
39
|
+
export function CollapsibleAgentMarkdown({
|
|
40
|
+
children,
|
|
41
|
+
artifactRunId,
|
|
42
|
+
components,
|
|
43
|
+
disableCollapse,
|
|
44
|
+
className,
|
|
45
|
+
'data-testid': dataTestId,
|
|
46
|
+
}: CollapsibleAgentMarkdownProps) {
|
|
47
|
+
const { t } = useUITranslation();
|
|
48
|
+
const normalizedText = children.trim();
|
|
49
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
50
|
+
const explicitLineCount = normalizedText ? normalizedText.split(/\r?\n/).length : 0;
|
|
51
|
+
const isLong = normalizedText.length > AGENT_COLLAPSE_THRESHOLD || explicitLineCount > AGENT_COLLAPSE_LINES;
|
|
52
|
+
const collapsed = isLong && !disableCollapse && !isExpanded;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className={cn('min-w-0', className)}>
|
|
56
|
+
<div
|
|
57
|
+
data-testid={dataTestId}
|
|
58
|
+
className={cn(AGENT_PROSE_CLASS, collapsed && AGENT_LINE_CLAMP_CLASS)}
|
|
59
|
+
style={{ overflowWrap: 'anywhere' }}
|
|
60
|
+
>
|
|
61
|
+
<MarkdownRenderer artifactRunId={artifactRunId} components={components}>
|
|
62
|
+
{children}
|
|
63
|
+
</MarkdownRenderer>
|
|
64
|
+
</div>
|
|
65
|
+
{isLong && !disableCollapse ? (
|
|
66
|
+
<div className="mt-1.5 flex justify-end">
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
aria-expanded={isExpanded}
|
|
70
|
+
className={cn(
|
|
71
|
+
'inline-flex items-center gap-1 text-sm font-medium text-muted transition-colors',
|
|
72
|
+
'[text-decoration:none] hover:text-foreground hover:[text-decoration:none]',
|
|
73
|
+
'focus-visible:text-foreground focus-visible:[text-decoration:none]',
|
|
74
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
75
|
+
)}
|
|
76
|
+
onClick={() => setIsExpanded((current) => !current)}
|
|
77
|
+
>
|
|
78
|
+
{isExpanded ? t('agent.showLess') : t('agent.showMore')}
|
|
79
|
+
<ChevronDown
|
|
80
|
+
className={cn('size-4 transition-transform', isExpanded && 'rotate-180')}
|
|
81
|
+
aria-hidden="true"
|
|
82
|
+
/>
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
) : null}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -5,6 +5,7 @@ import { useRouterContext } from '@vertesia/ui/router';
|
|
|
5
5
|
import { useUserSession } from '@vertesia/ui/session';
|
|
6
6
|
import {
|
|
7
7
|
Bot,
|
|
8
|
+
Bug,
|
|
8
9
|
ClipboardList,
|
|
9
10
|
CopyIcon,
|
|
10
11
|
DownloadCloudIcon,
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
InfoIcon,
|
|
14
15
|
MessageSquareText,
|
|
15
16
|
MoreVertical,
|
|
16
|
-
Rewind,
|
|
17
17
|
Rows3,
|
|
18
18
|
XIcon,
|
|
19
19
|
} from 'lucide-react';
|
|
@@ -185,7 +185,7 @@ export default function Header({
|
|
|
185
185
|
variant === 'compact' && 'size-8 rounded-lg',
|
|
186
186
|
)}
|
|
187
187
|
>
|
|
188
|
-
<
|
|
188
|
+
<Bug className={cn('size-4', variant === 'full' && 'me-1.5')} />
|
|
189
189
|
{variant === 'full' ? (
|
|
190
190
|
<span className="font-medium text-xs">{t('agent.rewind.label')}</span>
|
|
191
191
|
) : (
|
|
@@ -201,6 +201,38 @@ describe('MessageInput', () => {
|
|
|
201
201
|
expect(screen.getByText('Ready')).not.toBeNull();
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
+
it('collapses large attachment lists while preserving attachment actions', () => {
|
|
205
|
+
const onRemoveDocument = vi.fn();
|
|
206
|
+
const selectedDocuments = ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon'].map((name, index) => ({
|
|
207
|
+
id: `doc-${index}`,
|
|
208
|
+
name,
|
|
209
|
+
}));
|
|
210
|
+
|
|
211
|
+
renderWithProviders(
|
|
212
|
+
<MessageInput onSend={vi.fn()} selectedDocuments={selectedDocuments} onRemoveDocument={onRemoveDocument} />,
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
expect(screen.getByText('Alpha')).not.toBeNull();
|
|
216
|
+
expect(screen.getByText('Gamma')).not.toBeNull();
|
|
217
|
+
expect(screen.queryByText('Delta')).toBeNull();
|
|
218
|
+
expect(screen.getByText('+2')).not.toBeNull();
|
|
219
|
+
|
|
220
|
+
fireEvent.click(screen.getByRole('button', { name: /show more/i }));
|
|
221
|
+
|
|
222
|
+
expect(screen.getByText('Delta')).not.toBeNull();
|
|
223
|
+
expect(screen.getByText('Epsilon')).not.toBeNull();
|
|
224
|
+
expect(screen.getByRole('button', { name: /show less/i })).not.toBeNull();
|
|
225
|
+
|
|
226
|
+
fireEvent.click(screen.getByRole('button', { name: /Remove Epsilon/i }));
|
|
227
|
+
|
|
228
|
+
expect(onRemoveDocument).toHaveBeenCalledWith('doc-4');
|
|
229
|
+
|
|
230
|
+
fireEvent.click(screen.getByRole('button', { name: /show less/i }));
|
|
231
|
+
|
|
232
|
+
expect(screen.queryByText('Delta')).toBeNull();
|
|
233
|
+
expect(screen.getByText('+2')).not.toBeNull();
|
|
234
|
+
});
|
|
235
|
+
|
|
204
236
|
it('renders context usage and triggers manual compaction', async () => {
|
|
205
237
|
const onCompactContext = vi.fn();
|
|
206
238
|
|
|
@@ -269,4 +301,43 @@ describe('MessageInput', () => {
|
|
|
269
301
|
tray.compareDocumentPosition(screen.getByRole('textbox')) & Node.DOCUMENT_POSITION_FOLLOWING,
|
|
270
302
|
).toBeTruthy();
|
|
271
303
|
});
|
|
304
|
+
|
|
305
|
+
it('collapses large workstream lists and navigates from a selected workstream', () => {
|
|
306
|
+
const onSelectWorkstream = vi.fn();
|
|
307
|
+
const activeWorkstreams = ['alpha', 'beta', 'gamma', 'delta', 'epsilon'].map((workstream_id, index) => ({
|
|
308
|
+
workstream_id,
|
|
309
|
+
launch_id: `launch-${index}`,
|
|
310
|
+
elapsed_ms: 0,
|
|
311
|
+
deadline_ms: 0,
|
|
312
|
+
remaining_ms: 0,
|
|
313
|
+
status: 'running' as const,
|
|
314
|
+
}));
|
|
315
|
+
|
|
316
|
+
renderWithProviders(
|
|
317
|
+
<MessageInput
|
|
318
|
+
onSend={vi.fn()}
|
|
319
|
+
isStreaming
|
|
320
|
+
activeWorkstreams={activeWorkstreams}
|
|
321
|
+
onSelectWorkstream={onSelectWorkstream}
|
|
322
|
+
/>,
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
expect(screen.getByRole('button', { name: 'Alpha' })).not.toBeNull();
|
|
326
|
+
expect(screen.getByRole('button', { name: 'Gamma' })).not.toBeNull();
|
|
327
|
+
expect(screen.queryByRole('button', { name: 'Delta' })).toBeNull();
|
|
328
|
+
expect(screen.getByText('+2')).not.toBeNull();
|
|
329
|
+
expect(screen.getByText('Show more')).not.toBeNull();
|
|
330
|
+
|
|
331
|
+
fireEvent.click(screen.getByRole('button', { name: /show more/i }));
|
|
332
|
+
|
|
333
|
+
expect(screen.getByRole('button', { name: 'Delta' })).not.toBeNull();
|
|
334
|
+
expect(screen.getByRole('button', { name: 'Epsilon' })).not.toBeNull();
|
|
335
|
+
expect(screen.getByRole('button', { name: /show less/i })).not.toBeNull();
|
|
336
|
+
|
|
337
|
+
fireEvent.click(screen.getByRole('button', { name: 'Delta' }));
|
|
338
|
+
|
|
339
|
+
expect(onSelectWorkstream).toHaveBeenCalledWith('delta');
|
|
340
|
+
expect(screen.queryByRole('button', { name: 'Delta' })).toBeNull();
|
|
341
|
+
expect(screen.getByRole('button', { name: /show more/i })).not.toBeNull();
|
|
342
|
+
});
|
|
272
343
|
});
|
|
@@ -66,6 +66,7 @@ interface MessageInputProps {
|
|
|
66
66
|
isCompactingContext?: boolean;
|
|
67
67
|
activeTaskCount?: number;
|
|
68
68
|
activeWorkstreams?: WorkstreamInfo[];
|
|
69
|
+
onSelectWorkstream?: (workstreamId: string) => void;
|
|
69
70
|
placeholder?: string;
|
|
70
71
|
|
|
71
72
|
// File upload props
|
|
@@ -133,6 +134,7 @@ export default function MessageInput({
|
|
|
133
134
|
isCompactingContext = false,
|
|
134
135
|
activeTaskCount = 0,
|
|
135
136
|
activeWorkstreams = [],
|
|
137
|
+
onSelectWorkstream,
|
|
136
138
|
placeholder,
|
|
137
139
|
// File upload props
|
|
138
140
|
onFilesSelected,
|
|
@@ -474,7 +476,7 @@ export default function MessageInput({
|
|
|
474
476
|
/>
|
|
475
477
|
)}
|
|
476
478
|
|
|
477
|
-
<ActiveWorkstreamsSummary activeWorkstreams={activeWorkstreams} />
|
|
479
|
+
<ActiveWorkstreamsSummary activeWorkstreams={activeWorkstreams} onSelectWorkstream={onSelectWorkstream} />
|
|
478
480
|
|
|
479
481
|
{/* Input row */}
|
|
480
482
|
<div className="mx-auto flex max-w-3xl flex-col gap-2 rounded-2xl border border-border/70 bg-mixer-muted/15 p-2.5 shadow-lg shadow-black/5">
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from '@vertesia/common';
|
|
7
7
|
import { Badge, Button, cn, Dropdown, MenuItem, useToast } from '@vertesia/ui/core';
|
|
8
8
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
9
|
-
import {
|
|
9
|
+
import { useRouterContext } from '@vertesia/ui/router';
|
|
10
10
|
import { useUserSession } from '@vertesia/ui/session';
|
|
11
11
|
import { MarkdownRenderer } from '@vertesia/ui/widgets';
|
|
12
12
|
import dayjs from 'dayjs';
|
|
@@ -29,13 +29,15 @@ import { memo, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
29
29
|
import { useDownloadFile } from '../../../store/objects/components/useDownloadFile.js';
|
|
30
30
|
import { PulsatingCircle } from '../AnimatedThinkingDots';
|
|
31
31
|
import { AskUserWidget } from '../AskUserWidget';
|
|
32
|
+
import { DocumentEditingActionCard, parseMarkdownEditingAction } from '../DocumentEditingActionCard.js';
|
|
32
33
|
import { useImageLightbox } from '../ImageLightbox';
|
|
33
34
|
import { getArtifactCacheKey, useArtifactUrlCache } from '../useArtifactUrlCache.js';
|
|
34
35
|
import { ThinkingMessages } from '../WaitingMessages';
|
|
36
|
+
import { createAgentMarkdownAnchor } from './AgentMarkdownAnchor';
|
|
35
37
|
import { AttachmentPreviewList, parseUserMessageAttachments } from './AttachmentPreview';
|
|
36
38
|
import { MessageDeliveryStatus } from './MessageDeliveryStatus';
|
|
37
39
|
import { processContentForMarkdown } from './processContentForMarkdown';
|
|
38
|
-
import { getToolApprovalResponseMetadata } from './requestInputMessages';
|
|
40
|
+
import { getToolApprovalResponseMetadata, sendRequestInputResponse } from './requestInputMessages';
|
|
39
41
|
import { getWorkstreamId } from './utils';
|
|
40
42
|
|
|
41
43
|
/** className overrides for MessageItem — single source of truth for all className overrides. */
|
|
@@ -108,6 +110,8 @@ export interface MessageItemProps extends MessageItemClassNames {
|
|
|
108
110
|
showPulsatingCircle?: boolean;
|
|
109
111
|
/** Callback when user sends a message (e.g., from proposal selection) */
|
|
110
112
|
onSendMessage?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
113
|
+
/** Open a Markdown artifact in the surrounding agent panel. */
|
|
114
|
+
onOpenArtifact?: (path: string) => void;
|
|
111
115
|
/** Whether a REQUEST_INPUT message has already been answered by a later user message */
|
|
112
116
|
requestInputAnswered?: boolean;
|
|
113
117
|
/** Sparse per-type overrides for MESSAGE_STYLES (deep-merged with defaults) */
|
|
@@ -197,6 +201,7 @@ function MessageItemComponent({
|
|
|
197
201
|
message,
|
|
198
202
|
showPulsatingCircle = false,
|
|
199
203
|
onSendMessage,
|
|
204
|
+
onOpenArtifact,
|
|
200
205
|
requestInputAnswered = false,
|
|
201
206
|
className,
|
|
202
207
|
cardClassName,
|
|
@@ -304,6 +309,13 @@ function MessageItemComponent({
|
|
|
304
309
|
|
|
305
310
|
const visibleMessageContent = parsedUserAttachments?.body ?? messageContent;
|
|
306
311
|
const messageAttachments = parsedUserAttachments?.attachments ?? [];
|
|
312
|
+
const editingAction = useMemo(
|
|
313
|
+
() =>
|
|
314
|
+
message.type === AgentMessageType.QUESTION
|
|
315
|
+
? parseMarkdownEditingAction(message.details?.editing_action)
|
|
316
|
+
: undefined,
|
|
317
|
+
[message.details, message.type],
|
|
318
|
+
);
|
|
307
319
|
|
|
308
320
|
// PERFORMANCE: Memoize processed content - expensive regex operations only run when messageContent changes
|
|
309
321
|
const processedContent = useMemo(() => {
|
|
@@ -367,52 +379,13 @@ function MessageItemComponent({
|
|
|
367
379
|
// PERFORMANCE: Memoize markdown components to prevent MarkdownRenderer remounts
|
|
368
380
|
const markdownComponents = useMemo(
|
|
369
381
|
() => ({
|
|
370
|
-
a: ({
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
...props
|
|
374
|
-
}: {
|
|
375
|
-
node?: unknown;
|
|
376
|
-
ref?: unknown;
|
|
377
|
-
href?: string;
|
|
378
|
-
children?: React.ReactNode;
|
|
379
|
-
}) => {
|
|
380
|
-
const href = props.href || '';
|
|
382
|
+
a: createAgentMarkdownAnchor({
|
|
383
|
+
StoreLinkComponent,
|
|
384
|
+
CollectionLinkComponent,
|
|
381
385
|
// Carry the active account (`a`) & project (`p`) params on internal routes so
|
|
382
386
|
// copy-link / open-in-new-tab preserve the current tenant.
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
if (StoreLinkComponent) {
|
|
386
|
-
const documentId = href.split('/store/objects/')[1] || '';
|
|
387
|
-
return (
|
|
388
|
-
<StoreLinkComponent href={withParams} documentId={documentId}>
|
|
389
|
-
{props.children}
|
|
390
|
-
</StoreLinkComponent>
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
return (
|
|
394
|
-
<NavLink href={withParams} topLevelNav>
|
|
395
|
-
{props.children}
|
|
396
|
-
</NavLink>
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
if (href.includes('/store/collections')) {
|
|
400
|
-
if (CollectionLinkComponent) {
|
|
401
|
-
const collectionId = href.split('/store/collections/')[1] || '';
|
|
402
|
-
return (
|
|
403
|
-
<CollectionLinkComponent href={withParams} collectionId={collectionId}>
|
|
404
|
-
{props.children}
|
|
405
|
-
</CollectionLinkComponent>
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
return (
|
|
409
|
-
<NavLink href={withParams} topLevelNav>
|
|
410
|
-
{props.children}
|
|
411
|
-
</NavLink>
|
|
412
|
-
);
|
|
413
|
-
}
|
|
414
|
-
return <a {...props} target="_blank" rel="noopener noreferrer" />;
|
|
415
|
-
},
|
|
387
|
+
addStickyParams: (href: string) => router.getTopRouter().navigator.addStickyParams(href),
|
|
388
|
+
}),
|
|
416
389
|
img: ({ node, ref, ...props }: { node?: unknown; ref?: unknown; src?: string; alt?: string }) => {
|
|
417
390
|
return (
|
|
418
391
|
<Button
|
|
@@ -466,6 +439,7 @@ function MessageItemComponent({
|
|
|
466
439
|
>
|
|
467
440
|
<MarkdownRenderer
|
|
468
441
|
artifactRunId={runId}
|
|
442
|
+
onArtifactOpen={onOpenArtifact}
|
|
469
443
|
onProposalSelect={(optionId) => onSendMessage?.(optionId)}
|
|
470
444
|
onProposalSubmit={(text) => onSendMessage?.(text)}
|
|
471
445
|
components={markdownComponents}
|
|
@@ -651,17 +625,33 @@ function MessageItemComponent({
|
|
|
651
625
|
variant={askUserUx.variant}
|
|
652
626
|
multiSelect={askUserUx.multiSelect}
|
|
653
627
|
onSelect={(optionId) =>
|
|
654
|
-
|
|
628
|
+
sendRequestInputResponse(
|
|
629
|
+
onSendMessage,
|
|
630
|
+
message,
|
|
631
|
+
optionId,
|
|
632
|
+
getToolApprovalResponseMetadata(message, optionId),
|
|
633
|
+
)
|
|
634
|
+
}
|
|
635
|
+
onMultiSelect={(optionIds) =>
|
|
636
|
+
sendRequestInputResponse(onSendMessage, message, optionIds.join(', '))
|
|
655
637
|
}
|
|
656
|
-
onMultiSelect={(optionIds) => onSendMessage?.(optionIds.join(', '))}
|
|
657
638
|
allowFreeResponse={!askUserUx.options?.length || !!askUserUx.free_response}
|
|
658
639
|
placeholder={askUserUx.free_response?.placeholder}
|
|
659
640
|
submitLabel={askUserUx.free_response?.submit_label}
|
|
660
|
-
onSubmit={(value) =>
|
|
641
|
+
onSubmit={(value) =>
|
|
642
|
+
sendRequestInputResponse(
|
|
643
|
+
onSendMessage,
|
|
644
|
+
message,
|
|
645
|
+
value,
|
|
646
|
+
askUserUx.free_response?.metadata,
|
|
647
|
+
)
|
|
648
|
+
}
|
|
661
649
|
hideBorder
|
|
662
650
|
compact
|
|
663
651
|
answered={requestInputAnswered}
|
|
664
652
|
/>
|
|
653
|
+
) : editingAction ? (
|
|
654
|
+
<DocumentEditingActionCard action={editingAction} />
|
|
665
655
|
) : (
|
|
666
656
|
visibleMessageContent && (
|
|
667
657
|
<div
|
|
@@ -677,6 +667,7 @@ function MessageItemComponent({
|
|
|
677
667
|
<AttachmentPreviewList
|
|
678
668
|
items={messageAttachments}
|
|
679
669
|
artifactRunId={runId}
|
|
670
|
+
onOpenArtifact={onOpenArtifact}
|
|
680
671
|
variant="message"
|
|
681
672
|
className={cn(visibleMessageContent && 'mt-3')}
|
|
682
673
|
StoreLinkComponent={StoreLinkComponent}
|
|
@@ -723,7 +714,13 @@ function MessageItemComponent({
|
|
|
723
714
|
variant="outline"
|
|
724
715
|
size="xs"
|
|
725
716
|
className="px-2 py-1 text-xs"
|
|
726
|
-
onClick={() =>
|
|
717
|
+
onClick={() => {
|
|
718
|
+
if (/\.md$/i.test(artifactPath) && onOpenArtifact) {
|
|
719
|
+
onOpenArtifact(artifactPath);
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
window.open(url, '_blank');
|
|
723
|
+
}}
|
|
727
724
|
title={artifactPath}
|
|
728
725
|
>
|
|
729
726
|
{displayName}
|
|
@@ -790,6 +787,7 @@ const MessageItem = memo(MessageItemComponent, (prevProps, nextProps) => {
|
|
|
790
787
|
prevProps.message.workflow_run_id === nextProps.message.workflow_run_id &&
|
|
791
788
|
prevProps.showPulsatingCircle === nextProps.showPulsatingCircle &&
|
|
792
789
|
prevProps.onSendMessage === nextProps.onSendMessage &&
|
|
790
|
+
prevProps.onOpenArtifact === nextProps.onOpenArtifact &&
|
|
793
791
|
prevProps.requestInputAnswered === nextProps.requestInputAnswered &&
|
|
794
792
|
prevProps.messageStyleOverrides === nextProps.messageStyleOverrides &&
|
|
795
793
|
MESSAGE_ITEM_CLASS_NAME_KEYS.every((key) => prevProps[key] === nextProps[key])
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AgentResourceReference } from '@vertesia/common';
|
|
2
|
+
import { Button, cn } from '@vertesia/ui/core';
|
|
3
|
+
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { ResourceChipList } from './ResourceChip';
|
|
6
|
+
|
|
7
|
+
const COLLAPSE_THRESHOLD = 5;
|
|
8
|
+
|
|
9
|
+
interface ResourceChangeSummaryProps {
|
|
10
|
+
resources: AgentResourceReference[];
|
|
11
|
+
workflowRunId?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* End-of-turn summary listing every resource the assistant created/updated/deleted during the turn,
|
|
17
|
+
* as deep-linkable chips. Rendered once the turn is complete, from structured tool metadata rather
|
|
18
|
+
* than parsed prose. Collapses to the first few entries with a "view all" toggle when long.
|
|
19
|
+
*/
|
|
20
|
+
export function ResourceChangeSummary({ resources, workflowRunId, className }: ResourceChangeSummaryProps) {
|
|
21
|
+
const { t } = useUITranslation();
|
|
22
|
+
const [expanded, setExpanded] = useState(false);
|
|
23
|
+
|
|
24
|
+
if (resources.length === 0) return null;
|
|
25
|
+
|
|
26
|
+
const collapsible = resources.length > COLLAPSE_THRESHOLD;
|
|
27
|
+
const visible = collapsible && !expanded ? resources.slice(0, COLLAPSE_THRESHOLD) : resources;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={cn('mx-auto w-full max-w-3xl py-2', className)} data-agent-resource-summary>
|
|
31
|
+
<div className="mb-2 text-xs font-medium text-muted">{t('agent.resourcesChanged')}</div>
|
|
32
|
+
<ResourceChipList resources={visible} workflowRunId={workflowRunId} />
|
|
33
|
+
{collapsible && (
|
|
34
|
+
<Button variant="outline" size="xs" className="mt-2" onClick={() => setExpanded((prev) => !prev)}>
|
|
35
|
+
{expanded ? t('agent.resourceShowLess') : t('agent.resourceViewAll', { total: resources.length })}
|
|
36
|
+
</Button>
|
|
37
|
+
)}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|