@vertesia/ui 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260826.064249Z
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/README.md +1 -7
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/core/components/shadcn/filters/filters.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filters.js +1 -1
- package/lib/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/core/components/shadcn/index.d.ts +1 -0
- package/lib/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/core/components/shadcn/index.js +1 -0
- package/lib/core/components/shadcn/index.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +1 -3
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/overflowTabs.d.ts +59 -0
- package/lib/core/components/shadcn/overflowTabs.d.ts.map +1 -0
- package/lib/core/components/shadcn/overflowTabs.js +173 -0
- package/lib/core/components/shadcn/overflowTabs.js.map +1 -0
- package/lib/core/components/shadcn/selectBox.js +2 -2
- package/lib/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.d.ts +3 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.js +8 -9
- package/lib/core/components/shadcn/theme/ThemeProvider.js.map +1 -1
- package/lib/core/utils/dayjs.d.ts +12 -0
- package/lib/core/utils/dayjs.d.ts.map +1 -0
- package/lib/core/utils/dayjs.js +16 -0
- package/lib/core/utils/dayjs.js.map +1 -0
- package/lib/env/index.d.ts +17 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +18 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +1 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js +22 -5
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +3 -135
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +19 -4
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +99 -29
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +10 -9
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +5 -8
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +45 -4
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +3 -3
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +9 -121
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js +19 -11
- package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.js +11 -3
- package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +3 -0
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.js +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +14 -2
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +20 -2
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.d.ts +3 -3
- package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.js +6 -1
- package/lib/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/features/facets/DocumentsFacetsNav.d.ts +3 -3
- package/lib/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/DocumentsFacetsNav.js +20 -8
- package/lib/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.d.ts +3 -3
- package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.js +11 -1
- package/lib/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts +3 -3
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +6 -1
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/facets/RunsFacetsNav.d.ts +4 -14
- package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/RunsFacetsNav.js +26 -15
- package/lib/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts +4 -3
- package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/WorkflowExecutionsFacetsNav.js +18 -10
- package/lib/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
- package/lib/features/facets/index.d.ts +1 -1
- package/lib/features/facets/index.d.ts.map +1 -1
- package/lib/features/facets/index.js.map +1 -1
- package/lib/features/facets/utils/SearchInterface.d.ts +4 -3
- package/lib/features/facets/utils/SearchInterface.d.ts.map +1 -1
- package/lib/features/facets/utils/SearchInterface.js +4 -0
- package/lib/features/facets/utils/SearchInterface.js.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.d.ts +8 -1
- package/lib/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.js +9 -1
- package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.d.ts +3 -2
- package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.js +51 -64
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +2 -2
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.d.ts +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js +2 -2
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/useMcpConnections.d.ts +4 -5
- package/lib/features/oauth/useMcpConnections.d.ts.map +1 -1
- package/lib/features/oauth/useMcpConnections.js +20 -4
- package/lib/features/oauth/useMcpConnections.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.d.ts.map +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.js +9 -11
- package/lib/features/pdf-viewer/PdfPageRenderer.js.map +1 -1
- package/lib/features/pdf-viewer/lazyReactPdf.d.ts +10 -0
- package/lib/features/pdf-viewer/lazyReactPdf.d.ts.map +1 -0
- package/lib/features/pdf-viewer/lazyReactPdf.js +25 -0
- package/lib/features/pdf-viewer/lazyReactPdf.js.map +1 -0
- package/lib/features/store/collections/CollectionsTable.d.ts.map +1 -1
- package/lib/features/store/collections/CollectionsTable.js +1 -3
- package/lib/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/features/store/collections/EditCollectionView.js +1 -1
- package/lib/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/features/store/objects/ExportPropertiesModal.d.ts +3 -1
- package/lib/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/features/store/objects/ExportPropertiesModal.js +5 -5
- package/lib/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +4 -10
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.js +8 -3
- package/lib/features/store/objects/components/TextEditorPanel.js.map +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +1 -5
- package/lib/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts +29 -62
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js +2 -0
- package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.d.ts +6 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js +4 -3
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js +2 -2
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +1 -3
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +11 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.js +6 -2
- package/lib/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.js +2 -0
- package/lib/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +272 -0
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +271 -0
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +2 -4
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/views/ViewActions.d.ts +32 -0
- package/lib/features/views/ViewActions.d.ts.map +1 -0
- package/lib/features/views/ViewActions.js +186 -0
- package/lib/features/views/ViewActions.js.map +1 -0
- package/lib/features/views/ViewDropTarget.d.ts +15 -0
- package/lib/features/views/ViewDropTarget.d.ts.map +1 -0
- package/lib/features/views/ViewDropTarget.js +79 -0
- package/lib/features/views/ViewDropTarget.js.map +1 -0
- package/lib/features/views/ViewExperience.d.ts +3 -2
- package/lib/features/views/ViewExperience.d.ts.map +1 -1
- package/lib/features/views/ViewExperience.js +103 -12
- package/lib/features/views/ViewExperience.js.map +1 -1
- package/lib/features/views/ViewNavigation.d.ts +1 -1
- package/lib/features/views/ViewNavigation.d.ts.map +1 -1
- package/lib/features/views/ViewNavigation.js +14 -5
- package/lib/features/views/ViewNavigation.js.map +1 -1
- package/lib/features/views/ViewResults.d.ts +1 -1
- package/lib/features/views/ViewResults.d.ts.map +1 -1
- package/lib/features/views/ViewResults.js +124 -34
- package/lib/features/views/ViewResults.js.map +1 -1
- package/lib/features/views/index.d.ts +1 -0
- package/lib/features/views/index.d.ts.map +1 -1
- package/lib/features/views/index.js +1 -0
- package/lib/features/views/index.js.map +1 -1
- package/lib/features/views/types.d.ts +46 -1
- package/lib/features/views/types.d.ts.map +1 -1
- package/lib/features/views/viewState.d.ts.map +1 -1
- package/lib/features/views/viewState.js +34 -0
- package/lib/features/views/viewState.js.map +1 -1
- package/lib/i18n/LanguageProvider.d.ts +3 -1
- package/lib/i18n/LanguageProvider.d.ts.map +1 -1
- package/lib/i18n/LanguageProvider.js +9 -7
- package/lib/i18n/LanguageProvider.js.map +1 -1
- package/lib/i18n/instance.d.ts +2 -0
- package/lib/i18n/instance.d.ts.map +1 -1
- package/lib/i18n/instance.js +45 -26
- package/lib/i18n/instance.js.map +1 -1
- package/lib/i18n/locales/ar.json +261 -15
- package/lib/i18n/locales/de.json +259 -13
- package/lib/i18n/locales/en.json +30 -4
- package/lib/i18n/locales/es.json +260 -14
- package/lib/i18n/locales/fr.json +259 -13
- package/lib/i18n/locales/it.json +259 -13
- package/lib/i18n/locales/ja.json +257 -10
- package/lib/i18n/locales/ko.json +257 -10
- package/lib/i18n/locales/pt.json +259 -13
- package/lib/i18n/locales/ru.json +256 -10
- package/lib/i18n/locales/tr.json +256 -10
- package/lib/i18n/locales/zh-TW.json +257 -10
- package/lib/i18n/locales/zh.json +257 -10
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +8 -16
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +25 -19
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/firebase.js +1 -1
- package/lib/session/auth/firebase.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +2 -1
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/AppInstallationProvider.d.ts +4 -2
- package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
- package/lib/shell/apps/IframeAppContextSync.d.ts +3 -0
- package/lib/shell/apps/IframeAppContextSync.d.ts.map +1 -0
- package/lib/shell/apps/IframeAppContextSync.js +95 -0
- package/lib/shell/apps/IframeAppContextSync.js.map +1 -0
- package/lib/shell/apps/iframe-auth.d.ts +55 -0
- package/lib/shell/apps/iframe-auth.d.ts.map +1 -0
- package/lib/shell/apps/iframe-auth.js +154 -0
- package/lib/shell/apps/iframe-auth.js.map +1 -0
- package/lib/shell/apps/index.d.ts +2 -0
- package/lib/shell/apps/index.d.ts.map +1 -1
- package/lib/shell/apps/index.js +2 -0
- package/lib/shell/apps/index.js.map +1 -1
- package/lib/vertesia-ui-core.js +4 -4
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +32 -34
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +16 -16
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +4 -4
- package/lib/vertesia-ui-rich-text.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +20 -20
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.js +43 -2
- package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
- package/lib/widgets/markdown/MermaidDiagram.js +35 -22
- package/lib/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +14 -10
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
- package/package.json +24 -29
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filters.tsx +1 -1
- package/src/core/components/shadcn/index.ts +1 -0
- package/src/core/components/shadcn/modal/dialog.test.tsx +35 -0
- package/src/core/components/shadcn/modal/dialog.tsx +0 -4
- package/src/core/components/shadcn/overflowTabs.tsx +320 -0
- package/src/core/components/shadcn/selectBox.tsx +2 -2
- package/src/core/components/shadcn/theme/ThemeProvider.tsx +10 -9
- package/src/core/utils/dayjs.ts +17 -0
- package/src/css/base.css +78 -0
- package/src/env/index.test.ts +94 -0
- package/src/env/index.ts +36 -1
- package/src/features/agent/PayloadBuilder.test.ts +68 -0
- package/src/features/agent/PayloadBuilder.tsx +28 -4
- package/src/features/agent/chat/AgentRightPanel.tsx +2 -252
- package/src/features/agent/chat/ArtifactsTab.tsx +1 -0
- package/src/features/agent/chat/AskUserWidget.test.tsx +20 -1
- package/src/features/agent/chat/AskUserWidget.tsx +22 -6
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +160 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +111 -31
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +86 -67
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +90 -7
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +4 -6
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.test.ts +103 -1
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +50 -4
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +18 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +37 -167
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +94 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +19 -10
- package/src/features/agent/chat/VegaLiteChart.tsx +32 -14
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +18 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +3 -0
- package/src/features/document-viewer/UniversalDocumentViewer.tsx +1 -1
- package/src/features/facets/AgentRunnerFacetsNav.tsx +44 -4
- package/src/features/facets/CollectionsFacetsNav.tsx +15 -4
- package/src/features/facets/DocumentsFacetsNav.tsx +25 -8
- package/src/features/facets/FacetQueryHandlers.test.ts +84 -0
- package/src/features/facets/InteractionsFacetsNav.tsx +20 -4
- package/src/features/facets/PromptsFacetsNav.tsx +15 -4
- package/src/features/facets/RunsFacetsNav.test.ts +59 -0
- package/src/features/facets/RunsFacetsNav.tsx +40 -30
- package/src/features/facets/WorkflowExecutionsFacetsNav.test.ts +57 -0
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +36 -16
- package/src/features/facets/index.ts +1 -0
- package/src/features/facets/utils/SearchInterface.tsx +12 -3
- package/src/features/layout/GenericPageNavHeader.tsx +16 -0
- package/src/features/magic-pdf/DownloadPopover.tsx +1 -2
- package/src/features/magic-pdf/GroundedExtractionView.test.tsx +7 -1
- package/src/features/magic-pdf/GroundedExtractionView.tsx +162 -242
- package/src/features/oauth/McpConnectionsButton.test.tsx +18 -1
- package/src/features/oauth/McpConnectionsButton.tsx +6 -2
- package/src/features/oauth/McpConnectionsDialog.tsx +3 -3
- package/src/features/oauth/useMcpConnections.test.ts +1 -0
- package/src/features/oauth/useMcpConnections.ts +24 -7
- package/src/features/pdf-viewer/PdfPageRenderer.tsx +76 -71
- package/src/features/pdf-viewer/lazyReactPdf.ts +33 -0
- package/src/features/store/collections/CollectionsTable.tsx +1 -4
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/objects/ExportPropertiesModal.tsx +25 -16
- package/src/features/store/objects/components/ContentOverview.tsx +2 -28
- package/src/features/store/objects/components/TextEditorPanel.tsx +13 -3
- package/src/features/store/objects/layout/renderers.tsx +1 -6
- package/src/features/store/objects/search/DocumentSearchContext.ts +4 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +10 -3
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +15 -6
- package/src/features/store/types/ContentObjectTypesTable.tsx +1 -4
- package/src/features/store/types/IntakePolicyEditor.tsx +11 -1
- package/src/features/store/types/ObjectSchemaEditor.tsx +6 -2
- package/src/features/store/types/TableLayoutEditor.tsx +2 -0
- package/src/features/user/UserInfo.test.tsx +10 -0
- package/src/features/user/UserInfo.tsx +2 -7
- package/src/features/views/ViewActions.test.tsx +80 -0
- package/src/features/views/ViewActions.tsx +352 -0
- package/src/features/views/ViewDropTarget.test.tsx +150 -0
- package/src/features/views/ViewDropTarget.tsx +140 -0
- package/src/features/views/ViewExperience.test.tsx +72 -0
- package/src/features/views/ViewExperience.tsx +189 -22
- package/src/features/views/ViewMedia.test.tsx +180 -0
- package/src/features/views/ViewNavigation.test.tsx +42 -0
- package/src/features/views/ViewNavigation.tsx +43 -5
- package/src/features/views/ViewResults.tsx +243 -26
- package/src/features/views/index.ts +1 -0
- package/src/features/views/types.ts +50 -0
- package/src/features/views/viewState.test.ts +7 -1
- package/src/features/views/viewState.ts +32 -0
- package/src/i18n/LanguageProvider.tsx +15 -8
- package/src/i18n/instance.test.ts +30 -0
- package/src/i18n/instance.ts +67 -40
- package/src/i18n/locales/ar.json +1157 -911
- package/src/i18n/locales/de.json +1113 -867
- package/src/i18n/locales/en.json +30 -4
- package/src/i18n/locales/es.json +1124 -878
- package/src/i18n/locales/fr.json +1124 -878
- package/src/i18n/locales/it.json +1124 -878
- package/src/i18n/locales/ja.json +1113 -866
- package/src/i18n/locales/ko.json +1113 -866
- package/src/i18n/locales/pt.json +1124 -878
- package/src/i18n/locales/ru.json +1135 -889
- package/src/i18n/locales/tr.json +1113 -867
- package/src/i18n/locales/zh-TW.json +1113 -866
- package/src/i18n/locales/zh.json +1113 -866
- package/src/i18n/rtl.test.ts +16 -7
- package/src/rich-text/VertesiaRichTextEditor.test.tsx +33 -1
- package/src/session/UserSessionProvider.tsx +8 -20
- package/src/session/auth/composable.scope.test.ts +1 -1
- package/src/session/auth/composable.test.ts +61 -1
- package/src/session/auth/composable.ts +29 -23
- package/src/session/auth/firebase.ts +1 -1
- package/src/shell/VertesiaShell.tsx +2 -0
- package/src/shell/apps/IframeAppContextSync.test.tsx +196 -0
- package/src/shell/apps/IframeAppContextSync.tsx +101 -0
- package/src/shell/apps/iframe-auth.test.ts +118 -0
- package/src/shell/apps/iframe-auth.ts +193 -0
- package/src/shell/apps/index.ts +2 -0
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +12 -3
- package/src/widgets/markdown/MarkdownRenderer.tsx +50 -2
- package/src/widgets/markdown/MermaidDiagram.tsx +38 -22
- package/src/widgets/monacoEditor/MonacoEditor.tsx +27 -20
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +0 -25
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +0 -1
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +0 -42
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +0 -1
- package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +0 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FacetBucket } from '@vertesia/common';
|
|
1
|
+
import type { ComplexCollectionSearchQuery, FacetBucket } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -9,14 +9,22 @@ import {
|
|
|
9
9
|
} from '@vertesia/ui/core';
|
|
10
10
|
import { useState } from 'react';
|
|
11
11
|
import { useTypeRegistry } from '../store/types/TypeRegistryProvider.js';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
createSearchQueryKeyGuard,
|
|
14
|
+
filterValueToQueryValue,
|
|
15
|
+
type SearchInterface,
|
|
16
|
+
setSearchQueryValue,
|
|
17
|
+
} from './utils/SearchInterface';
|
|
18
|
+
|
|
19
|
+
const collectionFilterNames = ['name', 'types'] as const satisfies readonly (keyof ComplexCollectionSearchQuery)[];
|
|
20
|
+
const isCollectionFilterName = createSearchQueryKeyGuard<ComplexCollectionSearchQuery>(collectionFilterNames);
|
|
13
21
|
|
|
14
22
|
interface CollectionsFacetsNavProps {
|
|
15
23
|
facets: {
|
|
16
24
|
type?: FacetBucket[];
|
|
17
25
|
dynamic?: FacetBucket[];
|
|
18
26
|
};
|
|
19
|
-
search: SearchInterface
|
|
27
|
+
search: SearchInterface<ComplexCollectionSearchQuery>;
|
|
20
28
|
/**
|
|
21
29
|
* Optional controlled filter state. When provided, the parent owns the filter list (and is
|
|
22
30
|
* responsible for translating it into the search query via {@link useCollectionsFilterHandler}).
|
|
@@ -70,7 +78,7 @@ export function useCollectionsFilterGroups(facets: CollectionsFacetsNavProps['fa
|
|
|
70
78
|
}
|
|
71
79
|
|
|
72
80
|
// Hook to create filter change handler for collections
|
|
73
|
-
export function useCollectionsFilterHandler(search: SearchInterface) {
|
|
81
|
+
export function useCollectionsFilterHandler(search: SearchInterface<ComplexCollectionSearchQuery>) {
|
|
74
82
|
return (newFilters: BaseFilter[]) => {
|
|
75
83
|
if (newFilters.length === 0) {
|
|
76
84
|
// Clear filters without applying defaults - user wants to remove all filters
|
|
@@ -83,6 +91,9 @@ export function useCollectionsFilterHandler(search: SearchInterface) {
|
|
|
83
91
|
|
|
84
92
|
newFilters.forEach((filter) => {
|
|
85
93
|
if (filter.value && filter.value.length > 0) {
|
|
94
|
+
if (!isCollectionFilterName(filter.name)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
86
97
|
const filterName = filter.name;
|
|
87
98
|
const filterValue = filterValueToQueryValue(filter);
|
|
88
99
|
setSearchQueryValue(search, filterName, filterValue);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComputedFacetResponse } from '@vertesia/common';
|
|
1
|
+
import type { ComplexSearchQuery, ComputedFacetResponse } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { useState } from 'react';
|
|
12
12
|
import { useTypeRegistry } from '../store/types/TypeRegistryProvider.js';
|
|
13
13
|
import {
|
|
14
|
+
createSearchQueryKeyGuard,
|
|
14
15
|
filterValueToQueryValue,
|
|
15
16
|
type SearchInterface,
|
|
16
17
|
setSearchQueryValue,
|
|
@@ -19,9 +20,24 @@ import {
|
|
|
19
20
|
import { VStringFacet } from './utils/VStringFacet';
|
|
20
21
|
import { VTypeFacet } from './utils/VTypeFacet';
|
|
21
22
|
|
|
23
|
+
const documentQueryFilterNames = [
|
|
24
|
+
'id',
|
|
25
|
+
'name',
|
|
26
|
+
'types',
|
|
27
|
+
'status',
|
|
28
|
+
] as const satisfies readonly (keyof ComplexSearchQuery)[];
|
|
29
|
+
const documentMatchFilterNames = ['tags', 'created_at', 'updated_at'] as const;
|
|
30
|
+
const isDocumentQueryFilterName = createSearchQueryKeyGuard<ComplexSearchQuery>(documentQueryFilterNames);
|
|
31
|
+
const documentMatchFilterNameSet = new Set<string>(documentMatchFilterNames);
|
|
32
|
+
type DocumentMatchFilterName = (typeof documentMatchFilterNames)[number];
|
|
33
|
+
|
|
34
|
+
function isDocumentMatchFilterName(name: string): name is DocumentMatchFilterName {
|
|
35
|
+
return documentMatchFilterNameSet.has(name);
|
|
36
|
+
}
|
|
37
|
+
|
|
22
38
|
interface DocumentsFacetsNavProps {
|
|
23
39
|
facets: ComputedFacetResponse;
|
|
24
|
-
search: SearchInterface
|
|
40
|
+
search: SearchInterface<ComplexSearchQuery>;
|
|
25
41
|
}
|
|
26
42
|
|
|
27
43
|
function getBuckets(value: ComputedFacetResponse[string]) {
|
|
@@ -100,7 +116,7 @@ export function useDocumentFilterGroups(facets: DocumentsFacetsNavProps['facets'
|
|
|
100
116
|
}
|
|
101
117
|
|
|
102
118
|
// Hook to create filter change handler for documents
|
|
103
|
-
export function useDocumentFilterHandler(search: SearchInterface) {
|
|
119
|
+
export function useDocumentFilterHandler(search: SearchInterface<ComplexSearchQuery>) {
|
|
104
120
|
return (newFilters: BaseFilter[]) => {
|
|
105
121
|
if (newFilters.length === 0) {
|
|
106
122
|
search.clearFilters();
|
|
@@ -138,12 +154,13 @@ export function useDocumentFilterHandler(search: SearchInterface) {
|
|
|
138
154
|
filterValue = filterValueToQueryValue(filter);
|
|
139
155
|
}
|
|
140
156
|
|
|
141
|
-
if (filterName
|
|
142
|
-
setSearchQueryValue(search, 'name', filterValue);
|
|
143
|
-
} else if (filterName === 'id') {
|
|
144
|
-
setSearchQueryValue(search, 'id', filterValue);
|
|
145
|
-
} else {
|
|
157
|
+
if (isDocumentQueryFilterName(filterName)) {
|
|
146
158
|
setSearchQueryValue(search, filterName, filterValue);
|
|
159
|
+
} else if (isDocumentMatchFilterName(filterName) && filterValue !== undefined) {
|
|
160
|
+
search.query.match = {
|
|
161
|
+
...search.query.match,
|
|
162
|
+
[filterName]: filterValue,
|
|
163
|
+
};
|
|
147
164
|
}
|
|
148
165
|
}
|
|
149
166
|
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ComplexCollectionSearchQuery,
|
|
3
|
+
ComplexSearchQuery,
|
|
4
|
+
InteractionSearchQuery,
|
|
5
|
+
PromptSearchQuery,
|
|
6
|
+
} from '@vertesia/common';
|
|
7
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
8
|
+
import type { AgentRunnerFilterQuery } from './AgentRunnerFacetsNav.js';
|
|
9
|
+
import { createAgentRunnerFilterHandler } from './AgentRunnerFacetsNav.js';
|
|
10
|
+
import { useCollectionsFilterHandler } from './CollectionsFacetsNav.js';
|
|
11
|
+
import { useDocumentFilterHandler } from './DocumentsFacetsNav.js';
|
|
12
|
+
import { useInteractionsFilterHandler } from './InteractionsFacetsNav.js';
|
|
13
|
+
import { usePromptsFilterHandler } from './PromptsFacetsNav.js';
|
|
14
|
+
import type { SearchInterface } from './utils/SearchInterface.js';
|
|
15
|
+
|
|
16
|
+
function createSearch<Query extends object>(): SearchInterface<Query> {
|
|
17
|
+
return {
|
|
18
|
+
query: {} as Query,
|
|
19
|
+
isRunning: false,
|
|
20
|
+
getFilterValue: vi.fn(),
|
|
21
|
+
setFilterValue: vi.fn(),
|
|
22
|
+
clearFilters: vi.fn(),
|
|
23
|
+
search: vi.fn().mockResolvedValue(true),
|
|
24
|
+
setDefaultKeys: vi.fn(),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe('facet query handlers', () => {
|
|
29
|
+
it('only writes supported collection query keys', () => {
|
|
30
|
+
const search = createSearch<ComplexCollectionSearchQuery>();
|
|
31
|
+
useCollectionsFilterHandler(search)([
|
|
32
|
+
{ name: 'name', type: 'text', value: [{ value: 'Policies' }] },
|
|
33
|
+
{ name: 'unsupported', type: 'text', value: [{ value: 'ignored' }] },
|
|
34
|
+
]);
|
|
35
|
+
expect(search.query).toEqual({ name: 'Policies' });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('only writes supported prompt query keys', () => {
|
|
39
|
+
const search = createSearch<PromptSearchQuery>();
|
|
40
|
+
usePromptsFilterHandler(search)([
|
|
41
|
+
{ name: 'tags', type: 'stringList', multiple: true, value: ['reviewed'] },
|
|
42
|
+
{ name: 'unsupported', type: 'text', value: [{ value: 'ignored' }] },
|
|
43
|
+
]);
|
|
44
|
+
expect(search.query).toEqual({ tags: ['reviewed'] });
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('only writes supported interaction query keys', () => {
|
|
48
|
+
const search = createSearch<InteractionSearchQuery>();
|
|
49
|
+
useInteractionsFilterHandler(search)([
|
|
50
|
+
{ name: 'model', type: 'text', value: [{ value: 'model-1' }] },
|
|
51
|
+
{ name: 'unsupported', type: 'text', value: [{ value: 'ignored' }] },
|
|
52
|
+
]);
|
|
53
|
+
expect(search.query).toEqual({ model: 'model-1' });
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('nests document match filters instead of adding unsupported top-level properties', () => {
|
|
57
|
+
const search = createSearch<ComplexSearchQuery>();
|
|
58
|
+
useDocumentFilterHandler(search)([
|
|
59
|
+
{ name: 'tags', type: 'stringList', multiple: true, value: ['legal'] },
|
|
60
|
+
{
|
|
61
|
+
name: 'created_at',
|
|
62
|
+
type: 'date',
|
|
63
|
+
multiple: true,
|
|
64
|
+
value: [{ value: '2026-01-01' }, { value: '2026-01-31' }],
|
|
65
|
+
},
|
|
66
|
+
{ name: 'unsupported', type: 'text', value: [{ value: 'ignored' }] },
|
|
67
|
+
]);
|
|
68
|
+
expect(search.query).toEqual({
|
|
69
|
+
match: {
|
|
70
|
+
tags: ['legal'],
|
|
71
|
+
created_at: { gte: '2026-01-01', lte: '2026-01-31' },
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('only writes supported agent runner adapter keys', () => {
|
|
77
|
+
const search = createSearch<AgentRunnerFilterQuery>();
|
|
78
|
+
createAgentRunnerFilterHandler(search)([
|
|
79
|
+
{ name: 'initiated_by', type: 'text', value: [{ value: 'user-1' }] },
|
|
80
|
+
{ name: 'started_by', type: 'text', value: [{ value: 'ignored' }] },
|
|
81
|
+
]);
|
|
82
|
+
expect(search.query).toEqual({ initiated_by: 'user-1' });
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComputedFacetResponse } from '@vertesia/common';
|
|
1
|
+
import type { ComputedFacetResponse, InteractionSearchQuery } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -8,11 +8,24 @@ import {
|
|
|
8
8
|
FilterProvider,
|
|
9
9
|
} from '@vertesia/ui/core';
|
|
10
10
|
import { useState } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
createSearchQueryKeyGuard,
|
|
13
|
+
filterValueToQueryValue,
|
|
14
|
+
type SearchInterface,
|
|
15
|
+
setSearchQueryValue,
|
|
16
|
+
} from './utils/SearchInterface';
|
|
17
|
+
|
|
18
|
+
const interactionFilterNames = [
|
|
19
|
+
'name',
|
|
20
|
+
'prompt',
|
|
21
|
+
'model',
|
|
22
|
+
'tags',
|
|
23
|
+
] as const satisfies readonly (keyof InteractionSearchQuery)[];
|
|
24
|
+
const isInteractionFilterName = createSearchQueryKeyGuard<InteractionSearchQuery>(interactionFilterNames);
|
|
12
25
|
|
|
13
26
|
interface InteractionsFacetsNavProps {
|
|
14
27
|
facets: ComputedFacetResponse;
|
|
15
|
-
search: SearchInterface
|
|
28
|
+
search: SearchInterface<InteractionSearchQuery>;
|
|
16
29
|
env?: string | null;
|
|
17
30
|
/**
|
|
18
31
|
* Optional controlled filter state. When provided, the parent owns the filter list (and is
|
|
@@ -69,7 +82,7 @@ export function useInteractionsFilterGroups(facets: InteractionsFacetsNavProps['
|
|
|
69
82
|
}
|
|
70
83
|
|
|
71
84
|
// Hook to create filter change handler for interactions
|
|
72
|
-
export function useInteractionsFilterHandler(search: SearchInterface) {
|
|
85
|
+
export function useInteractionsFilterHandler(search: SearchInterface<InteractionSearchQuery>) {
|
|
73
86
|
return (newFilters: BaseFilter[]) => {
|
|
74
87
|
if (newFilters.length === 0) {
|
|
75
88
|
search.clearFilters(true, true);
|
|
@@ -82,6 +95,9 @@ export function useInteractionsFilterHandler(search: SearchInterface) {
|
|
|
82
95
|
|
|
83
96
|
newFilters.forEach((filter) => {
|
|
84
97
|
if (filter.value && filter.value.length > 0) {
|
|
98
|
+
if (!isInteractionFilterName(filter.name)) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
85
101
|
const filterName = filter.name;
|
|
86
102
|
const filterValue = filterValueToQueryValue(filter);
|
|
87
103
|
setSearchQueryValue(search, filterName, filterValue);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComputedFacetResponse, FacetBucket } from '@vertesia/common';
|
|
1
|
+
import type { ComputedFacetResponse, FacetBucket, PromptSearchQuery } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
FilterBar,
|
|
@@ -8,7 +8,15 @@ import {
|
|
|
8
8
|
FilterProvider,
|
|
9
9
|
} from '@vertesia/ui/core';
|
|
10
10
|
import { useState } from 'react';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
createSearchQueryKeyGuard,
|
|
13
|
+
filterValueToQueryValue,
|
|
14
|
+
type SearchInterface,
|
|
15
|
+
setSearchQueryValue,
|
|
16
|
+
} from './utils/SearchInterface';
|
|
17
|
+
|
|
18
|
+
const promptFilterNames = ['name', 'role', 'tags'] as const satisfies readonly (keyof PromptSearchQuery)[];
|
|
19
|
+
const isPromptFilterName = createSearchQueryKeyGuard<PromptSearchQuery>(promptFilterNames);
|
|
12
20
|
|
|
13
21
|
interface PromptsFacetsNavProps {
|
|
14
22
|
/**
|
|
@@ -18,7 +26,7 @@ interface PromptsFacetsNavProps {
|
|
|
18
26
|
* requests and could not describe a caller that asks for a different one.
|
|
19
27
|
*/
|
|
20
28
|
facets: ComputedFacetResponse;
|
|
21
|
-
search: SearchInterface
|
|
29
|
+
search: SearchInterface<PromptSearchQuery>;
|
|
22
30
|
/**
|
|
23
31
|
* Optional controlled filter state. When provided, the parent owns the filter list (and is
|
|
24
32
|
* responsible for translating it into the search query via {@link usePromptsFilterHandler}). This
|
|
@@ -81,7 +89,7 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
|
|
|
81
89
|
}
|
|
82
90
|
|
|
83
91
|
// Hook to create filter change handler for prompts
|
|
84
|
-
export function usePromptsFilterHandler(search: SearchInterface) {
|
|
92
|
+
export function usePromptsFilterHandler(search: SearchInterface<PromptSearchQuery>) {
|
|
85
93
|
return (newFilters: BaseFilter[]) => {
|
|
86
94
|
if (newFilters.length === 0) {
|
|
87
95
|
// Clear filters without applying defaults - user wants to remove all filters
|
|
@@ -94,6 +102,9 @@ export function usePromptsFilterHandler(search: SearchInterface) {
|
|
|
94
102
|
|
|
95
103
|
newFilters.forEach((filter) => {
|
|
96
104
|
if (filter.value && filter.value.length > 0) {
|
|
105
|
+
if (!isPromptFilterName(filter.name)) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
97
108
|
const filterName = filter.name;
|
|
98
109
|
const filterValue = filterValueToQueryValue(filter);
|
|
99
110
|
setSearchQueryValue(search, filterName, filterValue);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RunSearchQuery } from '@vertesia/common';
|
|
2
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import { useRunsFilterGroups, useRunsFilterHandler } from './RunsFacetsNav.js';
|
|
4
|
+
import type { SearchInterface } from './utils/SearchInterface.js';
|
|
5
|
+
|
|
6
|
+
function createSearch(): SearchInterface<RunSearchQuery> {
|
|
7
|
+
return {
|
|
8
|
+
query: {},
|
|
9
|
+
isRunning: false,
|
|
10
|
+
getFilterValue: vi.fn(),
|
|
11
|
+
setFilterValue: vi.fn(),
|
|
12
|
+
clearFilters: vi.fn(),
|
|
13
|
+
search: vi.fn().mockResolvedValue(true),
|
|
14
|
+
setDefaultKeys: vi.fn(),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe('useRunsFilterGroups', () => {
|
|
19
|
+
it('builds controls from supported facets and keeps query-only filters', () => {
|
|
20
|
+
const groups = useRunsFilterGroups({
|
|
21
|
+
interactions: [
|
|
22
|
+
{ _id: null, count: 2 },
|
|
23
|
+
{ _id: 'interaction-1', count: 3, name: 'Interaction One' },
|
|
24
|
+
],
|
|
25
|
+
finish_reason: [{ _id: null, count: 4 }],
|
|
26
|
+
environments: [{ _id: 'production', count: 5 }],
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
expect(groups.map((group) => group.name)).toEqual([
|
|
30
|
+
'run_ids',
|
|
31
|
+
'interaction',
|
|
32
|
+
'environment',
|
|
33
|
+
'tags',
|
|
34
|
+
'finish_reason',
|
|
35
|
+
'start',
|
|
36
|
+
'end',
|
|
37
|
+
'workflow_run_ids',
|
|
38
|
+
'workflow_ids',
|
|
39
|
+
]);
|
|
40
|
+
expect(groups.find((group) => group.name === 'interaction')?.options).toEqual([
|
|
41
|
+
{ label: '(3)', value: 'interaction-1' },
|
|
42
|
+
]);
|
|
43
|
+
expect(groups.find((group) => group.name === 'finish_reason')?.options).toEqual([
|
|
44
|
+
{ label: 'none (4)', value: 'none' },
|
|
45
|
+
]);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('uses the singular API environment key and ignores unsupported names', () => {
|
|
49
|
+
const search = createSearch();
|
|
50
|
+
|
|
51
|
+
useRunsFilterHandler(search)([
|
|
52
|
+
{ name: 'environment', type: 'text', value: [{ value: 'production' }] },
|
|
53
|
+
{ name: 'environments', type: 'text', value: [{ value: 'ignored' }] },
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
expect(search.query).toEqual({ environment: 'production' });
|
|
57
|
+
expect(search.search).toHaveBeenCalledOnce();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComputeRunFacetsResponse, RunSearchQuery } from '@vertesia/common';
|
|
2
2
|
import {
|
|
3
3
|
type Filter as BaseFilter,
|
|
4
4
|
Button,
|
|
@@ -10,25 +10,34 @@ import {
|
|
|
10
10
|
} from '@vertesia/ui/core';
|
|
11
11
|
import { RefreshCw } from 'lucide-react';
|
|
12
12
|
import { useState } from 'react';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
createSearchQueryKeyGuard,
|
|
15
|
+
filterValueToQueryValue,
|
|
16
|
+
type SearchInterface,
|
|
17
|
+
setSearchQueryValue,
|
|
18
|
+
} from './utils/SearchInterface';
|
|
14
19
|
import { VEnvironmentFacet } from './utils/VEnvironmentFacet';
|
|
15
|
-
import type { EnrichedFacetBucket } from './utils/VInteractionFacet';
|
|
16
20
|
import { VInteractionFacet } from './utils/VInteractionFacet';
|
|
17
21
|
import { VStringFacet } from './utils/VStringFacet';
|
|
18
|
-
|
|
22
|
+
|
|
23
|
+
const runFilterNames = [
|
|
24
|
+
'run_ids',
|
|
25
|
+
'interaction',
|
|
26
|
+
'environment',
|
|
27
|
+
'tags',
|
|
28
|
+
'model',
|
|
29
|
+
'status',
|
|
30
|
+
'finish_reason',
|
|
31
|
+
'start',
|
|
32
|
+
'end',
|
|
33
|
+
'workflow_run_ids',
|
|
34
|
+
'workflow_ids',
|
|
35
|
+
] as const satisfies readonly (keyof RunSearchQuery)[];
|
|
36
|
+
const isRunFilterName = createSearchQueryKeyGuard<RunSearchQuery>(runFilterNames);
|
|
19
37
|
|
|
20
38
|
interface RunsFacetsNavProps {
|
|
21
|
-
facets:
|
|
22
|
-
|
|
23
|
-
interactions?: EnrichedFacetBucket[];
|
|
24
|
-
environments?: FacetBucket[];
|
|
25
|
-
models?: FacetBucket[];
|
|
26
|
-
statuses?: FacetBucket[];
|
|
27
|
-
tags?: FacetBucket[];
|
|
28
|
-
finish_reason?: FacetBucket[];
|
|
29
|
-
created_by?: FacetBucket[];
|
|
30
|
-
};
|
|
31
|
-
search: SearchInterface;
|
|
39
|
+
facets: Pick<ComputeRunFacetsResponse, 'interactions' | 'environments' | 'models' | 'statuses' | 'finish_reason'>;
|
|
40
|
+
search: SearchInterface<RunSearchQuery>;
|
|
32
41
|
actions?: React.ReactNode[];
|
|
33
42
|
selectionCount?: number;
|
|
34
43
|
/**
|
|
@@ -42,6 +51,13 @@ interface RunsFacetsNavProps {
|
|
|
42
51
|
filterGroups?: FilterGroup[];
|
|
43
52
|
}
|
|
44
53
|
|
|
54
|
+
type RunFacetBucket = NonNullable<ComputeRunFacetsResponse['models']>[number];
|
|
55
|
+
type IdentifiedRunFacetBucket<T extends RunFacetBucket = RunFacetBucket> = T & { _id: string };
|
|
56
|
+
|
|
57
|
+
function identifiedBuckets<T extends RunFacetBucket>(buckets: T[]): IdentifiedRunFacetBucket<T>[] {
|
|
58
|
+
return buckets.filter((bucket): bucket is IdentifiedRunFacetBucket<T> => bucket._id !== null);
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
// Hook to create filter groups for runs
|
|
46
62
|
export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): FilterGroup[] {
|
|
47
63
|
const customFilterGroups: FilterGroup[] = [];
|
|
@@ -56,7 +72,7 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
56
72
|
|
|
57
73
|
if (facets.interactions) {
|
|
58
74
|
const interactionFilterGroup = VInteractionFacet({
|
|
59
|
-
buckets: facets.interactions
|
|
75
|
+
buckets: identifiedBuckets(facets.interactions),
|
|
60
76
|
name: 'interaction',
|
|
61
77
|
placeholder: 'Interactions',
|
|
62
78
|
});
|
|
@@ -65,8 +81,8 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
65
81
|
|
|
66
82
|
if (facets.environments) {
|
|
67
83
|
const environmentFilterGroup = VEnvironmentFacet({
|
|
68
|
-
buckets: facets.environments
|
|
69
|
-
name: '
|
|
84
|
+
buckets: identifiedBuckets(facets.environments),
|
|
85
|
+
name: 'environment',
|
|
70
86
|
});
|
|
71
87
|
customFilterGroups.push(environmentFilterGroup);
|
|
72
88
|
}
|
|
@@ -82,7 +98,7 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
82
98
|
|
|
83
99
|
if (facets.models) {
|
|
84
100
|
const modelFilterGroup = VStringFacet({
|
|
85
|
-
buckets: facets.models
|
|
101
|
+
buckets: identifiedBuckets(facets.models),
|
|
86
102
|
name: 'model',
|
|
87
103
|
});
|
|
88
104
|
customFilterGroups.push(modelFilterGroup);
|
|
@@ -90,7 +106,7 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
90
106
|
|
|
91
107
|
if (facets.statuses) {
|
|
92
108
|
const statusFilterGroup = VStringFacet({
|
|
93
|
-
buckets: facets.statuses
|
|
109
|
+
buckets: identifiedBuckets(facets.statuses),
|
|
94
110
|
name: 'status',
|
|
95
111
|
});
|
|
96
112
|
customFilterGroups.push(statusFilterGroup);
|
|
@@ -110,15 +126,6 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
110
126
|
customFilterGroups.push(finishReasonFilterGroup);
|
|
111
127
|
}
|
|
112
128
|
|
|
113
|
-
if (facets.created_by) {
|
|
114
|
-
const createdByFilterGroup = VUserFacet({
|
|
115
|
-
buckets: facets.created_by || [],
|
|
116
|
-
name: 'created_by',
|
|
117
|
-
placeholder: 'Created By',
|
|
118
|
-
});
|
|
119
|
-
customFilterGroups.push(createdByFilterGroup);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
129
|
const dateAfterFilterGroup = {
|
|
123
130
|
name: 'start',
|
|
124
131
|
placeholder: 'Date After',
|
|
@@ -155,7 +162,7 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
155
162
|
}
|
|
156
163
|
|
|
157
164
|
// Hook to create filter change handler for runs
|
|
158
|
-
export function useRunsFilterHandler(search: SearchInterface) {
|
|
165
|
+
export function useRunsFilterHandler(search: SearchInterface<RunSearchQuery>) {
|
|
159
166
|
return (newFilters: BaseFilter[]) => {
|
|
160
167
|
if (newFilters.length === 0) {
|
|
161
168
|
// Clear filters without applying defaults - user wants to remove all filters
|
|
@@ -168,6 +175,9 @@ export function useRunsFilterHandler(search: SearchInterface) {
|
|
|
168
175
|
|
|
169
176
|
newFilters.forEach((filter) => {
|
|
170
177
|
if (filter.value && filter.value.length > 0) {
|
|
178
|
+
if (!isRunFilterName(filter.name)) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
171
181
|
const filterName = filter.name;
|
|
172
182
|
let filterValue = filterValueToQueryValue(filter);
|
|
173
183
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ListWorkflowRunsPayload } from '@vertesia/common';
|
|
2
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
3
|
+
import type { SearchInterface } from './utils/SearchInterface.js';
|
|
4
|
+
import {
|
|
5
|
+
useWorkflowExecutionsFilterGroups,
|
|
6
|
+
useWorkflowExecutionsFilterHandler,
|
|
7
|
+
} from './WorkflowExecutionsFacetsNav.js';
|
|
8
|
+
|
|
9
|
+
function createSearch(): SearchInterface<ListWorkflowRunsPayload> {
|
|
10
|
+
return {
|
|
11
|
+
query: {},
|
|
12
|
+
isRunning: false,
|
|
13
|
+
getFilterValue: vi.fn(),
|
|
14
|
+
setFilterValue: vi.fn(),
|
|
15
|
+
clearFilters: vi.fn(),
|
|
16
|
+
search: vi.fn().mockResolvedValue(true),
|
|
17
|
+
setDefaultKeys: vi.fn(),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe('useWorkflowExecutionsFilterHandler', () => {
|
|
22
|
+
it('uses API payload keys for every filter group', () => {
|
|
23
|
+
expect(
|
|
24
|
+
useWorkflowExecutionsFilterGroups({
|
|
25
|
+
status: [{ _id: 'running', count: 1 }],
|
|
26
|
+
initiated_by: [{ _id: 'user-1', count: 1 }],
|
|
27
|
+
}).map((group) => group.name),
|
|
28
|
+
).toEqual(['search_term', 'status', 'initiated_by', 'start', 'end', 'has_reported_errors']);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('maps the workflow name or run ID filter directly to search_term', () => {
|
|
32
|
+
const search = createSearch();
|
|
33
|
+
const handleFilters = useWorkflowExecutionsFilterHandler(search);
|
|
34
|
+
|
|
35
|
+
handleFilters([
|
|
36
|
+
{
|
|
37
|
+
name: 'search_term',
|
|
38
|
+
type: 'text',
|
|
39
|
+
value: [{ value: 'workflow-or-run-id' }],
|
|
40
|
+
},
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
expect(search.query).toEqual({ search_term: 'workflow-or-run-id' });
|
|
44
|
+
expect(search.clearFilters).toHaveBeenCalledWith(false);
|
|
45
|
+
expect(search.search).toHaveBeenCalledOnce();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('does not copy unknown filter names into the API payload', () => {
|
|
49
|
+
const search = createSearch();
|
|
50
|
+
const handleFilters = useWorkflowExecutionsFilterHandler(search);
|
|
51
|
+
|
|
52
|
+
handleFilters([{ name: 'unsupported', type: 'text', value: [{ value: 'value' }] }]);
|
|
53
|
+
|
|
54
|
+
expect(search.query).toEqual({});
|
|
55
|
+
expect(search.search).toHaveBeenCalledOnce();
|
|
56
|
+
});
|
|
57
|
+
});
|