@kortix/ui 0.14.8 → 0.14.10

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 (567) hide show
  1. package/README.md +2 -2
  2. package/dist/_vendor/kortix-shared.js +116 -3
  3. package/dist/_vendor/shared/app-config.d.ts +175 -0
  4. package/dist/_vendor/shared/artifact-comments.d.ts +235 -0
  5. package/dist/_vendor/shared/channel-descriptors.d.ts +96 -0
  6. package/dist/_vendor/shared/channel-message.d.ts +45 -5
  7. package/dist/_vendor/shared/index.d.ts +2 -0
  8. package/dist/_vendor/shared/space-slug.d.ts +37 -0
  9. package/dist/access/access/access-detail-shell.js +1 -1
  10. package/dist/access/access/principal-picker.d.ts +11 -0
  11. package/dist/access/access/principal-picker.js +3 -2
  12. package/dist/apps/app-preview-pool.d.ts +7 -2
  13. package/dist/apps/app-preview-pool.js +30 -7
  14. package/dist/apps/app-shared.d.ts +22 -15
  15. package/dist/apps/app-shared.js +37 -19
  16. package/dist/apps/index.d.ts +2 -2
  17. package/dist/apps/index.js +2 -2
  18. package/dist/artifacts/artifact-frame.d.ts +16 -0
  19. package/dist/artifacts/artifact-frame.js +55 -0
  20. package/dist/artifacts/artifact-session.d.ts +18 -0
  21. package/dist/artifacts/artifact-session.js +101 -0
  22. package/dist/artifacts/frame-policy.d.ts +30 -0
  23. package/dist/artifacts/frame-policy.js +61 -0
  24. package/dist/artifacts/index.d.ts +3 -0
  25. package/dist/artifacts/index.js +5 -0
  26. package/dist/browser/sandbox-browser-chrome.d.ts +4 -1
  27. package/dist/browser/sandbox-browser-chrome.js +2 -2
  28. package/dist/customize/agents/agent-grant-pages.d.ts +5 -1
  29. package/dist/customize/agents/agent-grant-pages.js +30 -4
  30. package/dist/customize/agents/agent-page.js +3 -1
  31. package/dist/customize/agents/agent-policy-sets.d.ts +43 -0
  32. package/dist/customize/agents/agent-policy-sets.js +72 -0
  33. package/dist/customize/agents/agent-triggers-section.js +2 -1
  34. package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.d.ts +6 -1
  35. package/dist/customize/connectors/add-mcp/add-mcp-server-dialog.js +10 -4
  36. package/dist/customize/connectors/agent-access.d.ts +35 -0
  37. package/dist/customize/connectors/agent-access.js +77 -0
  38. package/dist/customize/connectors/catalog/browse-sections.d.ts +2 -29
  39. package/dist/customize/connectors/catalog/browse-sections.js +7 -74
  40. package/dist/customize/connectors/catalog/catalog-entry.d.ts +18 -37
  41. package/dist/customize/connectors/catalog/catalog-entry.js +28 -40
  42. package/dist/customize/connectors/catalog/connector-browse.d.ts +3 -32
  43. package/dist/customize/connectors/catalog/connector-browse.js +19 -50
  44. package/dist/customize/connectors/catalog/use-catalog.d.ts +20 -59
  45. package/dist/customize/connectors/catalog/use-catalog.js +48 -175
  46. package/dist/customize/connectors/connector-identity.d.ts +9 -11
  47. package/dist/customize/connectors/connector-identity.js +13 -42
  48. package/dist/customize/connectors/connector-moves-banner.d.ts +2 -1
  49. package/dist/customize/connectors/connector-moves-banner.js +4 -6
  50. package/dist/customize/connectors/connector-routes.d.ts +21 -9
  51. package/dist/customize/connectors/connector-routes.js +29 -20
  52. package/dist/customize/connectors/connectors-page.js +53 -82
  53. package/dist/customize/connectors/detail/app-page.js +226 -98
  54. package/dist/customize/connectors/detail/computer-app-page.d.ts +16 -0
  55. package/dist/customize/connectors/detail/computer-app-page.js +39 -0
  56. package/dist/customize/connectors/detail/connector-accounts.js +3 -1
  57. package/dist/customize/connectors/detail/connector-advanced-tools.d.ts +4 -1
  58. package/dist/customize/connectors/detail/connector-advanced-tools.js +2 -2
  59. package/dist/customize/connectors/detail/connector-agents.d.ts +14 -0
  60. package/dist/customize/connectors/detail/connector-agents.js +69 -0
  61. package/dist/customize/connectors/detail/connector-detail-tabs.js +2 -1
  62. package/dist/customize/connectors/detail/connector-move-row.d.ts +8 -5
  63. package/dist/customize/connectors/detail/connector-move-row.js +23 -14
  64. package/dist/customize/connectors/detail/connector-page.d.ts +4 -1
  65. package/dist/customize/connectors/detail/connector-page.js +14 -10
  66. package/dist/customize/connectors/detail/connector-policy-sets.d.ts +28 -0
  67. package/dist/customize/connectors/detail/connector-policy-sets.js +203 -0
  68. package/dist/customize/connectors/detail/connector-settings.d.ts +4 -1
  69. package/dist/customize/connectors/detail/connector-settings.js +7 -3
  70. package/dist/customize/connectors/detail/connector-status.d.ts +19 -6
  71. package/dist/customize/connectors/detail/connector-status.js +34 -10
  72. package/dist/customize/connectors/detail/connector-tabs.d.ts +4 -1
  73. package/dist/customize/connectors/detail/connector-tabs.js +8 -2
  74. package/dist/customize/connectors/detail/connector-tools.d.ts +3 -3
  75. package/dist/customize/connectors/detail/connector-tools.js +105 -48
  76. package/dist/customize/connectors/detail/email-inboxes.d.ts +43 -0
  77. package/dist/customize/connectors/detail/email-inboxes.js +184 -0
  78. package/dist/customize/connectors/detail/provider-info.d.ts +1 -1
  79. package/dist/customize/connectors/detail/provider-info.js +2 -2
  80. package/dist/customize/connectors/detail/status-badge.d.ts +1 -1
  81. package/dist/customize/connectors/detail/status-badge.js +4 -5
  82. package/dist/customize/connectors/detail/use-connector-detail.d.ts +6 -0
  83. package/dist/customize/connectors/detail/use-connector-detail.js +14 -4
  84. package/dist/customize/connectors/install/install-dialog.d.ts +23 -0
  85. package/dist/customize/connectors/install/install-dialog.js +40 -0
  86. package/dist/customize/connectors/install/install.d.ts +13 -2
  87. package/dist/customize/connectors/install/install.js +9 -4
  88. package/dist/customize/connectors/install/use-install.d.ts +19 -2
  89. package/dist/customize/connectors/install/use-install.js +65 -37
  90. package/dist/customize/connectors/install/way-kind.d.ts +5 -0
  91. package/dist/customize/connectors/install/way-kind.js +16 -0
  92. package/dist/customize/connectors/provider-label.d.ts +2 -1
  93. package/dist/customize/connectors/provider-label.js +13 -3
  94. package/dist/customize/connectors/tools/pattern-rule-draft.d.ts +4 -0
  95. package/dist/customize/connectors/tools/pattern-rule-draft.js +12 -3
  96. package/dist/customize/connectors/tools/policy-sets.d.ts +27 -0
  97. package/dist/customize/connectors/tools/policy-sets.js +41 -0
  98. package/dist/customize/connectors/tools/tool-groups.d.ts +32 -9
  99. package/dist/customize/connectors/tools/tool-groups.js +78 -16
  100. package/dist/customize/connectors/tools/tool-policy-control.d.ts +11 -10
  101. package/dist/customize/connectors/tools/tool-policy-control.js +15 -16
  102. package/dist/customize/connectors/tools/tool-policy-labels.d.ts +6 -5
  103. package/dist/customize/connectors/tools/tool-policy-labels.js +17 -16
  104. package/dist/customize/connectors/tools/tool-policy.d.ts +50 -4
  105. package/dist/customize/connectors/tools/tool-policy.js +74 -8
  106. package/dist/customize/connectors/use-agent-access.d.ts +85 -0
  107. package/dist/customize/connectors/use-agent-access.js +72 -0
  108. package/dist/customize/migrate-to-v2/index.d.ts +1 -2
  109. package/dist/customize/migrate-to-v2/index.js +1 -2
  110. package/dist/customize/migrate-to-v2/migration-prompt.d.ts +12 -25
  111. package/dist/customize/migrate-to-v2/migration-prompt.js +34 -236
  112. package/dist/customize/migrate-to-v2/upgrade-defs.d.ts +1 -1
  113. package/dist/customize/migrate-to-v2/upgrade-defs.js +7 -6
  114. package/dist/customize/migrate-to-v2/upgrade-view.js +7 -7
  115. package/dist/customize/migrate-to-v2/use-run-upgrade.d.ts +3 -3
  116. package/dist/customize/providers/provider-accordion.js +17 -2
  117. package/dist/customize/sections/component/channel-access-panel.d.ts +16 -0
  118. package/dist/customize/sections/component/channel-access-panel.js +146 -0
  119. package/dist/customize/sections/component/channel-connect-hero.d.ts +3 -2
  120. package/dist/customize/sections/component/channel-connect-hero.js +3 -2
  121. package/dist/customize/sections/component/channel-hero-frame.d.ts +31 -0
  122. package/dist/customize/sections/component/channel-hero-frame.js +40 -0
  123. package/dist/customize/sections/component/channel-mocks.d.ts +6 -0
  124. package/dist/customize/sections/component/channel-mocks.js +46 -0
  125. package/dist/customize/sections/component/channel-row.d.ts +13 -3
  126. package/dist/customize/sections/component/channel-row.js +10 -4
  127. package/dist/customize/sections/component/email-connect-form.d.ts +27 -0
  128. package/dist/customize/sections/component/email-connect-form.js +183 -0
  129. package/dist/customize/sections/component/slack-connect-card.d.ts +7 -0
  130. package/dist/customize/sections/component/slack-connect-card.js +2 -3
  131. package/dist/customize/sections/component/teams-connect-card.d.ts +7 -0
  132. package/dist/customize/sections/component/teams-connect-card.js +2 -3
  133. package/dist/customize/sections/component/telegram-channel-row.js +21 -28
  134. package/dist/customize/sections/connectors-view.d.ts +1 -15
  135. package/dist/customize/sections/connectors-view.js +81 -314
  136. package/dist/customize/sections/view/agent-editor-catalog.js +10 -0
  137. package/dist/customize/sections/view/channels-view.d.ts +6 -1
  138. package/dist/customize/sections/view/channels-view.js +72 -81
  139. package/dist/customize/sections/view/gateway/gateway-overview.js +10 -2
  140. package/dist/customize/settings/rail.js +9 -0
  141. package/dist/customize/settings/settings-tabs.d.ts +1 -1
  142. package/dist/customize/settings/settings-tabs.js +1 -0
  143. package/dist/customize/settings/tabs/chrome-connections-tab.d.ts +6 -0
  144. package/dist/customize/settings/tabs/chrome-connections-tab.js +99 -0
  145. package/dist/customize/settings/tabs/experimental-tab.js +35 -16
  146. package/dist/customize/shared/catalog/catalog-empty-state.d.ts +4 -15
  147. package/dist/customize/shared/catalog/catalog-empty-state.js +9 -7
  148. package/dist/customize/shared/channels-switch-dialog.d.ts +18 -0
  149. package/dist/customize/shared/channels-switch-dialog.js +30 -0
  150. package/dist/customize/shared/feature-gate-screen.js +27 -9
  151. package/dist/customize/shared/use-customize-prefetch.d.ts +2 -3
  152. package/dist/customize/shared/use-customize-prefetch.js +9 -27
  153. package/dist/customize/triggers/schedule/post-to-field.d.ts +18 -0
  154. package/dist/customize/triggers/schedule/post-to-field.js +49 -0
  155. package/dist/customize/triggers/schedule/schedule-copy.d.ts +10 -6
  156. package/dist/customize/triggers/schedule/schedule-copy.js +42 -11
  157. package/dist/customize/triggers/schedule/schedule-detail-sheet.js +2 -1
  158. package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +22 -0
  159. package/dist/customize/triggers/schedule/trigger-composer-logic.js +25 -0
  160. package/dist/customize/triggers/schedule/trigger-composer.d.ts +5 -0
  161. package/dist/customize/triggers/schedule/trigger-composer.js +23 -14
  162. package/dist/customize/triggers/schedule/trigger-edit-logic.js +3 -0
  163. package/dist/customize/triggers/schedule/trigger-filter.js +1 -1
  164. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +2 -2
  165. package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -0
  166. package/dist/customize/triggers/schedule/trigger-toast.js +2 -1
  167. package/dist/customize/triggers/schedule-view.js +5 -2
  168. package/dist/files/index.d.ts +1 -0
  169. package/dist/files/index.js +1 -0
  170. package/dist/files/project/change-request-recovery.d.ts +1 -26
  171. package/dist/files/project/change-request-recovery.js +1 -59
  172. package/dist/files/project/components/change-request-detail-dialog.js +13 -3
  173. package/dist/files/project/components/drive-explorer.js +15 -15
  174. package/dist/files/project/components/drive-toolbar.d.ts +16 -2
  175. package/dist/files/project/components/drive-toolbar.js +14 -5
  176. package/dist/files/project/hooks/use-change-request-recovery.js +3 -19
  177. package/dist/files/project/hooks/use-change-requests.d.ts +1 -0
  178. package/dist/files/project/hooks/use-change-requests.js +11 -2
  179. package/dist/files/renderers/image-frame.d.ts +48 -0
  180. package/dist/files/renderers/image-frame.js +59 -0
  181. package/dist/files/renderers/image-renderer.d.ts +11 -1
  182. package/dist/files/renderers/image-renderer.js +13 -3
  183. package/dist/files/renderers/pdf/pdf-clipboard.d.ts +2 -0
  184. package/dist/files/renderers/pdf/pdf-clipboard.js +21 -0
  185. package/dist/files/renderers/pdf/pdf-viewer.js +4 -2
  186. package/dist/files/renderers/show-content-renderer.d.ts +9 -1
  187. package/dist/files/renderers/show-content-renderer.js +56 -14
  188. package/dist/files/runtime/file-source.js +2 -0
  189. package/dist/files/runtime/hooks/use-binary-blob.d.ts +10 -1
  190. package/dist/files/runtime/hooks/use-binary-blob.js +10 -4
  191. package/dist/files/runtime/hooks/use-shared-image.d.ts +41 -0
  192. package/dist/files/runtime/hooks/use-shared-image.js +177 -0
  193. package/dist/files/viewer/file-content-renderer.d.ts +22 -1
  194. package/dist/files/viewer/file-content-renderer.js +50 -7
  195. package/dist/files/viewer/file-header.d.ts +7 -3
  196. package/dist/files/viewer/file-header.js +20 -11
  197. package/dist/files/viewer/file-preview-modal.d.ts +1 -1
  198. package/dist/files/viewer/file-preview-modal.js +10 -22
  199. package/dist/files/viewer/file-source.d.ts +13 -0
  200. package/dist/files/viewer/use-file-content-state.d.ts +2 -0
  201. package/dist/files/viewer/use-file-content-state.js +28 -10
  202. package/dist/files/viewer/viewer-actions.d.ts +3 -1
  203. package/dist/files/viewer/viewer-actions.js +2 -2
  204. package/dist/hooks/use-media-query.d.ts +1 -0
  205. package/dist/hooks/use-mobile.d.ts +5 -0
  206. package/dist/hooks/use-mobile.js +8 -0
  207. package/dist/i18n/en.d.ts +1062 -85
  208. package/dist/i18n/en.js +1078 -101
  209. package/dist/i18n/ui-catalog/localize-ui-catalog.js +4 -0
  210. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +15 -3
  211. package/dist/index.d.ts +2 -2
  212. package/dist/index.js +2 -2
  213. package/dist/internal/account-hub/account-settings-sidebar.js +1 -1
  214. package/dist/internal/account-hub/hub-sheet.d.ts +9 -1
  215. package/dist/internal/account-hub/hub-sheet.js +21 -5
  216. package/dist/internal/account-hub/sections.d.ts +1 -1
  217. package/dist/internal/account-hub/sections.js +2 -1
  218. package/dist/internal/apps-and-extensions/apps-modal.d.ts +9 -0
  219. package/dist/internal/apps-and-extensions/apps-modal.js +107 -0
  220. package/dist/internal/auth/auth-card-shell.js +3 -3
  221. package/dist/internal/chrome/browser-icon.d.ts +24 -0
  222. package/dist/internal/chrome/browser-icon.js +58 -0
  223. package/dist/internal/chrome/chrome-card-state.d.ts +16 -0
  224. package/dist/internal/chrome/chrome-card-state.js +9 -0
  225. package/dist/internal/chrome/chrome-connect.d.ts +69 -0
  226. package/dist/internal/chrome/chrome-connect.js +178 -0
  227. package/dist/internal/chrome/chrome-mock.d.ts +4 -0
  228. package/dist/internal/chrome/chrome-mock.js +15 -0
  229. package/dist/internal/chrome/chrome-names.d.ts +15 -0
  230. package/dist/internal/chrome/chrome-names.js +35 -0
  231. package/dist/internal/chrome/extension.d.ts +47 -0
  232. package/dist/internal/chrome/extension.js +91 -0
  233. package/dist/internal/chrome/use-chrome-offered.d.ts +11 -0
  234. package/dist/internal/chrome/use-chrome-offered.js +22 -0
  235. package/dist/internal/components/agent-mark.js +5 -2
  236. package/dist/internal/connector-logo/connector-logo-source.d.ts +64 -0
  237. package/dist/internal/connector-logo/connector-logo-source.js +49 -0
  238. package/dist/internal/connector-logo/connector-logo.d.ts +39 -0
  239. package/dist/internal/connector-logo/connector-logo.js +56 -0
  240. package/dist/internal/connector-logo/connector-mark-files.d.ts +11 -0
  241. package/dist/internal/connector-logo/connector-mark-files.js +35 -0
  242. package/dist/internal/files/file-read-retry.d.ts +13 -0
  243. package/dist/internal/files/file-read-retry.js +23 -3
  244. package/dist/internal/files/session-drive-files.d.ts +5 -1
  245. package/dist/internal/files/session-drive-files.js +7 -2
  246. package/dist/internal/hooks/channels/use-channels-installations.d.ts +32 -5
  247. package/dist/internal/hooks/channels/use-channels-installations.js +55 -7
  248. package/dist/internal/hooks/channels/use-email-inboxes.d.ts +19 -0
  249. package/dist/internal/hooks/channels/use-email-inboxes.js +48 -0
  250. package/dist/internal/hooks/connectors/use-add-account.js +1 -1
  251. package/dist/internal/hooks/index.d.ts +1 -1
  252. package/dist/internal/hooks/index.js +1 -1
  253. package/dist/internal/hooks/projects/use-new-project-session.d.ts +9 -0
  254. package/dist/internal/hooks/projects/use-new-project-session.js +28 -12
  255. package/dist/internal/hooks/use-auto-scroll.d.ts +8 -1
  256. package/dist/internal/hooks/use-auto-scroll.js +4 -4
  257. package/dist/internal/icons/edge.d.ts +5 -0
  258. package/dist/internal/icons/edge.js +10 -0
  259. package/dist/internal/icons/telegram.d.ts +5 -0
  260. package/dist/internal/icons/telegram.js +6 -1
  261. package/dist/internal/layout/nav-hover-card.d.ts +35 -0
  262. package/dist/internal/layout/nav-hover-card.js +84 -0
  263. package/dist/internal/layout/project-nav-row.d.ts +3 -1
  264. package/dist/internal/layout/project-nav-row.js +3 -2
  265. package/dist/internal/layout/project-page-header.d.ts +4 -2
  266. package/dist/internal/layout/project-page-header.js +4 -3
  267. package/dist/internal/layout/project-settings-nav.js +59 -2
  268. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  269. package/dist/internal/lib/browser-error-noise.js +1 -1
  270. package/dist/internal/lib/browser-noise/rules/extensions.js +17 -3
  271. package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +7 -0
  272. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +15 -0
  273. package/dist/internal/lib/detect-os.d.ts +43 -0
  274. package/dist/internal/lib/detect-os.js +70 -0
  275. package/dist/internal/lib/manifest-version.d.ts +1 -1
  276. package/dist/internal/lib/manifest-version.js +2 -2
  277. package/dist/internal/lib/memory-href.d.ts +16 -0
  278. package/dist/internal/lib/memory-href.js +46 -0
  279. package/dist/internal/lib/use-project-feature-flags.js +13 -9
  280. package/dist/internal/lib/utils/heic-convert.d.ts +1 -1
  281. package/dist/internal/lib/utils/heic-convert.js +3 -4
  282. package/dist/internal/lib/web-notifications.d.ts +20 -0
  283. package/dist/internal/lib/web-notifications.js +48 -4
  284. package/dist/internal/notifications/notification-bell.d.ts +4 -1
  285. package/dist/internal/notifications/notification-bell.js +2 -2
  286. package/dist/internal/selection/selection-bar.d.ts +2 -1
  287. package/dist/internal/selection/selection-bar.js +1 -1
  288. package/dist/internal/stores/apps-modal-store.d.ts +8 -0
  289. package/dist/internal/stores/apps-modal-store.js +6 -0
  290. package/dist/internal/stores/composer-prefill-store.d.ts +12 -5
  291. package/dist/internal/stores/file-preview-store.d.ts +29 -2
  292. package/dist/internal/stores/file-preview-store.js +19 -1
  293. package/dist/internal/stores/kortix-computer-store.js +3 -0
  294. package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
  295. package/dist/internal/stores/sidebar-nav-store.js +3 -1
  296. package/dist/lib/routes.d.ts +13 -1
  297. package/dist/lib/routes.js +13 -0
  298. package/dist/markdown/index.d.ts +2 -1
  299. package/dist/markdown/index.js +2 -1
  300. package/dist/markdown/setup-links/approval-decision.d.ts +1 -0
  301. package/dist/markdown/setup-links/approval-decision.js +9 -3
  302. package/dist/markdown/setup-links/connector-handshake.d.ts +3 -1
  303. package/dist/markdown/setup-links/connector-handshake.js +12 -10
  304. package/dist/markdown/setup-links/secret-intake-form.d.ts +0 -10
  305. package/dist/markdown/setup-links/secret-intake-form.js +1 -1
  306. package/dist/markdown/setup-links/show-connect-hero.d.ts +28 -0
  307. package/dist/markdown/setup-links/show-connect-hero.js +91 -0
  308. package/dist/markdown/unified-markdown.js +5 -5
  309. package/dist/primitives/badge.d.ts +1 -1
  310. package/dist/primitives/badge.js +2 -0
  311. package/dist/primitives/disclosure.js +14 -2
  312. package/dist/primitives/empty-art.d.ts +12 -0
  313. package/dist/primitives/empty-art.js +11 -0
  314. package/dist/primitives/empty-state.d.ts +2 -2
  315. package/dist/primitives/empty-state.js +6 -5
  316. package/dist/primitives/mermaid-renderer.d.ts +2 -0
  317. package/dist/primitives/mermaid-renderer.js +21 -15
  318. package/dist/primitives/resizable.js +6 -1
  319. package/dist/primitives/resize-seam.d.ts +11 -0
  320. package/dist/primitives/resize-seam.js +12 -0
  321. package/dist/primitives/sidebar-panel.js +4 -7
  322. package/dist/primitives/tabs.d.ts +14 -1
  323. package/dist/primitives/tabs.js +1 -1
  324. package/dist/providers/ui-provider.d.ts +9 -0
  325. package/dist/session/composer/ComposerAboveCard.d.ts +1 -1
  326. package/dist/session/composer/ComposerAboveCard.js +2 -2
  327. package/dist/session/composer/ComposerCard.d.ts +1 -1
  328. package/dist/session/composer/ComposerCard.js +3 -3
  329. package/dist/session/composer/agent-selector.d.ts +13 -1
  330. package/dist/session/composer/agent-selector.js +25 -5
  331. package/dist/session/composer/composer-agent-access.d.ts +15 -0
  332. package/dist/session/composer/composer-agent-access.js +27 -0
  333. package/dist/session/composer/composer-chat-input.d.ts +8 -2
  334. package/dist/session/composer/composer-chat-input.js +8 -6
  335. package/dist/session/composer/composer-logic.d.ts +16 -0
  336. package/dist/session/composer/composer-logic.js +12 -0
  337. package/dist/session/composer/composer-underbar.d.ts +3 -1
  338. package/dist/session/composer/composer-underbar.js +4 -3
  339. package/dist/session/composer/composer.d.ts +15 -1
  340. package/dist/session/composer/composer.js +19 -1
  341. package/dist/session/composer/draft/composer-draft.d.ts +6 -2
  342. package/dist/session/composer/draft/composer-draft.js +5 -1
  343. package/dist/session/composer/reasoning-effort-selector.js +1 -1
  344. package/dist/session/models/chatgpt-connection-button.d.ts +11 -0
  345. package/dist/session/models/chatgpt-connection-button.js +54 -0
  346. package/dist/session/models/model-selector.js +5 -2
  347. package/dist/session/models/use-model-connection-gate.d.ts +5 -5
  348. package/dist/session/models/use-model-connection-gate.js +5 -5
  349. package/dist/session/outcomes/jump-to-outcome.d.ts +10 -0
  350. package/dist/session/outcomes/jump-to-outcome.js +11 -0
  351. package/dist/session/outcomes/session-outcomes-bridge.d.ts +14 -0
  352. package/dist/session/outcomes/session-outcomes-bridge.js +12 -0
  353. package/dist/session/outcomes/session-outcomes-provider.d.ts +3 -1
  354. package/dist/session/outcomes/session-outcomes-provider.js +33 -3
  355. package/dist/session/panel/easy/app-preview.d.ts +10 -0
  356. package/dist/session/panel/easy/app-preview.js +31 -12
  357. package/dist/session/panel/easy/change-requests-card.d.ts +7 -0
  358. package/dist/session/panel/easy/change-requests-card.js +17 -0
  359. package/dist/session/panel/easy/easy-panel-logic.js +7 -1
  360. package/dist/session/panel/easy/easy-panel.js +5 -2
  361. package/dist/session/panel/easy/file-preview.js +1 -1
  362. package/dist/session/panel/easy/outputs-card.d.ts +2 -1
  363. package/dist/session/panel/easy/outputs-card.js +3 -2
  364. package/dist/session/panel/mobile-tool-drawer.js +7 -1
  365. package/dist/session/panel/session-audit-panel.js +9 -2
  366. package/dist/session/panel/session-audit-shared.js +3 -1
  367. package/dist/session/panel/session-detail-panel.js +9 -3
  368. package/dist/session/panel/session-files-explorer.d.ts +9 -0
  369. package/dist/session/panel/session-files-explorer.js +12 -3
  370. package/dist/session/panel/session-panel-provider.d.ts +15 -1
  371. package/dist/session/panel/session-panel-provider.js +32 -7
  372. package/dist/session/panel/shared/derive-panels.d.ts +8 -1
  373. package/dist/session/panel/shared/derive-panels.js +12 -2
  374. package/dist/session/panel/shared/output-priority.js +2 -0
  375. package/dist/session/participants/session-participants.d.ts +8 -2
  376. package/dist/session/participants/session-participants.js +11 -4
  377. package/dist/session/prompts/approval-request.d.ts +5 -0
  378. package/dist/session/prompts/approval-request.js +9 -1
  379. package/dist/session/prompts/session-approval-review.d.ts +9 -0
  380. package/dist/session/prompts/session-approval-review.js +18 -0
  381. package/dist/session/status/session-error-banner.js +2 -49
  382. package/dist/session/status/session-starting-loader.d.ts +14 -2
  383. package/dist/session/status/session-starting-loader.js +16 -4
  384. package/dist/session/thread/after-first-prompt.d.ts +7 -0
  385. package/dist/session/thread/after-first-prompt.js +8 -0
  386. package/dist/session/thread/detect-command.d.ts +12 -0
  387. package/dist/session/thread/detect-command.js +20 -0
  388. package/dist/session/thread/session-chat.d.ts +3 -1
  389. package/dist/session/thread/session-chat.js +377 -252
  390. package/dist/session/thread/session-thread.d.ts +15 -1
  391. package/dist/session/thread/session-thread.js +20 -3
  392. package/dist/session/thread/session-transcript-class.d.ts +5 -1
  393. package/dist/session/thread/session-transcript-class.js +5 -1
  394. package/dist/session/thread/thread-boot-rows.d.ts +36 -0
  395. package/dist/session/thread/thread-boot-rows.js +89 -0
  396. package/dist/session/thread/transcript-rows.d.ts +31 -0
  397. package/dist/session/thread/transcript-rows.js +3 -0
  398. package/dist/session/thread/transcript.d.ts +0 -9
  399. package/dist/session/thread/transcript.js +104 -19
  400. package/dist/session/tool/shared/infrastructure-contexts.d.ts +28 -0
  401. package/dist/session/tool/shared/infrastructure-contexts.js +31 -3
  402. package/dist/session/tool/tool-part-renderer.d.ts +5 -4
  403. package/dist/session/tool/tool-part-renderer.js +8 -3
  404. package/dist/session/tool/tools/bash-tool.js +7 -6
  405. package/dist/session/tool/tools/channel-send-card.d.ts +1 -2
  406. package/dist/session/tool/tools/channel-send.d.ts +2 -1
  407. package/dist/session/tool/tools/codemode-tool.js +1 -1
  408. package/dist/session/tool/tools/connector-tools.js +1 -1
  409. package/dist/session/tool/tools/image-gen-tool.d.ts +1 -1
  410. package/dist/session/tool/tools/image-gen-tool.js +241 -53
  411. package/dist/session/tool/tools/show-tool.js +19 -8
  412. package/dist/session/turn/channel-brand.d.ts +8 -3
  413. package/dist/session/turn/channel-brand.js +20 -4
  414. package/dist/session/turn/message-author.d.ts +8 -0
  415. package/dist/session/turn/message-author.js +24 -0
  416. package/dist/session/turn/message-row.d.ts +52 -0
  417. package/dist/session/turn/message-row.js +44 -0
  418. package/dist/session/turn/plan-anchor.d.ts +1 -1
  419. package/dist/session/turn/plan-anchor.js +1 -1
  420. package/dist/session/turn/user-message.d.ts +14 -6
  421. package/dist/session/turn/user-message.js +35 -15
  422. package/dist/styles.css +1 -1
  423. package/dist/workspace/home/access-requests-bell.d.ts +9 -2
  424. package/dist/workspace/home/access-requests-bell.js +20 -6
  425. package/dist/workspace/home/first-chat.d.ts +8 -21
  426. package/dist/workspace/home/first-chat.js +22 -72
  427. package/dist/workspace/index.d.ts +6 -0
  428. package/dist/workspace/index.js +6 -0
  429. package/dist/workspace/layout/project-home.d.ts +14 -2
  430. package/dist/workspace/layout/project-home.js +60 -21
  431. package/dist/workspace/layout/use-project-home-send.d.ts +9 -1
  432. package/dist/workspace/layout/use-project-home-send.js +82 -3
  433. package/dist/workspace/memory/body-doc.d.ts +17 -0
  434. package/dist/workspace/memory/body-doc.js +208 -0
  435. package/dist/workspace/memory/body-extensions.d.ts +38 -0
  436. package/dist/workspace/memory/body-extensions.js +103 -0
  437. package/dist/workspace/memory/company-memory-page.d.ts +8 -0
  438. package/dist/workspace/memory/company-memory-page.js +16 -0
  439. package/dist/workspace/memory/memory-all.d.ts +20 -0
  440. package/dist/workspace/memory/memory-all.js +27 -0
  441. package/dist/workspace/memory/memory-body.d.ts +19 -0
  442. package/dist/workspace/memory/memory-body.js +139 -0
  443. package/dist/workspace/memory/memory-empty.d.ts +13 -0
  444. package/dist/workspace/memory/memory-empty.js +28 -0
  445. package/dist/workspace/memory/memory-history.d.ts +27 -0
  446. package/dist/workspace/memory/memory-history.js +108 -0
  447. package/dist/workspace/memory/memory-labels.d.ts +16 -0
  448. package/dist/workspace/memory/memory-labels.js +47 -0
  449. package/dist/workspace/memory/memory-page-list.d.ts +34 -0
  450. package/dist/workspace/memory/memory-page-list.js +156 -0
  451. package/dist/workspace/memory/memory-reader.d.ts +58 -0
  452. package/dist/workspace/memory/memory-reader.js +123 -0
  453. package/dist/workspace/memory/memory-view.d.ts +21 -0
  454. package/dist/workspace/memory/memory-view.js +124 -0
  455. package/dist/workspace/memory/remember-popover.d.ts +19 -0
  456. package/dist/workspace/memory/remember-popover.js +61 -0
  457. package/dist/workspace/memory/remember-this.d.ts +12 -0
  458. package/dist/workspace/memory/remember-this.js +89 -0
  459. package/dist/workspace/memory/source-mark.d.ts +18 -0
  460. package/dist/workspace/memory/source-mark.js +79 -0
  461. package/dist/workspace/memory/used-memory-chip.d.ts +14 -0
  462. package/dist/workspace/memory/used-memory-chip.js +61 -0
  463. package/dist/workspace/new/advanced-fields.d.ts +2 -1
  464. package/dist/workspace/new/advanced-fields.js +2 -2
  465. package/dist/workspace/new/source-param.d.ts +1 -1
  466. package/dist/workspace/new/source-param.js +3 -1
  467. package/dist/workspace/new/use-create-workspace.d.ts +8 -10
  468. package/dist/workspace/new/use-create-workspace.js +3 -3
  469. package/dist/workspace/projects/onboarding/app-logo.d.ts +7 -2
  470. package/dist/workspace/projects/onboarding/app-logo.js +6 -13
  471. package/dist/workspace/projects/policies-panel.js +5 -3
  472. package/dist/workspace/review/review-actions.d.ts +4 -2
  473. package/dist/workspace/review/review-actions.js +8 -2
  474. package/dist/workspace/review/review-center.js +11 -7
  475. package/dist/workspace/review/review-detail.d.ts +10 -0
  476. package/dist/workspace/review/review-detail.js +101 -13
  477. package/dist/workspace/saved-session-skeleton.d.ts +2 -2
  478. package/dist/workspace/saved-session-skeleton.js +3 -3
  479. package/dist/workspace/session-workspace.js +15 -13
  480. package/dist/workspace/sessions/project-sessions-view.js +3 -2
  481. package/dist/workspace/sessions/session-label-badges.js +2 -1
  482. package/dist/workspace/sessions/sessions-toolbar.d.ts +3 -1
  483. package/dist/workspace/sessions/sessions-toolbar.js +2 -2
  484. package/dist/workspace/sidebar/footer/project-apps-nav.d.ts +5 -0
  485. package/dist/workspace/sidebar/footer/project-apps-nav.js +41 -2
  486. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -0
  487. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +22 -0
  488. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +10 -0
  489. package/dist/workspace/sidebar/footer/project-chrome-nav.js +56 -0
  490. package/dist/workspace/sidebar/footer/project-manifest-upgrade-alert.js +13 -13
  491. package/dist/workspace/sidebar/footer/project-memory-nav.d.ts +7 -0
  492. package/dist/workspace/sidebar/footer/project-memory-nav.js +19 -0
  493. package/dist/workspace/sidebar/nav-row-meta.js +14 -2
  494. package/dist/workspace/sidebar/project-nav-items.js +3 -0
  495. package/dist/workspace/sidebar/project-session-list.js +68 -56
  496. package/dist/workspace/sidebar/project-sidebar.js +13 -2
  497. package/dist/workspace/sidebar/project-spaces-nav.d.ts +8 -0
  498. package/dist/workspace/sidebar/project-spaces-nav.js +69 -0
  499. package/dist/workspace/sidebar/session-group-order.d.ts +9 -0
  500. package/dist/workspace/sidebar/session-group-order.js +25 -0
  501. package/dist/workspace/sidebar/session-group-sections.d.ts +62 -0
  502. package/dist/workspace/sidebar/session-group-sections.js +267 -0
  503. package/dist/workspace/sidebar/session-list-chrome.d.ts +28 -0
  504. package/dist/workspace/sidebar/session-list-chrome.js +50 -0
  505. package/dist/workspace/spaces/channel-glyph.d.ts +5 -0
  506. package/dist/workspace/spaces/channel-glyph.js +6 -0
  507. package/dist/workspace/spaces/channel-setup.d.ts +16 -0
  508. package/dist/workspace/spaces/channel-setup.js +105 -0
  509. package/dist/workspace/spaces/channels-onboarding.d.ts +13 -0
  510. package/dist/workspace/spaces/channels-onboarding.js +37 -0
  511. package/dist/workspace/spaces/create-channel-dialog.d.ts +16 -0
  512. package/dist/workspace/spaces/create-channel-dialog.js +158 -0
  513. package/dist/workspace/spaces/private-channels-not-in.d.ts +9 -0
  514. package/dist/workspace/spaces/private-channels-not-in.js +69 -0
  515. package/dist/workspace/spaces/space-agents.d.ts +10 -0
  516. package/dist/workspace/spaces/space-agents.js +10 -0
  517. package/dist/workspace/spaces/space-details-dialog.d.ts +20 -0
  518. package/dist/workspace/spaces/space-details-dialog.js +176 -0
  519. package/dist/workspace/spaces/space-link-label.d.ts +49 -0
  520. package/dist/workspace/spaces/space-link-label.js +73 -0
  521. package/dist/workspace/spaces/space-links.d.ts +19 -0
  522. package/dist/workspace/spaces/space-links.js +230 -0
  523. package/dist/workspace/spaces/space-members.d.ts +46 -0
  524. package/dist/workspace/spaces/space-members.js +182 -0
  525. package/dist/workspace/spaces/space-roster.d.ts +15 -0
  526. package/dist/workspace/spaces/space-roster.js +44 -0
  527. package/dist/workspace/spaces/space-threads-tab.d.ts +56 -0
  528. package/dist/workspace/spaces/space-threads-tab.js +156 -0
  529. package/dist/workspace/spaces/space-timeline-view.d.ts +254 -0
  530. package/dist/workspace/spaces/space-timeline-view.js +235 -0
  531. package/dist/workspace/spaces/space-timeline.d.ts +106 -0
  532. package/dist/workspace/spaces/space-timeline.js +183 -0
  533. package/dist/workspace/spaces/space-triggers.d.ts +13 -0
  534. package/dist/workspace/spaces/space-triggers.js +78 -0
  535. package/dist/workspace/spaces/space-view.d.ts +37 -0
  536. package/dist/workspace/spaces/space-view.js +436 -0
  537. package/package.json +67 -36
  538. package/skills/kortix-ui/SKILL.md +3 -3
  539. package/skills/kortix-ui/references/custom-dashboard.md +3 -3
  540. package/skills/kortix-ui/references/modules.md +29 -5
  541. package/skills/kortix-ui/references/theming.md +1 -1
  542. package/dist/customize/connectors/catalog/merge-search.d.ts +0 -10
  543. package/dist/customize/connectors/catalog/merge-search.js +0 -26
  544. package/dist/customize/connectors/detail/find-easy-connect-app.d.ts +0 -29
  545. package/dist/customize/connectors/detail/find-easy-connect-app.js +0 -22
  546. package/dist/customize/migrate-to-v2/use-migrate-to-v2.d.ts +0 -9
  547. package/dist/customize/migrate-to-v2/use-migrate-to-v2.js +0 -24
  548. package/dist/customize/sections/connector-connection-header.d.ts +0 -36
  549. package/dist/customize/sections/connector-connection-header.js +0 -33
  550. package/dist/customize/sections/connector-connection-modal.d.ts +0 -34
  551. package/dist/customize/sections/connector-connection-modal.js +0 -72
  552. package/dist/customize/sections/discover-catalogue-card.d.ts +0 -19
  553. package/dist/customize/sections/discover-catalogue-card.js +0 -26
  554. package/dist/customize/sections/discover-catalogue-detail.d.ts +0 -15
  555. package/dist/customize/sections/discover-catalogue-detail.js +0 -24
  556. package/dist/customize/sections/discover-catalogue.d.ts +0 -17
  557. package/dist/customize/sections/discover-catalogue.js +0 -132
  558. package/dist/customize/sections/llm-provider/provider-access-menu.d.ts +0 -10
  559. package/dist/customize/sections/llm-provider/provider-access-menu.js +0 -23
  560. package/dist/files/project/components/drive-empty-art.d.ts +0 -2
  561. package/dist/files/project/components/drive-empty-art.js +0 -5
  562. package/dist/internal/hooks/use-media-query.d.ts +0 -2
  563. package/dist/internal/share/public-share-link-button.d.ts +0 -14
  564. package/dist/internal/share/public-share-link-button.js +0 -17
  565. package/dist/markdown/setup-links/app-credentials-form.d.ts +0 -12
  566. package/dist/markdown/setup-links/app-credentials-form.js +0 -115
  567. /package/dist/{internal/hooks → hooks}/use-media-query.js +0 -0
@@ -11,6 +11,9 @@
11
11
  * Alone, it has no side panel: its "open in the panel" actions (Preview, file
12
12
  * chips, Terminal, Browser) open an overlay (`SessionPanelFallback`). Inside
13
13
  * `SessionWorkspace` they open in the side panel.
14
+ *
15
+ * A host that just created the session passes `firstPrompt`: the prompt shows
16
+ * at once, as the turn the transcript will draw, while the computer boots.
14
17
  */
15
18
  import type { UseSessionResult } from '@kortix/sdk/react';
16
19
  import '../tool/tools/register.js';
@@ -21,6 +24,8 @@ export interface SessionThreadProps {
21
24
  hideHeader?: boolean;
22
25
  /** Hide the composer: a transcript to read, not to answer. */
23
26
  readOnly?: boolean;
27
+ /** The reply composer's placeholder. Default: the composer's own. */
28
+ composerPlaceholder?: string;
24
29
  /**
25
30
  * A quote the host adds to the composer's reply quotes (the card above the
26
31
  * input), as a transcript selection's "Reply" does. Each new `id` adds its
@@ -30,6 +35,15 @@ export interface SessionThreadProps {
30
35
  id: number;
31
36
  text: string;
32
37
  } | null;
38
+ /**
39
+ * The first prompt of a session this host just created, as sent. Drawn at
40
+ * once (the prompt and the agent's Thinking row) while the computer boots,
41
+ * then handed to the transcript without a jump. Pass it only for that
42
+ * fresh session: the transcript draws its prompts from then on.
43
+ */
44
+ firstPrompt?: string;
45
+ /** `compact`: tighter gutters for a narrow column (a side sheet). Default: the session page's. */
46
+ density?: 'default' | 'compact';
33
47
  className?: string;
34
48
  }
35
- export declare function SessionThread({ session, hideHeader, readOnly, quote, className }: SessionThreadProps): import("react").JSX.Element;
49
+ export declare function SessionThread({ session, hideHeader, readOnly, composerPlaceholder, quote, firstPrompt, density, className, }: SessionThreadProps): import("react").JSX.Element;
@@ -1,13 +1,30 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useContext, useEffect } from 'react';
3
4
  import { cn } from '../../lib/utils.js';
4
5
  import { ProjectScope } from '../../internal/project-scope.js';
6
+ import { useFirstPromptPreviewStore } from '../composer/stores/session-composer-handoff-store.js';
5
7
  import { ProviderPoolDraftBoundary } from '../overrides/provider-pool-draft-context.js';
6
8
  import { SessionPanelFallback } from '../panel/panel-fallback.js';
7
9
  import { SessionChat } from './session-chat.js';
8
10
  import { SessionStartingLoader } from '../status/session-starting-loader.js';
11
+ import { OptimisticTurn } from './optimistic-turn.js';
12
+ import { SESSION_TRANSCRIPT_CLASS } from './session-transcript-class.js';
13
+ import { ThreadBootRows } from './thread-boot-rows.js';
14
+ import { TranscriptRowsContext } from './transcript-rows.js';
9
15
  import '../tool/tools/register.js';
10
- export function SessionThread({ session, hideHeader = false, readOnly = false, quote, className }) {
16
+ export function SessionThread({ session, hideHeader = false, readOnly = false, composerPlaceholder, quote, firstPrompt, density = 'default', className, }) {
11
17
  const { projectId, sessionId, runtimeSessionId } = session;
12
- return (_jsx(ProjectScope, { projectId: projectId, sessionId: sessionId, children: _jsx(ProviderPoolDraftBoundary, { identity: `${projectId}/${sessionId}`, children: _jsxs("div", { "data-slot": "session-thread", className: cn('relative flex h-full min-h-0 flex-col', className), children: [runtimeSessionId ? (_jsx(SessionChat, { sessionId: runtimeSessionId, projectSessionId: sessionId, projectId: projectId, sessionState: session, hideHeader: hideHeader, readOnly: readOnly, hostQuote: quote }, runtimeSessionId)) : (_jsx(SessionStartingLoader, { projectId: projectId, sessionId: sessionId })), _jsx(SessionPanelFallback, { projectId: projectId, projectSessionId: sessionId, runtimeSessionId: runtimeSessionId })] }) }) }));
18
+ const rows = useContext(TranscriptRowsContext) !== null;
19
+ // The same stand-in the instant session shell hands `SessionChat`: it draws
20
+ // the prompt until its transcript has it, then forgets it.
21
+ const bootPrompt = useFirstPromptPreviewStore((state) => state.previewBySession[sessionId]?.text ?? null) ?? (firstPrompt?.trim() || null);
22
+ useEffect(() => {
23
+ if (firstPrompt?.trim())
24
+ useFirstPromptPreviewStore.getState().setFirstPromptPreview(sessionId, firstPrompt, []);
25
+ }, [sessionId, firstPrompt]);
26
+ return (_jsx(ProjectScope, { projectId: projectId, sessionId: sessionId, children: _jsx(ProviderPoolDraftBoundary, { identity: `${projectId}/${sessionId}`, children: _jsxs("div", { "data-slot": "session-thread", "data-density": density, className: cn('group/thread relative flex h-full min-h-0 flex-col', className), children: [runtimeSessionId ? (_jsx(SessionChat, { sessionId: runtimeSessionId, projectSessionId: sessionId, projectId: projectId, sessionState: session, hideHeader: hideHeader, readOnly: readOnly, composerPlaceholder: composerPlaceholder, hostQuote: quote }, runtimeSessionId)) : rows ? (
27
+ // A channel thread: its prompt, the agent's busy row and the reply
28
+ // box from the first frame, while the computer comes up.
29
+ _jsx(ThreadBootRows, { projectId: projectId, sessionId: sessionId, composerPlaceholder: composerPlaceholder, readOnly: readOnly })) : bootPrompt ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "scrollbar-hide min-h-0 flex-1 overflow-y-auto", children: _jsx("div", { className: SESSION_TRANSCRIPT_CLASS, children: _jsx(OptimisticTurn, { text: bootPrompt, deferPreview: true, sessionId: sessionId }) }) }), _jsx("div", { className: "shrink-0", children: _jsx(SessionStartingLoader, { projectId: projectId, sessionId: sessionId }) })] })) : (_jsx(SessionStartingLoader, { projectId: projectId, sessionId: sessionId })), _jsx(SessionPanelFallback, { projectId: projectId, projectSessionId: sessionId, runtimeSessionId: runtimeSessionId })] }) }) }));
13
30
  }
@@ -15,5 +15,9 @@
15
15
  * Its own module with no imports, so a surface that only needs the column (the
16
16
  * first chat on project home) does not pull `session-body.tsx`'s action panel
17
17
  * into its bundle. `session-body.tsx` re-exports it for the session surfaces.
18
+ *
19
+ * Inside a compact `SessionThread` (a narrow side column) the conversation's
20
+ * gutters and top inset tighten; the composer keeps its own. The gutters then
21
+ * match the composer's (`px-4`), so messages line up with the input card's edges.
18
22
  */
19
- export declare const SESSION_TRANSCRIPT_CLASS = "mx-auto w-full max-w-3xl min-w-0 px-7 pt-6";
23
+ export declare const SESSION_TRANSCRIPT_CLASS = "mx-auto w-full max-w-3xl min-w-0 px-7 pt-6 group-data-[density=compact]/thread:px-4 group-data-[density=compact]/thread:pt-4";
@@ -15,5 +15,9 @@
15
15
  * Its own module with no imports, so a surface that only needs the column (the
16
16
  * first chat on project home) does not pull `session-body.tsx`'s action panel
17
17
  * into its bundle. `session-body.tsx` re-exports it for the session surfaces.
18
+ *
19
+ * Inside a compact `SessionThread` (a narrow side column) the conversation's
20
+ * gutters and top inset tighten; the composer keeps its own. The gutters then
21
+ * match the composer's (`px-4`), so messages line up with the input card's edges.
18
22
  */
19
- export const SESSION_TRANSCRIPT_CLASS = 'mx-auto w-full max-w-3xl min-w-0 px-7 pt-6';
23
+ export const SESSION_TRANSCRIPT_CLASS = 'mx-auto w-full max-w-3xl min-w-0 px-7 pt-6 group-data-[density=compact]/thread:px-4 group-data-[density=compact]/thread:pt-4';
@@ -0,0 +1,36 @@
1
+ import { type TranscriptRows } from './transcript-rows.js';
2
+ /**
3
+ * A prompt not yet in the transcript, as a channel thread draws it: the
4
+ * author's row and, while it waits, the agent's row with the busy line. The
5
+ * thread panel's boot body and its first-prompt stand-in draw this one row, so
6
+ * the hand-over to the transcript's own row does not move.
7
+ */
8
+ export declare function PendingPromptRows({ text, author, sessionId, busy, }: {
9
+ text: string;
10
+ author: TranscriptRows['owner'];
11
+ sessionId: string;
12
+ busy?: boolean;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * The agent's answer row while it has drawn nothing yet: its pixel mark, its
16
+ * name and the Thinking line, where a working turn's answer row draws them
17
+ * (`SessionTurn` in rows mode: the body opens `mt-0.5`). Every waiting row of
18
+ * a channel thread is this row, so none sits outside the row grid. Null
19
+ * outside a channel thread.
20
+ */
21
+ export declare function AgentBusyRow({ sessionId }: {
22
+ sessionId: string;
23
+ }): import("react").JSX.Element | null;
24
+ /**
25
+ * A channel thread whose computer is still coming up (no runtime session yet).
26
+ * The session page shows `InstantSessionShell` here; a thread panel shows the
27
+ * same thing as rows: the first prompt by its author, the agent's busy row,
28
+ * and a working reply composer. A reply typed now joins the session's prompt
29
+ * inbox and runs once the computer is up, as on the session page.
30
+ */
31
+ export declare function ThreadBootRows({ projectId, sessionId, composerPlaceholder, readOnly, }: {
32
+ projectId: string;
33
+ sessionId: string;
34
+ composerPlaceholder?: string;
35
+ readOnly?: boolean;
36
+ }): import("react").JSX.Element;
@@ -0,0 +1,89 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useProjectSession, useSessionPrompts } from '@kortix/sdk/react';
4
+ import { useContext, useMemo } from 'react';
5
+ import { AgentMark } from '../../internal/components/agent-mark.js';
6
+ import { cn } from '../../lib/utils.js';
7
+ import { errorToast } from '../../primitives/toast.js';
8
+ import { UserAvatar } from '../../primitives/user-avatar.js';
9
+ import { useUiViewerId } from '../../providers/ui-provider.js';
10
+ import { ComposerChatInput } from '../composer/composer-chat-input.js';
11
+ import { projectQueueRows } from '../composer/queue-projection.js';
12
+ import { QueuedPromptList } from '../composer/queued-prompt-list.js';
13
+ import { useInstantSessionSend } from '../composer/use-instant-session-send.js';
14
+ import { participantLabel } from '../participants/session-participants.js';
15
+ import { SessionBusyIndicator } from '../status/session-busy-indicator.js';
16
+ import { MESSAGE_TEXT_CLASS, MessageRow } from '../turn/message-row.js';
17
+ import { parseAgentMentionReferences, parseFileMentionReferences, parseFileReferences, parseSessionReferences, stripReplyContexts, } from './message-parsing.js';
18
+ import { TranscriptRowsContext } from './transcript-rows.js';
19
+ /** The sentence a person typed, without the ref blocks the composer folds in. */
20
+ function promptSentence(text) {
21
+ let clean = parseFileReferences(text).cleanText;
22
+ clean = parseSessionReferences(clean).cleanText;
23
+ clean = parseFileMentionReferences(clean).cleanText;
24
+ clean = parseAgentMentionReferences(clean).cleanText;
25
+ return stripReplyContexts(clean).trim();
26
+ }
27
+ /**
28
+ * A prompt not yet in the transcript, as a channel thread draws it: the
29
+ * author's row and, while it waits, the agent's row with the busy line. The
30
+ * thread panel's boot body and its first-prompt stand-in draw this one row, so
31
+ * the hand-over to the transcript's own row does not move.
32
+ */
33
+ export function PendingPromptRows({ text, author, sessionId, busy = true, }) {
34
+ const rows = useContext(TranscriptRowsContext);
35
+ const name = author ? participantLabel(author) : '';
36
+ return (_jsxs(_Fragment, { children: [_jsx(MessageRow, { avatar: _jsx(UserAvatar, { email: author?.email ?? '', name: name, avatarUrl: author?.avatarUrl, size: "lg" }), name: name || rows?.unknownAuthor, children: _jsx("p", { className: cn(MESSAGE_TEXT_CLASS, 'text-pretty whitespace-pre-wrap wrap-anywhere'), children: promptSentence(text) }) }), busy ? _jsx(AgentBusyRow, { sessionId: sessionId }) : null] }));
37
+ }
38
+ /**
39
+ * The agent's answer row while it has drawn nothing yet: its pixel mark, its
40
+ * name and the Thinking line, where a working turn's answer row draws them
41
+ * (`SessionTurn` in rows mode: the body opens `mt-0.5`). Every waiting row of
42
+ * a channel thread is this row, so none sits outside the row grid. Null
43
+ * outside a channel thread.
44
+ */
45
+ export function AgentBusyRow({ sessionId }) {
46
+ const rows = useContext(TranscriptRowsContext);
47
+ if (!rows)
48
+ return null;
49
+ return (_jsx(MessageRow, { avatar: _jsx(AgentMark, { slug: rows.agentSlug ?? 'kortix', size: 28, tile: 36, label: rows.agent }), name: rows.agent, children: _jsx("div", { className: "mt-0.5", children: _jsx(SessionBusyIndicator, { sessionId: sessionId }) }) }));
50
+ }
51
+ /**
52
+ * A channel thread whose computer is still coming up (no runtime session yet).
53
+ * The session page shows `InstantSessionShell` here; a thread panel shows the
54
+ * same thing as rows: the first prompt by its author, the agent's busy row,
55
+ * and a working reply composer. A reply typed now joins the session's prompt
56
+ * inbox and runs once the computer is up, as on the session page.
57
+ */
58
+ export function ThreadBootRows({ projectId, sessionId, composerPlaceholder, readOnly = false, }) {
59
+ const rows = useContext(TranscriptRowsContext);
60
+ const promptInbox = useSessionPrompts(projectId, sessionId);
61
+ const { submitted, effectiveSubmission, extraSends, handleSend } = useInstantSessionSend({
62
+ projectId,
63
+ sessionId,
64
+ hydrated: true,
65
+ promptInbox,
66
+ });
67
+ const viewerId = useUiViewerId();
68
+ const projectSession = useProjectSession(projectId, sessionId, { enabled: !!projectId && !!sessionId }).data;
69
+ const queue = useMemo(() => projectQueueRows({
70
+ prompts: promptInbox.prompts,
71
+ drafts: extraSends.map((entry) => ({
72
+ clientMessageId: entry.id,
73
+ text: entry.text,
74
+ files: entry.files,
75
+ placement: entry.placement,
76
+ createdAtMs: 0,
77
+ posted: false,
78
+ })),
79
+ viewer: { userId: viewerId, managesSession: projectSession?.can_manage_lifecycle !== false },
80
+ }), [promptInbox.prompts, extraSends, viewerId, projectSession?.can_manage_lifecycle]);
81
+ // The session page's draft key: a draft typed here is there once the chat mounts.
82
+ const draftScope = useMemo(() => ({ kind: 'session', sessionId }), [sessionId]);
83
+ const text = effectiveSubmission?.text ?? projectSession?.first_prompt ?? null;
84
+ return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "min-h-0 flex-1 overflow-y-auto pt-4", children: text ? _jsx(PendingPromptRows, { text: text, author: rows?.owner ?? null, sessionId: sessionId }) : null }), readOnly ? null : (_jsx(ComposerChatInput, { onSend: handleSend, sessionId: sessionId, projectId: projectId, draftScope: draftScope, projectSession: projectSession, placeholder: composerPlaceholder,
85
+ // The first prompt is the turn: the box stays typeable, a send queues.
86
+ isBusy: !!submitted, sessionWorking: !!submitted, stopDisabled: !!submitted, aboveSlot: _jsx(QueuedPromptList, { rows: queue.rows, heldCount: queue.heldCount, onResume: () => void promptInbox.hold(false).catch((error) => errorToast(error.message)), onRemove: (id) => void promptInbox.remove(id).catch((error) => errorToast(error.message)), onRetry: (id) => void promptInbox.retry(id).catch((error) => errorToast(error.message)) }), underbarPlacement: "inline",
87
+ // The panel's rows run `px-5`, as `SessionChat`'s composer in the panel.
88
+ parentClassName: "max-w-none px-5 pb-4" }))] }));
89
+ }
@@ -0,0 +1,31 @@
1
+ import type { SESSION_NOTICE } from '@kortix/sdk';
2
+ /**
3
+ * Set, the transcript draws every turn as message rows (avatar, name, time,
4
+ * body), the way a channel thread reads: the prompt as its author's row, the
5
+ * answer as the agent's row with its work folded behind one line. Unset, it
6
+ * draws the session's own bubbles. A channel's thread panel sets it.
7
+ */
8
+ export interface TranscriptRows {
9
+ /** The agent's display name, on every answer row. */
10
+ agent: string;
11
+ /** The agent's raw name, the slug of its pixel mark. Unset: the default agent (`kortix`). */
12
+ agentSlug?: string;
13
+ /** The thread's starter: the author of a prompt with no recorded author. */
14
+ owner: {
15
+ name: string | null;
16
+ email: string | null;
17
+ avatarUrl: string | null;
18
+ } | null;
19
+ /** The name of a prompt whose author nobody recorded and with no owner ("Someone"). */
20
+ unknownAuthor: string;
21
+ /**
22
+ * The composer's computer notices in the host's words, by `SESSION_NOTICE`
23
+ * key: a channel thread says "this thread's computer", not "session".
24
+ */
25
+ notices?: Partial<Record<keyof typeof SESSION_NOTICE, string>>;
26
+ /** The stuck-boot restart button in the host's terms ("Restart thread"). */
27
+ labels?: {
28
+ restart: string;
29
+ };
30
+ }
31
+ export declare const TranscriptRowsContext: import("react").Context<TranscriptRows | null>;
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+ import { createContext } from 'react';
3
+ export const TranscriptRowsContext = createContext(null);
@@ -342,14 +342,5 @@ interface TranscriptTurnRowProps extends SessionTurnProps {
342
342
  fullTextState: FullTextState;
343
343
  onLoadFullText: (turnId: string, refs: readonly SessionLogReferencedText[]) => void;
344
344
  }
345
- /**
346
- * One transcript row: the turn's `TurnViewport`, its `SessionTurn`, and the
347
- * fallback waiting row. Memoized at the ROW, not only at `SessionTurn`: the
348
- * viewport re-rendered for every turn on every streamed delta (its children
349
- * element is new each time, and its class list goes through tailwind-merge),
350
- * which made a long transcript cost O(turns) per delta even though every
351
- * settled `SessionTurn` bailed out. Every prop here is a primitive or a
352
- * reference that holds while another turn streams.
353
- */
354
345
  export declare const TranscriptTurnRow: import("react").NamedExoticComponent<TranscriptTurnRowProps>;
355
346
  export {};
@@ -13,11 +13,19 @@ import { UnifiedMarkdown } from '../../markdown/unified-markdown.js';
13
13
  import { detectCommandFromText } from './detect-command.js';
14
14
  import { GenuiTelemetryContext } from '../../markdown/genui/block-telemetry.js';
15
15
  import { copyGenuiText } from '../../markdown/genui/to-markdown.js';
16
- import { useTranslations } from '../../i18n/index.js';
16
+ import { useLocale, useTranslations } from '../../i18n/index.js';
17
17
  import { isSessionLogRestoreNote, sessionLogActivityText, sessionLogAnsweredQuestionCall, sessionLogBurstSteps, sessionLogOpenCall, sessionLogTurnSegments, sessionPromptActions, splitSessionLogTurnWork, toolCallMetadata, toolKind, } from '@kortix/sdk';
18
18
  import { WarningIcon as AlertTriangle, CheckCircleIcon as CheckCircle, CheckIcon, CaretDownIcon as ChevronDown, ArrowSquareOutIcon as ExternalLink, StopCircleIcon, } from '@phosphor-icons/react';
19
19
  import { AnimatePresence, m } from 'motion/react';
20
- import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
20
+ import { memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
21
+ import { AfterFirstPromptContext } from './after-first-prompt.js';
22
+ import { TranscriptRowsContext } from './transcript-rows.js';
23
+ import { AgentBusyRow } from './thread-boot-rows.js';
24
+ import { MessageRow } from '../turn/message-row.js';
25
+ import { agentDisplayLabel } from '../composer/agent-selector.js';
26
+ import { participantLabel } from '../participants/session-participants.js';
27
+ import { AgentMark } from '../../internal/components/agent-mark.js';
28
+ import { UserAvatar } from '../../primitives/user-avatar.js';
21
29
  import { stripSystemPtyText, } from './message-parsing.js';
22
30
  import { ActivityBurst } from '../turn/activity-burst.js';
23
31
  import { TurnWorkAccordion } from '../turn/turn-work-accordion.js';
@@ -44,7 +52,8 @@ import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitiv
44
52
  import { useUserPreferencesStore } from '../../internal/stores/user-preferences-store.js';
45
53
  import { SubSessionModal } from './sub-session-modal.js';
46
54
  import { ToolPartRenderer, TurnLiveContext } from '../tool/tool-renderers.js';
47
- import { RecoveredCallsContext } from '../tool/shared/infrastructure.js';
55
+ import { ImageGenDigestsContext, ImageGenPathsContext, ImageGenRunsContext, InTranscriptTurnContext, RecoveredCallsContext, } from '../tool/shared/infrastructure.js';
56
+ import { imageDigestsShownByImageGen, imagePathsShownByImageGen, sessionLogImageGenRuns, showDrawnByImageGen } from '@kortix/sdk';
48
57
  import { recoveredShellFailures } from '../turn/recovered-failures.js';
49
58
  import { cn } from '../../lib/utils.js';
50
59
  import { extractKortixSystemMessages, extractSessionReport, stripKortixSystemTags, } from '../../internal/lib/utils/kortix-system-tags.js';
@@ -55,6 +64,8 @@ import { isAbortError, turnEndNotice, } from '@kortix/sdk';
55
64
  import { isOptimisticSessionPrompt } from '@kortix/sdk/react';
56
65
  import { CodeBlockEndpoints, SandboxUrlDetector } from '../media/sandbox-url-detector.js';
57
66
  import { HarnessSwitchMarker, RestoreNoteMarker, TurnFullText } from './session-history.js';
67
+ /** The agent whose mark stands in when a row does not name its agent. */
68
+ const DEFAULT_AGENT_SLUG = 'kortix';
58
69
  // ============================================================================
59
70
  // Optimistic answers cache
60
71
  // ============================================================================
@@ -109,7 +120,7 @@ function SystemMessageIndicator({ messages }) {
109
120
  // Combine all messages into a single line: "Goal · iteration 3/50"
110
121
  const parts = messages.map((msg) => (msg.detail ? `${msg.label} · ${msg.detail}` : msg.label));
111
122
  const text = parts.join(' · ');
112
- return (_jsxs("div", { className: "-my-1 flex items-center gap-2", children: [_jsx("div", { className: "bg-border/30 h-px flex-1" }), _jsx("span", { className: "text-muted-foreground/30 text-xs whitespace-nowrap select-none", children: text }), _jsx("div", { className: "bg-border/30 h-px flex-1" })] }));
123
+ return (_jsxs("div", { className: "-my-1 flex items-center gap-2", children: [_jsx("div", { className: "bg-border/30 h-px flex-1" }), _jsx("span", { className: "text-muted-foreground text-xs whitespace-nowrap select-none", children: text }), _jsx("div", { className: "bg-border/30 h-px flex-1" })] }));
113
124
  }
114
125
  // ============================================================================
115
126
  // Answered question card — collapsible summary of completed Q&A
@@ -233,7 +244,7 @@ export function SessionReportCard({ report, onOpen, }) {
233
244
  return (
234
245
  // A real <button>: Enter, Space and the focus ring come free, where the
235
246
  // previous role="button" div hand-rolled Enter only.
236
- _jsxs("button", { type: "button", onClick: onOpen, className: "group/report bg-popover hover:bg-accent/40 flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left transition-colors active:scale-[0.99]", children: [_jsx("span", { className: cn('flex size-8 shrink-0 items-center justify-center rounded-sm', complete ? 'bg-kortix-green/15' : 'bg-kortix-red/15'), children: complete ? (_jsx(CheckCircle, { className: "text-kortix-green size-4" })) : (_jsx(AlertTriangle, { className: "text-kortix-red size-4" })) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "text-foreground block truncate text-sm font-medium", children: [tI18nComplete.raw('texta67b04cd5c49'), " ", complete ? 'complete' : 'failed'] }), (report.project || report.prompt) && (_jsxs("span", { className: "text-muted-foreground block truncate text-xs", children: [report.project, report.project && report.prompt && (_jsxs("span", { className: "text-muted-foreground/40", children: [' ', tI18nComplete.raw('text3b9453dad42b'), ' '] })), report.prompt] }))] }), _jsx(ExternalLink, { className: "text-muted-foreground/40 group-hover/report:text-muted-foreground size-3.5 shrink-0 transition-colors" })] }));
247
+ _jsxs("button", { type: "button", onClick: onOpen, className: "group/report bg-popover hover:bg-accent/40 flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left transition-colors active:scale-[0.99]", children: [_jsx("span", { className: cn('flex size-8 shrink-0 items-center justify-center rounded-sm', complete ? 'bg-kortix-green/15' : 'bg-kortix-red/15'), children: complete ? (_jsx(CheckCircle, { className: "text-kortix-green size-4" })) : (_jsx(AlertTriangle, { className: "text-kortix-red size-4" })) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "text-foreground block truncate text-sm font-medium", children: [tI18nComplete.raw('texta67b04cd5c49'), " ", complete ? 'complete' : 'failed'] }), (report.project || report.prompt) && (_jsxs("span", { className: "text-muted-foreground block truncate text-xs", children: [report.project, report.project && report.prompt && (_jsxs("span", { className: "text-muted-foreground", children: [' ', tI18nComplete.raw('text3b9453dad42b'), ' '] })), report.prompt] }))] }), _jsx(ExternalLink, { className: "text-muted-foreground group-hover/report:text-foreground size-3.5 shrink-0 transition-colors" })] }));
237
248
  }
238
249
  /**
239
250
  * The error a turn renders, which also hides its own Thinking row: the first
@@ -659,6 +670,8 @@ function useTurnUserContent({ turn, commandMessages, commands, }) {
659
670
  const commandOutput = useMemo(() => {
660
671
  if (!commandForTurn)
661
672
  return undefined;
673
+ if ('source' in commandForTurn && commandForTurn.source === 'skill')
674
+ return undefined;
662
675
  const source = Array.isArray(commands) ? commands.find((c) => c.name === commandForTurn.name)?.source : undefined;
663
676
  return source === 'skill' ? undefined : commandForTurn;
664
677
  }, [commandForTurn, commands]);
@@ -982,6 +995,19 @@ function TurnToolBlocks(props) {
982
995
  const split = useMemo(() => (fold && !working ? splitSessionLogTurnWork(segments.filter(segmentRendersSomething), { working }) : null), [fold, segments, working]);
983
996
  // Settled turns only: while the turn runs, the next step has not happened yet.
984
997
  const recovered = useMemo(() => (working ? NO_RECOVERED_CALLS : recoveredShellFailures(turnBlocks(turn))), [turn, working]);
998
+ // D5: a `show` of an image this turn's `image_gen` already drew does not draw it again.
999
+ // Read from the segments, not the raw blocks: a script's nested call (a v2 `nested_part`
1000
+ // block) is a real `image_gen` call there. Keyed by its content so the context keeps one
1001
+ // identity across stream frames.
1002
+ // R38: the same bytes at another path (a Drive copy) count too, by sha256.
1003
+ const [imageGenPathsKey, imageGenDigestsKey] = useMemo(() => {
1004
+ const blocks = segments.flatMap((s) => (s.kind === 'burst' || s.kind === 'show-group' ? s.blocks : [s.block]));
1005
+ return [[...imagePathsShownByImageGen(blocks)].join('\n'), [...imageDigestsShownByImageGen(blocks)].join('\n')];
1006
+ }, [segments]);
1007
+ const imageGenPaths = useMemo(() => new Set(imageGenPathsKey ? imageGenPathsKey.split('\n') : []), [imageGenPathsKey]);
1008
+ const imageGenDigests = useMemo(() => new Set(imageGenDigestsKey ? imageGenDigestsKey.split('\n') : []), [imageGenDigestsKey]);
1009
+ // R38: consecutive image_gen deliverables draw as one grid at the first call, live and settled.
1010
+ const imageGenRuns = useMemo(() => sessionLogImageGenRuns(segments, { paths: imageGenPaths, digests: imageGenDigests }), [segments, imageGenPaths, imageGenDigests]);
985
1011
  const renderSegment = (segment) => {
986
1012
  const key = turnSegmentKey(segment);
987
1013
  if (key === null)
@@ -994,13 +1020,13 @@ function TurnToolBlocks(props) {
994
1020
  // will. Provided here rather than per-row because `working` is a fact
995
1021
  // about the TURN, and this block is the turn's whole part tree.
996
1022
  // See `TurnLiveContext`.
997
- _jsx(TurnLiveContext.Provider, { value: working, children: _jsx(RecoveredCallsContext.Provider, { value: recovered, children: _jsx("div", { className: "space-y-3", children: split
998
- ? [
999
- _jsx(TurnWorkAccordion, { durationMs: durationMs, children: split.work.map(renderSegment) }, "turn-work"),
1000
- ...split.hoisted.map(renderSegment),
1001
- ...split.final.map(renderSegment),
1002
- ]
1003
- : segments.map(renderSegment) }) }) })) }));
1023
+ _jsx(TurnLiveContext.Provider, { value: working, children: _jsx(RecoveredCallsContext.Provider, { value: recovered, children: _jsx(ImageGenPathsContext.Provider, { value: imageGenPaths, children: _jsx(ImageGenDigestsContext.Provider, { value: imageGenDigests, children: _jsx(ImageGenRunsContext.Provider, { value: imageGenRuns, children: _jsx(InTranscriptTurnContext.Provider, { value: true, children: _jsx("div", { className: "space-y-3", children: split
1024
+ ? [
1025
+ _jsx(TurnWorkAccordion, { durationMs: durationMs, children: split.work.map(renderSegment) }, "turn-work"),
1026
+ ...split.hoisted.map(renderSegment),
1027
+ ...split.final.map(renderSegment),
1028
+ ]
1029
+ : segments.map(renderSegment) }) }) }) }) }) }) })) }));
1004
1030
  }
1005
1031
  /** One segment of the turn's steps section: a burst, a show group, a
1006
1032
  * standalone deliverable, or prose between bursts. Keyed by the first
@@ -1023,18 +1049,30 @@ function segmentRendersSomething(segment) {
1023
1049
  return turnSegmentKey(segment) !== null;
1024
1050
  }
1025
1051
  function TurnSegment({ segment, isTrailing, working, openText, hasSteps, sessionId, permissions, onPermissionReply, disableNavigation, conversationDensity, }) {
1052
+ // A `show` whose every file this turn's `image_gen` already drew renders nothing,
1053
+ // not even ToolPartRenderer's wrapper (it would leave a gap in the stack).
1054
+ const imageGenPaths = useContext(ImageGenPathsContext);
1055
+ const imageGenDigests = useContext(ImageGenDigestsContext);
1056
+ const imageGenRuns = useContext(ImageGenRunsContext);
1057
+ const drawnByImageGen = (call) => showDrawnByImageGen(call, imageGenPaths, imageGenDigests);
1026
1058
  if (segment.kind === 'burst') {
1027
1059
  return (_jsx(ActivityBurst, { blocks: segment.blocks, sessionId: sessionId, working: working, isTrailing: isTrailing, disableNavigation: disableNavigation, density: conversationDensity }));
1028
1060
  }
1029
1061
  if (segment.kind === 'show-group') {
1030
- const visible = segment.blocks.filter(shouldShowToolPart);
1062
+ const visible = segment.blocks.filter((block) => shouldShowToolPart(block) && !drawnByImageGen(block));
1063
+ if (visible.length === 0)
1064
+ return null;
1031
1065
  if (visible.length === 1) {
1032
1066
  return (_jsx(ToolPartRenderer, { call: visible[0], sessionId: sessionId, disableNavigation: disableNavigation }));
1033
1067
  }
1034
1068
  return _jsx(ShowGroupRenderer, { calls: visible, sessionId: sessionId, disableNavigation: disableNavigation });
1035
1069
  }
1036
1070
  if (segment.kind === 'standalone') {
1037
- if (!shouldShowToolPart(segment.block))
1071
+ if (!shouldShowToolPart(segment.block) || drawnByImageGen(segment.block))
1072
+ return null;
1073
+ // A later call of an image_gen run draws in the first call's grid (R38).
1074
+ const run = imageGenRuns.get(segment.block.id);
1075
+ if (run && run[0] !== segment.block)
1038
1076
  return null;
1039
1077
  return (_jsx(ToolPartRenderer, { call: segment.block, sessionId: sessionId, disableNavigation: disableNavigation, permission: getPermissionForTool(permissions, segment.block.call_id), onPermissionReply: onPermissionReply }));
1040
1078
  }
@@ -1098,7 +1136,7 @@ function TurnFooter(props) {
1098
1136
  const { statusPhrase, statusElapsedLabel } = status;
1099
1137
  const { retryInfo, retryMessage, retrySecondsLeft } = retry;
1100
1138
  const { turnEndedAt, turnDurationMs, costInfo } = meta;
1101
- return (_jsxs(_Fragment, { children: [_jsx(TurnBusyRow, { ...props, working: working, turnError: turnError, tHardcodedUi: tHardcodedUi }), turnErrorRow.text && !turn.autoRetry?.continued && (_jsx(TurnErrorDisplay, { errorText: turnErrorRow.text, errorDetails: turnErrorRowDetails, errorRaw: turnErrorRaw, isAbort: turnErrorRow.isAbort, modelOptions: modelOptions })), turnErrorRow.text && !turnErrorRow.isAbort && !turn.autoRetry?.continued && !!turn.autoRetry?.retries && (_jsx(TurnAutoRetryNote, { count: turn.autoRetry.retries })), !working && !turn.autoRetry?.continued && (stoppedBy || errors.turnErrorIsAbort) && _jsx(TurnStoppedBy, { name: stoppedBy ?? undefined }), !working && _jsx(TurnOutcomes, { turnKey: turn.id }), !working && (_jsx(TurnActionBar, { response: response, inlineContentParts: answered.inlineContentParts, turnEndedAt: turnEndedAt, turnDurationMs: turnDurationMs, costInfo: costInfo, servedModel: servedModel, tHardcodedUi: tHardcodedUi,
1139
+ return (_jsxs(_Fragment, { children: [_jsx(TurnBusyRow, { ...props, working: working, turnError: turnError, tHardcodedUi: tHardcodedUi }), turnErrorRow.text && !turn.autoRetry?.continued && (_jsx(TurnErrorDisplay, { errorText: turnErrorRow.text, errorDetails: turnErrorRowDetails, errorRaw: turnErrorRaw, isAbort: turnErrorRow.isAbort, modelOptions: modelOptions })), turnErrorRow.text && !turnErrorRow.isAbort && !turn.autoRetry?.continued && !!turn.autoRetry?.retries && (_jsx(TurnAutoRetryNote, { count: turn.autoRetry.retries })), !working && !turn.autoRetry?.continued && (stoppedBy || errors.turnErrorIsAbort) && _jsx(TurnStoppedBy, { name: stoppedBy ?? undefined }), !working && _jsx(TurnOutcomes, { turnKey: turn.id }), !working && !props.hideActionBar && (_jsx(TurnActionBar, { response: response, inlineContentParts: answered.inlineContentParts, turnEndedAt: turnEndedAt, turnDurationMs: turnDurationMs, costInfo: costInfo, servedModel: servedModel, tHardcodedUi: tHardcodedUi,
1102
1140
  // A continuation turn's id names a compaction marker, not a user
1103
1141
  // message, so it has no response of its own to share.
1104
1142
  share: turn.continues
@@ -1125,7 +1163,7 @@ function TurnBusyRow(props) {
1125
1163
  }
1126
1164
  /** Copy + the turn's settled meta row — the hover-revealed bar at the end of
1127
1165
  * a settled turn. Owns the copy state: it is the only consumer. */
1128
- function TurnActionBar({ response, inlineContentParts, turnEndedAt, turnDurationMs, costInfo, servedModel, tHardcodedUi, share, }) {
1166
+ function TurnActionBar({ response, inlineContentParts, turnEndedAt, turnDurationMs, costInfo, servedModel, tHardcodedUi, inToolbar = false, share, }) {
1129
1167
  const [copied, setCopied] = useState(false);
1130
1168
  // ---- Copy response ----
1131
1169
  const handleCopy = async () => {
@@ -1151,11 +1189,29 @@ function TurnActionBar({ response, inlineContentParts, turnEndedAt, turnDuration
1151
1189
  // The browser refused the write; `copied` stays false.
1152
1190
  }
1153
1191
  };
1154
- return (_jsxs("div", { className: "duration-normal flex items-center gap-0.5 opacity-0 transition-opacity group-hover/turn:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100 max-md:opacity-100", children: [response ? (_jsx(Button, { variant: "ghost", size: "icon-sm", onClick: handleCopy, "aria-label": copied ? 'Copied' : tHardcodedUi.raw('i18nComplete.textf0f755afea88'), className: "hit-area-3", children: _jsx("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: _jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(m.span, { initial: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, animate: { scale: 1, opacity: 1, filter: 'blur(0px)' }, exit: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, transition: { type: 'spring', duration: 0.3, bounce: 0 }, className: "absolute inset-0 inline-flex items-center justify-center", children: copied ? (_jsx(CheckIcon, { className: "text-muted-foreground size-[1.05rem]" })) : (_jsx(Copy, { className: "text-muted-foreground size-[1.05rem]" })) }, copied ? 'check' : 'copy') }) }) })) : null, response && share ? (_jsx(TurnShareButton, { projectId: share.projectId, sessionId: share.sessionId, turnId: share.turnId })) : null, _jsx(SessionTurnMeta, { endedAt: turnEndedAt, durationMs: turnDurationMs, cost: costInfo, served: servedModel, className: "flex items-center justify-center" })] }));
1192
+ return (_jsxs("div", { className: cn('flex items-center gap-0.5', !inToolbar &&
1193
+ 'duration-normal opacity-0 transition-opacity group-hover/turn:opacity-100 focus-within:opacity-100 has-[[data-state=open]]:opacity-100 max-md:opacity-100'), children: [response ? (_jsx(Button, { variant: "ghost", size: "icon-sm", onClick: handleCopy, "aria-label": copied ? 'Copied' : tHardcodedUi.raw('i18nComplete.textf0f755afea88'), className: "hit-area-3", children: _jsx("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: _jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(m.span, { initial: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, animate: { scale: 1, opacity: 1, filter: 'blur(0px)' }, exit: { scale: 0.25, opacity: 0, filter: 'blur(4px)' }, transition: { type: 'spring', duration: 0.3, bounce: 0 }, className: "absolute inset-0 inline-flex items-center justify-center", children: copied ? (_jsx(CheckIcon, { className: cn('text-muted-foreground', inToolbar ? 'size-3.5' : 'size-[1.05rem]') })) : (_jsx(Copy, { className: cn('text-muted-foreground', inToolbar ? 'size-3.5' : 'size-[1.05rem]') })) }, copied ? 'check' : 'copy') }) }) })) : null, response && share ? (_jsx(TurnShareButton, { projectId: share.projectId, sessionId: share.sessionId, turnId: share.turnId })) : null, _jsx(SessionTurnMeta, { endedAt: turnEndedAt, durationMs: turnDurationMs, cost: costInfo, served: servedModel,
1194
+ // `icon-sm`, the same as the copy button beside it; in a row's
1195
+ // toolbar its dots match the 14px icons of the toolbar.
1196
+ className: cn('flex items-center justify-center', inToolbar && '[&_svg]:size-4!') })] }));
1197
+ }
1198
+ /** A row's time: "1:44 AM" beside the name, the full date on hover. Null without a stamp. */
1199
+ function rowTime(at, locale) {
1200
+ if (!Number.isFinite(at) || at <= 0)
1201
+ return null;
1202
+ const date = new Date(at);
1203
+ return {
1204
+ iso: date.toISOString(),
1205
+ label: date.toLocaleTimeString(locale, { hour: 'numeric', minute: '2-digit' }),
1206
+ title: date.toLocaleString(locale, { dateStyle: 'full', timeStyle: 'short' }),
1207
+ };
1155
1208
  }
1156
1209
  function SessionTurnImpl(props) {
1157
1210
  const { turn, turnOutcome, sessionId, sessionStatus, permissions, questions, sessionWorking, isWorkingTurn, awaitingUser, pending, pendingPrompt, interruptedBeforeRun, isCompaction, providers, commandMessages, commands, } = props;
1158
1211
  const tHardcodedUi = useTranslations('hardcodedUi');
1212
+ const locale = useLocale();
1213
+ const afterFirstPrompt = useContext(AfterFirstPromptContext);
1214
+ const rows = useContext(TranscriptRowsContext);
1159
1215
  const [connectProviderOpen, setConnectProviderOpen] = useState(false);
1160
1216
  // `?? 'normal'` — legacy persisted preferences predate this key (same rule
1161
1217
  // as every `panelMode` read site).
@@ -1195,7 +1251,31 @@ function SessionTurnImpl(props) {
1195
1251
  // turn works, trimmed once it landed.
1196
1252
  response: model.working ? (compactionInfo.block?.summary ?? '') : (compactionInfo.block?.summary ?? '').trim(), turnError: errors.turnError, turnErrorIsAbort: errors.turnErrorIsAbort }));
1197
1253
  }
1198
- return (_jsxs("div", { className: "group/turn text-factor-[2] space-y-2.5", children: [_jsx(TurnUserBlock, { ...props, model: model, queueTone: queueTone, userContent: userContent }), _jsx(TurnFallbackRows, { working: model.working, events: props.servedModel?.fallbacks }), _jsxs(GenuiTelemetryContext.Provider, { value: genuiTelemetry, children: [_jsx(TurnToolBlocks, { ...props, model: model, segments: segments, conversationDensity: conversationDensity, fold: !answered.shouldUseInlineContent, durationMs: meta.turnDurationMs }), _jsx(TurnAssistantBlock, { ...props, model: model, answered: answered, userContent: userContent, tHardcodedUi: tHardcodedUi })] }), _jsx(TurnFooter, { ...props, model: model, errors: errors, answered: answered, status: status, retry: retry, meta: meta, tHardcodedUi: tHardcodedUi, connectProviderOpen: connectProviderOpen, onConnectProviderOpenChange: setConnectProviderOpen })] }));
1254
+ if (rows) {
1255
+ const userAt = Date.parse(turn.user.created_at);
1256
+ const answerAt = Date.parse(turn.assistant[0]?.created_at ?? '');
1257
+ const author = props.author;
1258
+ // Another session's agent wrote this prompt (a spawned thread's first
1259
+ // message, a coordinator): its agent's row, not the thread owner's.
1260
+ const sender = author?.kind === 'session'
1261
+ ? (author.agent ? agentDisplayLabel([], author.agent) : author.name) || rows.unknownAuthor
1262
+ : null;
1263
+ const person = author?.kind === 'member'
1264
+ ? { name: author.name, email: author.email, avatarUrl: author.avatar_url ?? null }
1265
+ : rows.owner;
1266
+ const personName = person ? participantLabel(person) : '';
1267
+ const showAnswer = turn.assistant.length > 0 || model.working || !!errors.turnErrorRow.text;
1268
+ return (_jsxs("div", { className: "text-factor-[2]", children: [userContent.hasVisibleUserContent || userContent.sessionReport || userContent.systemMessages.length > 0 ? (_jsx(MessageRow
1269
+ // The first message's turn clips its toolbar's overhang: it sits inside the row.
1270
+ , {
1271
+ // The first message's turn clips its toolbar's overhang: it sits inside the row.
1272
+ className: cn('group/turn', props.isFirstTurn && '[&_[data-slot=row-toolbar]]:top-0.5'), avatar: sender ? (
1273
+ // 36px, the `lg` avatar column (`w-10`).
1274
+ _jsx(AgentMark, { slug: author?.kind === 'session' && author.agent ? author.agent : DEFAULT_AGENT_SLUG, size: 28, tile: 36, label: sender })) : (_jsx(UserAvatar, { email: person?.email ?? '', name: personName, avatarUrl: person?.avatarUrl, size: "lg" })), name: sender ?? (personName || rows.unknownAuthor), time: rowTime(userAt, locale), children: _jsx(TurnUserBlock, { ...props, model: model, queueTone: queueTone, userContent: userContent }) })) : null, props.isFirstTurn ? afterFirstPrompt : null, showAnswer ? (_jsx(MessageRow, { className: "group/turn", avatar: _jsx(AgentMark, { slug: rows.agentSlug ?? DEFAULT_AGENT_SLUG, size: 28, tile: 36, label: rows.agent }), name: rows.agent, time: rowTime(answerAt, locale), toolbar: model.working ? null : (_jsx(TurnActionBar, { inToolbar: true, response: model.response, inlineContentParts: answered.inlineContentParts, turnEndedAt: meta.turnEndedAt, turnDurationMs: meta.turnDurationMs, costInfo: meta.costInfo, servedModel: props.servedModel, tHardcodedUi: tHardcodedUi, share: turn.continues
1275
+ ? undefined
1276
+ : { projectId: props.projectId, sessionId: props.projectSessionId, turnId: turn.id } })), children: _jsxs("div", { className: "mt-0.5 space-y-2.5", children: [_jsx(TurnFallbackRows, { working: model.working, events: props.servedModel?.fallbacks }), _jsxs(GenuiTelemetryContext.Provider, { value: genuiTelemetry, children: [_jsx(TurnToolBlocks, { ...props, model: model, segments: segments, conversationDensity: conversationDensity, fold: !answered.shouldUseInlineContent, durationMs: meta.turnDurationMs }), _jsx(TurnAssistantBlock, { ...props, model: model, answered: answered, userContent: userContent, tHardcodedUi: tHardcodedUi })] }), _jsx(TurnFooter, { ...props, hideActionBar: true, model: model, errors: errors, answered: answered, status: status, retry: retry, meta: meta, tHardcodedUi: tHardcodedUi, connectProviderOpen: connectProviderOpen, onConnectProviderOpenChange: setConnectProviderOpen })] }) })) : null] }));
1277
+ }
1278
+ return (_jsxs("div", { className: "group/turn text-factor-[2] space-y-2.5", children: [_jsx(TurnUserBlock, { ...props, model: model, queueTone: queueTone, userContent: userContent }), props.isFirstTurn ? afterFirstPrompt : null, _jsx(TurnFallbackRows, { working: model.working, events: props.servedModel?.fallbacks }), _jsxs(GenuiTelemetryContext.Provider, { value: genuiTelemetry, children: [_jsx(TurnToolBlocks, { ...props, model: model, segments: segments, conversationDensity: conversationDensity, fold: !answered.shouldUseInlineContent, durationMs: meta.turnDurationMs }), _jsx(TurnAssistantBlock, { ...props, model: model, answered: answered, userContent: userContent, tHardcodedUi: tHardcodedUi })] }), _jsx(TurnFooter, { ...props, model: model, errors: errors, answered: answered, status: status, retry: retry, meta: meta, tHardcodedUi: tHardcodedUi, connectProviderOpen: connectProviderOpen, onConnectProviderOpenChange: setConnectProviderOpen })] }));
1199
1279
  }
1200
1280
  /**
1201
1281
  * The boundary that stops the transcript re-rendering with the stream.
@@ -1226,7 +1306,12 @@ SessionTurn.displayName = 'SessionTurn';
1226
1306
  * settled `SessionTurn` bailed out. Every prop here is a primitive or a
1227
1307
  * reference that holds while another turn streams.
1228
1308
  */
1309
+ /** The fallback waiting row: a channel thread's agent row, or the bare line under a bubble. */
1310
+ function TurnFallbackBusyRow({ sessionId }) {
1311
+ const rows = useContext(TranscriptRowsContext);
1312
+ return rows ? _jsx(AgentBusyRow, { sessionId: sessionId }) : _jsx(SessionBusyIndicator, { sessionId: sessionId, className: "mt-2.5" });
1313
+ }
1229
1314
  export const TranscriptTurnRow = memo(function TranscriptTurnRow({ turnId, viewportClassName, suppressed, showBusyRow, continuedWith, fullTextState, onLoadFullText, ...turnProps }) {
1230
- return (_jsxs(TurnViewport, { turnId: turnId, className: viewportClassName, continues: turnProps.turn.compaction !== null || turnProps.turn.continues !== null, children: [continuedWith && (_jsx("div", { className: "mb-6", children: _jsx(HarnessSwitchMarker, { harness: continuedWith }) })), suppressed ? null : _jsx(SessionTurn, { ...turnProps }), !suppressed && _jsx(TurnFullText, { turn: turnProps.turn, state: fullTextState, onLoad: onLoadFullText }), showBusyRow && _jsx(SessionBusyIndicator, { sessionId: turnProps.sessionId, className: "mt-2.5" })] }));
1315
+ return (_jsxs(TurnViewport, { turnId: turnId, className: viewportClassName, continues: turnProps.turn.compaction !== null || turnProps.turn.continues !== null, children: [continuedWith && (_jsx("div", { className: "mb-6", children: _jsx(HarnessSwitchMarker, { harness: continuedWith }) })), suppressed ? null : _jsx(SessionTurn, { ...turnProps }), !suppressed && _jsx(TurnFullText, { turn: turnProps.turn, state: fullTextState, onLoad: onLoadFullText }), showBusyRow && _jsx(TurnFallbackBusyRow, { sessionId: turnProps.sessionId })] }));
1231
1316
  });
1232
1317
  TranscriptTurnRow.displayName = 'TranscriptTurnRow';
@@ -66,7 +66,35 @@ export declare const TurnLiveContext: import("react").Context<boolean>;
66
66
  * the turn ended on (KRTX-3021). Empty outside a settled turn.
67
67
  */
68
68
  export declare const RecoveredCallsContext: import("react").Context<ReadonlySet<string>>;
69
+ /**
70
+ * The images the turn's `image_gen` calls already drew (`imagePathsShownByImageGen`).
71
+ * A `show` of the same file in that turn does not draw it a second time (D5).
72
+ */
73
+ export declare const ImageGenPathsContext: import("react").Context<ReadonlySet<string>>;
74
+ /**
75
+ * The sha256 of the images the turn's `image_gen` calls already drew
76
+ * (`imageDigestsShownByImageGen`): a `show` of the same bytes at another path
77
+ * (a Drive copy) is not drawn a second time either (R38).
78
+ */
79
+ export declare const ImageGenDigestsContext: import("react").Context<ReadonlySet<string>>;
80
+ /**
81
+ * The runs of the turn's `image_gen` calls that draw as one grid
82
+ * (`sessionLogImageGenRuns`), by block id: the first call draws the run, the
83
+ * others nothing (R38).
84
+ */
85
+ export declare const ImageGenRunsContext: import("react").Context<ReadonlyMap<string, ToolCallBlock[]>>;
86
+ /**
87
+ * True inside a transcript turn's steps, where `TurnLiveContext` is a fact
88
+ * about the owning turn rather than its `false` default. The image card reads
89
+ * both to tell a stopped generation from one still running.
90
+ */
91
+ export declare const InTranscriptTurnContext: import("react").Context<boolean>;
69
92
  export declare const ToolDurationContext: import("react").Context<number | undefined>;
93
+ /**
94
+ * True in a read-only session view (the sub-session modal): a tool card shows
95
+ * what happened and offers no fix (connect a model, reconnect ChatGPT).
96
+ */
97
+ export declare const ReadOnlySessionContext: import("react").Context<boolean>;
70
98
  export declare function shouldShowToolPartInActionsPanel(call: ToolCallBlock): boolean;
71
99
  export declare const ToolActivateContext: import("react").Context<((callID: string) => void) | null>;
72
100
  export declare const BoundActivateContext: import("react").Context<(() => void) | null>;