@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
|
@@ -14,8 +14,8 @@ type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitiv
|
|
|
14
14
|
side?: "top" | "right" | "bottom" | "left"
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<React.
|
|
18
|
-
React.
|
|
17
|
+
const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<React.ComponentRef<typeof TooltipPrimitive.Content>>> = React.forwardRef<
|
|
18
|
+
React.ComponentRef<typeof TooltipPrimitive.Content>,
|
|
19
19
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
20
20
|
side?: "top" | "right" | "bottom" | "left"
|
|
21
21
|
}
|
|
@@ -49,9 +49,26 @@ interface TooltipPopoverProps {
|
|
|
49
49
|
asChild?: boolean;
|
|
50
50
|
}
|
|
51
51
|
export function VTooltip({ description, children, size = 'sm', placement = 'top', className, asChild }: TooltipPopoverProps) {
|
|
52
|
+
const [open, setOpen] = React.useState(false);
|
|
53
|
+
const suppressRef = React.useRef(false);
|
|
54
|
+
|
|
55
|
+
React.useEffect(() => {
|
|
56
|
+
const suppress = () => {
|
|
57
|
+
setOpen(false);
|
|
58
|
+
suppressRef.current = true;
|
|
59
|
+
requestAnimationFrame(() => { suppressRef.current = false; });
|
|
60
|
+
};
|
|
61
|
+
window.addEventListener('blur', suppress);
|
|
62
|
+
document.addEventListener('visibilitychange', suppress);
|
|
63
|
+
return () => {
|
|
64
|
+
window.removeEventListener('blur', suppress);
|
|
65
|
+
document.removeEventListener('visibilitychange', suppress);
|
|
66
|
+
};
|
|
67
|
+
}, []);
|
|
68
|
+
|
|
52
69
|
return (
|
|
53
70
|
<TooltipProvider delayDuration={0}>
|
|
54
|
-
<Tooltip>
|
|
71
|
+
<Tooltip open={open} onOpenChange={(v) => { if (!suppressRef.current) setOpen(v); }}>
|
|
55
72
|
<TooltipTrigger className="cursor-pointer" asChild={asChild}>
|
|
56
73
|
{children}
|
|
57
74
|
</TooltipTrigger>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const PortalContainerContext = React.createContext<HTMLElement | undefined>(undefined);
|
|
3
|
+
export const PortalContainerContext = React.createContext<HTMLElement | undefined>(undefined);
|
|
4
4
|
|
|
5
5
|
function findOrCreatePortalContainer(root: ShadowRoot | Document, id = "plugin-portal-container") {
|
|
6
6
|
// Determine the actual parent element to search and append to
|
|
@@ -26,10 +26,18 @@ export function PortalContainerProvider({
|
|
|
26
26
|
children: React.ReactNode;
|
|
27
27
|
id?: string;
|
|
28
28
|
}) {
|
|
29
|
+
const inherited = React.useContext(PortalContainerContext);
|
|
29
30
|
const ref = React.useRef<HTMLDivElement>(null);
|
|
30
|
-
const [container, setContainer] = React.useState<HTMLElement | null | undefined>(
|
|
31
|
+
const [container, setContainer] = React.useState<HTMLElement | null | undefined>(
|
|
32
|
+
inherited || undefined
|
|
33
|
+
);
|
|
31
34
|
|
|
32
35
|
React.useEffect(() => {
|
|
36
|
+
// If a parent already provides a portal container, inherit it
|
|
37
|
+
if (inherited) {
|
|
38
|
+
setContainer(inherited);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
33
41
|
if (ref.current) {
|
|
34
42
|
const root = ref.current.getRootNode();
|
|
35
43
|
if (root instanceof ShadowRoot || root instanceof Document) {
|
|
@@ -39,7 +47,7 @@ export function PortalContainerProvider({
|
|
|
39
47
|
setContainer(null);
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
|
-
}, [id]);
|
|
50
|
+
}, [id, inherited]);
|
|
43
51
|
|
|
44
52
|
// If container not discovered yet → render hidden marker only
|
|
45
53
|
if (container === undefined) {
|
package/src/env/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { AuthTokenPayload } from "@vertesia/common";
|
|
|
6
6
|
export interface EnvProps {
|
|
7
7
|
name: string; // the app name
|
|
8
8
|
version: string,
|
|
9
|
+
commitTimestamp?: string, // ISO timestamp of the deployed commit
|
|
9
10
|
sdkVersion?: string, // the @vertesia/ui package version
|
|
10
11
|
isLocalDev: boolean,
|
|
11
12
|
isDocker: boolean,
|
|
@@ -56,6 +57,10 @@ export class VertesiaEnvironment implements Readonly<EnvProps> {
|
|
|
56
57
|
return this.prop("version");
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
get commitTimestamp() {
|
|
61
|
+
return this._props?.commitTimestamp;
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
get sdkVersion() {
|
|
60
65
|
return this._props?.sdkVersion;
|
|
61
66
|
}
|
|
@@ -69,19 +74,11 @@ export class VertesiaEnvironment implements Readonly<EnvProps> {
|
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
get isProd() {
|
|
72
|
-
return this.type === "production";
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
get isStable() {
|
|
76
|
-
return this.type === "production" || this.type === "preview" || this.type === "disaster-recovery";
|
|
77
|
+
return this.type === "production" || this.type === "preview";
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
get isDev() {
|
|
80
|
-
return !this.
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
get isPreview() {
|
|
84
|
-
return this.type === "preview";
|
|
81
|
+
return !this.isProd;
|
|
85
82
|
}
|
|
86
83
|
|
|
87
84
|
get isLocalDev() {
|
|
@@ -30,7 +30,7 @@ export interface WorkstreamInfo {
|
|
|
30
30
|
elapsed_ms: number;
|
|
31
31
|
deadline_ms: number;
|
|
32
32
|
remaining_ms: number;
|
|
33
|
-
status: 'running' | 'canceling';
|
|
33
|
+
status: 'running' | 'canceling' | 'completed' | 'canceled';
|
|
34
34
|
phase?: string;
|
|
35
35
|
child_workflow_id?: string;
|
|
36
36
|
child_workflow_run_id?: string;
|
|
@@ -124,7 +124,7 @@ interface WorkstreamsTabProps {
|
|
|
124
124
|
runId?: string;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function WorkstreamsTab({ workstreams }: WorkstreamsTabProps) {
|
|
127
|
+
function WorkstreamsTab({ workstreams, messages: _messages }: WorkstreamsTabProps) {
|
|
128
128
|
const { t } = useUITranslation();
|
|
129
129
|
const { client } = useUserSession();
|
|
130
130
|
const toast = useToast();
|
|
@@ -155,12 +155,21 @@ function WorkstreamsTab({ workstreams }: WorkstreamsTabProps) {
|
|
|
155
155
|
return (
|
|
156
156
|
<div className="p-3 space-y-2">
|
|
157
157
|
{workstreams.map((ws) => {
|
|
158
|
+
const isActive = ws.status === 'running' || ws.status === 'canceling';
|
|
158
159
|
const elapsed = Math.round(ws.elapsed_ms / 1000);
|
|
159
160
|
const remaining = Math.round(ws.remaining_ms / 1000);
|
|
160
161
|
const progress = ws.deadline_ms > 0
|
|
161
162
|
? Math.min(100, Math.round((ws.elapsed_ms / ws.deadline_ms) * 100))
|
|
162
163
|
: 0;
|
|
163
164
|
|
|
165
|
+
const statusBadge = ws.status === 'running'
|
|
166
|
+
? <Badge variant="info">{ws.phase || 'running'}</Badge>
|
|
167
|
+
: ws.status === 'canceling'
|
|
168
|
+
? <Badge variant="attention">canceling</Badge>
|
|
169
|
+
: ws.status === 'completed'
|
|
170
|
+
? <Badge variant="done">{t('agent.completed')}</Badge>
|
|
171
|
+
: <Badge variant="destructive">{t('agent.canceled')}</Badge>;
|
|
172
|
+
|
|
164
173
|
return (
|
|
165
174
|
<div
|
|
166
175
|
key={ws.launch_id}
|
|
@@ -170,21 +179,23 @@ function WorkstreamsTab({ workstreams }: WorkstreamsTabProps) {
|
|
|
170
179
|
<span className="text-sm font-medium truncate">
|
|
171
180
|
{ws.workstream_id}
|
|
172
181
|
</span>
|
|
173
|
-
|
|
174
|
-
{ws.status === 'running' ? (ws.phase || 'running') : 'canceling'}
|
|
175
|
-
</Badge>
|
|
176
|
-
</div>
|
|
177
|
-
{/* Progress bar */}
|
|
178
|
-
<div className="w-full h-1.5 bg-muted rounded-full overflow-hidden">
|
|
179
|
-
<div
|
|
180
|
-
className="h-full bg-info rounded-full transition-all duration-500"
|
|
181
|
-
style={{ width: `${progress}%` }}
|
|
182
|
-
/>
|
|
183
|
-
</div>
|
|
184
|
-
<div className="flex justify-between text-xs text-muted">
|
|
185
|
-
<span>{t('agent.elapsed', { seconds: elapsed })}</span>
|
|
186
|
-
<span>{t('agent.remaining', { seconds: remaining })}</span>
|
|
182
|
+
{statusBadge}
|
|
187
183
|
</div>
|
|
184
|
+
{/* Progress bar — only for active workstreams */}
|
|
185
|
+
{isActive && (
|
|
186
|
+
<>
|
|
187
|
+
<div className="w-full h-1.5 bg-muted rounded-full overflow-hidden">
|
|
188
|
+
<div
|
|
189
|
+
className="h-full bg-info rounded-full transition-all duration-500"
|
|
190
|
+
style={{ width: `${progress}%` }}
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
<div className="flex justify-between text-xs text-muted">
|
|
194
|
+
<span>{t('agent.elapsed', { seconds: elapsed })}</span>
|
|
195
|
+
<span>{t('agent.remaining', { seconds: remaining })}</span>
|
|
196
|
+
</div>
|
|
197
|
+
</>
|
|
198
|
+
)}
|
|
188
199
|
{/* Actions */}
|
|
189
200
|
{ws.child_workflow_run_id && (
|
|
190
201
|
<div className="flex gap-1 pt-1 border-t border-muted">
|
|
@@ -244,6 +255,7 @@ export interface AgentRightPanelProps {
|
|
|
244
255
|
activeDocumentId?: string | null;
|
|
245
256
|
onSelectDocument?: (id: string) => void;
|
|
246
257
|
onCloseDocument?: (id: string) => void;
|
|
258
|
+
onUpdateDocumentTitle?: (id: string, title: string) => void;
|
|
247
259
|
docRefreshKey?: number;
|
|
248
260
|
runId?: string;
|
|
249
261
|
|
|
@@ -259,6 +271,10 @@ export interface AgentRightPanelProps {
|
|
|
259
271
|
onClose: () => void;
|
|
260
272
|
/** Which tab to auto-activate when panel opens */
|
|
261
273
|
defaultTab?: RightPanelTab;
|
|
274
|
+
/** Controlled active tab (overrides internal state when provided) */
|
|
275
|
+
activeTab?: RightPanelTab;
|
|
276
|
+
/** Callback when the active tab changes */
|
|
277
|
+
onTabChange?: (tab: RightPanelTab) => void;
|
|
262
278
|
}
|
|
263
279
|
|
|
264
280
|
function AgentRightPanelComponent({
|
|
@@ -280,6 +296,7 @@ function AgentRightPanelComponent({
|
|
|
280
296
|
activeDocumentId,
|
|
281
297
|
onSelectDocument,
|
|
282
298
|
onCloseDocument,
|
|
299
|
+
onUpdateDocumentTitle,
|
|
283
300
|
docRefreshKey = 0,
|
|
284
301
|
runId,
|
|
285
302
|
|
|
@@ -299,9 +316,16 @@ function AgentRightPanelComponent({
|
|
|
299
316
|
// Panel
|
|
300
317
|
onClose,
|
|
301
318
|
defaultTab,
|
|
319
|
+
activeTab: activeTabProp,
|
|
320
|
+
onTabChange,
|
|
302
321
|
}: AgentRightPanelProps) {
|
|
303
322
|
const { t } = useUITranslation();
|
|
304
|
-
const [
|
|
323
|
+
const [internalActiveTab, setInternalActiveTab] = useState<RightPanelTab>(defaultTab || 'plan');
|
|
324
|
+
const activeTab = activeTabProp ?? internalActiveTab;
|
|
325
|
+
const handleTabChange = (name: string) => {
|
|
326
|
+
setInternalActiveTab(name as RightPanelTab);
|
|
327
|
+
onTabChange?.(name as RightPanelTab);
|
|
328
|
+
};
|
|
305
329
|
|
|
306
330
|
// Determine which tabs have content (for badges/indicators)
|
|
307
331
|
const hasWorkstreams = !hideWorkstreams && activeWorkstreams.length > 0;
|
|
@@ -309,10 +333,6 @@ function AgentRightPanelComponent({
|
|
|
309
333
|
const hasUploads = processingFiles ? processingFiles.size > 0 : false;
|
|
310
334
|
const hasPlan = showPlan && plan;
|
|
311
335
|
|
|
312
|
-
const handleCloseDocPanel = useCallback(() => {
|
|
313
|
-
setActiveTab('plan');
|
|
314
|
-
}, []);
|
|
315
|
-
|
|
316
336
|
const conversationTab: TabDefinition = {
|
|
317
337
|
name: 'conversation',
|
|
318
338
|
label: 'Conversation',
|
|
@@ -360,11 +380,11 @@ function AgentRightPanelComponent({
|
|
|
360
380
|
content: openDocuments.length > 0 && onSelectDocument && onCloseDocument ? (
|
|
361
381
|
<DocumentPanel
|
|
362
382
|
isOpen={true}
|
|
363
|
-
onClose={handleCloseDocPanel}
|
|
364
383
|
documents={openDocuments}
|
|
365
384
|
activeDocumentId={activeDocumentId ?? null}
|
|
366
385
|
onSelectDocument={onSelectDocument}
|
|
367
386
|
onCloseDocument={onCloseDocument}
|
|
387
|
+
onUpdateDocumentTitle={onUpdateDocumentTitle}
|
|
368
388
|
refreshKey={docRefreshKey}
|
|
369
389
|
runId={runId}
|
|
370
390
|
/>
|
|
@@ -402,7 +422,7 @@ function AgentRightPanelComponent({
|
|
|
402
422
|
<Tabs
|
|
403
423
|
tabs={tabs}
|
|
404
424
|
current={activeTab}
|
|
405
|
-
onTabChange={
|
|
425
|
+
onTabChange={handleTabChange}
|
|
406
426
|
fullHeight
|
|
407
427
|
className="px-0"
|
|
408
428
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { ExternalLinkIcon, FileTextIcon, Loader2Icon, X } from 'lucide-react';
|
|
3
3
|
import { useUserSession } from '@vertesia/ui/session';
|
|
4
|
-
import { Button } from '@vertesia/ui/core';
|
|
4
|
+
import { Button, VTooltip } from '@vertesia/ui/core';
|
|
5
5
|
import { NavLink } from '@vertesia/ui/router';
|
|
6
6
|
import { MarkdownRenderer } from '@vertesia/ui/widgets';
|
|
7
7
|
import { useUITranslation } from '../../../i18n/index.js';
|
|
@@ -10,22 +10,22 @@ import type { OpenDocument } from './types/document.js';
|
|
|
10
10
|
|
|
11
11
|
interface DocumentPanelProps {
|
|
12
12
|
isOpen: boolean;
|
|
13
|
-
onClose: () => void;
|
|
14
13
|
documents: OpenDocument[];
|
|
15
14
|
activeDocumentId: string | null;
|
|
16
15
|
onSelectDocument: (id: string) => void;
|
|
17
16
|
onCloseDocument: (id: string) => void;
|
|
17
|
+
onUpdateDocumentTitle?: (id: string, title: string) => void;
|
|
18
18
|
refreshKey: number;
|
|
19
19
|
runId?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function DocumentPanelComponent({
|
|
23
23
|
isOpen,
|
|
24
|
-
onClose,
|
|
25
24
|
documents,
|
|
26
25
|
activeDocumentId,
|
|
27
26
|
onSelectDocument,
|
|
28
27
|
onCloseDocument,
|
|
28
|
+
onUpdateDocumentTitle,
|
|
29
29
|
refreshKey,
|
|
30
30
|
runId,
|
|
31
31
|
}: DocumentPanelProps) {
|
|
@@ -45,7 +45,9 @@ function DocumentPanelComponent({
|
|
|
45
45
|
client.store.objects.retrieve(docId),
|
|
46
46
|
]);
|
|
47
47
|
setContent(textResult.text);
|
|
48
|
-
|
|
48
|
+
const name = obj.name;
|
|
49
|
+
setDocName(name);
|
|
50
|
+
if (name) onUpdateDocumentTitle?.(docId, name);
|
|
49
51
|
} catch (err: unknown) {
|
|
50
52
|
const message = err instanceof Error ? err.message : t('agent.failedToLoadDocument');
|
|
51
53
|
setError(message);
|
|
@@ -53,7 +55,7 @@ function DocumentPanelComponent({
|
|
|
53
55
|
} finally {
|
|
54
56
|
setIsLoading(false);
|
|
55
57
|
}
|
|
56
|
-
}, [client]);
|
|
58
|
+
}, [client, onUpdateDocumentTitle]);
|
|
57
59
|
|
|
58
60
|
// Fetch content when active document changes or refreshKey bumps
|
|
59
61
|
useEffect(() => {
|
|
@@ -77,33 +79,33 @@ function DocumentPanelComponent({
|
|
|
77
79
|
</h3>
|
|
78
80
|
</div>
|
|
79
81
|
<div className="flex items-center gap-1">
|
|
82
|
+
<DocumentTabBar
|
|
83
|
+
documents={documents}
|
|
84
|
+
activeId={activeDocumentId}
|
|
85
|
+
onSelect={onSelectDocument}
|
|
86
|
+
/>
|
|
80
87
|
{activeDocumentId && (
|
|
81
88
|
<NavLink
|
|
82
89
|
href={`/store/objects/${activeDocumentId}#overview`}
|
|
83
90
|
topLevelNav
|
|
84
91
|
className="inline-flex items-center justify-center rounded-md text-sm font-medium h-8 w-8 hover:bg-muted/20 text-muted hover:text-foreground"
|
|
85
92
|
>
|
|
86
|
-
<
|
|
87
|
-
|
|
93
|
+
<VTooltip description={t('agent.openDocument')} placement="top" size='xs'>
|
|
94
|
+
<ExternalLinkIcon className="size-4" />
|
|
95
|
+
</VTooltip>
|
|
88
96
|
</NavLink>
|
|
89
97
|
)}
|
|
90
|
-
<Button
|
|
98
|
+
<Button
|
|
99
|
+
variant="ghost"
|
|
100
|
+
size="sm"
|
|
101
|
+
onClick={() => activeDocumentId && onCloseDocument(activeDocumentId)}
|
|
102
|
+
title={t('agent.close')}
|
|
103
|
+
>
|
|
91
104
|
<X className="size-4" />
|
|
92
|
-
<span className="sr-only">{t('agent.close')}</span>
|
|
93
105
|
</Button>
|
|
94
106
|
</div>
|
|
95
107
|
</div>
|
|
96
108
|
|
|
97
|
-
{/* Tab bar */}
|
|
98
|
-
<div className="shrink-0">
|
|
99
|
-
<DocumentTabBar
|
|
100
|
-
documents={documents}
|
|
101
|
-
activeId={activeDocumentId}
|
|
102
|
-
onSelect={onSelectDocument}
|
|
103
|
-
onClose={onCloseDocument}
|
|
104
|
-
/>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
109
|
{/* Content area */}
|
|
108
110
|
<div className="flex-1 overflow-y-auto px-4 py-4">
|
|
109
111
|
{isLoading ? (
|
|
@@ -1,49 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
2
|
+
import { Button, Dropdown, MenuItem } from '@vertesia/ui/core';
|
|
3
3
|
import type { OpenDocument } from './types/document.js';
|
|
4
4
|
|
|
5
5
|
interface DocumentTabBarProps {
|
|
6
6
|
documents: OpenDocument[];
|
|
7
7
|
activeId: string | null;
|
|
8
8
|
onSelect: (id: string) => void;
|
|
9
|
-
onClose: (id: string) => void;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export function DocumentTabBar({ documents, activeId, onSelect
|
|
11
|
+
export function DocumentTabBar({ documents, activeId, onSelect }: DocumentTabBarProps) {
|
|
13
12
|
if (documents.length === 0) return null;
|
|
14
13
|
|
|
15
14
|
return (
|
|
16
|
-
<div className="flex items-center gap-1
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
15
|
+
<div className="flex items-center gap-1 px-2 py-1.5">
|
|
16
|
+
<Dropdown
|
|
17
|
+
align="right"
|
|
18
|
+
trigger={
|
|
19
|
+
<Button variant="ghost" size="xs"
|
|
20
|
+
title='All opened documents'
|
|
21
|
+
className="flex items-center gap-1.5 max-w-[220px] text-xs h-7 px-2">
|
|
22
|
+
<ChevronDownIcon className="size-3 shrink-0" />
|
|
23
|
+
</Button>
|
|
24
|
+
}
|
|
25
|
+
>
|
|
26
|
+
{documents.map((doc) => (
|
|
27
|
+
<MenuItem
|
|
21
28
|
key={doc.id}
|
|
22
29
|
onClick={() => onSelect(doc.id)}
|
|
23
|
-
className={
|
|
24
|
-
'group flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md transition-colors whitespace-nowrap max-w-[200px]',
|
|
25
|
-
isActive
|
|
26
|
-
? 'bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 shadow-sm'
|
|
27
|
-
: 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700/50'
|
|
28
|
-
)}
|
|
30
|
+
className={doc.id === activeId ? 'font-medium' : ''}
|
|
29
31
|
>
|
|
30
|
-
<span className="truncate">{doc.title}</span>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
e.stopPropagation();
|
|
35
|
-
onClose(doc.id);
|
|
36
|
-
}}
|
|
37
|
-
className={cn(
|
|
38
|
-
'shrink-0 p-0.5 rounded hover:bg-gray-200 dark:hover:bg-gray-600',
|
|
39
|
-
isActive ? 'opacity-60 hover:opacity-100' : 'opacity-0 group-hover:opacity-60 hover:!opacity-100'
|
|
40
|
-
)}
|
|
41
|
-
>
|
|
42
|
-
<XIcon className="size-3" />
|
|
43
|
-
</span>
|
|
44
|
-
</button>
|
|
45
|
-
);
|
|
46
|
-
})}
|
|
32
|
+
<span className="truncate max-w-[200px]">{doc.title}</span>
|
|
33
|
+
</MenuItem>
|
|
34
|
+
))}
|
|
35
|
+
</Dropdown>
|
|
47
36
|
</div>
|
|
48
37
|
);
|
|
49
38
|
}
|