@vertesia/ui 1.4.0-dev.20260615.051508Z → 1.4.0
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/dropdown.d.ts.map +1 -1
- package/lib/core/components/shadcn/dropdown.js +6 -2
- package/lib/core/components/shadcn/dropdown.js.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filterBar.js +9 -2
- package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/core/components/shadcn/modal/ConfirmModal.d.ts +16 -1
- package/lib/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/ConfirmModal.js +25 -3
- package/lib/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +1 -1
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/core/components/shadcn/popover.js +3 -1
- package/lib/core/components/shadcn/popover.js.map +1 -1
- package/lib/core/components/shadcn/switch.js +3 -3
- package/lib/core/components/shadcn/switch.js.map +1 -1
- package/lib/core/components/shadcn/tabs.js +1 -1
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/core/components/shadcn/tooltip.js +3 -1
- package/lib/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/env/index.d.ts +0 -19
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +0 -6
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +4 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js +16 -0
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentApprovalModeSelector.d.ts +10 -0
- package/lib/features/agent/chat/AgentApprovalModeSelector.d.ts.map +1 -0
- package/lib/features/agent/chat/AgentApprovalModeSelector.js +50 -0
- package/lib/features/agent/chat/AgentApprovalModeSelector.js.map +1 -0
- package/lib/features/agent/chat/AgentChatFixtureReplay.d.ts +2 -1
- package/lib/features/agent/chat/AgentChatFixtureReplay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentChatFixtureReplay.js +3 -3
- package/lib/features/agent/chat/AgentChatFixtureReplay.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +5 -2
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +41 -7
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +133 -12
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/AnimatedThinkingDots.js +1 -1
- package/lib/features/agent/chat/AnimatedThinkingDots.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +11 -65
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts +3 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +4 -3
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +10 -2
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +526 -117
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +8 -0
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +19 -0
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +8 -2
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +551 -92
- 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 +7 -6
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- 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/MessageDeliveryStatus.d.ts +8 -0
- package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.js +61 -0
- package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +15 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +28 -38
- package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +3 -2
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js +2 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts +5 -0
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +59 -4
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +2 -2
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +9 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +180 -0
- package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.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 +92 -2
- package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/features/agent/chat/clipboardFiles.d.ts +15 -0
- package/lib/features/agent/chat/clipboardFiles.d.ts.map +1 -0
- package/lib/features/agent/chat/clipboardFiles.js +35 -0
- package/lib/features/agent/chat/clipboardFiles.js.map +1 -0
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts +6 -0
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +218 -37
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/agent/chat/hooks/useArtifacts.d.ts +1 -8
- package/lib/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useArtifacts.js +10 -28
- package/lib/features/agent/chat/hooks/useArtifacts.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 +2 -1
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/agent/chat/workstreams.d.ts +1 -0
- package/lib/features/agent/chat/workstreams.d.ts.map +1 -1
- package/lib/features/agent/chat/workstreams.js +28 -0
- package/lib/features/agent/chat/workstreams.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +10 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +6 -3
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.d.ts +10 -1
- package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.js +14 -5
- package/lib/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts +10 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +14 -5
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/facets/RunsFacetsNav.d.ts +10 -1
- package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/RunsFacetsNav.js +14 -5
- package/lib/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/features/index.d.ts +0 -1
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +0 -1
- package/lib/features/index.js.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts +30 -0
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -0
- package/lib/features/oauth/McpConnectionsButton.js +70 -0
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -0
- package/lib/features/oauth/McpConnectionsDialog.d.ts +25 -0
- package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -0
- package/lib/features/oauth/McpConnectionsDialog.js +26 -0
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -0
- package/lib/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -1
- package/lib/features/oauth/RemoteMcpConnectionButton.js +14 -6
- package/lib/features/oauth/RemoteMcpConnectionButton.js.map +1 -1
- package/lib/features/oauth/index.d.ts +3 -0
- package/lib/features/oauth/index.d.ts.map +1 -1
- package/lib/features/oauth/index.js +3 -0
- package/lib/features/oauth/index.js.map +1 -1
- package/lib/features/oauth/useMcpConnections.d.ts +44 -0
- package/lib/features/oauth/useMcpConnections.d.ts.map +1 -0
- package/lib/features/oauth/useMcpConnections.js +168 -0
- package/lib/features/oauth/useMcpConnections.js.map +1 -0
- package/lib/features/permissions/UserPermissionsProvider.d.ts +4 -6
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +40 -42
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.js +2 -1
- package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/features/store/objects/DocumentQuickFilter.d.ts +23 -0
- package/lib/features/store/objects/DocumentQuickFilter.d.ts.map +1 -0
- package/lib/features/store/objects/DocumentQuickFilter.js +30 -0
- package/lib/features/store/objects/DocumentQuickFilter.js.map +1 -0
- package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/features/store/objects/DocumentSearchResults.js +17 -1
- package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +17 -74
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.d.ts +7 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
- package/lib/features/store/objects/layout/DocumentTableColumn.js +27 -3
- package/lib/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
- package/lib/features/store/objects/layout/documentLayout.js +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts +2 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +27 -20
- package/lib/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesSearch.js +4 -1
- package/lib/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts +2 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +8 -3
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/i18n/instance.d.ts.map +1 -1
- package/lib/i18n/instance.js +1 -0
- package/lib/i18n/instance.js.map +1 -1
- package/lib/i18n/locales/ar.json +72 -45
- package/lib/i18n/locales/de.json +65 -34
- package/lib/i18n/locales/en.json +63 -47
- package/lib/i18n/locales/es.json +65 -35
- package/lib/i18n/locales/fr.json +65 -35
- package/lib/i18n/locales/it.json +72 -42
- package/lib/i18n/locales/ja.json +72 -41
- package/lib/i18n/locales/ko.json +72 -41
- package/lib/i18n/locales/pt.json +72 -42
- package/lib/i18n/locales/ru.json +72 -43
- package/lib/i18n/locales/tr.json +72 -41
- package/lib/i18n/locales/zh-TW.json +72 -41
- package/lib/i18n/locales/zh.json +72 -41
- package/lib/session/UserSession.d.ts +0 -6
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +0 -15
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +39 -98
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +3 -33
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +3 -2
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- 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 +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +1 -1
- package/lib/vertesia-ui-i18n.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 +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/schema-editor/editor/Editable.js +1 -1
- package/lib/widgets/schema-editor/editor/Editable.js.map +1 -1
- package/llms.txt +70 -70
- package/package.json +35 -32
- package/src/core/components/shadcn/dropdown.tsx +2 -0
- package/src/core/components/shadcn/filters/filterBar.tsx +9 -2
- package/src/core/components/shadcn/modal/ConfirmModal.tsx +65 -3
- package/src/core/components/shadcn/modal/dialog.tsx +1 -1
- package/src/core/components/shadcn/popover.tsx +1 -0
- package/src/core/components/shadcn/switch.tsx +4 -4
- package/src/core/components/shadcn/tabs.tsx +1 -1
- package/src/core/components/shadcn/tooltip.tsx +1 -0
- package/src/env/index.ts +0 -24
- package/src/features/agent/PayloadBuilder.tsx +18 -0
- package/src/features/agent/chat/AgentApprovalModeSelector.tsx +130 -0
- package/src/features/agent/chat/AgentChatFixtureReplay.test.tsx +22 -2
- package/src/features/agent/chat/AgentChatFixtureReplay.tsx +33 -27
- package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +122 -0
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +91 -17
- package/src/features/agent/chat/AgentRightPanel.tsx +238 -50
- package/src/features/agent/chat/AnimatedThinkingDots.tsx +1 -1
- package/src/features/agent/chat/ArtifactsTab.tsx +21 -155
- package/src/features/agent/chat/AskUserWidget.tsx +6 -2
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +1157 -47
- package/src/features/agent/chat/ModernAgentConversation.tsx +703 -136
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +74 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +1420 -126
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +934 -111
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +31 -40
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +28 -28
- package/src/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.tsx +83 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +38 -2
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +121 -98
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +7 -1
- package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +82 -2
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +2 -2
- package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +216 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +149 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +103 -2
- package/src/features/agent/chat/clipboardFiles.ts +33 -0
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +355 -4
- package/src/features/agent/chat/hooks/useAgentStream.ts +270 -43
- package/src/features/agent/chat/hooks/useArtifacts.ts +11 -44
- package/src/features/agent/chat/index.ts +10 -1
- package/src/features/agent/chat/workstreams.ts +42 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +23 -3
- package/src/features/facets/CollectionsFacetsNav.tsx +30 -5
- package/src/features/facets/PromptsFacetsNav.tsx +30 -5
- package/src/features/facets/RunsFacetsNav.tsx +32 -5
- package/src/features/index.ts +0 -1
- package/src/features/oauth/McpConnectionsButton.test.tsx +248 -0
- package/src/features/oauth/McpConnectionsButton.tsx +269 -0
- package/src/features/oauth/McpConnectionsDialog.tsx +142 -0
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +37 -14
- package/src/features/oauth/index.ts +3 -0
- package/src/features/oauth/useMcpConnections.test.ts +94 -0
- package/src/features/oauth/useMcpConnections.ts +210 -0
- package/src/features/permissions/UserPermissionsProvider.tsx +41 -59
- package/src/features/store/objects/DocumentPreviewPanel.tsx +4 -2
- package/src/features/store/objects/DocumentQuickFilter.tsx +72 -0
- package/src/features/store/objects/DocumentSearchResults.tsx +30 -11
- package/src/features/store/objects/components/ContentOverview.tsx +30 -99
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +29 -4
- package/src/features/store/objects/layout/documentLayout.tsx +1 -1
- package/src/features/store/objects/layout/renderers.tsx +80 -20
- package/src/features/store/types/ContentObjectTypesSearch.tsx +7 -1
- package/src/features/store/types/ContentObjectTypesTable.tsx +34 -4
- package/src/i18n/instance.ts +1 -0
- package/src/i18n/locales/ar.json +72 -45
- package/src/i18n/locales/de.json +65 -34
- package/src/i18n/locales/en.json +63 -47
- package/src/i18n/locales/es.json +65 -35
- package/src/i18n/locales/fr.json +65 -35
- package/src/i18n/locales/it.json +72 -42
- package/src/i18n/locales/ja.json +72 -41
- package/src/i18n/locales/ko.json +72 -41
- package/src/i18n/locales/pt.json +72 -42
- package/src/i18n/locales/ru.json +72 -43
- package/src/i18n/locales/tr.json +72 -41
- package/src/i18n/locales/zh-TW.json +72 -41
- package/src/i18n/locales/zh.json +72 -41
- package/src/i18n/rtl.test.ts +57 -1
- package/src/session/UserSession.ts +0 -16
- package/src/session/UserSessionProvider.tsx +51 -123
- package/src/session/auth/composable.ts +3 -34
- package/src/shell/login/SignInPrimitives.tsx +3 -2
- package/src/widgets/schema-editor/editor/Editable.tsx +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts +0 -73
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +0 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.js +0 -415
- package/lib/features/document-viewer/UniversalDocumentViewer.js.map +0 -1
- package/lib/features/document-viewer/index.d.ts +0 -2
- package/lib/features/document-viewer/index.d.ts.map +0 -1
- package/lib/features/document-viewer/index.js +0 -2
- package/lib/features/document-viewer/index.js.map +0 -1
- package/src/features/document-viewer/UniversalDocumentViewer.test.tsx +0 -123
- package/src/features/document-viewer/UniversalDocumentViewer.tsx +0 -746
- package/src/features/document-viewer/index.ts +0 -1
- package/src/session/auth/composable.test.ts +0 -79
|
@@ -18,8 +18,7 @@ import { useUITranslation } from '@vertesia/ui/i18n';
|
|
|
18
18
|
import { useUserSession } from '@vertesia/ui/session';
|
|
19
19
|
import {
|
|
20
20
|
CheckCircleIcon,
|
|
21
|
-
|
|
22
|
-
ChevronsUpDownIcon,
|
|
21
|
+
ChevronDownIcon,
|
|
23
22
|
ClipboardCopyIcon,
|
|
24
23
|
DownloadCloudIcon,
|
|
25
24
|
FileTextIcon,
|
|
@@ -28,7 +27,7 @@ import {
|
|
|
28
27
|
XCircleIcon,
|
|
29
28
|
XIcon,
|
|
30
29
|
} from 'lucide-react';
|
|
31
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
30
|
+
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
32
31
|
import { ArtifactsTab } from './ArtifactsTab.js';
|
|
33
32
|
import { BrowserUseWidget, getLatestBrowserUseByWorkstream } from './BrowserUseWidget.js';
|
|
34
33
|
import { DocumentPanel } from './DocumentPanel.js';
|
|
@@ -350,66 +349,257 @@ function WorkstreamsTab({ workstreams, messages, runId }: WorkstreamsTabProps) {
|
|
|
350
349
|
}
|
|
351
350
|
|
|
352
351
|
// ---------------------------------------------------------------------------
|
|
353
|
-
//
|
|
352
|
+
// Overflow tab bar
|
|
354
353
|
// ---------------------------------------------------------------------------
|
|
355
354
|
|
|
356
|
-
|
|
355
|
+
// Tab-item styling, matching core's TabsTrigger underline tabs.
|
|
356
|
+
const TAB_ITEM_BASE =
|
|
357
|
+
'flex items-center border-b-2 px-2 py-1.5 text-sm font-medium whitespace-nowrap cursor-pointer shrink-0';
|
|
358
|
+
const TAB_ITEM_INACTIVE = 'border-transparent text-muted-foreground hover:border-border hover:text-foreground';
|
|
359
|
+
const TAB_ITEM_ACTIVE = 'border-primary text-primary';
|
|
360
|
+
const TAB_GAP_PX = 4; // matches the `gap-1` between tab items
|
|
357
361
|
|
|
358
|
-
|
|
359
|
-
tabs
|
|
360
|
-
activeTab,
|
|
361
|
-
onChange,
|
|
362
|
-
ariaLabel,
|
|
363
|
-
}: {
|
|
362
|
+
interface OverflowMoreMenuProps {
|
|
363
|
+
/** The overflowed tabs to list inside the menu. */
|
|
364
364
|
tabs: TabDefinition[];
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
365
|
+
current: string;
|
|
366
|
+
onTabChange: (name: string) => void;
|
|
367
|
+
label: string;
|
|
368
|
+
/** Whether the active tab is one of the overflowed tabs. */
|
|
369
|
+
active: boolean;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/** Trailing "More" dropdown of overflowed tabs; opens on hover, click, or keyboard. */
|
|
373
|
+
function OverflowMoreMenu({ tabs, current, onTabChange, label, active }: OverflowMoreMenuProps) {
|
|
369
374
|
const [open, setOpen] = useState(false);
|
|
370
|
-
const
|
|
375
|
+
const closeTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
376
|
+
const openedByHover = useRef(false);
|
|
377
|
+
|
|
378
|
+
const cancelClose = () => {
|
|
379
|
+
if (closeTimer.current) {
|
|
380
|
+
clearTimeout(closeTimer.current);
|
|
381
|
+
closeTimer.current = null;
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
const openOnHover = () => {
|
|
385
|
+
cancelClose();
|
|
386
|
+
openedByHover.current = true;
|
|
387
|
+
setOpen(true);
|
|
388
|
+
};
|
|
389
|
+
// Delay the close so the pointer can travel across the gap onto the menu.
|
|
390
|
+
const closeAfterDelay = () => {
|
|
391
|
+
cancelClose();
|
|
392
|
+
closeTimer.current = setTimeout(() => setOpen(false), 150);
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// Clear any pending close timer on unmount.
|
|
396
|
+
useEffect(() => () => clearTimeout(closeTimer.current ?? undefined), []);
|
|
371
397
|
|
|
372
398
|
return (
|
|
373
|
-
|
|
399
|
+
// Non-modal: a modal menu sets body `pointer-events: none` while open, which makes
|
|
400
|
+
// the hover open/close flap. It still closes on outside-click / Escape.
|
|
401
|
+
<DropdownMenu
|
|
402
|
+
modal={false}
|
|
403
|
+
open={open}
|
|
404
|
+
onOpenChange={(next) => {
|
|
405
|
+
// Fired by click / keyboard / dismiss (not by hover); keep our state in sync.
|
|
406
|
+
cancelClose();
|
|
407
|
+
if (next) openedByHover.current = false;
|
|
408
|
+
setOpen(next);
|
|
409
|
+
}}
|
|
410
|
+
>
|
|
374
411
|
<DropdownMenuTrigger asChild>
|
|
412
|
+
{/* Tab-bar primitive: raw button is the menu trigger (asChild). */}
|
|
375
413
|
<button
|
|
376
414
|
type="button"
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
className={cn(
|
|
381
|
-
'inline-flex min-w-40 max-w-56 flex-row items-center justify-between gap-2 rounded-md border border-border bg-transparent px-2.5 py-2 text-start text-inherit',
|
|
382
|
-
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
|
|
383
|
-
'hover:bg-muted',
|
|
384
|
-
)}
|
|
415
|
+
onMouseEnter={openOnHover}
|
|
416
|
+
onMouseLeave={closeAfterDelay}
|
|
417
|
+
className={cn(TAB_ITEM_BASE, active ? TAB_ITEM_ACTIVE : TAB_ITEM_INACTIVE)}
|
|
385
418
|
>
|
|
386
|
-
|
|
387
|
-
<
|
|
419
|
+
{label}
|
|
420
|
+
<ChevronDownIcon className="ms-1 size-4" />
|
|
388
421
|
</button>
|
|
389
422
|
</DropdownMenuTrigger>
|
|
390
|
-
<DropdownMenuContent
|
|
391
|
-
|
|
392
|
-
|
|
423
|
+
<DropdownMenuContent
|
|
424
|
+
align="end"
|
|
425
|
+
className="w-max"
|
|
426
|
+
onMouseEnter={cancelClose}
|
|
427
|
+
onMouseLeave={closeAfterDelay}
|
|
428
|
+
onCloseAutoFocus={(e) => {
|
|
429
|
+
// Keep hover-opens from returning the focus ring to the trigger.
|
|
430
|
+
if (openedByHover.current) e.preventDefault();
|
|
431
|
+
}}
|
|
432
|
+
>
|
|
433
|
+
{tabs.map((tab) => (
|
|
434
|
+
<DropdownMenuItem
|
|
435
|
+
key={tab.name}
|
|
436
|
+
disabled={tab.disabled}
|
|
437
|
+
onClick={() => onTabChange(tab.name)}
|
|
438
|
+
className={cn(tab.name === current && 'text-primary')}
|
|
439
|
+
>
|
|
440
|
+
{tab.label}
|
|
441
|
+
</DropdownMenuItem>
|
|
442
|
+
))}
|
|
443
|
+
</DropdownMenuContent>
|
|
444
|
+
</DropdownMenu>
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
interface OverflowTabsBarProps {
|
|
449
|
+
tabs: TabDefinition[];
|
|
450
|
+
current: string;
|
|
451
|
+
onTabChange: (name: string) => void;
|
|
452
|
+
className?: string;
|
|
453
|
+
}
|
|
393
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Tabs as a horizontal row; any that don't fit collapse into a trailing "More"
|
|
457
|
+
* dropdown. The visible/overflow split is measured from a hidden full-width row.
|
|
458
|
+
*/
|
|
459
|
+
function OverflowTabsBar({ tabs, current, onTabChange, className }: OverflowTabsBarProps) {
|
|
460
|
+
const { t } = useUITranslation();
|
|
461
|
+
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
462
|
+
const itemRefs = useRef<Array<HTMLButtonElement | null>>([]);
|
|
463
|
+
const moreRef = useRef<HTMLButtonElement | null>(null);
|
|
464
|
+
// `count` leading tabs are shown. When `promote` is set, the active tab is pulled
|
|
465
|
+
// into the last slot (before More) and `count` counts the tabs shown before it.
|
|
466
|
+
const [layout, setLayout] = useState<{ count: number; promote: boolean }>({ count: tabs.length, promote: false });
|
|
467
|
+
|
|
468
|
+
const recompute = () => {
|
|
469
|
+
const container = containerRef.current;
|
|
470
|
+
if (!container) return;
|
|
471
|
+
const containerWidth = container.clientWidth;
|
|
472
|
+
const widths = tabs.map((_, i) => itemRefs.current[i]?.offsetWidth ?? 0);
|
|
473
|
+
const totalAll = widths.reduce((sum, w) => sum + w, 0) + TAB_GAP_PX * Math.max(0, tabs.length - 1);
|
|
474
|
+
|
|
475
|
+
// How many tabs (in order, optionally skipping one) fit within `available`.
|
|
476
|
+
const fitCount = (available: number, skipIndex: number) => {
|
|
477
|
+
let used = 0;
|
|
478
|
+
let count = 0;
|
|
479
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
480
|
+
if (i === skipIndex) continue;
|
|
481
|
+
const cand = used + (count > 0 ? TAB_GAP_PX : 0) + widths[i];
|
|
482
|
+
if (cand > available) break;
|
|
483
|
+
used = cand;
|
|
484
|
+
count += 1;
|
|
485
|
+
}
|
|
486
|
+
return count;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
let next: { count: number; promote: boolean };
|
|
490
|
+
if (totalAll <= containerWidth) {
|
|
491
|
+
next = { count: tabs.length, promote: false };
|
|
492
|
+
} else {
|
|
493
|
+
const moreWidth = moreRef.current?.offsetWidth ?? 0;
|
|
494
|
+
const naturalCount = Math.max(1, fitCount(containerWidth - moreWidth - TAB_GAP_PX, -1));
|
|
495
|
+
const activeIndex = tabs.findIndex((tab) => tab.name === current);
|
|
496
|
+
if (activeIndex < 0 || activeIndex < naturalCount) {
|
|
497
|
+
next = { count: naturalCount, promote: false };
|
|
498
|
+
} else {
|
|
499
|
+
// Active tab overflowed: reserve its slot at the end, fit leading tabs before it.
|
|
500
|
+
const leadAvailable = containerWidth - moreWidth - widths[activeIndex] - TAB_GAP_PX * 2;
|
|
501
|
+
next = { count: fitCount(leadAvailable, activeIndex), promote: true };
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
setLayout((prev) => (prev.count === next.count && prev.promote === next.promote ? prev : next));
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
// Re-measure after every render (tab/label changes) and on container resize.
|
|
508
|
+
const recomputeRef = useRef(recompute);
|
|
509
|
+
recomputeRef.current = recompute;
|
|
510
|
+
useLayoutEffect(() => {
|
|
511
|
+
recomputeRef.current();
|
|
512
|
+
});
|
|
513
|
+
useEffect(() => {
|
|
514
|
+
const container = containerRef.current;
|
|
515
|
+
if (!container || typeof ResizeObserver === 'undefined') return;
|
|
516
|
+
const observer = new ResizeObserver(() => recomputeRef.current());
|
|
517
|
+
observer.observe(container);
|
|
518
|
+
return () => observer.disconnect();
|
|
519
|
+
}, []);
|
|
520
|
+
|
|
521
|
+
const activeIndex = tabs.findIndex((tab) => tab.name === current);
|
|
522
|
+
let visible: TabDefinition[];
|
|
523
|
+
let overflow: TabDefinition[];
|
|
524
|
+
if (layout.promote && activeIndex >= 0) {
|
|
525
|
+
// Pull the active tab into the last visible slot; the tab it displaces overflows.
|
|
526
|
+
const others = tabs.filter((_, i) => i !== activeIndex);
|
|
527
|
+
visible = [...others.slice(0, layout.count), tabs[activeIndex]];
|
|
528
|
+
overflow = others.slice(layout.count);
|
|
529
|
+
} else {
|
|
530
|
+
visible = tabs.slice(0, layout.count);
|
|
531
|
+
overflow = tabs.slice(layout.count);
|
|
532
|
+
}
|
|
533
|
+
const activeInOverflow = overflow.some((tab) => tab.name === current);
|
|
534
|
+
const moreLabel = t('agent.moreTabs');
|
|
535
|
+
|
|
536
|
+
return (
|
|
537
|
+
<div ref={containerRef} className={cn('relative', className)}>
|
|
538
|
+
{/* Hidden measurement row: all tabs + More at natural width, kept separate
|
|
539
|
+
from the visible row so measuring can't feed back into the layout. */}
|
|
540
|
+
<div aria-hidden className="pointer-events-none invisible absolute left-0 top-0 flex w-max gap-1">
|
|
541
|
+
{tabs.map((tab, i) => (
|
|
542
|
+
<button
|
|
543
|
+
type="button"
|
|
544
|
+
key={tab.name}
|
|
545
|
+
tabIndex={-1}
|
|
546
|
+
ref={(el) => {
|
|
547
|
+
itemRefs.current[i] = el;
|
|
548
|
+
}}
|
|
549
|
+
className={cn(TAB_ITEM_BASE, TAB_ITEM_INACTIVE)}
|
|
550
|
+
>
|
|
551
|
+
{tab.label}
|
|
552
|
+
</button>
|
|
553
|
+
))}
|
|
554
|
+
<button type="button" tabIndex={-1} ref={moreRef} className={cn(TAB_ITEM_BASE, TAB_ITEM_INACTIVE)}>
|
|
555
|
+
{moreLabel}
|
|
556
|
+
<ChevronDownIcon className="ms-1 size-4" />
|
|
557
|
+
</button>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
{/* Visible row */}
|
|
561
|
+
<div className="-mb-px flex gap-1 overflow-hidden border-b">
|
|
562
|
+
{visible.map((tab) => {
|
|
563
|
+
const isActive = tab.name === current;
|
|
394
564
|
return (
|
|
395
|
-
|
|
565
|
+
// Tab-bar primitive: raw button mirrors core TabsTrigger underline styling.
|
|
566
|
+
<button
|
|
567
|
+
type="button"
|
|
396
568
|
key={tab.name}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
569
|
+
aria-current={isActive ? 'page' : undefined}
|
|
570
|
+
disabled={tab.disabled}
|
|
571
|
+
onClick={() => onTabChange(tab.name)}
|
|
572
|
+
className={cn(
|
|
573
|
+
TAB_ITEM_BASE,
|
|
574
|
+
isActive ? TAB_ITEM_ACTIVE : TAB_ITEM_INACTIVE,
|
|
575
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
576
|
+
)}
|
|
402
577
|
>
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
</DropdownMenuItem>
|
|
578
|
+
{tab.label}
|
|
579
|
+
</button>
|
|
406
580
|
);
|
|
407
581
|
})}
|
|
408
|
-
|
|
409
|
-
|
|
582
|
+
|
|
583
|
+
{overflow.length > 0 && (
|
|
584
|
+
<OverflowMoreMenu
|
|
585
|
+
tabs={overflow}
|
|
586
|
+
current={current}
|
|
587
|
+
onTabChange={onTabChange}
|
|
588
|
+
label={moreLabel}
|
|
589
|
+
active={activeInOverflow}
|
|
590
|
+
/>
|
|
591
|
+
)}
|
|
592
|
+
</div>
|
|
593
|
+
</div>
|
|
410
594
|
);
|
|
411
595
|
}
|
|
412
596
|
|
|
597
|
+
// ---------------------------------------------------------------------------
|
|
598
|
+
// Right panel tabs
|
|
599
|
+
// ---------------------------------------------------------------------------
|
|
600
|
+
|
|
601
|
+
type RightPanelTab = 'plan' | 'workstreams' | 'documents' | 'uploads' | 'artifacts' | 'payload' | 'conversation';
|
|
602
|
+
|
|
413
603
|
export interface AgentRightPanelProps {
|
|
414
604
|
/** Optional payload content to show as a "Payload" tab */
|
|
415
605
|
payloadContent?: React.ReactNode;
|
|
@@ -639,15 +829,13 @@ function AgentRightPanelComponent({
|
|
|
639
829
|
const visibleTabs = tabs.filter((tab) => tab.is_allowed === undefined || tab.is_allowed === true);
|
|
640
830
|
return (
|
|
641
831
|
<Tabs tabs={tabs} current={activeTab} onTabChange={handleTabChange} fullHeight className="px-0">
|
|
642
|
-
<div className="flex items-
|
|
643
|
-
<
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
/>
|
|
650
|
-
</div>
|
|
832
|
+
<div className="flex items-end justify-between shrink-0 px-1 py-1 gap-1">
|
|
833
|
+
<OverflowTabsBar
|
|
834
|
+
tabs={visibleTabs}
|
|
835
|
+
current={activeTab}
|
|
836
|
+
onTabChange={handleTabChange}
|
|
837
|
+
className="min-w-0 flex-1"
|
|
838
|
+
/>
|
|
651
839
|
{!conversationContent && (
|
|
652
840
|
<Button
|
|
653
841
|
variant="ghost"
|
|
@@ -145,7 +145,7 @@ export function PulsingMessageLoader({ message, className, color = 'blue' }: Pul
|
|
|
145
145
|
|
|
146
146
|
return (
|
|
147
147
|
<div className={cn('flex items-center gap-2 py-1', className)}>
|
|
148
|
-
<div className="flex
|
|
148
|
+
<div className="flex gap-1">
|
|
149
149
|
<div className={`w-1.5 h-1.5 ${colorClasses[color].dot} rounded-full animate-bounce`} />
|
|
150
150
|
<div
|
|
151
151
|
className={`w-1.5 h-1.5 ${colorClasses[color].dot} rounded-full animate-bounce`}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Button, Center, ErrorBox, Input
|
|
1
|
+
import { Button, Center, ErrorBox, Input } from '@vertesia/ui/core';
|
|
2
2
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
3
3
|
import { useUserSession } from '@vertesia/ui/session';
|
|
4
4
|
import {
|
|
5
5
|
ChevronDownIcon,
|
|
6
6
|
ChevronRightIcon,
|
|
7
|
-
DownloadIcon,
|
|
8
|
-
EyeIcon,
|
|
9
7
|
FileIcon,
|
|
10
8
|
FolderIcon,
|
|
11
9
|
FolderOpenIcon,
|
|
@@ -14,10 +12,6 @@ import {
|
|
|
14
12
|
RefreshCwIcon,
|
|
15
13
|
} from 'lucide-react';
|
|
16
14
|
import React, { useCallback, useId, useMemo, useState } from 'react';
|
|
17
|
-
import {
|
|
18
|
-
type UniversalDocumentSource,
|
|
19
|
-
UniversalDocumentViewer,
|
|
20
|
-
} from '../../document-viewer/UniversalDocumentViewer.js';
|
|
21
15
|
import { type ArtifactTreeNode, useArtifacts } from './hooks/useArtifacts.js';
|
|
22
16
|
|
|
23
17
|
// ---------------------------------------------------------------------------
|
|
@@ -28,26 +22,16 @@ interface TreeNodeProps {
|
|
|
28
22
|
node: ArtifactTreeNode;
|
|
29
23
|
depth: number;
|
|
30
24
|
runId: string;
|
|
31
|
-
onPreview: (relativePath: string) => void;
|
|
32
25
|
onDownload: (relativePath: string) => void;
|
|
33
26
|
downloadingPath: string | null;
|
|
34
27
|
forceExpanded?: boolean;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
//** Convert a raw directory segment (e.g. "out_files") into a readable label ("Out Files"). */
|
|
38
30
|
function formatDirectoryLabel(name: string): string {
|
|
39
31
|
return name.replace(/[_-]/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
function TreeNode({
|
|
43
|
-
node,
|
|
44
|
-
depth,
|
|
45
|
-
runId,
|
|
46
|
-
onPreview,
|
|
47
|
-
onDownload,
|
|
48
|
-
downloadingPath,
|
|
49
|
-
forceExpanded = false,
|
|
50
|
-
}: TreeNodeProps) {
|
|
34
|
+
function TreeNode({ node, depth, runId, onDownload, downloadingPath, forceExpanded = false }: TreeNodeProps) {
|
|
51
35
|
const [expanded, setExpanded] = useState(false);
|
|
52
36
|
const isExpanded = forceExpanded || expanded;
|
|
53
37
|
|
|
@@ -82,7 +66,6 @@ function TreeNode({
|
|
|
82
66
|
node={child}
|
|
83
67
|
depth={depth + 1}
|
|
84
68
|
runId={runId}
|
|
85
|
-
onPreview={onPreview}
|
|
86
69
|
onDownload={onDownload}
|
|
87
70
|
downloadingPath={downloadingPath}
|
|
88
71
|
forceExpanded={forceExpanded}
|
|
@@ -95,45 +78,23 @@ function TreeNode({
|
|
|
95
78
|
const isDownloading = downloadingPath === node.path;
|
|
96
79
|
|
|
97
80
|
return (
|
|
98
|
-
<div
|
|
99
|
-
className="group flex min-w-0 items-center gap-1.5 rounded text-sm hover:bg-muted/30"
|
|
100
|
-
style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
|
|
101
|
-
>
|
|
81
|
+
<div className="min-w-0">
|
|
102
82
|
<Button
|
|
103
83
|
variant="unstyled"
|
|
104
|
-
className="flex
|
|
105
|
-
|
|
84
|
+
className="flex w-full max-w-full items-center justify-start gap-1.5 rounded px-1 py-1 text-start text-sm hover:bg-muted/30"
|
|
85
|
+
style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
|
|
86
|
+
onClick={() => onDownload(node.path)}
|
|
87
|
+
disabled={isDownloading}
|
|
106
88
|
title={node.path}
|
|
107
89
|
>
|
|
108
|
-
|
|
90
|
+
{isDownloading ? (
|
|
91
|
+
<Loader2Icon className="size-3.5 shrink-0 animate-spin text-info" />
|
|
92
|
+
) : (
|
|
93
|
+
<span className="size-3.5 shrink-0" />
|
|
94
|
+
)}
|
|
109
95
|
<FileIcon className="size-4 shrink-0 text-muted" />
|
|
110
96
|
<span className="min-w-0 truncate">{node.name}</span>
|
|
111
97
|
</Button>
|
|
112
|
-
<div className="flex shrink-0 items-center pe-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
|
|
113
|
-
<Button
|
|
114
|
-
variant="ghost"
|
|
115
|
-
size="xs"
|
|
116
|
-
className="h-6 w-6 p-0"
|
|
117
|
-
onClick={() => onPreview(node.path)}
|
|
118
|
-
aria-label="Preview artifact"
|
|
119
|
-
>
|
|
120
|
-
<EyeIcon className="size-3.5" />
|
|
121
|
-
</Button>
|
|
122
|
-
<Button
|
|
123
|
-
variant="ghost"
|
|
124
|
-
size="xs"
|
|
125
|
-
className="h-6 w-6 p-0"
|
|
126
|
-
onClick={() => onDownload(node.path)}
|
|
127
|
-
disabled={isDownloading}
|
|
128
|
-
aria-label="Download artifact"
|
|
129
|
-
>
|
|
130
|
-
{isDownloading ? (
|
|
131
|
-
<Loader2Icon className="size-3.5 animate-spin text-info" />
|
|
132
|
-
) : (
|
|
133
|
-
<DownloadIcon className="size-3.5" />
|
|
134
|
-
)}
|
|
135
|
-
</Button>
|
|
136
|
-
</div>
|
|
137
98
|
</div>
|
|
138
99
|
);
|
|
139
100
|
}
|
|
@@ -181,42 +142,6 @@ function downloadUrl(url: string, filename: string) {
|
|
|
181
142
|
anchor.remove();
|
|
182
143
|
}
|
|
183
144
|
|
|
184
|
-
function getArtifactContentType(path: string): string | undefined {
|
|
185
|
-
const ext = path.split('.').pop()?.toLowerCase();
|
|
186
|
-
switch (ext) {
|
|
187
|
-
case 'css':
|
|
188
|
-
return 'text/css';
|
|
189
|
-
case 'gif':
|
|
190
|
-
return 'image/gif';
|
|
191
|
-
case 'htm':
|
|
192
|
-
case 'html':
|
|
193
|
-
return 'text/html';
|
|
194
|
-
case 'jpeg':
|
|
195
|
-
case 'jpg':
|
|
196
|
-
return 'image/jpeg';
|
|
197
|
-
case 'json':
|
|
198
|
-
return 'application/json';
|
|
199
|
-
case 'md':
|
|
200
|
-
case 'markdown':
|
|
201
|
-
return 'text/markdown';
|
|
202
|
-
case 'pdf':
|
|
203
|
-
return 'application/pdf';
|
|
204
|
-
case 'png':
|
|
205
|
-
return 'image/png';
|
|
206
|
-
case 'svg':
|
|
207
|
-
return 'image/svg+xml';
|
|
208
|
-
case 'ts':
|
|
209
|
-
case 'tsx':
|
|
210
|
-
return 'text/typescript';
|
|
211
|
-
case 'txt':
|
|
212
|
-
return 'text/plain';
|
|
213
|
-
case 'webp':
|
|
214
|
-
return 'image/webp';
|
|
215
|
-
default:
|
|
216
|
-
return undefined;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
145
|
// ---------------------------------------------------------------------------
|
|
221
146
|
// Main tab component
|
|
222
147
|
// ---------------------------------------------------------------------------
|
|
@@ -247,15 +172,8 @@ function ArtifactEmptyState({
|
|
|
247
172
|
function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
248
173
|
const { t } = useUITranslation();
|
|
249
174
|
const { client } = useUserSession();
|
|
250
|
-
const
|
|
251
|
-
const { tree, flatFiles, totalCount, systemHiddenCount, isLoading, error, refresh } = useArtifacts(
|
|
252
|
-
client,
|
|
253
|
-
runId,
|
|
254
|
-
refreshKey,
|
|
255
|
-
showSystem,
|
|
256
|
-
);
|
|
175
|
+
const { tree, flatFiles, isLoading, error, refresh } = useArtifacts(client, runId, refreshKey);
|
|
257
176
|
const [downloadingPath, setDownloadingPath] = useState<string | null>(null);
|
|
258
|
-
const [previewPath, setPreviewPath] = useState<string | null>(null);
|
|
259
177
|
const [filterValue, setFilterValue] = useState('');
|
|
260
178
|
const normalizedFilterValue = filterValue.trim();
|
|
261
179
|
const filteredTree = useMemo(() => filterArtifactTree(tree, normalizedFilterValue), [tree, normalizedFilterValue]);
|
|
@@ -278,28 +196,11 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
278
196
|
[client, runId],
|
|
279
197
|
);
|
|
280
198
|
|
|
281
|
-
const handlePreview = useCallback((relativePath: string) => {
|
|
282
|
-
setPreviewPath(relativePath);
|
|
283
|
-
}, []);
|
|
284
|
-
|
|
285
|
-
const previewSource: UniversalDocumentSource | null =
|
|
286
|
-
runId && previewPath
|
|
287
|
-
? {
|
|
288
|
-
title: previewPath.split('/').pop() || previewPath,
|
|
289
|
-
fileName: previewPath.split('/').pop() || previewPath,
|
|
290
|
-
contentType: getArtifactContentType(previewPath),
|
|
291
|
-
artifact: {
|
|
292
|
-
runId,
|
|
293
|
-
path: previewPath,
|
|
294
|
-
},
|
|
295
|
-
}
|
|
296
|
-
: null;
|
|
297
|
-
|
|
298
199
|
if (!runId) {
|
|
299
200
|
return <ArtifactEmptyState icon={<PackageIcon className="mb-2 size-8" />}>No run selected</ArtifactEmptyState>;
|
|
300
201
|
}
|
|
301
202
|
|
|
302
|
-
if (isLoading &&
|
|
203
|
+
if (isLoading && flatFiles.length === 0) {
|
|
303
204
|
return (
|
|
304
205
|
<ArtifactEmptyState icon={<Loader2Icon className="mb-2 size-6 animate-spin" />}>
|
|
305
206
|
{t('agent.loadingArtifacts')}
|
|
@@ -327,7 +228,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
327
228
|
);
|
|
328
229
|
}
|
|
329
230
|
|
|
330
|
-
if (
|
|
231
|
+
if (flatFiles.length === 0) {
|
|
331
232
|
return (
|
|
332
233
|
<ArtifactEmptyState
|
|
333
234
|
icon={<PackageIcon className="mb-2 size-8" />}
|
|
@@ -346,28 +247,16 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
346
247
|
return (
|
|
347
248
|
<div className="flex flex-col h-full">
|
|
348
249
|
{/* Top bar */}
|
|
349
|
-
<div className="flex shrink-0 flex-col gap-2
|
|
250
|
+
<div className="flex shrink-0 flex-col gap-2 px-3 py-2">
|
|
350
251
|
<div className="flex items-center justify-between gap-2 text-xs text-muted">
|
|
351
252
|
<span>
|
|
352
253
|
{normalizedFilterValue
|
|
353
254
|
? `${visibleFileCount} of ${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`
|
|
354
255
|
: `${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`}
|
|
355
|
-
{!showSystem && systemHiddenCount > 0 ? ` · ${systemHiddenCount} hidden` : ''}
|
|
356
256
|
</span>
|
|
357
|
-
<
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
</Switch>
|
|
361
|
-
<Button
|
|
362
|
-
variant="ghost"
|
|
363
|
-
size="sm"
|
|
364
|
-
onClick={refresh}
|
|
365
|
-
disabled={isLoading}
|
|
366
|
-
className="h-6 w-6 p-0"
|
|
367
|
-
>
|
|
368
|
-
<RefreshCwIcon className={`size-3.5 ${isLoading ? 'animate-spin' : ''}`} />
|
|
369
|
-
</Button>
|
|
370
|
-
</div>
|
|
257
|
+
<Button variant="ghost" size="sm" onClick={refresh} disabled={isLoading} className="h-6 w-6 p-0">
|
|
258
|
+
<RefreshCwIcon className={`size-3.5 ${isLoading ? 'animate-spin' : ''}`} />
|
|
259
|
+
</Button>
|
|
371
260
|
</div>
|
|
372
261
|
<label htmlFor={filterInputId} className="sr-only">
|
|
373
262
|
{t('form.filter')}
|
|
@@ -385,7 +274,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
385
274
|
</div>
|
|
386
275
|
|
|
387
276
|
{/* Tree */}
|
|
388
|
-
<div className="flex-1 overflow-y-auto px-3
|
|
277
|
+
<div className="flex-1 overflow-y-auto px-3 pb-2">
|
|
389
278
|
{filteredTree.length > 0 ? (
|
|
390
279
|
<div className="min-w-0">
|
|
391
280
|
{filteredTree.map((node) => (
|
|
@@ -394,7 +283,6 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
394
283
|
node={node}
|
|
395
284
|
depth={0}
|
|
396
285
|
runId={runId}
|
|
397
|
-
onPreview={handlePreview}
|
|
398
286
|
onDownload={handleDownload}
|
|
399
287
|
downloadingPath={downloadingPath}
|
|
400
288
|
forceExpanded={!!normalizedFilterValue}
|
|
@@ -402,31 +290,9 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
|
|
|
402
290
|
))}
|
|
403
291
|
</div>
|
|
404
292
|
) : (
|
|
405
|
-
<div className="px-1 py-6 text-sm text-muted">
|
|
406
|
-
{!showSystem && systemHiddenCount > 0
|
|
407
|
-
? t('agent.onlySystemArtifacts')
|
|
408
|
-
: t('agent.noContentAvailable')}
|
|
409
|
-
</div>
|
|
293
|
+
<div className="px-1 py-6 text-sm text-muted">{t('agent.noContentAvailable')}</div>
|
|
410
294
|
)}
|
|
411
295
|
</div>
|
|
412
|
-
{previewSource && (
|
|
413
|
-
<Modal
|
|
414
|
-
isOpen={!!previewPath}
|
|
415
|
-
onClose={() => setPreviewPath(null)}
|
|
416
|
-
size="xl"
|
|
417
|
-
className="h-[90vh] p-0"
|
|
418
|
-
description="Artifact preview"
|
|
419
|
-
>
|
|
420
|
-
<ModalTitle show={false}>{previewSource.fileName}</ModalTitle>
|
|
421
|
-
<ModalBody className="h-full max-h-none p-0">
|
|
422
|
-
<UniversalDocumentViewer
|
|
423
|
-
source={previewSource}
|
|
424
|
-
className="h-full"
|
|
425
|
-
onDownload={() => previewPath && void handleDownload(previewPath)}
|
|
426
|
-
/>
|
|
427
|
-
</ModalBody>
|
|
428
|
-
</Modal>
|
|
429
|
-
)}
|
|
430
296
|
</div>
|
|
431
297
|
);
|
|
432
298
|
}
|