@manta-eu/react 0.12.0 → 0.13.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.
Files changed (585) hide show
  1. package/README.md +59 -0
  2. package/dist/components/AppErrorBoundary.d.ts.map +1 -1
  3. package/dist/components/AppErrorBoundary.js +14 -11
  4. package/dist/components/AppErrorBoundary.js.map +1 -1
  5. package/dist/components/app-gate/AppGate.d.ts +8 -0
  6. package/dist/components/app-gate/AppGate.d.ts.map +1 -0
  7. package/dist/components/app-gate/AppGate.js +68 -0
  8. package/dist/components/app-gate/AppGate.js.map +1 -0
  9. package/dist/components/app-gate/AwaitingDatastoreStatus.d.ts +7 -0
  10. package/dist/components/app-gate/AwaitingDatastoreStatus.d.ts.map +1 -0
  11. package/dist/components/app-gate/AwaitingDatastoreStatus.js +19 -0
  12. package/dist/components/app-gate/AwaitingDatastoreStatus.js.map +1 -0
  13. package/dist/components/app-gate/EnterDatastoreRoute.d.ts +2 -0
  14. package/dist/components/app-gate/EnterDatastoreRoute.d.ts.map +1 -0
  15. package/dist/components/app-gate/EnterDatastoreRoute.js +25 -0
  16. package/dist/components/app-gate/EnterDatastoreRoute.js.map +1 -0
  17. package/dist/components/app-gate/ErrorRoute.d.ts +2 -0
  18. package/dist/components/app-gate/ErrorRoute.d.ts.map +1 -0
  19. package/dist/components/app-gate/ErrorRoute.js +27 -0
  20. package/dist/components/app-gate/ErrorRoute.js.map +1 -0
  21. package/dist/components/app-gate/FailureAlert.d.ts +5 -0
  22. package/dist/components/app-gate/FailureAlert.d.ts.map +1 -0
  23. package/dist/components/app-gate/FailureAlert.js +9 -0
  24. package/dist/components/app-gate/FailureAlert.js.map +1 -0
  25. package/dist/components/app-gate/NoDatastoreAccess.d.ts +8 -0
  26. package/dist/components/app-gate/NoDatastoreAccess.d.ts.map +1 -0
  27. package/dist/components/app-gate/NoDatastoreAccess.js +9 -0
  28. package/dist/components/app-gate/NoDatastoreAccess.js.map +1 -0
  29. package/dist/components/app-gate/NotFoundRoute.d.ts +2 -0
  30. package/dist/components/app-gate/NotFoundRoute.d.ts.map +1 -0
  31. package/dist/components/app-gate/NotFoundRoute.js +9 -0
  32. package/dist/components/app-gate/NotFoundRoute.js.map +1 -0
  33. package/dist/components/app-gate/PendingInvitations.d.ts +5 -0
  34. package/dist/components/app-gate/PendingInvitations.d.ts.map +1 -0
  35. package/dist/components/app-gate/PendingInvitations.js +58 -0
  36. package/dist/components/app-gate/PendingInvitations.js.map +1 -0
  37. package/dist/components/app-gate/ServiceError.d.ts +8 -0
  38. package/dist/components/app-gate/ServiceError.d.ts.map +1 -0
  39. package/dist/components/app-gate/ServiceError.js +10 -0
  40. package/dist/components/app-gate/ServiceError.js.map +1 -0
  41. package/dist/components/app-gate/index.d.ts +3 -0
  42. package/dist/components/app-gate/index.d.ts.map +1 -0
  43. package/dist/components/app-gate/index.js +3 -0
  44. package/dist/components/app-gate/index.js.map +1 -0
  45. package/dist/components/app-gate/sdk-route-elements.d.ts +23 -0
  46. package/dist/components/app-gate/sdk-route-elements.d.ts.map +1 -0
  47. package/dist/components/app-gate/sdk-route-elements.js +35 -0
  48. package/dist/components/app-gate/sdk-route-elements.js.map +1 -0
  49. package/dist/components/app-shell/AppShell.d.ts +7 -0
  50. package/dist/components/app-shell/AppShell.d.ts.map +1 -0
  51. package/dist/components/app-shell/AppShell.js +10 -0
  52. package/dist/components/app-shell/AppShell.js.map +1 -0
  53. package/dist/components/app-shell/AppShellRoutes.d.ts +9 -0
  54. package/dist/components/app-shell/AppShellRoutes.d.ts.map +1 -0
  55. package/dist/components/app-shell/AppShellRoutes.js +20 -0
  56. package/dist/components/app-shell/AppShellRoutes.js.map +1 -0
  57. package/dist/components/app-shell/GroupDatastores.d.ts +8 -0
  58. package/dist/components/app-shell/GroupDatastores.d.ts.map +1 -0
  59. package/dist/components/app-shell/GroupDatastores.js +15 -0
  60. package/dist/components/app-shell/GroupDatastores.js.map +1 -0
  61. package/dist/components/app-shell/GroupRoute.d.ts +2 -0
  62. package/dist/components/app-shell/GroupRoute.d.ts.map +1 -0
  63. package/dist/components/app-shell/GroupRoute.js +22 -0
  64. package/dist/components/app-shell/GroupRoute.js.map +1 -0
  65. package/dist/components/app-shell/index.d.ts +3 -0
  66. package/dist/components/app-shell/index.d.ts.map +1 -0
  67. package/dist/components/app-shell/index.js +3 -0
  68. package/dist/components/app-shell/index.js.map +1 -0
  69. package/dist/components/authenticated-chat/index.d.ts +1 -2
  70. package/dist/components/authenticated-chat/index.d.ts.map +1 -1
  71. package/dist/components/authenticated-chat/index.js +1 -12
  72. package/dist/components/authenticated-chat/index.js.map +1 -1
  73. package/dist/components/chat-view/Chat.d.ts +2 -1
  74. package/dist/components/chat-view/Chat.d.ts.map +1 -1
  75. package/dist/components/chat-view/Chat.js +3 -2
  76. package/dist/components/chat-view/Chat.js.map +1 -1
  77. package/dist/components/chat-view/MessageItem.d.ts.map +1 -1
  78. package/dist/components/chat-view/MessageItem.js +4 -2
  79. package/dist/components/chat-view/MessageItem.js.map +1 -1
  80. package/dist/components/chat-view/tool-part-rendering.d.ts +1 -0
  81. package/dist/components/chat-view/tool-part-rendering.d.ts.map +1 -1
  82. package/dist/components/chat-view/tool-part-rendering.js +8 -1
  83. package/dist/components/chat-view/tool-part-rendering.js.map +1 -1
  84. package/dist/components/chip/index.d.ts +1 -0
  85. package/dist/components/chip/index.d.ts.map +1 -1
  86. package/dist/components/chip/index.js +2 -1
  87. package/dist/components/chip/index.js.map +1 -1
  88. package/dist/components/embedded-chat/index.d.ts +1 -1
  89. package/dist/components/embedded-chat/index.d.ts.map +1 -1
  90. package/dist/components/embedded-chat/index.js +1 -1
  91. package/dist/components/embedded-chat/index.js.map +1 -1
  92. package/dist/components/input/input-date-time.d.ts +6 -0
  93. package/dist/components/input/input-date-time.d.ts.map +1 -1
  94. package/dist/components/input/input-date-time.js +2 -1
  95. package/dist/components/input/input-date-time.js.map +1 -1
  96. package/dist/components/input/input-date.d.ts +22 -0
  97. package/dist/components/input/input-date.d.ts.map +1 -1
  98. package/dist/components/input/input-date.js +28 -14
  99. package/dist/components/input/input-date.js.map +1 -1
  100. package/dist/components/input/input-time.d.ts +9 -0
  101. package/dist/components/input/input-time.d.ts.map +1 -1
  102. package/dist/components/input/input-time.js +29 -18
  103. package/dist/components/input/input-time.js.map +1 -1
  104. package/dist/components/layouts/RouteLayout.d.ts +0 -9
  105. package/dist/components/layouts/RouteLayout.d.ts.map +1 -1
  106. package/dist/components/layouts/RouteLayout.js +7 -4
  107. package/dist/components/layouts/RouteLayout.js.map +1 -1
  108. package/dist/components/layouts/Sidebar.d.ts +1 -8
  109. package/dist/components/layouts/Sidebar.d.ts.map +1 -1
  110. package/dist/components/layouts/Sidebar.js +7 -14
  111. package/dist/components/layouts/Sidebar.js.map +1 -1
  112. package/dist/components/plan-limits/PlanLimitsDialog.d.ts +20 -0
  113. package/dist/components/plan-limits/PlanLimitsDialog.d.ts.map +1 -0
  114. package/dist/components/plan-limits/PlanLimitsDialog.js +109 -0
  115. package/dist/components/plan-limits/PlanLimitsDialog.js.map +1 -0
  116. package/dist/components/plan-limits/index.d.ts +4 -0
  117. package/dist/components/plan-limits/index.d.ts.map +1 -0
  118. package/dist/components/plan-limits/index.js +2 -0
  119. package/dist/components/plan-limits/index.js.map +1 -0
  120. package/dist/components/plan-limits/plan-limits-client.d.ts +15 -0
  121. package/dist/components/plan-limits/plan-limits-client.d.ts.map +1 -0
  122. package/dist/components/plan-limits/plan-limits-client.js +44 -0
  123. package/dist/components/plan-limits/plan-limits-client.js.map +1 -0
  124. package/dist/components/plan-limits/plan-limits-model.d.ts +66 -0
  125. package/dist/components/plan-limits/plan-limits-model.d.ts.map +1 -0
  126. package/dist/components/plan-limits/plan-limits-model.js +123 -0
  127. package/dist/components/plan-limits/plan-limits-model.js.map +1 -0
  128. package/dist/components/plan-limits/plan-limits-save.d.ts +31 -0
  129. package/dist/components/plan-limits/plan-limits-save.d.ts.map +1 -0
  130. package/dist/components/plan-limits/plan-limits-save.js +43 -0
  131. package/dist/components/plan-limits/plan-limits-save.js.map +1 -0
  132. package/dist/components/planning/PlanLimitsAction.d.ts +6 -0
  133. package/dist/components/planning/PlanLimitsAction.d.ts.map +1 -0
  134. package/dist/components/planning/PlanLimitsAction.js +19 -0
  135. package/dist/components/planning/PlanLimitsAction.js.map +1 -0
  136. package/dist/components/slider/index.d.ts.map +1 -1
  137. package/dist/components/slider/index.js +2 -1
  138. package/dist/components/slider/index.js.map +1 -1
  139. package/dist/datastore-picker/datastore-picker-rows.d.ts +7 -0
  140. package/dist/datastore-picker/datastore-picker-rows.d.ts.map +1 -1
  141. package/dist/datastore-picker/datastore-picker-rows.js +26 -22
  142. package/dist/datastore-picker/datastore-picker-rows.js.map +1 -1
  143. package/dist/globals.css +85 -2
  144. package/dist/hooks/use-action-plans-list.d.ts +3 -0
  145. package/dist/hooks/use-action-plans-list.d.ts.map +1 -1
  146. package/dist/hooks/use-action-plans-list.js +8 -9
  147. package/dist/hooks/use-action-plans-list.js.map +1 -1
  148. package/dist/hooks/use-activity-feed.d.ts +10 -1
  149. package/dist/hooks/use-activity-feed.d.ts.map +1 -1
  150. package/dist/hooks/use-activity-feed.js +9 -11
  151. package/dist/hooks/use-activity-feed.js.map +1 -1
  152. package/dist/hooks/use-entity.d.ts +4 -3
  153. package/dist/hooks/use-entity.d.ts.map +1 -1
  154. package/dist/hooks/use-entity.js +4 -4
  155. package/dist/hooks/use-entity.js.map +1 -1
  156. package/dist/hooks/use-manual-actions.d.ts +1 -1
  157. package/dist/hooks/use-manual-actions.d.ts.map +1 -1
  158. package/dist/hooks/use-manual-actions.js +5 -5
  159. package/dist/hooks/use-manual-actions.js.map +1 -1
  160. package/dist/hooks/use-unsaved-changes-warning.d.ts +2 -0
  161. package/dist/hooks/use-unsaved-changes-warning.d.ts.map +1 -0
  162. package/dist/hooks/use-unsaved-changes-warning.js +13 -0
  163. package/dist/hooks/use-unsaved-changes-warning.js.map +1 -0
  164. package/dist/hooks/useAuth.d.ts.map +1 -1
  165. package/dist/hooks/useAuth.js +4 -3
  166. package/dist/hooks/useAuth.js.map +1 -1
  167. package/dist/hooks/useChatPanelSync.d.ts.map +1 -1
  168. package/dist/hooks/useChatPanelSync.js +2 -3
  169. package/dist/hooks/useChatPanelSync.js.map +1 -1
  170. package/dist/hooks/useDatastoreSelection.d.ts.map +1 -1
  171. package/dist/hooks/useDatastoreSelection.js +11 -4
  172. package/dist/hooks/useDatastoreSelection.js.map +1 -1
  173. package/dist/hooks/useExecuteAction.d.ts +1 -0
  174. package/dist/hooks/useExecuteAction.d.ts.map +1 -1
  175. package/dist/hooks/useExecuteAction.js.map +1 -1
  176. package/dist/hooks/useLoginRedirect.d.ts +6 -0
  177. package/dist/hooks/useLoginRedirect.d.ts.map +1 -0
  178. package/dist/hooks/useLoginRedirect.js +51 -0
  179. package/dist/hooks/useLoginRedirect.js.map +1 -0
  180. package/dist/hooks/usePlanLimits.d.ts +18 -0
  181. package/dist/hooks/usePlanLimits.d.ts.map +1 -0
  182. package/dist/hooks/usePlanLimits.js +56 -0
  183. package/dist/hooks/usePlanLimits.js.map +1 -0
  184. package/dist/ldo-ui.d.ts +1 -1
  185. package/dist/ldo-ui.d.ts.map +1 -1
  186. package/dist/ldo-ui.js.map +1 -1
  187. package/dist/lib/app-tools.d.ts +18 -0
  188. package/dist/lib/app-tools.d.ts.map +1 -0
  189. package/dist/lib/app-tools.js +42 -0
  190. package/dist/lib/app-tools.js.map +1 -0
  191. package/dist/lib/chat-types.d.ts +3 -0
  192. package/dist/lib/chat-types.d.ts.map +1 -1
  193. package/dist/lib/chat-types.js.map +1 -1
  194. package/dist/lib/datastore-route-table.d.ts +3 -0
  195. package/dist/lib/datastore-route-table.d.ts.map +1 -1
  196. package/dist/lib/datastore-route-table.js +6 -0
  197. package/dist/lib/datastore-route-table.js.map +1 -1
  198. package/dist/lib/graphql-error.d.ts +2 -0
  199. package/dist/lib/graphql-error.d.ts.map +1 -0
  200. package/dist/lib/graphql-error.js +7 -0
  201. package/dist/lib/graphql-error.js.map +1 -0
  202. package/dist/lib/update-notice.d.ts +2 -1
  203. package/dist/lib/update-notice.d.ts.map +1 -1
  204. package/dist/lib/update-notice.js +8 -2
  205. package/dist/lib/update-notice.js.map +1 -1
  206. package/dist/providers/ActiveChatProvider.d.ts +2 -0
  207. package/dist/providers/ActiveChatProvider.d.ts.map +1 -1
  208. package/dist/providers/ActiveChatProvider.js +6 -3
  209. package/dist/providers/ActiveChatProvider.js.map +1 -1
  210. package/dist/providers/ActiveDatastoreProvider.d.ts +12 -0
  211. package/dist/providers/ActiveDatastoreProvider.d.ts.map +1 -1
  212. package/dist/providers/ActiveDatastoreProvider.js +114 -11
  213. package/dist/providers/ActiveDatastoreProvider.js.map +1 -1
  214. package/dist/providers/AuthContext.d.ts +1 -0
  215. package/dist/providers/AuthContext.d.ts.map +1 -1
  216. package/dist/providers/AuthContext.js.map +1 -1
  217. package/dist/providers/MantaClientProvider.d.ts.map +1 -1
  218. package/dist/providers/MantaClientProvider.js +3 -3
  219. package/dist/providers/MantaClientProvider.js.map +1 -1
  220. package/dist/providers/index.d.ts +3 -1
  221. package/dist/providers/index.d.ts.map +1 -1
  222. package/dist/providers/index.js +2 -2
  223. package/dist/providers/index.js.map +1 -1
  224. package/dist/routes/activity/detail/ActivityDetailRoute.d.ts.map +1 -1
  225. package/dist/routes/activity/detail/ActivityDetailRoute.js +1 -3
  226. package/dist/routes/activity/detail/ActivityDetailRoute.js.map +1 -1
  227. package/dist/routes/activity/index.d.ts.map +1 -1
  228. package/dist/routes/activity/index.js +1 -3
  229. package/dist/routes/activity/index.js.map +1 -1
  230. package/dist/routes/chat/index.d.ts +2 -21
  231. package/dist/routes/chat/index.d.ts.map +1 -1
  232. package/dist/routes/chat/index.js +4 -2
  233. package/dist/routes/chat/index.js.map +1 -1
  234. package/dist/routes/data-collection/index.d.ts.map +1 -1
  235. package/dist/routes/data-collection/index.js +1 -3
  236. package/dist/routes/data-collection/index.js.map +1 -1
  237. package/dist/routes/data-explorer/components/DataExplorerLayout.d.ts.map +1 -1
  238. package/dist/routes/data-explorer/components/DataExplorerLayout.js +1 -3
  239. package/dist/routes/data-explorer/components/DataExplorerLayout.js.map +1 -1
  240. package/dist/routes/data-explorer/components/class-detail/UsedByRules.js +2 -2
  241. package/dist/routes/data-explorer/components/class-detail/UsedByRules.js.map +1 -1
  242. package/dist/routes/datastores/index.d.ts.map +1 -1
  243. package/dist/routes/datastores/index.js +2 -2
  244. package/dist/routes/datastores/index.js.map +1 -1
  245. package/dist/routes/explain/index.d.ts.map +1 -1
  246. package/dist/routes/explain/index.js +1 -3
  247. package/dist/routes/explain/index.js.map +1 -1
  248. package/dist/routes/integrations/components/connect-forms/DashConnectForm.d.ts.map +1 -1
  249. package/dist/routes/integrations/components/connect-forms/DashConnectForm.js +0 -1
  250. package/dist/routes/integrations/components/connect-forms/DashConnectForm.js.map +1 -1
  251. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.d.ts.map +1 -1
  252. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js +0 -1
  253. package/dist/routes/integrations/components/connect-forms/GoogleAdsConnectForm.js.map +1 -1
  254. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.d.ts.map +1 -1
  255. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js +0 -1
  256. package/dist/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.js.map +1 -1
  257. package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.d.ts.map +1 -1
  258. package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.js +0 -1
  259. package/dist/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.js.map +1 -1
  260. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts +0 -1
  261. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.d.ts.map +1 -1
  262. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js +3 -2
  263. package/dist/routes/integrations/components/connect-forms/InferalCredentialConnectForm.js.map +1 -1
  264. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.d.ts.map +1 -1
  265. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js +0 -1
  266. package/dist/routes/integrations/components/connect-forms/KlaviyoConnectForm.js.map +1 -1
  267. package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.d.ts.map +1 -1
  268. package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.js +0 -1
  269. package/dist/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.js.map +1 -1
  270. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts +0 -1
  271. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.d.ts.map +1 -1
  272. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js +4 -3
  273. package/dist/routes/integrations/components/connect-forms/OAuthSetupConnectForm.js.map +1 -1
  274. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.d.ts.map +1 -1
  275. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js +0 -1
  276. package/dist/routes/integrations/components/connect-forms/TriplewhaleConnectForm.js.map +1 -1
  277. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.d.ts.map +1 -1
  278. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js +0 -1
  279. package/dist/routes/integrations/components/connect-forms/WoocommerceConnectForm.js.map +1 -1
  280. package/dist/routes/integrations/types.d.ts +2 -1
  281. package/dist/routes/integrations/types.d.ts.map +1 -1
  282. package/dist/routes/integrations/types.js +16 -0
  283. package/dist/routes/integrations/types.js.map +1 -1
  284. package/dist/routes/memories/components/DateValueInput.d.ts +16 -0
  285. package/dist/routes/memories/components/DateValueInput.d.ts.map +1 -0
  286. package/dist/routes/memories/components/DateValueInput.js +35 -0
  287. package/dist/routes/memories/components/DateValueInput.js.map +1 -0
  288. package/dist/routes/memories/components/EntityValuePicker.d.ts +11 -0
  289. package/dist/routes/memories/components/EntityValuePicker.d.ts.map +1 -0
  290. package/dist/routes/memories/components/EntityValuePicker.js +61 -0
  291. package/dist/routes/memories/components/EntityValuePicker.js.map +1 -0
  292. package/dist/routes/memories/components/FieldLabel.d.ts +12 -0
  293. package/dist/routes/memories/components/FieldLabel.d.ts.map +1 -0
  294. package/dist/routes/memories/components/FieldLabel.js +12 -0
  295. package/dist/routes/memories/components/FieldLabel.js.map +1 -0
  296. package/dist/routes/memories/components/ImportanceSlider.d.ts +2 -0
  297. package/dist/routes/memories/components/ImportanceSlider.d.ts.map +1 -1
  298. package/dist/routes/memories/components/ImportanceSlider.js +4 -1
  299. package/dist/routes/memories/components/ImportanceSlider.js.map +1 -1
  300. package/dist/routes/memories/components/MemoriesFilters.d.ts +2 -2
  301. package/dist/routes/memories/components/MemoriesFilters.d.ts.map +1 -1
  302. package/dist/routes/memories/components/MemoriesFilters.js.map +1 -1
  303. package/dist/routes/memories/components/MemoriesPanel.d.ts.map +1 -1
  304. package/dist/routes/memories/components/MemoriesPanel.js +4 -0
  305. package/dist/routes/memories/components/MemoriesPanel.js.map +1 -1
  306. package/dist/routes/memories/components/MemoriesTabPanel.d.ts +2 -2
  307. package/dist/routes/memories/components/MemoriesTabPanel.d.ts.map +1 -1
  308. package/dist/routes/memories/components/MemoryActions.d.ts +2 -0
  309. package/dist/routes/memories/components/MemoryActions.d.ts.map +1 -1
  310. package/dist/routes/memories/components/MemoryActions.js +3 -3
  311. package/dist/routes/memories/components/MemoryActions.js.map +1 -1
  312. package/dist/routes/memories/components/MemoryFields.d.ts +15 -3
  313. package/dist/routes/memories/components/MemoryFields.d.ts.map +1 -1
  314. package/dist/routes/memories/components/MemoryFields.js +34 -5
  315. package/dist/routes/memories/components/MemoryFields.js.map +1 -1
  316. package/dist/routes/memories/components/MemoryFormDialog.d.ts +6 -3
  317. package/dist/routes/memories/components/MemoryFormDialog.d.ts.map +1 -1
  318. package/dist/routes/memories/components/MemoryFormDialog.js +105 -59
  319. package/dist/routes/memories/components/MemoryFormDialog.js.map +1 -1
  320. package/dist/routes/memories/components/MemoryPropertyFields.d.ts +10 -0
  321. package/dist/routes/memories/components/MemoryPropertyFields.d.ts.map +1 -0
  322. package/dist/routes/memories/components/MemoryPropertyFields.js +67 -0
  323. package/dist/routes/memories/components/MemoryPropertyFields.js.map +1 -0
  324. package/dist/routes/memories/components/RuleDraftDialog.d.ts +7 -0
  325. package/dist/routes/memories/components/RuleDraftDialog.d.ts.map +1 -0
  326. package/dist/routes/memories/components/RuleDraftDialog.js +20 -0
  327. package/dist/routes/memories/components/RuleDraftDialog.js.map +1 -0
  328. package/dist/routes/memories/components/SchemasTab.d.ts +17 -2
  329. package/dist/routes/memories/components/SchemasTab.d.ts.map +1 -1
  330. package/dist/routes/memories/components/SchemasTab.js +146 -28
  331. package/dist/routes/memories/components/SchemasTab.js.map +1 -1
  332. package/dist/routes/memories/components/badges.d.ts +7 -0
  333. package/dist/routes/memories/components/badges.d.ts.map +1 -1
  334. package/dist/routes/memories/components/badges.js +11 -3
  335. package/dist/routes/memories/components/badges.js.map +1 -1
  336. package/dist/routes/memories/hooks/useMemoryColumns.d.ts +4 -2
  337. package/dist/routes/memories/hooks/useMemoryColumns.d.ts.map +1 -1
  338. package/dist/routes/memories/hooks/useMemoryColumns.js +31 -15
  339. package/dist/routes/memories/hooks/useMemoryColumns.js.map +1 -1
  340. package/dist/routes/memories/index.d.ts +2 -1
  341. package/dist/routes/memories/index.d.ts.map +1 -1
  342. package/dist/routes/memories/index.js +72 -30
  343. package/dist/routes/memories/index.js.map +1 -1
  344. package/dist/routes/memories/memory-mutation-input.d.ts.map +1 -1
  345. package/dist/routes/memories/memory-mutation-input.js +5 -2
  346. package/dist/routes/memories/memory-mutation-input.js.map +1 -1
  347. package/dist/routes/memories/memory-property-values.d.ts +13 -0
  348. package/dist/routes/memories/memory-property-values.d.ts.map +1 -0
  349. package/dist/routes/memories/memory-property-values.js +40 -0
  350. package/dist/routes/memories/memory-property-values.js.map +1 -0
  351. package/dist/routes/memories/schemas/AllowedValuesField.d.ts +14 -0
  352. package/dist/routes/memories/schemas/AllowedValuesField.d.ts.map +1 -0
  353. package/dist/routes/memories/schemas/AllowedValuesField.js +64 -0
  354. package/dist/routes/memories/schemas/AllowedValuesField.js.map +1 -0
  355. package/dist/routes/memories/schemas/MemorySchemaPage.d.ts +127 -0
  356. package/dist/routes/memories/schemas/MemorySchemaPage.d.ts.map +1 -0
  357. package/dist/routes/memories/schemas/MemorySchemaPage.js +285 -0
  358. package/dist/routes/memories/schemas/MemorySchemaPage.js.map +1 -0
  359. package/dist/routes/memories/schemas/SchemaChangeReviewDialog.d.ts +20 -0
  360. package/dist/routes/memories/schemas/SchemaChangeReviewDialog.d.ts.map +1 -0
  361. package/dist/routes/memories/schemas/SchemaChangeReviewDialog.js +54 -0
  362. package/dist/routes/memories/schemas/SchemaChangeReviewDialog.js.map +1 -0
  363. package/dist/routes/memories/schemas/SchemaConfirmDialog.d.ts +15 -0
  364. package/dist/routes/memories/schemas/SchemaConfirmDialog.d.ts.map +1 -0
  365. package/dist/routes/memories/schemas/SchemaConfirmDialog.js +8 -0
  366. package/dist/routes/memories/schemas/SchemaConfirmDialog.js.map +1 -0
  367. package/dist/routes/memories/schemas/SchemaDetailPage.d.ts +15 -0
  368. package/dist/routes/memories/schemas/SchemaDetailPage.d.ts.map +1 -0
  369. package/dist/routes/memories/schemas/SchemaDetailPage.js +74 -0
  370. package/dist/routes/memories/schemas/SchemaDetailPage.js.map +1 -0
  371. package/dist/routes/memories/schemas/SchemaEditorForm.d.ts +10 -0
  372. package/dist/routes/memories/schemas/SchemaEditorForm.d.ts.map +1 -0
  373. package/dist/routes/memories/schemas/SchemaEditorForm.js +242 -0
  374. package/dist/routes/memories/schemas/SchemaEditorForm.js.map +1 -0
  375. package/dist/routes/memories/schemas/SchemaTemplatesDialog.d.ts +13 -0
  376. package/dist/routes/memories/schemas/SchemaTemplatesDialog.d.ts.map +1 -0
  377. package/dist/routes/memories/schemas/SchemaTemplatesDialog.js +13 -0
  378. package/dist/routes/memories/schemas/SchemaTemplatesDialog.js.map +1 -0
  379. package/dist/routes/memories/schemas/ValueTypeSelect.d.ts +12 -0
  380. package/dist/routes/memories/schemas/ValueTypeSelect.d.ts.map +1 -0
  381. package/dist/routes/memories/schemas/ValueTypeSelect.js +10 -0
  382. package/dist/routes/memories/schemas/ValueTypeSelect.js.map +1 -0
  383. package/dist/routes/memories/schemas/schema-form.d.ts +72 -0
  384. package/dist/routes/memories/schemas/schema-form.d.ts.map +1 -0
  385. package/dist/routes/memories/schemas/schema-form.js +279 -0
  386. package/dist/routes/memories/schemas/schema-form.js.map +1 -0
  387. package/dist/routes/memories/schemas/schema-impact.d.ts +13 -0
  388. package/dist/routes/memories/schemas/schema-impact.d.ts.map +1 -0
  389. package/dist/routes/memories/schemas/schema-impact.js +40 -0
  390. package/dist/routes/memories/schemas/schema-impact.js.map +1 -0
  391. package/dist/routes/memories/schemas/schema-route.d.ts +18 -0
  392. package/dist/routes/memories/schemas/schema-route.d.ts.map +1 -0
  393. package/dist/routes/memories/schemas/schema-route.js +21 -0
  394. package/dist/routes/memories/schemas/schema-route.js.map +1 -0
  395. package/dist/routes/memories/schemas/schema-rule-context.d.ts +17 -0
  396. package/dist/routes/memories/schemas/schema-rule-context.d.ts.map +1 -0
  397. package/dist/routes/memories/schemas/schema-rule-context.js +83 -0
  398. package/dist/routes/memories/schemas/schema-rule-context.js.map +1 -0
  399. package/dist/routes/memories/schemas/schema-table.d.ts +11 -0
  400. package/dist/routes/memories/schemas/schema-table.d.ts.map +1 -0
  401. package/dist/routes/memories/schemas/schema-table.js +34 -0
  402. package/dist/routes/memories/schemas/schema-table.js.map +1 -0
  403. package/dist/routes/memories/schemas/useMemorySchemaMutations.d.ts +32 -0
  404. package/dist/routes/memories/schemas/useMemorySchemaMutations.d.ts.map +1 -0
  405. package/dist/routes/memories/schemas/useMemorySchemaMutations.js +31 -0
  406. package/dist/routes/memories/schemas/useMemorySchemaMutations.js.map +1 -0
  407. package/dist/routes/memories/schemas/useSchemaChangeReview.d.ts +51 -0
  408. package/dist/routes/memories/schemas/useSchemaChangeReview.d.ts.map +1 -0
  409. package/dist/routes/memories/schemas/useSchemaChangeReview.js +175 -0
  410. package/dist/routes/memories/schemas/useSchemaChangeReview.js.map +1 -0
  411. package/dist/routes/memories/schemas/useSchemaLifecycle.d.ts +46 -0
  412. package/dist/routes/memories/schemas/useSchemaLifecycle.d.ts.map +1 -0
  413. package/dist/routes/memories/schemas/useSchemaLifecycle.js +93 -0
  414. package/dist/routes/memories/schemas/useSchemaLifecycle.js.map +1 -0
  415. package/dist/routes/memories/schemas/useSchemasTab.d.ts +18 -0
  416. package/dist/routes/memories/schemas/useSchemasTab.d.ts.map +1 -0
  417. package/dist/routes/memories/schemas/useSchemasTab.js +92 -0
  418. package/dist/routes/memories/schemas/useSchemasTab.js.map +1 -0
  419. package/dist/routes/plans/index.d.ts.map +1 -1
  420. package/dist/routes/plans/index.js +2 -2
  421. package/dist/routes/plans/index.js.map +1 -1
  422. package/dist/routes/rules/components/CreateRuleChatModal.d.ts +7 -1
  423. package/dist/routes/rules/components/CreateRuleChatModal.d.ts.map +1 -1
  424. package/dist/routes/rules/components/CreateRuleChatModal.js +9 -4
  425. package/dist/routes/rules/components/CreateRuleChatModal.js.map +1 -1
  426. package/dist/routes/rules/components/RuleValueControls.d.ts.map +1 -1
  427. package/dist/routes/rules/components/RuleValueControls.js +3 -24
  428. package/dist/routes/rules/components/RuleValueControls.js.map +1 -1
  429. package/dist/routes/rules/components/rule-value-input.d.ts +11 -0
  430. package/dist/routes/rules/components/rule-value-input.d.ts.map +1 -0
  431. package/dist/routes/rules/components/rule-value-input.js +24 -0
  432. package/dist/routes/rules/components/rule-value-input.js.map +1 -0
  433. package/dist/routes/rules/components/rules.utils.d.ts +5 -0
  434. package/dist/routes/rules/components/rules.utils.d.ts.map +1 -1
  435. package/dist/routes/rules/components/rules.utils.js +18 -3
  436. package/dist/routes/rules/components/rules.utils.js.map +1 -1
  437. package/dist/routes/rules/pages.d.ts +1 -1
  438. package/dist/routes/rules/pages.d.ts.map +1 -1
  439. package/dist/routes/rules/pages.js +1 -1
  440. package/dist/routes/rules/pages.js.map +1 -1
  441. package/dist/shared/graph-derived-queries.d.ts.map +1 -1
  442. package/dist/shared/graph-derived-queries.js +4 -1
  443. package/dist/shared/graph-derived-queries.js.map +1 -1
  444. package/dist/worker/index.d.ts +22 -0
  445. package/dist/worker/index.d.ts.map +1 -0
  446. package/dist/worker/index.js +110 -0
  447. package/dist/worker/index.js.map +1 -0
  448. package/dist/worker/policy.d.ts +21 -0
  449. package/dist/worker/policy.d.ts.map +1 -0
  450. package/dist/worker/policy.js +42 -0
  451. package/dist/worker/policy.js.map +1 -0
  452. package/dist/worker/proxy.d.ts +14 -0
  453. package/dist/worker/proxy.d.ts.map +1 -0
  454. package/dist/worker/proxy.js +58 -0
  455. package/dist/worker/proxy.js.map +1 -0
  456. package/dist/worker/session.d.ts +24 -0
  457. package/dist/worker/session.d.ts.map +1 -0
  458. package/dist/worker/session.js +72 -0
  459. package/dist/worker/session.js.map +1 -0
  460. package/package.json +52 -7
  461. package/src/app-subpaths.json +9 -1
  462. package/src/components/AppErrorBoundary.tsx +14 -11
  463. package/src/components/app-gate/AppGate.tsx +122 -0
  464. package/src/components/app-gate/AwaitingDatastoreStatus.tsx +35 -0
  465. package/src/components/app-gate/EnterDatastoreRoute.tsx +30 -0
  466. package/src/components/app-gate/ErrorRoute.tsx +43 -0
  467. package/src/components/app-gate/FailureAlert.tsx +15 -0
  468. package/src/components/app-gate/NoDatastoreAccess.tsx +26 -0
  469. package/src/components/app-gate/NotFoundRoute.tsx +20 -0
  470. package/src/components/app-gate/PendingInvitations.tsx +134 -0
  471. package/src/components/app-gate/ServiceError.tsx +27 -0
  472. package/src/components/app-gate/index.ts +2 -0
  473. package/src/components/app-gate/sdk-route-elements.tsx +46 -0
  474. package/src/components/app-shell/AppShell.tsx +22 -0
  475. package/src/components/app-shell/AppShellRoutes.tsx +34 -0
  476. package/src/components/app-shell/GroupDatastores.tsx +28 -0
  477. package/src/components/app-shell/GroupRoute.tsx +34 -0
  478. package/src/components/app-shell/index.ts +2 -0
  479. package/src/components/authenticated-chat/index.tsx +1 -34
  480. package/src/components/chat-view/Chat.tsx +9 -3
  481. package/src/components/chat-view/MessageItem.tsx +10 -2
  482. package/src/components/chat-view/tool-part-rendering.ts +10 -1
  483. package/src/components/chip/index.tsx +8 -1
  484. package/src/components/embedded-chat/index.tsx +2 -1
  485. package/src/components/input/input-date-time.tsx +10 -3
  486. package/src/components/input/input-date.tsx +93 -21
  487. package/src/components/input/input-time.tsx +59 -26
  488. package/src/components/layouts/RouteLayout.tsx +11 -50
  489. package/src/components/layouts/Sidebar.tsx +21 -23
  490. package/src/components/plan-limits/PlanLimitsDialog.tsx +331 -0
  491. package/src/components/plan-limits/index.tsx +3 -0
  492. package/src/components/plan-limits/plan-limits-client.ts +71 -0
  493. package/src/components/plan-limits/plan-limits-model.ts +180 -0
  494. package/src/components/plan-limits/plan-limits-save.ts +68 -0
  495. package/src/components/planning/PlanLimitsAction.tsx +44 -0
  496. package/src/components/slider/index.tsx +2 -1
  497. package/src/datastore-picker/datastore-picker-rows.ts +36 -20
  498. package/src/hooks/use-action-plans-list.ts +20 -12
  499. package/src/hooks/use-activity-feed.ts +30 -14
  500. package/src/hooks/use-entity.ts +11 -6
  501. package/src/hooks/use-manual-actions.ts +11 -6
  502. package/src/hooks/use-unsaved-changes-warning.ts +12 -0
  503. package/src/hooks/useAuth.ts +5 -3
  504. package/src/hooks/useChatPanelSync.ts +2 -3
  505. package/src/hooks/useDatastoreSelection.ts +10 -4
  506. package/src/hooks/useExecuteAction.ts +2 -0
  507. package/src/hooks/useLoginRedirect.ts +66 -0
  508. package/src/hooks/usePlanLimits.ts +97 -0
  509. package/src/ldo-ui.ts +1 -0
  510. package/src/lib/app-tools.ts +63 -0
  511. package/src/lib/chat-types.ts +5 -0
  512. package/src/lib/datastore-route-table.ts +9 -0
  513. package/src/lib/graphql-error.ts +7 -0
  514. package/src/lib/update-notice.ts +12 -2
  515. package/src/providers/ActiveChatProvider.tsx +8 -3
  516. package/src/providers/ActiveDatastoreProvider.tsx +179 -9
  517. package/src/providers/AuthContext.ts +1 -0
  518. package/src/providers/MantaClientProvider.tsx +8 -3
  519. package/src/providers/index.tsx +7 -4
  520. package/src/routes/activity/detail/ActivityDetailRoute.tsx +1 -10
  521. package/src/routes/activity/index.tsx +1 -10
  522. package/src/routes/chat/index.tsx +11 -47
  523. package/src/routes/data-collection/index.tsx +1 -11
  524. package/src/routes/data-explorer/components/DataExplorerLayout.tsx +1 -11
  525. package/src/routes/data-explorer/components/class-detail/UsedByRules.tsx +2 -2
  526. package/src/routes/datastores/index.tsx +3 -9
  527. package/src/routes/explain/index.tsx +1 -11
  528. package/src/routes/integrations/components/connect-forms/DashConnectForm.tsx +0 -1
  529. package/src/routes/integrations/components/connect-forms/GoogleAdsConnectForm.tsx +0 -1
  530. package/src/routes/integrations/components/connect-forms/GoogleAnalyticsConnectForm.tsx +0 -1
  531. package/src/routes/integrations/components/connect-forms/GoogleMerchantCenterConnectForm.tsx +0 -1
  532. package/src/routes/integrations/components/connect-forms/InferalCredentialConnectForm.tsx +5 -3
  533. package/src/routes/integrations/components/connect-forms/KlaviyoConnectForm.tsx +0 -1
  534. package/src/routes/integrations/components/connect-forms/MicrosoftAdsConnectForm.tsx +0 -1
  535. package/src/routes/integrations/components/connect-forms/OAuthSetupConnectForm.tsx +7 -7
  536. package/src/routes/integrations/components/connect-forms/TriplewhaleConnectForm.tsx +0 -1
  537. package/src/routes/integrations/components/connect-forms/WoocommerceConnectForm.tsx +0 -1
  538. package/src/routes/integrations/types.ts +22 -6
  539. package/src/routes/memories/components/DateValueInput.tsx +72 -0
  540. package/src/routes/memories/components/EntityValuePicker.tsx +132 -0
  541. package/src/routes/memories/components/FieldLabel.tsx +49 -0
  542. package/src/routes/memories/components/ImportanceSlider.tsx +5 -1
  543. package/src/routes/memories/components/MemoriesFilters.tsx +2 -2
  544. package/src/routes/memories/components/MemoriesPanel.tsx +7 -3
  545. package/src/routes/memories/components/MemoriesTabPanel.tsx +2 -2
  546. package/src/routes/memories/components/MemoryActions.tsx +26 -2
  547. package/src/routes/memories/components/MemoryFields.tsx +75 -12
  548. package/src/routes/memories/components/MemoryFormDialog.tsx +305 -199
  549. package/src/routes/memories/components/MemoryPropertyFields.tsx +288 -0
  550. package/src/routes/memories/components/RuleDraftDialog.tsx +35 -0
  551. package/src/routes/memories/components/SchemasTab.tsx +481 -118
  552. package/src/routes/memories/components/badges.tsx +16 -4
  553. package/src/routes/memories/hooks/useMemoryColumns.tsx +69 -35
  554. package/src/routes/memories/index.tsx +125 -51
  555. package/src/routes/memories/memory-mutation-input.ts +5 -2
  556. package/src/routes/memories/memory-property-values.ts +83 -0
  557. package/src/routes/memories/schemas/AllowedValuesField.tsx +188 -0
  558. package/src/routes/memories/schemas/MemorySchemaPage.tsx +476 -0
  559. package/src/routes/memories/schemas/SchemaChangeReviewDialog.tsx +290 -0
  560. package/src/routes/memories/schemas/SchemaConfirmDialog.tsx +62 -0
  561. package/src/routes/memories/schemas/SchemaDetailPage.tsx +373 -0
  562. package/src/routes/memories/schemas/SchemaEditorForm.tsx +990 -0
  563. package/src/routes/memories/schemas/SchemaTemplatesDialog.tsx +81 -0
  564. package/src/routes/memories/schemas/ValueTypeSelect.tsx +37 -0
  565. package/src/routes/memories/schemas/schema-form.ts +360 -0
  566. package/src/routes/memories/schemas/schema-impact.ts +66 -0
  567. package/src/routes/memories/schemas/schema-route.ts +30 -0
  568. package/src/routes/memories/schemas/schema-rule-context.ts +103 -0
  569. package/src/routes/memories/schemas/schema-table.ts +54 -0
  570. package/src/routes/memories/schemas/useMemorySchemaMutations.ts +49 -0
  571. package/src/routes/memories/schemas/useSchemaChangeReview.ts +238 -0
  572. package/src/routes/memories/schemas/useSchemaLifecycle.tsx +151 -0
  573. package/src/routes/memories/schemas/useSchemasTab.ts +119 -0
  574. package/src/routes/plans/index.tsx +3 -14
  575. package/src/routes/rules/components/CreateRuleChatModal.tsx +46 -22
  576. package/src/routes/rules/components/RuleValueControls.tsx +3 -35
  577. package/src/routes/rules/components/rule-value-input.ts +34 -0
  578. package/src/routes/rules/components/rules.utils.ts +25 -3
  579. package/src/routes/rules/pages.ts +5 -1
  580. package/src/shared/graph-derived-queries.ts +6 -0
  581. package/src/themes/manta-dark.css +4 -0
  582. package/src/worker/index.ts +175 -0
  583. package/src/worker/policy.ts +62 -0
  584. package/src/worker/proxy.ts +101 -0
  585. package/src/worker/session.ts +111 -0
@@ -0,0 +1,63 @@
1
+ import type { AITool, OnToolCallCallback } from "@cloudflare/think/react";
2
+ import { requestUserInputToolName } from "@manta-eu/client/shared/questionnaire";
3
+ import { isPresent } from "@manta-eu/lib/present";
4
+
5
+ /** A tool the host app lends the agent. It runs in the browser, with the app's own access. */
6
+ export type AppTool<Input = never, Output = unknown> = Required<
7
+ Pick<AITool<Input, Output>, "description" | "parameters">
8
+ > & {
9
+ execute: (input: Input) => Output | Promise<Output>;
10
+ };
11
+
12
+ // oxlint-disable-next-line typescript/no-explicit-any -- each tool narrows its own input
13
+ export type AppTools = Record<string, AppTool<any>>;
14
+
15
+ type AppToolChatOptions = { tools?: AppTools; onToolCall?: OnToolCallCallback; body?: { clientTools: [] } };
16
+
17
+ type AppToolCallEvent = Parameters<OnToolCallCallback>[0];
18
+
19
+ // The pattern the model providers accept for a tool name.
20
+ const validToolName = /^[a-zA-Z0-9_-]{1,64}$/;
21
+
22
+ // The chat runs onToolCall for the agent's own tool calls too, so an app tool must not share a name with one.
23
+ const reservedToolNames = new Set([requestUserInputToolName]);
24
+
25
+ export function appToolChatOptions(appTools: AppTools | undefined): AppToolChatOptions {
26
+ // Think keeps the last tools a chat sent until a request sends an empty list.
27
+ if (!isPresent(appTools)) return { body: { clientTools: [] } };
28
+
29
+ refuseInvalidToolNames(appTools);
30
+ return { tools: appTools, onToolCall: (event) => runAppToolCall(appTools, event) };
31
+ }
32
+
33
+ export async function runAppToolCall(appTools: AppTools, event: AppToolCallEvent): Promise<void> {
34
+ const { toolCall, addToolOutput } = event;
35
+ const tool = appToolNamed(appTools, toolCall.toolName);
36
+ if (!isPresent(tool)) return;
37
+
38
+ try {
39
+ addToolOutput({ toolCallId: toolCall.toolCallId, output: await tool.execute(toolCall.input as never) });
40
+ } catch (error) {
41
+ // An "output-error" result ends the turn, so the agent gets the error as a normal output and can continue.
42
+ const errorText = error instanceof Error ? error.message : String(error);
43
+ addToolOutput({ toolCallId: toolCall.toolCallId, output: { error: errorText } });
44
+ }
45
+ }
46
+
47
+ function refuseInvalidToolNames(appTools: AppTools): void {
48
+ const names = Object.keys(appTools);
49
+
50
+ const invalid = names.find((name) => !validToolName.test(name));
51
+ if (invalid !== undefined) {
52
+ throw new Error(`The app tool name "${invalid}" is not valid. Use 1 to 64 letters, digits, underscores or dashes.`);
53
+ }
54
+
55
+ const reserved = names.find((name) => reservedToolNames.has(name));
56
+ if (reserved !== undefined) {
57
+ throw new Error(`The app tool name "${reserved}" is reserved for the agent's own tool.`);
58
+ }
59
+ }
60
+
61
+ function appToolNamed(appTools: AppTools, name: string): AppTools[string] | undefined {
62
+ return Object.hasOwn(appTools, name) ? appTools[name] : undefined;
63
+ }
@@ -19,6 +19,10 @@ import type { PageContext } from "@manta-eu/client/shared/page-context";
19
19
 
20
20
  export type { PageContext };
21
21
 
22
+ import type { AppTool, AppTools } from "#lib/app-tools";
23
+
24
+ export type { AppTool, AppTools };
25
+
22
26
  export type CopilotMenuDefaults = {
23
27
  openInManta: ReactNode | null;
24
28
  debugMessages: ReactNode | null;
@@ -55,6 +59,7 @@ export type AuthenticatedChatProps = {
55
59
  collapsible?: boolean;
56
60
  isCollapsed?: boolean;
57
61
  pageContext?: PageContext;
62
+ appTools?: AppTools;
58
63
  mode?: ConversationMode;
59
64
  allowedModels?: MantaModelId[];
60
65
  initialPrompt?: string;
@@ -11,10 +11,13 @@ export type RouteElements = {
11
11
  Explain?: ReactNode;
12
12
  Streams?: ReactNode;
13
13
  Datastores?: ReactNode;
14
+ Group?: ReactNode;
14
15
  Memories?: ReactNode;
15
16
  Activity?: ReactNode;
16
17
  ActivityDetail?: ReactNode;
17
18
  Integrations?: ReactNode;
19
+ IntegrationsMcp?: ReactNode;
20
+ IntegrationsMcpServer?: ReactNode;
18
21
  ShopifyConnect?: ReactNode;
19
22
  Team?: ReactNode;
20
23
  CustomApps?: ReactNode;
@@ -48,6 +51,7 @@ export const notFoundRoutePath = "*";
48
51
 
49
52
  export const globalRoutes: RouteDefinition[] = [
50
53
  { path: "/datastores", render: (e) => e.Datastores || notFoundElement(e) },
54
+ { path: "/g/:group", render: (e) => e.Group || notFoundElement(e) },
51
55
  // Global, not datastore-scoped: Shopify sends the merchant here before any datastore is known.
52
56
  { path: "/shopify/connect", render: (e) => e.ShopifyConnect || notFoundElement(e) },
53
57
  { path: "/custom-apps", render: (e) => e.CustomApps || notFoundElement(e) },
@@ -64,9 +68,14 @@ export const datastoreRoutes: RouteDefinition[] = [
64
68
  { path: "/explain", render: (e) => e.Explain || e.Chat },
65
69
  { path: "/streams", render: (e) => e.Streams || notFoundElement(e) },
66
70
  { path: "/memories", render: (e) => e.Memories || e.Chat },
71
+ { path: "/memories/schemas/new", render: (e) => e.Memories || e.Chat },
72
+ { path: "/memories/schemas/:schemaName", render: (e) => e.Memories || e.Chat },
73
+ { path: "/memories/schemas/:schemaName/edit", render: (e) => e.Memories || e.Chat },
67
74
  { path: "/activity", render: (e) => e.Activity || notFoundElement(e) },
68
75
  { path: "/activity/:id", render: (e) => e.ActivityDetail || notFoundElement(e) },
69
76
  { path: "/integrations", render: (e) => e.Integrations || e.Chat },
77
+ { path: "/integrations/mcp", render: (e) => e.IntegrationsMcp || notFoundElement(e) },
78
+ { path: "/integrations/mcp/:serverId", render: (e) => e.IntegrationsMcpServer || notFoundElement(e) },
70
79
  { path: "/team", render: (e) => e.Team || notFoundElement(e) },
71
80
  {
72
81
  path: "/data",
@@ -0,0 +1,7 @@
1
+ import { ClientError } from "graphql-request";
2
+
3
+ export function graphqlErrorMessage(error: unknown, fallback: string): string {
4
+ if (error instanceof ClientError) return error.response.errors?.[0]?.message ?? fallback;
5
+
6
+ return error instanceof Error ? error.message : fallback;
7
+ }
@@ -22,6 +22,14 @@ export type Channel = "none" | "toast" | "screen";
22
22
 
23
23
  let shown: Channel = "none";
24
24
 
25
+ const defaultAppName = "Manta";
26
+
27
+ let appName = defaultAppName;
28
+
29
+ export function updateNoticeAppName() {
30
+ return appName;
31
+ }
32
+
25
33
  export function announceUpdate(channel: Exclude<Channel, "none">) {
26
34
  if (channel === "screen") {
27
35
  if (shown === "toast") toast.dismiss(noticeId);
@@ -35,7 +43,7 @@ export function announceUpdate(channel: Exclude<Channel, "none">) {
35
43
 
36
44
  shown = "toast";
37
45
 
38
- toast("A new version of Manta is available", {
46
+ toast(`A new version of ${appName} is available`, {
39
47
  id: noticeId,
40
48
  description: "Parts of the app can't load until you reload the page.",
41
49
  duration: Number.POSITIVE_INFINITY,
@@ -44,7 +52,9 @@ export function announceUpdate(channel: Exclude<Channel, "none">) {
44
52
  });
45
53
  }
46
54
 
47
- export function installUpdateNotice() {
55
+ export function installUpdateNotice(name = defaultAppName) {
56
+ appName = name;
57
+
48
58
  window.addEventListener("vite:preloadError", () => {
49
59
  announceUpdate("toast");
50
60
  });
@@ -12,6 +12,7 @@ import { createChatReconnectRecoveryTracker } from "./chat-reconnect-recovery";
12
12
  import { useChatSocketAuth, useChatTokenRefresh } from "./chat-socket-auth";
13
13
  import { prepareThinkChatSendRequest } from "./think-chat-request";
14
14
  import { useGraphRefreshAfterTurn } from "#hooks/use-graph-refresh-after-turn";
15
+ import { appToolChatOptions, type AppTools } from "#lib/app-tools";
15
16
 
16
17
  export type { ActiveChatConnectionState } from "./chat-connection-lifecycle";
17
18
 
@@ -29,8 +30,8 @@ export function useActiveChatConnection(): ActiveChatConnectionContextValue | un
29
30
  return useContext(ActiveChatConnectionContext);
30
31
  }
31
32
 
32
- export function ActiveChatProvider(props: { children: ReactNode }) {
33
- const { children } = props;
33
+ export function ActiveChatProvider(props: { appTools?: AppTools; children: ReactNode }) {
34
+ const { appTools, children } = props;
34
35
  const { session } = useChatManagerContext();
35
36
  const recoveredResponsesRef = useRef(new Set<string>());
36
37
  const [sessionGeneration, setSessionGeneration] = useState(0);
@@ -58,6 +59,7 @@ export function ActiveChatProvider(props: { children: ReactNode }) {
58
59
  key={`${session.activeConversationId}:${sessionGeneration}`}
59
60
  conversationId={session.activeConversationId}
60
61
  session={session}
62
+ appTools={appTools}
61
63
  onStaleTerminalResponse={recoverStaleTerminalResponse}
62
64
  >
63
65
  {children}
@@ -68,12 +70,13 @@ export function ActiveChatProvider(props: { children: ReactNode }) {
68
70
  type ThinkChatSessionProps = {
69
71
  conversationId: string;
70
72
  session: ThinkChatSessionConfig;
73
+ appTools: AppTools | undefined;
71
74
  onStaleTerminalResponse: (assistantMessageId: string) => void;
72
75
  children: ReactNode;
73
76
  };
74
77
 
75
78
  function ThinkChatSession(props: ThinkChatSessionProps) {
76
- const { conversationId, session, onStaleTerminalResponse, children } = props;
79
+ const { conversationId, session, appTools, onStaleTerminalResponse, children } = props;
77
80
  const { host, datastoreQuery, messageHandoff, consumeMessageHandoff } = session;
78
81
  const wasCompactingRef = useRef(false);
79
82
  const sentHandoffMessageIdRef = useRef<string | undefined>(undefined);
@@ -117,12 +120,14 @@ function ThinkChatSession(props: ThinkChatSessionProps) {
117
120
  });
118
121
  useChatTokenRefresh(childAgent);
119
122
 
123
+ const appToolOptions = useMemo(() => appToolChatOptions(appTools), [appTools]);
120
124
  const chatData = useAgentChat<ThinkChatState, ChatUIMessage>({
121
125
  agent: childAgent,
122
126
  credentials: socketAuth.credentials,
123
127
  getInitialMessages: null,
124
128
  prepareSendMessagesRequest: prepareThinkChatSendRequest,
125
129
  resume: true,
130
+ ...appToolOptions,
126
131
  });
127
132
 
128
133
  useGraphRefreshAfterTurn(chatData.isStreaming);
@@ -1,7 +1,18 @@
1
1
  import { datastoreBasename, parseDatastorePath, withDatastorePrefix } from "@manta-eu/client/shared/datastore-path";
2
- import { createContext, use, useCallback, useLayoutEffect, useMemo, useState, type ReactNode } from "react";
2
+ import {
3
+ createContext,
4
+ use,
5
+ useCallback,
6
+ useEffect,
7
+ useLayoutEffect,
8
+ useMemo,
9
+ useRef,
10
+ useState,
11
+ type ReactNode,
12
+ } from "react";
3
13
  import {
4
14
  createPath,
15
+ NavigationType as NavigationAction,
5
16
  Router,
6
17
  UNSAFE_createBrowserHistory as createBrowserHistory,
7
18
  useNavigate,
@@ -17,7 +28,31 @@ export type ActiveDatastoreState = {
17
28
  navigateAbsolute: (path: string, options?: { replace?: boolean }) => void;
18
29
  };
19
30
 
20
- type RouterState = { history: ReturnType<typeof createBrowserHistory>; action: NavigationType; location: Location };
31
+ type BrowserHistory = ReturnType<typeof createBrowserHistory>;
32
+
33
+ type RouterState = { history: BrowserHistory; navigator: Navigator; action: NavigationType; location: Location };
34
+
35
+ type Navigator = Pick<BrowserHistory, "createHref" | "encodeLocation" | "go" | "push" | "replace">;
36
+
37
+ type NavigationGuard = {
38
+ hold: () => () => void;
39
+ pending: boolean;
40
+ proceed: () => void;
41
+ reset: () => void;
42
+ bypass: (navigation: () => void) => void;
43
+ confirmLeave: () => Promise<boolean>;
44
+ };
45
+
46
+ type HeldNavigation = { resume: () => void; cancel?: () => void };
47
+
48
+ const NavigationGuardContext = createContext<NavigationGuard>({
49
+ hold: () => () => {},
50
+ pending: false,
51
+ proceed: () => {},
52
+ reset: () => {},
53
+ bypass: (navigation) => navigation(),
54
+ confirmLeave: async () => true,
55
+ });
21
56
 
22
57
  const ActiveDatastoreContext = createContext<ActiveDatastoreState>({
23
58
  datastoreId: undefined,
@@ -44,17 +79,124 @@ export function ActiveDatastoreProvider(props: ActiveDatastoreProviderProps) {
44
79
  action: history.action,
45
80
  location: history.location,
46
81
  }));
82
+ const holds = useRef(0);
83
+ const bypassing = useRef(false);
84
+ const passingDelta = useRef<number | null>(null);
85
+ const revertingPop = useRef(false);
86
+ const heldRef = useRef<HeldNavigation | null>(null);
87
+ const [held, setHeld] = useState<HeldNavigation | null>(null);
88
+
89
+ const replaceHeld = useCallback((next: HeldNavigation | null) => {
90
+ const previous = heldRef.current;
91
+ heldRef.current = next;
92
+ setHeld(next);
93
+ return previous;
94
+ }, []);
95
+
96
+ const attempt = useCallback(
97
+ (navigation: () => void) => {
98
+ if (holds.current > 0 && !bypassing.current) replaceHeld({ resume: navigation })?.cancel?.();
99
+ else navigation();
100
+ },
101
+ [replaceHeld],
102
+ );
103
+
104
+ // A bypassed step lands on a later popstate, so the next update passes only if it moves by the same delta.
105
+ const step = useCallback(
106
+ (delta: number) => {
107
+ if (bypassing.current) passingDelta.current = delta;
108
+ history.go(delta);
109
+ },
110
+ [history],
111
+ );
112
+
113
+ // A back or forward step has already moved the URL, so a held one is stepped back first and replayed on proceed.
114
+ useLayoutEffect(
115
+ () =>
116
+ history.listen((update) => {
117
+ if (revertingPop.current) {
118
+ revertingPop.current = false;
119
+ return;
120
+ }
121
+ const passing = passingDelta.current;
122
+ passingDelta.current = null;
123
+ if (update.action === NavigationAction.Pop && holds.current > 0 && update.delta && update.delta !== passing) {
124
+ const { delta } = update;
125
+ revertingPop.current = true;
126
+ history.go(-delta);
127
+ replaceHeld({ resume: () => step(delta) })?.cancel?.();
128
+ return;
129
+ }
130
+ setRouterState(update);
131
+ }),
132
+ [history, replaceHeld, step],
133
+ );
47
134
 
48
- useLayoutEffect(() => history.listen(setRouterState), [history]);
135
+ const navigator = useMemo<Navigator>(
136
+ () => ({
137
+ createHref: history.createHref,
138
+ encodeLocation: history.encodeLocation,
139
+ go: (delta) => attempt(() => step(delta)),
140
+ push: (to, state) => attempt(() => history.push(to, state)),
141
+ replace: (to, state) => attempt(() => history.replace(to, state)),
142
+ }),
143
+ [history, attempt, step],
144
+ );
145
+
146
+ const bypass = useCallback((navigation: () => void) => {
147
+ bypassing.current = true;
148
+ try {
149
+ navigation();
150
+ } finally {
151
+ bypassing.current = false;
152
+ }
153
+ }, []);
154
+
155
+ // For a caller that must act before it navigates, such as switching the session's datastore.
156
+ const confirmLeave = useCallback(
157
+ () =>
158
+ holds.current > 0
159
+ ? new Promise<boolean>((resolve) => {
160
+ replaceHeld({ resume: () => resolve(true), cancel: () => resolve(false) })?.cancel?.();
161
+ })
162
+ : Promise.resolve(true),
163
+ [replaceHeld],
164
+ );
165
+
166
+ // Once no page guards, nothing can proceed or reset a held navigation, so it is dropped and its caller hears no.
167
+ const hold = useCallback(() => {
168
+ holds.current += 1;
169
+ return () => {
170
+ holds.current -= 1;
171
+ if (holds.current === 0) replaceHeld(null)?.cancel?.();
172
+ };
173
+ }, [replaceHeld]);
174
+
175
+ const guard = useMemo<NavigationGuard>(
176
+ () => ({
177
+ hold,
178
+ pending: held !== null,
179
+ proceed: () => {
180
+ const current = replaceHeld(null);
181
+ if (current) bypass(current.resume);
182
+ },
183
+ reset: () => replaceHeld(null)?.cancel?.(),
184
+ bypass,
185
+ confirmLeave,
186
+ }),
187
+ [hold, held, bypass, confirmLeave, replaceHeld],
188
+ );
49
189
 
50
190
  const moveTo = useCallback(
51
191
  (target: string, replace: boolean) => {
52
192
  if (createPath(history.location) === target) return;
53
193
 
54
- if (replace) history.replace(target);
55
- else history.push(target);
194
+ attempt(() => {
195
+ if (replace) history.replace(target);
196
+ else history.push(target);
197
+ });
56
198
  },
57
- [history],
199
+ [history, attempt],
58
200
  );
59
201
 
60
202
  const enterDatastore = useCallback(
@@ -76,11 +218,13 @@ export function ActiveDatastoreProvider(props: ActiveDatastoreProviderProps) {
76
218
  [datastoreId, enterDatastore, navigateAbsolute],
77
219
  );
78
220
 
79
- const routerState = useMemo(() => ({ history, action, location }), [history, action, location]);
221
+ const routerState = useMemo(() => ({ history, navigator, action, location }), [history, navigator, action, location]);
80
222
 
81
223
  return (
82
224
  <ActiveDatastoreContext.Provider value={value}>
83
- <RouterStateContext.Provider value={routerState}>{children}</RouterStateContext.Provider>
225
+ <NavigationGuardContext.Provider value={guard}>
226
+ <RouterStateContext.Provider value={routerState}>{children}</RouterStateContext.Provider>
227
+ </NavigationGuardContext.Provider>
84
228
  </ActiveDatastoreContext.Provider>
85
229
  );
86
230
  }
@@ -101,7 +245,7 @@ export function ActiveDatastoreRouter(props: ActiveDatastoreRouterProps) {
101
245
  basename={basename}
102
246
  location={routerState.location}
103
247
  navigationType={routerState.action}
104
- navigator={routerState.history}
248
+ navigator={routerState.navigator}
105
249
  >
106
250
  {children}
107
251
  </Router>
@@ -121,3 +265,29 @@ export function useAbsoluteNavigate(): (path: string) => void {
121
265
  [datastoreId, navigateAbsolute, navigate],
122
266
  );
123
267
  }
268
+
269
+ export type NavigationBlocker = {
270
+ blocked: boolean;
271
+ proceed: () => void;
272
+ reset: () => void;
273
+ bypass: (navigation: () => void) => void;
274
+ };
275
+
276
+ export type LeaveConfirmation = {
277
+ confirmLeave: () => Promise<boolean>;
278
+ bypass: (navigation: () => void) => void;
279
+ };
280
+
281
+ export function useLeaveConfirmation(): LeaveConfirmation {
282
+ const { confirmLeave, bypass } = use(NavigationGuardContext);
283
+ return useMemo(() => ({ confirmLeave, bypass }), [confirmLeave, bypass]);
284
+ }
285
+
286
+ export function useNavigationBlocker(when: boolean): NavigationBlocker {
287
+ const guard = use(NavigationGuardContext);
288
+ const { hold } = guard;
289
+
290
+ useEffect(() => (when ? hold() : undefined), [when, hold]);
291
+
292
+ return { blocked: guard.pending, proceed: guard.proceed, reset: guard.reset, bypass: guard.bypass };
293
+ }
@@ -18,6 +18,7 @@ export type AuthContextValue = Pick<
18
18
  | "allowedModels"
19
19
  > & {
20
20
  user: User;
21
+ canManageDatastores?: boolean;
21
22
  // Only Manta's own web app may list the apps connected to someone; any other host's token is refused.
22
23
  canDisconnectCustomApps?: boolean;
23
24
  hasProfilePage?: boolean;
@@ -1,5 +1,10 @@
1
1
  import { bearerFetch, mantaGQLPath, mantaGraphQLClient, type AccessTokenSource } from "@manta-eu/client";
2
- import { datastoreHeader, withDatastorePrefix } from "@manta-eu/client/shared/datastore-path";
2
+ import {
3
+ datastoreHeader,
4
+ sparqlRoutePath,
5
+ uploadPartRoutePath,
6
+ withDatastorePrefix,
7
+ } from "@manta-eu/client/shared/datastore-path";
3
8
  import { ontologyGraphIri as defaultOntologyGraphIri } from "@manta-eu/client/shared/rdf-namespaces";
4
9
  import type { ReactNode } from "react";
5
10
  import { use, useCallback, useMemo } from "react";
@@ -46,7 +51,7 @@ export function MantaClientProvider(props: MantaClientProviderProps) {
46
51
  } = props;
47
52
 
48
53
  const mantaBaseUrl = useMemo(() => new URL(mantaGQLPath, baseUrl), [baseUrl]);
49
- const sparqlUrl = useMemo(() => new URL("/sparql", baseUrl), [baseUrl]);
54
+ const sparqlUrl = useMemo(() => new URL(sparqlRoutePath, baseUrl), [baseUrl]);
50
55
  const datastoreHeaders = useMemo(() => datastoreHeader(datastoreId), [datastoreId]);
51
56
  const datastorePath = useCallback(
52
57
  (path: string) => (datastoreId ? withDatastorePrefix(datastoreId, path) : path),
@@ -78,7 +83,7 @@ export function MantaClientProvider(props: MantaClientProviderProps) {
78
83
  getAccessToken
79
84
  ? {
80
85
  partUrl: (presignedUrl: string) => {
81
- const url = new URL(datastorePath("/agents/uploads/part"), baseUrl);
86
+ const url = new URL(datastorePath(uploadPartRoutePath), baseUrl);
82
87
  url.searchParams.set("url", presignedUrl);
83
88
  return url.toString();
84
89
  },
@@ -6,7 +6,7 @@ import { NuqsAdapter } from "nuqs/adapters/react-router/v7";
6
6
  import type { ReactNode } from "react";
7
7
  import { useState } from "react";
8
8
  import { Link } from "react-router";
9
- import { EntityLinkProvider, type EntityLinkProps } from "../graph/entity-link";
9
+ import { EntityLinkProvider, type EntityLinkComponent, type EntityLinkProps } from "../graph/entity-link";
10
10
  import { ActiveDatastoreProvider, ActiveDatastoreRouter, useActiveDatastore } from "./ActiveDatastoreProvider";
11
11
  import { GenerateStructuredDataProvider } from "./GenerateStructuredDataProvider";
12
12
  import { KnowledgeGraphPollingProvider } from "./KnowledgeGraphPollingProvider";
@@ -40,6 +40,7 @@ export type ProvidersProps = {
40
40
  getAccessToken?: AccessTokenSource;
41
41
  /** What Log out does for a getAccessToken host; see MantaClientProvider. */
42
42
  onSignOut?: () => void;
43
+ entityLink?: EntityLinkComponent;
43
44
  };
44
45
 
45
46
  // Each datastore gets its own cache, but passing through "no datastore" (the global picker) must not discard it.
@@ -103,7 +104,7 @@ function RecordEntityLink(props: EntityLinkProps) {
103
104
  }
104
105
 
105
106
  export function Providers(props: ProvidersProps) {
106
- const { children, ...coreProps } = props;
107
+ const { children, entityLink = RecordEntityLink, ...coreProps } = props;
107
108
 
108
109
  return (
109
110
  <ActiveDatastoreProvider>
@@ -111,7 +112,7 @@ export function Providers(props: ProvidersProps) {
111
112
  <CoreProviders {...coreProps}>
112
113
  <ActiveDatastoreRouter>
113
114
  <NuqsAdapter>
114
- <EntityLinkProvider component={RecordEntityLink}>{children}</EntityLinkProvider>
115
+ <EntityLinkProvider component={entityLink}>{children}</EntityLinkProvider>
115
116
  </NuqsAdapter>
116
117
  </ActiveDatastoreRouter>
117
118
  </CoreProviders>
@@ -120,7 +121,9 @@ export function Providers(props: ProvidersProps) {
120
121
  );
121
122
  }
122
123
 
123
- export type EmbeddedChatProvidersProps = Omit<ProvidersProps, "mantaBaseUrl"> & { mantaBaseUrl?: string };
124
+ export type EmbeddedChatProvidersProps = Omit<ProvidersProps, "mantaBaseUrl" | "entityLink"> & {
125
+ mantaBaseUrl?: string;
126
+ };
124
127
 
125
128
  // IMPORTANT: Avoid redirects from embedded manta client
126
129
  export function EmbeddedChatProviders(props: EmbeddedChatProvidersProps) {
@@ -7,12 +7,10 @@ import { useLocalStorage } from "usehooks-ts";
7
7
  import { ActivityDetail, activityLayoutValues, type ActivityLayout } from "./ActivityDetail";
8
8
  import { Button } from "#components/button/index";
9
9
  import { RouteLayout } from "#components/layouts/RouteLayout";
10
- import { useAuthContext } from "#providers/AuthContext";
11
10
 
12
11
  const layoutStorageKey = "activity-detail-layout";
13
12
 
14
13
  export function ActivityDetailRoute() {
15
- const { datastore, datastores, user, logout, isOperator, canSwitchDatastore } = useAuthContext();
16
14
  const navigate = useNavigate();
17
15
  // The URL param is the IRI local name; buildActivityIri rebuilds the full IRI.
18
16
  const { id } = useParams();
@@ -27,14 +25,7 @@ export function ActivityDetailRoute() {
27
25
  );
28
26
 
29
27
  return (
30
- <RouteLayout
31
- user={user}
32
- datastore={datastore}
33
- datastores={datastores}
34
- isOperator={isOperator}
35
- canSwitchDatastore={canSwitchDatastore}
36
- logout={logout}
37
- >
28
+ <RouteLayout>
38
29
  <ActivityDetail
39
30
  activityIri={activityIri}
40
31
  leading={
@@ -14,7 +14,6 @@ import { PageBody, PageHeader } from "#components/layouts/page/index";
14
14
  import { RouteLayout } from "#components/layouts/RouteLayout";
15
15
  import { useFittedPagination } from "#hooks/useFittedPagination";
16
16
  import { type ActivityFeedFilters, type ActivityStatusFilter, useActivityFeed } from "#ldo-ui";
17
- import { useAuthContext } from "#providers/AuthContext";
18
17
 
19
18
  const activityTableGeometry = {
20
19
  headerRowHeight: 52,
@@ -25,7 +24,6 @@ const activityTableGeometry = {
25
24
  const statusValues = ["all", "completed", "failed", "running"] as const;
26
25
 
27
26
  export function ActivityRoute() {
28
- const { datastore, datastores, user, logout, isOperator, canSwitchDatastore } = useAuthContext();
29
27
  const navigate = useNavigate();
30
28
 
31
29
  const [page, setPage] = useQueryState("page", parseAsInteger.withDefault(1));
@@ -82,14 +80,7 @@ export function ActivityRoute() {
82
80
  }
83
81
 
84
82
  return (
85
- <RouteLayout
86
- user={user}
87
- datastore={datastore}
88
- datastores={datastores}
89
- isOperator={isOperator}
90
- canSwitchDatastore={canSwitchDatastore}
91
- logout={logout}
92
- >
83
+ <RouteLayout>
93
84
  <PageHeader title="Activity" icon={ActivityIcon} />
94
85
  <PageBody className="flex min-h-0 flex-col gap-4">
95
86
  <ActivityFilters
@@ -1,60 +1,24 @@
1
- import type { MantaModelId } from "@manta-eu/client/shared/model";
2
- import type { ReactNode } from "react";
3
1
  import { Chat } from "#components/chat-view/index";
4
2
  import { RouteLayout } from "#components/layouts/RouteLayout";
5
- import type { ChatDraft, Datastore, User } from "#lib/chat-types";
6
- import { AssistantIconProvider, type AssistantIcon } from "#providers/AssistantIconProvider";
3
+ import type { AuthenticatedChatProps } from "#lib/chat-types";
4
+ import { AssistantIconProvider } from "#providers/AssistantIconProvider";
7
5
  import { AssistantNameProvider } from "#providers/AssistantNameProvider";
6
+ import { useAuthContext } from "#providers/AuthContext";
8
7
 
9
- type ChatRouteProps = {
10
- datastore?: Datastore;
11
- user: User;
12
- logout?: () => void;
13
- isOperator: boolean;
14
- canSwitchDatastore?: boolean;
15
- datastores?: Datastore[];
16
- allowedModels?: MantaModelId[];
17
- initialPrompt?: string;
18
- initialDraft?: ChatDraft;
19
- title?: string;
20
- welcomeSubtitle?: string;
21
- assistantName?: string;
22
- assistantIcon?: AssistantIcon;
23
- mark?: ReactNode;
24
- };
8
+ export type ChatRouteProps = Pick<
9
+ AuthenticatedChatProps,
10
+ "initialPrompt" | "initialDraft" | "title" | "welcomeSubtitle" | "assistantName" | "assistantIcon" | "mark"
11
+ >;
25
12
 
26
13
  export function ChatRoute(props: ChatRouteProps) {
27
- const {
28
- datastore,
29
- user,
30
- logout,
31
- isOperator,
32
- canSwitchDatastore,
33
- datastores,
34
- allowedModels,
35
- initialPrompt,
36
- initialDraft,
37
- title,
38
- welcomeSubtitle,
39
- assistantName,
40
- assistantIcon,
41
- mark,
42
- } = props;
14
+ const { initialPrompt, initialDraft, title, welcomeSubtitle, assistantName, assistantIcon, mark } = props;
15
+
16
+ const { datastore, user, logout, isOperator, allowedModels } = useAuthContext();
43
17
 
44
18
  return (
45
19
  <AssistantNameProvider name={assistantName}>
46
20
  <AssistantIconProvider icon={assistantIcon}>
47
- <RouteLayout
48
- user={user}
49
- datastore={datastore}
50
- datastores={datastores}
51
- isOperator={isOperator}
52
- canSwitchDatastore={canSwitchDatastore}
53
- logout={logout}
54
- floatingMobileMenu
55
- title={title}
56
- mark={mark}
57
- >
21
+ <RouteLayout floatingMobileMenu title={title} mark={mark}>
58
22
  <Chat
59
23
  datastore={datastore}
60
24
  user={user}