@vertesia/ui 1.6.0-dev.20261004.085740Z → 1.6.0-dev.20261009.095813Z
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/README.md +24 -0
- package/lib/boot/vite.d.ts +3 -0
- package/lib/boot/vite.d.ts.map +1 -1
- package/lib/boot/vite.js +12 -0
- package/lib/boot/vite.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts +1 -0
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +2 -2
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/core/components/shadcn/selectBox.js +2 -2
- package/lib/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/core/components/shadcn/tabs.d.ts +2 -1
- package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/core/components/shadcn/tabs.js +6 -4
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/env/index.d.ts +9 -1
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +1 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRequestInputOverlay.js +16 -10
- package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts +7 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +17 -16
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -253
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts +1 -3
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js +2 -8
- package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.d.ts +4 -0
- package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.d.ts.map +1 -0
- package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.js +248 -0
- package/lib/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.js.map +1 -0
- package/lib/features/media-viewer/ImagePanel.d.ts +1 -1
- package/lib/features/media-viewer/ImagePanel.d.ts.map +1 -1
- package/lib/features/media-viewer/ImagePanel.js +40 -10
- package/lib/features/media-viewer/ImagePanel.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/i18n/locales/ar.json +15 -0
- package/lib/i18n/locales/de.json +15 -0
- package/lib/i18n/locales/en.json +15 -0
- package/lib/i18n/locales/es.json +15 -0
- package/lib/i18n/locales/fr.json +15 -0
- package/lib/i18n/locales/it.json +15 -0
- package/lib/i18n/locales/ja.json +15 -0
- package/lib/i18n/locales/ko.json +15 -0
- package/lib/i18n/locales/pt.json +15 -0
- package/lib/i18n/locales/ru.json +15 -0
- package/lib/i18n/locales/tr.json +15 -0
- package/lib/i18n/locales/zh-TW.json +15 -0
- package/lib/i18n/locales/zh.json +15 -0
- package/lib/session/auth/composable.d.ts +1 -5
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +1 -10
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/firebase.d.ts.map +1 -1
- package/lib/session/auth/firebase.js +8 -5
- package/lib/session/auth/firebase.js.map +1 -1
- package/lib/session/auth/oauth.d.ts.map +1 -1
- package/lib/session/auth/oauth.js +43 -17
- package/lib/session/auth/oauth.js.map +1 -1
- package/lib/session/auth/vertesiaHosts.d.ts +0 -40
- package/lib/session/auth/vertesiaHosts.d.ts.map +1 -1
- package/lib/session/auth/vertesiaHosts.js +2 -45
- package/lib/session/auth/vertesiaHosts.js.map +1 -1
- package/lib/session/index.d.ts +1 -1
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +1 -1
- package/lib/session/index.js.map +1 -1
- package/lib/session/scopeSelection.d.ts +4 -0
- package/lib/session/scopeSelection.d.ts.map +1 -1
- package/lib/session/scopeSelection.js +11 -0
- package/lib/session/scopeSelection.js.map +1 -1
- package/lib/shell/AuthScreenPreview.d.ts.map +1 -1
- package/lib/shell/AuthScreenPreview.js +1 -0
- package/lib/shell/AuthScreenPreview.js.map +1 -1
- package/lib/shell/login/SignInFlow.d.ts +3 -1
- package/lib/shell/login/SignInFlow.d.ts.map +1 -1
- package/lib/shell/login/SignInFlow.js +13 -4
- package/lib/shell/login/SignInFlow.js.map +1 -1
- package/lib/shell/login/SignInIcons.d.ts.map +1 -1
- package/lib/shell/login/SignInIcons.js +2 -1
- package/lib/shell/login/SignInIcons.js.map +1 -1
- package/lib/shell/login/SignInPasswordStep.d.ts +9 -0
- package/lib/shell/login/SignInPasswordStep.d.ts.map +1 -0
- package/lib/shell/login/SignInPasswordStep.js +58 -0
- package/lib/shell/login/SignInPasswordStep.js.map +1 -0
- package/lib/shell/login/SignInPrimitives.d.ts +13 -0
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +11 -1
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInProvidersStep.d.ts +3 -1
- package/lib/shell/login/SignInProvidersStep.d.ts.map +1 -1
- package/lib/shell/login/SignInProvidersStep.js +4 -2
- package/lib/shell/login/SignInProvidersStep.js.map +1 -1
- package/lib/shell/login/SignInReturningStep.d.ts +3 -1
- package/lib/shell/login/SignInReturningStep.d.ts.map +1 -1
- package/lib/shell/login/SignInReturningStep.js +18 -8
- package/lib/shell/login/SignInReturningStep.js.map +1 -1
- package/lib/shell/login/SignInTenantStep.d.ts +3 -1
- package/lib/shell/login/SignInTenantStep.d.ts.map +1 -1
- package/lib/shell/login/SignInTenantStep.js +2 -2
- package/lib/shell/login/SignInTenantStep.js.map +1 -1
- package/lib/shell/login/SignInWithProviderButton.d.ts +5 -3
- package/lib/shell/login/SignInWithProviderButton.d.ts.map +1 -1
- package/lib/shell/login/SignInWithProviderButton.js +8 -7
- package/lib/shell/login/SignInWithProviderButton.js.map +1 -1
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +9 -3
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/signInUtils.d.ts +24 -4
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +53 -1
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-boot.js.map +1 -1
- package/lib/vertesia-ui-core.js +42 -42
- 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 +574 -589
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.1NWiB6fw.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.1NWiB6fw.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.6Ozlf6Ks.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.6Ozlf6Ks.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.AttJpg8U.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.AttJpg8U.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BI_xdp49.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BI_xdp49.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.C-2EEX6w.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.C-2EEX6w.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CAmo54FO.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CAmo54FO.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CbBzmHNP.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CbBzmHNP.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DZgTzkIg.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DZgTzkIg.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DZsITxq5.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DZsITxq5.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.Dbf2GHth.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.Dbf2GHth.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-i18n.lleWnH5n.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.lleWnH5n.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.wG_XSkbr.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.wG_XSkbr.chunk.js.map +1 -0
- package/lib/vertesia-ui-layout.js +15 -15
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +40 -40
- package/lib/vertesia-ui-rich-text.js.map +1 -1
- package/lib/vertesia-ui-router.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 +54 -47
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +47 -47
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +20 -20
- package/src/boot/vite.ts +15 -0
- package/src/core/components/shadcn/button.tsx +3 -2
- package/src/core/components/shadcn/selectBox.tsx +12 -4
- package/src/core/components/shadcn/tabs.tsx +9 -3
- package/src/css/index.css +1 -1
- package/src/css/typography.css +111 -88
- package/src/env/index.ts +10 -3
- package/src/features/agent/chat/AgentRequestInputOverlay.tsx +73 -34
- package/src/features/agent/chat/AskUserWidget.tsx +225 -206
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +2 -253
- package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.tsx +2 -8
- package/src/features/agent/chat/ModernAgentOutput/agentMarkdownStyles.ts +248 -0
- package/src/features/media-viewer/ImagePanel.tsx +51 -10
- package/src/features/store/types/IntakePolicyEditor.tsx +2 -1
- package/src/i18n/locales/ar.json +15 -0
- package/src/i18n/locales/de.json +15 -0
- package/src/i18n/locales/en.json +15 -0
- package/src/i18n/locales/es.json +15 -0
- package/src/i18n/locales/fr.json +15 -0
- package/src/i18n/locales/it.json +15 -0
- package/src/i18n/locales/ja.json +15 -0
- package/src/i18n/locales/ko.json +15 -0
- package/src/i18n/locales/pt.json +15 -0
- package/src/i18n/locales/ru.json +15 -0
- package/src/i18n/locales/tr.json +15 -0
- package/src/i18n/locales/zh-TW.json +15 -0
- package/src/i18n/locales/zh.json +15 -0
- package/src/session/auth/composable.ts +1 -11
- package/src/session/auth/firebase.ts +9 -6
- package/src/session/auth/oauth.ts +47 -16
- package/src/session/auth/vertesiaHosts.ts +2 -47
- package/src/session/index.ts +1 -1
- package/src/session/scopeSelection.ts +13 -0
- package/src/shell/AuthScreenPreview.tsx +1 -0
- package/src/shell/login/SignInFlow.tsx +23 -2
- package/src/shell/login/SignInIcons.tsx +2 -1
- package/src/shell/login/SignInPasswordStep.tsx +103 -0
- package/src/shell/login/SignInPrimitives.tsx +53 -1
- package/src/shell/login/SignInProvidersStep.tsx +8 -4
- package/src/shell/login/SignInReturningStep.tsx +20 -8
- package/src/shell/login/SignInTenantStep.tsx +6 -2
- package/src/shell/login/SignInWithProviderButton.tsx +11 -7
- package/src/shell/login/SigninScreen.tsx +8 -3
- package/src/shell/login/signInUtils.ts +68 -8
- package/lib/vertesia-ui-i18n.BCPusS2_.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BCPusS2_.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BHWlHchf.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BHWlHchf.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BkNx8SZu.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BkNx8SZu.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.C1LasLrO.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.C1LasLrO.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D8PQ5yKU.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D8PQ5yKU.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DUtVV1Bq.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DUtVV1Bq.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DgA36_k5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DgA36_k5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DmG-fjjZ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DmG-fjjZ.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DreWvQIk.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DreWvQIk.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.Pp8Tj48d.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.Pp8Tj48d.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.gais--x5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.gais--x5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.xkqaKpY_.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.xkqaKpY_.chunk.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/ui",
|
|
3
|
-
"version": "1.6.0-dev.
|
|
3
|
+
"version": "1.6.0-dev.20261009.095813Z",
|
|
4
4
|
"description": "Vertesia UI components and and hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@radix-ui/react-switch": "^1.3.7",
|
|
48
48
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
49
49
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
50
|
-
"@vertesia/client": "1.6.0-dev.
|
|
51
|
-
"@vertesia/common": "1.6.0-dev.
|
|
52
|
-
"@vertesia/fusion-ux": "1.6.0-dev.
|
|
53
|
-
"@vertesia/json": "1.6.0-dev.
|
|
54
|
-
"@vertesia/rich-text": "1.6.0-dev.
|
|
50
|
+
"@vertesia/client": "1.6.0-dev.20261009.095813Z",
|
|
51
|
+
"@vertesia/common": "1.6.0-dev.20261009.095813Z",
|
|
52
|
+
"@vertesia/fusion-ux": "1.6.0-dev.20261009.095813Z",
|
|
53
|
+
"@vertesia/json": "1.6.0-dev.20261009.095813Z",
|
|
54
|
+
"@vertesia/rich-text": "1.6.0-dev.20261009.095813Z",
|
|
55
55
|
"ajv": "^8.20.0",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
57
57
|
"aria-hidden": "^1.2.6",
|
|
@@ -61,29 +61,29 @@
|
|
|
61
61
|
"dayjs": "^1.11.23",
|
|
62
62
|
"debounce": "^3.0.0",
|
|
63
63
|
"dompurify": "^3.4.16",
|
|
64
|
-
"fast-xml-parser": "^5.11.
|
|
64
|
+
"fast-xml-parser": "^5.11.2",
|
|
65
65
|
"firebase": "^12.19.0",
|
|
66
|
-
"framer-motion": "^13.4.
|
|
66
|
+
"framer-motion": "^13.4.4",
|
|
67
67
|
"i18next": "^26.4.2",
|
|
68
68
|
"jwt-decode": "^4.0.0",
|
|
69
|
-
"katex": "^0.18.
|
|
69
|
+
"katex": "^0.18.9",
|
|
70
70
|
"lodash-es": "^4.18.1",
|
|
71
|
-
"lucide-react": "^1.
|
|
71
|
+
"lucide-react": "^1.48.0",
|
|
72
72
|
"mermaid": "^12.0.0",
|
|
73
|
-
"monaco-editor": "^0.
|
|
74
|
-
"motion": "^13.4.
|
|
73
|
+
"monaco-editor": "^0.57.0",
|
|
74
|
+
"motion": "^13.4.4",
|
|
75
75
|
"papaparse": "^5.7.0",
|
|
76
76
|
"react": "19.3.0",
|
|
77
77
|
"react-calendar": "^6.0.1",
|
|
78
78
|
"react-date-picker": "^12.1.0",
|
|
79
79
|
"react-dom": "19.3.0",
|
|
80
80
|
"react-error-boundary": "^6.1.6",
|
|
81
|
-
"react-i18next": "^17.0.
|
|
81
|
+
"react-i18next": "^17.0.15",
|
|
82
82
|
"react-markdown": "^10.1.0",
|
|
83
83
|
"react-pdf": "^10.5.0",
|
|
84
84
|
"react-remove-scroll": "^2.7.2",
|
|
85
85
|
"react-remove-scroll-bar": "^2.3.8",
|
|
86
|
-
"react-resizable-panels": "^4.
|
|
86
|
+
"react-resizable-panels": "^4.14.1",
|
|
87
87
|
"react-style-singleton": "^2.2.3",
|
|
88
88
|
"react-vega": "^8.0.0",
|
|
89
89
|
"rehype-katex": "^7.0.1",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"ts-md5": "^2.0.1",
|
|
98
98
|
"unist-util-visit": "^5.1.0",
|
|
99
99
|
"vega": "^6.4.0",
|
|
100
|
-
"vega-embed": "^7.
|
|
100
|
+
"vega-embed": "^7.3.0",
|
|
101
101
|
"vega-lite": "^6.4.3"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
@@ -105,19 +105,19 @@
|
|
|
105
105
|
"@testing-library/user-event": "^14.6.7",
|
|
106
106
|
"@types/hast": "^3.0.5",
|
|
107
107
|
"@types/lodash-es": "^4.17.12",
|
|
108
|
-
"@types/node": "^24.
|
|
108
|
+
"@types/node": "^24.19.0",
|
|
109
109
|
"@types/papaparse": "^5.5.2",
|
|
110
110
|
"@types/react": "19.3.0",
|
|
111
111
|
"@types/react-dom": "19.3.0",
|
|
112
112
|
"@vertesia/tsconfig": "0.1.0",
|
|
113
113
|
"axe-core": "^4.13.0",
|
|
114
114
|
"culori": "^4.0.2",
|
|
115
|
-
"i18next-cli": "^1.74.
|
|
115
|
+
"i18next-cli": "^1.74.2",
|
|
116
116
|
"jsdom": "^30.1.1",
|
|
117
|
-
"rolldown": "1.2.
|
|
117
|
+
"rolldown": "1.2.11",
|
|
118
118
|
"tailwindcss": "^4.3.3",
|
|
119
119
|
"typescript": "7.0.2",
|
|
120
|
-
"vitest": "5.0.
|
|
120
|
+
"vitest": "5.0.2",
|
|
121
121
|
"vitest-axe": "^0.1.0",
|
|
122
122
|
"wcag-contrast": "^3.0.0"
|
|
123
123
|
},
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"url": "https://github.com/vertesia/composableai.git",
|
|
194
194
|
"directory": "packages/ui"
|
|
195
195
|
},
|
|
196
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "e45bc09ecf2de4c8fe8a8d39fb52c1521980e7b9",
|
|
197
197
|
"scripts": {
|
|
198
198
|
"clean:lib": "rimraf ./lib ./tsconfig.tsbuildinfo",
|
|
199
199
|
"clean": "rimraf ./node_modules ./lib ./tsconfig.tsbuildinfo",
|
package/src/boot/vite.ts
CHANGED
|
@@ -79,9 +79,18 @@ export function resolveBrandingAssets(branding: AppBranding, moduleUrl: URL, wat
|
|
|
79
79
|
|
|
80
80
|
export function createAppBrandingPlugin(branding: AppBranding, moduleUrl: URL) {
|
|
81
81
|
const watched = new Set<string>();
|
|
82
|
+
let workspace: { account?: string; project?: string } = {};
|
|
82
83
|
const resolve = () => resolveBrandingAssets(branding, moduleUrl, (file) => watched.add(file));
|
|
83
84
|
return {
|
|
84
85
|
name: 'vertesia-app-branding',
|
|
86
|
+
configResolved(config: { env: Record<string, unknown> }) {
|
|
87
|
+
const account = config.env.VITE_VERTESIA_ACCOUNT_ID;
|
|
88
|
+
const project = config.env.VITE_VERTESIA_PROJECT_ID;
|
|
89
|
+
workspace = {
|
|
90
|
+
account: typeof account === 'string' ? account : undefined,
|
|
91
|
+
project: typeof project === 'string' ? project : undefined,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
85
94
|
resolveId(id: string) {
|
|
86
95
|
if (id === VIRTUAL_ID) return RESOLVED_ID;
|
|
87
96
|
},
|
|
@@ -115,6 +124,12 @@ export function createAppBrandingPlugin(branding: AppBranding, moduleUrl: URL) {
|
|
|
115
124
|
`<link rel="icon" href="${escapeBrandHtml(resolved.favicon)}"></head>`,
|
|
116
125
|
);
|
|
117
126
|
}
|
|
127
|
+
// Data only: a hosting gateway can render its own trusted login without executing app code.
|
|
128
|
+
const brandData = JSON.stringify({ ...resolved, workspace }).replace(/</g, '\\u003c');
|
|
129
|
+
result = result.replace(
|
|
130
|
+
'</head>',
|
|
131
|
+
`<script type="application/json" id="vertesia-app-branding">${brandData}</script></head>`,
|
|
132
|
+
);
|
|
118
133
|
return injectBootScreenHtml(result, brandedBootOptions(resolved));
|
|
119
134
|
},
|
|
120
135
|
};
|
|
@@ -188,6 +188,7 @@ interface CopyButtonProps {
|
|
|
188
188
|
/** @deprecated use `aria-label` */
|
|
189
189
|
alt?: string;
|
|
190
190
|
'aria-label'?: string;
|
|
191
|
+
BtnIcon?: React.ReactNode;
|
|
191
192
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'icon';
|
|
192
193
|
toast?: {
|
|
193
194
|
toast: (options: { status: 'success' | 'error'; title: string; duration: number }) => void;
|
|
@@ -197,7 +198,7 @@ interface CopyButtonProps {
|
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
|
|
200
|
-
({ size, content, toast, className, alt, 'aria-label': ariaLabel, ...props }, ref) => {
|
|
201
|
+
({ size, content, toast, className, alt, BtnIcon, 'aria-label': ariaLabel, ...props }, ref) => {
|
|
201
202
|
const [isCopied, setIsCopied] = useState(false);
|
|
202
203
|
const { t } = useUITranslation();
|
|
203
204
|
|
|
@@ -246,7 +247,7 @@ const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
|
|
|
246
247
|
{...props}
|
|
247
248
|
title={label}
|
|
248
249
|
>
|
|
249
|
-
{isCopied ? <Check className="text-success" /> : <CopyIcon className="size-4" />}
|
|
250
|
+
{isCopied ? <Check className="text-success" /> : (BtnIcon ?? <CopyIcon className="size-4" />)}
|
|
250
251
|
</Button>
|
|
251
252
|
);
|
|
252
253
|
},
|
|
@@ -287,7 +287,7 @@ export function SelectBox<T = unknown>({
|
|
|
287
287
|
const renderOptionsContent = () => (
|
|
288
288
|
<>
|
|
289
289
|
{filterBy && (
|
|
290
|
-
<div className="flex justify-start items-center mb-1">
|
|
290
|
+
<div className="flex justify-start items-center mb-1 shrink-0">
|
|
291
291
|
<div className="mx-2">
|
|
292
292
|
<SearchIcon className="size-4" />
|
|
293
293
|
</div>
|
|
@@ -300,9 +300,9 @@ export function SelectBox<T = unknown>({
|
|
|
300
300
|
/>
|
|
301
301
|
</div>
|
|
302
302
|
)}
|
|
303
|
-
<Command className=
|
|
303
|
+
<Command className={inline ? 'min-h-0 flex-1' : 'overflow-hidden'}>
|
|
304
304
|
<CommandList
|
|
305
|
-
className={inline ? '
|
|
305
|
+
className={inline ? 'min-h-0 flex-1 overflow-y-auto' : 'max-h-[200px] overflow-y-auto'}
|
|
306
306
|
onWheel={(e) => {
|
|
307
307
|
e.currentTarget.scrollTop += e.deltaY;
|
|
308
308
|
}}
|
|
@@ -342,7 +342,15 @@ export function SelectBox<T = unknown>({
|
|
|
342
342
|
|
|
343
343
|
if (inline) {
|
|
344
344
|
return (
|
|
345
|
-
<div
|
|
345
|
+
<div
|
|
346
|
+
className={clsx(
|
|
347
|
+
'flex flex-col',
|
|
348
|
+
className,
|
|
349
|
+
border && 'border border-border rounded-md',
|
|
350
|
+
'bg-popover p-1',
|
|
351
|
+
popupClass,
|
|
352
|
+
)}
|
|
353
|
+
>
|
|
346
354
|
{isLoading ? (
|
|
347
355
|
<div className="flex justify-center items-center p-2 text-muted text-sm">
|
|
348
356
|
<LoaderCircle className="size-4 animate-spin" />
|
|
@@ -27,6 +27,7 @@ export interface Tab {
|
|
|
27
27
|
export type CanChangeTab = (nextTab: string, currentTab?: string) => boolean;
|
|
28
28
|
|
|
29
29
|
const TabsContext = React.createContext<{
|
|
30
|
+
orientation?: 'horizontal' | 'vertical';
|
|
30
31
|
size?: number;
|
|
31
32
|
tabs?: Tab[];
|
|
32
33
|
current?: string;
|
|
@@ -46,6 +47,7 @@ const TabsContext = React.createContext<{
|
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
interface TabsProps {
|
|
50
|
+
orientation?: 'horizontal' | 'vertical';
|
|
49
51
|
current?: string | (() => string);
|
|
50
52
|
tabs: Tab[];
|
|
51
53
|
defaultValue?: string;
|
|
@@ -61,6 +63,7 @@ interface TabsProps {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const Tabs = ({
|
|
66
|
+
orientation = 'horizontal',
|
|
64
67
|
tabs,
|
|
65
68
|
defaultValue,
|
|
66
69
|
current,
|
|
@@ -165,6 +168,7 @@ const Tabs = ({
|
|
|
165
168
|
return (
|
|
166
169
|
<TabsContext.Provider
|
|
167
170
|
value={{
|
|
171
|
+
orientation,
|
|
168
172
|
tabs: visibleTabs,
|
|
169
173
|
size: fullWidth ? visibleTabs.length : 0,
|
|
170
174
|
current: value,
|
|
@@ -176,6 +180,7 @@ const Tabs = ({
|
|
|
176
180
|
}}
|
|
177
181
|
>
|
|
178
182
|
<TabsPrimitive.Root
|
|
183
|
+
orientation={orientation}
|
|
179
184
|
defaultValue={value || visibleTabs[0]?.name}
|
|
180
185
|
value={value}
|
|
181
186
|
onValueChange={handleValueChange}
|
|
@@ -194,8 +199,9 @@ interface TabsBarProps {
|
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
197
|
-
const { tabs, size, current, setTab, responsive, variant, updateHash, canChangeTab } =
|
|
202
|
+
const { tabs, size, current, setTab, responsive, variant, updateHash, canChangeTab, orientation } =
|
|
198
203
|
React.useContext(TabsContext);
|
|
204
|
+
const barDirection = direction ?? orientation ?? 'horizontal';
|
|
199
205
|
|
|
200
206
|
const fullWidth = size !== 0;
|
|
201
207
|
|
|
@@ -248,14 +254,14 @@ const TabsBar = ({ className, sticky, direction }: TabsBarProps) => {
|
|
|
248
254
|
sticky && 'sticky top-0 bg-background z-10',
|
|
249
255
|
// TabsList's `border-b -mb-px` is the rail under a ROW of tabs. In vertical
|
|
250
256
|
// mode it renders as a stray line beneath the column, so drop it here only.
|
|
251
|
-
|
|
257
|
+
barDirection === 'vertical' ? 'flex-col items-start border-b-0 mb-0' : 'flex-row',
|
|
252
258
|
responsive ? 'hidden lg:flex' : '',
|
|
253
259
|
className,
|
|
254
260
|
)}
|
|
255
261
|
>
|
|
256
262
|
{tabs.map((tab) => (
|
|
257
263
|
<TabsTrigger
|
|
258
|
-
className={cn(
|
|
264
|
+
className={cn(barDirection === 'vertical' ? 'w-full text-start' : '')}
|
|
259
265
|
key={tab.name}
|
|
260
266
|
value={tab.name}
|
|
261
267
|
disabled={tab.disabled}
|
package/src/css/index.css
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @import "@vertesia/ui/css/theme.css";
|
|
16
16
|
*
|
|
17
17
|
* Typography (.vprose) is opt-in since it requires @tailwindcss/typography:
|
|
18
|
-
* @import "@vertesia/ui/css/typography.css"
|
|
18
|
+
* @import "@vertesia/ui/css/typography.css";
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
@import "./color.css" layer(base);
|
package/src/css/typography.css
CHANGED
|
@@ -1,89 +1,112 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
/* Typography is opt-in. Own the layer here so normal imports cannot accidentally put
|
|
2
|
+
theme colours below the typography plugin's prose utilities. */
|
|
3
|
+
@layer utilities {
|
|
4
|
+
.vprose {
|
|
5
|
+
@apply prose max-w-none;
|
|
6
|
+
|
|
7
|
+
/* Tailwind Typography's public palette interface. Use the active semantic tokens so
|
|
8
|
+
branding and dark mode share one source of truth; consumers do not need prose-invert.
|
|
9
|
+
https://github.com/tailwindlabs/tailwindcss-typography#adding-custom-color-themes */
|
|
10
|
+
--tw-prose-body: var(--foreground);
|
|
11
|
+
--tw-prose-headings: var(--foreground);
|
|
12
|
+
--tw-prose-lead: var(--muted);
|
|
13
|
+
--tw-prose-links: var(--info);
|
|
14
|
+
--tw-prose-bold: var(--foreground);
|
|
15
|
+
--tw-prose-counters: var(--muted);
|
|
16
|
+
--tw-prose-bullets: var(--muted);
|
|
17
|
+
--tw-prose-hr: var(--border);
|
|
18
|
+
--tw-prose-quotes: var(--muted);
|
|
19
|
+
--tw-prose-quote-borders: var(--border);
|
|
20
|
+
--tw-prose-captions: var(--muted);
|
|
21
|
+
--tw-prose-kbd: var(--foreground);
|
|
22
|
+
--tw-prose-kbd-shadows: var(--border);
|
|
23
|
+
--tw-prose-code: var(--muted);
|
|
24
|
+
--tw-prose-pre-code: var(--muted);
|
|
25
|
+
--tw-prose-pre-bg: var(--muted-background);
|
|
26
|
+
--tw-prose-th-borders: var(--border);
|
|
27
|
+
--tw-prose-td-borders: var(--border);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vprose :where(p):not(:where(.not-prose, .not-prose *)) {
|
|
31
|
+
@apply bg-transparent my-2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vprose :where(a):not(:where(.not-prose, .not-prose *)) {
|
|
35
|
+
@variant hover {
|
|
36
|
+
color: color-mix(in oklab, var(--tw-prose-links) 80%, transparent);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.vprose :where(pre, code):not(:where(.not-prose, .not-prose *)) {
|
|
41
|
+
@apply my-2;
|
|
42
|
+
background-color: var(--tw-prose-pre-bg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vprose :where(strong):not(:where(.not-prose, .not-prose *)) {
|
|
46
|
+
@apply font-bold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.vprose :where(em):not(:where(.not-prose, .not-prose *)) {
|
|
50
|
+
@apply italic;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.vprose :where(ul):not(:where(.not-prose, .not-prose *)) {
|
|
54
|
+
@apply my-3 ps-6 list-disc space-y-1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.vprose :where(ol):not(:where(.not-prose, .not-prose *)) {
|
|
58
|
+
@apply my-3 ps-6 list-decimal space-y-1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vprose :where(li):not(:where(.not-prose, .not-prose *)) {
|
|
62
|
+
@apply my-2 ps-1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vprose :where(blockquote):not(:where(.not-prose, .not-prose *)) {
|
|
66
|
+
@apply border-s-4 ps-4 italic my-3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.vprose :where(hr):not(:where(.not-prose, .not-prose *)) {
|
|
70
|
+
@apply my-4;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.vprose :where(h1):not(:where(.not-prose, .not-prose *)) {
|
|
74
|
+
@apply font-bold text-2xl my-2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.vprose :where(h2):not(:where(.not-prose, .not-prose *)) {
|
|
78
|
+
@apply font-bold text-xl my-2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vprose :where(h3):not(:where(.not-prose, .not-prose *)) {
|
|
82
|
+
@apply font-bold text-lg my-2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.vprose :where(table):not(:where(.not-prose, .not-prose *)) {
|
|
86
|
+
@apply min-w-full border-collapse border my-4;
|
|
87
|
+
border-color: var(--tw-prose-td-borders);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.vprose :where(th):not(:where(.not-prose, .not-prose *)) {
|
|
91
|
+
@apply border px-4 py-2 text-start font-bold;
|
|
92
|
+
border-color: var(--tw-prose-th-borders);
|
|
93
|
+
background-color: var(--muted-background);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vprose :where(td):not(:where(.not-prose, .not-prose *)) {
|
|
97
|
+
@apply border px-4 py-2;
|
|
98
|
+
border-color: var(--tw-prose-td-borders);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vprose :where(code):not(:where(.not-prose, .not-prose *)) {
|
|
102
|
+
@apply font-mono text-sm;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vprose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
|
|
106
|
+
@apply px-1.5 py-0.5 rounded;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.vprose :where(.code-language-indicator):not(:where(.not-prose, .not-prose *)) {
|
|
110
|
+
@apply text-xs px-3 py-1 rounded-t-md font-mono border-t border-s border-e -mb-2;
|
|
111
|
+
}
|
|
89
112
|
}
|
package/src/env/index.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { isTrustedAuthBrokerUrl } from '../session/auth/vertesiaHosts.js';
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
FIRST_PARTY_HOST_PATTERNS,
|
|
5
|
-
GATEWAY_HOST_PATTERNS,
|
|
6
4
|
isLoopbackHostname,
|
|
7
5
|
isTrustedAuthBrokerUrl,
|
|
8
6
|
normalizeHostname,
|
|
@@ -41,7 +39,16 @@ export interface EnvProps {
|
|
|
41
39
|
/** Explicitly allow legacy Firebase/central sign-in in an iframe when host authentication is unavailable. */
|
|
42
40
|
allowLegacyIframeAuth?: boolean;
|
|
43
41
|
/** Public OAuth client for independently hosted apps; ignored inside Studio or a gateway session. */
|
|
44
|
-
oauth?: {
|
|
42
|
+
oauth?: {
|
|
43
|
+
clientId: string;
|
|
44
|
+
redirectUri: string;
|
|
45
|
+
scopes?: string[];
|
|
46
|
+
offlineAccess?: boolean;
|
|
47
|
+
/** Logical authorization server, optionally including a tenant path; defaults to endpoints.sts. */
|
|
48
|
+
issuer?: string;
|
|
49
|
+
/** RFC 8707 audience, independent of the logical issuer; defaults to the discovered issuer. */
|
|
50
|
+
resource?: string;
|
|
51
|
+
};
|
|
45
52
|
firebase?: {
|
|
46
53
|
apiKey: string;
|
|
47
54
|
authDomain: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { McpConnectUxConfig } from '@vertesia/common';
|
|
2
|
-
import { Button } from '@vertesia/ui/core';
|
|
2
|
+
import { Button, VTooltip } from '@vertesia/ui/core';
|
|
3
3
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
5
|
-
import { XIcon } from 'lucide-react';
|
|
5
|
+
import { ChevronDown, ChevronUp, XIcon } from 'lucide-react';
|
|
6
|
+
import { useId, useState } from 'react';
|
|
6
7
|
import { RemoteMcpConnectionButton } from '../../oauth/RemoteMcpConnectionButton.js';
|
|
7
8
|
import { ComposerOverlay, ComposerOverlayQuestion } from './ComposerOverlay';
|
|
8
9
|
import {
|
|
9
10
|
getRequestInputDisplayText,
|
|
11
|
+
getRequestInputResolutionKey,
|
|
10
12
|
getRequestInputResponseMetadata,
|
|
11
13
|
getToolApprovalResponseMetadata,
|
|
12
14
|
type RequestInputMessageWithUx,
|
|
@@ -63,17 +65,30 @@ function McpRequestInputControls({ mcpConnect, onMcpConnected, onDecline, disabl
|
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
export function AgentRequestInputOverlay({
|
|
68
|
+
export function AgentRequestInputOverlay(props: AgentRequestInputOverlayProps) {
|
|
69
|
+
if (!props.message) return null;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<PendingRequestInputOverlay
|
|
73
|
+
{...props}
|
|
74
|
+
message={props.message}
|
|
75
|
+
key={`${props.message.workflow_run_id}:${getRequestInputResolutionKey(props.message)}`}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function PendingRequestInputOverlay({
|
|
67
81
|
message,
|
|
68
82
|
onSendMessage,
|
|
69
83
|
onMcpConnected,
|
|
70
84
|
isLoading = false,
|
|
71
85
|
disabled = false,
|
|
72
86
|
className,
|
|
73
|
-
}: AgentRequestInputOverlayProps) {
|
|
87
|
+
}: AgentRequestInputOverlayProps & { message: RequestInputMessageWithUx }) {
|
|
74
88
|
const { t } = useUITranslation();
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
90
|
+
const contentId = useId();
|
|
91
|
+
const toggleLabel = isCollapsed ? t('agent.showQuestions') : t('agent.hideQuestions');
|
|
77
92
|
|
|
78
93
|
const uxConfig = message.details.ux;
|
|
79
94
|
const options = uxConfig.options ?? [];
|
|
@@ -86,37 +101,61 @@ export function AgentRequestInputOverlay({
|
|
|
86
101
|
sendRequestInputResponse(onSendMessage, message, value, metadata);
|
|
87
102
|
};
|
|
88
103
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
const collapseButton = (
|
|
105
|
+
<VTooltip description={toggleLabel} asChild>
|
|
106
|
+
<Button
|
|
107
|
+
variant="ghost"
|
|
108
|
+
size="icon"
|
|
109
|
+
className="size-6 shrink-0"
|
|
110
|
+
aria-label={toggleLabel}
|
|
111
|
+
aria-expanded={!isCollapsed}
|
|
112
|
+
aria-controls={contentId}
|
|
113
|
+
onClick={() => setIsCollapsed((collapsed) => !collapsed)}
|
|
114
|
+
>
|
|
115
|
+
{isCollapsed ? (
|
|
116
|
+
<ChevronUp className="size-4" aria-hidden="true" />
|
|
117
|
+
) : (
|
|
118
|
+
<ChevronDown className="size-4" aria-hidden="true" />
|
|
119
|
+
)}
|
|
120
|
+
</Button>
|
|
121
|
+
</VTooltip>
|
|
122
|
+
);
|
|
104
123
|
|
|
105
124
|
return (
|
|
106
125
|
<ComposerOverlay className={className} data-agent-request-input-overlay>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
{mcpConnect ? (
|
|
127
|
+
<div className="mx-auto w-full max-w-3xl px-3 py-3">
|
|
128
|
+
<div className="flex items-start gap-2">
|
|
129
|
+
<div className="min-w-0 flex-1 text-sm leading-6 text-foreground/85">{displayText}</div>
|
|
130
|
+
{collapseButton}
|
|
131
|
+
</div>
|
|
132
|
+
<div id={contentId} hidden={isCollapsed}>
|
|
133
|
+
<McpRequestInputControls
|
|
134
|
+
mcpConnect={mcpConnect}
|
|
135
|
+
onMcpConnected={(cfg) => onMcpConnected?.(cfg, getRequestInputResponseMetadata(message))}
|
|
136
|
+
onDecline={() => send(t('agent.mcpDeclinedMessage', { name: mcpConnect.name }))}
|
|
137
|
+
disabled={isDisabled}
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
) : (
|
|
142
|
+
<ComposerOverlayQuestion
|
|
143
|
+
question={displayText}
|
|
144
|
+
options={options}
|
|
145
|
+
variant={uxConfig.variant}
|
|
146
|
+
multiSelect={uxConfig.multiSelect}
|
|
147
|
+
allowFreeResponse={options.length === 0 || !!freeResponse}
|
|
148
|
+
placeholder={freeResponse?.placeholder}
|
|
149
|
+
submitLabel={freeResponse?.submit_label}
|
|
150
|
+
onSelect={(optionId) => send(optionId, getToolApprovalResponseMetadata(message, optionId))}
|
|
151
|
+
onMultiSelect={(optionIds) => send(optionIds.join(', '))}
|
|
152
|
+
onSubmit={(value) => send(value, freeResponse?.metadata)}
|
|
153
|
+
isLoading={isDisabled}
|
|
154
|
+
headerAction={collapseButton}
|
|
155
|
+
responseControlsId={contentId}
|
|
156
|
+
responseControlsHidden={isCollapsed}
|
|
157
|
+
/>
|
|
158
|
+
)}
|
|
120
159
|
</ComposerOverlay>
|
|
121
160
|
);
|
|
122
161
|
}
|