@sixb/app 0.2.1 → 0.2.3

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 (422) hide show
  1. package/dist/agent/agent-chat.d.ts +9 -2
  2. package/dist/agent/agent-chat.d.ts.map +1 -1
  3. package/dist/agent/agent-panel.d.ts +9 -1
  4. package/dist/agent/agent-panel.d.ts.map +1 -1
  5. package/dist/agent/agent-surface.d.ts.map +1 -1
  6. package/dist/agent/artifact-card.d.ts +3 -1
  7. package/dist/agent/artifact-card.d.ts.map +1 -1
  8. package/dist/agent/artifact-panel.d.ts +7 -1
  9. package/dist/agent/artifact-panel.d.ts.map +1 -1
  10. package/dist/agent/components/composer-place.d.ts +3 -1
  11. package/dist/agent/components/composer-place.d.ts.map +1 -1
  12. package/dist/agent/components/composer.d.ts +20 -1
  13. package/dist/agent/components/composer.d.ts.map +1 -1
  14. package/dist/agent/components/context-chips.d.ts.map +1 -1
  15. package/dist/agent/components/context-meter.d.ts +1 -1
  16. package/dist/agent/components/conversation-panel.d.ts +3 -1
  17. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  18. package/dist/agent/components/message-parts.d.ts +3 -1
  19. package/dist/agent/components/message-parts.d.ts.map +1 -1
  20. package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
  21. package/dist/agent/composer-insertion.d.ts +24 -0
  22. package/dist/agent/composer-insertion.d.ts.map +1 -0
  23. package/dist/agent/delegation/use-children.d.ts +5 -5
  24. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  25. package/dist/agent/hooks/use-agent-conversation.d.ts +10 -4
  26. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  27. package/dist/agent/hooks/use-new-thread-place.d.ts +39 -17
  28. package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -1
  29. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  30. package/dist/agent/i18n/en.d.ts +14 -0
  31. package/dist/agent/i18n/en.d.ts.map +1 -1
  32. package/dist/agent/i18n/fr.d.ts.map +1 -1
  33. package/dist/agent/i18n/index.d.ts +20 -0
  34. package/dist/agent/i18n/index.d.ts.map +1 -1
  35. package/dist/agent/publish-artifact/interpret.d.ts +8 -2
  36. package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
  37. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
  38. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
  39. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
  40. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
  41. package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
  42. package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
  43. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  44. package/dist/agent/types.d.ts +3 -1
  45. package/dist/agent/types.d.ts.map +1 -1
  46. package/dist/artifacts/artifact-page.d.ts.map +1 -1
  47. package/dist/artifacts/artifact-viewer.d.ts +16 -0
  48. package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
  49. package/dist/artifacts/card-details.d.ts +1 -1
  50. package/dist/artifacts/card-details.d.ts.map +1 -1
  51. package/dist/artifacts/card-preview.d.ts.map +1 -1
  52. package/dist/artifacts/comments-context.d.ts +48 -0
  53. package/dist/artifacts/comments-context.d.ts.map +1 -0
  54. package/dist/artifacts/edit-session.d.ts +6 -6
  55. package/dist/artifacts/edit-session.d.ts.map +1 -1
  56. package/dist/artifacts/file-source.d.ts.map +1 -1
  57. package/dist/artifacts/frame.d.ts +10 -2
  58. package/dist/artifacts/frame.d.ts.map +1 -1
  59. package/dist/artifacts/guest-badge.d.ts +8 -0
  60. package/dist/artifacts/guest-badge.d.ts.map +1 -0
  61. package/dist/artifacts/held-artifact.d.ts +19 -0
  62. package/dist/artifacts/held-artifact.d.ts.map +1 -0
  63. package/dist/artifacts/holders.d.ts +10 -0
  64. package/dist/artifacts/holders.d.ts.map +1 -0
  65. package/dist/artifacts/live/boards.d.ts +15 -0
  66. package/dist/artifacts/live/boards.d.ts.map +1 -0
  67. package/dist/artifacts/live/canvas.d.ts +79 -0
  68. package/dist/artifacts/live/canvas.d.ts.map +1 -0
  69. package/dist/artifacts/live/header.d.ts +29 -0
  70. package/dist/artifacts/live/header.d.ts.map +1 -0
  71. package/dist/artifacts/live/hooks.d.ts +21 -0
  72. package/dist/artifacts/live/hooks.d.ts.map +1 -0
  73. package/dist/artifacts/live/presence.d.ts +32 -0
  74. package/dist/artifacts/live/presence.d.ts.map +1 -0
  75. package/dist/artifacts/live/session.d.ts +130 -0
  76. package/dist/artifacts/live/session.d.ts.map +1 -0
  77. package/dist/artifacts/live/view.d.ts +28 -0
  78. package/dist/artifacts/live/view.d.ts.map +1 -0
  79. package/dist/artifacts/messages.d.ts +424 -14
  80. package/dist/artifacts/messages.d.ts.map +1 -1
  81. package/dist/artifacts/page-queries.d.ts +2 -2
  82. package/dist/artifacts/page-queries.d.ts.map +1 -1
  83. package/dist/artifacts/page-state.d.ts.map +1 -1
  84. package/dist/artifacts/publish-edit.d.ts +24 -14
  85. package/dist/artifacts/publish-edit.d.ts.map +1 -1
  86. package/dist/artifacts/queries.d.ts +490 -9
  87. package/dist/artifacts/queries.d.ts.map +1 -1
  88. package/dist/artifacts/references/references.d.ts.map +1 -1
  89. package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
  90. package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
  91. package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
  92. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
  93. package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
  94. package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
  95. package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
  96. package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
  97. package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
  98. package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
  99. package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
  100. package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
  101. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
  102. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
  103. package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
  104. package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
  105. package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
  106. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
  107. package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
  108. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
  109. package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
  110. package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
  111. package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
  112. package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
  113. package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
  114. package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
  115. package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
  116. package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
  117. package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
  118. package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
  119. package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
  120. package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
  121. package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
  122. package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
  123. package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
  124. package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
  125. package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
  126. package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
  127. package/dist/artifacts/version-menu.d.ts +19 -0
  128. package/dist/artifacts/version-menu.d.ts.map +1 -0
  129. package/dist/artifacts/view-context.d.ts +43 -0
  130. package/dist/artifacts/view-context.d.ts.map +1 -0
  131. package/dist/artifacts/viewer.d.ts.map +1 -1
  132. package/dist/build.d.ts +5 -0
  133. package/dist/build.d.ts.map +1 -1
  134. package/dist/{chunk-ytadd0b5.js → chunk-001c4gnk.js} +6871 -3756
  135. package/dist/chunk-001c4gnk.js.map +204 -0
  136. package/dist/chunk-00wggsst.js +7 -0
  137. package/dist/chunk-00wggsst.js.map +10 -0
  138. package/dist/chunk-5crvhjp2.js +4704 -0
  139. package/dist/chunk-5crvhjp2.js.map +28 -0
  140. package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
  141. package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
  142. package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
  143. package/dist/chunk-fg6thecb.js.map +10 -0
  144. package/dist/{chunk-j8g956dt.js → chunk-fwb9mxwm.js} +1 -1
  145. package/dist/{chunk-7fj9cfkw.js → chunk-kes4ygmz.js} +1 -1
  146. package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
  147. package/dist/codegen.d.ts.map +1 -1
  148. package/dist/createCustomApp.d.ts.map +1 -1
  149. package/dist/index.d.ts +7 -1
  150. package/dist/index.d.ts.map +1 -1
  151. package/dist/index.js +930 -309
  152. package/dist/index.js.map +15 -10
  153. package/dist/locale-messages.d.ts +12 -0
  154. package/dist/locale-messages.d.ts.map +1 -1
  155. package/dist/locale.d.ts +12 -0
  156. package/dist/locale.d.ts.map +1 -1
  157. package/dist/locale.js +1 -1
  158. package/dist/metadata.d.ts +8 -0
  159. package/dist/metadata.d.ts.map +1 -1
  160. package/dist/pages/console/action-run.d.ts.map +1 -1
  161. package/dist/pages/console/data/connectors.d.ts.map +1 -1
  162. package/dist/pages/console/data/datasets.d.ts.map +1 -1
  163. package/dist/pages/console/data/lake-health.d.ts +3 -0
  164. package/dist/pages/console/data/lake-health.d.ts.map +1 -0
  165. package/dist/pages/console/data/messages.d.ts +98 -2
  166. package/dist/pages/console/data/messages.d.ts.map +1 -1
  167. package/dist/pages/console/data/pipelines.d.ts.map +1 -1
  168. package/dist/pages/console/data/projections.d.ts.map +1 -1
  169. package/dist/pages/console/data/syncs.d.ts.map +1 -1
  170. package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
  171. package/dist/pages/console/ontology/actions.d.ts.map +1 -1
  172. package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
  173. package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
  174. package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
  175. package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
  176. package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
  177. package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
  178. package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
  179. package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
  180. package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
  181. package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
  182. package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
  183. package/dist/pages/console/ontology/objects.d.ts.map +1 -1
  184. package/dist/pages/console/ontology/rules.d.ts.map +1 -1
  185. package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
  186. package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
  187. package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
  188. package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
  189. package/dist/pages/console/skeletons.d.ts +30 -0
  190. package/dist/pages/console/skeletons.d.ts.map +1 -0
  191. package/dist/pages/console/workflow-run.d.ts.map +1 -1
  192. package/dist/pages/section-page.d.ts +11 -1
  193. package/dist/pages/section-page.d.ts.map +1 -1
  194. package/dist/pages/section-ui.d.ts +25 -3
  195. package/dist/pages/section-ui.d.ts.map +1 -1
  196. package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
  197. package/dist/pages/settings/activity/connections.d.ts.map +1 -1
  198. package/dist/pages/settings/activity/page.d.ts.map +1 -1
  199. package/dist/pages/settings/activity/thread.d.ts.map +1 -1
  200. package/dist/pages/settings/activity/timeline.d.ts +2 -0
  201. package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
  202. package/dist/pages/settings/controls.d.ts +4 -0
  203. package/dist/pages/settings/controls.d.ts.map +1 -1
  204. package/dist/pages/settings/members.d.ts.map +1 -1
  205. package/dist/pages/settings/memory-history.d.ts +2 -0
  206. package/dist/pages/settings/memory-history.d.ts.map +1 -1
  207. package/dist/pages/settings/memory.d.ts.map +1 -1
  208. package/dist/pages/settings/service-accounts.d.ts.map +1 -1
  209. package/dist/pages/settings/sessions.d.ts.map +1 -1
  210. package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
  211. package/dist/pages/settings/usage/limits.d.ts.map +1 -1
  212. package/dist/pages/settings/usage/messages.d.ts +0 -2
  213. package/dist/pages/settings/usage/messages.d.ts.map +1 -1
  214. package/dist/pages/settings/usage/runs.d.ts +8 -2
  215. package/dist/pages/settings/usage/runs.d.ts.map +1 -1
  216. package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
  217. package/dist/pages/settings/usage/spend-model.d.ts +5 -0
  218. package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
  219. package/dist/pages/values.d.ts +6 -0
  220. package/dist/pages/values.d.ts.map +1 -1
  221. package/dist/pages.d.ts +4 -0
  222. package/dist/pages.d.ts.map +1 -1
  223. package/dist/pages.js +8188 -4841
  224. package/dist/pages.js.map +56 -47
  225. package/dist/sections/catalog.d.ts.map +1 -1
  226. package/dist/sections/sections.d.ts.map +1 -1
  227. package/dist/server.js +294 -23
  228. package/dist/server.js.map +8 -7
  229. package/dist/service-worker.d.ts +39 -0
  230. package/dist/service-worker.d.ts.map +1 -0
  231. package/dist/shared-session.d.ts +25 -0
  232. package/dist/shared-session.d.ts.map +1 -0
  233. package/dist/shell/app-return.d.ts +35 -0
  234. package/dist/shell/app-return.d.ts.map +1 -0
  235. package/dist/shell/app-shell.d.ts +1 -1
  236. package/dist/shell/app-shell.d.ts.map +1 -1
  237. package/dist/shell/nav-items.d.ts +2 -0
  238. package/dist/shell/nav-items.d.ts.map +1 -1
  239. package/dist/shell/phone/back.d.ts +6 -0
  240. package/dist/shell/phone/back.d.ts.map +1 -0
  241. package/dist/shell/phone/launch.d.ts +7 -0
  242. package/dist/shell/phone/launch.d.ts.map +1 -0
  243. package/dist/shell/phone/more-sheet.d.ts +36 -0
  244. package/dist/shell/phone/more-sheet.d.ts.map +1 -0
  245. package/dist/shell/phone/phone-foundations.d.ts +9 -0
  246. package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
  247. package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
  248. package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
  249. package/dist/shell/phone/routes.d.ts +12 -0
  250. package/dist/shell/phone/routes.d.ts.map +1 -0
  251. package/dist/shell/phone/screen-motion.d.ts +11 -0
  252. package/dist/shell/phone/screen-motion.d.ts.map +1 -0
  253. package/dist/shell/phone/scroll-restoration.d.ts +7 -0
  254. package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
  255. package/dist/shell/phone/startup-image.d.ts +17 -0
  256. package/dist/shell/phone/startup-image.d.ts.map +1 -0
  257. package/dist/shell/phone/tab-bar.d.ts +14 -0
  258. package/dist/shell/phone/tab-bar.d.ts.map +1 -0
  259. package/dist/shell/phone/top-bar.d.ts +24 -0
  260. package/dist/shell/phone/top-bar.d.ts.map +1 -0
  261. package/dist/shell/search-command.d.ts +3 -1
  262. package/dist/shell/search-command.d.ts.map +1 -1
  263. package/dist/shell/user-menu.d.ts +2 -0
  264. package/dist/shell/user-menu.d.ts.map +1 -1
  265. package/package.json +8 -5
  266. package/src/agent/agent-chat.tsx +51 -8
  267. package/src/agent/agent-panel.tsx +12 -0
  268. package/src/agent/agent-surface.tsx +4 -0
  269. package/src/agent/artifact-card.tsx +84 -16
  270. package/src/agent/artifact-panel.tsx +63 -43
  271. package/src/agent/components/agent-message-body.tsx +1 -1
  272. package/src/agent/components/composer-place.tsx +77 -53
  273. package/src/agent/components/composer.tsx +92 -7
  274. package/src/agent/components/context-chips.tsx +72 -2
  275. package/src/agent/components/conversation-panel.tsx +3 -2
  276. package/src/agent/components/message-parts.tsx +6 -1
  277. package/src/agent/components/thread-artifacts-menu.tsx +22 -5
  278. package/src/agent/composer-insertion.ts +36 -0
  279. package/src/agent/hooks/use-agent-conversation.ts +41 -10
  280. package/src/agent/hooks/use-new-thread-place.ts +149 -25
  281. package/src/agent/i18n/en.ts +14 -0
  282. package/src/agent/i18n/fr.ts +12 -0
  283. package/src/agent/publish-artifact/interpret.ts +27 -5
  284. package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
  285. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
  286. package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
  287. package/src/agent/react-router.tsx +2 -2
  288. package/src/agent/tool-views/built-in.tsx +3 -0
  289. package/src/agent/types.ts +4 -0
  290. package/src/artifacts/artifact-page.tsx +42 -17
  291. package/src/artifacts/artifact-viewer.tsx +56 -0
  292. package/src/artifacts/artifacts.css +80 -0
  293. package/src/artifacts/card-details.ts +2 -2
  294. package/src/artifacts/card-preview.tsx +17 -3
  295. package/src/artifacts/comments-context.ts +125 -0
  296. package/src/artifacts/edit-session.tsx +6 -6
  297. package/src/artifacts/file-source.ts +10 -3
  298. package/src/artifacts/frame.tsx +50 -12
  299. package/src/artifacts/gallery.tsx +9 -11
  300. package/src/artifacts/guest-badge.tsx +21 -0
  301. package/src/artifacts/held-artifact.tsx +241 -0
  302. package/src/artifacts/holders.tsx +170 -0
  303. package/src/artifacts/live/boards.ts +95 -0
  304. package/src/artifacts/live/canvas.ts +402 -0
  305. package/src/artifacts/live/header.tsx +137 -0
  306. package/src/artifacts/live/hooks.ts +94 -0
  307. package/src/artifacts/live/presence.ts +147 -0
  308. package/src/artifacts/live/session.ts +520 -0
  309. package/src/artifacts/live/view.ts +81 -0
  310. package/src/artifacts/messages.ts +415 -24
  311. package/src/artifacts/page-queries.ts +2 -3
  312. package/src/artifacts/page-state.ts +16 -7
  313. package/src/artifacts/publish-edit.ts +50 -22
  314. package/src/artifacts/queries.ts +108 -10
  315. package/src/artifacts/references/references.tsx +6 -9
  316. package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
  317. package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
  318. package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
  319. package/src/artifacts/renderers/canvas/board-source.ts +110 -0
  320. package/src/artifacts/renderers/canvas/board.tsx +309 -33
  321. package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
  322. package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
  323. package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
  324. package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
  325. package/src/artifacts/renderers/canvas/comments.ts +225 -0
  326. package/src/artifacts/renderers/canvas/draft.ts +41 -50
  327. package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
  328. package/src/artifacts/renderers/canvas/focus.tsx +175 -24
  329. package/src/artifacts/renderers/canvas/items.tsx +179 -52
  330. package/src/artifacts/renderers/canvas/layout.ts +99 -47
  331. package/src/artifacts/renderers/canvas/presence.tsx +184 -0
  332. package/src/artifacts/renderers/canvas/previews.ts +127 -0
  333. package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
  334. package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
  335. package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
  336. package/src/artifacts/renderers/slides/slides.tsx +1 -1
  337. package/src/artifacts/version-menu.tsx +438 -0
  338. package/src/artifacts/view-context.ts +102 -0
  339. package/src/artifacts/viewer.tsx +205 -147
  340. package/src/build.ts +96 -11
  341. package/src/codegen.ts +83 -5
  342. package/src/createCustomApp.ts +20 -7
  343. package/src/index.ts +12 -0
  344. package/src/locale-messages.ts +24 -0
  345. package/src/metadata.ts +12 -0
  346. package/src/pages/console/action-run.tsx +20 -0
  347. package/src/pages/console/data/connectors.tsx +27 -3
  348. package/src/pages/console/data/datasets.tsx +30 -1
  349. package/src/pages/console/data/lake-health.tsx +299 -0
  350. package/src/pages/console/data/messages.ts +143 -2
  351. package/src/pages/console/data/pipelines.tsx +91 -3
  352. package/src/pages/console/data/projections.tsx +23 -4
  353. package/src/pages/console/data/syncs.tsx +39 -2
  354. package/src/pages/console/ontology/action-runs.tsx +8 -2
  355. package/src/pages/console/ontology/actions.tsx +39 -15
  356. package/src/pages/console/ontology/components/action-button.tsx +10 -0
  357. package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
  358. package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
  359. package/src/pages/console/ontology/lib/action-params.ts +10 -0
  360. package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
  361. package/src/pages/console/ontology/object-page.tsx +2 -0
  362. package/src/pages/console/ontology/object-type.tsx +73 -14
  363. package/src/pages/console/ontology/object-types.tsx +56 -7
  364. package/src/pages/console/ontology/objects.tsx +167 -19
  365. package/src/pages/console/ontology/rules.tsx +186 -30
  366. package/src/pages/console/ontology/workflow.tsx +130 -74
  367. package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
  368. package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
  369. package/src/pages/console/ontology/workflows.tsx +34 -21
  370. package/src/pages/console/skeletons.tsx +99 -0
  371. package/src/pages/console/workflow-run.tsx +20 -0
  372. package/src/pages/section-page.tsx +37 -7
  373. package/src/pages/section-ui.tsx +96 -13
  374. package/src/pages/settings/activity/calendar.tsx +13 -6
  375. package/src/pages/settings/activity/connections.tsx +26 -9
  376. package/src/pages/settings/activity/page.tsx +31 -4
  377. package/src/pages/settings/activity/thread.tsx +32 -18
  378. package/src/pages/settings/activity/timeline.tsx +39 -0
  379. package/src/pages/settings/controls.tsx +19 -1
  380. package/src/pages/settings/developers.tsx +2 -2
  381. package/src/pages/settings/members.tsx +42 -9
  382. package/src/pages/settings/memory-history.tsx +76 -10
  383. package/src/pages/settings/memory.tsx +47 -5
  384. package/src/pages/settings/service-accounts.tsx +7 -2
  385. package/src/pages/settings/sessions.tsx +6 -2
  386. package/src/pages/settings/usage/breakdown.tsx +62 -2
  387. package/src/pages/settings/usage/limits.tsx +45 -3
  388. package/src/pages/settings/usage/messages.ts +0 -2
  389. package/src/pages/settings/usage/page.tsx +99 -52
  390. package/src/pages/settings/usage/runs.tsx +105 -8
  391. package/src/pages/settings/usage/spend-chart.tsx +79 -45
  392. package/src/pages/settings/usage/spend-model.ts +16 -0
  393. package/src/pages/values.tsx +72 -6
  394. package/src/pages.ts +4 -0
  395. package/src/sections/catalog.ts +6 -0
  396. package/src/sections/sections.tsx +2 -0
  397. package/src/service-worker.ts +176 -0
  398. package/src/shared-session.ts +73 -0
  399. package/src/shell/app-return.ts +115 -0
  400. package/src/shell/app-shell.tsx +125 -27
  401. package/src/shell/nav-items.tsx +2 -0
  402. package/src/shell/phone/back.ts +16 -0
  403. package/src/shell/phone/launch.ts +6 -0
  404. package/src/shell/phone/more-sheet.tsx +249 -0
  405. package/src/shell/phone/phone-foundations.tsx +43 -0
  406. package/src/shell/phone/phone.css +660 -0
  407. package/src/shell/phone/pull-to-refresh.tsx +201 -0
  408. package/src/shell/phone/routes.ts +34 -0
  409. package/src/shell/phone/screen-motion.ts +292 -0
  410. package/src/shell/phone/scroll-restoration.tsx +70 -0
  411. package/src/shell/phone/startup-image.ts +119 -0
  412. package/src/shell/phone/tab-bar.tsx +95 -0
  413. package/src/shell/phone/top-bar.tsx +195 -0
  414. package/src/shell/search-command.tsx +30 -14
  415. package/src/shell/user-menu.tsx +2 -1
  416. package/dist/chunk-4j3c3p72.js +0 -1487
  417. package/dist/chunk-4j3c3p72.js.map +0 -18
  418. package/dist/chunk-4mprsd2n.js.map +0 -10
  419. package/dist/chunk-ytadd0b5.js.map +0 -188
  420. /package/dist/{chunk-j8g956dt.js.map → chunk-fwb9mxwm.js.map} +0 -0
  421. /package/dist/{chunk-7fj9cfkw.js.map → chunk-kes4ygmz.js.map} +0 -0
  422. /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
@@ -3,8 +3,11 @@ import {
3
3
  type AgentContextInput,
4
4
  agentContextIdentity,
5
5
  } from "@sixb/core/agents/context"
6
+ import { Popover, PopoverContent, PopoverTrigger } from "@sixb/ui/components"
6
7
  import { cn } from "@sixb/ui/lib/utils"
7
- import { Box, PanelsTopLeft, X } from "lucide-react"
8
+ import { Box, MessageSquare, PanelsTopLeft, X } from "lucide-react"
9
+ import { useState } from "react"
10
+ import { type CommentsContextValue, readCommentsContext } from "../../artifacts/comments-context"
8
11
  import { useAgentMessages } from "../i18n"
9
12
  import { useAgentContextLabel } from "../object-context-title"
10
13
 
@@ -50,16 +53,23 @@ function ContextChip({
50
53
  }) {
51
54
  const messages = useAgentMessages().context
52
55
  const label = useAgentContextLabel(context)
56
+ const comments = readCommentsContext(context)
53
57
  return (
54
58
  <span className={cn(COMPOSER_CHIP_CLASS_NAME, onRemove ? "pr-1.5" : "pr-2.5")}>
55
59
  <span className={COMPOSER_CHIP_THUMB_CLASS_NAME}>
56
60
  {context.kind === "object" ? (
57
61
  <Box className="size-3" strokeWidth={2} aria-hidden="true" />
62
+ ) : comments ? (
63
+ <MessageSquare className="size-3" strokeWidth={2} aria-hidden="true" />
58
64
  ) : (
59
65
  <PanelsTopLeft className="size-3" strokeWidth={2} aria-hidden="true" />
60
66
  )}
61
67
  </span>
62
- <span className="min-w-0 flex-1 truncate">{label}</span>
68
+ {comments ? (
69
+ <CommentsPreview label={label} comments={comments} />
70
+ ) : (
71
+ <span className="min-w-0 flex-1 truncate">{label}</span>
72
+ )}
63
73
  {onRemove ? (
64
74
  <button
65
75
  type="button"
@@ -73,3 +83,63 @@ function ContextChip({
73
83
  </span>
74
84
  )
75
85
  }
86
+
87
+ /**
88
+ * A comments chip's name, which shows the comments' words on hover or on a tap: what the reader
89
+ * sends, never the addresses and ids the Agent reads.
90
+ */
91
+ function CommentsPreview({
92
+ label,
93
+ comments,
94
+ }: {
95
+ readonly label: string
96
+ readonly comments: CommentsContextValue
97
+ }) {
98
+ const messages = useAgentMessages().context
99
+ const [open, setOpen] = useState(false)
100
+ return (
101
+ <Popover open={open} onOpenChange={setOpen}>
102
+ <PopoverTrigger asChild>
103
+ <button
104
+ type="button"
105
+ aria-label={messages.showComments(label)}
106
+ onPointerEnter={(event) => {
107
+ if (event.pointerType === "mouse") setOpen(true)
108
+ }}
109
+ onPointerLeave={(event) => {
110
+ if (event.pointerType === "mouse") setOpen(false)
111
+ }}
112
+ className="min-w-0 flex-1 truncate rounded-sm text-left outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
113
+ >
114
+ {label}
115
+ </button>
116
+ </PopoverTrigger>
117
+ <PopoverContent
118
+ align="start"
119
+ side="top"
120
+ sideOffset={8}
121
+ className="w-80 max-w-[calc(100vw-2rem)] p-0"
122
+ onOpenAutoFocus={(event) => event.preventDefault()}
123
+ >
124
+ <ul
125
+ className="m-0 flex max-h-72 list-none flex-col gap-3 overflow-y-auto p-3"
126
+ data-comments-preview=""
127
+ >
128
+ {comments.comments.map((comment) => (
129
+ <li key={comment.id} className="flex flex-col gap-0.5">
130
+ <span className="text-xs font-medium text-muted-foreground">
131
+ {comment.author ?? messages.someone}
132
+ </span>
133
+ <span className="text-sm leading-5 text-foreground">{comment.body}</span>
134
+ {comment.replies.length > 0 ? (
135
+ <span className="text-xs text-muted-foreground">
136
+ {messages.replies(comment.replies.length)}
137
+ </span>
138
+ ) : null}
139
+ </li>
140
+ ))}
141
+ </ul>
142
+ </PopoverContent>
143
+ </Popover>
144
+ )
145
+ }
@@ -5,7 +5,7 @@ import type { ReactNode } from "react"
5
5
  import type { ConversationComposerProps } from "../hooks/use-agent-conversation"
6
6
  import { useAgentMessages } from "../i18n"
7
7
  import type { Agent, AgentContextInput, AgentThread } from "../types"
8
- import { Composer } from "./composer"
8
+ import { Composer, type ComposerProps } from "./composer"
9
9
  import { ThreadsButton } from "./threads-button"
10
10
  import { Transcript, type TranscriptProps } from "./transcript"
11
11
 
@@ -17,7 +17,8 @@ export interface ConversationPanelProps {
17
17
  readonly readOnly?: boolean
18
18
  readonly agent: Agent | undefined
19
19
  readonly transcript: TranscriptProps
20
- readonly composer: ConversationComposerProps
20
+ /** The conversation's composer, and the page's choices for a conversation not created yet. */
21
+ readonly composer: ConversationComposerProps & Pick<ComposerProps, "newThreadControls">
21
22
  readonly messagesLoading: boolean
22
23
  readonly messagesError: string | null
23
24
  /** The selected durable thread, or null while composing a new one. */
@@ -49,6 +49,7 @@ export function AssistantBody({
49
49
  parts,
50
50
  live = false,
51
51
  nested = false,
52
+ runId,
52
53
  }: {
53
54
  parts: readonly NormalizedPart[]
54
55
  /** True while this body is driven by an in-flight run, so its headline shows live progress. */
@@ -58,6 +59,8 @@ export function AssistantBody({
58
59
  * on the card already.
59
60
  */
60
61
  nested?: boolean
62
+ /** The turn's run, whose restore points say what it changed in the artifacts it revised. */
63
+ runId?: string | null
61
64
  }) {
62
65
  const blocks: React.ReactNode[] = []
63
66
  let textBuffer: string[] = []
@@ -126,7 +129,9 @@ export function AssistantBody({
126
129
  flushWork(live)
127
130
  blocks.push(<AnswerToolViews key="answer-tools" parts={parts} />)
128
131
  const artifacts = turnArtifacts(parts)
129
- if (artifacts.length > 0) blocks.push(<ArtifactCards key="artifacts" artifacts={artifacts} />)
132
+ if (artifacts.length > 0) {
133
+ blocks.push(<ArtifactCards key="artifacts" artifacts={artifacts} runId={runId ?? null} />)
134
+ }
130
135
  // Saving is work the reply keeps quiet about; what was remembered is the user's to see.
131
136
  savedMemories(parts).forEach((save, index) => {
132
137
  blocks.push(<SavedToMemory key={`memory:${index}`} {...save} />)
@@ -1,3 +1,4 @@
1
+ import type { ListArtifactsResponse } from "@sixb/client"
1
2
  import { listArtifactsOptions } from "@sixb/client/hooks"
2
3
  import {
3
4
  Button,
@@ -13,11 +14,31 @@ import { ArrowUpRight, Layers } from "lucide-react"
13
14
  import { Link } from "react-router-dom"
14
15
  import { ArtifactKindIcon } from "../../artifacts/kind-icon"
15
16
  import { useArtifactMessages } from "../../artifacts/messages"
17
+ import { useArtifactVersion } from "../../artifacts/queries"
16
18
  import type { ArtifactTarget } from "../../artifacts/target"
17
19
  import { ARTIFACTS_HREF } from "../../pages/routes"
18
20
  import { useArtifactPanel } from "../artifact-panel"
19
21
  import { useAgentMessages } from "../i18n"
20
22
 
23
+ type ArtifactSummary = ListArtifactsResponse["artifacts"][number]
24
+
25
+ /**
26
+ * An artifact's kind, and its latest version once someone created it: the current version changes
27
+ * in place, and has no number to give yet.
28
+ */
29
+ function ArtifactDetail({ artifact }: { readonly artifact: ArtifactSummary }) {
30
+ const messages = useArtifactMessages()
31
+ const { data } = useArtifactVersion(artifact.id, artifact.latestVersion, {
32
+ revision: artifact.revision,
33
+ })
34
+ return (
35
+ <span className="shrink-0 text-xs text-muted-foreground tabular-nums">
36
+ {messages.kinds[artifact.kind]}
37
+ {data?.frozen ? ` · ${messages.viewer.version(artifact.latestVersion)}` : null}
38
+ </span>
39
+ )
40
+ }
41
+
21
42
  /**
22
43
  * The artifacts the Agent published in this conversation, each one opening in the panel, and the
23
44
  * way to every artifact in the gallery. Everyone who reads the conversation lists them: its owner,
@@ -36,7 +57,6 @@ export function ThreadArtifactsMenu({
36
57
  }) {
37
58
  const panel = useArtifactPanel()
38
59
  const messages = useAgentMessages().artifacts
39
- const artifactMessages = useArtifactMessages()
40
60
  const { data } = useQuery({
41
61
  ...listArtifactsOptions({ query: { thread: threadId } }),
42
62
  retry: false,
@@ -70,10 +90,7 @@ export function ThreadArtifactsMenu({
70
90
  >
71
91
  <ArtifactKindIcon kind={artifact.kind} className="size-4 text-muted-foreground" />
72
92
  <span className="min-w-0 flex-1 truncate">{artifact.title}</span>
73
- <span className="shrink-0 text-xs text-muted-foreground tabular-nums">
74
- {artifactMessages.kinds[artifact.kind]} ·{" "}
75
- {artifactMessages.viewer.version(artifact.latestVersion)}
76
- </span>
93
+ <ArtifactDetail artifact={artifact} />
77
94
  </DropdownMenuItem>
78
95
  ))}
79
96
  {withGallery ? (
@@ -0,0 +1,36 @@
1
+ import type { AgentContextInput } from "@sixb/core/agents/context"
2
+ import { useCallback, useState } from "react"
3
+
4
+ /**
5
+ * Words waiting to join the composer's input, and context to join its chips, numbered so the same
6
+ * handed twice joins twice.
7
+ */
8
+ export interface ComposerInsertion {
9
+ readonly text: string
10
+ readonly context?: AgentContextInput
11
+ readonly nonce: number
12
+ }
13
+
14
+ /**
15
+ * Words an artifact hands the conversation's input, held until the composer took them: once it
16
+ * has, they are gone, so a composer drawn again, as when the conversation's first message replaces
17
+ * its welcome, does not add them a second time.
18
+ */
19
+ export function useComposerInsertion(): {
20
+ readonly insertion: ComposerInsertion | undefined
21
+ readonly insert: (draft: { readonly text: string; readonly context?: AgentContextInput }) => void
22
+ readonly inserted: (nonce: number) => void
23
+ } {
24
+ const [pending, setPending] = useState<ComposerInsertion | undefined>(undefined)
25
+
26
+ const insert = useCallback(
27
+ (draft: { readonly text: string; readonly context?: AgentContextInput }) =>
28
+ setPending((current) => ({ ...draft, nonce: (current?.nonce ?? 0) + 1 })),
29
+ []
30
+ )
31
+ const inserted = useCallback(
32
+ (nonce: number) => setPending((current) => (current?.nonce === nonce ? undefined : current)),
33
+ []
34
+ )
35
+ return { insertion: pending, insert, inserted }
36
+ }
@@ -11,6 +11,7 @@ import {
11
11
  getAgentThreadOptions,
12
12
  getAgentThreadQueryKey,
13
13
  listAgentApprovalsQueryKey,
14
+ listAgentComputersQueryKey,
14
15
  listAgentThreadApprovalsOptions,
15
16
  listAgentThreadApprovalsQueryKey,
16
17
  listAgentThreadMessagesOptions,
@@ -83,8 +84,18 @@ import {
83
84
  threadOwner,
84
85
  userPrincipal,
85
86
  } from "../sharing"
86
- import type { AgentContextEntryInput, AgentFileRef, AgentRun, LanguageModel } from "../types"
87
- import { ComputerUnavailableError, useNewThreadPlace } from "./use-new-thread-place"
87
+ import type {
88
+ AgentContextEntryInput,
89
+ AgentFileRef,
90
+ AgentRun,
91
+ AgentThreadSandboxParams,
92
+ LanguageModel,
93
+ } from "../types"
94
+ import {
95
+ ComputerUnavailableError,
96
+ type NewThreadPlaceBody,
97
+ useNewThreadPlace,
98
+ } from "./use-new-thread-place"
88
99
  import { useAgentThreadLists } from "./use-thread-lists"
89
100
  import { useThreadStream } from "./use-thread-stream"
90
101
 
@@ -114,6 +125,12 @@ export interface UseAgentConversationInput {
114
125
  readonly threadId: string | null
115
126
  /** The first message created a thread; show it from now on. */
116
127
  readonly onThreadCreated: (threadId: string) => void
128
+ /**
129
+ * The sandbox the conversation the next message creates works in, as the project's sandbox
130
+ * declares its params, such as a repository and a branch. Such a conversation runs in the cloud,
131
+ * so the composer offers no other place. An open thread keeps the sandbox it was created with.
132
+ */
133
+ readonly newThreadSandbox?: AgentThreadSandboxParams
117
134
  }
118
135
 
119
136
  /** The parts of {@link ComposerProps} a conversation decides; the page adds the rest. */
@@ -143,6 +160,8 @@ export type ConversationComposerProps = Pick<
143
160
  | "draftAttachments"
144
161
  | "draftContext"
145
162
  | "draftNonce"
163
+ | "insertion"
164
+ | "onInserted"
146
165
  | "approvalMode"
147
166
  | "onApprovalModeChange"
148
167
  | "awaitingApproval"
@@ -175,7 +194,11 @@ const MESSAGES_LOAD_ERROR: AgentConversationMessagesError = { code: "load" }
175
194
  * both render it, by spreading `transcriptProps` and `composerProps` or by drawing `messages` and
176
195
  * `turn` themselves.
177
196
  */
178
- export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConversationInput) {
197
+ export function useAgentConversation({
198
+ threadId,
199
+ onThreadCreated,
200
+ newThreadSandbox,
201
+ }: UseAgentConversationInput) {
179
202
  const agentMessages = useAgentMessages()
180
203
  const labels = agentMessages.chat
181
204
  const queryClient = useQueryClient()
@@ -184,7 +207,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
184
207
  waiting: newThreadPlaceWaiting,
185
208
  computerId: desktopComputerId,
186
209
  resolveBody: resolvePlaceBody,
187
- } = useNewThreadPlace()
210
+ } = useNewThreadPlace(threadId === null)
188
211
  const desktopComputer = useDesktop()?.computer
189
212
  // Asking for a folder can take as long as the person does: the composer holds meanwhile.
190
213
  const [resolvingPlace, setResolvingPlace] = useState(false)
@@ -214,9 +237,11 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
214
237
  // A held call changed: its card, and the thread list's count of what waits for the reader. Its
215
238
  // turn's runs follow from their own events.
216
239
  onApprovalActivity: (event) => void refreshApprovals(event.threadId),
217
- // Its owner's sixb opened or closed where the open conversation runs: its badge follows. So do
218
- // its background commands, which may run where it ran before it moved.
240
+ // The reader's sixb opened or closed in a folder: the places a new conversation can run follow,
241
+ // and so does the open conversation's badge, should it run there. So do its background
242
+ // commands, which may run where it ran before it moved.
219
243
  onComputerActivity: (event) => {
244
+ void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
220
245
  const place = thread?.computer
221
246
  const here = place?.id === event.computerId && place.folder === event.folder
222
247
  if (threadId && (here || thread?.backgroundCommands)) void refreshThread(threadId)
@@ -228,6 +253,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
228
253
  // On every (re)subscription: catch up with what changed while the socket was away.
229
254
  onSubscribed: () => {
230
255
  void queryClient.invalidateQueries({ queryKey: listAgentApprovalsQueryKey() })
256
+ void queryClient.invalidateQueries({ queryKey: listAgentComputersQueryKey() })
231
257
  void (threadId === null ? refreshThreads() : refreshThread(threadId))
232
258
  },
233
259
  })
@@ -545,8 +571,13 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
545
571
  }
546
572
 
547
573
  if (!currentAgent) return
548
- setResolvingPlace(true)
549
- const place = await resolvePlaceBody().finally(() => setResolvingPlace(false))
574
+ // A conversation with a sandbox runs in the cloud: there is no folder to ask for.
575
+ const sandbox = newThreadSandbox
576
+ let place: NewThreadPlaceBody | null = {}
577
+ if (!sandbox) {
578
+ setResolvingPlace(true)
579
+ place = await resolvePlaceBody().finally(() => setResolvingPlace(false))
580
+ }
550
581
  if (!place) {
551
582
  // They cancelled choosing a folder: nothing was sent, and their message goes back.
552
583
  setDraftReseed((current) => ({ text, attachments, context, nonce: current.nonce + 1 }))
@@ -554,7 +585,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
554
585
  }
555
586
  const title = deriveTitle(text, attachments)
556
587
  const created = await createThread.mutateAsync({
557
- body: { ...(title ? { title } : {}), ...place },
588
+ body: { ...(title ? { title } : {}), ...place, ...(sandbox ? { sandbox } : {}) },
558
589
  })
559
590
  createdThreadId = created.thread.id
560
591
  setPendingUser({
@@ -1097,7 +1128,7 @@ export function useAgentConversation({ threadId, onThreadCreated }: UseAgentConv
1097
1128
 
1098
1129
  const composerProps: ConversationComposerProps = {
1099
1130
  onSend: send,
1100
- ...(threadId === null && (newThreadPlace || newThreadPlaceWaiting)
1131
+ ...(threadId === null && !newThreadSandbox && (newThreadPlace || newThreadPlaceWaiting)
1101
1132
  ? { newThreadPlace: newThreadPlace ?? "waiting" }
1102
1133
  : {}),
1103
1134
  error: currentSendError
@@ -1,7 +1,15 @@
1
- import { type DesktopComputer, type DesktopComputerAccess, useDesktop } from "@sixb/client/hooks"
1
+ import {
2
+ type DesktopComputer,
3
+ type DesktopComputerAccess,
4
+ listAgentComputersOptions,
5
+ useDesktop,
6
+ } from "@sixb/client/hooks"
7
+ import { useQuery, useQueryClient } from "@tanstack/react-query"
2
8
  import { useCallback, useEffect, useState } from "react"
3
9
 
4
10
  const STORAGE_KEY = "sixb.agent.new-thread-place"
11
+ /** In a browser: the folder chosen last, on one of the person's computers. */
12
+ const ONLINE_STORAGE_KEY = "sixb.agent.new-thread-place.online"
5
13
 
6
14
  /** The last choice, on this computer: where a new conversation starts. */
7
15
  interface StoredPlace {
@@ -34,28 +42,40 @@ export type NewThreadPlaceBody =
34
42
  readonly computer: DesktopComputer & { readonly folder: string }
35
43
  }
36
44
 
45
+ /** A computer a new conversation can run on, with the folders to choose from there. */
46
+ export interface PlaceComputer {
47
+ /** Both null while what runs the agent on this computer can't start: the cloud is still a choice. */
48
+ readonly id: string | null
49
+ readonly name: string | null
50
+ readonly folders: readonly string[]
51
+ }
52
+
37
53
  /** The composer's choice of where a new conversation runs. */
38
54
  export interface NewThreadPlace {
39
- /** Null while what runs the agent here can't start: the cloud is still a choice. */
40
- readonly computerName: string | null
55
+ /**
56
+ * In a desktop app, this computer alone. In a browser, the person's computers with `sixb` open,
57
+ * which aren't the one the page is on.
58
+ */
59
+ readonly computers: readonly PlaceComputer[]
60
+ /** The computers are elsewhere: what's shown names the computer as well as the folder. */
61
+ readonly remote: boolean
41
62
  readonly cloud: boolean
42
- /** Null before the person has chosen one: the first message asks. */
43
- readonly folder: string | null
44
- /** Folders chosen before, to choose from again. */
45
- readonly folders: readonly string[]
63
+ /** Null before the person has chosen one: in a desktop app, the first message asks. */
64
+ readonly chosen: { readonly computer: PlaceComputer; readonly folder: string } | null
46
65
  readonly chooseCloud: () => void
47
- readonly chooseFolder: (folder: string) => void
48
- /** Ask the person for a folder, and use it. */
49
- readonly pickFolder: () => Promise<void>
50
- readonly forgetFolder: (folder: string) => void
51
- readonly refreshFolders: () => void
66
+ readonly chooseFolder: (computer: PlaceComputer, folder: string) => void
67
+ /** In a desktop app: ask the person for a folder, and use it. */
68
+ readonly pickFolder?: () => Promise<void>
69
+ /** In a desktop app: take a folder back. */
70
+ readonly forgetFolder?: (folder: string) => void
71
+ /**
72
+ * In a desktop app: read this computer's folders again, as the menu opens. A browser's list
73
+ * follows the activity feed instead.
74
+ */
75
+ readonly refreshFolders?: () => void
52
76
  }
53
77
 
54
- /**
55
- * Where a new conversation runs, in a desktop app that can run the agent here: this computer unless
56
- * the person chooses the cloud. In a browser there's nothing to choose, and this says so.
57
- */
58
- export function useNewThreadPlace(): {
78
+ export interface NewThreadPlaceState {
59
79
  /** Null where the only place is the cloud, or until it's known that there's another. */
60
80
  readonly place: NewThreadPlace | null
61
81
  /** A desktop app that hasn't said yet whether it can run the agent here. */
@@ -67,8 +87,24 @@ export function useNewThreadPlace(): {
67
87
  * person cancels, so that their message stays in the composer.
68
88
  */
69
89
  readonly resolveBody: () => Promise<NewThreadPlaceBody | null>
70
- } {
90
+ }
91
+
92
+ /**
93
+ * Where a new conversation runs. In a desktop app that can run the agent here: this computer
94
+ * unless the person chooses the cloud. In a browser: the cloud unless they choose a folder on one
95
+ * of their computers where `sixb` is open now, and there's nothing to choose while none is.
96
+ *
97
+ * `starting`: a new conversation is open. Only then does a browser list the person's computers.
98
+ */
99
+ export function useNewThreadPlace(starting: boolean): NewThreadPlaceState {
71
100
  const access: DesktopComputerAccess | null = useDesktop()?.computer ?? null
101
+ const desktop = useDesktopPlace(access)
102
+ const online = useOnlineComputersPlace(starting && access === null)
103
+ return desktop ?? online
104
+ }
105
+
106
+ /** In a desktop app that can run the agent here; null elsewhere. */
107
+ function useDesktopPlace(access: DesktopComputerAccess | null): NewThreadPlaceState | null {
72
108
  // Undefined until the desktop app answers; null where it can't run the agent.
73
109
  const [computer, setComputer] = useState<DesktopComputer | null | undefined>(undefined)
74
110
  const [cannotStart, setCannotStart] = useState(false)
@@ -114,9 +150,7 @@ export function useNewThreadPlace(): {
114
150
  }
115
151
  }, [access, refreshFolders])
116
152
 
117
- if (!access) {
118
- return { place: null, waiting: false, computerId: null, resolveBody: async () => ({}) }
119
- }
153
+ if (!access) return null
120
154
 
121
155
  const pick = async (): Promise<string | null> => {
122
156
  const folder = await access.pickFolder()
@@ -146,16 +180,23 @@ export function useNewThreadPlace(): {
146
180
  return { place: null, waiting: computer === undefined, computerId: null, resolveBody }
147
181
  }
148
182
 
183
+ const here: PlaceComputer = {
184
+ id: computer?.id ?? null,
185
+ name: computer?.name ?? null,
186
+ folders: folders ?? [],
187
+ }
188
+ const folder =
189
+ stored.folder && (!folders || folders.includes(stored.folder)) ? stored.folder : null
149
190
  return {
150
191
  waiting: false,
151
192
  computerId: computer?.id ?? null,
152
193
  place: {
153
- computerName: computer?.name ?? null,
194
+ computers: [here],
195
+ remote: false,
154
196
  cloud: stored.cloud,
155
- folder: stored.folder && (!folders || folders.includes(stored.folder)) ? stored.folder : null,
156
- folders: folders ?? [],
197
+ chosen: folder ? { computer: here, folder } : null,
157
198
  chooseCloud: () => remember({ ...stored, cloud: true }),
158
- chooseFolder: (folder) => remember({ cloud: false, folder }),
199
+ chooseFolder: (_here, folder) => remember({ cloud: false, folder }),
159
200
  pickFolder: async () => {
160
201
  await pick()
161
202
  },
@@ -168,3 +209,86 @@ export function useNewThreadPlace(): {
168
209
  resolveBody,
169
210
  }
170
211
  }
212
+
213
+ /** The folder a browser last chose, on one of the person's computers: null for the cloud. */
214
+ interface StoredOnlinePlace {
215
+ readonly computerId: string
216
+ readonly folder: string
217
+ }
218
+
219
+ function readStoredOnline(): StoredOnlinePlace | null {
220
+ try {
221
+ const stored = JSON.parse(localStorage.getItem(ONLINE_STORAGE_KEY) ?? "null") as unknown
222
+ if (!stored || typeof stored !== "object") return null
223
+ const { computerId, folder } = stored as Partial<StoredOnlinePlace>
224
+ return typeof computerId === "string" && typeof folder === "string"
225
+ ? { computerId, folder }
226
+ : null
227
+ } catch {
228
+ return null
229
+ }
230
+ }
231
+
232
+ type OnlineComputer = PlaceComputer & { readonly id: string; readonly name: string }
233
+
234
+ /**
235
+ * In a browser: the person's computers where `sixb` is open now. A folder chosen before is the
236
+ * place only while it's open there: what's shown is what a message is sent to, and the cloud
237
+ * otherwise.
238
+ */
239
+ function useOnlineComputersPlace(enabled: boolean): NewThreadPlaceState {
240
+ const queryClient = useQueryClient()
241
+ const listed = useQuery({ ...listAgentComputersOptions(), enabled })
242
+ const [stored, setStored] = useState(readStoredOnline)
243
+
244
+ const remember = useCallback((next: StoredOnlinePlace | null) => {
245
+ setStored(next)
246
+ try {
247
+ localStorage.setItem(ONLINE_STORAGE_KEY, JSON.stringify(next))
248
+ } catch {
249
+ // Private storage: the choice lasts as long as the page.
250
+ }
251
+ }, [])
252
+
253
+ const chosenIn = (computers: readonly OnlineComputer[]) => {
254
+ const computer = stored ? computers.find((known) => known.id === stored.computerId) : undefined
255
+ return stored && computer?.folders.includes(stored.folder)
256
+ ? { computer, folder: stored.folder }
257
+ : null
258
+ }
259
+
260
+ // Before the list arrives, a message waits for it rather than going to the cloud by default.
261
+ const resolveBody = async (): Promise<NewThreadPlaceBody> => {
262
+ if (!enabled || !stored) return {}
263
+ const computers = await queryClient
264
+ .ensureQueryData(listAgentComputersOptions())
265
+ .then(({ computers }) => computers)
266
+ .catch(() => [])
267
+ const chosen = chosenIn(computers)
268
+ if (!chosen) return {}
269
+ const { id, name } = chosen.computer
270
+ return { runsOn: "computer", computer: { id, name, folder: chosen.folder } }
271
+ }
272
+
273
+ const computers = listed.data?.computers ?? []
274
+ if (!enabled || computers.length === 0) {
275
+ return { place: null, waiting: false, computerId: null, resolveBody }
276
+ }
277
+
278
+ const chosen = chosenIn(computers)
279
+ return {
280
+ waiting: false,
281
+ computerId: null,
282
+ place: {
283
+ computers,
284
+ remote: true,
285
+ cloud: chosen === null,
286
+ chosen,
287
+ chooseCloud: () => remember(null),
288
+ chooseFolder: (computer, folder) => {
289
+ if (computer.id) remember({ computerId: computer.id, folder })
290
+ },
291
+ },
292
+ resolveBody,
293
+ }
294
+ }
@@ -124,6 +124,10 @@ export const en = {
124
124
  searching: "Searching…",
125
125
  empty: (query: string) => `No objects found for “${query}”`,
126
126
  remove: (label: string) => `Remove ${label} context`,
127
+ /** A chip of comments: what shows them, and a comment the project cannot name the author of. */
128
+ showComments: (label: string) => `Show ${label}`,
129
+ someone: "Someone",
130
+ replies: (count: number) => (count === 1 ? "1 reply" : `${count} replies`),
127
131
  /** A context entry with no readable name. */
128
132
  unnamed: "Context",
129
133
  },
@@ -772,6 +776,16 @@ export const en = {
772
776
  publishing: (title: string) => `Publishing ${title || "an artifact"}`,
773
777
  published: (title: string) => `Published ${title || "an artifact"}`,
774
778
  publishFailed: (title: string) => `Couldn't publish ${title || "an artifact"}`,
779
+ /** An `update_artifact` call, which changes an artifact's current version. */
780
+ updating: (title: string) => `Updating ${title || "an artifact"}`,
781
+ updated: (title: string) => `Updated ${title || "an artifact"}`,
782
+ updateFailed: (title: string) => `Couldn't update ${title || "an artifact"}`,
783
+ /** An `open_artifact` call, which installs an artifact for the agent to read or revise. */
784
+ opening: (title: string) => `Opening ${title || "an artifact"}`,
785
+ opened: (title: string) => `Opened ${title || "an artifact"}`,
786
+ openFailed: (title: string) => `Couldn't open ${title || "an artifact"}`,
787
+ /** A revised artifact whose structure stayed as it was: what changed is within it. */
788
+ changed: "Updated",
775
789
  open: (title: string) => `Open ${title}`,
776
790
  /** Labels the cards of what one response published. */
777
791
  cards: "Published in this response",
@@ -117,6 +117,9 @@ export const fr: Translation<AgentMessages> = {
117
117
  searching: "Recherche…",
118
118
  empty: (query) => `Aucun objet trouvé pour ${quoted(query)}`,
119
119
  remove: (label) => `Retirer le contexte ${label}`,
120
+ showComments: (label) => `Afficher ${label}`,
121
+ someone: "Quelqu’un",
122
+ replies: (count) => (count === 1 ? "1 réponse" : `${count} réponses`),
120
123
  unnamed: "Contexte",
121
124
  },
122
125
  models: {
@@ -820,6 +823,15 @@ export const fr: Translation<AgentMessages> = {
820
823
  published: (title) => (title ? `${title} publié` : "Artefact publié"),
821
824
  publishFailed: (title) =>
822
825
  title ? `Impossible de publier ${title}` : "Impossible de publier l’artefact",
826
+ updating: (title) => (title ? `Mise à jour de ${title}` : "Mise à jour d’un artefact"),
827
+ updated: (title) => (title ? `${title} mis à jour` : "Artefact mis à jour"),
828
+ updateFailed: (title) =>
829
+ title ? `Impossible de mettre à jour ${title}` : "Impossible de mettre à jour l’artefact",
830
+ opening: (title) => (title ? `Ouverture de ${title}` : "Ouverture d’un artefact"),
831
+ opened: (title) => (title ? `${title} ouvert` : "Artefact ouvert"),
832
+ openFailed: (title) =>
833
+ title ? `Impossible d’ouvrir ${title}` : "Impossible d’ouvrir l’artefact",
834
+ changed: "Mis à jour",
823
835
  open: (title) => `Ouvrir ${title}`,
824
836
  cards: "Publié dans cette réponse",
825
837
  close: "Fermer",