@sixb/app 0.2.4 → 0.2.6

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 (306) hide show
  1. package/assets/connector-icons/README.md +1 -0
  2. package/assets/connector-icons/ctm.png +0 -0
  3. package/dist/agent/activity-label.d.ts.map +1 -1
  4. package/dist/agent/agent-chat.d.ts +3 -1
  5. package/dist/agent/agent-chat.d.ts.map +1 -1
  6. package/dist/agent/agent-panel.d.ts.map +1 -1
  7. package/dist/agent/artifact-panel.d.ts +3 -1
  8. package/dist/agent/artifact-panel.d.ts.map +1 -1
  9. package/dist/agent/components/agent-threads.d.ts.map +1 -1
  10. package/dist/agent/components/composer-place.d.ts.map +1 -1
  11. package/dist/agent/components/composer-settings.d.ts +1 -1
  12. package/dist/agent/components/composer-settings.d.ts.map +1 -1
  13. package/dist/agent/components/composer.d.ts +22 -5
  14. package/dist/agent/components/composer.d.ts.map +1 -1
  15. package/dist/agent/components/computer-place.d.ts +24 -6
  16. package/dist/agent/components/computer-place.d.ts.map +1 -1
  17. package/dist/agent/components/context-meter.d.ts +1 -1
  18. package/dist/agent/components/context-meter.d.ts.map +1 -1
  19. package/dist/agent/components/conversation-panel.d.ts +5 -2
  20. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  21. package/dist/agent/components/message-parts.d.ts +2 -1
  22. package/dist/agent/components/message-parts.d.ts.map +1 -1
  23. package/dist/agent/components/message-view.d.ts +13 -3
  24. package/dist/agent/components/message-view.d.ts.map +1 -1
  25. package/dist/agent/components/pending-messages.d.ts +20 -0
  26. package/dist/agent/components/pending-messages.d.ts.map +1 -0
  27. package/dist/agent/components/sandbox-recovery.d.ts +11 -2
  28. package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
  29. package/dist/agent/components/threads-button.d.ts +1 -1
  30. package/dist/agent/components/threads-button.d.ts.map +1 -1
  31. package/dist/agent/components/transcript.d.ts +13 -0
  32. package/dist/agent/components/transcript.d.ts.map +1 -1
  33. package/dist/agent/conversation.d.ts +7 -6
  34. package/dist/agent/conversation.d.ts.map +1 -1
  35. package/dist/agent/delegation/interpret.d.ts +5 -0
  36. package/dist/agent/delegation/interpret.d.ts.map +1 -1
  37. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  38. package/dist/agent/format.d.ts +7 -0
  39. package/dist/agent/format.d.ts.map +1 -1
  40. package/dist/agent/hooks/thread-queries.d.ts +1548 -0
  41. package/dist/agent/hooks/thread-queries.d.ts.map +1 -0
  42. package/dist/agent/hooks/use-agent-conversation.d.ts +51 -6
  43. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  44. package/dist/agent/hooks/use-thread-lists.d.ts +80 -3
  45. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  46. package/dist/agent/hooks/use-thread-place.d.ts +49 -0
  47. package/dist/agent/hooks/use-thread-place.d.ts.map +1 -0
  48. package/dist/agent/hooks/use-thread-stream.d.ts.map +1 -1
  49. package/dist/agent/i18n/en.d.ts +107 -6
  50. package/dist/agent/i18n/en.d.ts.map +1 -1
  51. package/dist/agent/i18n/fr.d.ts.map +1 -1
  52. package/dist/agent/i18n/index.d.ts +180 -12
  53. package/dist/agent/i18n/index.d.ts.map +1 -1
  54. package/dist/agent/inbox-handoff.d.ts +10 -0
  55. package/dist/agent/inbox-handoff.d.ts.map +1 -0
  56. package/dist/agent/live-run.d.ts +8 -1
  57. package/dist/agent/live-run.d.ts.map +1 -1
  58. package/dist/agent/model-selection.d.ts +3 -2
  59. package/dist/agent/model-selection.d.ts.map +1 -1
  60. package/dist/agent/moves.d.ts +40 -0
  61. package/dist/agent/moves.d.ts.map +1 -0
  62. package/dist/agent/search/interpret.d.ts +101 -0
  63. package/dist/agent/search/interpret.d.ts.map +1 -0
  64. package/dist/agent/search/search-tool-view.d.ts +10 -0
  65. package/dist/agent/search/search-tool-view.d.ts.map +1 -0
  66. package/dist/agent/thread-reader-state.d.ts +30 -0
  67. package/dist/agent/thread-reader-state.d.ts.map +1 -0
  68. package/dist/agent/thread-state.d.ts +26 -0
  69. package/dist/agent/thread-state.d.ts.map +1 -0
  70. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  71. package/dist/agent/tool-views/registry.d.ts +5 -6
  72. package/dist/agent/tool-views/registry.d.ts.map +1 -1
  73. package/dist/agent/types.d.ts +9 -1
  74. package/dist/agent/types.d.ts.map +1 -1
  75. package/dist/agent/view-file/view-file-tool-view.d.ts +2 -1
  76. package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -1
  77. package/dist/artifacts/card-preview.d.ts.map +1 -1
  78. package/dist/artifacts/editor/block-handle.d.ts +20 -0
  79. package/dist/artifacts/editor/block-handle.d.ts.map +1 -0
  80. package/dist/artifacts/editor/blocks.d.ts +34 -0
  81. package/dist/artifacts/editor/blocks.d.ts.map +1 -0
  82. package/dist/artifacts/editor/callout-view.d.ts +7 -0
  83. package/dist/artifacts/editor/callout-view.d.ts.map +1 -0
  84. package/dist/artifacts/editor/document-editor.d.ts +30 -0
  85. package/dist/artifacts/editor/document-editor.d.ts.map +1 -0
  86. package/dist/artifacts/editor/figure-view.d.ts +12 -0
  87. package/dist/artifacts/editor/figure-view.d.ts.map +1 -0
  88. package/dist/artifacts/editor/find-blocks.d.ts +6 -0
  89. package/dist/artifacts/editor/find-blocks.d.ts.map +1 -0
  90. package/dist/artifacts/editor/markdown-document.d.ts +12 -0
  91. package/dist/artifacts/editor/markdown-document.d.ts.map +1 -0
  92. package/dist/artifacts/editor/messages.d.ts +4 -0
  93. package/dist/artifacts/editor/messages.d.ts.map +1 -0
  94. package/dist/artifacts/editor/schema.d.ts +21 -0
  95. package/dist/artifacts/editor/schema.d.ts.map +1 -0
  96. package/dist/artifacts/editor/selection-toolbar.d.ts +35 -0
  97. package/dist/artifacts/editor/selection-toolbar.d.ts.map +1 -0
  98. package/dist/artifacts/editor/slash-menu.d.ts +43 -0
  99. package/dist/artifacts/editor/slash-menu.d.ts.map +1 -0
  100. package/dist/artifacts/editor/upload.d.ts +12 -0
  101. package/dist/artifacts/editor/upload.d.ts.map +1 -0
  102. package/dist/artifacts/file-source.d.ts +5 -0
  103. package/dist/artifacts/file-source.d.ts.map +1 -1
  104. package/dist/artifacts/frame-editor/bundle.d.ts +7 -0
  105. package/dist/artifacts/frame-editor/bundle.d.ts.map +1 -0
  106. package/dist/artifacts/frame-editor/commands.d.ts +93 -0
  107. package/dist/artifacts/frame-editor/commands.d.ts.map +1 -0
  108. package/dist/artifacts/frame-editor/entry.d.ts +2 -0
  109. package/dist/artifacts/frame-editor/entry.d.ts.map +1 -0
  110. package/dist/artifacts/frame-editor/frame.d.ts +5 -0
  111. package/dist/artifacts/frame-editor/frame.d.ts.map +1 -0
  112. package/dist/artifacts/frame-editor/keys.d.ts +8 -0
  113. package/dist/artifacts/frame-editor/keys.d.ts.map +1 -0
  114. package/dist/artifacts/frame-editor/protocol.d.ts +186 -0
  115. package/dist/artifacts/frame-editor/protocol.d.ts.map +1 -0
  116. package/dist/artifacts/frame-editor/schema.d.ts +34 -0
  117. package/dist/artifacts/frame-editor/schema.d.ts.map +1 -0
  118. package/dist/artifacts/frame-editor/style.d.ts +2 -0
  119. package/dist/artifacts/frame-editor/style.d.ts.map +1 -0
  120. package/dist/artifacts/frame.d.ts +2 -2
  121. package/dist/artifacts/frame.d.ts.map +1 -1
  122. package/dist/artifacts/live/boards.d.ts +2 -0
  123. package/dist/artifacts/live/boards.d.ts.map +1 -1
  124. package/dist/artifacts/live/document.d.ts +32 -0
  125. package/dist/artifacts/live/document.d.ts.map +1 -0
  126. package/dist/artifacts/live/header.d.ts +4 -4
  127. package/dist/artifacts/live/header.d.ts.map +1 -1
  128. package/dist/artifacts/live/presence.d.ts.map +1 -1
  129. package/dist/artifacts/live/session.d.ts +2 -0
  130. package/dist/artifacts/live/session.d.ts.map +1 -1
  131. package/dist/artifacts/live/view.d.ts +4 -3
  132. package/dist/artifacts/live/view.d.ts.map +1 -1
  133. package/dist/artifacts/messages.d.ts +226 -2
  134. package/dist/artifacts/messages.d.ts.map +1 -1
  135. package/dist/artifacts/pdf.d.ts +8 -0
  136. package/dist/artifacts/pdf.d.ts.map +1 -0
  137. package/dist/artifacts/queries.d.ts +80 -0
  138. package/dist/artifacts/queries.d.ts.map +1 -1
  139. package/dist/artifacts/references/references.d.ts +3 -3
  140. package/dist/artifacts/references/references.d.ts.map +1 -1
  141. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -1
  142. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +4 -2
  143. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -1
  144. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -1
  145. package/dist/artifacts/renderers/canvas/comments.d.ts +2 -1
  146. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -1
  147. package/dist/artifacts/renderers/designed-document.d.ts +28 -0
  148. package/dist/artifacts/renderers/designed-document.d.ts.map +1 -0
  149. package/dist/artifacts/renderers/document-tree.d.ts +2 -0
  150. package/dist/artifacts/renderers/document-tree.d.ts.map +1 -1
  151. package/dist/artifacts/renderers/document.d.ts +9 -1
  152. package/dist/artifacts/renderers/document.d.ts.map +1 -1
  153. package/dist/artifacts/renderers/live-frame.d.ts +145 -0
  154. package/dist/artifacts/renderers/live-frame.d.ts.map +1 -0
  155. package/dist/artifacts/renderers/page-editor.d.ts +16 -0
  156. package/dist/artifacts/renderers/page-editor.d.ts.map +1 -0
  157. package/dist/artifacts/renderers/page.d.ts +10 -1
  158. package/dist/artifacts/renderers/page.d.ts.map +1 -1
  159. package/dist/artifacts/viewer.d.ts.map +1 -1
  160. package/dist/{chunk-pxd07kvx.js → chunk-096d52h2.js} +1 -1
  161. package/dist/{chunk-yrcm1pbg.js → chunk-94d7enwc.js} +491 -2128
  162. package/dist/chunk-94d7enwc.js.map +27 -0
  163. package/dist/{chunk-970s5nkn.js → chunk-ezntd3yy.js} +1 -1
  164. package/dist/{chunk-kymx9y5e.js → chunk-qjw5r2vk.js} +12729 -5044
  165. package/dist/chunk-qjw5r2vk.js.map +242 -0
  166. package/dist/chunk-y51c4tsz.js +11 -0
  167. package/dist/chunk-y51c4tsz.js.map +10 -0
  168. package/dist/createCustomApp.d.ts +8 -1
  169. package/dist/createCustomApp.d.ts.map +1 -1
  170. package/dist/index.d.ts +4 -2
  171. package/dist/index.d.ts.map +1 -1
  172. package/dist/index.js +13 -6
  173. package/dist/index.js.map +5 -5
  174. package/dist/pages/console/data/accounts.d.ts +94 -0
  175. package/dist/pages/console/data/accounts.d.ts.map +1 -0
  176. package/dist/pages/console/data/connectors.d.ts.map +1 -1
  177. package/dist/pages/console/data/live-updates.d.ts.map +1 -1
  178. package/dist/pages/console/data/messages.d.ts +52 -0
  179. package/dist/pages/console/data/messages.d.ts.map +1 -1
  180. package/dist/pages/console/data/shared.d.ts.map +1 -1
  181. package/dist/pages/console/data/sync-button.d.ts.map +1 -1
  182. package/dist/pages/console/data/syncs.d.ts.map +1 -1
  183. package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
  184. package/dist/pages/settings/usage/page.d.ts +4 -1
  185. package/dist/pages/settings/usage/page.d.ts.map +1 -1
  186. package/dist/pages/settings/usage/spend-model.d.ts +43 -19
  187. package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
  188. package/dist/pages.js +23044 -22570
  189. package/dist/pages.js.map +17 -16
  190. package/dist/server.d.ts +1 -1
  191. package/dist/server.d.ts.map +1 -1
  192. package/dist/server.js +40 -3
  193. package/dist/server.js.map +3 -3
  194. package/dist/shell/search-command.d.ts.map +1 -1
  195. package/package.json +22 -5
  196. package/src/agent/activity-label.ts +3 -0
  197. package/src/agent/agent-chat.tsx +58 -39
  198. package/src/agent/agent-execution-trace.tsx +2 -2
  199. package/src/agent/agent-panel.tsx +6 -4
  200. package/src/agent/agent.css +254 -0
  201. package/src/agent/artifact-panel.tsx +77 -22
  202. package/src/agent/components/agent-threads.tsx +42 -2
  203. package/src/agent/components/composer-place.tsx +2 -7
  204. package/src/agent/components/composer-settings.tsx +20 -10
  205. package/src/agent/components/composer.tsx +342 -104
  206. package/src/agent/components/computer-place.tsx +415 -70
  207. package/src/agent/components/context-meter.tsx +7 -3
  208. package/src/agent/components/conversation-panel.tsx +99 -54
  209. package/src/agent/components/message-parts.tsx +367 -59
  210. package/src/agent/components/message-view.tsx +428 -9
  211. package/src/agent/components/pending-messages.tsx +342 -0
  212. package/src/agent/components/sandbox-recovery.tsx +36 -17
  213. package/src/agent/components/threads-button.tsx +3 -2
  214. package/src/agent/components/transcript.tsx +198 -38
  215. package/src/agent/conversation.ts +219 -55
  216. package/src/agent/delegation/interpret.ts +31 -7
  217. package/src/agent/format.ts +52 -0
  218. package/src/agent/hooks/thread-queries.ts +75 -0
  219. package/src/agent/hooks/use-agent-conversation.ts +801 -211
  220. package/src/agent/hooks/use-thread-lists.ts +72 -7
  221. package/src/agent/hooks/use-thread-place.ts +239 -0
  222. package/src/agent/hooks/use-thread-stream.ts +10 -0
  223. package/src/agent/i18n/en.ts +150 -27
  224. package/src/agent/i18n/fr.ts +148 -31
  225. package/src/agent/inbox-handoff.ts +47 -0
  226. package/src/agent/live-run.ts +61 -2
  227. package/src/agent/model-selection.ts +3 -2
  228. package/src/agent/moves.ts +174 -0
  229. package/src/agent/react-router.tsx +2 -2
  230. package/src/agent/search/interpret.ts +367 -0
  231. package/src/agent/search/search-tool-view.tsx +235 -0
  232. package/src/agent/thread-reader-state.ts +75 -0
  233. package/src/agent/thread-state.ts +114 -0
  234. package/src/agent/tool-views/built-in.tsx +16 -0
  235. package/src/agent/tool-views/registry.tsx +28 -2
  236. package/src/agent/types.ts +13 -0
  237. package/src/agent/view-file/view-file-tool-view.tsx +33 -19
  238. package/src/artifacts/artifacts.css +398 -0
  239. package/src/artifacts/card-preview.tsx +6 -1
  240. package/src/artifacts/editor/block-handle.tsx +278 -0
  241. package/src/artifacts/editor/blocks.ts +216 -0
  242. package/src/artifacts/editor/callout-view.tsx +31 -0
  243. package/src/artifacts/editor/document-editor.tsx +484 -0
  244. package/src/artifacts/editor/figure-view.tsx +66 -0
  245. package/src/artifacts/editor/find-blocks.ts +19 -0
  246. package/src/artifacts/editor/markdown-document.tsx +72 -0
  247. package/src/artifacts/editor/messages.ts +4 -0
  248. package/src/artifacts/editor/schema.ts +159 -0
  249. package/src/artifacts/editor/selection-toolbar.tsx +364 -0
  250. package/src/artifacts/editor/slash-menu.tsx +251 -0
  251. package/src/artifacts/editor/upload.ts +40 -0
  252. package/src/artifacts/file-source.ts +11 -0
  253. package/src/artifacts/frame-editor/bundle.ts +8 -0
  254. package/src/artifacts/frame-editor/commands.ts +565 -0
  255. package/src/artifacts/frame-editor/entry.ts +6 -0
  256. package/src/artifacts/frame-editor/frame.ts +847 -0
  257. package/src/artifacts/frame-editor/generated/editor.txt +149 -0
  258. package/src/artifacts/frame-editor/generated.d.ts +5 -0
  259. package/src/artifacts/frame-editor/keys.ts +323 -0
  260. package/src/artifacts/frame-editor/protocol.ts +151 -0
  261. package/src/artifacts/frame-editor/schema.ts +293 -0
  262. package/src/artifacts/frame-editor/style.ts +58 -0
  263. package/src/artifacts/frame.tsx +11 -3
  264. package/src/artifacts/live/boards.ts +46 -3
  265. package/src/artifacts/live/document.ts +89 -0
  266. package/src/artifacts/live/header.tsx +9 -14
  267. package/src/artifacts/live/presence.ts +5 -1
  268. package/src/artifacts/live/session.ts +9 -2
  269. package/src/artifacts/live/view.ts +14 -8
  270. package/src/artifacts/messages.ts +138 -2
  271. package/src/artifacts/pdf.ts +50 -0
  272. package/src/artifacts/references/references.tsx +46 -11
  273. package/src/artifacts/renderers/canvas/board-editor.tsx +11 -144
  274. package/src/artifacts/renderers/canvas/comment-pins.tsx +5 -0
  275. package/src/artifacts/renderers/canvas/comments-panel.tsx +58 -1
  276. package/src/artifacts/renderers/canvas/comments.ts +8 -4
  277. package/src/artifacts/renderers/designed-document.tsx +277 -0
  278. package/src/artifacts/renderers/document-tree.ts +9 -0
  279. package/src/artifacts/renderers/document.tsx +13 -102
  280. package/src/artifacts/renderers/live-frame.ts +163 -0
  281. package/src/artifacts/renderers/page-editor.tsx +613 -0
  282. package/src/artifacts/renderers/page.tsx +21 -4
  283. package/src/artifacts/viewer.tsx +87 -41
  284. package/src/createCustomApp.ts +57 -3
  285. package/src/index.ts +10 -0
  286. package/src/pages/console/data/accounts.tsx +509 -0
  287. package/src/pages/console/data/connectors.tsx +7 -15
  288. package/src/pages/console/data/live-updates.ts +2 -0
  289. package/src/pages/console/data/messages.ts +79 -0
  290. package/src/pages/console/data/projections.tsx +4 -0
  291. package/src/pages/console/data/shared.tsx +1 -0
  292. package/src/pages/console/data/sync-button.tsx +56 -16
  293. package/src/pages/console/data/syncs.tsx +66 -41
  294. package/src/pages/console/ontology/lineage/trail.tsx +3 -0
  295. package/src/pages/section-ui.tsx +1 -1
  296. package/src/pages/settings/usage/breakdown.tsx +5 -2
  297. package/src/pages/settings/usage/filter-menu.tsx +1 -1
  298. package/src/pages/settings/usage/page.tsx +32 -13
  299. package/src/pages/settings/usage/spend-chart.tsx +2 -2
  300. package/src/pages/settings/usage/spend-model.ts +118 -50
  301. package/src/server.ts +1 -0
  302. package/src/shell/search-command.tsx +2 -0
  303. package/dist/chunk-kymx9y5e.js.map +0 -211
  304. package/dist/chunk-yrcm1pbg.js.map +0 -34
  305. /package/dist/{chunk-pxd07kvx.js.map → chunk-096d52h2.js.map} +0 -0
  306. /package/dist/{chunk-970s5nkn.js.map → chunk-ezntd3yy.js.map} +0 -0
@@ -1,7 +1,20 @@
1
- import { listAgentApprovalsOptions, listAgentThreadsInfiniteOptions } from "@sixb/client/hooks"
2
- import { useInfiniteQuery, useQuery } from "@tanstack/react-query"
1
+ import {
2
+ getAgentThreadQueryKey,
3
+ listAgentApprovalsOptions,
4
+ listAgentThreadsInfiniteOptions,
5
+ listAgentThreadsQueryKey,
6
+ markAgentThreadReadMutation,
7
+ } from "@sixb/client/hooks"
8
+ import {
9
+ type InfiniteData,
10
+ useInfiniteQuery,
11
+ useMutation,
12
+ useQuery,
13
+ useQueryClient,
14
+ } from "@tanstack/react-query"
3
15
  import { useMemo } from "react"
4
16
  import { THREAD_PAGE_SIZE } from "../thread-navigation"
17
+ import type { AgentThread, AgentThreadRead } from "../types"
5
18
 
6
19
  const THREAD_LIST_QUERY = {
7
20
  limit: String(THREAD_PAGE_SIZE),
@@ -18,15 +31,22 @@ const SHARED_THREAD_LIST_QUERY = {
18
31
  /** The calls waiting for the reader across threads, for the thread list. */
19
32
  const PENDING_APPROVALS_QUERY = { status: "pending" as const, limit: "200" }
20
33
 
34
+ type ThreadListPage = { readonly threads: AgentThread[] }
35
+
36
+ /** A thread list as the cache holds it: the paged list this hook reads, or a single page. */
37
+ type ThreadListData = InfiniteData<ThreadListPage> | ThreadListPage
38
+
21
39
  /**
22
40
  * The reader's threads, the ones shared with them, and those where a call waits for them: what a
23
41
  * thread's header counts and the threads page lists. One read for both, so opening the page from a
24
42
  * thread shows what the thread already had.
25
43
  */
26
- export function useAgentThreadLists(options: {
27
- /** How often to read again while nothing announces changes; off by default. */
28
- readonly refetchInterval?: number | false
29
- }) {
44
+ export function useAgentThreadLists(
45
+ options: {
46
+ /** How often to read again while nothing announces changes; off by default. */
47
+ readonly refetchInterval?: number | false
48
+ } = {}
49
+ ) {
30
50
  const refetchInterval = options.refetchInterval ?? false
31
51
  const threadsQuery = useInfiniteQuery({
32
52
  ...listAgentThreadsInfiniteOptions({ query: THREAD_LIST_QUERY }),
@@ -47,6 +67,8 @@ export function useAgentThreadLists(options: {
47
67
  refetchInterval,
48
68
  retry: false,
49
69
  })
70
+ const queryClient = useQueryClient()
71
+ const markRead = useMutation(markAgentThreadReadMutation())
50
72
 
51
73
  const threads = useMemo(
52
74
  () => threadsQuery.data?.pages.flatMap((page) => page.threads) ?? [],
@@ -65,7 +87,50 @@ export function useAgentThreadLists(options: {
65
87
  [pendingApprovalsQuery.data]
66
88
  )
67
89
 
68
- return { threadsQuery, sharedThreadsQuery, threads, sharedThreads, waitingThreadIds }
90
+ /**
91
+ * Record the reader's place in a thread, or its newest when no message is given, which is what
92
+ * Done sends. The answer is the state it produced, so the caches take it without a refetch.
93
+ */
94
+ const markThreadRead = async (
95
+ threadId: string,
96
+ input: { readonly throughMessageId?: string } = {}
97
+ ): Promise<AgentThreadRead> => {
98
+ const { read } = await markRead.mutateAsync({
99
+ path: { threadId },
100
+ body:
101
+ input.throughMessageId === undefined ? {} : { throughMessageId: input.throughMessageId },
102
+ })
103
+
104
+ const withRead = (thread: AgentThread) =>
105
+ thread.id === read.threadId ? { ...thread, read } : thread
106
+
107
+ // The key matches every thread list, paged or not: a custom app may hold either.
108
+ queryClient.setQueriesData<ThreadListData>({ queryKey: listAgentThreadsQueryKey() }, (data) => {
109
+ if (!data) return data
110
+ if ("pages" in data) {
111
+ return {
112
+ ...data,
113
+ pages: data.pages.map((page) => ({ ...page, threads: page.threads.map(withRead) })),
114
+ }
115
+ }
116
+ return { ...data, threads: data.threads.map(withRead) }
117
+ })
118
+ queryClient.setQueryData<AgentThread>(
119
+ getAgentThreadQueryKey({ path: { threadId } }),
120
+ (thread) => (thread ? { ...thread, read } : thread)
121
+ )
122
+
123
+ return read
124
+ }
125
+
126
+ return {
127
+ threadsQuery,
128
+ sharedThreadsQuery,
129
+ threads,
130
+ sharedThreads,
131
+ waitingThreadIds,
132
+ markThreadRead,
133
+ }
69
134
  }
70
135
 
71
136
  /** The page after those read so far, while the server says there are more. */
@@ -0,0 +1,239 @@
1
+ import { isSixbApiError } from "@sixb/client"
2
+ import {
3
+ type DesktopComputer,
4
+ type DesktopComputerAccess,
5
+ getAgentThreadQueryKey,
6
+ listAgentComputersOptions,
7
+ listAgentThreadRunsQueryKey,
8
+ listAgentThreadsQueryKey,
9
+ moveAgentThreadToCloudMutation,
10
+ moveAgentThreadToComputerMutation,
11
+ useDesktop,
12
+ } from "@sixb/client/hooks"
13
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
14
+ import { useCallback, useState } from "react"
15
+ import type { ThreadComputer } from "../components/computer-place"
16
+ import type { ThreadAccess } from "../sharing"
17
+ import type { AgentThread } from "../types"
18
+ import type { PlaceComputer } from "./use-new-thread-place"
19
+
20
+ export type ThreadPlaceBusy = "running" | "approval" | null
21
+
22
+ export interface ThreadPlace {
23
+ readonly open: boolean
24
+ readonly setOpen: (open: boolean) => void
25
+ readonly onComputer: boolean
26
+ readonly currentComputer: ThreadComputer | null
27
+ readonly computers: readonly PlaceComputer[]
28
+ readonly loading: boolean
29
+ readonly pending: boolean
30
+ /** Where the move on its way goes: the cloud, or a folder on one of its owner's computers. */
31
+ readonly movingTo: "cloud" | { readonly computerId: string; readonly folder: string } | null
32
+ /** What keeps it where it runs: a reply in progress, or one waiting for approval. */
33
+ readonly busy: ThreadPlaceBusy
34
+ readonly error: "busy" | "failed" | null
35
+ /** The last move to the cloud's error alone, for the notice that offers it. */
36
+ readonly cloudError: "busy" | "failed" | null
37
+ /** To the cloud: at once, or after asking when a message waits, as it would then run there. */
38
+ readonly moveToCloud: () => void
39
+ /** The question asked before a waiting message goes to the cloud. */
40
+ readonly confirmCloud: {
41
+ readonly open: boolean
42
+ readonly setOpen: (open: boolean) => void
43
+ readonly accept: () => void
44
+ }
45
+ readonly moveToFolder: (computer: PlaceComputer, folder: string) => void
46
+ readonly pickFolder?: () => Promise<void>
47
+ readonly forgetFolder?: (folder: string) => void
48
+ }
49
+
50
+ /**
51
+ * Where an existing conversation runs, for its owner: switch between the cloud and any connected
52
+ * computer or folder as needed. Null where there is nothing to choose, as for a new conversation:
53
+ * in a browser, a cloud conversation that never moved, while none of its owner's computers is
54
+ * connected.
55
+ */
56
+ export function useThreadPlace(input: {
57
+ readonly thread: AgentThread | null
58
+ readonly access: ThreadAccess
59
+ readonly busy: ThreadPlaceBusy
60
+ /** A message waits for the computer: moving to the cloud runs it there. */
61
+ readonly waiting: boolean
62
+ }): ThreadPlace | null {
63
+ const { thread, access, busy, waiting } = input
64
+ const active = thread !== null && access === "owner"
65
+ const threadId = thread?.id ?? null
66
+ const queryClient = useQueryClient()
67
+ const desktopAccess: DesktopComputerAccess | null = useDesktop()?.computer ?? null
68
+
69
+ // Which conversation the menu is open on: navigating away closes it, without an effect.
70
+ const [openFor, setOpenFor] = useState<string | null>(null)
71
+ // Which conversation the question before the cloud is asked on.
72
+ const [confirmingFor, setConfirmingFor] = useState<string | null>(null)
73
+ const [desktopComputer, setDesktopComputer] = useState<DesktopComputer | null>(null)
74
+ const [desktopFolders, setDesktopFolders] = useState<readonly string[]>([])
75
+
76
+ const toComputer = useMutation(moveAgentThreadToComputerMutation())
77
+ const toCloud = useMutation(moveAgentThreadToCloudMutation())
78
+
79
+ const refreshDesktop = useCallback(() => {
80
+ if (!desktopAccess) return
81
+ void desktopAccess.about().then(setDesktopComputer, () => {})
82
+ void desktopAccess.folders().then(setDesktopFolders, () => {})
83
+ }, [desktopAccess])
84
+
85
+ const open = threadId !== null && openFor === threadId
86
+ // Opening it starts from no error, and reads Sixb Desktop's folders again.
87
+ const setOpen = (next: boolean) => {
88
+ if (next) {
89
+ toComputer.reset()
90
+ toCloud.reset()
91
+ refreshDesktop()
92
+ }
93
+ setOpenFor(next ? threadId : null)
94
+ }
95
+
96
+ // In a browser, a cloud conversation needs the list to know whether there's a choice at all: the
97
+ // one a new conversation's picker reads, which the activity feed keeps current. A computer's
98
+ // conversation always shows where it runs, and reads the list once its menu opens.
99
+ const browser = desktopAccess === null
100
+ const onComputer = thread?.runsOn === "computer"
101
+ const listed = useQuery({
102
+ ...listAgentComputersOptions(),
103
+ enabled: active && browser && (open || !onComputer),
104
+ })
105
+
106
+ if (!active || !thread) return null
107
+
108
+ const computers: readonly PlaceComputer[] = desktopAccess
109
+ ? desktopComputer
110
+ ? [{ id: desktopComputer.id, name: desktopComputer.name, folders: desktopFolders }]
111
+ : []
112
+ : (listed.data?.computers ?? [])
113
+
114
+ // Open, it stays until closed: a computer that goes away meanwhile leaves the cloud to choose.
115
+ // One that ran on a computer keeps it, so the way back stays where its owner last used it.
116
+ const nothingToChoose =
117
+ browser && !onComputer && !open && computers.length === 0 && thread.movedAt === undefined
118
+ if (nothingToChoose) return null
119
+
120
+ const currentComputer = thread.computer ?? null
121
+
122
+ const computerPending = toComputer.isPending && toComputer.variables?.path.threadId === thread.id
123
+ const cloudPending = toCloud.isPending && toCloud.variables?.path.threadId === thread.id
124
+ const pending = computerPending || cloudPending
125
+ const movingTo = cloudPending
126
+ ? ("cloud" as const)
127
+ : computerPending && toComputer.variables
128
+ ? {
129
+ computerId: toComputer.variables.body.computer.id,
130
+ folder: toComputer.variables.body.computer.folder,
131
+ }
132
+ : null
133
+
134
+ const computerError =
135
+ toComputer.isError && toComputer.variables?.path.threadId === thread.id
136
+ ? toComputer.error
137
+ : null
138
+ const cloudError =
139
+ toCloud.isError && toCloud.variables?.path.threadId === thread.id ? toCloud.error : null
140
+ const error = moveError(computerError ?? cloudError)
141
+
142
+ const applyMoved = (moved: AgentThread) => {
143
+ queryClient.setQueryData(getAgentThreadQueryKey({ path: { threadId: moved.id } }), moved)
144
+ void queryClient.invalidateQueries({
145
+ queryKey: listAgentThreadRunsQueryKey({ path: { threadId: moved.id } }),
146
+ })
147
+ void queryClient.invalidateQueries({ queryKey: listAgentThreadsQueryKey() })
148
+ setOpenFor(null)
149
+ }
150
+
151
+ const runInCloud = () => {
152
+ if (pending || busy) return
153
+ toCloud.mutate({ path: { threadId: thread.id } }, { onSuccess: applyMoved })
154
+ }
155
+
156
+ const moveToCloud = () => {
157
+ if (!onComputer) {
158
+ setOpenFor(null)
159
+ return
160
+ }
161
+ if (pending || busy) return
162
+
163
+ // The marker says what moved. A waiting message runs apart from its folder's files: ask first.
164
+ if (waiting) {
165
+ setOpenFor(null)
166
+ setConfirmingFor(thread.id)
167
+ return
168
+ }
169
+ runInCloud()
170
+ }
171
+
172
+ const confirmCloud = {
173
+ open: confirmingFor === thread.id,
174
+ setOpen: (next: boolean) => setConfirmingFor(next ? thread.id : null),
175
+ accept: () => {
176
+ setConfirmingFor(null)
177
+ runInCloud()
178
+ },
179
+ }
180
+
181
+ const moveToFolder = (computer: PlaceComputer, folder: string) => {
182
+ if (!computer.id || !computer.name) return
183
+ if (onComputer && currentComputer?.id === computer.id && currentComputer.folder === folder) {
184
+ setOpenFor(null)
185
+ return
186
+ }
187
+ if (pending || busy) return
188
+ toComputer.mutate(
189
+ {
190
+ path: { threadId: thread.id },
191
+ body: { computer: { id: computer.id, name: computer.name, folder } },
192
+ },
193
+ { onSuccess: applyMoved }
194
+ )
195
+ }
196
+
197
+ const pickFolder = desktopAccess
198
+ ? async () => {
199
+ if (pending || busy) return
200
+ const folder = await desktopAccess.pickFolder()
201
+ if (!folder) return
202
+ const found = desktopComputer ?? (await desktopAccess.about().catch(() => null))
203
+ refreshDesktop()
204
+ if (!found) return
205
+ moveToFolder({ id: found.id, name: found.name, folders: desktopFolders }, folder)
206
+ }
207
+ : undefined
208
+
209
+ const forgetFolder = desktopAccess
210
+ ? (folder: string) => {
211
+ void desktopAccess.forgetFolder(folder).then(refreshDesktop, () => {})
212
+ }
213
+ : undefined
214
+
215
+ return {
216
+ open,
217
+ setOpen,
218
+ onComputer,
219
+ currentComputer,
220
+ computers,
221
+ loading: browser && open && listed.isPending,
222
+ pending,
223
+ movingTo,
224
+ busy,
225
+ error,
226
+ cloudError: moveError(cloudError),
227
+ moveToCloud,
228
+ confirmCloud,
229
+ moveToFolder,
230
+ ...(pickFolder ? { pickFolder } : {}),
231
+ ...(forgetFolder ? { forgetFolder } : {}),
232
+ }
233
+ }
234
+
235
+ /** Why a move failed: a turn it must wait for, or anything else. */
236
+ function moveError(error: unknown): "busy" | "failed" | null {
237
+ if (error === null) return null
238
+ return isSixbApiError(error) && error.code === "active_run_exists" ? "busy" : "failed"
239
+ }
@@ -3,6 +3,7 @@ import {
3
3
  getAgentRunQueryKey,
4
4
  getAgentThreadContextQueryKey,
5
5
  getAgentThreadQueryKey,
6
+ listAgentThreadInboxQueryKey,
6
7
  listAgentThreadMessagesQueryKey,
7
8
  listAgentThreadRunsQueryKey,
8
9
  listAgentThreadsQueryKey,
@@ -69,6 +70,15 @@ export function useThreadStream(options: UseThreadStreamOptions): UseThreadStrea
69
70
  })
70
71
  }, [live.finalizedMessageId, threadId, queryClient])
71
72
 
73
+ // A message the turn read is no longer the inbox's: the tray reads what still waits.
74
+ const reads = live.inboxReads.length
75
+ useEffect(() => {
76
+ if (reads === 0 || !threadId) return
77
+ void queryClient.invalidateQueries({
78
+ queryKey: listAgentThreadInboxQueryKey({ path: { threadId } }),
79
+ })
80
+ }, [reads, threadId, queryClient])
81
+
72
82
  // Refresh run/thread state once the run reaches a terminal status.
73
83
  const finishHandledRef = useRef<string | null>(null)
74
84
  useEffect(() => {
@@ -48,9 +48,12 @@ export const en = {
48
48
  threadsLoadFailed: "Could not load threads.",
49
49
  sharedThreadsLoadFailed: "Could not load the threads shared with you.",
50
50
  sendFailed: "Couldn't send your message. Please try again.",
51
+ editFailed: "Couldn't edit your message. Please try again.",
52
+ editBusy: "An answer is still in progress. Stop it, then save your edit.",
53
+ editBusyOther: "Someone else's answer is in progress. Save your edit when it finishes.",
51
54
  busy: "An answer is already in progress. Send yours when it finishes.",
52
55
  busyOther: "Someone else's message is being answered. Send yours when it finishes.",
53
- sandboxUnavailable: "This conversation's sandbox must be recovered before another answer.",
56
+ sandboxUnavailable: "Choose how the agent goes on before sending another message.",
54
57
  computerUnavailable:
55
58
  "This computer can't run the agent right now. Try again, or choose Cloud below.",
56
59
  retryFailed: "Couldn't retry this answer. Try again.",
@@ -80,6 +83,20 @@ export const en = {
80
83
  add: "Add files and more",
81
84
  mention: "Mention a record",
82
85
  commands: "Commands",
86
+ /** The messages waiting beside a running turn. */
87
+ steerPending: "Adds to this answer",
88
+ queuePending: "Sent once this answer ends",
89
+ sendNowPending: "Sends now",
90
+ waitingFile: "A file",
91
+ steer: "Add to this answer",
92
+ queue: "Send once this answer ends",
93
+ sendNow: "Stop this answer and send now",
94
+ withdraw: "Withdraw this message",
95
+ messageActions: "Change this message",
96
+ changeFailed: "Couldn't change this message. Try again.",
97
+ withdrawFailed: "Couldn't withdraw this message. Try again.",
98
+ notYourAnswer:
99
+ "Only the person who asked for this answer can change or stop it. Yours goes after it.",
83
100
  },
84
101
  /** Slash commands, typed as the whole message: `/opus`, `/ask`. */
85
102
  commands: {
@@ -247,6 +264,12 @@ export const en = {
247
264
  ago: (time: string) => `${time} ago`,
248
265
  },
249
266
  transcript: {
267
+ editMessage: "Edit message",
268
+ copyMessage: "Copy message",
269
+ copiedMessage: "Copied",
270
+ editInfo: "Editing this message restarts the conversation from here.",
271
+ cancelEdit: "Cancel",
272
+ saveEdit: "Save",
250
273
  condensed: "Condensed conversation",
251
274
  condensing: "Condensing earlier conversation…",
252
275
  condensingLabel: "Agent is condensing earlier conversation",
@@ -307,6 +330,7 @@ export const en = {
307
330
  messageAgentFailed: (key: string) => `Could not message ${key}`,
308
331
  reasoning: "Reasoning",
309
332
  steps: (steps: number) => count(steps, "step"),
333
+ latest: "Latest",
310
334
  searchFailedHint: "Web search failed. See work details.",
311
335
  noSources: "No sources found.",
312
336
  running: "running",
@@ -541,6 +565,63 @@ export const en = {
541
565
  lines: (start: number, end: number) => `lines ${start}–${end}`,
542
566
  moreAvailable: (range: string) => `${range} · more available`,
543
567
  },
568
+ /**
569
+ * The glob and grep tools: files found by name, and text searched for in them. A search reads
570
+ * as the shell's ("Searched files"), however it ran.
571
+ */
572
+ search: {
573
+ found: (files: number) => (files === 0 ? "No files found" : `Found ${count(files, "file")}`),
574
+ /** More files match than the ones listed. */
575
+ foundMore: (files: number) => `Found ${number(files)}+ files`,
576
+ looked: "Looked for files",
577
+ looking: "Looking for files",
578
+ lookFailed: "Couldn't look for files",
579
+ /** `term` is the pattern, when it reads as words. */
580
+ searchedFor: (term: string) => `Searched for “${term}”`,
581
+ searched: "Searched files",
582
+ searching: "Searching files",
583
+ searchFailed: (term?: string) =>
584
+ term ? `Couldn't search for “${term}”` : "Couldn't search files",
585
+ /** A search in the user's memory, or in the project's when `project`. */
586
+ memory: {
587
+ title: (project: boolean): string =>
588
+ project ? "Searched project memory" : "Searched memory",
589
+ running: (project: boolean): string =>
590
+ project ? "Searching project memory" : "Searching memory",
591
+ failed: (project: boolean): string =>
592
+ project ? "Couldn't search project memory" : "Couldn't search memory",
593
+ },
594
+ /** A search in the Agent's guides, or in one of them when it has a `name`. */
595
+ guide: {
596
+ title: (name: string) => (name ? `Searched the ${name} guide` : "Searched the guides"),
597
+ running: (name: string) => (name ? `Searching the ${name} guide` : "Searching the guides"),
598
+ failed: (name: string) =>
599
+ name ? `Couldn't search the ${name} guide` : "Couldn't search the guides",
600
+ },
601
+ ontology: {
602
+ title: "Searched the ontology",
603
+ running: "Searching the ontology",
604
+ failed: "Couldn't search the ontology",
605
+ },
606
+ term: (term: string) => `“${term}”`,
607
+ files: (files: number) => (files === 0 ? "no files" : count(files, "file")),
608
+ moreFiles: (files: number) => `${number(files)}+ files`,
609
+ matches: (matches: number, files: number) =>
610
+ `${count(matches, "match", "matches")} in ${count(files, "file")}`,
611
+ moreMatches: (matches: number) => `${number(matches)}+ matches`,
612
+ noMatches: "no matches",
613
+ /** Under a file's lines, the ones it holds past them. */
614
+ moreInFile: (matches: number) => `${count(matches, "more match", "more matches")} in this file`,
615
+ noFiles: "No file matches this search.",
616
+ noLines: "No line matches this search.",
617
+ truncatedFiles: (files: number) => `Only the first ${number(files)} files are listed.`,
618
+ truncatedMatches: (lines: number) =>
619
+ `Only the first ${number(lines)} matching lines are shown. More files match.`,
620
+ incomplete: "The search stopped before it looked everywhere, so some results may be missing.",
621
+ error: "The search could not run.",
622
+ /** Before the folder a search looked in. */
623
+ in: (path: string) => `in ${path}`,
624
+ },
544
625
  /** Headlines of the agent's shell commands: past tense when done, progressive while running. */
545
626
  bash: {
546
627
  preparing: "Preparing a command",
@@ -838,18 +919,22 @@ export const en = {
838
919
  saved: (project: boolean): string => (project ? "Saved to project memory" : "Saved to memory"),
839
920
  },
840
921
  sandbox: {
841
- title: "Sandbox recovery required",
842
- description:
843
- "Recovery failed or the previous operation could not be confirmed. Automatic resume is blocked to protect your work.",
844
- recreateFailed: "Could not recreate the sandbox. Reload and try again.",
845
- recreating: "Recreating…",
846
- startFresh: "Start with a fresh sandbox",
847
- confirmTitle: "Start with a fresh sandbox?",
922
+ title: "The agent was interrupted",
923
+ description: "Its work stopped before it could be saved.",
924
+ recreateFailed: "Couldn't start over. Reload the page and try again.",
925
+ recreating: "Starting over…",
926
+ startFresh: "Start over without the files",
927
+ confirmTitle: "Start over without the files?",
848
928
  confirmDescription:
849
- "The next run will initialize a new environment. Local files from the previous workspace will not be copied. Conversation history and published attachments stay available. The previous sandbox is not deleted and remains subject to provider retention.",
929
+ "The agent will go on without the files it made in this conversation. Your messages and published attachments stay.",
850
930
  cancel: "Cancel",
851
- create: "Create fresh sandbox",
852
- ownerOnly: (owner: string) => `Only ${owner} can start this conversation with a fresh sandbox.`,
931
+ create: "Start over",
932
+ ownerOnly: (owner: string) => `Only ${owner} can choose how this conversation goes on.`,
933
+ resume: "Pick up where it left off",
934
+ resuming: "Picking up…",
935
+ resumeHint: "Its files are kept, but its last change may be unfinished.",
936
+ resumeFailed:
937
+ "Couldn't pick up where it left off. Reload the page and try again, or start over without the files.",
853
938
  },
854
939
  /** A command the agent runs in the background, as its card and its calls read. */
855
940
  background: {
@@ -883,36 +968,74 @@ export const en = {
883
968
  },
884
969
  /** A conversation that runs on its owner's computer, as its owner sees it. */
885
970
  computer: {
886
- online: "Connected",
887
- offline: "Not connected",
888
- offlineNotice: (computer: string, folder: string) =>
889
- `${computer} is offline. Your message waits until ${folder} is connected there.`,
971
+ online: "available",
972
+ offline: "not available",
973
+ /** Its folder isn't open on its computer: nothing waits for it. */
974
+ folderUnavailable: (folder: string, computer: string) =>
975
+ `${folder} isn't available on ${computer} right now. Open Sixb there to continue, or continue in the cloud.`,
976
+ /** Its folder isn't open on its computer, and a message waits for it. */
977
+ messageWaiting: (folder: string, computer: string) =>
978
+ `Your message is waiting for ${folder} on ${computer}. Open Sixb there, or continue in the cloud.`,
890
979
  noFolder:
891
- "This conversation has no folder yet. Open sixb in its folder and press ctrl+f, or continue in the cloud.",
980
+ "This conversation has no folder yet. Choose one from the menu at the top, or continue in the cloud.",
892
981
  /** In a desktop app, about a conversation of this computer's. */
893
982
  offlineHere: (folder: string) =>
894
- `Not running here yet. Your message waits until this computer is connected in ${folder}.`,
895
- runHere: "Run on this computer",
983
+ `Messages from the app don't run in ${folder} on this computer yet.`,
984
+ runHere: "Run them here",
896
985
  waitingFor: (computer: string) => `Waiting for ${computer}`,
897
986
  /** Where a new conversation runs, in a desktop app. */
898
987
  placeTitle: "Where this conversation runs",
899
- placeChip: (place: string) => `Runs in ${place}. Change where it runs`,
988
+ placeChip: (place: string, status: string | null) =>
989
+ `Runs in ${place}${status ? `, ${status}` : ""}. Change where it runs`,
990
+ noFolderChip: "No folder yet. Choose where this conversation runs",
900
991
  cloud: "Cloud",
992
+ cloudDescription: "Runs even when your computers are off",
993
+ thisComputer: "This computer",
994
+ checkingComputers: "Checking connected computers…",
995
+ noComputers:
996
+ "None of your computers is connected. Open Sixb on one to move this conversation there.",
997
+ offlineLabel: "Offline",
998
+ offlineMenuHint: "Not available right now. Messages wait for it, or choose another place.",
901
999
  chooseFolder: "Choose a folder…",
902
1000
  chooseFolderShort: "Choose a folder",
903
1001
  forgetFolder: (folder: string) => `Stop running messages in ${folder}`,
904
1002
  continueInCloud: "Continue in the cloud",
905
1003
  moving: "Moving…",
906
1004
  moveFailed: "Could not move it to the cloud. Try again.",
907
- moveBusy: "A turn is running or waiting for your approval. Stop or answer it first.",
908
- confirmTitle: "Continue in the cloud?",
909
- confirmDescription:
910
- "This conversation will run in the cloud from now on, including any waiting message. Its folder's files stay on your computer, and it can't move back.",
1005
+ moveSwitchFailed: "Could not switch where this conversation runs. Try again.",
1006
+ moveBusy:
1007
+ "A reply is in progress or waiting for approval. Stop it or answer the request, then try again.",
1008
+ moveWhileRunning: "A reply is in progress. Stop it or let it finish to move this conversation.",
1009
+ moveWhileApproval:
1010
+ "A request is waiting for approval. You can move this conversation once it's decided.",
1011
+ confirmTitle: "Run your waiting message in the cloud?",
1012
+ confirmDescription: (folder: string | null) =>
1013
+ folder
1014
+ ? `In the cloud, the agent won't see the files in ${folder}. You can move the conversation back once ${folder} is available again.`
1015
+ : "In the cloud, the agent won't see the computer's files. You can move the conversation back once it's available again.",
1016
+ confirmAction: "Run in the cloud",
911
1017
  cancel: "Cancel",
912
- movedToCloud: "Moved to the cloud. Files from before stayed on the computer.",
913
- movedToFolder: (folder: string) =>
914
- `Moved to ${folder}. Files from before stayed where they were.`,
915
- movedElsewhere: "Moved to another folder. Files from before stayed where they were.",
1018
+ /** A folder on a computer, in running text. */
1019
+ placeOn: (folder: string, computer: string) => `${folder} on ${computer}`,
1020
+ cloudPlace: "the cloud",
1021
+ movedToCloud: (from: string | null) =>
1022
+ from
1023
+ ? `Moved to the cloud. The files in ${from} stay behind.`
1024
+ : "Moved to the cloud. The computer's files stay behind.",
1025
+ movedToFolder: (place: string) => `Moved to ${place}. The cloud's files stay behind.`,
1026
+ /** For someone the conversation is shared with, who isn't shown its folders. */
1027
+ movedToComputer: (owner: string | null) =>
1028
+ `Moved to ${owner ? `${owner}'s computer` : "the computer"}. The cloud's files stay behind.`,
1029
+ movedBetweenFolders: (folder: string, from: string) =>
1030
+ `Moved from ${from} to ${folder}. The files in ${from} stay behind.`,
1031
+ movedElsewhere: (place: string | null) =>
1032
+ `Moved to ${place ?? "another folder"}. Earlier files stay where they were.`,
1033
+ /** A fork's first turn, in a workspace of its own. */
1034
+ continuedIn: (place: string) =>
1035
+ `Continued in ${place}. The original conversation's files stay with it.`,
1036
+ /** A fork's first turn on a computer whose folder the reader isn't shown. */
1037
+ continuedOnComputer: (owner: string | null) =>
1038
+ `Continued on ${owner ? `${owner}'s computer` : "the computer"}. The original conversation's files stay with it.`,
916
1039
  },
917
1040
  /** A conversation its owner shares with other users of the project. */
918
1041
  sharing: {