@kortix/ui 0.14.8 → 0.14.9

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 (528) hide show
  1. package/README.md +2 -2
  2. package/dist/_vendor/kortix-shared.js +63 -3
  3. package/dist/_vendor/shared/app-config.d.ts +175 -0
  4. package/dist/_vendor/shared/channel-message.d.ts +34 -5
  5. package/dist/_vendor/shared/index.d.ts +1 -0
  6. package/dist/_vendor/shared/space-slug.d.ts +37 -0
  7. package/dist/access/access/access-detail-shell.js +1 -1
  8. package/dist/access/access/principal-picker.d.ts +11 -0
  9. package/dist/access/access/principal-picker.js +3 -2
  10. package/dist/apps/app-preview-pool.d.ts +7 -2
  11. package/dist/apps/app-preview-pool.js +11 -5
  12. package/dist/apps/app-shared.d.ts +22 -15
  13. package/dist/apps/app-shared.js +37 -19
  14. package/dist/apps/index.d.ts +2 -2
  15. package/dist/apps/index.js +2 -2
  16. package/dist/artifacts/artifact-frame.d.ts +16 -0
  17. package/dist/artifacts/artifact-frame.js +51 -0
  18. package/dist/artifacts/artifact-session.d.ts +18 -0
  19. package/dist/artifacts/artifact-session.js +101 -0
  20. package/dist/artifacts/frame-policy.d.ts +30 -0
  21. package/dist/artifacts/frame-policy.js +61 -0
  22. package/dist/artifacts/index.d.ts +3 -0
  23. package/dist/artifacts/index.js +5 -0
  24. package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
  25. package/dist/browser/sandbox-browser-chrome.js +2 -2
  26. package/dist/customize/agents/agent-grant-pages.d.ts +5 -1
  27. package/dist/customize/agents/agent-grant-pages.js +30 -4
  28. package/dist/customize/agents/agent-page.js +3 -1
  29. package/dist/customize/agents/agent-policy-sets.d.ts +43 -0
  30. package/dist/customize/agents/agent-policy-sets.js +72 -0
  31. package/dist/customize/agents/agent-triggers-section.js +2 -1
  32. package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.d.ts +6 -1
  33. package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.js +10 -4
  34. package/dist/customize/connectors/agent-access.d.ts +35 -0
  35. package/dist/customize/connectors/agent-access.js +77 -0
  36. package/dist/customize/connectors/catalog/browse-sections.d.ts +2 -29
  37. package/dist/customize/connectors/catalog/browse-sections.js +7 -74
  38. package/dist/customize/connectors/catalog/catalog-entry.d.ts +18 -37
  39. package/dist/customize/connectors/catalog/catalog-entry.js +28 -40
  40. package/dist/customize/connectors/catalog/connector-browse.d.ts +3 -32
  41. package/dist/customize/connectors/catalog/connector-browse.js +19 -50
  42. package/dist/customize/connectors/catalog/use-catalog.d.ts +20 -59
  43. package/dist/customize/connectors/catalog/use-catalog.js +48 -175
  44. package/dist/customize/connectors/connector-identity.d.ts +9 -11
  45. package/dist/customize/connectors/connector-identity.js +13 -42
  46. package/dist/customize/connectors/connector-moves-banner.d.ts +2 -1
  47. package/dist/customize/connectors/connector-moves-banner.js +4 -6
  48. package/dist/customize/connectors/connector-routes.d.ts +21 -9
  49. package/dist/customize/connectors/connector-routes.js +29 -20
  50. package/dist/customize/connectors/connectors-page.js +53 -82
  51. package/dist/customize/connectors/detail/app-page.js +226 -98
  52. package/dist/customize/connectors/detail/computer-app-page.d.ts +16 -0
  53. package/dist/customize/connectors/detail/computer-app-page.js +39 -0
  54. package/dist/customize/connectors/detail/connector-accounts.js +3 -1
  55. package/dist/customize/connectors/detail/connector-advanced-tools.d.ts +4 -1
  56. package/dist/customize/connectors/detail/connector-advanced-tools.js +2 -2
  57. package/dist/customize/connectors/detail/connector-agents.d.ts +14 -0
  58. package/dist/customize/connectors/detail/connector-agents.js +69 -0
  59. package/dist/customize/connectors/detail/connector-detail-tabs.js +2 -1
  60. package/dist/customize/connectors/detail/connector-move-row.d.ts +8 -5
  61. package/dist/customize/connectors/detail/connector-move-row.js +23 -14
  62. package/dist/customize/connectors/detail/connector-page.d.ts +4 -1
  63. package/dist/customize/connectors/detail/connector-page.js +14 -10
  64. package/dist/customize/connectors/detail/connector-policy-sets.d.ts +28 -0
  65. package/dist/customize/connectors/detail/connector-policy-sets.js +203 -0
  66. package/dist/customize/connectors/detail/connector-settings.d.ts +4 -1
  67. package/dist/customize/connectors/detail/connector-settings.js +7 -3
  68. package/dist/customize/connectors/detail/connector-status.d.ts +19 -6
  69. package/dist/customize/connectors/detail/connector-status.js +34 -10
  70. package/dist/customize/connectors/detail/connector-tabs.d.ts +4 -1
  71. package/dist/customize/connectors/detail/connector-tabs.js +8 -2
  72. package/dist/customize/connectors/detail/connector-tools.d.ts +3 -3
  73. package/dist/customize/connectors/detail/connector-tools.js +105 -48
  74. package/dist/customize/connectors/detail/email-inboxes.d.ts +43 -0
  75. package/dist/customize/connectors/detail/email-inboxes.js +184 -0
  76. package/dist/customize/connectors/detail/provider-info.d.ts +1 -1
  77. package/dist/customize/connectors/detail/provider-info.js +2 -2
  78. package/dist/customize/connectors/detail/status-badge.d.ts +1 -1
  79. package/dist/customize/connectors/detail/status-badge.js +4 -5
  80. package/dist/customize/connectors/detail/use-connector-detail.d.ts +6 -0
  81. package/dist/customize/connectors/detail/use-connector-detail.js +14 -4
  82. package/dist/customize/connectors/install/install-dialog.d.ts +23 -0
  83. package/dist/customize/connectors/install/install-dialog.js +40 -0
  84. package/dist/customize/connectors/install/install.d.ts +13 -2
  85. package/dist/customize/connectors/install/install.js +9 -4
  86. package/dist/customize/connectors/install/use-install.d.ts +19 -2
  87. package/dist/customize/connectors/install/use-install.js +65 -37
  88. package/dist/customize/connectors/install/way-kind.d.ts +5 -0
  89. package/dist/customize/connectors/install/way-kind.js +16 -0
  90. package/dist/customize/connectors/provider-label.d.ts +2 -1
  91. package/dist/customize/connectors/provider-label.js +13 -3
  92. package/dist/customize/connectors/tools/pattern-rule-draft.d.ts +4 -0
  93. package/dist/customize/connectors/tools/pattern-rule-draft.js +12 -3
  94. package/dist/customize/connectors/tools/policy-sets.d.ts +27 -0
  95. package/dist/customize/connectors/tools/policy-sets.js +41 -0
  96. package/dist/customize/connectors/tools/tool-groups.d.ts +32 -9
  97. package/dist/customize/connectors/tools/tool-groups.js +78 -16
  98. package/dist/customize/connectors/tools/tool-policy-control.d.ts +11 -10
  99. package/dist/customize/connectors/tools/tool-policy-control.js +15 -16
  100. package/dist/customize/connectors/tools/tool-policy-labels.d.ts +6 -5
  101. package/dist/customize/connectors/tools/tool-policy-labels.js +17 -16
  102. package/dist/customize/connectors/tools/tool-policy.d.ts +50 -4
  103. package/dist/customize/connectors/tools/tool-policy.js +74 -8
  104. package/dist/customize/connectors/use-agent-access.d.ts +85 -0
  105. package/dist/customize/connectors/use-agent-access.js +72 -0
  106. package/dist/customize/migrate-to-v2/index.d.ts +1 -2
  107. package/dist/customize/migrate-to-v2/index.js +1 -2
  108. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +12 -25
  109. package/dist/customize/migrate-to-v2/migration-prompt.js +34 -236
  110. package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +1 -1
  111. package/dist/customize/migrate-to-v2/upgrade-defs.js +7 -6
  112. package/dist/customize/migrate-to-v2/upgrade-view.js +7 -7
  113. package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +3 -3
  114. package/dist/customize/providers/provider-accordion.js +17 -2
  115. package/dist/customize/sections/component/channel-access-panel.d.ts +16 -0
  116. package/dist/customize/sections/component/channel-access-panel.js +146 -0
  117. package/dist/customize/sections/component/channel-connect-hero.d.ts +3 -2
  118. package/dist/customize/sections/component/channel-connect-hero.js +3 -2
  119. package/dist/customize/sections/component/channel-hero-frame.d.ts +31 -0
  120. package/dist/customize/sections/component/channel-hero-frame.js +40 -0
  121. package/dist/customize/sections/component/channel-mocks.d.ts +6 -0
  122. package/dist/customize/sections/component/channel-mocks.js +46 -0
  123. package/dist/customize/sections/component/channel-row.d.ts +13 -3
  124. package/dist/customize/sections/component/channel-row.js +10 -4
  125. package/dist/customize/sections/component/email-connect-form.d.ts +27 -0
  126. package/dist/customize/sections/component/email-connect-form.js +183 -0
  127. package/dist/customize/sections/component/slack-connect-card.d.ts +7 -0
  128. package/dist/customize/sections/component/slack-connect-card.js +2 -3
  129. package/dist/customize/sections/component/teams-connect-card.d.ts +7 -0
  130. package/dist/customize/sections/component/teams-connect-card.js +2 -3
  131. package/dist/customize/sections/component/telegram-channel-row.js +16 -25
  132. package/dist/customize/sections/connectors-view.d.ts +1 -15
  133. package/dist/customize/sections/connectors-view.js +81 -314
  134. package/dist/customize/sections/view/agent-editor-catalog.js +5 -0
  135. package/dist/customize/sections/view/channels-view.d.ts +5 -1
  136. package/dist/customize/sections/view/channels-view.js +61 -75
  137. package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
  138. package/dist/customize/settings/tabs/experimental-tab.js +35 -16
  139. package/dist/customize/shared/catalog/catalog-empty-state.d.ts +1 -12
  140. package/dist/customize/shared/catalog/catalog-empty-state.js +3 -3
  141. package/dist/customize/shared/channels-switch-dialog.d.ts +18 -0
  142. package/dist/customize/shared/channels-switch-dialog.js +30 -0
  143. package/dist/customize/shared/feature-gate-screen.js +27 -9
  144. package/dist/customize/shared/use-customize-prefetch.d.ts +2 -3
  145. package/dist/customize/shared/use-customize-prefetch.js +9 -27
  146. package/dist/customize/triggers/schedule/post-to-field.d.ts +18 -0
  147. package/dist/customize/triggers/schedule/post-to-field.js +49 -0
  148. package/dist/customize/triggers/schedule/schedule-copy.d.ts +10 -6
  149. package/dist/customize/triggers/schedule/schedule-copy.js +42 -11
  150. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +2 -1
  151. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +22 -0
  152. package/dist/customize/triggers/schedule/trigger-composer-logic.js +25 -0
  153. package/dist/customize/triggers/schedule/trigger-composer.d.ts +5 -0
  154. package/dist/customize/triggers/schedule/trigger-composer.js +23 -14
  155. package/dist/customize/triggers/schedule/trigger-edit-logic.js +3 -0
  156. package/dist/customize/triggers/schedule/trigger-filter.js +1 -1
  157. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +2 -2
  158. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
  159. package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
  160. package/dist/customize/triggers/schedule-view.js +5 -2
  161. package/dist/files/index.d.ts +1 -0
  162. package/dist/files/index.js +1 -0
  163. package/dist/files/project/change-request-recovery.d.ts +1 -26
  164. package/dist/files/project/change-request-recovery.js +1 -59
  165. package/dist/files/project/components/change-request-detail-dialog.js +13 -3
  166. package/dist/files/project/components/drive-explorer.js +15 -15
  167. package/dist/files/project/components/drive-toolbar.d.ts +16 -2
  168. package/dist/files/project/components/drive-toolbar.js +14 -5
  169. package/dist/files/project/hooks/use-change-request-recovery.js +3 -19
  170. package/dist/files/project/hooks/use-change-requests.d.ts +1 -0
  171. package/dist/files/project/hooks/use-change-requests.js +11 -2
  172. package/dist/files/renderers/image-frame.d.ts +46 -0
  173. package/dist/files/renderers/image-frame.js +59 -0
  174. package/dist/files/renderers/image-renderer.d.ts +11 -1
  175. package/dist/files/renderers/image-renderer.js +13 -3
  176. package/dist/files/renderers/pdf/pdf-clipboard.d.ts +2 -0
  177. package/dist/files/renderers/pdf/pdf-clipboard.js +21 -0
  178. package/dist/files/renderers/pdf/pdf-viewer.js +4 -2
  179. package/dist/files/renderers/show-content-renderer.d.ts +9 -1
  180. package/dist/files/renderers/show-content-renderer.js +56 -14
  181. package/dist/files/runtime/file-source.js +2 -0
  182. package/dist/files/runtime/hooks/use-binary-blob.d.ts +10 -1
  183. package/dist/files/runtime/hooks/use-binary-blob.js +10 -4
  184. package/dist/files/runtime/hooks/use-shared-image.d.ts +41 -0
  185. package/dist/files/runtime/hooks/use-shared-image.js +177 -0
  186. package/dist/files/viewer/file-content-renderer.d.ts +22 -1
  187. package/dist/files/viewer/file-content-renderer.js +50 -7
  188. package/dist/files/viewer/file-header.d.ts +7 -3
  189. package/dist/files/viewer/file-header.js +20 -11
  190. package/dist/files/viewer/file-preview-modal.d.ts +1 -1
  191. package/dist/files/viewer/file-preview-modal.js +10 -22
  192. package/dist/files/viewer/file-source.d.ts +13 -0
  193. package/dist/files/viewer/use-file-content-state.d.ts +2 -0
  194. package/dist/files/viewer/use-file-content-state.js +28 -10
  195. package/dist/files/viewer/viewer-actions.d.ts +3 -1
  196. package/dist/files/viewer/viewer-actions.js +2 -2
  197. package/dist/hooks/use-media-query.d.ts +1 -0
  198. package/dist/hooks/use-mobile.d.ts +5 -0
  199. package/dist/hooks/use-mobile.js +8 -0
  200. package/dist/i18n/en.d.ts +873 -85
  201. package/dist/i18n/en.js +888 -100
  202. package/dist/i18n/ui-catalog/localize-ui-catalog.js +4 -0
  203. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +15 -3
  204. package/dist/index.d.ts +2 -2
  205. package/dist/index.js +2 -2
  206. package/dist/internal/account-hub/account-settings-sidebar.js +1 -1
  207. package/dist/internal/account-hub/hub-sheet.d.ts +9 -1
  208. package/dist/internal/account-hub/hub-sheet.js +21 -5
  209. package/dist/internal/account-hub/sections.d.ts +1 -1
  210. package/dist/internal/account-hub/sections.js +2 -1
  211. package/dist/internal/auth/auth-card-shell.js +3 -3
  212. package/dist/internal/components/agent-mark.js +5 -2
  213. package/dist/internal/connector-logo/connector-logo-source.d.ts +63 -0
  214. package/dist/internal/connector-logo/connector-logo-source.js +48 -0
  215. package/dist/internal/connector-logo/connector-logo.d.ts +39 -0
  216. package/dist/internal/connector-logo/connector-logo.js +56 -0
  217. package/dist/internal/connector-logo/connector-mark-files.d.ts +11 -0
  218. package/dist/internal/connector-logo/connector-mark-files.js +35 -0
  219. package/dist/internal/files/file-read-retry.d.ts +13 -0
  220. package/dist/internal/files/file-read-retry.js +23 -3
  221. package/dist/internal/files/session-drive-files.d.ts +5 -1
  222. package/dist/internal/files/session-drive-files.js +7 -2
  223. package/dist/internal/hooks/channels/use-channels-installations.d.ts +32 -5
  224. package/dist/internal/hooks/channels/use-channels-installations.js +55 -7
  225. package/dist/internal/hooks/channels/use-email-inboxes.d.ts +19 -0
  226. package/dist/internal/hooks/channels/use-email-inboxes.js +48 -0
  227. package/dist/internal/hooks/connectors/use-add-account.js +1 -1
  228. package/dist/internal/hooks/index.d.ts +1 -1
  229. package/dist/internal/hooks/index.js +1 -1
  230. package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -0
  231. package/dist/internal/hooks/projects/use-new-project-session.js +28 -12
  232. package/dist/internal/hooks/use-auto-scroll.d.ts +8 -1
  233. package/dist/internal/hooks/use-auto-scroll.js +4 -4
  234. package/dist/internal/icons/telegram.d.ts +5 -0
  235. package/dist/internal/icons/telegram.js +6 -1
  236. package/dist/internal/layout/nav-hover-card.d.ts +35 -0
  237. package/dist/internal/layout/nav-hover-card.js +84 -0
  238. package/dist/internal/layout/project-nav-row.d.ts +3 -1
  239. package/dist/internal/layout/project-nav-row.js +3 -2
  240. package/dist/internal/layout/project-page-header.d.ts +4 -2
  241. package/dist/internal/layout/project-page-header.js +4 -3
  242. package/dist/internal/layout/project-settings-nav.js +59 -2
  243. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  244. package/dist/internal/lib/browser-error-noise.js +1 -1
  245. package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +7 -0
  246. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -0
  247. package/dist/internal/lib/manifest-version.d.ts +1 -1
  248. package/dist/internal/lib/manifest-version.js +2 -2
  249. package/dist/internal/lib/memory-href.d.ts +16 -0
  250. package/dist/internal/lib/memory-href.js +46 -0
  251. package/dist/internal/lib/use-project-feature-flags.js +9 -9
  252. package/dist/internal/lib/utils/heic-convert.d.ts +1 -1
  253. package/dist/internal/lib/utils/heic-convert.js +3 -4
  254. package/dist/internal/lib/web-notifications.d.ts +20 -0
  255. package/dist/internal/lib/web-notifications.js +48 -4
  256. package/dist/internal/notifications/notification-bell.d.ts +4 -1
  257. package/dist/internal/notifications/notification-bell.js +2 -2
  258. package/dist/internal/selection/selection-bar.d.ts +2 -1
  259. package/dist/internal/selection/selection-bar.js +1 -1
  260. package/dist/internal/stores/file-preview-store.d.ts +29 -2
  261. package/dist/internal/stores/file-preview-store.js +19 -1
  262. package/dist/internal/stores/kortix-computer-store.js +3 -0
  263. package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
  264. package/dist/internal/stores/sidebar-nav-store.js +3 -1
  265. package/dist/lib/routes.d.ts +13 -1
  266. package/dist/lib/routes.js +13 -0
  267. package/dist/markdown/index.d.ts +2 -1
  268. package/dist/markdown/index.js +2 -1
  269. package/dist/markdown/setup-links/approval-decision.d.ts +1 -0
  270. package/dist/markdown/setup-links/approval-decision.js +6 -2
  271. package/dist/markdown/setup-links/connector-handshake.d.ts +3 -1
  272. package/dist/markdown/setup-links/connector-handshake.js +12 -10
  273. package/dist/markdown/setup-links/secret-intake-form.d.ts +0 -10
  274. package/dist/markdown/setup-links/secret-intake-form.js +1 -1
  275. package/dist/markdown/setup-links/show-connect-hero.d.ts +28 -0
  276. package/dist/markdown/setup-links/show-connect-hero.js +91 -0
  277. package/dist/markdown/unified-markdown.js +5 -5
  278. package/dist/primitives/badge.d.ts +1 -1
  279. package/dist/primitives/badge.js +2 -0
  280. package/dist/primitives/disclosure.js +14 -2
  281. package/dist/primitives/empty-art.d.ts +12 -0
  282. package/dist/primitives/empty-art.js +11 -0
  283. package/dist/primitives/mermaid-renderer.d.ts +2 -0
  284. package/dist/primitives/mermaid-renderer.js +21 -15
  285. package/dist/primitives/resizable.js +6 -1
  286. package/dist/primitives/resize-seam.d.ts +11 -0
  287. package/dist/primitives/resize-seam.js +12 -0
  288. package/dist/primitives/sidebar-panel.js +4 -7
  289. package/dist/primitives/tabs.d.ts +14 -1
  290. package/dist/primitives/tabs.js +1 -1
  291. package/dist/providers/ui-provider.d.ts +9 -0
  292. package/dist/session/composer/ComposerAboveCard.d.ts +1 -1
  293. package/dist/session/composer/ComposerAboveCard.js +2 -2
  294. package/dist/session/composer/ComposerCard.d.ts +1 -1
  295. package/dist/session/composer/ComposerCard.js +3 -3
  296. package/dist/session/composer/agent-selector.d.ts +13 -1
  297. package/dist/session/composer/agent-selector.js +25 -5
  298. package/dist/session/composer/composer-agent-access.d.ts +15 -0
  299. package/dist/session/composer/composer-agent-access.js +27 -0
  300. package/dist/session/composer/composer-chat-input.d.ts +8 -2
  301. package/dist/session/composer/composer-chat-input.js +8 -6
  302. package/dist/session/composer/composer-logic.d.ts +16 -0
  303. package/dist/session/composer/composer-logic.js +12 -0
  304. package/dist/session/composer/composer-underbar.d.ts +3 -1
  305. package/dist/session/composer/composer-underbar.js +4 -3
  306. package/dist/session/composer/composer.d.ts +15 -1
  307. package/dist/session/composer/composer.js +19 -1
  308. package/dist/session/composer/draft/composer-draft.d.ts +6 -2
  309. package/dist/session/composer/draft/composer-draft.js +5 -1
  310. package/dist/session/composer/reasoning-effort-selector.js +1 -1
  311. package/dist/session/models/chatgpt-connection-button.d.ts +11 -0
  312. package/dist/session/models/chatgpt-connection-button.js +54 -0
  313. package/dist/session/models/model-selector.js +5 -2
  314. package/dist/session/models/use-model-connection-gate.d.ts +5 -5
  315. package/dist/session/models/use-model-connection-gate.js +5 -5
  316. package/dist/session/outcomes/jump-to-outcome.d.ts +10 -0
  317. package/dist/session/outcomes/jump-to-outcome.js +11 -0
  318. package/dist/session/outcomes/session-outcomes-bridge.d.ts +14 -0
  319. package/dist/session/outcomes/session-outcomes-bridge.js +12 -0
  320. package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
  321. package/dist/session/outcomes/session-outcomes-provider.js +33 -3
  322. package/dist/session/panel/easy/app-preview.d.ts +10 -0
  323. package/dist/session/panel/easy/app-preview.js +31 -12
  324. package/dist/session/panel/easy/change-requests-card.d.ts +7 -0
  325. package/dist/session/panel/easy/change-requests-card.js +17 -0
  326. package/dist/session/panel/easy/easy-panel-logic.js +7 -1
  327. package/dist/session/panel/easy/easy-panel.js +5 -2
  328. package/dist/session/panel/easy/file-preview.js +1 -1
  329. package/dist/session/panel/easy/outputs-card.d.ts +2 -1
  330. package/dist/session/panel/easy/outputs-card.js +3 -2
  331. package/dist/session/panel/mobile-tool-drawer.js +7 -1
  332. package/dist/session/panel/session-audit-panel.js +9 -2
  333. package/dist/session/panel/session-detail-panel.js +9 -3
  334. package/dist/session/panel/session-files-explorer.d.ts +9 -0
  335. package/dist/session/panel/session-files-explorer.js +12 -3
  336. package/dist/session/panel/session-panel-provider.d.ts +15 -1
  337. package/dist/session/panel/session-panel-provider.js +32 -7
  338. package/dist/session/panel/shared/derive-panels.d.ts +8 -1
  339. package/dist/session/panel/shared/derive-panels.js +12 -2
  340. package/dist/session/panel/shared/output-priority.js +2 -0
  341. package/dist/session/participants/session-participants.d.ts +5 -1
  342. package/dist/session/participants/session-participants.js +9 -2
  343. package/dist/session/prompts/approval-request.d.ts +5 -0
  344. package/dist/session/prompts/approval-request.js +7 -1
  345. package/dist/session/prompts/session-approval-review.d.ts +9 -0
  346. package/dist/session/prompts/session-approval-review.js +18 -0
  347. package/dist/session/status/session-error-banner.js +2 -49
  348. package/dist/session/status/session-starting-loader.d.ts +14 -2
  349. package/dist/session/status/session-starting-loader.js +16 -4
  350. package/dist/session/thread/after-first-prompt.d.ts +7 -0
  351. package/dist/session/thread/after-first-prompt.js +8 -0
  352. package/dist/session/thread/detect-command.d.ts +12 -0
  353. package/dist/session/thread/detect-command.js +20 -0
  354. package/dist/session/thread/session-chat.d.ts +3 -1
  355. package/dist/session/thread/session-chat.js +377 -252
  356. package/dist/session/thread/session-thread.d.ts +3 -1
  357. package/dist/session/thread/session-thread.js +9 -2
  358. package/dist/session/thread/thread-boot-rows.d.ts +36 -0
  359. package/dist/session/thread/thread-boot-rows.js +89 -0
  360. package/dist/session/thread/transcript-rows.d.ts +31 -0
  361. package/dist/session/thread/transcript-rows.js +3 -0
  362. package/dist/session/thread/transcript.d.ts +0 -9
  363. package/dist/session/thread/transcript.js +104 -19
  364. package/dist/session/tool/shared/infrastructure-contexts.d.ts +28 -0
  365. package/dist/session/tool/shared/infrastructure-contexts.js +31 -3
  366. package/dist/session/tool/tool-part-renderer.d.ts +5 -4
  367. package/dist/session/tool/tool-part-renderer.js +8 -3
  368. package/dist/session/tool/tools/bash-tool.js +7 -6
  369. package/dist/session/tool/tools/channel-send-card.d.ts +1 -2
  370. package/dist/session/tool/tools/channel-send.d.ts +2 -1
  371. package/dist/session/tool/tools/codemode-tool.js +1 -1
  372. package/dist/session/tool/tools/connector-tools.js +1 -1
  373. package/dist/session/tool/tools/image-gen-tool.d.ts +1 -1
  374. package/dist/session/tool/tools/image-gen-tool.js +240 -53
  375. package/dist/session/tool/tools/show-tool.js +19 -8
  376. package/dist/session/turn/channel-brand.d.ts +8 -3
  377. package/dist/session/turn/channel-brand.js +20 -4
  378. package/dist/session/turn/message-author.d.ts +8 -0
  379. package/dist/session/turn/message-author.js +24 -0
  380. package/dist/session/turn/message-row.d.ts +52 -0
  381. package/dist/session/turn/message-row.js +44 -0
  382. package/dist/session/turn/plan-anchor.d.ts +1 -1
  383. package/dist/session/turn/plan-anchor.js +1 -1
  384. package/dist/session/turn/user-message.d.ts +7 -1
  385. package/dist/session/turn/user-message.js +21 -7
  386. package/dist/styles.css +1 -1
  387. package/dist/workspace/home/access-requests-bell.d.ts +9 -2
  388. package/dist/workspace/home/access-requests-bell.js +20 -6
  389. package/dist/workspace/home/first-chat.d.ts +8 -21
  390. package/dist/workspace/home/first-chat.js +22 -72
  391. package/dist/workspace/index.d.ts +6 -0
  392. package/dist/workspace/index.js +6 -0
  393. package/dist/workspace/layout/project-home.d.ts +14 -2
  394. package/dist/workspace/layout/project-home.js +60 -21
  395. package/dist/workspace/layout/use-project-home-send.d.ts +9 -1
  396. package/dist/workspace/layout/use-project-home-send.js +82 -3
  397. package/dist/workspace/memory/body-doc.d.ts +17 -0
  398. package/dist/workspace/memory/body-doc.js +208 -0
  399. package/dist/workspace/memory/body-extensions.d.ts +38 -0
  400. package/dist/workspace/memory/body-extensions.js +103 -0
  401. package/dist/workspace/memory/company-memory-page.d.ts +8 -0
  402. package/dist/workspace/memory/company-memory-page.js +16 -0
  403. package/dist/workspace/memory/memory-all.d.ts +20 -0
  404. package/dist/workspace/memory/memory-all.js +27 -0
  405. package/dist/workspace/memory/memory-body.d.ts +19 -0
  406. package/dist/workspace/memory/memory-body.js +139 -0
  407. package/dist/workspace/memory/memory-empty.d.ts +13 -0
  408. package/dist/workspace/memory/memory-empty.js +28 -0
  409. package/dist/workspace/memory/memory-history.d.ts +27 -0
  410. package/dist/workspace/memory/memory-history.js +108 -0
  411. package/dist/workspace/memory/memory-labels.d.ts +16 -0
  412. package/dist/workspace/memory/memory-labels.js +47 -0
  413. package/dist/workspace/memory/memory-page-list.d.ts +34 -0
  414. package/dist/workspace/memory/memory-page-list.js +156 -0
  415. package/dist/workspace/memory/memory-reader.d.ts +58 -0
  416. package/dist/workspace/memory/memory-reader.js +123 -0
  417. package/dist/workspace/memory/memory-view.d.ts +21 -0
  418. package/dist/workspace/memory/memory-view.js +124 -0
  419. package/dist/workspace/memory/remember-popover.d.ts +19 -0
  420. package/dist/workspace/memory/remember-popover.js +61 -0
  421. package/dist/workspace/memory/remember-this.d.ts +12 -0
  422. package/dist/workspace/memory/remember-this.js +89 -0
  423. package/dist/workspace/memory/source-mark.d.ts +18 -0
  424. package/dist/workspace/memory/source-mark.js +79 -0
  425. package/dist/workspace/memory/used-memory-chip.d.ts +14 -0
  426. package/dist/workspace/memory/used-memory-chip.js +61 -0
  427. package/dist/workspace/new/advanced-fields.d.ts +2 -1
  428. package/dist/workspace/new/advanced-fields.js +2 -2
  429. package/dist/workspace/new/source-param.d.ts +1 -1
  430. package/dist/workspace/new/source-param.js +3 -1
  431. package/dist/workspace/new/use-create-workspace.d.ts +8 -10
  432. package/dist/workspace/new/use-create-workspace.js +3 -3
  433. package/dist/workspace/projects/onboarding/app-logo.d.ts +7 -2
  434. package/dist/workspace/projects/onboarding/app-logo.js +6 -13
  435. package/dist/workspace/projects/policies-panel.js +5 -3
  436. package/dist/workspace/review/review-actions.d.ts +4 -2
  437. package/dist/workspace/review/review-actions.js +8 -2
  438. package/dist/workspace/review/review-center.js +11 -7
  439. package/dist/workspace/review/review-detail.d.ts +10 -0
  440. package/dist/workspace/review/review-detail.js +101 -13
  441. package/dist/workspace/saved-session-skeleton.d.ts +2 -2
  442. package/dist/workspace/saved-session-skeleton.js +3 -3
  443. package/dist/workspace/session-workspace.js +15 -13
  444. package/dist/workspace/sessions/project-sessions-view.js +3 -2
  445. package/dist/workspace/sessions/sessions-toolbar.d.ts +3 -1
  446. package/dist/workspace/sessions/sessions-toolbar.js +2 -2
  447. package/dist/workspace/sidebar/footer/project-apps-nav.d.ts +5 -0
  448. package/dist/workspace/sidebar/footer/project-apps-nav.js +41 -2
  449. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -0
  450. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +22 -0
  451. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +13 -13
  452. package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +7 -0
  453. package/dist/workspace/sidebar/footer/project-memory-nav.js +19 -0
  454. package/dist/workspace/sidebar/nav-row-meta.js +14 -2
  455. package/dist/workspace/sidebar/project-nav-items.js +3 -0
  456. package/dist/workspace/sidebar/project-session-list.js +68 -56
  457. package/dist/workspace/sidebar/project-sidebar.js +9 -2
  458. package/dist/workspace/sidebar/project-spaces-nav.d.ts +8 -0
  459. package/dist/workspace/sidebar/project-spaces-nav.js +69 -0
  460. package/dist/workspace/sidebar/session-group-order.d.ts +9 -0
  461. package/dist/workspace/sidebar/session-group-order.js +25 -0
  462. package/dist/workspace/sidebar/session-group-sections.d.ts +62 -0
  463. package/dist/workspace/sidebar/session-group-sections.js +267 -0
  464. package/dist/workspace/sidebar/session-list-chrome.d.ts +28 -0
  465. package/dist/workspace/sidebar/session-list-chrome.js +50 -0
  466. package/dist/workspace/spaces/channel-glyph.d.ts +5 -0
  467. package/dist/workspace/spaces/channel-glyph.js +6 -0
  468. package/dist/workspace/spaces/channel-setup.d.ts +16 -0
  469. package/dist/workspace/spaces/channel-setup.js +105 -0
  470. package/dist/workspace/spaces/channels-onboarding.d.ts +13 -0
  471. package/dist/workspace/spaces/channels-onboarding.js +37 -0
  472. package/dist/workspace/spaces/create-channel-dialog.d.ts +16 -0
  473. package/dist/workspace/spaces/create-channel-dialog.js +158 -0
  474. package/dist/workspace/spaces/private-channels-not-in.d.ts +9 -0
  475. package/dist/workspace/spaces/private-channels-not-in.js +69 -0
  476. package/dist/workspace/spaces/space-agents.d.ts +10 -0
  477. package/dist/workspace/spaces/space-agents.js +10 -0
  478. package/dist/workspace/spaces/space-details-dialog.d.ts +20 -0
  479. package/dist/workspace/spaces/space-details-dialog.js +176 -0
  480. package/dist/workspace/spaces/space-link-label.d.ts +49 -0
  481. package/dist/workspace/spaces/space-link-label.js +73 -0
  482. package/dist/workspace/spaces/space-links.d.ts +19 -0
  483. package/dist/workspace/spaces/space-links.js +230 -0
  484. package/dist/workspace/spaces/space-members.d.ts +46 -0
  485. package/dist/workspace/spaces/space-members.js +182 -0
  486. package/dist/workspace/spaces/space-roster.d.ts +15 -0
  487. package/dist/workspace/spaces/space-roster.js +44 -0
  488. package/dist/workspace/spaces/space-threads-tab.d.ts +56 -0
  489. package/dist/workspace/spaces/space-threads-tab.js +156 -0
  490. package/dist/workspace/spaces/space-timeline-view.d.ts +254 -0
  491. package/dist/workspace/spaces/space-timeline-view.js +235 -0
  492. package/dist/workspace/spaces/space-timeline.d.ts +106 -0
  493. package/dist/workspace/spaces/space-timeline.js +183 -0
  494. package/dist/workspace/spaces/space-triggers.d.ts +13 -0
  495. package/dist/workspace/spaces/space-triggers.js +78 -0
  496. package/dist/workspace/spaces/space-view.d.ts +37 -0
  497. package/dist/workspace/spaces/space-view.js +436 -0
  498. package/package.json +27 -36
  499. package/skills/kortix-ui/SKILL.md +3 -3
  500. package/skills/kortix-ui/references/custom-dashboard.md +3 -3
  501. package/skills/kortix-ui/references/modules.md +28 -4
  502. package/skills/kortix-ui/references/theming.md +1 -1
  503. package/dist/customize/connectors/catalog/merge-search.d.ts +0 -10
  504. package/dist/customize/connectors/catalog/merge-search.js +0 -26
  505. package/dist/customize/connectors/detail/find-easy-connect-app.d.ts +0 -29
  506. package/dist/customize/connectors/detail/find-easy-connect-app.js +0 -22
  507. package/dist/customize/migrate-to-v2/use-migrate-to-v2.d.ts +0 -9
  508. package/dist/customize/migrate-to-v2/use-migrate-to-v2.js +0 -24
  509. package/dist/customize/sections/connector-connection-header.d.ts +0 -36
  510. package/dist/customize/sections/connector-connection-header.js +0 -33
  511. package/dist/customize/sections/connector-connection-modal.d.ts +0 -34
  512. package/dist/customize/sections/connector-connection-modal.js +0 -72
  513. package/dist/customize/sections/discover-catalogue-card.d.ts +0 -19
  514. package/dist/customize/sections/discover-catalogue-card.js +0 -26
  515. package/dist/customize/sections/discover-catalogue-detail.d.ts +0 -15
  516. package/dist/customize/sections/discover-catalogue-detail.js +0 -24
  517. package/dist/customize/sections/discover-catalogue.d.ts +0 -17
  518. package/dist/customize/sections/discover-catalogue.js +0 -132
  519. package/dist/customize/sections/llm-provider/provider-access-menu.d.ts +0 -10
  520. package/dist/customize/sections/llm-provider/provider-access-menu.js +0 -23
  521. package/dist/files/project/components/drive-empty-art.d.ts +0 -2
  522. package/dist/files/project/components/drive-empty-art.js +0 -5
  523. package/dist/internal/hooks/use-media-query.d.ts +0 -2
  524. package/dist/internal/share/public-share-link-button.d.ts +0 -14
  525. package/dist/internal/share/public-share-link-button.js +0 -17
  526. package/dist/markdown/setup-links/app-credentials-form.d.ts +0 -12
  527. package/dist/markdown/setup-links/app-credentials-form.js +0 -115
  528. /package/dist/{internal/hooks → hooks}/use-media-query.js +0 -0
@@ -1,3 +1,4 @@
1
+ import type { ProjectAccessRequest } from '@kortix/sdk';
1
2
  import { type HubTarget } from '../../internal/stores/account-panel-store.js';
2
3
  /**
3
4
  * The pending-access-requests control, floated over the hero's top-right
@@ -6,6 +7,11 @@ import { type HubTarget } from '../../internal/stores/account-panel-store.js';
6
7
  * (KRTX-1742), and two bells on one screen would read as one control. With
7
8
  * the flag off there is no inbox bell, and the glyph stays the bell.
8
9
  *
10
+ * It draws its count with the inbox's `BellMark`, in the yellow "needs you"
11
+ * tone: a request waits on the person, so it reads like the sidebar bell.
12
+ * Hover opens the people card of the session header's participant stack:
13
+ * who asked and when, with one way to review.
14
+ *
9
15
  * ## One button, not two
10
16
  *
11
17
  * The destination needs the project's `account_id`, which arrives on its own
@@ -23,8 +29,9 @@ import { type HubTarget } from '../../internal/stores/account-panel-store.js';
23
29
  * runs at 80% of the enter. Under reduced motion the scale is dropped and the
24
30
  * fade stays, because the fade is what says "this is new".
25
31
  */
26
- export declare function AccessRequestsBell({ count, to, notificationCenter, className, }: {
27
- count: number;
32
+ export declare function AccessRequestsBell({ requests, to, notificationCenter, className, }: {
33
+ /** The project's pending access requests, newest last as the API returns them. */
34
+ requests: ProjectAccessRequest[];
28
35
  /** The account hub's Access › Projects pane, scoped to this project.
29
36
  * `null` while `account_id` is still loading — the bell renders inert. */
30
37
  to: HubTarget | null;
@@ -1,11 +1,16 @@
1
1
  'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { BellIcon, UserPlusIcon } from '@phosphor-icons/react';
4
4
  import { AnimatePresence, m, useReducedMotion } from 'motion/react';
5
+ import { useState } from 'react';
6
+ import { BellMark } from '../../internal/notifications/notification-bell.js';
5
7
  import { HubLink } from '../../internal/account-hub/account-hub-location.js';
6
- import { Badge } from '../../primitives/badge.js';
7
8
  import { Button } from '../../primitives/button.js';
8
- import Hint from '../../primitives/hint.js';
9
+ import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
10
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from '../../primitives/hover-card.js';
11
+ import { UserAvatar } from '../../primitives/user-avatar.js';
12
+ import { useLocale, useTranslations } from '../../i18n/index.js';
13
+ import { relativeTime } from '../../internal/lib/relative-time.js';
9
14
  import { cn } from '../../internal/lib/utils.js';
10
15
  /**
11
16
  * The pending-access-requests control, floated over the hero's top-right
@@ -14,6 +19,11 @@ import { cn } from '../../internal/lib/utils.js';
14
19
  * (KRTX-1742), and two bells on one screen would read as one control. With
15
20
  * the flag off there is no inbox bell, and the glyph stays the bell.
16
21
  *
22
+ * It draws its count with the inbox's `BellMark`, in the yellow "needs you"
23
+ * tone: a request waits on the person, so it reads like the sidebar bell.
24
+ * Hover opens the people card of the session header's participant stack:
25
+ * who asked and when, with one way to review.
26
+ *
17
27
  * ## One button, not two
18
28
  *
19
29
  * The destination needs the project's `account_id`, which arrives on its own
@@ -31,11 +41,15 @@ import { cn } from '../../internal/lib/utils.js';
31
41
  * runs at 80% of the enter. Under reduced motion the scale is dropped and the
32
42
  * fade stays, because the fade is what says "this is new".
33
43
  */
34
- export function AccessRequestsBell({ count, to, notificationCenter = false, className, }) {
44
+ export function AccessRequestsBell({ requests, to, notificationCenter = false, className, }) {
45
+ const t = useTranslations('hardcodedUi.i18nComplete');
46
+ const locale = useLocale();
35
47
  const reduceMotion = useReducedMotion();
48
+ const [open, setOpen] = useState(false);
49
+ const count = requests.length;
36
50
  const label = `${count} pending access request${count === 1 ? '' : 's'}`;
37
51
  const Glyph = notificationCenter ? UserPlusIcon : BellIcon;
38
- const body = (_jsxs(_Fragment, { children: [_jsx(Glyph, { className: "size-4" }), _jsx(Badge, { size: "xs", variant: "new", className: "absolute -top-1 -right-1 min-w-5 px-1 tabular-nums", children: count })] }));
52
+ const body = _jsx(BellMark, { count: count, needsYou: true, icon: Glyph });
39
53
  return (_jsx(AnimatePresence, { children: count > 0 && (_jsx(m.div, { initial: reduceMotion ? { opacity: 0 } : { opacity: 0, scale: 0.95 }, animate: {
40
54
  opacity: 1,
41
55
  scale: 1,
@@ -44,5 +58,5 @@ export function AccessRequestsBell({ count, to, notificationCenter = false, clas
44
58
  opacity: 0,
45
59
  scale: reduceMotion ? 1 : 0.95,
46
60
  transition: { duration: 0.12, ease: [0.23, 1, 0.32, 1] },
47
- }, className: cn('absolute top-4 right-4 z-20', className), children: _jsx(Hint, { label: label, children: _jsx(Button, { asChild: Boolean(to), type: "button", variant: "ghost", size: "icon", className: "bg-background/80 relative backdrop-blur-sm", "aria-label": label, children: to ? _jsx(HubLink, { to: to, children: body }) : body }) }) }, "access-requests-bell")) }));
61
+ }, className: cn('absolute top-2 right-2 z-20', className), children: _jsxs(HoverCard, { open: open, onOpenChange: setOpen, openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx(Button, { asChild: Boolean(to), type: "button", variant: "ghost", size: "icon", className: "relative shrink-0", "aria-label": label, children: to ? _jsx(HubLink, { to: to, children: body }) : body }) }), _jsxs(HoverCardContent, { side: "bottom", align: "end", sideOffset: 6, animated: false, className: "w-80 overflow-hidden p-0", onEscapeKeyDown: () => setOpen(false), children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between px-3.5 pt-2.5 pb-1 text-xs", children: [_jsx("span", { children: t.raw('textf810ceed99d6') }), _jsx("span", { className: "tabular-nums", children: count })] }), _jsx(FadedScrollArea, { fadeColor: "from-popover", fadeSize: "6", className: "max-h-64 overscroll-contain", children: _jsx("ul", { className: "p-1 pt-0", children: requests.map((request) => (_jsx("li", { children: _jsxs("div", { className: "text-foreground flex min-h-9 items-center gap-2.5 px-2 py-1 text-sm", children: [_jsx(UserAvatar, { email: request.requester_email, size: "md" }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate leading-tight", children: request.requester_email }), _jsxs("span", { className: "text-muted-foreground truncate text-xs leading-tight tabular-nums", children: [t.raw('text2d9e28289fac'), " ", relativeTime(request.created_at, locale)] })] })] }) }, request.request_id))) }) }), to ? (_jsx("div", { className: "border-border border-t p-1", children: _jsx(Button, { asChild: true, variant: "ghost", size: "sm", className: "w-full justify-center", children: _jsx(HubLink, { to: to, onClick: () => setOpen(false), children: t.raw('textaff0766a5290') }) }) })) : null] })] }) }, "access-requests-bell")) }));
48
62
  }
@@ -1,5 +1,4 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { HubTarget } from '../../internal/stores/account-panel-store.js';
3
2
  /**
4
3
  * "Your first chat with Kortix": what project home shows a new person instead
5
4
  * of its usual greeting, until they send their first message.
@@ -10,30 +9,18 @@ import type { HubTarget } from '../../internal/stores/account-panel-store.js';
10
9
  * composer already where it stays, so nothing jumps.
11
10
  *
12
11
  * The welcome is static text, and it stays: it is never replaced by a
13
- * session. Every send from here — typed, "Recommend tools", or "Update
14
- * memory" — starts a new session and opens it; coming back to project home
15
- * shows this welcome again.
12
+ * session. Every send from here starts a new session and opens it; coming
13
+ * back to project home shows this welcome again.
16
14
  *
17
- * The welcome reads as one short message: a greeting, one line of intro, then
18
- * the question as the label of the starter tiles it asks about. Two tiles act
19
- * in the product rather than filling the composer:
20
- * - "Invite teammate" opens the account hub's Access tab, only for someone who
21
- * may manage members.
22
- * - "Connect Slack" runs the one-click Slack install in a popup and turns into
23
- * a checked tile once the install lands.
15
+ * It reads as one short message: a greeting, one line of intro, then what
16
+ * Kortix can do — six items to read, not to click — and one line that points
17
+ * at the composer. A new project's composer holds "Onboard me" here
18
+ * (`project-home.tsx`); the agent's guided setup does the connecting and
19
+ * inviting the items describe.
24
20
  *
25
21
  * The welcome fades in once, over 300ms. It is opacity only, so reduced motion
26
22
  * needs no other variant.
27
23
  */
28
- export declare function FirstChat({ projectId, inviteTo, composer, busy, onRecommendTools, onUpdateMemory, }: {
29
- projectId: string;
30
- /** Where "Invite teammate" opens; `null` hides the tile (no permission, or
31
- * the project's account is still loading). */
32
- inviteTo: HubTarget | null;
33
- /** The docked composer. Project home owns its wiring. */
24
+ export declare function FirstChat({ composer }: {
34
25
  composer: ReactNode;
35
- /** A send is in flight: the starters wait with the composer. */
36
- busy: boolean;
37
- onRecommendTools: () => void;
38
- onUpdateMemory: () => void;
39
26
  }): import("react").JSX.Element;
@@ -1,16 +1,21 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { CheckCircleIcon, GrainsIcon, PlugsConnectedIcon, UserPlusIcon, } from '@phosphor-icons/react';
4
- import { useEffect, useId, useState } from 'react';
5
- import Loading from '../../primitives/loading.js';
6
- import { HubLink } from '../../internal/account-hub/account-hub-location.js';
7
- import { Slack } from '../../internal/icons/slack.js';
8
- import { useSlackInstall, useSlackMode } from '../../internal/hooks/channels/use-channels-installations.js';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { AppWindowIcon, BriefcaseIcon, ChatsCircleIcon, ClockIcon, GrainsIcon, PlugsConnectedIcon, } from '@phosphor-icons/react';
4
+ import { useId } from 'react';
9
5
  import { useUiViewer } from '../../providers/ui-provider.js';
10
6
  import { SESSION_TRANSCRIPT_CLASS } from '../../session/thread/session-transcript-class.js';
11
7
  import { useTranslations } from '../../i18n/index.js';
12
8
  import { cn } from '../../internal/lib/utils.js';
13
9
  import { firstNameOf } from './first-chat-name.js';
10
+ /** What Kortix does, in the order a new person meets it. Keys under `firstChat.can`. */
11
+ const CAPABILITIES = [
12
+ { key: 'work', icon: BriefcaseIcon },
13
+ { key: 'memory', icon: GrainsIcon },
14
+ { key: 'tools', icon: PlugsConnectedIcon },
15
+ { key: 'chat', icon: ChatsCircleIcon },
16
+ { key: 'schedule', icon: ClockIcon },
17
+ { key: 'apps', icon: AppWindowIcon },
18
+ ];
14
19
  /**
15
20
  * "Your first chat with Kortix": what project home shows a new person instead
16
21
  * of its usual greeting, until they send their first message.
@@ -21,81 +26,26 @@ import { firstNameOf } from './first-chat-name.js';
21
26
  * composer already where it stays, so nothing jumps.
22
27
  *
23
28
  * The welcome is static text, and it stays: it is never replaced by a
24
- * session. Every send from here — typed, "Recommend tools", or "Update
25
- * memory" — starts a new session and opens it; coming back to project home
26
- * shows this welcome again.
29
+ * session. Every send from here starts a new session and opens it; coming
30
+ * back to project home shows this welcome again.
27
31
  *
28
- * The welcome reads as one short message: a greeting, one line of intro, then
29
- * the question as the label of the starter tiles it asks about. Two tiles act
30
- * in the product rather than filling the composer:
31
- * - "Invite teammate" opens the account hub's Access tab, only for someone who
32
- * may manage members.
33
- * - "Connect Slack" runs the one-click Slack install in a popup and turns into
34
- * a checked tile once the install lands.
32
+ * It reads as one short message: a greeting, one line of intro, then what
33
+ * Kortix can do — six items to read, not to click — and one line that points
34
+ * at the composer. A new project's composer holds "Onboard me" here
35
+ * (`project-home.tsx`); the agent's guided setup does the connecting and
36
+ * inviting the items describe.
35
37
  *
36
38
  * The welcome fades in once, over 300ms. It is opacity only, so reduced motion
37
39
  * needs no other variant.
38
40
  */
39
- export function FirstChat({ projectId, inviteTo, composer, busy, onRecommendTools, onUpdateMemory, }) {
41
+ export function FirstChat({ composer }) {
40
42
  const t = useTranslations('firstChat');
41
43
  const user = useUiViewer();
42
44
  const name = firstNameOf(user?.metadata);
43
45
  const headingId = useId();
44
- const questionId = useId();
46
+ const canId = useId();
45
47
  return (_jsxs("div", { className: "relative z-10 flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("section", { "aria-labelledby": headingId, className: cn(SESSION_TRANSCRIPT_CLASS,
46
48
  // Below the floating sidebar toggle, and a little lower on wide
47
49
  // screens where the column has room to breathe.
48
- 'flex flex-col gap-10 pt-16 pb-8 lg:pt-24', 'transition-opacity duration-(--duration-slow) ease-out starting:opacity-0'), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h1", { id: headingId, className: "text-foreground text-2xl font-medium tracking-tight text-balance", children: name ? t('greeting', { name }) : t('greetingNoName') }), _jsx("p", { className: "text-muted-foreground max-w-prose text-base leading-7 text-pretty", children: t('intro') })] }), _jsxs("div", { role: "group", "aria-labelledby": questionId, className: "flex flex-col gap-4", children: [_jsx("p", { id: questionId, className: "text-foreground text-base font-medium", children: t('question') }), _jsxs("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(StarterTile, { icon: PlugsConnectedIcon, label: t('recommendTools'), disabled: busy, onClick: onRecommendTools }), _jsx(StarterTile, { icon: GrainsIcon, label: t('updateMemory'), disabled: busy, onClick: onUpdateMemory }), inviteTo && (_jsx(HubLink, { to: inviteTo, className: tileClass, children: _jsx(TileBody, { glyph: _jsx(UserPlusIcon, { className: "size-4" }), label: t('inviteTeammate') }) })), _jsx(SlackTile, { projectId: projectId })] })] })] }) }), composer] }));
49
- }
50
- const tileClass = cn('border-border bg-popover text-foreground relative flex h-30 w-auto flex-col justify-between rounded-md border p-4 text-left', 'transition-[background-color,border-color,scale] duration-(--duration-normal)', 'focus-visible:ring-kortix-base focus-visible:ring-[0.6px] focus-visible:outline-none', 'hover:border-primary/20 cursor-pointer active:scale-[0.97] motion-reduce:active:scale-100', 'disabled:pointer-events-none disabled:opacity-50', 'aria-disabled:pointer-events-none');
51
- /** The icon in its own chip at the top, the title at the bottom on one line. */
52
- function TileBody({ glyph, label, badge }) {
53
- return (_jsxs(_Fragment, { children: [_jsx("span", { className: "bg-muted text-foreground flex size-8 items-center justify-center rounded-sm", children: glyph }), _jsx("span", { className: "truncate text-sm leading-5 font-medium whitespace-nowrap", children: label }), badge && (_jsx("span", { "aria-hidden": true, className: "absolute top-4 right-4", children: badge }))] }));
54
- }
55
- /**
56
- * A square starter that fills the composer. The same tile shape as
57
- * onboarding's app grid, so the first screen after onboarding reads as its
58
- * continuation.
59
- */
60
- function StarterTile({ icon: Glyph, label, disabled, onClick, }) {
61
- return (_jsx("button", { type: "button", disabled: disabled, onClick: onClick, className: tileClass, children: _jsx(TileBody, { glyph: _jsx(Glyph, { className: "size-4.5", "aria-hidden": true }), label: label }) }));
62
- }
63
- /** How long a popup install may take before the tile stops waiting on it. */
64
- const SLACK_WAIT_MS = 5 * 60_000;
65
- const SLACK_POLL_MS = 2_500;
66
- /**
67
- * One click installs Kortix into Slack: the popup opens inside the click, and
68
- * the tile polls the installation until it lands, then shows a check. With no
69
- * managed Slack app on this deployment (`oauth_available` false) the tile is
70
- * hidden; the custom-app setup lives on the Channels page.
71
- */
72
- function SlackTile({ projectId }) {
73
- const t = useTranslations('firstChat');
74
- const mode = useSlackMode(projectId);
75
- const install = useSlackInstall(projectId);
76
- const [waitingSince, setWaitingSince] = useState(null);
77
- const connected = Boolean(install.data);
78
- const waiting = waitingSince !== null && !connected;
79
- const refetch = install.refetch;
80
- useEffect(() => {
81
- if (!waiting)
82
- return;
83
- const poll = setInterval(() => void refetch(), SLACK_POLL_MS);
84
- const stop = setTimeout(() => setWaitingSince(null), SLACK_WAIT_MS);
85
- return () => {
86
- clearInterval(poll);
87
- clearTimeout(stop);
88
- };
89
- }, [waiting, refetch]);
90
- const installUrl = mode.data?.oauth_available ? mode.data.install_url : null;
91
- if (!installUrl && !connected)
92
- return null;
93
- return (_jsx("button", { type: "button", "aria-disabled": connected || undefined, "aria-busy": waiting || undefined, "aria-label": connected ? t('slackConnected') : t('connectSlack'), onClick: () => {
94
- if (connected || !installUrl)
95
- return;
96
- window.open(installUrl, 'kortix-slack-install', 'width=640,height=780,noopener');
97
- setWaitingSince(Date.now());
98
- }, className: cn(tileClass, connected && 'border-primary/40 bg-primary/[0.05] cursor-default'), children: _jsx(TileBody, { glyph: _jsx(Slack, { className: "size-4" }), label: connected ? t('slackConnected') : t('connectSlack'), badge: waiting ? (
99
- // Inside a <button> the spinner defaults to `text-background`.
100
- _jsx(Loading, { variant: "spokes", className: "text-foreground! size-4" })) : connected ? (_jsx(CheckCircleIcon, { weight: "fill", className: "text-foreground size-4" })) : null }) }));
50
+ 'flex flex-col gap-10 pt-16 pb-8 lg:pt-24', 'transition-opacity duration-(--duration-slow) ease-out starting:opacity-0'), children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("h1", { id: headingId, className: "text-foreground text-2xl font-medium tracking-tight text-balance", children: name ? t('greeting', { name }) : t('greetingNoName') }), _jsx("p", { className: "text-muted-foreground max-w-prose text-base leading-7 text-pretty", children: t('intro') })] }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("h2", { id: canId, className: "text-foreground text-base font-medium", children: t('canTitle') }), _jsx("ul", { "aria-labelledby": canId, className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3", children: CAPABILITIES.map(({ key, icon: Glyph }) => (_jsxs("li", { className: "border-border bg-popover flex flex-col gap-3 rounded-md border p-4", children: [_jsx("span", { className: "bg-muted text-foreground flex size-8 items-center justify-center rounded-sm", children: _jsx(Glyph, { className: "size-4", "aria-hidden": true }) }), _jsxs("span", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-foreground text-sm leading-5 font-medium", children: t(`can.${key}.title`) }), _jsx("span", { className: "text-muted-foreground text-sm leading-5 text-pretty", children: t(`can.${key}.body`) })] })] }, key))) }), _jsx("p", { className: "text-muted-foreground text-sm leading-5 text-pretty", children: t('startHint') })] })] }) }), composer] }));
101
51
  }
@@ -20,6 +20,12 @@ export { useProjectHomeSend, type UseProjectHomeSendOptions } from './layout/use
20
20
  export { SavedSessionSkeleton } from './saved-session-skeleton.js';
21
21
  export { SessionLayout, SessionWorkspace, type SessionLayoutProps, type SessionWorkspaceProps, } from './session-workspace.js';
22
22
  export { ProjectSessionsView } from './sessions/project-sessions-view.js';
23
+ export { SpaceView, type SpaceFolder, type SpaceTarget, type SpaceViewProps } from './spaces/space-view.js';
24
+ export { ChannelGlyph } from './spaces/channel-glyph.js';
25
+ export { agentLabel } from './spaces/space-timeline.js';
26
+ export { MemoryView, type MemoryViewProps } from './memory/memory-view.js';
27
+ export { type MemoryLayerRef, useMemoryPageHref } from '../internal/lib/memory-href.js';
28
+ export { CompanyMemoryPage } from './memory/company-memory-page.js';
23
29
  export { ProjectSessionList } from './sidebar/project-session-list.js';
24
30
  export { ProjectSidebar } from './sidebar/project-sidebar.js';
25
31
  export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
@@ -20,6 +20,12 @@ export { useProjectHomeSend } from './layout/use-project-home-send.js';
20
20
  export { SavedSessionSkeleton } from './saved-session-skeleton.js';
21
21
  export { SessionLayout, SessionWorkspace, } from './session-workspace.js';
22
22
  export { ProjectSessionsView } from './sessions/project-sessions-view.js';
23
+ export { SpaceView } from './spaces/space-view.js';
24
+ export { ChannelGlyph } from './spaces/channel-glyph.js';
25
+ export { agentLabel } from './spaces/space-timeline.js';
26
+ export { MemoryView } from './memory/memory-view.js';
27
+ export { useMemoryPageHref } from '../internal/lib/memory-href.js';
28
+ export { CompanyMemoryPage } from './memory/company-memory-page.js';
23
29
  export { ProjectSessionList } from './sidebar/project-session-list.js';
24
30
  export { ProjectSidebar } from './sidebar/project-sidebar.js';
25
31
  export { ShareSessionModal } from './sidebar/modal/share-session-modal.js';
@@ -11,8 +11,14 @@ export interface ProjectHomeSendOptions extends ComposerOptions {
11
11
  * setup checklist.
12
12
  *
13
13
  * Until a new project's first message is sent, the column is the first chat
14
- * instead (`home/first-chat.tsx`, started by onboarding): the same composer,
15
- * docked at the bottom under a welcome from Kortix.
14
+ * instead (`home/first-chat.tsx`): the same composer, docked at the bottom
15
+ * under a welcome from Kortix.
16
+ *
17
+ * With `onboarding`, a project that is not onboarded yet redirects here, and
18
+ * the first chat's composer holds "Onboard me". It sends itself as soon as a
19
+ * model is usable; the agent runs the onboarding from there (the
20
+ * `kortix-onboarding` skill). Without a model the composer's tray offers
21
+ * Upgrade and Connect model.
16
22
  *
17
23
  * This component owns the composer's WIRING — which sandbox, which agent, what
18
24
  * a send carries, what a prefill does. Everything it renders is a component of
@@ -31,6 +37,12 @@ export type ProjectHomeProps = {
31
37
  busy?: boolean;
32
38
  /** With the default send: runs first; throw to refuse the send (the draft stays). */
33
39
  beforeSend?: () => Promise<void>;
40
+ /**
41
+ * A project that is not onboarded yet opens on the first chat, whose
42
+ * composer sends "Onboard me" once a model is usable. Off by default: a
43
+ * white-label or SDK host decides its own first run. Kortix web turns it on.
44
+ */
45
+ onboarding?: boolean;
34
46
  };
35
47
  /**
36
48
  * Self-contained: the composer and its pickers read the project from
@@ -1,21 +1,21 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useQuery } from '@tanstack/react-query';
3
+ import { useQuery, useQueryClient } from '@tanstack/react-query';
4
4
  import { hubTarget } from '../../internal/stores/account-panel-store.js';
5
5
  import { useTranslations } from '../../i18n/index.js';
6
- import { useCallback, useEffect, useMemo, useState } from 'react';
6
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
7
  import { ComposerChatInput } from '../../session/composer/composer-chat-input.js';
8
8
  import { ComposerDropZone } from '../../session/composer/composer-drop-zone.js';
9
9
  import { SidebarToggle } from '../../internal/layout/sidebar-toggle.js';
10
10
  import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
11
11
  import { useIsMobile } from '../../internal/hooks/index.js';
12
- import { useProjectCan } from '../../internal/lib/use-project-can.js';
12
+ import { useProjectCan, useProjectCans } from '../../internal/lib/use-project-can.js';
13
13
  import { useComposerPrefillStore } from '../../internal/stores/composer-prefill-store.js';
14
- import { isFirstChatRequested, useFirstChatPending } from '../../internal/stores/first-chat-store.js';
14
+ import { firstChatHref, isFirstChatRequested, useFirstChatPending, useFirstChatStore, } from '../../internal/stores/first-chat-store.js';
15
15
  import { ProjectScope } from '../../internal/project-scope.js';
16
- import { useUiComponents, useUiSearchParams } from '../../providers/ui-provider.js';
17
- import { getProjectDetail, listProjectAccessRequests, listProjectSandboxes, } from '@kortix/sdk';
18
- import { contract, qk } from '@kortix/sdk/react';
16
+ import { useUiComponents, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
17
+ import { getProjectDetail, listProjectAccessRequests, listProjectSandboxes, setProjectOnboardingComplete, } from '@kortix/sdk';
18
+ import { contract, invalidateProject, qk } from '@kortix/sdk/react';
19
19
  import { META_SANDBOX_SLUG, isMetaAgentName } from '../../_vendor/kortix-shared.js';
20
20
  import { AccessRequestsBell } from '../home/access-requests-bell.js';
21
21
  import { notificationCenterOn } from '../../internal/hooks/use-notification-center.js';
@@ -26,6 +26,11 @@ import { useProjectHomeSend } from './use-project-home-send.js';
26
26
  // This path is this view's public surface — the instant session shell and the
27
27
  // IAM tests already import from here, so the moved pieces keep their address.
28
28
  export { ProjectHomeWelcomeBody } from '../home/welcome-body.js';
29
+ /** What finishing the onboarding takes. Module-level: the batch key needs a stable list. */
30
+ const ONBOARDING_ACTIONS = [
31
+ PROJECT_ACTIONS.PROJECT_SETTINGS_WRITE,
32
+ PROJECT_ACTIONS.PROJECT_SESSION_START,
33
+ ];
29
34
  /**
30
35
  * Self-contained: the composer and its pickers read the project from
31
36
  * `SessionIdsProvider`, so the home provides it for its own subtree.
@@ -33,7 +38,7 @@ export { ProjectHomeWelcomeBody } from '../home/welcome-body.js';
33
38
  export function ProjectHome(props) {
34
39
  return (_jsx(ProjectScope, { projectId: props.projectId, children: _jsx(ProjectHomeView, { ...props }) }));
35
40
  }
36
- function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
41
+ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onboardingEnabled = false, }) {
37
42
  const defaultSend = useProjectHomeSend(projectId, { beforeSend });
38
43
  const { HomeAnnouncement } = useUiComponents();
39
44
  const send = onSend ?? defaultSend.send;
@@ -45,7 +50,9 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
45
50
  // home, which "New session" opens, stays the normal home.
46
51
  const searchParams = useUiSearchParams();
47
52
  const firstChatPending = useFirstChatPending(projectId);
48
- const firstChat = firstChatPending && isFirstChatRequested(searchParams);
53
+ const firstChatRequested = isFirstChatRequested(searchParams);
54
+ const router = useUiRouter();
55
+ const queryClient = useQueryClient();
49
56
  const [selectedSlug, setSelectedSlug] = useState(null);
50
57
  const [selectedAgent, setSelectedAgent] = useState(null);
51
58
  const [prefill, setPrefill] = useState(null);
@@ -83,7 +90,6 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
83
90
  ...contract('inventory'),
84
91
  refetchOnWindowFocus: false,
85
92
  });
86
- const pendingAccessCount = accessRequests.data?.requests.length ?? 0;
87
93
  // Same query key page.tsx (`ProjectIndexPage`) already fetches for this
88
94
  // project — this dedupes against that cache entry rather than firing a
89
95
  // second request. Needed here only to resolve `account_id` for the pending
@@ -97,10 +103,37 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
97
103
  ...contract('config'),
98
104
  });
99
105
  const accountId = projectDetailQuery.data?.project?.account_id;
100
- // The onboarding wizard opens over this page until the project is stamped
101
- // (`project-shell.tsx`); the promo waits for the stamp (KRTX-2378).
106
+ // The promo waits for the onboarding stamp (KRTX-2378).
102
107
  const onboarded = Boolean(projectDetailQuery.data?.project?.metadata
103
108
  ?.onboarding_completed_at);
109
+ // Only someone who can finish the onboarding is sent into it: the kickoff
110
+ // starts a session (project.session.start) and the stamp,
111
+ // `PATCH /projects/:id/onboarding`, asserts project.settings.write. A role
112
+ // missing either would auto-send a kickoff whose stamp is refused, and get
113
+ // the onboarding again on every visit. `=== true`: an unresolved probe
114
+ // never redirects someone the onboarding is not for.
115
+ const onboardingCans = useProjectCans(projectId, ONBOARDING_ACTIONS);
116
+ const canSetUpProject = ONBOARDING_ACTIONS.every((action) => onboardingCans[action]?.allowed === true);
117
+ const onboarding = onboardingEnabled && projectDetailQuery.isSuccess && !onboarded && canSetUpProject;
118
+ // The onboarding lands on the first chat: it starts the chat (the sidebar
119
+ // row) and moves the address to it. Rendered as the first chat from this
120
+ // render on, so the usual home never paints in between.
121
+ useEffect(() => {
122
+ if (!onboarding)
123
+ return;
124
+ useFirstChatStore.getState().start(projectId);
125
+ if (!firstChatRequested)
126
+ router.replace(firstChatHref(projectId));
127
+ }, [onboarding, firstChatRequested, projectId, router]);
128
+ const firstChat = (firstChatPending && firstChatRequested) || onboarding;
129
+ // Once per mount: a second prefill id would send a second kickoff.
130
+ const kickoffQueuedRef = useRef(false);
131
+ useEffect(() => {
132
+ if (!onboarding || kickoffQueuedRef.current)
133
+ return;
134
+ kickoffQueuedRef.current = true;
135
+ setPrefill({ text: tFirstChat('kickoff'), id: Date.now(), submit: 'when-ready' });
136
+ }, [onboarding, tFirstChat]);
104
137
  // Resolved during render so the bell is an anchor and Next holds its payload
105
138
  // in the segment cache. `account_id` arrives on a different query than the
106
139
  // count, so the bell can paint before the destination exists.
@@ -108,16 +141,27 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
108
141
  ? hubTarget(accountId, { tab: 'access-projects', project: projectId })
109
142
  : null;
110
143
  const handleSend = useCallback((text, files, options, attachments) => {
111
- const sent = send(text, files, {
144
+ const sent = Promise.resolve(send(text, files, {
112
145
  ...options,
113
146
  ...(metaSelected
114
147
  ? { sandbox_slug: META_SANDBOX_SLUG }
115
148
  : selectedSlug
116
149
  ? { sandbox_slug: selectedSlug }
117
150
  : {}),
118
- }, attachments);
151
+ }, attachments));
152
+ // The first send opened a session: the project is onboarded. Stamped
153
+ // only after the create resolves, so a refused send keeps the
154
+ // onboarding for the next visit.
155
+ if (onboarding) {
156
+ // Spent: a composer mounted later must not apply it again.
157
+ setPrefill(null);
158
+ void sent
159
+ .then(() => setProjectOnboardingComplete(projectId, true))
160
+ .then(() => invalidateProject(queryClient, projectId))
161
+ .catch(() => undefined);
162
+ }
119
163
  return sent;
120
- }, [metaSelected, selectedSlug, send]);
164
+ }, [metaSelected, selectedSlug, send, onboarding, projectId, queryClient]);
121
165
  const isMobile = useIsMobile();
122
166
  const pendingPrefill = useComposerPrefillStore((s) => s.prefillByProject[projectId]);
123
167
  const consumePrefill = useComposerPrefillStore((s) => s.consume);
@@ -186,10 +230,5 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, }) {
186
230
  return (
187
231
  // A file dropped anywhere on the page attaches to the composer, as on a
188
232
  // session page.
189
- _jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { count: pendingAccessCount, to: accessRequestsTo, notificationCenter: notificationCenterOn(projectDetailQuery.data?.project) }), firstChatPending || !onboarded || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), firstChat ? (_jsx(FirstChat, { projectId: projectId, inviteTo: canManageMembers ? accessRequestsTo : null, composer: composer, busy: creating,
190
- // Both starters send at once, each into a new session. Through the
191
- // composer's own submit, not `sendOutsideComposer`: the send carries
192
- // the agent and model the composer shows, and a missing model refuses
193
- // it the same way a typed message is refused.
194
- onRecommendTools: () => setPrefill({ text: tFirstChat('toolsPrompt'), id: Date.now(), submit: true }), onUpdateMemory: () => setPrefill({ text: tFirstChat('memoryPrompt'), id: Date.now(), submit: true }) })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
233
+ _jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo, notificationCenter: notificationCenterOn(projectDetailQuery.data?.project) }), firstChatPending || !onboarded || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), firstChat ? (_jsx(FirstChat, { composer: composer })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
195
234
  }
@@ -7,6 +7,14 @@ export interface UseProjectHomeSendOptions {
7
7
  * apps/web checks the account's billing state here.
8
8
  */
9
9
  beforeSend?: () => Promise<void>;
10
+ /**
11
+ * A channel or DM composer: file each send in this space as a new thread.
12
+ * The page stays: `onOpen(sessionId)` runs instead of the navigation.
13
+ */
14
+ space?: {
15
+ spaceId: string;
16
+ onOpen: (sessionId: string) => void;
17
+ };
10
18
  }
11
19
  /**
12
20
  * The project home composer's send: create the session (with the prompt as
@@ -14,7 +22,7 @@ export interface UseProjectHomeSendOptions {
14
22
  * message on its first frame. `ProjectHome` uses it when the host passes no
15
23
  * `onSend`.
16
24
  */
17
- export declare function useProjectHomeSend(projectId: string, { beforeSend }?: UseProjectHomeSendOptions): {
25
+ export declare function useProjectHomeSend(projectId: string, { beforeSend, space }?: UseProjectHomeSendOptions): {
18
26
  send: (text: string, files: AttachedFile[] | undefined, options?: ProjectHomeSendOptions, attachments?: AttachmentSubmission) => Promise<void>;
19
27
  sending: boolean;
20
28
  };