@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
package/src/i18n/locales/zh.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"agent.actions": "操作",
|
|
3
2
|
"agent.activeWorkstreams_one": "代理有{{count}}个活跃的工作流正在运行",
|
|
4
3
|
"agent.activeWorkstreams_other": "代理有{{count}}个活跃的工作流正在运行",
|
|
5
4
|
"agent.agentConversation": "代理对话",
|
|
6
5
|
"agent.agentInterrupted": "代理已中断",
|
|
7
6
|
"agent.agentPlan": "代理计划",
|
|
8
7
|
"agent.agentProcessing": "代理正在处理中,完成后即可继续...",
|
|
8
|
+
"agent.agentRunIdCopied": "已复制代理运行ID",
|
|
9
9
|
"agent.agentStarted": "代理已启动",
|
|
10
10
|
"agent.agentWorking": "代理工作中...(按两次Esc停止)",
|
|
11
11
|
"agent.agentWorkingStop": "代理工作中...按两次Esc或点击停止来中断",
|
|
@@ -13,24 +13,28 @@
|
|
|
13
13
|
"agent.artifacts": "产物",
|
|
14
14
|
"agent.askAnything": "随便问...(拖放或粘贴文件)",
|
|
15
15
|
"agent.batch": "批次",
|
|
16
|
+
"agent.canceled": "",
|
|
16
17
|
"agent.cancelWorkflow": "取消工作流",
|
|
17
|
-
"agent.canceling": "正在取消",
|
|
18
18
|
"agent.clickToEnlarge": "点击放大",
|
|
19
|
+
"agent.cloneConversation": "克隆对话",
|
|
19
20
|
"agent.close": "关闭",
|
|
20
21
|
"agent.closeFullscreen": "关闭全屏",
|
|
21
22
|
"agent.completed": "已完成",
|
|
22
|
-
"agent.
|
|
23
|
-
"agent.
|
|
23
|
+
"agent.continueConversation": "继续对话",
|
|
24
|
+
"agent.conversationCloned": "对话已克隆",
|
|
25
|
+
"agent.conversationContinued": "对话已继续",
|
|
24
26
|
"agent.copied": "已复制",
|
|
25
27
|
"agent.copiedAllToolCalls": "所有工具调用已复制到剪贴板",
|
|
26
28
|
"agent.copiedBatchDetails": "批次详情已复制到剪贴板",
|
|
27
29
|
"agent.copiedToClipboard": "已复制到剪贴板",
|
|
28
30
|
"agent.copy": "复制",
|
|
31
|
+
"agent.copyAgentRunId": "复制代理运行ID",
|
|
29
32
|
"agent.copyAllToolCalls": "复制所有工具调用",
|
|
30
33
|
"agent.copyBatchDetails": "复制批次详情",
|
|
31
34
|
"agent.copyMessage": "复制消息",
|
|
32
|
-
"agent.copyRunId": "复制运行ID",
|
|
35
|
+
"agent.copyRunId": "复制运行 ID",
|
|
33
36
|
"agent.copyToClipboard": "复制到剪贴板",
|
|
37
|
+
"agent.copyWorkflowRunId": "复制工作流运行ID",
|
|
34
38
|
"agent.dashboard": "仪表板",
|
|
35
39
|
"agent.details": "详情",
|
|
36
40
|
"agent.document": "文档",
|
|
@@ -52,21 +56,19 @@
|
|
|
52
56
|
"agent.exportAsPdf": "导出为PDF",
|
|
53
57
|
"agent.exportAsPng": "导出为 PNG",
|
|
54
58
|
"agent.exportAsWord": "导出为 Word",
|
|
55
|
-
"agent.exportMessage": "导出消息",
|
|
56
59
|
"agent.exporting": "正在导出...",
|
|
60
|
+
"agent.exportMessage": "导出消息",
|
|
57
61
|
"agent.failedToCancelWorkflow": "取消工作流失败",
|
|
62
|
+
"agent.failedToCloneConversation": "克隆对话失败",
|
|
63
|
+
"agent.failedToContinueConversation": "继续对话失败",
|
|
58
64
|
"agent.failedToDownload": "下载对话失败",
|
|
59
|
-
"agent.failedToForkConversation": "分支对话失败",
|
|
60
65
|
"agent.failedToInterrupt": "中断失败",
|
|
61
66
|
"agent.failedToLoadDocument": "加载文档失败",
|
|
62
|
-
"agent.failedToRenderMessage": "消息渲染失败",
|
|
63
|
-
"agent.failedToRestartConversation": "重新开始对话失败",
|
|
64
67
|
"agent.failedToSend": "发送消息失败",
|
|
65
68
|
"agent.filesProcessing": "文件处理中",
|
|
66
69
|
"agent.filesStagedCount_one": "{{count}}个文件已暂存 - 对话开始时将上传",
|
|
67
70
|
"agent.filesStagedCount_other": "{{count}}个文件已暂存 - 对话开始时将上传",
|
|
68
71
|
"agent.filesUploadedDescription": "上传到此对话的文件始终可用。代理可以随时访问它们。",
|
|
69
|
-
"agent.forkConversation": "分支对话",
|
|
70
72
|
"agent.fullscreen": "全屏",
|
|
71
73
|
"agent.hideDetails": "隐藏详情",
|
|
72
74
|
"agent.hideSidebar": "隐藏侧边栏",
|
|
@@ -94,6 +96,7 @@
|
|
|
94
96
|
"agent.olderPlan": "较旧的计划",
|
|
95
97
|
"agent.openDocument": "打开文档",
|
|
96
98
|
"agent.openInNewTab": "在新标签页中打开",
|
|
99
|
+
"agent.payload": "载荷",
|
|
97
100
|
"agent.pdfExportFailed": "PDF导出失败",
|
|
98
101
|
"agent.pdfExportReady": "PDF导出已就绪",
|
|
99
102
|
"agent.pending": "待处理",
|
|
@@ -105,11 +108,8 @@
|
|
|
105
108
|
"agent.ready": "就绪",
|
|
106
109
|
"agent.refresh": "刷新",
|
|
107
110
|
"agent.remaining": "剩余{{seconds}}秒",
|
|
108
|
-
"agent.resizeRightPanel": "调整右侧面板大小",
|
|
109
|
-
"agent.restartConversation": "重新开始对话",
|
|
110
111
|
"agent.retry": "重试",
|
|
111
|
-
"agent.runIdCopied": "
|
|
112
|
-
"agent.running": "运行中",
|
|
112
|
+
"agent.runIdCopied": "运行 ID 已复制",
|
|
113
113
|
"agent.searchDocuments": "搜索文档",
|
|
114
114
|
"agent.selectInteraction": "选择一个交互并点击开始以启动代理",
|
|
115
115
|
"agent.send": "发送",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"agent.showSidebar": "显示侧边栏",
|
|
119
119
|
"agent.staged": "已暂存",
|
|
120
120
|
"agent.startAgent": "启动代理",
|
|
121
|
-
"agent.startNewConversation": "开始新对话",
|
|
122
121
|
"agent.startingAgent": "正在启动代理...",
|
|
123
122
|
"agent.startingAgentUploading": "正在启动代理并上传文件...",
|
|
123
|
+
"agent.startNewConversation": "开始新对话",
|
|
124
124
|
"agent.stepByStepPlan": "分步计划",
|
|
125
125
|
"agent.stop": "停止",
|
|
126
126
|
"agent.stopAgent": "停止代理",
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"agent.unknownError": "未知错误",
|
|
139
139
|
"agent.unknownTime": "未知时间",
|
|
140
140
|
"agent.upload": "上传",
|
|
141
|
-
"agent.uploadFailed": "上传失败",
|
|
142
141
|
"agent.uploadedFiles": "已上传文件",
|
|
142
|
+
"agent.uploadFailed": "上传失败",
|
|
143
143
|
"agent.uploading": "上传中...",
|
|
144
144
|
"agent.uploads": "上传",
|
|
145
145
|
"agent.waitForFiles": "请等待文件处理完成",
|
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
"agent.waiting": "等待中...",
|
|
148
148
|
"agent.waitingForAgentResponse": "等待代理响应...",
|
|
149
149
|
"agent.workflowCancelled": "工作流已取消",
|
|
150
|
+
"agent.workflowRunIdCopied": "已复制工作流运行ID",
|
|
150
151
|
"agent.working": "工作中...",
|
|
151
152
|
"agent.workstreams": "工作流",
|
|
152
153
|
"agent.yes": "是",
|
|
@@ -183,11 +184,7 @@
|
|
|
183
184
|
"filter.noResultsFound": "未找到结果。",
|
|
184
185
|
"filter.selectRange": "选择范围",
|
|
185
186
|
"filter.to": "至:",
|
|
186
|
-
"form.clickToRemove": "点击移除",
|
|
187
|
-
"form.createValue": "创建\"{{value}}\"",
|
|
188
187
|
"form.filter": "筛选...",
|
|
189
|
-
"form.noMoreOptions": "没有更多可用选项",
|
|
190
|
-
"form.noOptionsFound": "未找到选项",
|
|
191
188
|
"layout.pageNotFound": "页面未找到",
|
|
192
189
|
"layout.search": "搜索",
|
|
193
190
|
"layout.searchPlaceholder": "搜索...",
|
|
@@ -197,10 +194,10 @@
|
|
|
197
194
|
"login.terminal.account": "账户",
|
|
198
195
|
"login.terminal.accountRequired": "账户为必填项",
|
|
199
196
|
"login.terminal.accountRequiredDesc": "请选择一个账户以授权客户端访问ComposablePrompts服务器",
|
|
197
|
+
"login.terminal.authorizeClient": "授权客户端",
|
|
200
198
|
"login.terminal.authPayloadCopied": "认证信息已复制",
|
|
201
199
|
"login.terminal.authPayloadCopiedSuccess": "您可以关闭此页面。CLI应已接收到令牌。",
|
|
202
200
|
"login.terminal.authPayloadCopiedWithError": "您可以将认证信息粘贴到终端中。注意:CLI未接收到令牌。发生错误:{{error}}",
|
|
203
|
-
"login.terminal.authorizeClient": "授权客户端",
|
|
204
201
|
"login.terminal.browserPermissionNote": "注意:如果浏览器要求访问本地网络的权限,请允许。这是将授权令牌发回CLI工具所必需的。否则,您需要手动将令牌复制/粘贴到终端中。",
|
|
205
202
|
"login.terminal.chooseAccountProject": "您必须选择客户端要访问的目标账户和项目。",
|
|
206
203
|
"login.terminal.clientAuthenticated": "客户端已认证。您可以关闭此页面。",
|
|
@@ -225,6 +222,13 @@
|
|
|
225
222
|
"login.terminal.projectRequiredDesc": "请选择一个项目以授权客户端访问ComposablePrompts服务器",
|
|
226
223
|
"login.terminal.selectAccount": "选择账户",
|
|
227
224
|
"login.terminal.selectProject": "选择项目",
|
|
225
|
+
"mcpOAuth.authenticate": "身份验证",
|
|
226
|
+
"mcpOAuth.authenticating": "正在验证身份...",
|
|
227
|
+
"mcpOAuth.connect": "连接",
|
|
228
|
+
"mcpOAuth.connected": "已连接",
|
|
229
|
+
"mcpOAuth.connecting": "正在连接...",
|
|
230
|
+
"mcpOAuth.disconnect": "断开连接",
|
|
231
|
+
"mcpOAuth.notConnected": "未连接",
|
|
228
232
|
"misc.copiedToClipboard": "已复制到剪贴板",
|
|
229
233
|
"misc.copy": "复制",
|
|
230
234
|
"misc.failedToCopy": "复制失败",
|
|
@@ -249,45 +253,10 @@
|
|
|
249
253
|
"modal.saveVersion.versionLabel": "版本标签(可选)",
|
|
250
254
|
"modal.saveVersion.versionLabelDescription": "新版本的可选标签。",
|
|
251
255
|
"modal.saveVersion.versionLabelPlaceholder": "例如 v1.2、已批准、审核后",
|
|
252
|
-
"
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"oauthApps.clientId": "Client ID",
|
|
257
|
-
"oauthApps.clientSecret": "Client Secret",
|
|
258
|
-
"oauthApps.clientSecretConfigured": "Secret 已配置(留空以保留当前值)",
|
|
259
|
-
"oauthApps.clientSecretHelp": "可选。机密客户端需要此项。静态加密存储。",
|
|
260
|
-
"oauthApps.clientSecretPlaceholder": "输入 Client Secret",
|
|
261
|
-
"oauthApps.connect": "连接",
|
|
262
|
-
"oauthApps.connected": "已连接",
|
|
263
|
-
"oauthApps.create": "创建",
|
|
264
|
-
"oauthApps.createDescription": "为此项目配置新的 OAuth 应用。",
|
|
265
|
-
"oauthApps.created": "OAuth 应用已创建",
|
|
266
|
-
"oauthApps.defaultScopes": "默认权限范围",
|
|
267
|
-
"oauthApps.defaultScopesHelp": "以空格分隔的 OAuth 权限范围列表。",
|
|
268
|
-
"oauthApps.deleteConfirm": "删除 OAuth 应用",
|
|
269
|
-
"oauthApps.deleteConfirmMessage": "您确定要删除吗",
|
|
270
|
-
"oauthApps.deleteFailed": "删除 OAuth 应用失败",
|
|
271
|
-
"oauthApps.deleted": "OAuth 应用已删除",
|
|
272
|
-
"oauthApps.description": "配置用于第三方集成的 OAuth 应用。",
|
|
273
|
-
"oauthApps.disconnect": "断开连接",
|
|
274
|
-
"oauthApps.displayName": "显示名称",
|
|
275
|
-
"oauthApps.edit": "编辑 OAuth 应用",
|
|
276
|
-
"oauthApps.editDescription": "更新 OAuth 应用配置。",
|
|
277
|
-
"oauthApps.empty": "尚未配置任何 OAuth 应用。",
|
|
278
|
-
"oauthApps.endpointsOptionalHelp": "可选。对于支持 .well-known 发现的 MCP 服务器,请留空。",
|
|
279
|
-
"oauthApps.name": "名称",
|
|
280
|
-
"oauthApps.nameHelp": "Kebab-case 标识符(例如 my-oauth-app)。创建后不可更改。",
|
|
281
|
-
"oauthApps.notConnected": "未连接",
|
|
282
|
-
"oauthApps.revocationEndpoint": "撤销端点",
|
|
283
|
-
"oauthApps.save": "保存",
|
|
284
|
-
"oauthApps.saveFailed": "保存 OAuth 应用失败",
|
|
285
|
-
"oauthApps.saving": "正在保存...",
|
|
286
|
-
"oauthApps.status": "状态",
|
|
287
|
-
"oauthApps.title": "OAuth 应用",
|
|
288
|
-
"oauthApps.tokenEndpoint": "令牌端点",
|
|
289
|
-
"oauthApps.updated": "OAuth 应用已更新",
|
|
290
|
-
"oauthApps.usePkce": "使用 PKCE(推荐)",
|
|
256
|
+
"oauthProvider.authenticate": "认证",
|
|
257
|
+
"oauthProvider.authenticating": "正在认证...",
|
|
258
|
+
"oauthProvider.connected": "已连接",
|
|
259
|
+
"oauthProvider.disconnect": "断开连接",
|
|
291
260
|
"pdf.close": "关闭",
|
|
292
261
|
"pdf.closeFullscreen": "关闭全屏",
|
|
293
262
|
"pdf.download": "下载",
|
|
@@ -343,7 +312,8 @@
|
|
|
343
312
|
"store.actions.addToCollectionFailure": "添加到集合失败",
|
|
344
313
|
"store.actions.addToCollectionFailureDesc": "无法将选中的对象添加到集合",
|
|
345
314
|
"store.actions.addToCollectionSuccess": "添加到集合成功",
|
|
346
|
-
"store.actions.
|
|
315
|
+
"store.actions.addToCollectionSuccessDesc_one": "已将 {{count}} 个对象添加到集合",
|
|
316
|
+
"store.actions.addToCollectionSuccessDesc_other": "已将 {{count}} 个对象添加到集合",
|
|
347
317
|
"store.actions.addToCollectionTitle": "添加到集合",
|
|
348
318
|
"store.actions.areYouSure": "确定吗?",
|
|
349
319
|
"store.actions.cannotRemoveNoCollection": "无法移除对象:未指定集合",
|
|
@@ -354,7 +324,6 @@
|
|
|
354
324
|
"store.actions.chooseWorkflowRule": "选择要启动的工作流规则:",
|
|
355
325
|
"store.actions.confirmDeleteAll": "确定要删除所有选中的对象吗?此操作无法撤销。",
|
|
356
326
|
"store.actions.confirmDeleteSelected": "确定要删除选中的对象吗?\n这不是从集合中移除。",
|
|
357
|
-
"store.actions.confirmRemoveFromCollection": "确定要从此集合中移除选中的对象吗?",
|
|
358
327
|
"store.actions.createNew": "新建",
|
|
359
328
|
"store.actions.delete": "删除",
|
|
360
329
|
"store.actions.deleteObjects": "删除对象",
|
|
@@ -370,8 +339,6 @@
|
|
|
370
339
|
"store.actions.noObjectsSelected": "未选择任何对象",
|
|
371
340
|
"store.actions.pleaseSelectObjectsToDelete": "请选择要删除的对象",
|
|
372
341
|
"store.actions.pleaseSelectObjectsToRemove": "请选择要从集合中移除的对象",
|
|
373
|
-
"store.actions.removeFromCollection": "从集合中移除",
|
|
374
|
-
"store.actions.removeFromCollectionDesc": "从此集合中移除选中的对象",
|
|
375
342
|
"store.actions.selectCollection": "选择集合",
|
|
376
343
|
"store.actions.startWorkflow": "启动工作流",
|
|
377
344
|
"store.actions.startWorkflowByRule": "按规则启动工作流",
|
|
@@ -395,9 +362,10 @@
|
|
|
395
362
|
"store.collectionDeleted": "集合已删除",
|
|
396
363
|
"store.collectionFetchFailed": "获取集合失败",
|
|
397
364
|
"store.collectionPropertiesUpdated": "集合属性已更新",
|
|
365
|
+
"store.collectionsSelected_one": "已选择 {{count}} 个集合",
|
|
366
|
+
"store.collectionsSelected_other": "已选择 {{count}} 个集合",
|
|
398
367
|
"store.collectionUpdated": "集合已更新",
|
|
399
368
|
"store.collectionUpdatedSuccess": "集合已成功更新",
|
|
400
|
-
"store.collectionsSelected": "已选择{{count}}个集合",
|
|
401
369
|
"store.configuration": "配置",
|
|
402
370
|
"store.confirmSelection": "确认选择",
|
|
403
371
|
"store.contentCopied": "{{type}}已复制",
|
|
@@ -407,9 +375,9 @@
|
|
|
407
375
|
"store.copyFailed": "复制失败",
|
|
408
376
|
"store.createACollection": "创建集合",
|
|
409
377
|
"store.createCollection": "创建集合",
|
|
410
|
-
"store.createType": "创建类型",
|
|
411
378
|
"store.created": "创建时间",
|
|
412
379
|
"store.createdBy": "创建者",
|
|
380
|
+
"store.createType": "创建类型",
|
|
413
381
|
"store.deleteCollection": "删除集合",
|
|
414
382
|
"store.documentExported": "文档已导出",
|
|
415
383
|
"store.documentInformation": "文档信息",
|
|
@@ -419,11 +387,11 @@
|
|
|
419
387
|
"store.downloadFailed": "下载失败",
|
|
420
388
|
"store.dynamicCollection": "动态集合",
|
|
421
389
|
"store.dynamicCollectionDescription": "基于查询动态获取集合内容。如果未启用,则内容必须由用户或代理添加。",
|
|
390
|
+
"store.editingGenericDocument": "编辑通用文档属性",
|
|
422
391
|
"store.editJson": "编辑JSON",
|
|
423
392
|
"store.editProperties": "编辑属性",
|
|
424
393
|
"store.editSchema": "编辑模式",
|
|
425
394
|
"store.editText": "编辑文本",
|
|
426
|
-
"store.editingGenericDocument": "编辑通用文档属性",
|
|
427
395
|
"store.embeddings": "嵌入向量",
|
|
428
396
|
"store.enableSyncMemberHeads": "启用同步成员HEAD",
|
|
429
397
|
"store.error": "错误",
|
|
@@ -483,6 +451,7 @@
|
|
|
483
451
|
"store.noCollectionsAvailable": "没有可用的集合。",
|
|
484
452
|
"store.noCollectionsFound": "未找到集合。",
|
|
485
453
|
"store.noFilesSelected": "未选择文件",
|
|
454
|
+
"store.none": "无",
|
|
486
455
|
"store.noObjectsDragAndDrop": "没有对象。只需将文档或图片拖放到此处即可创建内容对象。",
|
|
487
456
|
"store.noPreviewAvailable": "此文档类型没有可用的预览。",
|
|
488
457
|
"store.noProjectSelected": "未选择项目",
|
|
@@ -492,7 +461,6 @@
|
|
|
492
461
|
"store.noType": "无类型",
|
|
493
462
|
"store.noValidFilesSelected": "未选择有效文件",
|
|
494
463
|
"store.noVideoRendition": "没有可用的Web兼容视频格式",
|
|
495
|
-
"store.none": "无",
|
|
496
464
|
"store.openFullDocument": "打开完整文档",
|
|
497
465
|
"store.openFullDocumentView": "打开完整文档视图",
|
|
498
466
|
"store.optional": "(可选)",
|
|
@@ -521,11 +489,10 @@
|
|
|
521
489
|
"store.search": "搜索",
|
|
522
490
|
"store.searchCollections": "搜索集合",
|
|
523
491
|
"store.searchFailed": "搜索失败",
|
|
492
|
+
"store.searching": "搜索中...",
|
|
524
493
|
"store.searchPlaceholder": "输入您要查找的内容,或选择筛选条件",
|
|
525
494
|
"store.searchTypes": "搜索类型",
|
|
526
|
-
"store.searching": "搜索中...",
|
|
527
495
|
"store.selectACollection": "选择一个集合",
|
|
528
|
-
"store.selectContent": "选择内容",
|
|
529
496
|
"store.selectContentType": "选择内容类型",
|
|
530
497
|
"store.selectContentTypeAuto": "选择内容类型,或留空以自动检测",
|
|
531
498
|
"store.selectContentTypeLabel": "选择内容类型",
|
|
@@ -567,14 +534,14 @@
|
|
|
567
534
|
"store.viewAsPdf": "以PDF查看",
|
|
568
535
|
"store.viewAudio": "查看音频",
|
|
569
536
|
"store.viewImage": "查看图片",
|
|
537
|
+
"store.viewingNewVersion": "正在查看新版本",
|
|
538
|
+
"store.viewingNewVersionDefault": "正在查看新版本",
|
|
539
|
+
"store.viewingVersionLabel": "正在查看版本'{{label}}'",
|
|
570
540
|
"store.viewInJsonFormat": "以JSON格式查看",
|
|
571
541
|
"store.viewPdf": "查看PDF",
|
|
572
542
|
"store.viewText": "查看文本",
|
|
573
543
|
"store.viewTranscript": "查看转录",
|
|
574
544
|
"store.viewVideo": "查看视频",
|
|
575
|
-
"store.viewingNewVersion": "正在查看新版本",
|
|
576
|
-
"store.viewingNewVersionDefault": "正在查看新版本",
|
|
577
|
-
"store.viewingVersionLabel": "正在查看版本'{{label}}'",
|
|
578
545
|
"theme.dark": "深色",
|
|
579
546
|
"theme.label": "主题",
|
|
580
547
|
"theme.light": "浅色",
|
|
@@ -582,7 +549,9 @@
|
|
|
582
549
|
"type.description": "描述",
|
|
583
550
|
"type.name": "名称",
|
|
584
551
|
"type.nameRequired": "名称为必填项",
|
|
585
|
-
"
|
|
552
|
+
"type.type": "类型",
|
|
553
|
+
"upload.allFilesExist_one": "{{count}} 个文件已存在",
|
|
554
|
+
"upload.allFilesExist_other": "{{count}} 个文件已存在",
|
|
586
555
|
"upload.analyzingFiles": "正在分析文件...",
|
|
587
556
|
"upload.checkingForDuplicates": "正在检查重复项和更新",
|
|
588
557
|
"upload.collectionLabel": "集合:",
|
|
@@ -620,15 +589,17 @@
|
|
|
620
589
|
"upload.update": "更新",
|
|
621
590
|
"upload.uploadComplete": "上传完成",
|
|
622
591
|
"upload.uploadFiles": "上传文件",
|
|
592
|
+
"upload.uploadingFiles": "正在上传文件",
|
|
623
593
|
"upload.uploadLocation": "上传位置:",
|
|
624
594
|
"upload.uploadMore": "上传更多",
|
|
625
595
|
"upload.uploadProcessInterrupted": "上传过程已中断",
|
|
626
|
-
"upload.uploadingFiles": "正在上传文件",
|
|
627
596
|
"upload.useAutoDetection": "使用自动类型检测",
|
|
628
597
|
"upload.useTypeName": "使用{{typeName}}",
|
|
629
598
|
"user.account": "账户:",
|
|
630
599
|
"user.agentOnBehalfOf": "代理代表",
|
|
631
600
|
"user.agentOnBehalfOfApiKey": "代理代表API密钥",
|
|
601
|
+
"user.allProjectMembers": "所有项目成员",
|
|
602
|
+
"user.allProjectMembersDescription": "此项目的每个成员都拥有此权限。",
|
|
632
603
|
"user.appVersion": "应用版本",
|
|
633
604
|
"user.environment": "环境",
|
|
634
605
|
"user.failedToFetchApiKey": "获取API密钥失败",
|
|
@@ -6,6 +6,7 @@ import { AuthTokenPayload } from '@vertesia/common';
|
|
|
6
6
|
import { Env } from '@vertesia/ui/env';
|
|
7
7
|
|
|
8
8
|
import { getComposableToken } from './auth/composable';
|
|
9
|
+
import { shouldRedirectToCentralAuth } from './auth/domainRouting';
|
|
9
10
|
import { getFirebaseAuth } from './auth/firebase';
|
|
10
11
|
|
|
11
12
|
import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY } from './constants';
|
|
@@ -114,11 +115,7 @@ class UserSession {
|
|
|
114
115
|
logout() {
|
|
115
116
|
console.log('Logging out');
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
const devDomains = [".composable.sh", ".vertesia.dev", "vertesia.app"];
|
|
119
|
-
const shouldUseCentralAuth = Env.isDocker || devDomains.some((domain) => window.location.hostname.endsWith(domain));
|
|
120
|
-
|
|
121
|
-
if (shouldUseCentralAuth) {
|
|
118
|
+
if (shouldRedirectToCentralAuth()) {
|
|
122
119
|
// Redirect to central auth for logout
|
|
123
120
|
// Central auth will handle Firebase logout
|
|
124
121
|
console.log('Using central auth logout');
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { Env } from "@vertesia/ui/env";
|
|
2
2
|
import { onAuthStateChanged } from "firebase/auth";
|
|
3
3
|
import { ReactNode, useEffect, useRef, useState } from "react";
|
|
4
|
-
import { UserNotFoundError, getComposableToken } from "./auth/composable";
|
|
4
|
+
import { STSError, UserNotFoundError, getComposableToken } from "./auth/composable";
|
|
5
|
+
import { shouldRedirectToCentralAuth } from "./auth/domainRouting";
|
|
5
6
|
import { getFirebaseAuth } from "./auth/firebase";
|
|
6
7
|
import { useAuthState } from "./auth/useAuthState";
|
|
7
8
|
import { LastSelectedAccountId_KEY, LastSelectedProjectId_KEY, UserSession, UserSessionContext } from "./UserSession";
|
|
8
9
|
|
|
9
|
-
const devDomains = [".composable.sh", ".vertesia.dev", "vertesia.app"];
|
|
10
10
|
const CENTRAL_AUTH_REDIRECT = "https://internal-auth.vertesia.app/";
|
|
11
11
|
|
|
12
|
-
export function shouldRedirectToCentralAuth() {
|
|
13
|
-
// Authentication is not supported in Docker environment.
|
|
14
|
-
// See https://github.com/vertesia/studio/wiki/Composable-UI-Hosting-Options
|
|
15
|
-
if (Env.isDocker) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
return devDomains.some((domain) => window.location.hostname.endsWith(domain));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
12
|
interface UserSessionProviderProps {
|
|
25
13
|
children: ReactNode | ReactNode[];
|
|
26
14
|
}
|
|
@@ -101,6 +89,23 @@ export function UserSessionProvider({ children }: UserSessionProviderProps) {
|
|
|
101
89
|
return;
|
|
102
90
|
}
|
|
103
91
|
|
|
92
|
+
if (err instanceof STSError) {
|
|
93
|
+
console.error("STS error during token exchange", err);
|
|
94
|
+
Env.logger.error("STS error during token exchange", {
|
|
95
|
+
vertesia: {
|
|
96
|
+
account_id: selectedAccount,
|
|
97
|
+
project_id: selectedProject,
|
|
98
|
+
sts_url: err.stsURL,
|
|
99
|
+
error: err,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
window.alert("Authentication failed due to an issue with the authentication service. Please try again later.");
|
|
103
|
+
session.logout();
|
|
104
|
+
setSession(session.clone());
|
|
105
|
+
window.location.hash = "";
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
104
109
|
console.error("Failed to fetch user token from studio, redirecting to central auth", err);
|
|
105
110
|
Env.logger.error("Failed to fetch user token from studio, redirecting to central auth", {
|
|
106
111
|
vertesia: {
|
|
@@ -111,7 +116,7 @@ export function UserSessionProvider({ children }: UserSessionProviderProps) {
|
|
|
111
116
|
});
|
|
112
117
|
return;
|
|
113
118
|
} else {
|
|
114
|
-
//
|
|
119
|
+
// If the current host is not in the Firebase allowlist, central auth owns sign-in.
|
|
115
120
|
if (!session.isLoggedIn()) {
|
|
116
121
|
console.log("Auth: not logged in & no token/state");
|
|
117
122
|
Env.logger.info("Not logged in & no token/state", {
|
|
@@ -122,7 +127,7 @@ export function UserSessionProvider({ children }: UserSessionProviderProps) {
|
|
|
122
127
|
});
|
|
123
128
|
if (shouldRedirectToCentralAuth()) {
|
|
124
129
|
console.log(
|
|
125
|
-
"Auth:
|
|
130
|
+
"Auth: host is not in Firebase auth allowlist, redirecting to central auth with selection",
|
|
126
131
|
selectedAccount,
|
|
127
132
|
selectedProject,
|
|
128
133
|
);
|
|
@@ -135,8 +140,8 @@ export function UserSessionProvider({ children }: UserSessionProviderProps) {
|
|
|
135
140
|
redirectToCentralAuth();
|
|
136
141
|
return; // Don't register onAuthStateChanged listener when redirecting
|
|
137
142
|
} else {
|
|
138
|
-
console.log("Auth:
|
|
139
|
-
Env.logger.info("
|
|
143
|
+
console.log("Auth: host is in Firebase auth allowlist");
|
|
144
|
+
Env.logger.info("Host is in Firebase auth allowlist", {
|
|
140
145
|
vertesia: {
|
|
141
146
|
account_id: selectedAccount,
|
|
142
147
|
project_id: selectedProject,
|
|
@@ -12,7 +12,7 @@ The authentication system uses:
|
|
|
12
12
|
|
|
13
13
|
### STS Endpoints
|
|
14
14
|
- Production/Preview: `https://sts.vertesia.io`
|
|
15
|
-
- Staging: `https://sts
|
|
15
|
+
- Staging: `https://sts.dev1.vertesia.io`
|
|
16
16
|
|
|
17
17
|
**Important**: STS is the single source of truth for generating Vertesia JWT tokens. Both authentication paths (Central Auth and Direct Firebase) ultimately call STS to get the JWT.
|
|
18
18
|
|
|
@@ -61,6 +61,16 @@ export async function fetchComposableToken(getIdToken: () => Promise<string | nu
|
|
|
61
61
|
'Authorization': `Bearer ${idToken}` // Firebase token for authentication
|
|
62
62
|
},
|
|
63
63
|
body: JSON.stringify(requestBody)
|
|
64
|
+
}).catch((error) => {
|
|
65
|
+
console.error('Failed to call STS endpoint', error);
|
|
66
|
+
Env.logger.error('Failed to call STS endpoint', {
|
|
67
|
+
vertesia: {
|
|
68
|
+
account_id: accountId,
|
|
69
|
+
project_id: projectId,
|
|
70
|
+
error: error,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
throw new STSError('Failed to call STS endpoint', stsEndpoint);
|
|
64
74
|
});
|
|
65
75
|
|
|
66
76
|
if (idToken && stsRes?.status === 404) {
|
|
@@ -207,8 +217,8 @@ export async function fetchComposableToken(getIdToken: () => Promise<string | nu
|
|
|
207
217
|
return token;
|
|
208
218
|
|
|
209
219
|
} catch (error) {
|
|
210
|
-
if (error instanceof UserNotFoundError) {
|
|
211
|
-
throw error; // Re-throw UserNotFoundError
|
|
220
|
+
if (error instanceof UserNotFoundError || error instanceof STSError) {
|
|
221
|
+
throw error; // Re-throw UserNotFoundError and STSError to be handled separately in the caller
|
|
212
222
|
}
|
|
213
223
|
|
|
214
224
|
// Clear any stale account/project from localStorage on error
|
|
@@ -293,3 +303,12 @@ export class UserNotFoundError extends Error {
|
|
|
293
303
|
this.email = email;
|
|
294
304
|
}
|
|
295
305
|
}
|
|
306
|
+
|
|
307
|
+
export class STSError extends Error {
|
|
308
|
+
stsURL: string;
|
|
309
|
+
constructor(message: string, stsURL: string) {
|
|
310
|
+
super(message);
|
|
311
|
+
this.name = 'STSError';
|
|
312
|
+
this.stsURL = stsURL;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { shouldRedirectToCentralAuth, shouldUseFirebaseAuth } from "./domainRouting";
|
|
3
|
+
|
|
4
|
+
describe("domainRouting", () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
delete (globalThis as any).window;
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("uses Firebase auth when AUTH_MODE is 'firebase'", () => {
|
|
10
|
+
(globalThis as any).window = { AUTH_MODE: "firebase" };
|
|
11
|
+
expect(shouldUseFirebaseAuth()).toBe(true);
|
|
12
|
+
expect(shouldRedirectToCentralAuth()).toBe(false);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it("uses central auth when AUTH_MODE is 'central'", () => {
|
|
16
|
+
(globalThis as any).window = { AUTH_MODE: "central" };
|
|
17
|
+
expect(shouldUseFirebaseAuth()).toBe(false);
|
|
18
|
+
expect(shouldRedirectToCentralAuth()).toBe(true);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("defaults to central auth when AUTH_MODE is not set", () => {
|
|
22
|
+
(globalThis as any).window = {};
|
|
23
|
+
expect(shouldUseFirebaseAuth()).toBe(false);
|
|
24
|
+
expect(shouldRedirectToCentralAuth()).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
AUTH_MODE?: 'firebase' | 'central';
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function shouldUseFirebaseAuth(_hostname?: string) {
|
|
8
|
+
return window.AUTH_MODE === 'firebase';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function shouldRedirectToCentralAuth(_hostname?: string) {
|
|
12
|
+
return !shouldUseFirebaseAuth();
|
|
13
|
+
}
|
|
@@ -39,6 +39,7 @@ export function InviteAcceptModal() {
|
|
|
39
39
|
|
|
40
40
|
const accept = async (invite: TransientToken<UserInviteTokenData>) => {
|
|
41
41
|
await client.account.acceptInvite(invite.id);
|
|
42
|
+
await session.authCallback;
|
|
42
43
|
await session.fetchAccounts();
|
|
43
44
|
await session.fetchProjects(invite.data.account.id);
|
|
44
45
|
const remainingInvites = invites.filter(i => i.id !== invite.id)
|
|
@@ -154,7 +154,7 @@ function ListField({ object }: ListFieldProps) {
|
|
|
154
154
|
})
|
|
155
155
|
}
|
|
156
156
|
<div>
|
|
157
|
-
<Button variant='
|
|
157
|
+
<Button variant='outline' onClick={addItem} disabled={disabled}><Plus className="size-6" /> Add</Button>
|
|
158
158
|
</div>
|
|
159
159
|
</div>
|
|
160
160
|
)
|
|
@@ -174,7 +174,7 @@ function ListItem({ list, object, onDelete, disabled }: ListItemProps) {
|
|
|
174
174
|
renderItemProperty(object, list.schema.arraySchema.editor)
|
|
175
175
|
}
|
|
176
176
|
</div>
|
|
177
|
-
<Button variant='
|
|
177
|
+
<Button variant='ghost' onClick={onDelete} disabled={disabled} alt="Delete"><Trash2 className='size-4 text-destructive' /></Button>
|
|
178
178
|
</div>
|
|
179
179
|
)
|
|
180
180
|
}
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
isExpandLanguage,
|
|
17
17
|
} from './codeBlockHandlers';
|
|
18
18
|
import { useCodeBlockRendererRegistry } from './CodeBlockRendering';
|
|
19
|
+
import { preprocessMathDelimiters } from './preprocessMathDelimiters';
|
|
19
20
|
import { MarkdownFigure } from './MarkdownFigure';
|
|
20
21
|
import { MarkdownImage } from './MarkdownImage';
|
|
21
22
|
import { MarkdownLink } from './MarkdownLink';
|
|
@@ -104,7 +105,7 @@ export function MarkdownRenderer({
|
|
|
104
105
|
}: MarkdownRendererProps) {
|
|
105
106
|
const codeBlockRegistry = useCodeBlockRendererRegistry();
|
|
106
107
|
const normalizedMarkdown = React.useMemo(
|
|
107
|
-
() => normalizeDirectives(normalizeCustomSchemeLinks(children)),
|
|
108
|
+
() => normalizeDirectives(normalizeCustomSchemeLinks(preprocessMathDelimiters(children))),
|
|
108
109
|
[children]
|
|
109
110
|
);
|
|
110
111
|
|
|
@@ -190,3 +190,15 @@
|
|
|
190
190
|
margin-top: 0.5rem;
|
|
191
191
|
font-style: italic;
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
/* ------------------------------------------------------------------ */
|
|
195
|
+
/* KaTeX: hide the unstyled HTML layer, keep browser-rendered MathML */
|
|
196
|
+
/* rehype-katex emits two children inside .katex: */
|
|
197
|
+
/* .katex-mathml — MathML markup (browsers render this natively) */
|
|
198
|
+
/* .katex-html — HTML markup (needs full katex.css to look right) */
|
|
199
|
+
/* Since we don't load the full KaTeX CSS, hide the broken HTML layer */
|
|
200
|
+
/* ------------------------------------------------------------------ */
|
|
201
|
+
|
|
202
|
+
.katex .katex-html {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|