@kortix/ui 0.15.11 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/_vendor/kortix-shared.js +478 -179
  2. package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
  3. package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
  4. package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
  5. package/dist/access/access/copy-row.d.ts +7 -1
  6. package/dist/access/access/copy-row.js +2 -2
  7. package/dist/animated-copy-icon.js +2 -1
  8. package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
  9. package/dist/browser/sandbox-browser-chrome.js +1 -1
  10. package/dist/customize/agents/agent-cover-card.d.ts +1 -1
  11. package/dist/customize/agents/agent-cover-card.js +10 -2
  12. package/dist/customize/agents/agent-filter.js +3 -1
  13. package/dist/customize/agents/agent-overview.d.ts +10 -0
  14. package/dist/customize/agents/agent-overview.js +5 -4
  15. package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
  16. package/dist/customize/agents/agent-page-chrome.js +16 -13
  17. package/dist/customize/agents/agent-page.js +6 -28
  18. package/dist/customize/agents/agent-tabs.d.ts +1 -0
  19. package/dist/customize/agents/agent-tabs.js +1 -0
  20. package/dist/customize/agents/agents-page.js +3 -3
  21. package/dist/customize/agents/create-agent-modal.d.ts +9 -0
  22. package/dist/customize/agents/create-agent-modal.js +21 -3
  23. package/dist/customize/agents/use-default-agent.js +2 -2
  24. package/dist/customize/connectors/connector-identity.d.ts +11 -2
  25. package/dist/customize/connectors/connector-identity.js +16 -4
  26. package/dist/customize/connectors/connectors-page.js +10 -6
  27. package/dist/customize/connectors/detail/app-page.js +2 -2
  28. package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
  29. package/dist/customize/connectors/install/install-dialog.js +6 -1
  30. package/dist/customize/connectors/use-agent-access.d.ts +1 -0
  31. package/dist/customize/evals/eval-compare-view.d.ts +10 -0
  32. package/dist/customize/evals/eval-compare-view.js +68 -0
  33. package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
  34. package/dist/customize/evals/eval-dataset-view.js +81 -0
  35. package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
  36. package/dist/customize/evals/eval-datasets-page.js +91 -0
  37. package/dist/customize/evals/eval-job-view.d.ts +12 -0
  38. package/dist/customize/evals/eval-job-view.js +360 -0
  39. package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
  40. package/dist/customize/evals/eval-jobs-page.js +69 -0
  41. package/dist/customize/evals/eval-meta.d.ts +97 -0
  42. package/dist/customize/evals/eval-meta.js +228 -0
  43. package/dist/customize/evals/eval-task-view.d.ts +13 -0
  44. package/dist/customize/evals/eval-task-view.js +123 -0
  45. package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
  46. package/dist/customize/evals/eval-tasks-page.js +56 -0
  47. package/dist/customize/evals/eval-ui.d.ts +97 -0
  48. package/dist/customize/evals/eval-ui.js +153 -0
  49. package/dist/customize/evals/evals-page.d.ts +10 -0
  50. package/dist/customize/evals/evals-page.js +56 -0
  51. package/dist/customize/evals/run-eval-modal.d.ts +28 -0
  52. package/dist/customize/evals/run-eval-modal.js +167 -0
  53. package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
  54. package/dist/customize/project-settings/project-admin-sections.js +6 -1
  55. package/dist/customize/providers/provider-connect.d.ts +13 -0
  56. package/dist/customize/providers/provider-connect.js +29 -5
  57. package/dist/customize/providers/provider-sheet.js +5 -4
  58. package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
  59. package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
  60. package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
  61. package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
  62. package/dist/customize/sections/view/git-view.d.ts +19 -1
  63. package/dist/customize/sections/view/git-view.js +7 -3
  64. package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
  65. package/dist/customize/sections/view/manifest-issue-list.js +41 -0
  66. package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
  67. package/dist/customize/sections/view/manifest-issues-row.js +39 -0
  68. package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
  69. package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
  70. package/dist/customize/sections/view/secrets-view.d.ts +13 -0
  71. package/dist/customize/sections/view/secrets-view.js +10 -6
  72. package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
  73. package/dist/customize/sections/view/subscription-usage.js +4 -8
  74. package/dist/customize/settings/settings-tab-header.js +12 -3
  75. package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
  76. package/dist/customize/settings/tabs/experimental-tab.js +36 -11
  77. package/dist/customize/settings/tabs/general-tab.js +1 -1
  78. package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
  79. package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
  80. package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
  81. package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
  82. package/dist/customize/settings/tabs/workspace-keys.js +6 -3
  83. package/dist/customize/shared/capability-page-shell.js +9 -1
  84. package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
  85. package/dist/customize/shared/catalog/catalog-card.js +15 -5
  86. package/dist/customize/shared/customize-tab-bar.js +1 -1
  87. package/dist/customize/shared/new-entity-menu.d.ts +1 -1
  88. package/dist/customize/shared/new-entity-menu.js +38 -1
  89. package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
  90. package/dist/customize/triggers/runtime-triggers.js +21 -2
  91. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  92. package/dist/customize/triggers/schedule-view.js +2 -1
  93. package/dist/files/project/components/drive-explorer.js +33 -70
  94. package/dist/files/project/components/drive-grid-view.d.ts +2 -31
  95. package/dist/files/project/components/drive-grid-view.js +12 -22
  96. package/dist/files/project/components/drive-list-view.d.ts +3 -30
  97. package/dist/files/project/components/drive-list-view.js +8 -18
  98. package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
  99. package/dist/files/project/components/drive-selection-bar.js +13 -20
  100. package/dist/files/project/components/explorer-listing.d.ts +48 -0
  101. package/dist/files/project/components/explorer-listing.js +64 -0
  102. package/dist/files/project/components/file-explorer-page.js +7 -204
  103. package/dist/files/project/components/file-thumbnail.js +3 -1
  104. package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
  105. package/dist/files/project/components/manifest-issue-mark.js +26 -0
  106. package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
  107. package/dist/files/project/hooks/use-change-requests.js +17 -0
  108. package/dist/files/project/manifest-annotations.d.ts +16 -0
  109. package/dist/files/project/manifest-annotations.js +19 -0
  110. package/dist/files/project/store/version-store.d.ts +1 -1
  111. package/dist/files/project/upload-batch.d.ts +20 -0
  112. package/dist/files/project/upload-batch.js +20 -0
  113. package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
  114. package/dist/files/runtime/hooks/use-file-content.js +3 -2
  115. package/dist/files/runtime/hooks/use-file-list.js +1 -2
  116. package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
  117. package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
  118. package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
  119. package/dist/files/tree/components/file-tree-item.js +1 -4
  120. package/dist/files/viewer/file-annotations.d.ts +18 -0
  121. package/dist/files/viewer/file-annotations.js +21 -0
  122. package/dist/files/viewer/file-content-renderer.js +1 -1
  123. package/dist/files/viewer/file-viewer.js +2 -1
  124. package/dist/files/viewer/index.d.ts +1 -0
  125. package/dist/files/viewer/index.js +1 -0
  126. package/dist/files/viewer/use-file-content-state.js +8 -1
  127. package/dist/i18n/en.d.ts +495 -46
  128. package/dist/i18n/en.js +536 -87
  129. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
  130. package/dist/icons/caret-right-solid.d.ts +11 -0
  131. package/dist/icons/caret-right-solid.js +15 -0
  132. package/dist/internal/auth/auth-art.d.ts +12 -0
  133. package/dist/internal/auth/auth-art.js +118 -0
  134. package/dist/internal/auth/auth-card-shell.d.ts +14 -10
  135. package/dist/internal/auth/auth-card-shell.js +20 -31
  136. package/dist/internal/auth/auth-consent.d.ts +3 -1
  137. package/dist/internal/auth/auth-consent.js +2 -2
  138. package/dist/internal/auth/auth-primitives.d.ts +26 -1
  139. package/dist/internal/auth/auth-primitives.js +37 -8
  140. package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
  141. package/dist/internal/connector-logo/connector-logo.js +11 -2
  142. package/dist/internal/files/file-read-retry.d.ts +18 -2
  143. package/dist/internal/files/file-read-retry.js +42 -4
  144. package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
  145. package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
  146. package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
  147. package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
  148. package/dist/internal/hooks/use-reduced-motion.js +12 -0
  149. package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
  150. package/dist/internal/hooks/use-save-shortcut.js +28 -0
  151. package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
  152. package/dist/internal/layout/connect-mcp-modal.js +9 -4
  153. package/dist/internal/layout/panel-chrome.d.ts +28 -0
  154. package/dist/internal/layout/panel-chrome.js +27 -0
  155. package/dist/internal/layout/project-page-header.js +5 -1
  156. package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
  157. package/dist/internal/lib/manifest-health.d.ts +25 -1
  158. package/dist/internal/lib/manifest-health.js +56 -0
  159. package/dist/internal/lib/project-preamble.js +1 -1
  160. package/dist/internal/lib/web-notifications.d.ts +1 -1
  161. package/dist/internal/lib/web-notifications.js +3 -0
  162. package/dist/internal/notifications/notification-inbox.js +2 -1
  163. package/dist/internal/notifications/notification-rows.d.ts +1 -1
  164. package/dist/internal/notifications/notification-rows.js +15 -1
  165. package/dist/internal/selection/selection-bar.d.ts +2 -8
  166. package/dist/internal/selection/selection-bar.js +15 -38
  167. package/dist/internal/stores/active-space-store.d.ts +1 -1
  168. package/dist/internal/stores/browser-recents-store.d.ts +1 -1
  169. package/dist/internal/stores/current-account-store.d.ts +1 -1
  170. package/dist/internal/stores/first-chat-store.d.ts +1 -1
  171. package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
  172. package/dist/internal/stores/session-browser-store.d.ts +1 -1
  173. package/dist/internal/stores/session-expanded-store.d.ts +1 -1
  174. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  175. package/dist/internal/stores/session-history-view-store.d.ts +1 -1
  176. package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
  177. package/dist/internal/stores/sound-store.d.ts +1 -1
  178. package/dist/internal/stores/tab-store.d.ts +1 -1
  179. package/dist/internal/stores/user-preferences-store.d.ts +9 -1
  180. package/dist/internal/stores/user-preferences-store.js +2 -0
  181. package/dist/internal/stores/web-notification-store.d.ts +1 -1
  182. package/dist/lib/base-ui-compat.js +28 -1
  183. package/dist/lib/dotmatrix-hooks.d.ts +1 -0
  184. package/dist/lib/dotmatrix-hooks.js +3 -13
  185. package/dist/lib/reduced-motion.d.ts +10 -0
  186. package/dist/lib/reduced-motion.js +104 -0
  187. package/dist/lib/routes.d.ts +9 -0
  188. package/dist/lib/routes.js +7 -4
  189. package/dist/markdown/artifact-link.d.ts +11 -0
  190. package/dist/markdown/artifact-link.js +62 -0
  191. package/dist/markdown/code/index.d.ts +1 -1
  192. package/dist/markdown/code/index.js +1 -1
  193. package/dist/markdown/code/inline-code.d.ts +1 -1
  194. package/dist/markdown/code/inline-code.js +1 -1
  195. package/dist/markdown/genui/components/map-canvas.js +2 -1
  196. package/dist/markdown/index.d.ts +3 -1
  197. package/dist/markdown/index.js +2 -1
  198. package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
  199. package/dist/markdown/inline-code-text.d.ts +34 -0
  200. package/dist/markdown/inline-code-text.js +68 -0
  201. package/dist/markdown/setup-links/approval-decision.js +3 -3
  202. package/dist/markdown/soft-breaks.d.ts +21 -0
  203. package/dist/markdown/soft-breaks.js +33 -0
  204. package/dist/markdown/unified-markdown.d.ts +9 -1
  205. package/dist/markdown/unified-markdown.js +31 -9
  206. package/dist/primitives/action-bar.d.ts +50 -0
  207. package/dist/primitives/action-bar.js +87 -0
  208. package/dist/primitives/calendar.js +4 -2
  209. package/dist/primitives/inline-meta.js +2 -2
  210. package/dist/primitives/kortix-loader.js +2 -1
  211. package/dist/primitives/modal.d.ts +1 -1
  212. package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
  213. package/dist/primitives/paper-wallpaper-shaders.js +6 -0
  214. package/dist/primitives/resizable.d.ts +1 -1
  215. package/dist/primitives/resize-seam.d.ts +3 -2
  216. package/dist/primitives/resize-seam.js +4 -3
  217. package/dist/primitives/settings-section-header.d.ts +30 -1
  218. package/dist/primitives/settings-section-header.js +37 -0
  219. package/dist/primitives/sliding-tab-indicator.js +2 -1
  220. package/dist/primitives/switch.js +15 -8
  221. package/dist/primitives/text-shimmer.js +6 -0
  222. package/dist/primitives/toast-clearance.d.ts +52 -0
  223. package/dist/primitives/toast-clearance.js +116 -0
  224. package/dist/primitives/toast.d.ts +3 -1
  225. package/dist/primitives/toast.js +2 -0
  226. package/dist/primitives/typed-title.js +1 -1
  227. package/dist/primitives/wallpaper-shaders.js +1 -1
  228. package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
  229. package/dist/session/actions/project-session-list-helpers.js +18 -0
  230. package/dist/session/agents/agent-model.d.ts +1 -0
  231. package/dist/session/agents/agent-model.js +2 -1
  232. package/dist/session/agents/agent-strip.js +10 -4
  233. package/dist/session/agents/workflow-run-controls.d.ts +27 -4
  234. package/dist/session/agents/workflow-run-controls.js +63 -10
  235. package/dist/session/composer/ComposerCard.js +3 -0
  236. package/dist/session/composer/agent-selector.js +6 -4
  237. package/dist/session/composer/animated-placeholder.js +2 -1
  238. package/dist/session/composer/attachment-tile.d.ts +2 -2
  239. package/dist/session/composer/attachment-tile.js +25 -3
  240. package/dist/session/composer/composer-agent-access.d.ts +10 -1
  241. package/dist/session/composer/composer-agent-access.js +18 -4
  242. package/dist/session/composer/composer-chat-input.js +7 -2
  243. package/dist/session/composer/composer.d.ts +2 -2
  244. package/dist/session/composer/composer.js +7 -6
  245. package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
  246. package/dist/session/composer/hooks/use-file-search.js +71 -7
  247. package/dist/session/composer/menus/menu-items.js +6 -2
  248. package/dist/session/composer/menus/menu-shell.d.ts +3 -1
  249. package/dist/session/composer/menus/menu-shell.js +2 -2
  250. package/dist/session/composer/menus/slash-menu.d.ts +7 -0
  251. package/dist/session/composer/menus/slash-menu.js +48 -1
  252. package/dist/session/composer/use-instant-session-send.js +7 -1
  253. package/dist/session/header/session-reminders-indicator.js +3 -2
  254. package/dist/session/header/session-site-header.js +24 -6
  255. package/dist/session/media/sandbox-url-detector.js +1 -1
  256. package/dist/session/models/model-connection-gate.js +2 -1
  257. package/dist/session/models/model-selector.js +1 -1
  258. package/dist/session/models/subscription-switcher.d.ts +7 -0
  259. package/dist/session/models/subscription-switcher.js +52 -10
  260. package/dist/session/models/subscription-windows.d.ts +2 -0
  261. package/dist/session/models/subscription-windows.js +2 -0
  262. package/dist/session/outcomes/session-outcomes-provider.js +14 -7
  263. package/dist/session/panel/action-panel.js +8 -19
  264. package/dist/session/panel/easy/app-preview.d.ts +4 -1
  265. package/dist/session/panel/easy/app-preview.js +95 -33
  266. package/dist/session/panel/easy/apps-card.js +6 -11
  267. package/dist/session/panel/easy/change-requests-card.js +1 -1
  268. package/dist/session/panel/easy/changes-card.d.ts +14 -0
  269. package/dist/session/panel/easy/changes-card.js +60 -0
  270. package/dist/session/panel/easy/context-card.d.ts +5 -1
  271. package/dist/session/panel/easy/context-card.js +13 -28
  272. package/dist/session/panel/easy/context-meter.d.ts +18 -0
  273. package/dist/session/panel/easy/context-meter.js +73 -0
  274. package/dist/session/panel/easy/detail-view.d.ts +1 -1
  275. package/dist/session/panel/easy/detail-view.js +24 -21
  276. package/dist/session/panel/easy/easy-panel.js +7 -5
  277. package/dist/session/panel/easy/file-preview.js +3 -1
  278. package/dist/session/panel/easy/frame-history.d.ts +91 -0
  279. package/dist/session/panel/easy/frame-history.js +198 -0
  280. package/dist/session/panel/easy/outputs-card.d.ts +10 -0
  281. package/dist/session/panel/easy/outputs-card.js +28 -31
  282. package/dist/session/panel/easy/panel-card.d.ts +1 -3
  283. package/dist/session/panel/easy/panel-card.js +24 -8
  284. package/dist/session/panel/easy/plan-card.js +2 -2
  285. package/dist/session/panel/easy/step-icon.d.ts +4 -1
  286. package/dist/session/panel/easy/step-icon.js +2 -2
  287. package/dist/session/panel/session-action-panel-column.d.ts +5 -0
  288. package/dist/session/panel/session-action-panel-column.js +198 -101
  289. package/dist/session/panel/session-desktop.js +5 -1
  290. package/dist/session/panel/session-diff-viewer.d.ts +3 -1
  291. package/dist/session/panel/session-diff-viewer.js +7 -4
  292. package/dist/session/panel/session-panel-provider.js +29 -5
  293. package/dist/session/panel/shared/derive-panels.js +64 -4
  294. package/dist/session/status/session-busy-indicator.js +2 -1
  295. package/dist/session/status/session-error-banner.js +1 -1
  296. package/dist/session/thread/chat-minimap.js +2 -1
  297. package/dist/session/thread/session-body.js +4 -1
  298. package/dist/session/thread/session-chat.js +18 -3
  299. package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
  300. package/dist/session/thread/session-turn-meta-rows.js +33 -5
  301. package/dist/session/thread/transcript.d.ts +1 -2
  302. package/dist/session/thread/transcript.js +26 -24
  303. package/dist/session/thread/typing-indicator.d.ts +2 -2
  304. package/dist/session/thread/typing-indicator.js +10 -3
  305. package/dist/session/tool/tools/session-spawn-tool.js +3 -3
  306. package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
  307. package/dist/session/tool/tools/workflow-run-card.js +31 -7
  308. package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
  309. package/dist/session/tool/tools/workflow-run-cost.js +75 -0
  310. package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
  311. package/dist/session/tool/tools/workflow-tool.js +40 -15
  312. package/dist/session/turn/peer-message-row.js +1 -1
  313. package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
  314. package/dist/session/turn/queued-prompt-bubbles.js +1 -1
  315. package/dist/session/turn/throttled-markdown.js +1 -1
  316. package/dist/styles/theme.css +68 -0
  317. package/dist/styles.css +1 -1
  318. package/dist/terminal/pty-terminal.js +1 -1
  319. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  320. package/dist/test-utils/intl.d.ts +495 -46
  321. package/dist/workspace/admin/project-admin-dashboard.js +21 -7
  322. package/dist/workspace/admin/settings-search-landing.js +2 -1
  323. package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
  324. package/dist/workspace/calendar/calendar-dates.js +64 -0
  325. package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
  326. package/dist/workspace/calendar/calendar-new-item.js +47 -0
  327. package/dist/workspace/calendar/calendar-page.d.ts +3 -0
  328. package/dist/workspace/calendar/calendar-page.js +177 -0
  329. package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
  330. package/dist/workspace/calendar/calendar-panel.js +103 -0
  331. package/dist/workspace/calendar/calendar-people.d.ts +52 -0
  332. package/dist/workspace/calendar/calendar-people.js +117 -0
  333. package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
  334. package/dist/workspace/calendar/calendar-scheduled.js +118 -0
  335. package/dist/workspace/calendar/calendar-views.d.ts +32 -0
  336. package/dist/workspace/calendar/calendar-views.js +124 -0
  337. package/dist/workspace/calendar/calendar-when.d.ts +14 -0
  338. package/dist/workspace/calendar/calendar-when.js +81 -0
  339. package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
  340. package/dist/workspace/calendar/mention-textarea.js +84 -0
  341. package/dist/workspace/home/access-requests-bell.js +2 -1
  342. package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
  343. package/dist/workspace/inbox/workspace-inbox.js +1 -1
  344. package/dist/workspace/layout/project-files-view.js +2 -1
  345. package/dist/workspace/memory/memory-page-list.js +1 -1
  346. package/dist/workspace/new/workspace-handoff.js +2 -1
  347. package/dist/workspace/projects/modal/project-icon-field.js +2 -1
  348. package/dist/workspace/session-workspace.js +13 -12
  349. package/dist/workspace/setup/setup-steps.d.ts +43 -0
  350. package/dist/workspace/setup/setup-steps.js +38 -0
  351. package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
  352. package/dist/workspace/setup/workspace-setup-page.js +124 -0
  353. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
  354. package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
  355. package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
  356. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
  357. package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
  358. package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
  359. package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
  360. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
  361. package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
  362. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
  363. package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
  364. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
  365. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
  366. package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
  367. package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
  368. package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
  369. package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
  370. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
  371. package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
  372. package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
  373. package/dist/workspace/sidebar/footer/promo-card.js +47 -0
  374. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  375. package/dist/workspace/sidebar/project-nav-items.js +12 -4
  376. package/dist/workspace/sidebar/project-session-list.js +58 -26
  377. package/dist/workspace/sidebar/project-sidebar.js +2 -5
  378. package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
  379. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
  380. package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
  381. package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
  382. package/dist/workspace/sidebar/session-group-sections.js +121 -41
  383. package/dist/workspace/sidebar/sidebar-drill.js +6 -0
  384. package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
  385. package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
  386. package/dist/workspace/sidebar/use-workspace-list.js +11 -1
  387. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
  388. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
  389. package/dist/workspace/space/space-tab-panels.js +1 -1
  390. package/dist/workspace/spaces/space-timeline.js +2 -2
  391. package/package.json +67 -10
  392. package/skills/kortix-ui/SKILL.md +2 -2
  393. package/skills/kortix-ui/references/modules.md +5 -3
  394. package/dist/session/thread/turn-share.d.ts +0 -16
  395. package/dist/session/thread/turn-share.js +0 -161
  396. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
  397. package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
  398. /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { parseNoticeBatch } from '@kortix/sdk';
2
- import { capitalizeWords, isMyKortixAgentName, MY_KORTIX_DISPLAY_NAME } from '../../_vendor/kortix-shared.js';
2
+ import { agentDisplayName } from '../../_vendor/kortix-shared.js';
3
3
  import { relativeTime } from '../../internal/lib/relative-time.js';
4
4
  import { sessionDisplayLabel, sessionDisplayStatus } from '../../session/actions/session-label.js';
5
5
  import { parseAgentMentionReferences, parseFileMentionReferences, parseFileReferences, parseSessionReferences, stripReplyContexts, } from '../../session/thread/message-parsing.js';
@@ -224,7 +224,7 @@ export function firstPromptTruncated(session) {
224
224
  export const DEFAULT_AGENT_SLUG = 'kortix';
225
225
  /** An agent's display name: the sidebar's DM row and the space view say it the same way. */
226
226
  export function agentLabel(name) {
227
- return isMyKortixAgentName(name) ? MY_KORTIX_DISPLAY_NAME : capitalizeWords(name);
227
+ return agentDisplayName(name);
228
228
  }
229
229
  /**
230
230
  * Who is in a space, as far as its loaded threads tell: the people who
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/ui",
3
- "version": "0.15.11",
3
+ "version": "0.16.0",
4
4
  "description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",
@@ -76,6 +76,10 @@
76
76
  "types": "./dist/primitives/accordion.d.ts",
77
77
  "import": "./dist/primitives/accordion.js"
78
78
  },
79
+ "./action-bar": {
80
+ "types": "./dist/primitives/action-bar.d.ts",
81
+ "import": "./dist/primitives/action-bar.js"
82
+ },
79
83
  "./alert": {
80
84
  "types": "./dist/primitives/alert.d.ts",
81
85
  "import": "./dist/primitives/alert.js"
@@ -205,6 +209,26 @@
205
209
  "types": "./dist/customize/connectors/detail/connector-page.d.ts",
206
210
  "import": "./dist/customize/connectors/detail/connector-page.js"
207
211
  },
212
+ "./customize/evals/eval-compare-view": {
213
+ "types": "./dist/customize/evals/eval-compare-view.d.ts",
214
+ "import": "./dist/customize/evals/eval-compare-view.js"
215
+ },
216
+ "./customize/evals/eval-dataset-view": {
217
+ "types": "./dist/customize/evals/eval-dataset-view.d.ts",
218
+ "import": "./dist/customize/evals/eval-dataset-view.js"
219
+ },
220
+ "./customize/evals/eval-job-view": {
221
+ "types": "./dist/customize/evals/eval-job-view.d.ts",
222
+ "import": "./dist/customize/evals/eval-job-view.js"
223
+ },
224
+ "./customize/evals/eval-meta": {
225
+ "types": "./dist/customize/evals/eval-meta.d.ts",
226
+ "import": "./dist/customize/evals/eval-meta.js"
227
+ },
228
+ "./customize/evals/eval-task-view": {
229
+ "types": "./dist/customize/evals/eval-task-view.d.ts",
230
+ "import": "./dist/customize/evals/eval-task-view.js"
231
+ },
208
232
  "./customize/sections/add-account-fields": {
209
233
  "types": "./dist/customize/sections/add-account-fields.d.ts",
210
234
  "import": "./dist/customize/sections/add-account-fields.js"
@@ -995,6 +1019,14 @@
995
1019
  "types": "./dist/internal/hooks/use-debounced-value.d.ts",
996
1020
  "import": "./dist/internal/hooks/use-debounced-value.js"
997
1021
  },
1022
+ "./internal/hooks/use-reduced-motion": {
1023
+ "types": "./dist/internal/hooks/use-reduced-motion.d.ts",
1024
+ "import": "./dist/internal/hooks/use-reduced-motion.js"
1025
+ },
1026
+ "./internal/hooks/use-review-session-summary": {
1027
+ "types": "./dist/internal/hooks/use-review-session-summary.d.ts",
1028
+ "import": "./dist/internal/hooks/use-review-session-summary.js"
1029
+ },
998
1030
  "./internal/hooks/use-slash-focus": {
999
1031
  "types": "./dist/internal/hooks/use-slash-focus.d.ts",
1000
1032
  "import": "./dist/internal/hooks/use-slash-focus.js"
@@ -1007,6 +1039,10 @@
1007
1039
  "types": "./dist/internal/icons/codex.d.ts",
1008
1040
  "import": "./dist/internal/icons/codex.js"
1009
1041
  },
1042
+ "./internal/icons/cursor": {
1043
+ "types": "./dist/internal/icons/cursor.d.ts",
1044
+ "import": "./dist/internal/icons/cursor.js"
1045
+ },
1010
1046
  "./internal/icons/discord": {
1011
1047
  "types": "./dist/internal/icons/discord.d.ts",
1012
1048
  "import": "./dist/internal/icons/discord.js"
@@ -1625,6 +1661,10 @@
1625
1661
  "types": "./dist/session/panel/index.d.ts",
1626
1662
  "import": "./dist/session/panel/index.js"
1627
1663
  },
1664
+ "./session/actions/project-session-list-helpers": {
1665
+ "types": "./dist/session/actions/project-session-list-helpers.d.ts",
1666
+ "import": "./dist/session/actions/project-session-list-helpers.js"
1667
+ },
1628
1668
  "./session/actions/session-label": {
1629
1669
  "types": "./dist/session/actions/session-label.d.ts",
1630
1670
  "import": "./dist/session/actions/session-label.js"
@@ -1657,6 +1697,10 @@
1657
1697
  "types": "./dist/session/composer/session-chat-input.d.ts",
1658
1698
  "import": "./dist/session/composer/session-chat-input.js"
1659
1699
  },
1700
+ "./session/list/session-status-mark": {
1701
+ "types": "./dist/session/list/session-status-mark.d.ts",
1702
+ "import": "./dist/session/list/session-status-mark.js"
1703
+ },
1660
1704
  "./session/models/ask-owner-for-credits-button": {
1661
1705
  "types": "./dist/session/models/ask-owner-for-credits-button.d.ts",
1662
1706
  "import": "./dist/session/models/ask-owner-for-credits-button.js"
@@ -1936,6 +1980,10 @@
1936
1980
  "types": "./dist/primitives/toast.d.ts",
1937
1981
  "import": "./dist/primitives/toast.js"
1938
1982
  },
1983
+ "./toast-clearance": {
1984
+ "types": "./dist/primitives/toast-clearance.d.ts",
1985
+ "import": "./dist/primitives/toast-clearance.js"
1986
+ },
1939
1987
  "./toggle": {
1940
1988
  "types": "./dist/primitives/toggle.d.ts",
1941
1989
  "import": "./dist/primitives/toggle.js"
@@ -1977,6 +2025,10 @@
1977
2025
  "types": "./dist/workspace/admin/project-admin-dashboard.d.ts",
1978
2026
  "import": "./dist/workspace/admin/project-admin-dashboard.js"
1979
2027
  },
2028
+ "./workspace/calendar/calendar-page": {
2029
+ "types": "./dist/workspace/calendar/calendar-page.d.ts",
2030
+ "import": "./dist/workspace/calendar/calendar-page.js"
2031
+ },
1980
2032
  "./workspace/home/access-requests-bell": {
1981
2033
  "types": "./dist/workspace/home/access-requests-bell.d.ts",
1982
2034
  "import": "./dist/workspace/home/access-requests-bell.js"
@@ -2093,6 +2145,10 @@
2093
2145
  "types": "./dist/workspace/settings/use-leave-workspace.d.ts",
2094
2146
  "import": "./dist/workspace/settings/use-leave-workspace.js"
2095
2147
  },
2148
+ "./workspace/setup/workspace-setup-page": {
2149
+ "types": "./dist/workspace/setup/workspace-setup-page.d.ts",
2150
+ "import": "./dist/workspace/setup/workspace-setup-page.js"
2151
+ },
2096
2152
  "./workspace/sidebar/footer/project-apps-nav": {
2097
2153
  "types": "./dist/workspace/sidebar/footer/project-apps-nav.d.ts",
2098
2154
  "import": "./dist/workspace/sidebar/footer/project-apps-nav.js"
@@ -2101,17 +2157,13 @@
2101
2157
  "types": "./dist/workspace/sidebar/footer/project-balance-warning.d.ts",
2102
2158
  "import": "./dist/workspace/sidebar/footer/project-balance-warning.js"
2103
2159
  },
2104
- "./workspace/sidebar/footer/project-computer-nav": {
2105
- "types": "./dist/workspace/sidebar/footer/project-computer-nav.d.ts",
2106
- "import": "./dist/workspace/sidebar/footer/project-computer-nav.js"
2107
- },
2108
2160
  "./workspace/sidebar/footer/project-manifest-issues-alert": {
2109
2161
  "types": "./dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts",
2110
2162
  "import": "./dist/workspace/sidebar/footer/project-manifest-issues-alert.js"
2111
2163
  },
2112
- "./workspace/sidebar/footer/project-mcp-nav": {
2113
- "types": "./dist/workspace/sidebar/footer/project-mcp-nav.d.ts",
2114
- "import": "./dist/workspace/sidebar/footer/project-mcp-nav.js"
2164
+ "./workspace/sidebar/footer/project-promo-cards": {
2165
+ "types": "./dist/workspace/sidebar/footer/project-promo-cards.d.ts",
2166
+ "import": "./dist/workspace/sidebar/footer/project-promo-cards.js"
2115
2167
  },
2116
2168
  "./workspace/sidebar/footer/project-sandbox-alert": {
2117
2169
  "types": "./dist/workspace/sidebar/footer/project-sandbox-alert.d.ts",
@@ -2141,6 +2193,10 @@
2141
2193
  "types": "./dist/workspace/sidebar/project-sidebar.d.ts",
2142
2194
  "import": "./dist/workspace/sidebar/project-sidebar.js"
2143
2195
  },
2196
+ "./workspace/sidebar/session-brief-hover-card": {
2197
+ "types": "./dist/workspace/sidebar/session-brief-hover-card.d.ts",
2198
+ "import": "./dist/workspace/sidebar/session-brief-hover-card.js"
2199
+ },
2144
2200
  "./workspace/sidebar/session-section-labels": {
2145
2201
  "types": "./dist/workspace/sidebar/session-section-labels.d.ts",
2146
2202
  "import": "./dist/workspace/sidebar/session-section-labels.js"
@@ -2210,7 +2266,7 @@
2210
2266
  "@extend-ai/react-docx": "^0.7.5",
2211
2267
  "@extend-ai/react-xlsx": "0.13.4",
2212
2268
  "@glideapps/glide-data-grid": "6.0.4-alpha24",
2213
- "@kortix/llm-catalog": "0.15.11",
2269
+ "@kortix/llm-catalog": "0.16.0",
2214
2270
  "@lezer/highlight": "1.2.3",
2215
2271
  "@paper-design/shaders-react": "^0.0.76",
2216
2272
  "@phosphor-icons/react": "2.1.10",
@@ -2245,6 +2301,7 @@
2245
2301
  "class-variance-authority": "^0.7.1",
2246
2302
  "clsx": "^2.1.1",
2247
2303
  "color-bits": "^1.1.0",
2304
+ "croner": "^9.1.0",
2248
2305
  "date-fns": "^3.6.0",
2249
2306
  "diff": "^8.0.3",
2250
2307
  "frimousse": "^0.3.0",
@@ -2285,7 +2342,7 @@
2285
2342
  "zustand": "^5.0.3"
2286
2343
  },
2287
2344
  "peerDependencies": {
2288
- "@kortix/sdk": "^0.15.11",
2345
+ "@kortix/sdk": "^0.16.0",
2289
2346
  "@tanstack/react-query": "^5.75.2",
2290
2347
  "@types/react": ">=18",
2291
2348
  "react": ">=19",
@@ -34,6 +34,7 @@ Module entries and `@kortix/ui/theme` need 0.14.4+. Inside `kortix-ai/CompanyOS`
34
34
  | Expand and collapse | `Disclosure`, `DisclosureTrigger`, `DisclosureContent` | `disclosure` |
35
35
  | Form field; search field | `Field`, `FieldLabel`, `FieldGroup`, `FieldDescription` with `Input`, `Textarea`, `Select`; `InputGroupSearch` | `field`, `input-group` |
36
36
  | Panel; buttons side by side | `Card` and its slots, or `bg-popover rounded-md border px-4 py-5`; `ButtonGroup` | `card`, `button-group` |
37
+ | A selection, unsaved edits or a pending paste needs actions | `ActionBar` in an `ActionBarDock` at the bottom of the column; actions take `kbd`, `tone`, `emphasis` | `action-bar` |
37
38
  | Tabs and filters | `Tabs`, `TabsList size="xs"`, `TabsTrigger` | `tabs` |
38
39
  | Menu, picker, palette | `DropdownMenu`, `Popover`, `Command` | `dropdown-menu`, `popover`, `command` |
39
40
  | Table and empty list | `Table`; `Empty` with one muted line | `table`, `empty` |
@@ -93,8 +94,7 @@ Theme with `@kortix/ui/theme`, never by forking a component: `themeToCss(theme)`
93
94
  | `@kortix/ui/session` (blocks) | `UserMessage`, `ThrottledMarkdown`, `UnifiedMarkdown`, `UnifiedMarkdownProps`, `ToolPartRenderer`, `SessionChatInput`, `SessionChatInputProps`, `AgentSelector`, `ModelSelector`, `ModelSelectorProps`, `SessionPermissionPrompt`, `QuestionPrompt`, `QuestionPromptHandle`, `TurnErrorDisplay`, `SessionBusyIndicator`, `SessionStartingLoader` |
94
95
  | `@kortix/ui/session` (tool rows, pickers) | `ToolRegistry`, `ToolProps`, `ToolComponent`, `BasicTool`, `BasicToolProps`, `GenericTool`; for a form outside a session: `ModelSelector`, `AgentSelector` |
95
96
 
96
- Every other primitive is one subpath per file: `@kortix/ui/<file name>` (`@kortix/ui/dot-matrix/<name>` for the dot matrices).
97
- Also: `lib/telemetry` (`UiTelemetryRegister`: declaration-merge `event`), `error-boundary` (`ErrorBoundary`, `ErrorBoundaryFallback`).
97
+ Every other primitive is one subpath per file: `@kortix/ui/<file name>` (`@kortix/ui/dot-matrix/<name>` for the dot matrices). Also: `lib/telemetry` (`UiTelemetryRegister`: declaration-merge `event`), `error-boundary` (`ErrorBoundary`, `ErrorBoundaryFallback`).
98
98
 
99
99
  ## 8. Modules
100
100
 
@@ -89,7 +89,9 @@ export function Answer({ text }: { text: string }) {
89
89
 
90
90
  Code outside markdown: `CodeHighlight` (`code`, `language`) draws one highlighted block without the markdown parser; `INLINE_CODE` is the class string of an inline code chip.
91
91
 
92
- Names: `markdownPolicy`, `MarkdownPolicy`, `MarkdownTrust`, `MarkdownVariant`, `UnifiedMarkdown`, `UnifiedMarkdownProps`, `CopyOverlay`, `CodeHighlight`, `HighlightedCode`, `INLINE_CODE`, `CopyButton`, `MarkdownWithFrontmatter`, `languageLabel`, `normalizeLanguage`
92
+ Short agent-written strings: `InlineCodeText` (`text`) draws `code spans` as inline chips with no block elements, safe in a menu row. `splitInlineCode` splits a line into `InlineCodeSegment`s, `plainTextFromMarkdown` returns the plain words, `shortSummary` (`input`, `max` = 160) the first sentence for an `aria-describedby`.
93
+
94
+ Names: `markdownPolicy`, `MarkdownPolicy`, `MarkdownTrust`, `MarkdownVariant`, `UnifiedMarkdown`, `UnifiedMarkdownProps`, `CopyOverlay`, `CodeHighlight`, `HighlightedCode`, `INLINE_CODE`, `CopyButton`, `MarkdownWithFrontmatter`, `languageLabel`, `normalizeLanguage`, `InlineCodeText`, `InlineCodeSegment`, `plainTextFromMarkdown`, `shortSummary`, `splitInlineCode`
93
95
 
94
96
  ## `@kortix/ui/genui`
95
97
 
@@ -187,7 +189,7 @@ Source: `src/files/viewer/index.ts`. Render any file kind (pdf, docx, xlsx, csv,
187
189
 
188
190
  Mount: `FileViewer` with `content` needs no provider, no SDK client and no `QueryClientProvider`; with a `shareContext` it needs both (its Copy link reads the session). `FileContentRenderer`: inside `FileSourceProvider` (where the bytes come from).
189
191
 
190
- Props: `FileViewer`: `content`, `fileName`, optional `path`, `onClose`, `refresh`, `className`. `HTML_PREVIEW_IFRAME_CLASS` is the class list of the HTML preview's iframe, for a host that draws its own. `FileContentRenderer`: `filePath`, `showHeader`, `readOnly`, `targetLine`, `onSaved`. `FileSource`: `id`, `useFileContent`, `useBinaryBlob`, `download`, `upload`, optional `save`, `bytesOnly`.
192
+ Props: `FileViewer`: `content`, `fileName`, optional `path`, `onClose`, `refresh`, `className`. `HTML_PREVIEW_IFRAME_CLASS` is the class list of the HTML preview's iframe, for a host that draws its own. `FileContentRenderer`: `filePath`, `showHeader`, `readOnly`, `targetLine`, `onSaved`. `FileSource`: `id`, `useFileContent`, `useBinaryBlob`, `download`, `upload`, optional `save`, `bytesOnly`. `FileAnnotationsProvider` (`diagnosticsFor(filePath)`) adds diagnostics the LSP store does not hold, such as `kortix.yaml` issues; `useFileAnnotations(filePath)` reads them, none outside a provider.
191
193
 
192
194
  ```tsx
193
195
  import { FileViewer } from '@kortix/ui/file-viewer';
@@ -198,7 +200,7 @@ export function Note({ text }: { text: string }) {
198
200
  }
199
201
  ```
200
202
 
201
- Names: `FileContentRenderer`, `FileContentRendererProps`, `FilePreviewModal`, `FilePreviewModalProps`, `FilePreviewState`, `FileSourceProvider`, `useFileSource`, `BinaryBlobResult`, `FileContent`, `FileContentResult`, `FilePatch`, `FilePatchHunk`, `FileSource`, `HtmlPreview`, `PreviewFitProvider`, `isUsableIntrinsicSize`, `SaveAsPdfButton`, `framePolicy`, `getFileCategory`, `getLanguageFromExt`, `FileCategory`, `FrameContent`, `FramePolicy`, `FileViewer`, `ShowCarouselItem`
203
+ Names: `FileContentRenderer`, `FileContentRendererProps`, `FilePreviewModal`, `FilePreviewModalProps`, `FilePreviewState`, `FileSourceProvider`, `useFileSource`, `BinaryBlobResult`, `FileContent`, `FileContentResult`, `FilePatch`, `FilePatchHunk`, `FileSource`, `HtmlPreview`, `PreviewFitProvider`, `isUsableIntrinsicSize`, `SaveAsPdfButton`, `framePolicy`, `getFileCategory`, `getLanguageFromExt`, `FileCategory`, `FrameContent`, `FramePolicy`, `FileViewer`, `ShowCarouselItem`, `FileAnnotationsProvider`, `useFileAnnotations`
202
204
 
203
205
  ## `@kortix/ui/terminal`
204
206
 
@@ -1,16 +0,0 @@
1
- export interface TurnShareTarget {
2
- projectId: string;
3
- /** The Kortix project session id (`projectSessionId`), not the runtime id. */
4
- sessionId: string;
5
- /** The user message id that opens the turn (`SessionLogTurn.id`). */
6
- turnId: string;
7
- }
8
- export declare function turnShareQueryKey({ projectId, sessionId, turnId }: TurnShareTarget): readonly ["turn-share", string, string, string];
9
- /**
10
- * The Share icon button of a settled turn's action bar, and the dialog it
11
- * opens. Renders only where the API would accept the share: a host with public
12
- * share pages, a turn inside a Kortix session, and a viewer the server says may
13
- * publish (`can_publish_response === true`, the API's `mayPublishTurn`).
14
- * Hidden while the session row loads: an unknown answer is not a yes.
15
- */
16
- export declare function TurnShareButton({ projectId, sessionId, turnId }: Partial<TurnShareTarget>): import("react").JSX.Element | null;
@@ -1,161 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * Share ONE assistant response through a public, read-only link.
5
- *
6
- * Private by default: the dialog reads the turn's live share
7
- * (`getTurnShare`) and the "Public link" switch stays off until one exists.
8
- * The server snapshots the text when it shares (`shareTurn`), with the prompt
9
- * only when the person picks "Prompt and response". A re-share keeps the token
10
- * and URL, so changing the scope or "Update link" (after `share.stale`) never
11
- * breaks a link someone already holds. Turning the link off is destructive and
12
- * takes a second, explicit click.
13
- */
14
- import { getTurnShare, shareTurn, unshareTurn } from '@kortix/sdk';
15
- import { useProjectSession } from '@kortix/sdk/react';
16
- import { CheckIcon, ShareNetworkIcon, WarningCircleIcon } from '@phosphor-icons/react';
17
- import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
18
- import { useEffect, useRef, useState } from 'react';
19
- import { useTranslations } from '../../i18n/index.js';
20
- import { Copy } from '../../icons/copy.js';
21
- import { cn } from '../../lib/utils.js';
22
- import { Button } from '../../primitives/button.js';
23
- import Hint from '../../primitives/hint.js';
24
- import { Input } from '../../primitives/input.js';
25
- import { Label } from '../../primitives/label.js';
26
- import { Modal, ModalContent, ModalTitle } from '../../primitives/modal.js';
27
- import { RadioGroup, RadioGroupItemBase } from '../../primitives/radio-group.js';
28
- import { Separator } from '../../primitives/separator.js';
29
- import { Switch } from '../../primitives/switch.js';
30
- import { successToast } from '../../primitives/toast.js';
31
- import { useUiHostConfig } from '../../providers/ui-provider.js';
32
- export function turnShareQueryKey({ projectId, sessionId, turnId }) {
33
- return ['turn-share', projectId, sessionId, turnId];
34
- }
35
- /**
36
- * The server's own message for a failed call, or null. Only an error that
37
- * carries an HTTP status (`ApiError.status`) came from the server; a network
38
- * failure's message ("Failed to fetch") is not worth showing.
39
- */
40
- function serverMessage(error) {
41
- const { status, message } = (error ?? {});
42
- return typeof status === 'number' && typeof message === 'string' && message.trim()
43
- ? message.trim()
44
- : null;
45
- }
46
- /**
47
- * The Share icon button of a settled turn's action bar, and the dialog it
48
- * opens. Renders only where the API would accept the share: a host with public
49
- * share pages, a turn inside a Kortix session, and a viewer the server says may
50
- * publish (`can_publish_response === true`, the API's `mayPublishTurn`).
51
- * Hidden while the session row loads: an unknown answer is not a yes.
52
- */
53
- export function TurnShareButton({ projectId, sessionId, turnId }) {
54
- const t = useTranslations('turnShare');
55
- const { publicSharesEnabled } = useUiHostConfig();
56
- const { data: session } = useProjectSession(projectId, sessionId);
57
- const [open, setOpen] = useState(false);
58
- if (!publicSharesEnabled || !projectId || !sessionId || !turnId)
59
- return null;
60
- if (session?.can_publish_response !== true)
61
- return null;
62
- return (_jsxs(_Fragment, { children: [_jsx(Hint, { label: t('shareResponse'), side: "top", children: _jsx(Button, { variant: "ghost", size: "icon-sm", onClick: () => setOpen(true), "aria-label": t('shareResponse'), className: "hit-area-3", children: _jsx(ShareNetworkIcon, { className: "text-muted-foreground size-4" }) }) }), _jsx(Modal, { open: open, onOpenChange: setOpen, children: open ? _jsx(TurnShareDialogContent, { target: { projectId, sessionId, turnId } }) : null })] }));
63
- }
64
- function TurnShareDialogContent({ target }) {
65
- const t = useTranslations('turnShare');
66
- const queryClient = useQueryClient();
67
- const key = turnShareQueryKey(target);
68
- const [error, setError] = useState(null);
69
- const [copied, setCopied] = useState(false);
70
- // The scope the person picked; null = whatever the live share says.
71
- const [pickedIncludePrompt, setPickedIncludePrompt] = useState(null);
72
- // "Turn off link" waits for this second, explicit click.
73
- const [confirmingOff, setConfirmingOff] = useState(false);
74
- const copiedTimer = useRef(null);
75
- useEffect(() => () => {
76
- if (copiedTimer.current)
77
- clearTimeout(copiedTimer.current);
78
- }, []);
79
- const query = useQuery({
80
- queryKey: key,
81
- queryFn: () => getTurnShare(target.projectId, target.sessionId, target.turnId),
82
- // A 403 or 404 is a settled answer; retrying it only delays the error line.
83
- retry: false,
84
- staleTime: 30_000,
85
- });
86
- const share = query.data?.share ?? null;
87
- const includePrompt = pickedIncludePrompt ?? share?.include_prompt ?? false;
88
- const copyUrl = async (url) => {
89
- try {
90
- await navigator.clipboard.writeText(url);
91
- setCopied(true);
92
- if (copiedTimer.current)
93
- clearTimeout(copiedTimer.current);
94
- copiedTimer.current = setTimeout(() => setCopied(false), 2000);
95
- return true;
96
- }
97
- catch {
98
- return false;
99
- }
100
- };
101
- const publish = useMutation({
102
- mutationFn: ({ includePrompt: include_prompt }) => shareTurn(target.projectId, target.sessionId, target.turnId, { include_prompt }),
103
- onMutate: () => setError(null),
104
- onSuccess: async (data, { reason }) => {
105
- queryClient.setQueryData(key, data);
106
- setPickedIncludePrompt(null);
107
- if (reason !== 'share') {
108
- successToast(t('linkUpdated'));
109
- return;
110
- }
111
- // Sharing is the moment the person wants the link: put it on the clipboard.
112
- successToast((await copyUrl(data.share.url)) ? t('linkCopied') : t('responseShared'));
113
- },
114
- onError: (err, { reason }) => {
115
- // A failed scope change leaves the live share as it was: show its scope.
116
- if (reason === 'scope')
117
- setPickedIncludePrompt(null);
118
- setError(serverMessage(err) ?? t('shareError'));
119
- },
120
- });
121
- const unpublish = useMutation({
122
- mutationFn: () => unshareTurn(target.projectId, target.sessionId, target.turnId),
123
- onMutate: () => setError(null),
124
- onSuccess: (data) => {
125
- queryClient.setQueryData(key, data);
126
- setConfirmingOff(false);
127
- },
128
- onError: (err) => setError(serverMessage(err) ?? t('unshareError')),
129
- });
130
- const pending = query.isLoading || publish.isPending || unpublish.isPending;
131
- const shownError = error ?? (query.isError ? (serverMessage(query.error) ?? t('loadError')) : null);
132
- const pickScope = (value) => {
133
- const next = value === 'prompt';
134
- if (next === includePrompt)
135
- return;
136
- setPickedIncludePrompt(next);
137
- // Private: the pick waits for the switch. Public: re-share under the same URL.
138
- if (share)
139
- publish.mutate({ includePrompt: next, reason: 'scope' });
140
- };
141
- return (_jsx(ModalContent, { className: "space-y-0 lg:max-w-lg", children: _jsxs("div", { className: "flex flex-col gap-5 p-5", children: [_jsx(ModalTitle, { className: "pr-10 text-lg font-medium", children: t('shareResponse') }), _jsxs("div", { className: "space-y-2.5", children: [_jsx(Label, { id: "turn-share-scope", children: t('whatToInclude') }), _jsxs(RadioGroup, { "aria-labelledby": "turn-share-scope", value: includePrompt ? 'prompt' : 'response', onValueChange: pickScope, disabled: pending, className: "grid grid-cols-1 gap-2.5 sm:grid-cols-2", children: [_jsx(ScopeTile, { value: "response", title: t('responseOnly'), hint: t('responseOnlyHint'), withPrompt: false }), _jsx(ScopeTile, { value: "prompt", title: t('promptAndResponse'), hint: t('promptAndResponseHint'), withPrompt: true })] })] }), _jsx(Separator, {}), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(Label, { htmlFor: "turn-share-public", children: t('publicLink') }), _jsx("p", { className: "text-muted-foreground text-xs", children: t('publicLinkHint') })] }), _jsx(Switch, { id: "turn-share-public", checked: !!share && !confirmingOff, disabled: pending, "aria-busy": pending || undefined, onCheckedChange: (on) => {
142
- if (on && confirmingOff)
143
- setConfirmingOff(false);
144
- else if (on)
145
- publish.mutate({ includePrompt, reason: 'share' });
146
- else if (share)
147
- setConfirmingOff(true);
148
- } })] }), share && confirmingOff ? (_jsxs("div", { role: "group", "aria-label": t('turnOffLink'), className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx("p", { className: "text-muted-foreground text-xs", children: t('stopNote') }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "outline-ghost", size: "xs", disabled: pending, onClick: () => setConfirmingOff(false), children: t('cancel') }), _jsx(Button, { variant: "destructive", size: "xs", disabled: pending, onClick: () => unpublish.mutate(), children: t('turnOffLink') })] })] })) : null, share && !confirmingOff ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex gap-2", children: [_jsx(Input, { readOnly: true, "aria-label": t('publicLink'), value: share.url, onFocus: (event) => event.currentTarget.select() }), _jsxs(Button, { className: "shrink-0", disabled: pending, onClick: () => void copyUrl(share.url).then((ok) => !ok && setError(t('copyError'))), children: [copied ? (_jsx(CheckIcon, { className: "size-4 shrink-0" })) : (_jsx(Copy, { className: "size-4 shrink-0" })), copied ? t('copied') : t('copyLink')] })] }), share.stale ? (_jsxs("p", { className: "text-muted-foreground flex flex-wrap items-center gap-1 text-xs", children: [t('stale'), " \u00B7", _jsx(Button, { variant: "link", size: "xs", className: "h-auto px-0 text-xs", disabled: pending, onClick: () => publish.mutate({ includePrompt, reason: 'update' }), children: t('updateLink') })] })) : null] })) : null, shownError ? (_jsxs("p", { role: "alert", className: "text-foreground flex items-start gap-2 text-xs text-pretty", children: [_jsx(WarningCircleIcon, { weight: "fill", className: "text-kortix-red mt-0.5 size-4 shrink-0" }), shownError] })) : null] })] }) }));
149
- }
150
- /** Widths of the skeleton text lines, longest first. */
151
- const RESPONSE_LINES = ['w-full', 'w-11/12', 'w-2/3', 'w-5/6', 'w-1/2'];
152
- const RESPONSE_LINES_UNDER_PROMPT = ['w-full', 'w-5/6', 'w-2/3'];
153
- /**
154
- * One scope choice: a skeleton of what the reader sees, a title and a hint.
155
- * The prompt variant draws the prompt bubble top-right, where the transcript
156
- * puts it. Outer `rounded-xl` minus the `p-2` inset gives the preview's
157
- * `rounded-sm` (14 - 7.4 ≈ 6.6px), so the corners stay concentric.
158
- */
159
- function ScopeTile({ value, title, hint, withPrompt, }) {
160
- return (_jsxs(RadioGroupItemBase, { value: value, className: cn('border-border flex flex-col gap-2.5 rounded-xl border p-2 text-left', 'hover:bg-hover transition-colors', 'data-[state=checked]:border-foreground', 'focus-visible:ring-ring outline-none focus-visible:ring-2', 'disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50'), children: [_jsxs("span", { "aria-hidden": "true", className: "bg-background flex h-24 flex-col gap-1.5 rounded-sm p-3", children: [withPrompt ? _jsx("span", { className: "bg-muted ml-auto h-4 w-3/5 rounded-sm" }) : null, (withPrompt ? RESPONSE_LINES_UNDER_PROMPT : RESPONSE_LINES).map((width, index) => (_jsx("span", { className: cn('bg-border h-1.5 rounded-full', width) }, index)))] }), _jsxs("span", { className: "flex flex-col gap-0.5 px-1 pb-1", children: [_jsx("span", { className: "text-foreground text-sm font-medium", children: title }), _jsx("span", { className: "text-muted-foreground text-xs", children: hint })] })] }));
161
- }
@@ -1,11 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export declare function PromoNavRow({ icon, label, badge, dismissLabel, onDismiss, onClick, pending, }: {
3
- icon: ReactNode;
4
- label: string;
5
- /** A short tag ("New"); omitted, the row shows only the dismiss on hover. */
6
- badge?: string;
7
- dismissLabel: string;
8
- onDismiss: () => void;
9
- onClick: () => void;
10
- pending?: boolean;
11
- }): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, } from '../../../primitives/sidebar.js';
4
- import { XIcon } from '@phosphor-icons/react';
5
- export function PromoNavRow({ icon, label, badge, dismissLabel, onDismiss, onClick, pending = false, }) {
6
- return (_jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { className: "text-sidebar-foreground bg-hover group-has-data-[sidebar=menu-action]/menu-item:pr-12", disabled: pending, "aria-busy": pending || undefined, onClick: onClick, children: [icon, _jsx("span", { className: "min-w-0 flex-1 truncate", children: label })] }), badge ? (_jsx(SidebarMenuBadge, { className: "bg-kortix-blue/15 text-foreground mr-1 rounded-sm px-1.5 group-focus-within/menu-item:opacity-0 group-hover/menu-item:opacity-0 max-md:hidden", children: badge })) : null, _jsx(SidebarMenuAction, { onClick: onDismiss, "aria-label": dismissLabel, showOnHover: true, className: "mr-1", children: _jsx(XIcon, {}) })] }));
7
- }