@flamingo-stack/openframe-frontend-core 0.0.825 → 0.0.826

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 (317) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-IZBMHA6R.cjs → case-study-card-O4IQCJAX.cjs} +5 -5
  3. package/dist/{chunk-QOAA7ZHB.cjs → chunk-2HQNXX2K.cjs} +2 -2
  4. package/dist/{chunk-2U7GXE3T.cjs → chunk-2TQJSB62.cjs} +2157 -811
  5. package/dist/{chunk-NONMZ5WJ.cjs → chunk-2VLPXUQK.cjs} +14 -83
  6. package/dist/{chunk-7DJWIVQC.cjs → chunk-37OYBX7W.cjs} +36 -36
  7. package/dist/{chunk-OBQ5WUNG.cjs → chunk-3B6ZE4EZ.cjs} +29 -29
  8. package/dist/{chunk-AO6YVNAH.cjs → chunk-5AQKXEMI.cjs} +979 -1357
  9. package/dist/{chunk-25HBH4J6.cjs → chunk-5BM7X4GA.cjs} +2 -2
  10. package/dist/{chunk-47SHKOCY.cjs → chunk-63T2KKDZ.cjs} +86 -86
  11. package/dist/{chunk-MHR4C465.cjs → chunk-6G4WRMEM.cjs} +3 -3
  12. package/dist/{chunk-AUBR3FGY.cjs → chunk-74GWFGH2.cjs} +28 -28
  13. package/dist/{chunk-467T3LCG.cjs → chunk-7PZQ7SHB.cjs} +49 -32
  14. package/dist/{chunk-6LVJKPR3.cjs → chunk-AJM4YZTW.cjs} +8 -8
  15. package/dist/{chunk-2XLPRW7V.cjs → chunk-BIG3O33P.cjs} +6 -2
  16. package/dist/chunk-BMQLM2NU.cjs +40 -0
  17. package/dist/{chunk-DVHSYPDB.cjs → chunk-DAKGX2WF.cjs} +2 -2
  18. package/dist/{chunk-2IWAHBCC.cjs → chunk-DRSFR5AC.cjs} +159 -159
  19. package/dist/{chunk-IJCSQFLD.cjs → chunk-DU6AF77X.cjs} +83 -121
  20. package/dist/{chunk-NL34HKLS.cjs → chunk-EJNDTSKY.cjs} +91 -91
  21. package/dist/{chunk-SBFBNOKU.cjs → chunk-ENMPSEEQ.cjs} +4 -4
  22. package/dist/{chunk-ZECG6GU5.cjs → chunk-F2J5WN6U.cjs} +2 -2
  23. package/dist/{chunk-BOS7OIC4.cjs → chunk-GRHF5SWL.cjs} +5 -2
  24. package/dist/{chunk-Z7BLMJEI.cjs → chunk-GZAPOCKS.cjs} +54 -54
  25. package/dist/{chunk-5S2GW6YG.cjs → chunk-HJAPXKWK.cjs} +17 -17
  26. package/dist/{chunk-P25RVNGX.cjs → chunk-HQ4FKHOO.cjs} +249 -108
  27. package/dist/{chunk-ZRDVFADQ.cjs → chunk-IBD2FPSX.cjs} +75 -9
  28. package/dist/{chunk-T266OITJ.cjs → chunk-IKWQW3YJ.cjs} +45 -45
  29. package/dist/{chunk-B7NSH7IK.cjs → chunk-IWQ2LJGW.cjs} +5 -5
  30. package/dist/{chunk-MALCUN2G.cjs → chunk-JDR72QFU.cjs} +12 -14
  31. package/dist/{chunk-EHANO6UE.cjs → chunk-K34TTZAE.cjs} +9 -129
  32. package/dist/{chunk-QDDBOCG3.cjs → chunk-KPGKTEEB.cjs} +2 -2
  33. package/dist/{chunk-4IY5FKYL.cjs → chunk-MDEOCOIE.cjs} +23 -23
  34. package/dist/chunk-OEP5KAT6.cjs +56 -0
  35. package/dist/chunk-OT6P57ZS.cjs +94 -0
  36. package/dist/{chunk-QQT23JJ7.cjs → chunk-PBHP3FHO.cjs} +4 -4
  37. package/dist/{chunk-IMMTH3F3.cjs → chunk-PJY3SYCS.cjs} +29 -27
  38. package/dist/{chunk-N7IDLF2G.cjs → chunk-PWAKRRRO.cjs} +1283 -268
  39. package/dist/{chunk-UEULXVW2.cjs → chunk-QS6AKUUL.cjs} +22 -22
  40. package/dist/{chunk-BN7QENV7.cjs → chunk-QYJZDEG7.cjs} +6 -6
  41. package/dist/{chunk-NPNZAAOB.cjs → chunk-S6UJEW4G.cjs} +2 -2
  42. package/dist/{chunk-XJMLZ63Y.cjs → chunk-TJG2BJ5J.cjs} +4 -4
  43. package/dist/{chunk-QOOMUGF2.cjs → chunk-TYJ73DHW.cjs} +15 -15
  44. package/dist/{chunk-A34UNP5V.cjs → chunk-W4VEDSAX.cjs} +80 -11
  45. package/dist/{chunk-DNZCSPMU.cjs → chunk-WGMU45NV.cjs} +20 -20
  46. package/dist/{chunk-APTFXX2C.cjs → chunk-XDHQC4XH.cjs} +46 -46
  47. package/dist/{cloud-tenants-M4VFFN33.cjs → cloud-tenants-F67KQ5GC.cjs} +108 -106
  48. package/dist/components/case-studies/index.cjs +124 -122
  49. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  50. package/dist/components/chat/approval-batch-message.js +2 -2
  51. package/dist/components/chat/chat-archive-page.d.ts +7 -0
  52. package/dist/components/chat/chat-archive-page.d.ts.map +1 -1
  53. package/dist/components/chat/chat-archive-page.js +9 -0
  54. package/dist/components/chat/chat-composer.d.ts +24 -4
  55. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  56. package/dist/components/chat/chat-composer.js +90 -48
  57. package/dist/components/chat/chat-context-memory-bar.d.ts +4 -1
  58. package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -1
  59. package/dist/components/chat/chat-context-memory-bar.js +8 -5
  60. package/dist/components/chat/chat-context-picker.d.ts +8 -1
  61. package/dist/components/chat/chat-context-picker.d.ts.map +1 -1
  62. package/dist/components/chat/chat-context-picker.js +32 -9
  63. package/dist/components/chat/chat-header-rename-field.d.ts +18 -0
  64. package/dist/components/chat/chat-header-rename-field.d.ts.map +1 -0
  65. package/dist/components/chat/chat-header-rename-field.js +49 -0
  66. package/dist/components/chat/chat-input.d.ts.map +1 -1
  67. package/dist/components/chat/chat-input.js +5 -0
  68. package/dist/components/chat/composer-sheet.d.ts +44 -0
  69. package/dist/components/chat/composer-sheet.d.ts.map +1 -0
  70. package/dist/components/chat/composer-sheet.js +140 -0
  71. package/dist/components/chat/embeddable-chat.d.ts +114 -1
  72. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  73. package/dist/components/chat/embeddable-chat.js +328 -215
  74. package/dist/components/chat/index.cjs +118 -103
  75. package/dist/components/chat/index.d.ts +6 -0
  76. package/dist/components/chat/index.d.ts.map +1 -1
  77. package/dist/components/chat/index.js +9 -0
  78. package/dist/components/chat/mingo-chat-day-groups.d.ts +18 -0
  79. package/dist/components/chat/mingo-chat-day-groups.d.ts.map +1 -0
  80. package/dist/components/chat/mingo-chat-day-groups.js +45 -0
  81. package/dist/components/chat/mingo-chat-header.d.ts +34 -6
  82. package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
  83. package/dist/components/chat/mingo-chat-header.js +44 -7
  84. package/dist/components/chat/mingo-chat-history-section.d.ts +30 -0
  85. package/dist/components/chat/mingo-chat-history-section.d.ts.map +1 -0
  86. package/dist/components/chat/mingo-chat-history-section.js +500 -0
  87. package/dist/components/chat/mingo-chat-history.d.ts +5 -2
  88. package/dist/components/chat/mingo-chat-history.d.ts.map +1 -1
  89. package/dist/components/chat/mingo-chat-history.js +26 -30
  90. package/dist/components/chat/mingo-chat-list-shared.d.ts +136 -0
  91. package/dist/components/chat/mingo-chat-list-shared.d.ts.map +1 -0
  92. package/dist/components/chat/mingo-chat-list-shared.js +76 -0
  93. package/dist/components/chat/mingo-chat-rail.d.ts +19 -51
  94. package/dist/components/chat/mingo-chat-rail.d.ts.map +1 -1
  95. package/dist/components/chat/mingo-chat-rail.js +23 -45
  96. package/dist/components/chat/mingo-edge-light.d.ts +13 -0
  97. package/dist/components/chat/mingo-edge-light.d.ts.map +1 -0
  98. package/dist/components/chat/mingo-edge-light.js +17 -0
  99. package/dist/components/chat/mingo-history-rail.d.ts +5 -4
  100. package/dist/components/chat/mingo-history-rail.d.ts.map +1 -1
  101. package/dist/components/chat/mingo-history-rail.js +5 -10
  102. package/dist/components/chat/mingo-quick-action-wall.d.ts +27 -0
  103. package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -0
  104. package/dist/components/chat/mingo-quick-action-wall.js +41 -0
  105. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  106. package/dist/components/chat/mingo-welcome.js +6 -20
  107. package/dist/components/chat/model-display.d.ts.map +1 -1
  108. package/dist/components/chat/model-display.js +38 -9
  109. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  110. package/dist/components/chat/tool-execution-display.js +15 -1
  111. package/dist/components/chat/types/component.types.d.ts +13 -1
  112. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  113. package/dist/components/chat/utils/chat-day-label.d.ts +8 -0
  114. package/dist/components/chat/utils/chat-day-label.d.ts.map +1 -0
  115. package/dist/components/chat/utils/chat-day-label.js +21 -0
  116. package/dist/components/contact/index.cjs +109 -107
  117. package/dist/components/docs/index.cjs +112 -110
  118. package/dist/components/embeds/index.cjs +109 -107
  119. package/dist/components/faq/index.cjs +110 -108
  120. package/dist/components/features/board/board-column.d.ts +3 -1
  121. package/dist/components/features/board/board-column.d.ts.map +1 -1
  122. package/dist/components/features/board/board-column.js +6 -2
  123. package/dist/components/features/board/board.d.ts +6 -0
  124. package/dist/components/features/board/board.d.ts.map +1 -1
  125. package/dist/components/features/board/board.js +14 -3
  126. package/dist/components/features/board/touch-board.d.ts +1 -1
  127. package/dist/components/features/board/touch-board.d.ts.map +1 -1
  128. package/dist/components/features/board/touch-board.js +3 -1
  129. package/dist/components/features/index.cjs +108 -106
  130. package/dist/components/features/notifications/approval-request-notification-tile.d.ts +7 -1
  131. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  132. package/dist/components/features/notifications/approval-request-notification-tile.js +1 -1
  133. package/dist/components/features/notifications/notification-drawer.d.ts +6 -1
  134. package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
  135. package/dist/components/features/notifications/notification-drawer.js +3 -2
  136. package/dist/components/features/notifications/notification-tile.d.ts +4 -1
  137. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  138. package/dist/components/features/notifications/notification-tile.js +9 -7
  139. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +18 -1
  140. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
  141. package/dist/components/features/time-tracker/time-tracker-header-button.js +31 -7
  142. package/dist/components/help-center-pages/index.cjs +217 -215
  143. package/dist/components/icons-v2-generated/icon-loaders.d.ts.map +1 -1
  144. package/dist/components/icons-v2-generated/icon-loaders.js +1 -0
  145. package/dist/components/icons-v2-generated/icon-names.js +1 -1
  146. package/dist/components/icons-v2-generated/index.cjs +90 -86
  147. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.d.ts.map +1 -1
  148. package/dist/components/icons-v2-generated/loaders/dots-loader-icon.js +21 -24
  149. package/dist/components/icons-v2-generated/logos/index.d.ts +1 -0
  150. package/dist/components/icons-v2-generated/logos/index.d.ts.map +1 -1
  151. package/dist/components/icons-v2-generated/logos/index.js +2 -0
  152. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts +9 -0
  153. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts.map +1 -0
  154. package/dist/components/icons-v2-generated/logos/mingo-logo-icon.js +36 -0
  155. package/dist/components/index.cjs +215 -182
  156. package/dist/components/meeting-scheduler/index.cjs +182 -180
  157. package/dist/components/navigation/account-popover.d.ts +62 -0
  158. package/dist/components/navigation/account-popover.d.ts.map +1 -0
  159. package/dist/components/navigation/account-popover.js +138 -0
  160. package/dist/components/navigation/app-header.d.ts +36 -2
  161. package/dist/components/navigation/app-header.d.ts.map +1 -1
  162. package/dist/components/navigation/app-header.js +28 -24
  163. package/dist/components/navigation/app-layout-context.d.ts +17 -0
  164. package/dist/components/navigation/app-layout-context.d.ts.map +1 -1
  165. package/dist/components/navigation/app-layout-context.js +9 -1
  166. package/dist/components/navigation/app-layout.d.ts +93 -1
  167. package/dist/components/navigation/app-layout.d.ts.map +1 -1
  168. package/dist/components/navigation/app-layout.js +149 -30
  169. package/dist/components/navigation/header-button.d.ts +11 -1
  170. package/dist/components/navigation/header-button.d.ts.map +1 -1
  171. package/dist/components/navigation/header-button.js +16 -5
  172. package/dist/components/navigation/header-mingo-button.d.ts.map +1 -1
  173. package/dist/components/navigation/header-mingo-button.js +6 -5
  174. package/dist/components/navigation/index.cjs +120 -109
  175. package/dist/components/navigation/index.d.ts +10 -1
  176. package/dist/components/navigation/index.d.ts.map +1 -1
  177. package/dist/components/navigation/index.js +8 -0
  178. package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
  179. package/dist/components/navigation/mingo-ai-button.js +2 -1
  180. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  181. package/dist/components/navigation/mobile-burger-menu.js +155 -39
  182. package/dist/components/navigation/navigation-sidebar-grouped.d.ts +57 -0
  183. package/dist/components/navigation/navigation-sidebar-grouped.d.ts.map +1 -0
  184. package/dist/components/navigation/navigation-sidebar-grouped.js +365 -0
  185. package/dist/components/navigation/navigation-sidebar-match.d.ts +37 -0
  186. package/dist/components/navigation/navigation-sidebar-match.d.ts.map +1 -0
  187. package/dist/components/navigation/navigation-sidebar-match.js +85 -0
  188. package/dist/components/navigation/navigation-sidebar-slot.d.ts +7 -0
  189. package/dist/components/navigation/navigation-sidebar-slot.d.ts.map +1 -0
  190. package/dist/components/navigation/navigation-sidebar-slot.js +11 -0
  191. package/dist/components/navigation/navigation-sidebar-toggle.d.ts +7 -1
  192. package/dist/components/navigation/navigation-sidebar-toggle.d.ts.map +1 -1
  193. package/dist/components/navigation/navigation-sidebar-toggle.js +52 -23
  194. package/dist/components/navigation/navigation-sidebar.d.ts +13 -1
  195. package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
  196. package/dist/components/navigation/navigation-sidebar.js +188 -52
  197. package/dist/components/navigation/notifications-bell-button.d.ts +28 -0
  198. package/dist/components/navigation/notifications-bell-button.d.ts.map +1 -0
  199. package/dist/components/navigation/notifications-bell-button.js +44 -0
  200. package/dist/components/navigation/ticket-alerts-button.d.ts +7 -1
  201. package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -1
  202. package/dist/components/navigation/ticket-alerts-button.js +3 -2
  203. package/dist/components/onboarding-guides/index.cjs +111 -109
  204. package/dist/components/product-demo/index.cjs +119 -117
  205. package/dist/components/related-content/index.cjs +13 -13
  206. package/dist/components/tickets/index.cjs +115 -113
  207. package/dist/components/ui/actions-menu.d.ts +6 -1
  208. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  209. package/dist/components/ui/actions-menu.js +6 -2
  210. package/dist/components/ui/fade-preview.d.ts +8 -0
  211. package/dist/components/ui/fade-preview.d.ts.map +1 -1
  212. package/dist/components/ui/fade-preview.js +7 -5
  213. package/dist/components/ui/index.cjs +136 -111
  214. package/dist/components/ui/index.d.ts +1 -0
  215. package/dist/components/ui/index.d.ts.map +1 -1
  216. package/dist/components/ui/index.js +1 -0
  217. package/dist/components/ui/mobile-action-bar.d.ts +14 -0
  218. package/dist/components/ui/mobile-action-bar.d.ts.map +1 -0
  219. package/dist/components/ui/mobile-action-bar.js +68 -0
  220. package/dist/components/ui/no-data/no-data-styles.d.ts +1 -1
  221. package/dist/components/ui/no-data/no-data-styles.d.ts.map +1 -1
  222. package/dist/components/ui/no-data/no-data-styles.js +1 -1
  223. package/dist/components/ui/page-actions.d.ts.map +1 -1
  224. package/dist/components/ui/page-actions.js +24 -8
  225. package/dist/components/ui/panel-resize-handle.d.ts +6 -2
  226. package/dist/components/ui/panel-resize-handle.d.ts.map +1 -1
  227. package/dist/components/ui/panel-resize-handle.js +6 -3
  228. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  229. package/dist/components/ui/square-avatar.js +5 -2
  230. package/dist/{devices-DW5NDXMD.cjs → devices-SJORCARH.cjs} +109 -107
  231. package/dist/dots-loader-icon-5JXWD6FB.cjs +7 -0
  232. package/dist/{embeddable-chat-NBJMXEXB.cjs → embeddable-chat-7Z4CEZJL.cjs} +513 -398
  233. package/dist/hooks/index.cjs +15 -16
  234. package/dist/hooks/ui/use-content-breakpoint.d.ts +4 -2
  235. package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
  236. package/dist/{icon-loaders-OLGJZGRP.cjs → icon-loaders-SUPEKMBJ.cjs} +2 -1
  237. package/dist/index.cjs +154 -121
  238. package/dist/{knowledge-EYJG2TNW.cjs → knowledge-QXILUVEM.cjs} +109 -107
  239. package/dist/{logs-2LV7DTSL.cjs → logs-E3KQQQD6.cjs} +118 -115
  240. package/dist/mingo-logo-icon-WGPBSDTF.cjs +7 -0
  241. package/dist/{policies-HSDYIQBX.cjs → policies-IOYQY6TF.cjs} +112 -110
  242. package/dist/{remote-session-BQMTIQTU.cjs → remote-session-QGFG5WAL.cjs} +99 -97
  243. package/dist/{scripts-UI6V7ANQ.cjs → scripts-E5TWWUNP.cjs} +115 -113
  244. package/dist/{software-update-WMLY7VHH.cjs → software-update-QZGYG4TD.cjs} +112 -110
  245. package/dist/{tickets-board-TRXOX77R.cjs → tickets-board-KCH6ITUV.cjs} +95 -94
  246. package/dist/types/navigation.d.ts +131 -0
  247. package/dist/types/navigation.d.ts.map +1 -1
  248. package/dist/utils/index.cjs +65 -25
  249. package/package.json +1 -1
  250. package/src/components/chat/approval-batch-message.tsx +3 -2
  251. package/src/components/chat/chat-archive-page.tsx +16 -0
  252. package/src/components/chat/chat-composer.tsx +131 -61
  253. package/src/components/chat/chat-context-memory-bar.tsx +27 -17
  254. package/src/components/chat/chat-context-picker.tsx +45 -11
  255. package/src/components/chat/chat-header-rename-field.tsx +68 -0
  256. package/src/components/chat/chat-input.tsx +9 -1
  257. package/src/components/chat/composer-sheet.tsx +196 -0
  258. package/src/components/chat/embeddable-chat.tsx +636 -319
  259. package/src/components/chat/index.ts +6 -0
  260. package/src/components/chat/mingo-chat-day-groups.ts +62 -0
  261. package/src/components/chat/mingo-chat-header.tsx +99 -23
  262. package/src/components/chat/mingo-chat-history-section.tsx +670 -0
  263. package/src/components/chat/mingo-chat-history.tsx +31 -45
  264. package/src/components/chat/mingo-chat-list-shared.tsx +244 -0
  265. package/src/components/chat/mingo-chat-rail.tsx +45 -97
  266. package/src/components/chat/mingo-edge-light.tsx +25 -0
  267. package/src/components/chat/mingo-history-rail.tsx +7 -17
  268. package/src/components/chat/mingo-quick-action-wall.tsx +64 -0
  269. package/src/components/chat/mingo-welcome.tsx +5 -19
  270. package/src/components/chat/model-display.tsx +66 -14
  271. package/src/components/chat/tool-execution-display.tsx +9 -1
  272. package/src/components/chat/types/component.types.ts +13 -1
  273. package/src/components/chat/utils/chat-day-label.ts +24 -0
  274. package/src/components/features/board/board-column.tsx +8 -0
  275. package/src/components/features/board/board.tsx +16 -2
  276. package/src/components/features/board/touch-board.tsx +2 -0
  277. package/src/components/features/notifications/approval-request-notification-tile.tsx +8 -2
  278. package/src/components/features/notifications/notification-drawer.tsx +7 -1
  279. package/src/components/features/notifications/notification-tile.tsx +17 -9
  280. package/src/components/features/time-tracker/time-tracker-header-button.tsx +53 -6
  281. package/src/components/icons-v2/icon-colors.json +4 -0
  282. package/src/components/icons-v2-generated/icon-loaders.ts +1 -0
  283. package/src/components/icons-v2-generated/icon-names.ts +1 -1
  284. package/src/components/icons-v2-generated/loaders/dots-loader-icon.tsx +18 -27
  285. package/src/components/icons-v2-generated/logos/index.ts +1 -0
  286. package/src/components/icons-v2-generated/logos/mingo-logo-icon.tsx +35 -0
  287. package/src/components/navigation/account-popover.tsx +198 -0
  288. package/src/components/navigation/app-header.tsx +74 -33
  289. package/src/components/navigation/app-layout-context.ts +22 -0
  290. package/src/components/navigation/app-layout.tsx +290 -24
  291. package/src/components/navigation/header-button.tsx +27 -5
  292. package/src/components/navigation/header-mingo-button.tsx +6 -5
  293. package/src/components/navigation/index.ts +19 -0
  294. package/src/components/navigation/mingo-ai-button.tsx +2 -3
  295. package/src/components/navigation/mobile-burger-menu.tsx +219 -53
  296. package/src/components/navigation/navigation-sidebar-grouped.tsx +554 -0
  297. package/src/components/navigation/navigation-sidebar-match.ts +152 -0
  298. package/src/components/navigation/navigation-sidebar-slot.ts +12 -0
  299. package/src/components/navigation/navigation-sidebar-toggle.tsx +39 -6
  300. package/src/components/navigation/navigation-sidebar.tsx +278 -61
  301. package/src/components/navigation/notifications-bell-button.tsx +70 -0
  302. package/src/components/navigation/ticket-alerts-button.tsx +9 -2
  303. package/src/components/ui/actions-menu.tsx +19 -3
  304. package/src/components/ui/fade-preview.tsx +13 -6
  305. package/src/components/ui/index.ts +1 -0
  306. package/src/components/ui/mobile-action-bar.ts +87 -0
  307. package/src/components/ui/no-data/no-data-styles.ts +5 -2
  308. package/src/components/ui/page-actions.tsx +38 -11
  309. package/src/components/ui/panel-resize-handle.tsx +14 -5
  310. package/src/components/ui/square-avatar.tsx +5 -2
  311. package/src/hooks/ui/use-content-breakpoint.ts +4 -2
  312. package/src/styles/ods-interaction-states.css +68 -0
  313. package/src/types/navigation.ts +140 -0
  314. package/dist/chunk-C7GIHB3V.cjs +0 -59
  315. package/dist/dots-loader-icon-RBLX46X7.cjs +0 -7
  316. package/dist/{chunk-ZOZR3QI2.cjs → chunk-46547WQW.cjs} +0 -0
  317. package/dist/{video-file-player-IAMWBKEQ.cjs → video-file-player-IHO66P2Q.cjs} +1 -1
@@ -40,6 +40,7 @@ import { usePreventScroll } from '@react-aria/overlays';
40
40
  import { isIOS } from '@react-aria/utils';
41
41
  import { MessageSquare } from 'lucide-react';
42
42
  import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
43
+ import { createPortal } from 'react-dom';
43
44
  import { useRequiredChatRuntime } from '../../contexts/chat-runtime-context';
44
45
  import { useIsHydrated } from '../../hooks/ui/use-is-hydrated';
45
46
  import { cn } from '../../utils/cn';
@@ -92,9 +93,10 @@ import type { UseSseChatAdapterOptions } from './hooks/use-sse-chat-adapter';
92
93
  import { useUnifiedChat, type ChatMode, type UseUnifiedChatModes } from './hooks/use-unified-chat';
93
94
  import { awaitsDecision, useWhatToAsk, type WhatToAskContent } from './hooks/use-what-to-ask';
94
95
  import { MingoArchiveList } from './mingo-archive-list';
95
- import { MingoChatHeader } from './mingo-chat-header';
96
+ import { MingoChatHeader, type MingoChatHeaderAction } from './mingo-chat-header';
97
+ import type { MingoDialogStatus } from './mingo-chat-list-shared';
96
98
  import { ChatDialogModals } from './mingo-chat-modals';
97
- import { MingoChatRail, type MingoDialogStatus } from './mingo-chat-rail';
99
+ import { MingoChatRail } from './mingo-chat-rail';
98
100
  import { MingoHistoryRail } from './mingo-history-rail';
99
101
  import { MINGO_ONBOARDING_SKELETON_ROWS, MingoOnboardingCard } from './mingo-onboarding-card';
100
102
  import { MingoWelcome, type MingoWelcomeProps } from './mingo-welcome';
@@ -112,6 +114,7 @@ import type {
112
114
  } from './types/unified-chat-state.types';
113
115
  import { ASK_AI_OPEN_EVENT, ASK_AI_OPEN_WITH_REF_EVENT, chatListensForAskAiOpens } from './utils/ask-ai-events';
114
116
  import { formatChatAttachmentMarkdownForBubble } from './utils/chat-attachment-markdown';
117
+ import { chatDayLabel } from './utils/chat-day-label';
115
118
  import { chatChipClass } from './utils/chip-styles';
116
119
  import { FALLBACK_TOP_RETRIEVED, groupedRowLabels, splitCitedSources } from './utils/cited-sources';
117
120
  import { flattenAssistantContent } from './utils/flatten-assistant-content';
@@ -521,6 +524,108 @@ export interface EmbeddableChatProps {
521
524
  * every chat that is not archived, a new one included.
522
525
  */
523
526
  chatMenuExtraItems?: ActionsMenuItem[];
527
+
528
+ /**
529
+ * Who draws the chat list. `'auto'` (default): the panel does, from its own
530
+ * width — the rail beside the chat when it fits, the "Current Chats" screen
531
+ * when it does not. `'none'`: the host owns the list (e.g. in its main
532
+ * sidebar), so the panel never draws one at any width: no rail, no list
533
+ * screen, no list toggle or back-to-list control; with no conversation open
534
+ * it shows the new chat. Rename / archive from the panel still work.
535
+ */
536
+ rail?: 'auto' | 'none';
537
+
538
+ /**
539
+ * Splits the panel for a host that keeps ONE chat mounted for the session:
540
+ * the composer renders in place (a dock under every page) while the header
541
+ * and the thread go elsewhere.
542
+ * - `undefined` (default): everything in place, as before.
543
+ * - an element: the header and the thread (pending-approvals bar, jump to
544
+ * latest, load older, a new chat's welcome) render into it through a
545
+ * portal; the composer stays here.
546
+ * - `null`: no header and no thread at all — the composer alone.
547
+ * Either of the last two implies `rail="none"`, and the header is the page
548
+ * one (`MingoChatHeader variant="page"`): no close, collapse or list control.
549
+ * Its ⋯ is the chat's, Compact included. The composer never remounts
550
+ * when this changes, so the draft, staged context, picker and uploads
551
+ * survive it; the thread remounts in each new container and opens on the
552
+ * latest message (its data is the host's `mingoState`). Meant for
553
+ * `shell="inline"`; the host must not clip the composer's root — the
554
+ * context picker, `@` / slash menus and the memory popover open above it.
555
+ * The portalled thread paints no background: the host paints the area that
556
+ * holds the thread and the composer (`AppLayout`'s `pageSurface="mingo"`).
557
+ */
558
+ threadContainer?: HTMLElement | null;
559
+ /**
560
+ * Icon cells at the end of the header portalled into `threadContainer`, after the
561
+ * chat's ⋯ — what the host that shows the thread there adds (a sheet's "Open as
562
+ * full chat" and "Back to page"). Split layout only.
563
+ */
564
+ threadHeaderActions?: ReadonlyArray<MingoChatHeaderAction>;
565
+ /**
566
+ * The thread's column inside `threadContainer` — e.g. `mx-auto max-w-[760px]` to
567
+ * centre it at the composer's width on a wide chat page; the header stays full
568
+ * width. Omitted: the column fills the container (a narrow panel, a sheet).
569
+ * Split layout only.
570
+ */
571
+ threadContentClassName?: string;
572
+
573
+ /** The model + token row under the composer. `false` hides it (e.g. a home
574
+ * page that has no chat yet). Default `true`. */
575
+ showModel?: boolean;
576
+ /** Makes the model name in that row a button (e.g. to the AI settings). */
577
+ onModelClick?: () => void;
578
+ /** Tooltip over the model name (e.g. "Change in Settings → AI Settings"). */
579
+ modelTooltip?: string;
580
+ /** The composer's own ⋯ menu, at the end of its input row (e.g. "Compact
581
+ * Chat Memory", disabled when there is nothing to compact). */
582
+ composerMenuItems?: ActionsMenuItem[];
583
+ /** Controls under the input, at the end of the model row (e.g. "Compact chat
584
+ * memory" as a button rather than in the composer's ⋯). */
585
+ composerFooterActions?: React.ReactNode;
586
+ /**
587
+ * A host control at the start of the composer's context strip — e.g. a chat
588
+ * minimised behind the page ("Continue <chat>"). The strip shows for it even
589
+ * with nothing remembered.
590
+ */
591
+ composerContextLeading?: React.ReactNode;
592
+ /** The composer's prompt. Default: "Enter your Request..." (v2) /
593
+ * "Ask a question..." (classic). Uploads in flight still say so instead. */
594
+ composerPlaceholder?: string;
595
+ /** Mingo's AI edge light travelling around the composer's input card (the
596
+ * header launcher's, `MingoEdgeLight`). Default `false`. */
597
+ composerEdgeLight?: boolean;
598
+ /**
599
+ * How "Rename Chat" in the chat header's ⋯ renames. `'modal'` (default): the
600
+ * Rename Chat modal. `'inline'`: the title turns into a field with its text
601
+ * selected — Enter saves, Escape cancels, blur saves. Applies to the Mingo v2
602
+ * and page headers; chat-list rows and the classic headers keep the modal.
603
+ */
604
+ renameMode?: 'modal' | 'inline';
605
+ /**
606
+ * Whether the composer clears the bottom safe-area inset (the iOS home bar)
607
+ * itself. Default `true`. Pass `false` when the composer sits in a layout
608
+ * that already owns that inset — a dock in a native shell whose root pads
609
+ * it — where the two would add up.
610
+ */
611
+ safeAreaBottom?: boolean;
612
+ /**
613
+ * Called with the new dialog's id when a send from this panel created it:
614
+ * the id the panel lands on while the send that started from "no dialog"
615
+ * is in flight (the composer, a quick-action chip, a clarification card,
616
+ * the Guide launcher prompt). Fired once per dialog, after the commit that
617
+ * shows it. Opening an existing dialog never fires it, and neither does a
618
+ * dialog the host creates itself (outside this panel's sends).
619
+ */
620
+ onDialogCreated?: (dialogId: string) => void;
621
+ /**
622
+ * Host-set ghost text in the composer: the same non-destructive preview a
623
+ * hovered quick-action chip shows (the prompt that clicking it would send),
624
+ * for chips the host draws itself (e.g. a home page beside a docked
625
+ * composer). `null` / omitted = none. The panel's own chip hover wins while
626
+ * it lasts.
627
+ */
628
+ composerPreviewText?: string | null;
524
629
  }
525
630
 
526
631
  // =============================================================================
@@ -891,8 +996,8 @@ function SourceChips({
891
996
  <span className="uppercase text-ods-text-muted text-h6">
892
997
  <TextHold>Sources</TextHold>
893
998
  </span>
894
- {/* One row at every width: a chip that does not fit is cut, never wrapped (a strip's chips fit one row in
895
- the answers measured, and a wrapped skeleton shrinks when the answer ends). */}
999
+ {/* One row at every width: a chip that does not fit is cut, never wrapped or hidden (a strip's chips fit one
1000
+ row in the answers measured, and a wrapped skeleton shrinks when the answer ends). */}
896
1001
  <div className="flex flex-nowrap gap-1.5 overflow-hidden">
897
1002
  <LoadingItems count={skeletonCount}>{() => <SourceChipSkeleton data-loading-item />}</LoadingItems>
898
1003
  </div>
@@ -984,6 +1089,19 @@ export interface EmbeddableChatHandle {
984
1089
  * from the `@` picker, and `text` follows them in the draft.
985
1090
  */
986
1091
  prefillDraft: (draft: ChatPrefillDraft) => void;
1092
+ /**
1093
+ * Same as the v2 list's "What to ask Mingo?", for a host that draws its own entry
1094
+ * (a link beside its quick actions, an item in its own chat-history menu): the
1095
+ * host's `onWhatToAsk` when it has one, else the `whatToAsk` exchange in a new
1096
+ * chat, else a new chat. Leaves the archive.
1097
+ */
1098
+ showWhatToAsk: () => void;
1099
+ /**
1100
+ * Opens the composer's context picker, as its `+` does, for a host that draws its
1101
+ * own entry ("+ Add context" in the composer's context strip). Nothing without a
1102
+ * `contextPicker`.
1103
+ */
1104
+ openContextPicker: () => void;
987
1105
  }
988
1106
 
989
1107
  export const EmbeddableChat = React.forwardRef<EmbeddableChatHandle, EmbeddableChatProps>(
@@ -1037,6 +1155,22 @@ function EmbeddableChatInner({
1037
1155
  onWhatToAsk,
1038
1156
  whatToAsk: whatToAskContent,
1039
1157
  chatMenuExtraItems,
1158
+ rail = 'auto',
1159
+ threadContainer,
1160
+ threadHeaderActions,
1161
+ threadContentClassName,
1162
+ showModel = true,
1163
+ onModelClick,
1164
+ modelTooltip,
1165
+ composerMenuItems,
1166
+ composerFooterActions,
1167
+ composerContextLeading,
1168
+ composerPlaceholder,
1169
+ composerEdgeLight = false,
1170
+ renameMode = 'modal',
1171
+ safeAreaBottom = true,
1172
+ onDialogCreated,
1173
+ composerPreviewText = null,
1040
1174
  handleRef,
1041
1175
  }: EmbeddableChatProps & { handleRef?: React.Ref<EmbeddableChatHandle> }) {
1042
1176
  // `shell` 'none' / 'inline' means the consumer hosts us inside their own panel
@@ -1045,6 +1179,11 @@ function EmbeddableChatInner({
1045
1179
  // we don't double-up with the host's behaviour.
1046
1180
  const shellLess = shell !== 'drawer';
1047
1181
  const isV2 = appearance === CHAT_APPEARANCE.V2;
1182
+ // Split: the composer renders here, the header + thread in the host's node
1183
+ // (or nowhere). See `threadContainer`.
1184
+ const splitMode = threadContainer !== undefined;
1185
+ // The host draws the chat list, so the panel never does (see `rail`).
1186
+ const hostOwnsList = rail === 'none' || splitMode;
1048
1187
  const runtime = useRequiredChatRuntime();
1049
1188
  // Optional on embedders (platform-agnostic); '' is a harmless sentinel for the
1050
1189
  // `ask-ai:open-with-ref` event filter below. Deliberately NOT the hub's
@@ -1081,9 +1220,14 @@ function EmbeddableChatInner({
1081
1220
  });
1082
1221
 
1083
1222
  // Suppress chat input auto-focus on touch devices (avoids popping the
1084
- // on-screen keyboard during the bottom-sheet open animation).
1223
+ // on-screen keyboard during the bottom-sheet open animation), and in an inline
1224
+ // host: a composer that is part of the layout mounts once, on whatever page the
1225
+ // session starts on, so focusing it there takes the page's focus for no reason —
1226
+ // and in WebKit a focused editor's caret alone keeps an idle page busy (about
1227
+ // 3x its idle CPU, measured 2026-10-21). Opening a drawer is a request to type;
1228
+ // a layout mounting is not.
1085
1229
  const [autoFocusInput] = useState(() => {
1086
- if (typeof window === 'undefined') return false;
1230
+ if (typeof window === 'undefined' || shell === 'inline') return false;
1087
1231
  return !window.matchMedia('(pointer: coarse)').matches;
1088
1232
  });
1089
1233
 
@@ -1440,11 +1584,16 @@ function EmbeddableChatInner({
1440
1584
  const scopeDialogId = activeDialogId ?? null;
1441
1585
  const [composerScope, setComposerScope] = useState({ dialogId: scopeDialogId, mode: activeMode });
1442
1586
  const [composerKey, setComposerKey] = useState(0);
1587
+ // The dialog a send of this panel created (`onDialogCreated`) — exactly the
1588
+ // `named` transition below, kept for the effect that tells the host.
1589
+ const [createdDialogId, setCreatedDialogId] = useState<string | null>(null);
1443
1590
  if (composerScope.dialogId !== scopeDialogId || composerScope.mode !== activeMode) {
1444
1591
  const named =
1445
1592
  namingNewChat && composerScope.dialogId == null && scopeDialogId != null && composerScope.mode === activeMode;
1446
1593
  setComposerScope({ dialogId: scopeDialogId, mode: activeMode });
1447
- if (!named) {
1594
+ if (named) {
1595
+ setCreatedDialogId(scopeDialogId);
1596
+ } else {
1448
1597
  setComposerKey(k => k + 1);
1449
1598
  setContextItems(NO_CONTEXT_ITEMS);
1450
1599
  setContextPickerOpen(false);
@@ -1455,6 +1604,16 @@ function EmbeddableChatInner({
1455
1604
  mentionKeysRef.current.clear();
1456
1605
  clearAttachments();
1457
1606
  }, [composerKey, clearAttachments]);
1607
+ // Told after the commit that shows the new dialog: the host typically
1608
+ // navigates on it, which must not happen while this panel renders. Keyed on
1609
+ // the id alone, so a host callback that changes identity is not re-told.
1610
+ const onDialogCreatedRef = useRef(onDialogCreated);
1611
+ useEffect(() => {
1612
+ onDialogCreatedRef.current = onDialogCreated;
1613
+ });
1614
+ useEffect(() => {
1615
+ if (createdDialogId != null) onDialogCreatedRef.current?.(createdDialogId);
1616
+ }, [createdDialogId]);
1458
1617
 
1459
1618
  // Map each entity type to its backend mention marker (host-declared on the
1460
1619
  // entity type). Drives the committed `@marker:id` token; missing markers fall
@@ -1592,6 +1751,8 @@ function EmbeddableChatInner({
1592
1751
  // `sendPrompt` goes through a ref: what it sends with is declared further
1593
1752
  // down (`sendPromptRef.current` is set next to `handleSend`).
1594
1753
  const sendPromptRef = useRef<(text: string) => void>(() => {});
1754
+ // The "What to ask?" entry as of the last render, for the handle (`showWhatToAsk`).
1755
+ const whatToAskEntryRef = useRef<() => void>(() => {});
1595
1756
  const chatPanelHandle = useMemo<ChatPanelHandle>(
1596
1757
  () => ({
1597
1758
  closeChat: handleNavigationClose,
@@ -2041,6 +2202,11 @@ function EmbeddableChatInner({
2041
2202
  // detached from its card). `portalHost` can't serve here — it is
2042
2203
  // `display: contents` and has no box to measure.
2043
2204
  const [panelBoundary, setPanelBoundary] = useState<HTMLDivElement | null>(null);
2205
+ // The same pair for the thread when it renders into the host's node
2206
+ // (`threadContainer`): its menus portal and collide inside the thread, not
2207
+ // inside the composer's dock.
2208
+ const [threadPortalHost, setThreadPortalHost] = useState<HTMLDivElement | null>(null);
2209
+ const [threadBoundary, setThreadBoundary] = useState<HTMLDivElement | null>(null);
2044
2210
 
2045
2211
  // ── Split (wide) Mingo layout ─────────────────────────────────────────────
2046
2212
  // The panel measures its own width and, in Mingo mode, promotes the inline
@@ -2136,7 +2302,9 @@ function EmbeddableChatInner({
2136
2302
  const splitEligible = historyListMode;
2137
2303
  // Embedded previews (hero demo tabs) always use the compact single-column
2138
2304
  // header, never the two-column split — so `previewMode` opts out of `wideMingo`.
2139
- const wideMingo = splitEligible && canSplit && !previewMode;
2305
+ // …and a host that owns the list (`rail="none"`) never gets either wide
2306
+ // layout: both exist to put the panel's own list beside the chat.
2307
+ const wideMingo = splitEligible && canSplit && !previewMode && !hostOwnsList;
2140
2308
  const splitActive = wideMingo && !railCollapsed;
2141
2309
  // Keep the "Current Chats" rail (header cell + list column) mounted through
2142
2310
  // its width/opacity collapse so it eases away instead of hard-cutting; both
@@ -2181,8 +2349,10 @@ function EmbeddableChatInner({
2181
2349
  dialogs.length === 0 &&
2182
2350
  !dialogsInitialLoading &&
2183
2351
  !mingoCaps.searchQuery;
2352
+ // Never with `rail="none"`: the list is the host's, so no conversation open
2353
+ // means the new chat, not a list screen.
2184
2354
  const stackedListView =
2185
- isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
2355
+ isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped && !hostOwnsList;
2186
2356
 
2187
2357
  // Shared header derivations — consumed by the stacked `ChatPanelHeader`, its
2188
2358
  // mobile fallback, and the desktop split header's right cell, so the title /
@@ -2395,8 +2565,12 @@ function EmbeddableChatInner({
2395
2565
  mentionKeysRef.current.clear();
2396
2566
  setPendingDraft({ text, mentions: mentions.slice(0, contextMaxItems) });
2397
2567
  },
2568
+ showWhatToAsk: () => whatToAskEntryRef.current(),
2569
+ openContextPicker: () => {
2570
+ if (contextPicker) openContextPicker();
2571
+ },
2398
2572
  }),
2399
- [resetToNewChat, contextMaxItems],
2573
+ [resetToNewChat, contextMaxItems, contextPicker, openContextPicker],
2400
2574
  );
2401
2575
 
2402
2576
  // Desktop split header ⋯ menu (active, non-archived conversation only).
@@ -2407,6 +2581,35 @@ function EmbeddableChatInner({
2407
2581
  onArchive: headerOnArchive,
2408
2582
  });
2409
2583
 
2584
+ // Inline rename (`renameMode="inline"`) in the Mingo v2 / page header: the
2585
+ // title becomes a field. Held as the id of the chat being renamed, so opening
2586
+ // another chat drops the field without an effect.
2587
+ const [inlineRenameId, setInlineRenameId] = useState<string | null>(null);
2588
+ const inlineRenaming = inlineRenameId != null && inlineRenameId === activeDialogId;
2589
+ const mingoHeaderOnRename =
2590
+ renameMode === 'inline' && headerOnRename && activeDialogId
2591
+ ? () => setInlineRenameId(activeDialogId)
2592
+ : headerOnRename;
2593
+ const submitInlineRename = (value: string) => {
2594
+ setInlineRenameId(null);
2595
+ const target = activeDialog;
2596
+ const next = value.trim();
2597
+ // Empty or unchanged: nothing to save, the title simply comes back.
2598
+ if (!target || !next || next === target.title) return;
2599
+ renameDialog(target.id, next).catch((err: unknown) => {
2600
+ console.error('[EmbeddableChat] inline rename failed:', err);
2601
+ });
2602
+ };
2603
+ const cancelInlineRename = () => setInlineRenameId(null);
2604
+ // The v2 header's ⋯, and the page header's (`threadContainer`): the split
2605
+ // header's, with the inline rename when asked.
2606
+ const mingoHeaderMenuItems = chatDialogMenuItems({
2607
+ onCopyLink: headerOnCopyLink,
2608
+ onRename: mingoHeaderOnRename,
2609
+ onCompact: headerOnCompact,
2610
+ onArchive: headerOnArchive,
2611
+ });
2612
+
2410
2613
  // Narrow (single-column) header. The Mingo empty state splits into a "Current
2411
2614
  // Chats" list header (search + archive, no back) and a "New Chat" compose
2412
2615
  // header (back to the list); conversations + guide keep the shared header
@@ -2416,15 +2619,17 @@ function EmbeddableChatInner({
2416
2619
  // would be half of the empty screen the skip exists to remove. The
2417
2620
  // else-branch header keeps the assistant name and the archive entry point.
2418
2621
  const narrowMingoEmpty = isMingoMode && !hasConversation && !archiveOpen && !emptyListSkipped;
2622
+ // With the list the host's (`rail="none"`) the empty state IS the new chat,
2623
+ // and there is no list to go back to.
2419
2624
  const narrowHeaderProps: ChatPanelHeaderProps = narrowMingoEmpty
2420
- ? composeOpen
2625
+ ? composeOpen || hostOwnsList
2421
2626
  ? {
2422
- showBack: true,
2627
+ showBack: !hostOwnsList,
2423
2628
  title: freshConversationTitle,
2424
2629
  subtitle: headerUserName,
2425
2630
  avatar: headerAvatar,
2426
2631
  backAriaLabel: 'Back to chats',
2427
- onBack: () => setComposeOpen(false),
2632
+ onBack: hostOwnsList ? undefined : () => setComposeOpen(false),
2428
2633
  onClose: closeControl,
2429
2634
  }
2430
2635
  : {
@@ -2462,6 +2667,14 @@ function EmbeddableChatInner({
2462
2667
  if (archiveOpen) closeArchive();
2463
2668
  action();
2464
2669
  };
2670
+ // The list's "What to ask Mingo?" entry, also the host's (`showWhatToAsk`): the
2671
+ // suggestions a new chat opens on, unless the host has a surface of its own.
2672
+ const openWhatToAsk = () => {
2673
+ leaveArchiveThen(onWhatToAsk ?? (whatToAskContent ? requestWhatToAsk : handleNewChat))();
2674
+ };
2675
+ useEffect(() => {
2676
+ whatToAskEntryRef.current = openWhatToAsk;
2677
+ });
2465
2678
  const mingoRailProps = {
2466
2679
  dialogs,
2467
2680
  // The archive takes the chat column: the open chat stays selected (closing
@@ -2475,10 +2688,7 @@ function EmbeddableChatInner({
2475
2688
  onNewChat: leaveArchiveThen(handleNewChat),
2476
2689
  onOpenArchive: headerOnOpenArchive && (archiveOpen ? closeArchive : headerOnOpenArchive),
2477
2690
  archiveActive: archiveOpen,
2478
- // The suggestions a new chat opens on, unless the host has a surface of its own.
2479
- onWhatToAsk: () => {
2480
- leaveArchiveThen(onWhatToAsk ?? (whatToAskContent ? requestWhatToAsk : handleNewChat))();
2481
- },
2691
+ onWhatToAsk: openWhatToAsk,
2482
2692
  statusOf: dialogStatusOf,
2483
2693
  onRequestRename: mingoCaps.canRename ? setRenameTarget : undefined,
2484
2694
  onRequestArchive: mingoCaps.canArchive ? setArchiveTarget : undefined,
@@ -2510,10 +2720,22 @@ function EmbeddableChatInner({
2510
2720
  subtitle={archiveOpen ? undefined : headerPersonName}
2511
2721
  avatar={archiveOpen ? undefined : headerAvatar}
2512
2722
  // Wide: shows / hides the list beside the chat. Narrow: back to the
2513
- // list, the only one of the two that fits.
2514
- onToggleList={wideMingo ? toggleRailCollapsed : headerShowBack ? headerOnBack : () => setComposeOpen(false)}
2723
+ // list, the only one of the two that fits. None when the list is the
2724
+ // host's (`rail="none"`).
2725
+ onToggleList={
2726
+ hostOwnsList
2727
+ ? undefined
2728
+ : wideMingo
2729
+ ? toggleRailCollapsed
2730
+ : headerShowBack
2731
+ ? headerOnBack
2732
+ : () => setComposeOpen(false)
2733
+ }
2515
2734
  listOpen={splitActive}
2516
- menuItems={headerShowBack && !isViewingArchived && !archiveOpen ? splitHeaderMenuItems : []}
2735
+ menuItems={headerShowBack && !isViewingArchived && !archiveOpen ? mingoHeaderMenuItems : []}
2736
+ renaming={inlineRenaming && !archiveOpen}
2737
+ onRenameSubmit={submitInlineRename}
2738
+ onRenameCancel={cancelInlineRename}
2517
2739
  extraMenuItems={isViewingArchived || archiveOpen ? undefined : chatMenuExtraItems}
2518
2740
  onRestore={isViewingArchived && !archiveOpen ? headerOnRestore : undefined}
2519
2741
  // Only while the list and the chat both fit: narrow, the toggle is
@@ -2533,12 +2755,323 @@ function EmbeddableChatInner({
2533
2755
  </div>
2534
2756
  ) : null;
2535
2757
 
2758
+ // ── The parts both layouts render (see `threadContainer`) ─────────────────
2759
+ // v2: the archive opens in the chat column under the chat's header; the
2760
+ // list stays, and "Chat Archive" there toggles back.
2761
+ const archiveListNode = (
2762
+ <MingoArchiveList
2763
+ dialogs={archivedDialogs}
2764
+ onSelectDialog={handleArchivedSelect}
2765
+ isLoading={archivedLoading}
2766
+ hasMore={archivedCursor != null}
2767
+ isLoadingMore={archivedPending}
2768
+ onLoadMore={() => {
2769
+ void loadArchivedPage(archivedCursor ?? undefined);
2770
+ }}
2771
+ />
2772
+ );
2773
+
2774
+ // The thread — or a new chat's welcome — scrolling above the composer.
2775
+ const threadArea = (
2776
+ <div
2777
+ ref={galleryPanelRef}
2778
+ data-testid="chat-content-panel"
2779
+ className={cn(
2780
+ 'flex min-h-0 flex-1 flex-col p-[var(--spacing-system-m)]',
2781
+ // With a host block above the composer the thread keeps room
2782
+ // for a line and the working status: the block gives way
2783
+ // instead (below), so the status never lands on it.
2784
+ hasAboveComposer && 'min-h-32',
2785
+ )}
2786
+ >
2787
+ <div key={contentViewKey} className="flex min-h-0 flex-1 flex-col duration-200 animate-in fade-in-0">
2788
+ {hasConversation ? (
2789
+ <div className="flex min-h-0 flex-1 flex-col">
2790
+ {/* While the thread loads the list draws its own loading
2791
+ state, in the SAME box (`fullWidth`, the panel wrapper
2792
+ above already pads; in the split layout the host's column
2793
+ too). In `previewMode` the chat lives in a fixed-height host
2794
+ box (e.g. the Mingo hero demo): `fill` top-anchors and clips
2795
+ the loading rows so they read as "the whole panel is
2796
+ loading" and never scroll. */}
2797
+ <ChatMessageList
2798
+ messages={messages}
2799
+ isLoading={messagesInitialLoading}
2800
+ fill={previewMode}
2801
+ // v2 thread: names without the colon, 24px
2802
+ // faces, 16px between messages (shared with fae v2).
2803
+ appearance={appearance}
2804
+ isTyping={chatLoading}
2805
+ // Sticky footer for approvals the host lifted out of the
2806
+ // thread — see the prop's docblock.
2807
+ pendingApprovals={pendingApprovals}
2808
+ // Real drawer: the library's smart follow. Passive in-page
2809
+ // demo (previewMode): deterministic hard pin instead — a
2810
+ // scripted assistant-only stream from a cold mount never
2811
+ // satisfies the library's "at bottom" gate, so the reply
2812
+ // landed below the fold. `pinBottom` snaps to bottom on
2813
+ // every frame; identical mechanism to the Fae demo box, so
2814
+ // both surfaces behave 1:1.
2815
+ autoScroll={!previewMode}
2816
+ pinBottom={previewMode}
2817
+ // Passive in-page demos (previewMode) let the surrounding
2818
+ // page scroll over the thread; the real drawer keeps
2819
+ // containment (deck slide-scroll fix).
2820
+ overscrollContain={!previewMode}
2821
+ assistantType="mingo"
2822
+ assistantIcon={mingoAssistantIcon}
2823
+ renderEntityCard={renderEntityCard}
2824
+ resolveContextIcon={resolveContextIcon}
2825
+ renderContextItem={renderContextItem}
2826
+ renderMention={renderMention}
2827
+ renderAfterMessage={renderMessageSources}
2828
+ // Gated on `chatLoading` for the same reason the composer
2829
+ // is: no second send while a turn is in flight. Passive
2830
+ // demo hosts (previewMode) stay read-only.
2831
+ onAskSelect={chatLoading || previewMode ? undefined : handleAskSelect}
2832
+ NavLinkAnchor={NavLinkAnchorViaRuntime}
2833
+ // Real Mingo drawer: hide the message-list scrollbar
2834
+ // (scroll stays functional). Scoped here via `className`
2835
+ // instead of `ChatMessageList` itself, so other list
2836
+ // consumers (host chat, tickets) keep their thin bar.
2837
+ //
2838
+ // `previewMode` (the passive in-page demo) instead:
2839
+ // • KEEP the default thin scrollbar — the "elevator" —
2840
+ // so the Mingo demo's scroll controls match the Fae
2841
+ // demo box (which renders the default ChatMessageList
2842
+ // scrollbar) 1:1.
2843
+ // • Re-enable pointer events on the scroller: previewMode
2844
+ // puts `pointer-events-none` on the whole panel (line
2845
+ // ~1981) so the demo doesn't trap clicks, but that also
2846
+ // killed wheel/touch scroll on the thread (the Mingo
2847
+ // embed couldn't scroll while the Fae box could). Only
2848
+ // the scroller re-enables; composer + chrome stay inert.
2849
+ className={
2850
+ previewMode
2851
+ ? 'pointer-events-auto flex-1'
2852
+ : 'flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden'
2853
+ }
2854
+ // No inner `px`/`pb`: the panel wrapper already pads with
2855
+ // `p-[var(--spacing-system-m)]`. The default content class
2856
+ // adds `px-[var(--spacing-system-m)]` + `pb-…xs`, which
2857
+ // double-inset the thread; `pb-0` overrides via twMerge.
2858
+ contentClassName={cn('max-w-none pb-0', splitMode && threadContentClassName)}
2859
+ fullWidth
2860
+ hasNextPage={hasMoreMessages}
2861
+ isFetchingNextPage={isMessagesLoading}
2862
+ onLoadMore={loadMoreMessages}
2863
+ />
2864
+ </div>
2865
+ ) : activeMode === 'mingo' ? (
2866
+ /* Figma node 7532:222444 — default (Mingo-mode) empty state:
2867
+ centred greeting + capability grid + Guide-chat promo +
2868
+ quick-action chips. Guide mode keeps the slash-command
2869
+ onboarding list below. */
2870
+ <MingoWelcome
2871
+ onStartGuideChat={effectiveModes.guide ? () => handleActiveModeChange('guide') : undefined}
2872
+ historyPageSize={historyPageSize}
2873
+ {...mingoWelcome}
2874
+ // History now lives in its own list view (the wide rail or
2875
+ // the narrow "Current Chats" list), so the welcome is always
2876
+ // the new-user compose surface: greeting + grid + promo +
2877
+ // primary Guide chip.
2878
+ hasExistingChats={false}
2879
+ // Hover/focus PREVIEWS the action's full prompt as ghost text
2880
+ // in the empty composer (see `quickActionPreview` /
2881
+ // `ChatInput.previewText`). Wired after the `{...mingoWelcome}`
2882
+ // spread so the host can't override it.
2883
+ onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
2884
+ onQuickActionHoverEnd={() => setQuickActionPreview(null)}
2885
+ // A built-in agent caps the quick-action wall at 2 rows;
2886
+ // this is the Mingo surface, so fall back to 'mingo'.
2887
+ agentSlug={activeAgentSlug ?? 'mingo'}
2888
+ />
2889
+ ) : (
2890
+ /* Figma node 7532:328214 — Guide-mode empty state: greeting
2891
+ + slash-command onboarding list share one scroll region,
2892
+ with a pinned quick-action chip row above the composer. */
2893
+ <GuideWelcome
2894
+ // Admin/host greeting customises the guide subtitle; an
2895
+ // explicit `guideWelcome.subtitle` still wins (spread below).
2896
+ subtitle={effectiveGreeting ?? undefined}
2897
+ // While the admin greeting is still being fetched, render a
2898
+ // subtitle skeleton instead of flashing empty → text.
2899
+ subtitleLoading={emptyStateLoading}
2900
+ {...guideWelcome}
2901
+ // Agent identity (name → title, icon → empty-state glyph)
2902
+ // wins over the host `guideWelcome` spread + built-in
2903
+ // defaults; falls back to the host value when no agent is
2904
+ // active. Placed after the spread so resolution is
2905
+ // deterministic.
2906
+ title={effectiveAssistantName ?? guideWelcome?.title}
2907
+ icon={effectiveAssistantIcon ?? guideWelcome?.icon}
2908
+ // Admin "try-asking chips" → Guide quick-action chips.
2909
+ // Precedence: when an AGENT is active and its fetched chips
2910
+ // arrived, the agent's chips win — the host array is the
2911
+ // platform default, not the agent's. (`agentConfigUrl` is
2912
+ // the same derived value that drives the config fetch, so
2913
+ // this can never disagree with what was fetched; while the
2914
+ // fetch is in-flight the fetched list is [] and host chips
2915
+ // show.) Outside agent mode the host-provided
2916
+ // `guideWelcome.quickActions` wins as before.
2917
+ quickActions={
2918
+ agentConfigUrl && guideSuggestedActions.length > 0
2919
+ ? guideSuggestedActions
2920
+ : (guideWelcome?.quickActions ?? guideSuggestedActions)
2921
+ }
2922
+ // Quick-action chips SEND the prompt immediately on click.
2923
+ onQuickAction={action => {
2924
+ setQuickActionPreview(null);
2925
+ handleSend(action.prompt ?? action.label);
2926
+ }}
2927
+ // Hover/focus PREVIEWS the action's full prompt as ghost text
2928
+ // in the empty composer (the chip label is short; this reveals
2929
+ // what will be sent). Declarative + non-destructive — see
2930
+ // `quickActionPreview` / `ChatInput.previewText`.
2931
+ onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
2932
+ onQuickActionHoverEnd={() => setQuickActionPreview(null)}
2933
+ // In agent mode a built-in agent (fae/mingo) caps the wall at
2934
+ // 2 rows; host/guide mode (no active agent) keeps the default.
2935
+ agentSlug={activeAgentSlug}
2936
+ >
2937
+ {/* Figma node 7363:205938 — single-column slash-command
2938
+ list. No own scroll (GuideWelcome's region scrolls); the
2939
+ rounded-md frame holds the cards on the dark surface. */}
2940
+ {(chipCommands.length > 0 || !commandsLoaded) && (
2941
+ <div className="shrink-0 overflow-hidden rounded-md border border-ods-border">
2942
+ {!commandsLoaded && chipCommands.length === 0 && (
2943
+ <LoadingItems count={MINGO_ONBOARDING_SKELETON_ROWS}>
2944
+ {i => <MingoOnboardingCard loading data-loading-item skeletonIndex={i} title="" />}
2945
+ </LoadingItems>
2946
+ )}
2947
+ {chipCommands.map(cmd => {
2948
+ const Icon = resolveIcon(cmd.iconName);
2949
+ const cmdId = cmd.id;
2950
+ const label = cmd.label ?? `/${cmdId}`;
2951
+ const cardActions = cmd.actions.map(action => ({
2952
+ id: action.id,
2953
+ label: action.label,
2954
+ onClick: () => dispatchSlashCommandAction(action.id, cmdId, chatInputRef),
2955
+ }));
2956
+ return (
2957
+ <MingoOnboardingCard
2958
+ key={cmdId}
2959
+ icon={<Icon size={16} />}
2960
+ title={label}
2961
+ slashCommand={`/${cmdId}`}
2962
+ description={cmd.description}
2963
+ actions={cardActions}
2964
+ data-loading-item
2965
+ />
2966
+ );
2967
+ })}
2968
+ </div>
2969
+ )}
2970
+ </GuideWelcome>
2971
+ )}
2972
+ </div>
2973
+ </div>
2974
+ );
2975
+
2976
+ // Host block pinned above the composer (`aboveComposer`): the thread's own
2977
+ // bottom padding separates them, the composer's horizontal inset is repeated
2978
+ // so the two line up. It may shrink: in a short panel the block (which scrolls
2979
+ // its own content, `min-h-0`) yields height to the thread.
2980
+ const aboveComposerNode = hasAboveComposer ? (
2981
+ <div
2982
+ data-testid="chat-above-composer"
2983
+ className="flex min-h-0 shrink flex-col px-[var(--spacing-system-m)] pb-[var(--spacing-system-m)]"
2984
+ >
2985
+ {aboveComposer}
2986
+ </div>
2987
+ ) : null;
2988
+
2989
+ const attachmentStrip = (
2990
+ <ChatAttachmentChipStrip attachments={stagedAttachments} onRemove={removeAttachment} disabled={chatLoading} />
2991
+ );
2992
+
2993
+ const composerNode = (
2994
+ <ChatComposer
2995
+ key={composerKey}
2996
+ archived={isViewingArchived}
2997
+ lock={composerLock}
2998
+ inputRef={chatInputRef}
2999
+ onSend={handleSend}
3000
+ onStop={stopMessage}
3001
+ sending={chatLoading || hasInflightUploads}
3002
+ placeholder={
3003
+ hasInflightUploads
3004
+ ? 'Waiting for uploads to finish…'
3005
+ : (composerPlaceholder ?? (isV2 ? 'Enter your Request...' : 'Ask a question...'))
3006
+ }
3007
+ autoFocus={previewMode ? false : autoFocusInput}
3008
+ slashCommands={slashCommandsProp}
3009
+ previewText={quickActionPreview ?? composerPreviewText ?? undefined}
3010
+ safeAreaBottom={safeAreaBottom}
3011
+ edgeLight={composerEdgeLight}
3012
+ showAttachmentButton={attachmentsEnabled && activeMode === 'guide'}
3013
+ attachmentsCount={stagedAttachments.length}
3014
+ onAddFiles={addAttachmentFiles}
3015
+ attachmentsDisabled={chatLoading}
3016
+ contextPicker={contextPickerForMode}
3017
+ selectedContextItems={contextItems}
3018
+ onToggleContextItem={toggleContextItem}
3019
+ onRemoveContextItem={removeContextItem}
3020
+ contextMemoryItems={contextMemory?.items}
3021
+ contextLeading={composerContextLeading}
3022
+ onRemoveContextMemoryItem={contextMemory?.onRemove}
3023
+ contextMemoryPending={contextMemory?.pending}
3024
+ contextPickerOpen={contextPickerOpen}
3025
+ onOpenContextPicker={openContextPicker}
3026
+ onCloseContextPicker={closeContextPicker}
3027
+ mentionQuery={mentionQuery}
3028
+ onMentionQueryChange={handleMentionQueryChange}
3029
+ onValueChange={handleContextValueChange}
3030
+ menuItems={composerMenuItems}
3031
+ footerActions={composerFooterActions}
3032
+ model={
3033
+ showModel
3034
+ ? {
3035
+ provider: currentProvider ?? 'anthropic',
3036
+ modelName: currentModelLabel ?? 'Claude',
3037
+ usedTokens:
3038
+ currentInputTokens != null ? (currentInputTokens ?? 0) + (currentOutputTokens ?? 0) : undefined,
3039
+ contextWindow: currentContextWindowMaxTokens ?? undefined,
3040
+ inputTokens: currentInputTokens ?? undefined,
3041
+ outputTokens: currentOutputTokens ?? undefined,
3042
+ hitRatePct: currentCacheHitRatePct ?? undefined,
3043
+ breakdown: currentUsageBreakdown ?? undefined,
3044
+ onModelClick,
3045
+ modelTooltip,
3046
+ }
3047
+ : undefined
3048
+ }
3049
+ />
3050
+ );
3051
+
3052
+ // Rename / Archive / Unarchive chat modals (Figma 7592:225962, 7592:226181).
3053
+ // Triggered from the header ⋯ and the dialog-history rows; rendered inside the
3054
+ // panel so they overlay the chat.
3055
+ const dialogModals = (
3056
+ <ChatDialogModals
3057
+ renameTarget={renameTarget}
3058
+ setRenameTarget={setRenameTarget}
3059
+ onConfirmRename={handleConfirmRename}
3060
+ archiveTarget={archiveTarget}
3061
+ setArchiveTarget={setArchiveTarget}
3062
+ onConfirmArchive={handleConfirmArchive}
3063
+ restoreTarget={restoreTarget}
3064
+ setRestoreTarget={setRestoreTarget}
3065
+ onConfirmRestore={handleConfirmRestore}
3066
+ />
3067
+ );
3068
+
2536
3069
  // Chat body — defined once, then rendered inside whichever shell applies.
2537
3070
  // Radix overlays (⋯ menus, tooltips) portal into `portalHost` — a node inside
2538
3071
  // this panel — so they inherit the drawer's stacking context and need only a
2539
3072
  // small, local z-index instead of escalating to beat the drawer at the
2540
3073
  // document root. See `PortalContainerContext`.
2541
- const body = (
3074
+ const classicBody = (
2542
3075
  // The whole panel reads the appearance (the composer's footer too), not
2543
3076
  // only the thread `ChatMessageList` provides it to.
2544
3077
  <ChatAppearanceContext.Provider value={appearance}>
@@ -2823,16 +3356,7 @@ function EmbeddableChatInner({
2823
3356
  {isV2 && archiveOpen ? (
2824
3357
  // v2: the archive opens in the chat column under the chat's
2825
3358
  // header; the list stays, and "Chat Archive" there toggles back.
2826
- <MingoArchiveList
2827
- dialogs={archivedDialogs}
2828
- onSelectDialog={handleArchivedSelect}
2829
- isLoading={archivedLoading}
2830
- hasMore={archivedCursor != null}
2831
- isLoadingMore={archivedPending}
2832
- onLoadMore={() => {
2833
- void loadArchivedPage(archivedCursor ?? undefined);
2834
- }}
2835
- />
3359
+ archiveListNode
2836
3360
  ) : stackedListView && isV2 ? (
2837
3361
  <MingoChatRail
2838
3362
  {...mingoRailProps}
@@ -2879,280 +3403,10 @@ function EmbeddableChatInner({
2879
3403
  />
2880
3404
  ) : (
2881
3405
  <>
2882
- <div
2883
- ref={galleryPanelRef}
2884
- data-testid="chat-content-panel"
2885
- className={cn(
2886
- 'flex min-h-0 flex-1 flex-col p-[var(--spacing-system-m)]',
2887
- // With a host block above the composer the thread keeps room
2888
- // for a line and the working status: the block gives way
2889
- // instead (below), so the status never lands on it.
2890
- hasAboveComposer && 'min-h-32',
2891
- )}
2892
- >
2893
- <div
2894
- key={contentViewKey}
2895
- className="flex min-h-0 flex-1 flex-col duration-200 animate-in fade-in-0"
2896
- >
2897
- {hasConversation ? (
2898
- <div className="flex min-h-0 flex-1 flex-col">
2899
- {/* While the thread loads the list draws its own loading
2900
- state, in the SAME box (`fullWidth`, the panel wrapper
2901
- above already pads). In `previewMode` the chat lives in a
2902
- fixed-height host box (e.g. the Mingo hero demo): `fill`
2903
- top-anchors and clips the loading rows so they read as
2904
- "the whole panel is loading" and never scroll. */}
2905
- <ChatMessageList
2906
- messages={messages}
2907
- isLoading={messagesInitialLoading}
2908
- fill={previewMode}
2909
- // v2 thread: names without the colon, 24px
2910
- // faces, 16px between messages (shared with fae v2).
2911
- appearance={appearance}
2912
- isTyping={chatLoading}
2913
- // Sticky footer for approvals the host lifted out of the
2914
- // thread — see the prop's docblock.
2915
- pendingApprovals={pendingApprovals}
2916
- // Real drawer: the library's smart follow. Passive in-page
2917
- // demo (previewMode): deterministic hard pin instead — a
2918
- // scripted assistant-only stream from a cold mount never
2919
- // satisfies the library's "at bottom" gate, so the reply
2920
- // landed below the fold. `pinBottom` snaps to bottom on
2921
- // every frame; identical mechanism to the Fae demo box, so
2922
- // both surfaces behave 1:1.
2923
- autoScroll={!previewMode}
2924
- pinBottom={previewMode}
2925
- // Passive in-page demos (previewMode) let the surrounding
2926
- // page scroll over the thread; the real drawer keeps
2927
- // containment (deck slide-scroll fix).
2928
- overscrollContain={!previewMode}
2929
- assistantType="mingo"
2930
- assistantIcon={mingoAssistantIcon}
2931
- renderEntityCard={renderEntityCard}
2932
- resolveContextIcon={resolveContextIcon}
2933
- renderContextItem={renderContextItem}
2934
- renderMention={renderMention}
2935
- renderAfterMessage={renderMessageSources}
2936
- // Gated on `chatLoading` for the same reason the composer
2937
- // is: no second send while a turn is in flight. Passive
2938
- // demo hosts (previewMode) stay read-only.
2939
- onAskSelect={chatLoading || previewMode ? undefined : handleAskSelect}
2940
- NavLinkAnchor={NavLinkAnchorViaRuntime}
2941
- // Real Mingo drawer: hide the message-list scrollbar
2942
- // (scroll stays functional). Scoped here via `className`
2943
- // instead of `ChatMessageList` itself, so other list
2944
- // consumers (host chat, tickets) keep their thin bar.
2945
- //
2946
- // `previewMode` (the passive in-page demo) instead:
2947
- // • KEEP the default thin scrollbar — the "elevator" —
2948
- // so the Mingo demo's scroll controls match the Fae
2949
- // demo box (which renders the default ChatMessageList
2950
- // scrollbar) 1:1.
2951
- // • Re-enable pointer events on the scroller: previewMode
2952
- // puts `pointer-events-none` on the whole panel (line
2953
- // ~1981) so the demo doesn't trap clicks, but that also
2954
- // killed wheel/touch scroll on the thread (the Mingo
2955
- // embed couldn't scroll while the Fae box could). Only
2956
- // the scroller re-enables; composer + chrome stay inert.
2957
- className={
2958
- previewMode
2959
- ? 'pointer-events-auto flex-1'
2960
- : 'flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden'
2961
- }
2962
- // No inner `px`/`pb`: the panel wrapper already pads with
2963
- // `p-[var(--spacing-system-m)]`. The default content class
2964
- // adds `px-[var(--spacing-system-m)]` + `pb-…xs`, which
2965
- // double-inset the thread; `pb-0` overrides via twMerge.
2966
- contentClassName="max-w-none pb-0"
2967
- fullWidth
2968
- hasNextPage={hasMoreMessages}
2969
- isFetchingNextPage={isMessagesLoading}
2970
- onLoadMore={loadMoreMessages}
2971
- />
2972
- </div>
2973
- ) : activeMode === 'mingo' ? (
2974
- /* Figma node 7532:222444 — default (Mingo-mode) empty state:
2975
- centred greeting + capability grid + Guide-chat promo +
2976
- quick-action chips. Guide mode keeps the slash-command
2977
- onboarding list below. */
2978
- <MingoWelcome
2979
- onStartGuideChat={
2980
- effectiveModes.guide ? () => handleActiveModeChange('guide') : undefined
2981
- }
2982
- historyPageSize={historyPageSize}
2983
- {...mingoWelcome}
2984
- // History now lives in its own list view (the wide rail or
2985
- // the narrow "Current Chats" list), so the welcome is always
2986
- // the new-user compose surface: greeting + grid + promo +
2987
- // primary Guide chip.
2988
- hasExistingChats={false}
2989
- // Hover/focus PREVIEWS the action's full prompt as ghost text
2990
- // in the empty composer (see `quickActionPreview` /
2991
- // `ChatInput.previewText`). Wired after the `{...mingoWelcome}`
2992
- // spread so the host can't override it.
2993
- onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
2994
- onQuickActionHoverEnd={() => setQuickActionPreview(null)}
2995
- // A built-in agent caps the quick-action wall at 2 rows;
2996
- // this is the Mingo surface, so fall back to 'mingo'.
2997
- agentSlug={activeAgentSlug ?? 'mingo'}
2998
- />
2999
- ) : (
3000
- /* Figma node 7532:328214 — Guide-mode empty state: greeting
3001
- + slash-command onboarding list share one scroll region,
3002
- with a pinned quick-action chip row above the composer. */
3003
- <GuideWelcome
3004
- // Admin/host greeting customises the guide subtitle; an
3005
- // explicit `guideWelcome.subtitle` still wins (spread below).
3006
- subtitle={effectiveGreeting ?? undefined}
3007
- // While the admin greeting is still being fetched, render a
3008
- // subtitle skeleton instead of flashing empty → text.
3009
- subtitleLoading={emptyStateLoading}
3010
- {...guideWelcome}
3011
- // Agent identity (name → title, icon → empty-state glyph)
3012
- // wins over the host `guideWelcome` spread + built-in
3013
- // defaults; falls back to the host value when no agent is
3014
- // active. Placed after the spread so resolution is
3015
- // deterministic.
3016
- title={effectiveAssistantName ?? guideWelcome?.title}
3017
- icon={effectiveAssistantIcon ?? guideWelcome?.icon}
3018
- // Admin "try-asking chips" → Guide quick-action chips.
3019
- // Precedence: when an AGENT is active and its fetched chips
3020
- // arrived, the agent's chips win — the host array is the
3021
- // platform default, not the agent's. (`agentConfigUrl` is
3022
- // the same derived value that drives the config fetch, so
3023
- // this can never disagree with what was fetched; while the
3024
- // fetch is in-flight the fetched list is [] and host chips
3025
- // show.) Outside agent mode the host-provided
3026
- // `guideWelcome.quickActions` wins as before.
3027
- quickActions={
3028
- agentConfigUrl && guideSuggestedActions.length > 0
3029
- ? guideSuggestedActions
3030
- : (guideWelcome?.quickActions ?? guideSuggestedActions)
3031
- }
3032
- // Quick-action chips SEND the prompt immediately on click.
3033
- onQuickAction={action => {
3034
- setQuickActionPreview(null);
3035
- handleSend(action.prompt ?? action.label);
3036
- }}
3037
- // Hover/focus PREVIEWS the action's full prompt as ghost text
3038
- // in the empty composer (the chip label is short; this reveals
3039
- // what will be sent). Declarative + non-destructive — see
3040
- // `quickActionPreview` / `ChatInput.previewText`.
3041
- onQuickActionHover={action => setQuickActionPreview(action.prompt ?? action.label)}
3042
- onQuickActionHoverEnd={() => setQuickActionPreview(null)}
3043
- // In agent mode a built-in agent (fae/mingo) caps the wall at
3044
- // 2 rows; host/guide mode (no active agent) keeps the default.
3045
- agentSlug={activeAgentSlug}
3046
- >
3047
- {/* Figma node 7363:205938 — single-column slash-command
3048
- list. No own scroll (GuideWelcome's region scrolls); the
3049
- rounded-md frame holds the cards on the dark surface. */}
3050
- {(chipCommands.length > 0 || !commandsLoaded) && (
3051
- <div className="shrink-0 overflow-hidden rounded-md border border-ods-border">
3052
- {!commandsLoaded && chipCommands.length === 0 && (
3053
- <LoadingItems count={MINGO_ONBOARDING_SKELETON_ROWS}>
3054
- {i => (
3055
- <MingoOnboardingCard loading data-loading-item skeletonIndex={i} title="" />
3056
- )}
3057
- </LoadingItems>
3058
- )}
3059
- {chipCommands.map(cmd => {
3060
- const Icon = resolveIcon(cmd.iconName);
3061
- const cmdId = cmd.id;
3062
- const label = cmd.label ?? `/${cmdId}`;
3063
- const cardActions = cmd.actions.map(action => ({
3064
- id: action.id,
3065
- label: action.label,
3066
- onClick: () => dispatchSlashCommandAction(action.id, cmdId, chatInputRef),
3067
- }));
3068
- return (
3069
- <MingoOnboardingCard
3070
- key={cmdId}
3071
- icon={<Icon size={16} />}
3072
- title={label}
3073
- slashCommand={`/${cmdId}`}
3074
- description={cmd.description}
3075
- actions={cardActions}
3076
- data-loading-item
3077
- />
3078
- );
3079
- })}
3080
- </div>
3081
- )}
3082
- </GuideWelcome>
3083
- )}
3084
- </div>
3085
- </div>
3086
-
3087
- {/* Host block pinned above the composer (`aboveComposer`):
3088
- the thread's own bottom padding separates them, the
3089
- composer's horizontal inset is repeated so the two line up.
3090
- It may shrink: in a short panel the block (which scrolls
3091
- its own content, `min-h-0`) yields height to the thread. */}
3092
- {hasAboveComposer && (
3093
- <div
3094
- data-testid="chat-above-composer"
3095
- className="flex min-h-0 shrink flex-col px-[var(--spacing-system-m)] pb-[var(--spacing-system-m)]"
3096
- >
3097
- {aboveComposer}
3098
- </div>
3099
- )}
3100
-
3101
- <ChatAttachmentChipStrip
3102
- attachments={stagedAttachments}
3103
- onRemove={removeAttachment}
3104
- disabled={chatLoading}
3105
- />
3106
-
3107
- <ChatComposer
3108
- key={composerKey}
3109
- archived={isViewingArchived}
3110
- lock={composerLock}
3111
- inputRef={chatInputRef}
3112
- onSend={handleSend}
3113
- onStop={stopMessage}
3114
- sending={chatLoading || hasInflightUploads}
3115
- placeholder={
3116
- hasInflightUploads
3117
- ? 'Waiting for uploads to finish…'
3118
- : isV2
3119
- ? 'Enter your Request...'
3120
- : 'Ask a question...'
3121
- }
3122
- autoFocus={previewMode ? false : autoFocusInput}
3123
- slashCommands={slashCommandsProp}
3124
- previewText={quickActionPreview ?? undefined}
3125
- showAttachmentButton={attachmentsEnabled && activeMode === 'guide'}
3126
- attachmentsCount={stagedAttachments.length}
3127
- onAddFiles={addAttachmentFiles}
3128
- attachmentsDisabled={chatLoading}
3129
- contextPicker={contextPickerForMode}
3130
- selectedContextItems={contextItems}
3131
- onToggleContextItem={toggleContextItem}
3132
- onRemoveContextItem={removeContextItem}
3133
- contextMemoryItems={contextMemory?.items}
3134
- onRemoveContextMemoryItem={contextMemory?.onRemove}
3135
- contextMemoryPending={contextMemory?.pending}
3136
- contextPickerOpen={contextPickerOpen}
3137
- onOpenContextPicker={openContextPicker}
3138
- onCloseContextPicker={closeContextPicker}
3139
- mentionQuery={mentionQuery}
3140
- onMentionQueryChange={handleMentionQueryChange}
3141
- onValueChange={handleContextValueChange}
3142
- model={{
3143
- provider: currentProvider ?? 'anthropic',
3144
- modelName: currentModelLabel ?? 'Claude',
3145
- usedTokens:
3146
- currentInputTokens != null
3147
- ? (currentInputTokens ?? 0) + (currentOutputTokens ?? 0)
3148
- : undefined,
3149
- contextWindow: currentContextWindowMaxTokens ?? undefined,
3150
- inputTokens: currentInputTokens ?? undefined,
3151
- outputTokens: currentOutputTokens ?? undefined,
3152
- hitRatePct: currentCacheHitRatePct ?? undefined,
3153
- breakdown: currentUsageBreakdown ?? undefined,
3154
- }}
3155
- />
3406
+ {threadArea}
3407
+ {aboveComposerNode}
3408
+ {attachmentStrip}
3409
+ {composerNode}
3156
3410
  </>
3157
3411
  )}
3158
3412
  </div>
@@ -3162,20 +3416,7 @@ function EmbeddableChatInner({
3162
3416
  </div>
3163
3417
  {galleryModal}
3164
3418
 
3165
- {/* Rename / Archive / Unarchive chat modals (Figma 7592:225962,
3166
- 7592:226181). Triggered from the header ⋯ and the dialog-history
3167
- rows; rendered inside the panel so they overlay the chat. */}
3168
- <ChatDialogModals
3169
- renameTarget={renameTarget}
3170
- setRenameTarget={setRenameTarget}
3171
- onConfirmRename={handleConfirmRename}
3172
- archiveTarget={archiveTarget}
3173
- setArchiveTarget={setArchiveTarget}
3174
- onConfirmArchive={handleConfirmArchive}
3175
- restoreTarget={restoreTarget}
3176
- setRestoreTarget={setRestoreTarget}
3177
- onConfirmRestore={handleConfirmRestore}
3178
- />
3419
+ {dialogModals}
3179
3420
 
3180
3421
  {/* Portal target for in-panel Radix overlays — `display: contents`
3181
3422
  so it adds no box; content is positioned `fixed` by Radix. */}
@@ -3185,6 +3426,82 @@ function EmbeddableChatInner({
3185
3426
  </ChatAppearanceContext.Provider>
3186
3427
  );
3187
3428
 
3429
+ // ── Split layout (`threadContainer`) ───────────────────────────────────────
3430
+ // The header over a chat that IS the page: nothing closes, collapses or
3431
+ // toggles a list. The title, "· owner · day", and the chat's ⋯.
3432
+ const pageHeader = (
3433
+ <MingoChatHeader
3434
+ variant="page"
3435
+ // Over the archive the header is the archive's (see the v2 header).
3436
+ title={archiveOpen ? 'Chat Archive' : headerShowBack || isGuideEmpty ? headerTitle : freshConversationTitle}
3437
+ meta={archiveOpen || !hasConversation ? undefined : [headerPersonName, chatDayLabel(activeDialog?.timestamp)]}
3438
+ menuItems={headerShowBack && !isViewingArchived && !archiveOpen ? mingoHeaderMenuItems : []}
3439
+ extraMenuItems={isViewingArchived || archiveOpen ? undefined : chatMenuExtraItems}
3440
+ onRestore={isViewingArchived && !archiveOpen ? headerOnRestore : undefined}
3441
+ renaming={inlineRenaming && !archiveOpen}
3442
+ onRenameSubmit={submitInlineRename}
3443
+ onRenameCancel={cancelInlineRename}
3444
+ actions={threadHeaderActions}
3445
+ />
3446
+ );
3447
+
3448
+ // The header + thread, portalled into the host's node. Its own portal host
3449
+ // and collision boundary keep its menus inside it. The modals live here too:
3450
+ // they only open from this header, and the page area is where a host's own
3451
+ // modals already render. It paints no surface of its own: the host paints
3452
+ // the one area that holds both the thread and the composer (`AppLayout`'s
3453
+ // `pageSurface`), so the background does not stop at the thread's edge.
3454
+ const threadRegion = (
3455
+ <div
3456
+ ref={setThreadBoundary}
3457
+ className={cn(
3458
+ 'flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden',
3459
+ previewMode && 'pointer-events-none select-none',
3460
+ )}
3461
+ >
3462
+ <PortalContainerContext.Provider value={threadPortalHost}>
3463
+ <CollisionBoundaryContext.Provider value={threadBoundary}>
3464
+ {pageHeader}
3465
+ {activeMode === 'guide' && hasMingoMode && <GuideModeBanner className="duration-200 animate-in fade-in-0" />}
3466
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col">{archiveOpen ? archiveListNode : threadArea}</div>
3467
+ {galleryModal}
3468
+ {dialogModals}
3469
+ <div ref={setThreadPortalHost} style={{ display: 'contents' }} />
3470
+ </CollisionBoundaryContext.Provider>
3471
+ </PortalContainerContext.Provider>
3472
+ </div>
3473
+ );
3474
+
3475
+ // The composer where the panel is mounted (the host's dock). The thread
3476
+ // portal holds the FIRST slot whether or not it renders, so the composer keeps
3477
+ // its place in the tree — and its draft — when the container comes and goes.
3478
+ // No `overflow-hidden` and no fixed height: the picker, the `@` / slash menus
3479
+ // and the memory popover open above the composer, outside this box. Its
3480
+ // overlays collide with whatever boundary the host provides (the viewport by
3481
+ // default), never with this short box.
3482
+ const body = splitMode ? (
3483
+ <ChatAppearanceContext.Provider value={appearance}>
3484
+ <PortalContainerContext.Provider value={portalHost}>
3485
+ <div
3486
+ ref={setPanelNode}
3487
+ data-surface={isV2 ? 'mingo' : undefined}
3488
+ className={cn('flex min-w-0 flex-col', previewMode && 'pointer-events-none select-none')}
3489
+ >
3490
+ {threadContainer ? createPortal(threadRegion, threadContainer) : null}
3491
+ {aboveComposerNode}
3492
+ {attachmentStrip}
3493
+ {composerNode}
3494
+ </div>
3495
+ {/* With no thread on screen nothing can open them; mounted anyway so
3496
+ a target set just before the thread left still resolves. */}
3497
+ {threadContainer ? null : dialogModals}
3498
+ <div ref={setPortalHost} style={{ display: 'contents' }} />
3499
+ </PortalContainerContext.Provider>
3500
+ </ChatAppearanceContext.Provider>
3501
+ ) : (
3502
+ classicBody
3503
+ );
3504
+
3188
3505
  // Conditional shell: inline (shell-less host, e.g. AppLayoutDrawer, which
3189
3506
  // provides its own chrome/focus-trap/size) vs the body-level Radix Drawer
3190
3507
  // (backdrop, iOS scroll-lock, drag-to-resize). Both render the same `body`.