@agent-native/toolkit 0.216.0 → 0.218.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-native.eject.json +26 -0
- package/dist/app/agent-page/AgentContextTab.d.ts.map +1 -1
- package/dist/app/agent-page/AgentContextTab.js +1 -0
- package/dist/app/agent-page/AgentContextTab.js.map +1 -1
- package/dist/app/agentkit/react/components.d.ts.map +1 -1
- package/dist/app/agentkit/react/components.js +1 -1
- package/dist/app/agentkit/react/components.js.map +1 -1
- package/dist/app/agentkit/react/context.d.ts +4 -1
- package/dist/app/agentkit/react/context.d.ts.map +1 -1
- package/dist/app/agentkit/react/context.js +3 -1
- package/dist/app/agentkit/react/context.js.map +1 -1
- package/dist/app/agentkit/react/data-chart-layout.d.ts +30 -0
- package/dist/app/agentkit/react/data-chart-layout.d.ts.map +1 -0
- package/dist/app/agentkit/react/data-chart-layout.js +2 -0
- package/dist/app/agentkit/react/data-chart-layout.js.map +1 -0
- package/dist/app/agentkit/react/index.d.ts +1 -0
- package/dist/app/agentkit/react/index.d.ts.map +1 -1
- package/dist/app/agentkit/react/index.js +1 -0
- package/dist/app/agentkit/react/index.js.map +1 -1
- package/dist/app/agentkit/react/root.d.ts +3 -1
- package/dist/app/agentkit/react/root.d.ts.map +1 -1
- package/dist/app/agentkit/react/root.js +2 -2
- package/dist/app/agentkit/react/root.js.map +1 -1
- package/dist/app/agentkit/react/styles.css +18 -0
- package/dist/app/agentkit/react/transcript-layout.d.ts +2 -0
- package/dist/app/agentkit/react/transcript-layout.d.ts.map +1 -1
- package/dist/app/agentkit/react/transcript-layout.js.map +1 -1
- package/dist/app/auth/AuthPage.d.ts.map +1 -1
- package/dist/app/auth/AuthPage.js +33 -44
- package/dist/app/auth/AuthPage.js.map +1 -1
- package/dist/app/chat/AgentKitAssistantChat.d.ts.map +1 -1
- package/dist/app/chat/AgentKitAssistantChat.js +2 -2
- package/dist/app/chat/AgentKitAssistantChat.js.map +1 -1
- package/dist/app/chat/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/app/chat/MultiTabAssistantChat.js +51 -93
- package/dist/app/chat/MultiTabAssistantChat.js.map +1 -1
- package/dist/app/chat/agentkit-chat/action-widget.d.ts.map +1 -1
- package/dist/app/chat/agentkit-chat/action-widget.js +3 -1
- package/dist/app/chat/agentkit-chat/action-widget.js.map +1 -1
- package/dist/app/chat/agentkit-chat/rail.d.ts +1 -1
- package/dist/app/chat/agentkit-chat/rail.d.ts.map +1 -1
- package/dist/app/chat/agentkit-chat/rail.js +1 -1
- package/dist/app/chat/agentkit-chat/rail.js.map +1 -1
- package/dist/app/chat/chat/index.d.ts +2 -1
- package/dist/app/chat/chat/index.d.ts.map +1 -1
- package/dist/app/chat/chat/index.js +1 -1
- package/dist/app/chat/chat/index.js.map +1 -1
- package/dist/app/chat/chat/surface-types.d.ts +3 -0
- package/dist/app/chat/chat/surface-types.d.ts.map +1 -1
- package/dist/app/chat/chat/surface-types.js.map +1 -1
- package/dist/app/chat/chat/tool-call-display.d.ts +3 -1
- package/dist/app/chat/chat/tool-call-display.d.ts.map +1 -1
- package/dist/app/chat/chat/tool-call-display.js +4 -3
- package/dist/app/chat/chat/tool-call-display.js.map +1 -1
- package/dist/app/chat/chat/tool-render-registry.d.ts +2 -0
- package/dist/app/chat/chat/tool-render-registry.d.ts.map +1 -1
- package/dist/app/chat/chat/tool-render-registry.js.map +1 -1
- package/dist/app/chat/chat/widgets/DataChartRenderer.d.ts +3 -1
- package/dist/app/chat/chat/widgets/DataChartRenderer.d.ts.map +1 -1
- package/dist/app/chat/chat/widgets/DataChartRenderer.js +116 -26
- package/dist/app/chat/chat/widgets/DataChartRenderer.js.map +1 -1
- package/dist/app/chat/chat/widgets/DataChartWidget.d.ts +3 -1
- package/dist/app/chat/chat/widgets/DataChartWidget.d.ts.map +1 -1
- package/dist/app/chat/chat/widgets/DataChartWidget.js +21 -2
- package/dist/app/chat/chat/widgets/DataChartWidget.js.map +1 -1
- package/dist/app/chat/chat/widgets/DataInsightsWidget.d.ts +3 -1
- package/dist/app/chat/chat/widgets/DataInsightsWidget.d.ts.map +1 -1
- package/dist/app/chat/chat/widgets/DataInsightsWidget.js +2 -2
- package/dist/app/chat/chat/widgets/DataInsightsWidget.js.map +1 -1
- package/dist/app/chat/chat/widgets/DataWidgetDisplayControls.d.ts +1 -1
- package/dist/app/chat/chat/widgets/DataWidgetDisplayControls.d.ts.map +1 -1
- package/dist/app/chat/chat/widgets/DataWidgetDisplayControls.js +3 -1
- package/dist/app/chat/chat/widgets/DataWidgetDisplayControls.js.map +1 -1
- package/dist/app/chat/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/app/chat/chat/widgets/builtin-tool-renderers.js +2 -2
- package/dist/app/chat/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/app/chat/chat-first/chat-history.d.ts +13 -2
- package/dist/app/chat/chat-first/chat-history.d.ts.map +1 -1
- package/dist/app/chat/chat-first/chat-history.js +24 -3
- package/dist/app/chat/chat-first/chat-history.js.map +1 -1
- package/dist/app/chat/ownership-history/ChatOwnerAvatar.d.ts +6 -0
- package/dist/app/chat/ownership-history/ChatOwnerAvatar.d.ts.map +1 -0
- package/dist/app/chat/ownership-history/ChatOwnerAvatar.js +9 -0
- package/dist/app/chat/ownership-history/ChatOwnerAvatar.js.map +1 -0
- package/dist/app/chat/ownership-history/index.d.ts +11 -0
- package/dist/app/chat/ownership-history/index.d.ts.map +1 -0
- package/dist/app/chat/ownership-history/index.js +22 -0
- package/dist/app/chat/ownership-history/index.js.map +1 -0
- package/dist/app/chat/ownership-history/rows.d.ts +27 -0
- package/dist/app/chat/ownership-history/rows.d.ts.map +1 -0
- package/dist/app/chat/ownership-history/rows.js +101 -0
- package/dist/app/chat/ownership-history/rows.js.map +1 -0
- package/dist/app/chat/ownership-history/useOwnershipChatHistory.d.ts +52 -0
- package/dist/app/chat/ownership-history/useOwnershipChatHistory.d.ts.map +1 -0
- package/dist/app/chat/ownership-history/useOwnershipChatHistory.js +497 -0
- package/dist/app/chat/ownership-history/useOwnershipChatHistory.js.map +1 -0
- package/dist/app/i18n/catalogs/ar-SA.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ar-SA.js +3 -0
- package/dist/app/i18n/catalogs/ar-SA.js.map +1 -1
- package/dist/app/i18n/catalogs/de-DE.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/de-DE.js +3 -0
- package/dist/app/i18n/catalogs/de-DE.js.map +1 -1
- package/dist/app/i18n/catalogs/en-US.d.ts +3 -0
- package/dist/app/i18n/catalogs/en-US.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/en-US.js +3 -0
- package/dist/app/i18n/catalogs/en-US.js.map +1 -1
- package/dist/app/i18n/catalogs/es-ES.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/es-ES.js +3 -0
- package/dist/app/i18n/catalogs/es-ES.js.map +1 -1
- package/dist/app/i18n/catalogs/fr-FR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/fr-FR.js +3 -0
- package/dist/app/i18n/catalogs/fr-FR.js.map +1 -1
- package/dist/app/i18n/catalogs/hi-IN.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/hi-IN.js +3 -0
- package/dist/app/i18n/catalogs/hi-IN.js.map +1 -1
- package/dist/app/i18n/catalogs/ja-JP.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ja-JP.js +3 -0
- package/dist/app/i18n/catalogs/ja-JP.js.map +1 -1
- package/dist/app/i18n/catalogs/ko-KR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ko-KR.js +3 -0
- package/dist/app/i18n/catalogs/ko-KR.js.map +1 -1
- package/dist/app/i18n/catalogs/pt-BR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/pt-BR.js +3 -0
- package/dist/app/i18n/catalogs/pt-BR.js.map +1 -1
- package/dist/app/i18n/catalogs/zh-CN.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/zh-CN.js +3 -0
- package/dist/app/i18n/catalogs/zh-CN.js.map +1 -1
- package/dist/app/i18n/catalogs/zh-TW.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/zh-TW.js +3 -0
- package/dist/app/i18n/catalogs/zh-TW.js.map +1 -1
- package/dist/app/onboarding/GettingStartedCard.d.ts +35 -0
- package/dist/app/onboarding/GettingStartedCard.d.ts.map +1 -0
- package/dist/app/onboarding/GettingStartedCard.js +38 -0
- package/dist/app/onboarding/GettingStartedCard.js.map +1 -0
- package/dist/app/onboarding/index.d.ts +1 -0
- package/dist/app/onboarding/index.d.ts.map +1 -1
- package/dist/app/onboarding/index.js +1 -0
- package/dist/app/onboarding/index.js.map +1 -1
- package/dist/app/providers/AppProviders.d.ts.map +1 -1
- package/dist/app/providers/AppProviders.js +3 -1
- package/dist/app/providers/AppProviders.js.map +1 -1
- package/dist/app/settings/AccountSettingsCard.d.ts.map +1 -1
- package/dist/app/settings/AccountSettingsCard.js +2 -1
- package/dist/app/settings/AccountSettingsCard.js.map +1 -1
- package/dist/app/settings/index.d.ts +1 -0
- package/dist/app/settings/index.d.ts.map +1 -1
- package/dist/app/settings/index.js +1 -0
- package/dist/app/settings/index.js.map +1 -1
- package/dist/app/settings/shell/SettingsShell.d.ts +40 -1
- package/dist/app/settings/shell/SettingsShell.d.ts.map +1 -1
- package/dist/app/settings/shell/SettingsShell.js +87 -20
- package/dist/app/settings/shell/SettingsShell.js.map +1 -1
- package/dist/app/settings/shell/bridge.d.ts +5 -3
- package/dist/app/settings/shell/bridge.d.ts.map +1 -1
- package/dist/app/settings/shell/bridge.js +8 -5
- package/dist/app/settings/shell/bridge.js.map +1 -1
- package/dist/app/settings/shell/index.d.ts +2 -2
- package/dist/app/settings/shell/index.d.ts.map +1 -1
- package/dist/app/settings/shell/index.js.map +1 -1
- package/dist/app/settings/shell/registry.d.ts +9 -1
- package/dist/app/settings/shell/registry.d.ts.map +1 -1
- package/dist/app/settings/shell/registry.js +16 -0
- package/dist/app/settings/shell/registry.js.map +1 -1
- package/dist/app/settings/shell/routing.d.ts +5 -4
- package/dist/app/settings/shell/routing.d.ts.map +1 -1
- package/dist/app/settings/shell/routing.js +38 -10
- package/dist/app/settings/shell/routing.js.map +1 -1
- package/dist/app/shared/CommandMenu.d.ts +86 -6
- package/dist/app/shared/CommandMenu.d.ts.map +1 -1
- package/dist/app/shared/CommandMenu.js +303 -41
- package/dist/app/shared/CommandMenu.js.map +1 -1
- package/dist/app/shared/ConsentBanner.d.ts +9 -0
- package/dist/app/shared/ConsentBanner.d.ts.map +1 -0
- package/dist/app/shared/ConsentBanner.js +35 -0
- package/dist/app/shared/ConsentBanner.js.map +1 -0
- package/dist/app/sharing/ShareButton.d.ts.map +1 -1
- package/dist/app/sharing/ShareButton.js +9 -8
- package/dist/app/sharing/ShareButton.js.map +1 -1
- package/dist/chat-history/ChatHistoryList.d.ts +16 -3
- package/dist/chat-history/ChatHistoryList.d.ts.map +1 -1
- package/dist/chat-history/ChatHistoryList.js +25 -15
- package/dist/chat-history/ChatHistoryList.js.map +1 -1
- package/dist/chat-history.css +109 -9
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/sonner.d.ts.map +1 -1
- package/dist/ui/sonner.js +2 -2
- package/dist/ui/sonner.js.map +1 -1
- package/package.json +10 -3
- package/src/app/agent-page/AgentContextTab.spec.ts +50 -2
- package/src/app/agent-page/AgentContextTab.tsx +1 -0
- package/src/app/agentkit/react/components.interaction.spec.tsx +2 -0
- package/src/app/agentkit/react/components.spec.tsx +4 -1
- package/src/app/agentkit/react/components.tsx +3 -0
- package/src/app/agentkit/react/context.tsx +6 -0
- package/src/app/agentkit/react/data-chart-layout.ts +25 -0
- package/src/app/agentkit/react/index.ts +1 -0
- package/src/app/agentkit/react/root.tsx +4 -0
- package/src/app/agentkit/react/styles.css +18 -0
- package/src/app/agentkit/react/transcript-layout.ts +2 -0
- package/src/app/auth/AuthPage.interaction.spec.tsx +74 -0
- package/src/app/auth/AuthPage.tsx +32 -39
- package/src/app/chat/AgentKitAssistantChat.tsx +2 -0
- package/src/app/chat/MultiTabAssistantChat.spec.tsx +270 -3
- package/src/app/chat/MultiTabAssistantChat.tsx +79 -156
- package/src/app/chat/agentkit-chat/action-widget.tsx +3 -0
- package/src/app/chat/agentkit-chat/rail.ts +11 -0
- package/src/app/chat/chat/index.ts +10 -0
- package/src/app/chat/chat/surface-types.ts +3 -0
- package/src/app/chat/chat/tool-call-display.spec.tsx +29 -0
- package/src/app/chat/chat/tool-call-display.tsx +7 -0
- package/src/app/chat/chat/tool-render-registry.tsx +3 -0
- package/src/app/chat/chat/widgets/DataChartRenderer.spec.tsx +377 -17
- package/src/app/chat/chat/widgets/DataChartRenderer.tsx +232 -63
- package/src/app/chat/chat/widgets/DataChartWidget.spec.tsx +67 -0
- package/src/app/chat/chat/widgets/DataChartWidget.tsx +39 -5
- package/src/app/chat/chat/widgets/DataInsightsWidget.tsx +13 -2
- package/src/app/chat/chat/widgets/DataWidgetDisplayControls.tsx +6 -4
- package/src/app/chat/chat/widgets/builtin-tool-renderers.tsx +5 -1
- package/src/app/chat/chat-first/chat-history.spec.tsx +79 -0
- package/src/app/chat/chat-first/chat-history.tsx +75 -22
- package/src/app/chat/ownership-history/ChatOwnerAvatar.tsx +27 -0
- package/src/app/chat/ownership-history/index.tsx +67 -0
- package/src/app/chat/ownership-history/ownership-history.spec.tsx +3146 -0
- package/src/app/chat/ownership-history/rows.ts +156 -0
- package/src/app/chat/ownership-history/useOwnershipChatHistory.ts +709 -0
- package/src/app/i18n/catalogs/ar-SA.ts +3 -0
- package/src/app/i18n/catalogs/de-DE.ts +3 -0
- package/src/app/i18n/catalogs/en-US.ts +3 -0
- package/src/app/i18n/catalogs/es-ES.ts +3 -0
- package/src/app/i18n/catalogs/fr-FR.ts +3 -0
- package/src/app/i18n/catalogs/hi-IN.ts +3 -0
- package/src/app/i18n/catalogs/ja-JP.ts +3 -0
- package/src/app/i18n/catalogs/ko-KR.ts +3 -0
- package/src/app/i18n/catalogs/pt-BR.ts +3 -0
- package/src/app/i18n/catalogs/zh-CN.ts +3 -0
- package/src/app/i18n/catalogs/zh-TW.ts +3 -0
- package/src/app/onboarding/GettingStartedCard.tsx +203 -0
- package/src/app/onboarding/index.ts +1 -0
- package/src/app/providers/AppProviders.tsx +7 -1
- package/src/app/settings/AccountSettingsCard.spec.tsx +31 -0
- package/src/app/settings/AccountSettingsCard.tsx +8 -0
- package/src/app/settings/index.ts +1 -0
- package/src/app/settings/shell/SettingsShell.spec.tsx +472 -1
- package/src/app/settings/shell/SettingsShell.tsx +245 -31
- package/src/app/settings/shell/bridge.spec.ts +12 -0
- package/src/app/settings/shell/bridge.ts +17 -4
- package/src/app/settings/shell/index.ts +6 -1
- package/src/app/settings/shell/registry.ts +33 -1
- package/src/app/settings/shell/routing.spec.ts +92 -1
- package/src/app/settings/shell/routing.ts +52 -9
- package/src/app/shared/CommandMenu.spec.tsx +1662 -1
- package/src/app/shared/CommandMenu.tsx +763 -164
- package/src/app/shared/ConsentBanner.spec.tsx +141 -0
- package/src/app/shared/ConsentBanner.tsx +141 -0
- package/src/app/sharing/ShareButton.tsx +12 -10
- package/src/chat-history/ChatHistoryList.spec.tsx +51 -0
- package/src/chat-history/ChatHistoryList.tsx +87 -26
- package/src/chat-history/ChatHistoryRailSections.spec.tsx +12 -4
- package/src/chat-history.css +109 -9
- package/src/ui/sonner.spec.ts +10 -0
- package/src/ui/sonner.tsx +2 -2
|
@@ -480,6 +480,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
480
480
|
"history.ownedBy": "Eigentümer: {{name}}",
|
|
481
481
|
"history.accessDirect": "Mit dir geteilt",
|
|
482
482
|
"history.accessOrganization": "Mit deiner Organisation geteilt",
|
|
483
|
+
"history.copyLink": "Link kopieren",
|
|
484
|
+
"history.linkCopied": "Link kopiert",
|
|
485
|
+
"history.copyLinkFailed": "Link konnte nicht kopiert werden",
|
|
483
486
|
"integrations.availableSection": "Verfügbare Integrationen",
|
|
484
487
|
"integrations.connectedSection": "Verbunden",
|
|
485
488
|
"integrations.goToApiKeys": "Zu den API-Schlüsseln",
|
|
@@ -769,6 +769,9 @@ const messages = {
|
|
|
769
769
|
"history.ownedBy": "Owner: {{name}}",
|
|
770
770
|
"history.accessDirect": "Shared with you",
|
|
771
771
|
"history.accessOrganization": "Shared with your organization",
|
|
772
|
+
"history.copyLink": "Copy link",
|
|
773
|
+
"history.linkCopied": "Link copied",
|
|
774
|
+
"history.copyLinkFailed": "Couldn't copy the link",
|
|
772
775
|
"integrations.availableSection": "Available integrations",
|
|
773
776
|
"integrations.connectedSection": "Connected",
|
|
774
777
|
"integrations.goToApiKeys": "Go to API keys",
|
|
@@ -479,6 +479,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
479
479
|
"history.ownedBy": "Propietario: {{name}}",
|
|
480
480
|
"history.accessDirect": "Compartidos contigo",
|
|
481
481
|
"history.accessOrganization": "Compartido con tu organización",
|
|
482
|
+
"history.copyLink": "Copiar enlace",
|
|
483
|
+
"history.linkCopied": "Enlace copiado",
|
|
484
|
+
"history.copyLinkFailed": "No se pudo copiar el enlace",
|
|
482
485
|
"integrations.availableSection": "Integraciones disponibles",
|
|
483
486
|
"integrations.connectedSection": "Conectado",
|
|
484
487
|
"integrations.goToApiKeys": "Ir a claves de API",
|
|
@@ -478,6 +478,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
478
478
|
"history.ownedBy": "Propriétaire : {{name}}",
|
|
479
479
|
"history.accessDirect": "Partagés avec vous",
|
|
480
480
|
"history.accessOrganization": "Partagé avec votre organisation",
|
|
481
|
+
"history.copyLink": "Copier le lien",
|
|
482
|
+
"history.linkCopied": "Lien copié",
|
|
483
|
+
"history.copyLinkFailed": "Impossible de copier le lien",
|
|
481
484
|
"integrations.availableSection": "Intégrations disponibles",
|
|
482
485
|
"integrations.connectedSection": "Connecté",
|
|
483
486
|
"integrations.goToApiKeys": "Aller aux clés API",
|
|
@@ -759,6 +759,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
759
759
|
"history.ownedBy": "मालिक: {{name}}",
|
|
760
760
|
"history.accessDirect": "आपके साथ साझा",
|
|
761
761
|
"history.accessOrganization": "आपके संगठन के साथ साझा",
|
|
762
|
+
"history.copyLink": "लिंक कॉपी करें",
|
|
763
|
+
"history.linkCopied": "लिंक कॉपी हो गया",
|
|
764
|
+
"history.copyLinkFailed": "लिंक कॉपी नहीं हो सका",
|
|
762
765
|
"integrations.availableSection": "उपलब्ध इंटीग्रेशन",
|
|
763
766
|
"integrations.connectedSection": "कनेक्ट किए गए",
|
|
764
767
|
"integrations.goToApiKeys": "API कुंजियों पर जाएं",
|
|
@@ -783,6 +783,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
783
783
|
"history.ownedBy": "所有者: {{name}}",
|
|
784
784
|
"history.accessDirect": "共有されたチャット",
|
|
785
785
|
"history.accessOrganization": "組織と共有",
|
|
786
|
+
"history.copyLink": "リンクをコピー",
|
|
787
|
+
"history.linkCopied": "リンクをコピーしました",
|
|
788
|
+
"history.copyLinkFailed": "リンクをコピーできませんでした",
|
|
786
789
|
"integrations.availableSection": "利用可能な連携",
|
|
787
790
|
"integrations.connectedSection": "接続済み",
|
|
788
791
|
"integrations.goToApiKeys": "API キーへ移動",
|
|
@@ -762,6 +762,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
762
762
|
"history.ownedBy": "소유자: {{name}}",
|
|
763
763
|
"history.accessDirect": "나와 공유된 채팅",
|
|
764
764
|
"history.accessOrganization": "조직과 공유됨",
|
|
765
|
+
"history.copyLink": "링크 복사",
|
|
766
|
+
"history.linkCopied": "링크를 복사했어요",
|
|
767
|
+
"history.copyLinkFailed": "링크를 복사하지 못했어요",
|
|
765
768
|
"integrations.availableSection": "사용 가능한 연동",
|
|
766
769
|
"integrations.connectedSection": "연결됨",
|
|
767
770
|
"integrations.goToApiKeys": "API 키로 이동",
|
|
@@ -473,6 +473,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
473
473
|
"history.ownedBy": "Proprietário: {{name}}",
|
|
474
474
|
"history.accessDirect": "Compartilhados com você",
|
|
475
475
|
"history.accessOrganization": "Compartilhado com sua organização",
|
|
476
|
+
"history.copyLink": "Copiar link",
|
|
477
|
+
"history.linkCopied": "Link copiado",
|
|
478
|
+
"history.copyLinkFailed": "Não foi possível copiar o link",
|
|
476
479
|
"integrations.availableSection": "Integrações disponíveis",
|
|
477
480
|
"integrations.connectedSection": "Conectado",
|
|
478
481
|
"integrations.goToApiKeys": "Ir para chaves de API",
|
|
@@ -726,6 +726,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
726
726
|
"history.ownedBy": "所有者:{{name}}",
|
|
727
727
|
"history.accessDirect": "与您共享",
|
|
728
728
|
"history.accessOrganization": "与您的组织共享",
|
|
729
|
+
"history.copyLink": "复制链接",
|
|
730
|
+
"history.linkCopied": "链接已复制",
|
|
731
|
+
"history.copyLinkFailed": "无法复制链接",
|
|
729
732
|
"integrations.availableSection": "可用集成",
|
|
730
733
|
"integrations.connectedSection": "已连接",
|
|
731
734
|
"integrations.goToApiKeys": "前往 API 密钥",
|
|
@@ -728,6 +728,9 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
728
728
|
"history.ownedBy": "擁有者:{{name}}",
|
|
729
729
|
"history.accessDirect": "與您共用",
|
|
730
730
|
"history.accessOrganization": "與您的組織共用",
|
|
731
|
+
"history.copyLink": "複製連結",
|
|
732
|
+
"history.linkCopied": "已複製連結",
|
|
733
|
+
"history.copyLinkFailed": "無法複製連結",
|
|
731
734
|
"integrations.availableSection": "可用整合",
|
|
732
735
|
"integrations.connectedSection": "已連線",
|
|
733
736
|
"integrations.goToApiKeys": "前往 API 金鑰",
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { useOnboardingChecklist } from "@agent-native/core/client/onboarding/use-onboarding-checklist";
|
|
2
|
+
import { IconCheck, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
3
|
+
import type { ComponentType, ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
import { Button } from "../../ui/button.js";
|
|
6
|
+
import { Progress } from "../../ui/progress.js";
|
|
7
|
+
import { Skeleton } from "../../ui/skeleton.js";
|
|
8
|
+
import { cn } from "../../utils.js";
|
|
9
|
+
|
|
10
|
+
export interface GettingStartedLabels {
|
|
11
|
+
title: string;
|
|
12
|
+
progress: (completeCount: number, totalCount: number) => string;
|
|
13
|
+
/** Read by screen readers on a finished row; the check mark is decorative. */
|
|
14
|
+
completed: string;
|
|
15
|
+
collapse: string;
|
|
16
|
+
expand: string;
|
|
17
|
+
loadError: string;
|
|
18
|
+
retry: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface GettingStartedLinkProps {
|
|
22
|
+
to: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function NativeLink({ to, className, children }: GettingStartedLinkProps) {
|
|
28
|
+
return (
|
|
29
|
+
<a href={to} className={className}>
|
|
30
|
+
{children}
|
|
31
|
+
</a>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface GettingStartedCardProps {
|
|
36
|
+
/** Name the steps were registered under with `registerOnboardingStep({ checklist })`. */
|
|
37
|
+
checklist: string;
|
|
38
|
+
labels: GettingStartedLabels;
|
|
39
|
+
/** Localized row titles by step id; a step without one shows its registered title. */
|
|
40
|
+
stepTitles?: Record<string, string>;
|
|
41
|
+
/** Router link for in-app rows so a click keeps the SPA and Cmd/Ctrl-click opens a tab. */
|
|
42
|
+
LinkComponent?: ComponentType<GettingStartedLinkProps>;
|
|
43
|
+
/** Number of rows to reserve while the first answer loads. */
|
|
44
|
+
expectedSteps?: number;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Progress checklist pinned to the app sidebar. Each app registers its own
|
|
50
|
+
* steps on the onboarding registry; the card only renders what the server
|
|
51
|
+
* derived. It renders nothing once every step is done.
|
|
52
|
+
*/
|
|
53
|
+
export function GettingStartedCard({
|
|
54
|
+
checklist,
|
|
55
|
+
labels,
|
|
56
|
+
stepTitles,
|
|
57
|
+
LinkComponent = NativeLink,
|
|
58
|
+
expectedSteps = 6,
|
|
59
|
+
className,
|
|
60
|
+
}: GettingStartedCardProps) {
|
|
61
|
+
const {
|
|
62
|
+
steps,
|
|
63
|
+
completeCount,
|
|
64
|
+
totalCount,
|
|
65
|
+
dismissed,
|
|
66
|
+
collapsed,
|
|
67
|
+
status,
|
|
68
|
+
refresh,
|
|
69
|
+
setCollapsed,
|
|
70
|
+
} = useOnboardingChecklist(checklist);
|
|
71
|
+
|
|
72
|
+
const frame = cn(
|
|
73
|
+
"overflow-hidden rounded-[14px] border border-border bg-card text-card-foreground shadow-sm",
|
|
74
|
+
className,
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
if (status === "loading") {
|
|
78
|
+
return (
|
|
79
|
+
<div className={frame} aria-hidden>
|
|
80
|
+
<div className="space-y-3 px-4 py-3">
|
|
81
|
+
<Skeleton className="h-5 w-32" />
|
|
82
|
+
<Skeleton className="h-1.5 w-full rounded-full" />
|
|
83
|
+
</div>
|
|
84
|
+
<div className="border-t border-border">
|
|
85
|
+
{Array.from({ length: expectedSteps }, (_, index) => (
|
|
86
|
+
<div key={index} className="flex min-h-12 items-center gap-3 px-4">
|
|
87
|
+
<Skeleton className="size-4 rounded-full" />
|
|
88
|
+
<Skeleton className="h-3.5 w-28" />
|
|
89
|
+
</div>
|
|
90
|
+
))}
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (status === "error") {
|
|
97
|
+
return (
|
|
98
|
+
<div
|
|
99
|
+
role="alert"
|
|
100
|
+
className={cn(
|
|
101
|
+
frame,
|
|
102
|
+
"flex items-center justify-between gap-2 px-4 py-3",
|
|
103
|
+
)}
|
|
104
|
+
>
|
|
105
|
+
<span className="text-[13px] text-muted-foreground">
|
|
106
|
+
{labels.loadError}
|
|
107
|
+
</span>
|
|
108
|
+
<Button
|
|
109
|
+
type="button"
|
|
110
|
+
variant="outline"
|
|
111
|
+
size="xs"
|
|
112
|
+
onClick={() => void refresh()}
|
|
113
|
+
>
|
|
114
|
+
{labels.retry}
|
|
115
|
+
</Button>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (dismissed || totalCount === 0 || completeCount === totalCount) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const progressText = labels.progress(completeCount, totalCount);
|
|
125
|
+
const ToggleIcon = collapsed ? IconChevronUp : IconChevronDown;
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<section className={frame} aria-label={labels.title}>
|
|
129
|
+
<div className="space-y-3 px-4 py-3">
|
|
130
|
+
<div className="flex items-center justify-between gap-2">
|
|
131
|
+
<h2 className="text-base font-semibold leading-5">{labels.title}</h2>
|
|
132
|
+
<Button
|
|
133
|
+
type="button"
|
|
134
|
+
variant="ghost"
|
|
135
|
+
size="icon"
|
|
136
|
+
className="size-6"
|
|
137
|
+
aria-label={collapsed ? labels.expand : labels.collapse}
|
|
138
|
+
aria-expanded={!collapsed}
|
|
139
|
+
onClick={() => void setCollapsed(!collapsed)}
|
|
140
|
+
>
|
|
141
|
+
<ToggleIcon className="size-4" />
|
|
142
|
+
</Button>
|
|
143
|
+
</div>
|
|
144
|
+
<Progress
|
|
145
|
+
value={(completeCount / totalCount) * 100}
|
|
146
|
+
className="h-1.5 bg-muted"
|
|
147
|
+
aria-label={progressText}
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
{collapsed ? null : (
|
|
151
|
+
<ul className="border-t border-border">
|
|
152
|
+
{steps.map((step) => {
|
|
153
|
+
const rowClass =
|
|
154
|
+
"flex min-h-12 items-center gap-3 px-4 text-[13px]";
|
|
155
|
+
const content = (
|
|
156
|
+
<>
|
|
157
|
+
<span
|
|
158
|
+
aria-hidden
|
|
159
|
+
className={cn(
|
|
160
|
+
"flex size-4 shrink-0 items-center justify-center rounded-full border",
|
|
161
|
+
step.complete
|
|
162
|
+
? "border-primary bg-primary text-primary-foreground"
|
|
163
|
+
: "border-muted-foreground/60",
|
|
164
|
+
)}
|
|
165
|
+
>
|
|
166
|
+
{step.complete ? <IconCheck className="size-3" /> : null}
|
|
167
|
+
</span>
|
|
168
|
+
<span
|
|
169
|
+
className={cn(
|
|
170
|
+
"min-w-0 flex-1 truncate",
|
|
171
|
+
step.complete && "text-muted-foreground",
|
|
172
|
+
)}
|
|
173
|
+
>
|
|
174
|
+
{stepTitles?.[step.id] ?? step.title}
|
|
175
|
+
</span>
|
|
176
|
+
{step.complete ? (
|
|
177
|
+
<span className="sr-only">{labels.completed}</span>
|
|
178
|
+
) : null}
|
|
179
|
+
</>
|
|
180
|
+
);
|
|
181
|
+
return (
|
|
182
|
+
<li key={step.id}>
|
|
183
|
+
{step.href ? (
|
|
184
|
+
<LinkComponent
|
|
185
|
+
to={step.href}
|
|
186
|
+
className={cn(
|
|
187
|
+
rowClass,
|
|
188
|
+
"hover:bg-accent/60 focus-visible:bg-accent/60 focus-visible:outline-none",
|
|
189
|
+
)}
|
|
190
|
+
>
|
|
191
|
+
{content}
|
|
192
|
+
</LinkComponent>
|
|
193
|
+
) : (
|
|
194
|
+
<div className={rowClass}>{content}</div>
|
|
195
|
+
)}
|
|
196
|
+
</li>
|
|
197
|
+
);
|
|
198
|
+
})}
|
|
199
|
+
</ul>
|
|
200
|
+
)}
|
|
201
|
+
</section>
|
|
202
|
+
);
|
|
203
|
+
}
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
type AppShellSkeletonLayout,
|
|
40
40
|
} from "../shared/AppShellSkeleton.js";
|
|
41
41
|
import { ClientOnly } from "../shared/ClientOnly.js";
|
|
42
|
+
import { ConsentBanner } from "../shared/ConsentBanner.js";
|
|
42
43
|
import { EnvironmentBadge } from "../shared/EnvironmentBadge.js";
|
|
43
44
|
import { RouteTransitionIndicator } from "../shared/RouteTransitionIndicator.js";
|
|
44
45
|
import { RuntimeConfigNotice } from "../shared/RuntimeConfigNotice.js";
|
|
@@ -436,12 +437,17 @@ function ProvidersInner({
|
|
|
436
437
|
settingsShortcut: boolean;
|
|
437
438
|
children: React.ReactNode;
|
|
438
439
|
}) {
|
|
440
|
+
// The banner reads the app's locale, so it sits inside the same provider.
|
|
439
441
|
const localizedChildren =
|
|
440
442
|
i18n === false ? (
|
|
441
|
-
|
|
443
|
+
<>
|
|
444
|
+
{children}
|
|
445
|
+
{ownsDocument ? <ConsentBanner /> : null}
|
|
446
|
+
</>
|
|
442
447
|
) : (
|
|
443
448
|
<AgentNativeI18nProvider {...(i18n ?? {})}>
|
|
444
449
|
{children}
|
|
450
|
+
{ownsDocument ? <ConsentBanner /> : null}
|
|
445
451
|
</AgentNativeI18nProvider>
|
|
446
452
|
);
|
|
447
453
|
|
|
@@ -148,6 +148,7 @@ vi.mock("@agent-native/core/client/i18n", () => ({
|
|
|
148
148
|
"settings.privacyDeletionDescription":
|
|
149
149
|
"This records a deletion request; it does not delete data immediately. An administrator will verify your identity and complete the request under the deployment's retention and legal obligations.",
|
|
150
150
|
"settings.privacyDocsLink": "Read privacy and data rights",
|
|
151
|
+
"consentBanner.cookieSettings": "Cookie settings",
|
|
151
152
|
"common.cancel": "Cancel",
|
|
152
153
|
"agentChat.auth.logOut": "Log out",
|
|
153
154
|
}[key] ??
|
|
@@ -155,6 +156,11 @@ vi.mock("@agent-native/core/client/i18n", () => ({
|
|
|
155
156
|
key,
|
|
156
157
|
}));
|
|
157
158
|
|
|
159
|
+
const openConsentSettingsMock = vi.hoisted(() => vi.fn());
|
|
160
|
+
vi.mock("@agent-native/core/client/consent", () => ({
|
|
161
|
+
openConsentSettings: openConsentSettingsMock,
|
|
162
|
+
}));
|
|
163
|
+
|
|
158
164
|
vi.mock("./SchedulingTimezoneField.js", () => ({
|
|
159
165
|
SchedulingTimezoneField: () => <div data-testid="timezone" />,
|
|
160
166
|
}));
|
|
@@ -454,4 +460,29 @@ describe("AccountSettingsForm name editing", () => {
|
|
|
454
460
|
requestType: "deletion",
|
|
455
461
|
});
|
|
456
462
|
});
|
|
463
|
+
|
|
464
|
+
it("reopens the cookie banner from Privacy & data", async () => {
|
|
465
|
+
await act(async () => {
|
|
466
|
+
root.render(
|
|
467
|
+
<TooltipProvider>
|
|
468
|
+
<AccountSettingsForm />
|
|
469
|
+
</TooltipProvider>,
|
|
470
|
+
);
|
|
471
|
+
});
|
|
472
|
+
act(() => {
|
|
473
|
+
Array.from(
|
|
474
|
+
container.querySelectorAll<HTMLButtonElement>("#privacy-data button"),
|
|
475
|
+
)
|
|
476
|
+
.find((button) => button.textContent?.trim() === "Manage")
|
|
477
|
+
?.click();
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
act(() => {
|
|
481
|
+
Array.from(document.querySelectorAll<HTMLButtonElement>("button"))
|
|
482
|
+
.find((button) => button.textContent?.trim() === "Cookie settings")
|
|
483
|
+
?.click();
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
expect(openConsentSettingsMock).toHaveBeenCalledTimes(1);
|
|
487
|
+
});
|
|
457
488
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { openConsentSettings } from "@agent-native/core/client/consent";
|
|
1
2
|
import {
|
|
2
3
|
useActionMutation,
|
|
3
4
|
useActionQuery,
|
|
@@ -579,6 +580,13 @@ function PrivacySettings() {
|
|
|
579
580
|
{t("settings.privacyRequestError")}
|
|
580
581
|
</p>
|
|
581
582
|
)}
|
|
583
|
+
<button
|
|
584
|
+
type="button"
|
|
585
|
+
onClick={openConsentSettings}
|
|
586
|
+
className="block text-xs font-medium text-muted-foreground underline-offset-4 hover:text-foreground hover:underline"
|
|
587
|
+
>
|
|
588
|
+
{t("consentBanner.cookieSettings")}
|
|
589
|
+
</button>
|
|
582
590
|
<a
|
|
583
591
|
href={docsUrl("privacy-and-data-rights")}
|
|
584
592
|
target="_blank"
|