@vertesia/ui 1.0.0 → 1.1.0-dev.20260427.060440Z
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/esm/core/components/ComboBox.js +23 -24
- package/lib/esm/core/components/ComboBox.js.map +1 -1
- package/lib/esm/core/components/FormItem.js +2 -2
- package/lib/esm/core/components/FormItem.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +1 -1
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/shadcn/collaspible.js +3 -4
- package/lib/esm/core/components/shadcn/collaspible.js.map +1 -1
- package/lib/esm/core/components/shadcn/dropdown.js +37 -12
- package/lib/esm/core/components/shadcn/dropdown.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +6 -6
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +5 -3
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/radioGroup.js +1 -2
- package/lib/esm/core/components/shadcn/radioGroup.js.map +1 -1
- package/lib/esm/core/components/shadcn/switch.js +0 -1
- package/lib/esm/core/components/shadcn/switch.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +2 -2
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +17 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/core/hooks/PortalContainerProvider.js +9 -3
- package/lib/esm/core/hooks/PortalContainerProvider.js.map +1 -1
- package/lib/esm/env/index.js +5 -8
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentRightPanel.js +21 -11
- package/lib/esm/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js +2 -6
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +8 -5
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentTabBar.js +5 -13
- package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +57 -26
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +20 -16
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +56 -45
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +3 -9
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +9 -5
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +4 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/DocumentsFacetsNav.js +3 -2
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js +8 -1
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/index.js +1 -0
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/facets/utils/VInteractionFacet.js +5 -5
- package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -1
- package/lib/esm/features/index.js +1 -0
- package/lib/esm/features/index.js.map +1 -1
- package/lib/esm/features/oauth/OAuthProviderConnectButton.js +85 -0
- package/lib/esm/features/oauth/OAuthProviderConnectButton.js.map +1 -0
- package/lib/esm/features/oauth/RemoteMcpConnectionButton.js +119 -0
- package/lib/esm/features/oauth/RemoteMcpConnectionButton.js.map +1 -0
- package/lib/esm/features/oauth/index.js +4 -0
- package/lib/esm/features/oauth/index.js.map +1 -0
- package/lib/esm/features/oauth/useOAuthPopup.js +89 -0
- package/lib/esm/features/oauth/useOAuthPopup.js.map +1 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +9 -2
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +19 -7
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js +35 -15
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -3
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +4 -3
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +11 -3
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +1 -5
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +33 -10
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/i18n/locales/ar.json +81 -98
- package/lib/esm/i18n/locales/de.json +44 -73
- package/lib/esm/i18n/locales/en.json +31 -61
- package/lib/esm/i18n/locales/es.json +55 -79
- package/lib/esm/i18n/locales/fr.json +55 -81
- package/lib/esm/i18n/locales/it.json +55 -79
- package/lib/esm/i18n/locales/ja.json +46 -75
- package/lib/esm/i18n/locales/ko.json +44 -73
- package/lib/esm/i18n/locales/pt.json +55 -79
- package/lib/esm/i18n/locales/ru.json +58 -81
- package/lib/esm/i18n/locales/tr.json +46 -75
- package/lib/esm/i18n/locales/zh-TW.json +46 -75
- package/lib/esm/i18n/locales/zh.json +46 -75
- package/lib/esm/session/UserSession.js +2 -4
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +22 -17
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +20 -2
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/session/auth/domainRouting.js +7 -0
- package/lib/esm/session/auth/domainRouting.js.map +1 -0
- package/lib/esm/shell/login/InviteAcceptModal.js +1 -0
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +2 -2
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +2 -1
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/preprocessMathDelimiters.js +226 -0
- package/lib/esm/widgets/markdown/preprocessMathDelimiters.js.map +1 -0
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js +40 -5
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/esm/widgets/monacoEditor/foldingProviders.js +132 -0
- package/lib/esm/widgets/monacoEditor/foldingProviders.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/ComboBox.d.ts +12 -2
- package/lib/types/core/components/ComboBox.d.ts.map +1 -1
- package/lib/types/core/components/FormItem.d.ts +5 -2
- package/lib/types/core/components/FormItem.d.ts.map +1 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/badge.d.ts +2 -2
- package/lib/types/core/components/shadcn/collaspible.d.ts +3 -3
- package/lib/types/core/components/shadcn/collaspible.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/dropdown.d.ts +11 -3
- package/lib/types/core/components/shadcn/dropdown.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/radioGroup.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/switch.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +4 -2
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/text.d.ts +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/types/core/hooks/PortalContainerProvider.d.ts +1 -0
- package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +1 -1
- package/lib/types/env/index.d.ts +2 -2
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts +7 -2
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts +2 -2
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts +1 -2
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +5 -3
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +4 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -4
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +4 -2
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/index.d.ts +1 -0
- package/lib/types/features/facets/index.d.ts.map +1 -1
- package/lib/types/features/index.d.ts +1 -0
- package/lib/types/features/index.d.ts.map +1 -1
- package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts +11 -0
- package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts.map +1 -0
- package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts +25 -0
- package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -0
- package/lib/types/features/oauth/index.d.ts +4 -0
- package/lib/types/features/oauth/index.d.ts.map +1 -0
- package/lib/types/features/oauth/useOAuthPopup.d.ts +12 -0
- package/lib/types/features/oauth/useOAuthPopup.d.ts.map +1 -0
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +3 -3
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +3 -3
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +2 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts +0 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/composable.d.ts +4 -0
- package/lib/types/session/auth/composable.d.ts.map +1 -1
- package/lib/types/session/auth/domainRouting.d.ts +8 -0
- package/lib/types/session/auth/domainRouting.d.ts.map +1 -0
- package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts +24 -0
- package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts.map +1 -0
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +2 -1
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/types/widgets/monacoEditor/foldingProviders.d.ts +2 -0
- package/lib/types/widgets/monacoEditor/foldingProviders.d.ts.map +1 -0
- 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-layout.js +1 -1
- package/lib/vertesia-ui-layout.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/package.json +15 -15
- package/src/core/components/ComboBox.tsx +66 -29
- package/src/core/components/FormItem.tsx +9 -6
- package/src/core/components/SidePanel.tsx +5 -3
- package/src/core/components/shadcn/collaspible.tsx +5 -7
- package/src/core/components/shadcn/dropdown.tsx +68 -13
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +6 -6
- package/src/core/components/shadcn/filters/filterBar.tsx +5 -3
- package/src/core/components/shadcn/radioGroup.tsx +1 -3
- package/src/core/components/shadcn/switch.tsx +0 -2
- package/src/core/components/shadcn/tabs.tsx +15 -2
- package/src/core/components/shadcn/tooltip.tsx +20 -3
- package/src/core/hooks/PortalContainerProvider.tsx +11 -3
- package/src/env/index.ts +7 -10
- package/src/features/agent/chat/AgentRightPanel.tsx +43 -23
- package/src/features/agent/chat/DocumentPanel.tsx +21 -19
- package/src/features/agent/chat/DocumentTabBar.tsx +21 -32
- package/src/features/agent/chat/ModernAgentConversation.tsx +72 -27
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -9
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +136 -115
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +0 -3
- package/src/features/agent/chat/hooks/useAgentStream.ts +13 -7
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +8 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -1
- package/src/features/facets/DocumentsFacetsNav.tsx +3 -1
- package/src/features/facets/RunsFacetsNav.tsx +9 -1
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +1 -1
- package/src/features/facets/index.ts +1 -0
- package/src/features/facets/utils/VInteractionFacet.tsx +12 -12
- package/src/features/index.ts +1 -0
- package/src/features/oauth/OAuthProviderConnectButton.tsx +125 -0
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +274 -0
- package/src/features/oauth/index.ts +3 -0
- package/src/features/oauth/useOAuthPopup.ts +125 -0
- package/src/features/store/collections/BrowseCollectionView.tsx +3 -3
- package/src/features/store/collections/EditCollectionView.tsx +10 -1
- package/src/features/store/objects/components/ContentOverview.tsx +108 -87
- package/src/features/store/objects/components/useContentPanelHooks.ts +50 -15
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +5 -5
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +6 -5
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +12 -3
- package/src/features/user/UserInfo.tsx +82 -10
- package/src/i18n/locales/ar.json +81 -98
- package/src/i18n/locales/de.json +44 -73
- package/src/i18n/locales/en.json +31 -61
- package/src/i18n/locales/es.json +55 -79
- package/src/i18n/locales/fr.json +55 -81
- package/src/i18n/locales/it.json +55 -79
- package/src/i18n/locales/ja.json +46 -75
- package/src/i18n/locales/ko.json +44 -73
- package/src/i18n/locales/pt.json +55 -79
- package/src/i18n/locales/ru.json +58 -81
- package/src/i18n/locales/tr.json +46 -75
- package/src/i18n/locales/zh-TW.json +46 -75
- package/src/i18n/locales/zh.json +46 -75
- package/src/session/UserSession.ts +2 -5
- package/src/session/UserSessionProvider.tsx +23 -18
- package/src/session/auth/auth-flow.md +1 -1
- package/src/session/auth/composable.ts +21 -2
- package/src/session/auth/domainRouting.test.ts +26 -0
- package/src/session/auth/domainRouting.ts +13 -0
- package/src/shell/login/InviteAcceptModal.tsx +1 -0
- package/src/widgets/form/Form.tsx +2 -2
- package/src/widgets/markdown/MarkdownRenderer.tsx +2 -1
- package/src/widgets/markdown/markdown.css +12 -0
- package/src/widgets/markdown/preprocessMathDelimiters.test.ts +87 -0
- package/src/widgets/markdown/preprocessMathDelimiters.ts +229 -0
- package/src/widgets/monacoEditor/MonacoEditor.tsx +47 -4
- package/src/widgets/monacoEditor/foldingProviders.ts +122 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentRun } from "@vertesia/common";
|
|
2
|
-
import { Button,
|
|
2
|
+
import { Button, Dropdown, MenuGroup, MenuItem, cn, useToast } from "@vertesia/ui/core";
|
|
3
3
|
import { useUserSession } from "@vertesia/ui/session";
|
|
4
4
|
import { Bot, ClipboardList, CopyIcon, DownloadCloudIcon, ExternalLink, GitFork, InfoIcon, MoreVertical, RefreshCcw, XIcon } from "lucide-react";
|
|
5
5
|
import { useUITranslation } from '../../../../i18n/index.js';
|
|
@@ -15,6 +15,7 @@ export interface HeaderProps {
|
|
|
15
15
|
onClose?: () => void;
|
|
16
16
|
isModal: boolean;
|
|
17
17
|
agentRunId: string;
|
|
18
|
+
workflowRunId: string;
|
|
18
19
|
viewMode: AgentConversationViewMode;
|
|
19
20
|
onViewModeChange: (mode: AgentConversationViewMode) => void;
|
|
20
21
|
showPlanPanel: boolean;
|
|
@@ -22,15 +23,15 @@ export interface HeaderProps {
|
|
|
22
23
|
showPlanButton?: boolean;
|
|
23
24
|
onTogglePlanPanel: () => void;
|
|
24
25
|
onDownload?: () => void;
|
|
25
|
-
onCopyRunId?: () => void;
|
|
26
|
+
// onCopyRunId?: () => void;
|
|
26
27
|
resetWorkflow?: () => void;
|
|
27
28
|
onExportPdf?: () => void;
|
|
28
29
|
/** Called to show run details/internals modal */
|
|
29
30
|
onShowDetails?: () => void;
|
|
30
31
|
/** Called after a restart succeeds — receives the new AgentRun */
|
|
31
32
|
onRestart?: (newRun: AgentRun) => void;
|
|
32
|
-
/** Called after a
|
|
33
|
-
|
|
33
|
+
/** Called after a clone succeeds — receives the new AgentRun */
|
|
34
|
+
onClone?: (newRun: AgentRun) => void;
|
|
34
35
|
/** Show green indicator when receiving streaming chunks */
|
|
35
36
|
isReceivingChunks?: boolean;
|
|
36
37
|
/** Additional className for the outer container */
|
|
@@ -43,6 +44,7 @@ export default function Header({
|
|
|
43
44
|
onClose,
|
|
44
45
|
isModal,
|
|
45
46
|
agentRunId,
|
|
47
|
+
workflowRunId,
|
|
46
48
|
viewMode,
|
|
47
49
|
onViewModeChange,
|
|
48
50
|
showPlanPanel,
|
|
@@ -50,16 +52,17 @@ export default function Header({
|
|
|
50
52
|
showPlanButton = true,
|
|
51
53
|
onTogglePlanPanel,
|
|
52
54
|
onDownload,
|
|
53
|
-
onCopyRunId,
|
|
55
|
+
// onCopyRunId,
|
|
54
56
|
resetWorkflow,
|
|
55
57
|
onExportPdf,
|
|
56
58
|
onShowDetails,
|
|
57
59
|
onRestart,
|
|
58
|
-
|
|
60
|
+
onClone,
|
|
59
61
|
isReceivingChunks = false,
|
|
60
62
|
className,
|
|
61
63
|
}: HeaderProps) {
|
|
62
64
|
const { t } = useUITranslation();
|
|
65
|
+
const continueWorkflow = useContinueWorkflow(agentRunId, onRestart);
|
|
63
66
|
return (
|
|
64
67
|
<PayloadBuilderProvider>
|
|
65
68
|
<div className={cn("flex flex-wrap items-end justify-between py-1.5 px-2 border-b shadow-sm flex-shrink-0", className)}>
|
|
@@ -69,7 +72,7 @@ export default function Header({
|
|
|
69
72
|
<span className="font-medium">{title}</span>
|
|
70
73
|
</div>
|
|
71
74
|
<span className="text-xs text-muted ml-1 flex items-center gap-1.5">
|
|
72
|
-
(Run ID: {agentRunId})
|
|
75
|
+
(Agent Run ID: {agentRunId})
|
|
73
76
|
{/* Streaming chunk indicator - gray when idle, purple when receiving */}
|
|
74
77
|
<span className={cn(
|
|
75
78
|
"w-2 h-2 rounded-full transition-colors duration-200",
|
|
@@ -82,10 +85,10 @@ export default function Header({
|
|
|
82
85
|
<div className="flex justify-end items-center space-x-2 ml-auto">
|
|
83
86
|
{/* View Mode Toggle */}
|
|
84
87
|
<div className="flex items-center space-x-1 bg-muted rounded p-0.5 mt-2 lg:mt-0">
|
|
85
|
-
<Button variant={viewMode === "stacked" ? "outline" : "ghost"} size="xs"
|
|
88
|
+
<Button variant={viewMode === "stacked" ? "outline" : "ghost"} size="xs" onClick={() => onViewModeChange("stacked")}>
|
|
86
89
|
{t('agent.details')}
|
|
87
90
|
</Button>
|
|
88
|
-
<Button variant={viewMode === "sliding" ? "outline" : "ghost"} size="xs"
|
|
91
|
+
<Button variant={viewMode === "sliding" ? "outline" : "ghost"} size="xs" onClick={() => onViewModeChange("sliding")}>
|
|
89
92
|
{t('agent.summary')}
|
|
90
93
|
</Button>
|
|
91
94
|
</div>
|
|
@@ -109,19 +112,32 @@ export default function Header({
|
|
|
109
112
|
</div>
|
|
110
113
|
)}
|
|
111
114
|
|
|
115
|
+
{onRestart && isTerminal && (
|
|
116
|
+
<Button
|
|
117
|
+
size="sm"
|
|
118
|
+
variant="secondary"
|
|
119
|
+
onClick={continueWorkflow}
|
|
120
|
+
className="transition-all duration-200 rounded-md"
|
|
121
|
+
title={t('agent.continueConversation')}
|
|
122
|
+
>
|
|
123
|
+
<RefreshCcw className="size-4 mr-1.5" />
|
|
124
|
+
<span className="font-medium text-xs">{t('agent.continueConversation')}</span>
|
|
125
|
+
</Button>
|
|
126
|
+
)}
|
|
127
|
+
|
|
112
128
|
{/* More actions */}
|
|
113
129
|
<MoreDropdown
|
|
114
130
|
agentRunId={agentRunId}
|
|
131
|
+
workflowRunId={workflowRunId}
|
|
115
132
|
isModal={isModal}
|
|
116
133
|
isTerminal={isTerminal}
|
|
117
134
|
onClose={onClose}
|
|
118
135
|
onDownload={onDownload}
|
|
119
|
-
onCopyRunId={onCopyRunId}
|
|
120
136
|
resetWorkflow={resetWorkflow}
|
|
121
137
|
onExportPdf={onExportPdf}
|
|
122
138
|
onShowDetails={onShowDetails}
|
|
123
139
|
onRestart={onRestart}
|
|
124
|
-
|
|
140
|
+
onClone={onClone}
|
|
125
141
|
/>
|
|
126
142
|
{onClose && !isModal && (
|
|
127
143
|
<Button size="xs" variant="ghost" onClick={onClose}>
|
|
@@ -134,20 +150,45 @@ export default function Header({
|
|
|
134
150
|
);
|
|
135
151
|
}
|
|
136
152
|
|
|
153
|
+
function useContinueWorkflow(agentRunId: string, onRestart?: (newRun: AgentRun) => void) {
|
|
154
|
+
const { t } = useUITranslation();
|
|
155
|
+
const toast = useToast();
|
|
156
|
+
const { client } = useUserSession();
|
|
157
|
+
|
|
158
|
+
return async () => {
|
|
159
|
+
try {
|
|
160
|
+
const newRun = await client.agents.restart(agentRunId);
|
|
161
|
+
toast({
|
|
162
|
+
status: "success",
|
|
163
|
+
title: t('agent.conversationContinued'),
|
|
164
|
+
duration: 2000,
|
|
165
|
+
});
|
|
166
|
+
onRestart?.(newRun);
|
|
167
|
+
} catch (_error) {
|
|
168
|
+
toast({
|
|
169
|
+
status: "error",
|
|
170
|
+
title: t('agent.failedToContinueConversation'),
|
|
171
|
+
duration: 2000,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
137
177
|
function MoreDropdown({
|
|
138
178
|
agentRunId,
|
|
179
|
+
workflowRunId,
|
|
139
180
|
isModal,
|
|
140
181
|
isTerminal,
|
|
141
182
|
onClose,
|
|
142
183
|
onDownload,
|
|
143
|
-
onCopyRunId,
|
|
144
184
|
resetWorkflow,
|
|
145
185
|
onExportPdf,
|
|
146
186
|
onShowDetails,
|
|
147
187
|
onRestart,
|
|
148
|
-
|
|
188
|
+
onClone,
|
|
149
189
|
}: {
|
|
150
190
|
agentRunId: string;
|
|
191
|
+
workflowRunId: string;
|
|
151
192
|
isModal: boolean;
|
|
152
193
|
isTerminal: boolean;
|
|
153
194
|
onClose?: () => void;
|
|
@@ -157,12 +198,13 @@ function MoreDropdown({
|
|
|
157
198
|
onExportPdf?: () => void;
|
|
158
199
|
onShowDetails?: () => void;
|
|
159
200
|
onRestart?: (newRun: AgentRun) => void;
|
|
160
|
-
|
|
201
|
+
onClone?: (newRun: AgentRun) => void;
|
|
161
202
|
}) {
|
|
162
203
|
const { t } = useUITranslation();
|
|
163
204
|
const toast = useToast();
|
|
164
205
|
const { client } = useUserSession();
|
|
165
206
|
const builder = usePayloadBuilder();
|
|
207
|
+
const continueWorkflow = useContinueWorkflow(agentRunId, onRestart);
|
|
166
208
|
|
|
167
209
|
const cancelWorkflow = async () => {
|
|
168
210
|
try {
|
|
@@ -188,37 +230,19 @@ function MoreDropdown({
|
|
|
188
230
|
}
|
|
189
231
|
};
|
|
190
232
|
|
|
191
|
-
const
|
|
192
|
-
try {
|
|
193
|
-
const newRun = await client.agents.restart(agentRunId);
|
|
194
|
-
toast({
|
|
195
|
-
status: "success",
|
|
196
|
-
title: t('agent.conversationRestarted'),
|
|
197
|
-
duration: 2000,
|
|
198
|
-
});
|
|
199
|
-
onRestart?.(newRun);
|
|
200
|
-
} catch (_error) {
|
|
201
|
-
toast({
|
|
202
|
-
status: "error",
|
|
203
|
-
title: t('agent.failedToRestartConversation'),
|
|
204
|
-
duration: 2000,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
const forkWorkflow = async () => {
|
|
233
|
+
const cloneWorkflow = async () => {
|
|
210
234
|
try {
|
|
211
235
|
const newRun = await client.agents.fork(agentRunId);
|
|
212
236
|
toast({
|
|
213
237
|
status: "success",
|
|
214
|
-
title: t('agent.
|
|
238
|
+
title: t('agent.conversationCloned'),
|
|
215
239
|
duration: 2000,
|
|
216
240
|
});
|
|
217
|
-
|
|
241
|
+
onClone?.(newRun);
|
|
218
242
|
} catch (_error) {
|
|
219
243
|
toast({
|
|
220
244
|
status: "error",
|
|
221
|
-
title: t('agent.
|
|
245
|
+
title: t('agent.failedToCloneConversation'),
|
|
222
246
|
duration: 2000,
|
|
223
247
|
});
|
|
224
248
|
}
|
|
@@ -229,88 +253,85 @@ function MoreDropdown({
|
|
|
229
253
|
return url;
|
|
230
254
|
}
|
|
231
255
|
|
|
256
|
+
const copyAgentRunId = () => {
|
|
257
|
+
navigator.clipboard.writeText(agentRunId);
|
|
258
|
+
toast({
|
|
259
|
+
status: "success",
|
|
260
|
+
title: t('agent.agentRunIdCopied'),
|
|
261
|
+
duration: 2000,
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
const copyWorkflowRunId = () => {
|
|
266
|
+
navigator.clipboard.writeText(workflowRunId);
|
|
267
|
+
toast({
|
|
268
|
+
status: "success",
|
|
269
|
+
title: t('agent.workflowRunIdCopied'),
|
|
270
|
+
duration: 2000,
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
|
|
232
274
|
return (
|
|
233
|
-
<
|
|
234
|
-
|
|
275
|
+
<Dropdown
|
|
276
|
+
align="right"
|
|
277
|
+
trigger={
|
|
235
278
|
<Button size="xs" variant="ghost" title={t('agent.moreActions')}>
|
|
236
279
|
<MoreVertical className="size-4" />
|
|
237
280
|
</Button>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
{onRestart && isTerminal && (
|
|
294
|
-
<CommandItem className="text-xs" onSelect={restartWorkflow}>
|
|
295
|
-
<RefreshCcw className="size-3.5 mr-2 text-muted" /> {t('agent.restartConversation')}
|
|
296
|
-
</CommandItem>
|
|
297
|
-
)}
|
|
298
|
-
{onFork && (
|
|
299
|
-
<CommandItem className="text-xs" onSelect={forkWorkflow}>
|
|
300
|
-
<GitFork className="size-3.5 mr-2 text-muted" /> {t('agent.forkConversation')}
|
|
301
|
-
</CommandItem>
|
|
302
|
-
)}
|
|
303
|
-
<CommandItem className="text-xs text-destructive" onSelect={() => {
|
|
304
|
-
cancelWorkflow();
|
|
305
|
-
}}>
|
|
306
|
-
<XIcon className="size-3.5 mr-2 text-destructive" /> {t('agent.cancelWorkflow')}
|
|
307
|
-
</CommandItem>
|
|
308
|
-
</CommandGroup>
|
|
309
|
-
</CommandList>
|
|
310
|
-
</Command>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</PopoverContent>
|
|
314
|
-
</Popover>
|
|
281
|
+
}
|
|
282
|
+
>
|
|
283
|
+
<MenuGroup label="Actions">
|
|
284
|
+
{isModal && (
|
|
285
|
+
<MenuItem onClick={() => openUrl(`/store/agent-runner/${agentRunId}`)}>
|
|
286
|
+
<ExternalLink className="size-3.5 text-muted" /> {t('agent.openInNewTab')}
|
|
287
|
+
</MenuItem>
|
|
288
|
+
)}
|
|
289
|
+
<MenuItem onClick={copyAgentRunId}>
|
|
290
|
+
<CopyIcon className="size-3.5 text-muted" /> {t('agent.copyAgentRunId')}
|
|
291
|
+
</MenuItem>
|
|
292
|
+
<MenuItem onClick={copyWorkflowRunId}>
|
|
293
|
+
<CopyIcon className="size-3.5 text-muted" /> {t('agent.copyWorkflowRunId')}
|
|
294
|
+
</MenuItem>
|
|
295
|
+
{onShowDetails && (
|
|
296
|
+
<MenuItem onClick={onShowDetails}>
|
|
297
|
+
<InfoIcon className="size-3.5 text-muted" /> {t('agent.details')}
|
|
298
|
+
</MenuItem>
|
|
299
|
+
)}
|
|
300
|
+
<MenuItem onClick={() => {
|
|
301
|
+
if (onDownload) {
|
|
302
|
+
onDownload();
|
|
303
|
+
} else {
|
|
304
|
+
getConversationUrl(client, agentRunId).then((r) => window.open(r, "_blank"));
|
|
305
|
+
}
|
|
306
|
+
}}>
|
|
307
|
+
<DownloadCloudIcon className="size-3.5 text-muted" /> {t('agent.downloadConversation')}
|
|
308
|
+
</MenuItem>
|
|
309
|
+
{onExportPdf && (
|
|
310
|
+
<MenuItem onClick={onExportPdf}>
|
|
311
|
+
<DownloadCloudIcon className="size-3.5 text-muted" /> {t('agent.exportAsPdf')}
|
|
312
|
+
</MenuItem>
|
|
313
|
+
)}
|
|
314
|
+
{onClose && isModal && (
|
|
315
|
+
<MenuItem onClick={onClose}>
|
|
316
|
+
<XIcon className="size-3.5 text-muted" /> {t('agent.close')}
|
|
317
|
+
</MenuItem>
|
|
318
|
+
)}
|
|
319
|
+
{onRestart && isTerminal && (
|
|
320
|
+
<MenuItem onClick={continueWorkflow}>
|
|
321
|
+
<RefreshCcw className="size-3.5 text-muted" /> {t('agent.continueConversation')}
|
|
322
|
+
</MenuItem>
|
|
323
|
+
)}
|
|
324
|
+
{onClone && (
|
|
325
|
+
<MenuItem onClick={cloneWorkflow}>
|
|
326
|
+
<GitFork className="size-3.5 text-muted" /> {t('agent.cloneConversation')}
|
|
327
|
+
</MenuItem>
|
|
328
|
+
)}
|
|
329
|
+
{!isTerminal && (
|
|
330
|
+
<MenuItem onClick={cancelWorkflow} variant="destructive">
|
|
331
|
+
<XIcon className="size-3.5" /> {t('agent.cancelWorkflow')}
|
|
332
|
+
</MenuItem>
|
|
333
|
+
)}
|
|
334
|
+
</MenuGroup>
|
|
335
|
+
</Dropdown>
|
|
315
336
|
);
|
|
316
337
|
}
|
|
@@ -534,11 +534,8 @@ function MessageItemComponent({
|
|
|
534
534
|
options={uxConfig.options}
|
|
535
535
|
variant={uxConfig.variant}
|
|
536
536
|
multiSelect={uxConfig.multiSelect}
|
|
537
|
-
allowFreeResponse={uxConfig.allowFreeResponse}
|
|
538
|
-
placeholder={uxConfig.placeholder}
|
|
539
537
|
onSelect={(optionId) => onSendMessage?.(optionId)}
|
|
540
538
|
onMultiSelect={(optionIds) => onSendMessage?.(optionIds.join(", "))}
|
|
541
|
-
onSubmit={(text) => onSendMessage?.(text)}
|
|
542
539
|
hideBorder
|
|
543
540
|
/>
|
|
544
541
|
);
|
|
@@ -28,8 +28,10 @@ export interface UseAgentStreamResult {
|
|
|
28
28
|
addOptimisticMessage: (msg: AgentMessage) => void;
|
|
29
29
|
/** Remove optimistic messages matching a predicate */
|
|
30
30
|
removeOptimisticMessages: (predicate: (msg: AgentMessage) => boolean) => void;
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/** AgentRun status fetched from API (RUNNING, COMPLETED, FAILED, etc.) */
|
|
32
|
+
agentRunStatus: string | null;
|
|
33
|
+
/** Temporal workflow run ID (first_workflow_run_id from AgentRun) */
|
|
34
|
+
workflowRunId: string | null;
|
|
33
35
|
/** Server-side file processing status updates (from SYSTEM messages) */
|
|
34
36
|
serverFileUpdates: Map<string, ConversationFile>;
|
|
35
37
|
}
|
|
@@ -55,7 +57,8 @@ export function useAgentStream(
|
|
|
55
57
|
): UseAgentStreamResult {
|
|
56
58
|
const [messages, setMessages] = useState<AgentMessage[]>([]);
|
|
57
59
|
const [isCompleted, setIsCompleted] = useState(false);
|
|
58
|
-
const [
|
|
60
|
+
const [agentRunStatus, setAgentRunStatus] = useState<string | null>(null);
|
|
61
|
+
const [workflowRunId, setWorkflowRunId] = useState<string | null>(null);
|
|
59
62
|
|
|
60
63
|
// Server-side file processing status updates
|
|
61
64
|
const [serverFileUpdates, setServerFileUpdates] = useState<Map<string, ConversationFile>>(new Map());
|
|
@@ -103,16 +106,18 @@ export function useAgentStream(
|
|
|
103
106
|
// Reset all state when agentRunId changes (new agent)
|
|
104
107
|
console.debug('[useAgentStream] effect:start', { agentRunId });
|
|
105
108
|
setMessages([]);
|
|
106
|
-
|
|
109
|
+
setAgentRunStatus(null);
|
|
110
|
+
setWorkflowRunId(null);
|
|
107
111
|
setStreamingMessages(new Map());
|
|
108
112
|
setServerFileUpdates(new Map());
|
|
109
113
|
const abortController = new AbortController();
|
|
110
114
|
|
|
111
115
|
// Check agent run status
|
|
112
|
-
client.agents.
|
|
116
|
+
client.agents.getInternals(agentRunId)
|
|
113
117
|
.then((agentRun) => {
|
|
114
118
|
if (!abortController.signal.aborted) {
|
|
115
|
-
|
|
119
|
+
setAgentRunStatus(agentRun.status?.toUpperCase() ?? null);
|
|
120
|
+
setWorkflowRunId(agentRun.first_workflow_run_id ?? null);
|
|
116
121
|
}
|
|
117
122
|
})
|
|
118
123
|
.catch((error) => {
|
|
@@ -294,7 +299,8 @@ export function useAgentStream(
|
|
|
294
299
|
debugChunkFlash,
|
|
295
300
|
addOptimisticMessage,
|
|
296
301
|
removeOptimisticMessages,
|
|
297
|
-
|
|
302
|
+
agentRunStatus,
|
|
303
|
+
workflowRunId,
|
|
298
304
|
serverFileUpdates,
|
|
299
305
|
};
|
|
300
306
|
}
|
|
@@ -11,6 +11,7 @@ export interface UseDocumentPanelResult {
|
|
|
11
11
|
closeDocument: (docId: string) => void;
|
|
12
12
|
selectDocument: (docId: string) => void;
|
|
13
13
|
openDocInPanel: (docId: string) => void;
|
|
14
|
+
updateDocumentTitle: (docId: string, title: string) => void;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
function toNonEmptyString(value: unknown): string | undefined {
|
|
@@ -165,6 +166,12 @@ export function useDocumentPanel(messages: AgentMessage[]): UseDocumentPanelResu
|
|
|
165
166
|
setIsDocPanelOpen(true);
|
|
166
167
|
}, []);
|
|
167
168
|
|
|
169
|
+
const updateDocumentTitle = useCallback((docId: string, title: string) => {
|
|
170
|
+
setOpenDocuments(prev => prev.map(d =>
|
|
171
|
+
d.id === docId ? { ...d, title } : d
|
|
172
|
+
));
|
|
173
|
+
}, []);
|
|
174
|
+
|
|
168
175
|
return {
|
|
169
176
|
openDocuments,
|
|
170
177
|
activeDocumentId,
|
|
@@ -174,5 +181,6 @@ export function useDocumentPanel(messages: AgentMessage[]): UseDocumentPanelResu
|
|
|
174
181
|
closeDocument,
|
|
175
182
|
selectDocument,
|
|
176
183
|
openDocInPanel,
|
|
184
|
+
updateDocumentTitle,
|
|
177
185
|
};
|
|
178
186
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
|
|
1
|
+
import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup, useIsInModal } from '@vertesia/ui/core';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useTypeRegistry } from '../store/types/TypeRegistryProvider.js';
|
|
4
4
|
import { VStringFacet } from './utils/VStringFacet';
|
|
@@ -161,6 +161,7 @@ export function DocumentsFacetsNav({
|
|
|
161
161
|
const [filters, setFilters] = useState<BaseFilter[]>([]);
|
|
162
162
|
const filterGroups = useDocumentFilterGroups(facets);
|
|
163
163
|
const handleFilterLogic = useDocumentFilterHandler(search);
|
|
164
|
+
const inModal = useIsInModal();
|
|
164
165
|
|
|
165
166
|
const handleFilterChange: React.Dispatch<React.SetStateAction<BaseFilter[]>> = (value) => {
|
|
166
167
|
const newFilters = typeof value === 'function' ? value(filters) : value;
|
|
@@ -173,6 +174,7 @@ export function DocumentsFacetsNav({
|
|
|
173
174
|
filterGroups={filterGroups}
|
|
174
175
|
filters={filters}
|
|
175
176
|
setFilters={handleFilterChange}
|
|
177
|
+
inModal={inModal}
|
|
176
178
|
>
|
|
177
179
|
<div className="flex gap-2 items-center">
|
|
178
180
|
<FilterBtn />
|
|
@@ -125,6 +125,14 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
125
125
|
};
|
|
126
126
|
customFilterGroups.push(workflowRunIdFilterGroup);
|
|
127
127
|
|
|
128
|
+
const workflowIdFilterGroup = {
|
|
129
|
+
name: 'workflow_ids',
|
|
130
|
+
placeholder: 'Workflow ID',
|
|
131
|
+
type: 'text' as const,
|
|
132
|
+
multiple: false
|
|
133
|
+
};
|
|
134
|
+
customFilterGroups.push(workflowIdFilterGroup);
|
|
135
|
+
|
|
128
136
|
return customFilterGroups;
|
|
129
137
|
}
|
|
130
138
|
|
|
@@ -160,7 +168,7 @@ export function useRunsFilterHandler(search: SearchInterface) {
|
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
// Force array format for backend fields that expect arrays
|
|
163
|
-
if ((filterName === 'run_ids' || filterName === 'workflow_run_ids') && !Array.isArray(filterValue)) {
|
|
171
|
+
if ((filterName === 'run_ids' || filterName === 'workflow_run_ids' || filterName === 'workflow_ids') && !Array.isArray(filterValue)) {
|
|
164
172
|
filterValue = [filterValue];
|
|
165
173
|
}
|
|
166
174
|
|
|
@@ -17,7 +17,7 @@ export function useWorkflowExecutionsFilterGroups(facets: WorkflowExecutionsFace
|
|
|
17
17
|
const customFilterGroups: FilterGroup[] = [];
|
|
18
18
|
|
|
19
19
|
customFilterGroups.push({
|
|
20
|
-
placeholder: 'Workflow or Run ID',
|
|
20
|
+
placeholder: 'Workflow Name or Workflow Run ID',
|
|
21
21
|
name: 'name',
|
|
22
22
|
type: 'text',
|
|
23
23
|
options: [],
|
|
@@ -3,6 +3,7 @@ export * from "./utils/SearchInterface";
|
|
|
3
3
|
export { StringFacet } from "./utils/StringFacet";
|
|
4
4
|
export { StringListFacet } from "./utils/StringListFacet";
|
|
5
5
|
export { TypeFacet } from "./utils/TypeFacet";
|
|
6
|
+
export { VInteractionFacet } from "./utils/VInteractionFacet";
|
|
6
7
|
export { VStringFacet } from "./utils/VStringFacet";
|
|
7
8
|
export { VTypeFacet } from "./utils/VTypeFacet";
|
|
8
9
|
export { VUserFacet } from "./utils/VUserFacet";
|
|
@@ -27,25 +27,25 @@ export function VInteractionFacet({ buckets, name, placeholder }: InteractionFac
|
|
|
27
27
|
labelRenderer: (interactionId: string) => {
|
|
28
28
|
const bucket = buckets.find(b => b._id === interactionId);
|
|
29
29
|
const displayName = bucket?.name || interactionId;
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
// Determine badge variant based on status
|
|
32
|
-
let badgeVariant: "success" | "
|
|
32
|
+
let badgeVariant: "success" | "info" | "destructive" | "default" = "success";
|
|
33
33
|
if (bucket?.status) {
|
|
34
34
|
switch (bucket.status) {
|
|
35
|
-
case InteractionStatus.published:
|
|
36
|
-
badgeVariant = "success";
|
|
35
|
+
case InteractionStatus.published:
|
|
36
|
+
badgeVariant = "success";
|
|
37
37
|
break;
|
|
38
|
-
case InteractionStatus.archived:
|
|
39
|
-
badgeVariant = "destructive";
|
|
38
|
+
case InteractionStatus.archived:
|
|
39
|
+
badgeVariant = "destructive";
|
|
40
40
|
break;
|
|
41
|
-
|
|
42
|
-
badgeVariant = "
|
|
41
|
+
case InteractionStatus.code:
|
|
42
|
+
badgeVariant = "info";
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const badgeText = bucket?.version && bucket?.status ?
|
|
48
|
-
`v${bucket.version} ${bucket.status}` :
|
|
46
|
+
|
|
47
|
+
const badgeText = (bucket?.version && bucket?.status) ?
|
|
48
|
+
`v${bucket.version} ${bucket.status != InteractionStatus.unknown ? bucket.status : ''}` :
|
|
49
49
|
bucket?.status || (bucket?.version ? `v${bucket.version}` : '');
|
|
50
50
|
|
|
51
51
|
return (
|
|
@@ -58,7 +58,7 @@ export function VInteractionFacet({ buckets, name, placeholder }: InteractionFac
|
|
|
58
58
|
</Badge>
|
|
59
59
|
)}
|
|
60
60
|
</div>
|
|
61
|
-
<span className="ml-2 text-xs shrink-0">({bucket
|
|
61
|
+
{(bucket?.count ?? 0) > 0 && <span className="ml-2 text-xs shrink-0">({bucket!.count})</span>}
|
|
62
62
|
</div>
|
|
63
63
|
);
|
|
64
64
|
},
|
package/src/features/index.ts
CHANGED