@celljs/ta-web 4.9.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/README.en.md +4 -3
  2. package/README.md +4 -3
  3. package/esm/browser/assistant/assistant-chat-list.js +8 -2
  4. package/esm/browser/assistant/assistant-extension.d.ts +8 -1
  5. package/esm/browser/assistant/assistant-extension.js +33 -5
  6. package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
  7. package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
  8. package/esm/browser/assistant/assistant-task-source.js +2 -0
  9. package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
  10. package/esm/browser/assistant/assistant-task-util.js +13 -3
  11. package/esm/browser/assistant/assistant-tasks.js +3 -2
  12. package/esm/browser/assistant/assistant-view.js +81 -56
  13. package/esm/browser/assistant/assistant.d.ts +30 -1
  14. package/esm/browser/assistant/assistant.js +89 -6
  15. package/esm/browser/assistant/task-views.d.ts +40 -6
  16. package/esm/browser/assistant/task-views.js +73 -21
  17. package/esm/browser/avatar/dino-avatar.d.ts +3 -4
  18. package/esm/browser/avatar/dino-avatar.js +4 -178
  19. package/esm/browser/avatar/dino-face.d.ts +19 -0
  20. package/esm/browser/avatar/dino-face.js +142 -0
  21. package/esm/browser/avatar/dino-geometry.d.ts +11 -0
  22. package/esm/browser/avatar/dino-geometry.js +38 -0
  23. package/esm/browser/avatar/dino-kinds.d.ts +15 -0
  24. package/esm/browser/avatar/dino-kinds.js +544 -0
  25. package/esm/browser/avatar/dino-motion.js +1 -1
  26. package/esm/browser/avatar/dino-shape.d.ts +80 -0
  27. package/esm/browser/avatar/dino-shape.js +113 -0
  28. package/esm/browser/avatar/dino-species.d.ts +1 -61
  29. package/esm/browser/avatar/dino-species.js +2 -653
  30. package/esm/browser/chat/chat-packages.d.ts +39 -0
  31. package/esm/browser/chat/chat-packages.js +70 -0
  32. package/esm/browser/chat/chat-protocol.d.ts +23 -1
  33. package/esm/browser/chat/chat-stores.d.ts +59 -0
  34. package/esm/browser/chat/chat-stores.js +121 -0
  35. package/esm/browser/chat/chat-util.d.ts +17 -0
  36. package/esm/browser/chat/chat-util.js +61 -0
  37. package/esm/browser/chat/chat-view.js +33 -12
  38. package/esm/browser/chat/chat.d.ts +31 -39
  39. package/esm/browser/chat/chat.js +226 -175
  40. package/esm/browser/components/access-view.js +1 -1
  41. package/esm/browser/components/account-menu.js +1 -1
  42. package/esm/browser/components/app-nav.d.ts +6 -3
  43. package/esm/browser/components/app-nav.js +19 -10
  44. package/esm/browser/components/app-shell-hooks.d.ts +47 -0
  45. package/esm/browser/components/app-shell-hooks.js +169 -0
  46. package/esm/browser/components/app-view.js +81 -172
  47. package/esm/browser/components/auth-view.js +1 -1
  48. package/esm/browser/components/chat-list.d.ts +20 -2
  49. package/esm/browser/components/chat-list.js +138 -22
  50. package/esm/browser/components/composer-box.d.ts +5 -5
  51. package/esm/browser/components/composer-box.js +111 -4
  52. package/esm/browser/components/composer.d.ts +7 -0
  53. package/esm/browser/components/composer.js +22 -14
  54. package/esm/browser/components/connection-bar.js +50 -17
  55. package/esm/browser/components/context-menu.d.ts +30 -4
  56. package/esm/browser/components/context-menu.js +199 -37
  57. package/esm/browser/components/conversation-scroll.d.ts +129 -6
  58. package/esm/browser/components/conversation-scroll.js +429 -109
  59. package/esm/browser/components/dino.js +1 -1
  60. package/esm/browser/components/earlier-messages.d.ts +2 -1
  61. package/esm/browser/components/earlier-messages.js +2 -17
  62. package/esm/browser/components/editor-area.d.ts +3 -1
  63. package/esm/browser/components/editor-area.js +6 -5
  64. package/esm/browser/components/empty-pictures.d.ts +0 -2
  65. package/esm/browser/components/empty-pictures.js +0 -16
  66. package/esm/browser/components/folder-picker.d.ts +5 -2
  67. package/esm/browser/components/folder-picker.js +30 -9
  68. package/esm/browser/components/held-talk.d.ts +28 -0
  69. package/esm/browser/components/held-talk.js +76 -0
  70. package/esm/browser/components/host-view.d.ts +1 -1
  71. package/esm/browser/components/host-view.js +1 -1
  72. package/esm/browser/components/icon.d.ts +2 -2
  73. package/esm/browser/components/icon.js +5 -6
  74. package/esm/browser/components/image-viewer.d.ts +124 -0
  75. package/esm/browser/components/image-viewer.js +397 -0
  76. package/esm/browser/components/lightbox.d.ts +11 -0
  77. package/esm/browser/components/lightbox.js +24 -0
  78. package/esm/browser/components/markdown.d.ts +6 -2
  79. package/esm/browser/components/markdown.js +24 -10
  80. package/esm/browser/components/media.js +1 -10
  81. package/esm/browser/components/message-footer.d.ts +16 -2
  82. package/esm/browser/components/message-footer.js +29 -12
  83. package/esm/browser/components/message-list.d.ts +24 -3
  84. package/esm/browser/components/message-list.js +149 -20
  85. package/esm/browser/components/message-menu.d.ts +3 -1
  86. package/esm/browser/components/message-menu.js +18 -3
  87. package/esm/browser/components/nav-places.d.ts +16 -1
  88. package/esm/browser/components/nav-places.js +12 -3
  89. package/esm/browser/components/phone-shell.d.ts +4 -1
  90. package/esm/browser/components/phone-shell.js +3 -1
  91. package/esm/browser/components/run-status.js +3 -3
  92. package/esm/browser/components/select-bar.d.ts +9 -0
  93. package/esm/browser/components/select-bar.js +24 -0
  94. package/esm/browser/components/session-settings.d.ts +6 -0
  95. package/esm/browser/components/session-settings.js +14 -1
  96. package/esm/browser/components/session-view.js +8 -4
  97. package/esm/browser/components/settings-choices.d.ts +35 -0
  98. package/esm/browser/components/settings-choices.js +117 -0
  99. package/esm/browser/components/settings-parts.d.ts +21 -0
  100. package/esm/browser/components/settings-parts.js +323 -0
  101. package/esm/browser/components/settings-view.d.ts +0 -6
  102. package/esm/browser/components/settings-view.js +4 -406
  103. package/esm/browser/components/swipe-row.d.ts +2 -2
  104. package/esm/browser/components/swipe-row.js +7 -3
  105. package/esm/browser/components/tool-view.js +14 -12
  106. package/esm/browser/components/voice-button.d.ts +1 -1
  107. package/esm/browser/components/voice-button.js +1 -1
  108. package/esm/browser/components/voice-talk.d.ts +43 -0
  109. package/esm/browser/components/voice-talk.js +222 -0
  110. package/esm/browser/components/workbench-view.js +1 -1
  111. package/esm/browser/device/device.d.ts +3 -0
  112. package/esm/browser/device/device.js +11 -1
  113. package/esm/browser/device/hold.d.ts +42 -0
  114. package/esm/browser/device/hold.js +136 -0
  115. package/esm/browser/device/launch-screen.d.ts +1 -1
  116. package/esm/browser/device/launch-screen.js +1 -1
  117. package/esm/browser/device/long-press.d.ts +2 -0
  118. package/esm/browser/device/long-press.js +16 -1
  119. package/esm/browser/device/pull-down.d.ts +4 -2
  120. package/esm/browser/device/pull-down.js +64 -76
  121. package/esm/browser/device/row-swipe.d.ts +35 -10
  122. package/esm/browser/device/row-swipe.js +149 -71
  123. package/esm/browser/device/shake-undo.d.ts +16 -0
  124. package/esm/browser/device/shake-undo.js +59 -0
  125. package/esm/browser/device/sheet-swipe.d.ts +118 -18
  126. package/esm/browser/device/sheet-swipe.js +406 -107
  127. package/esm/browser/extension/icons.js +2 -1
  128. package/esm/browser/extension/web-extension-api.d.ts +135 -2
  129. package/esm/browser/extension/web-extension-code.d.ts +6 -0
  130. package/esm/browser/extension/web-extension-code.js +24 -0
  131. package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
  132. package/esm/browser/extension/web-extension-protocol.js +8 -0
  133. package/esm/browser/extension/web-extensions.d.ts +14 -1
  134. package/esm/browser/extension/web-extensions.js +128 -24
  135. package/esm/browser/extension/web-tasks.d.ts +9 -1
  136. package/esm/browser/extension/web-tasks.js +24 -0
  137. package/esm/browser/files/files-protocol.d.ts +25 -0
  138. package/esm/browser/files/files-protocol.js +2 -0
  139. package/esm/browser/files/files.d.ts +35 -0
  140. package/esm/browser/files/files.js +119 -0
  141. package/esm/browser/hooks.d.ts +3 -1
  142. package/esm/browser/hooks.js +8 -0
  143. package/esm/browser/i18n/locales.d.ts +29 -2
  144. package/esm/browser/i18n/messages.d.ts +28 -1
  145. package/esm/browser/i18n/messages.js +58 -4
  146. package/esm/browser/index.d.ts +6 -0
  147. package/esm/browser/index.js +6 -0
  148. package/esm/browser/notices/notices-protocol.d.ts +9 -1
  149. package/esm/browser/notices/notices.d.ts +2 -0
  150. package/esm/browser/notices/notices.js +20 -10
  151. package/esm/browser/offline/device-values.d.ts +55 -0
  152. package/esm/browser/offline/device-values.js +142 -0
  153. package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
  154. package/esm/browser/offline/kept-chats-protocol.js +2 -0
  155. package/esm/browser/offline/kept-chats.d.ts +47 -0
  156. package/esm/browser/offline/kept-chats.js +146 -0
  157. package/esm/browser/offline/offline-reads.d.ts +44 -0
  158. package/esm/browser/offline/offline-reads.js +107 -0
  159. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  160. package/esm/browser/settings/settings-protocol.js +2 -0
  161. package/esm/browser/style/conversation.d.ts +1 -1
  162. package/esm/browser/style/conversation.js +57 -17
  163. package/esm/browser/style/device.js +43 -4
  164. package/esm/browser/style/layout.d.ts +1 -1
  165. package/esm/browser/style/layout.js +67 -15
  166. package/esm/browser/style/pages.d.ts +1 -1
  167. package/esm/browser/style/pages.js +2 -1
  168. package/esm/browser/style/shell.d.ts +1 -1
  169. package/esm/browser/style/shell.js +47 -3
  170. package/esm/browser/style/tasks.d.ts +1 -1
  171. package/esm/browser/style/tasks.js +2 -0
  172. package/esm/browser/util/frame.d.ts +5 -4
  173. package/esm/browser/util/frame.js +5 -4
  174. package/esm/browser/util/markdown.d.ts +18 -1
  175. package/esm/browser/util/markdown.js +119 -5
  176. package/esm/browser/util/process.d.ts +21 -0
  177. package/esm/browser/util/process.js +45 -1
  178. package/esm/browser/util/voice.d.ts +5 -2
  179. package/esm/browser/util/voice.js +6 -3
  180. package/esm/browser/util/zoom.d.ts +46 -0
  181. package/esm/browser/util/zoom.js +96 -0
  182. package/esm/browser/workbench-calls.d.ts +59 -0
  183. package/esm/browser/workbench-calls.js +141 -0
  184. package/esm/browser/workbench-protocol.d.ts +5 -1
  185. package/esm/browser/workbench-util.d.ts +68 -0
  186. package/esm/browser/workbench-util.js +145 -0
  187. package/esm/browser/workbench.d.ts +15 -42
  188. package/esm/browser/workbench.js +53 -167
  189. package/lib/browser/assistant/assistant-chat-list.js +8 -2
  190. package/lib/browser/assistant/assistant-extension.d.ts +8 -1
  191. package/lib/browser/assistant/assistant-extension.js +33 -5
  192. package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
  193. package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
  194. package/lib/browser/assistant/assistant-task-source.js +2 -0
  195. package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
  196. package/lib/browser/assistant/assistant-task-util.js +13 -3
  197. package/lib/browser/assistant/assistant-tasks.js +2 -1
  198. package/lib/browser/assistant/assistant-view.js +78 -53
  199. package/lib/browser/assistant/assistant.d.ts +30 -1
  200. package/lib/browser/assistant/assistant.js +89 -6
  201. package/lib/browser/assistant/task-views.d.ts +40 -6
  202. package/lib/browser/assistant/task-views.js +74 -21
  203. package/lib/browser/avatar/dino-avatar.d.ts +3 -4
  204. package/lib/browser/avatar/dino-avatar.js +27 -202
  205. package/lib/browser/avatar/dino-face.d.ts +20 -0
  206. package/lib/browser/avatar/dino-face.js +148 -0
  207. package/lib/browser/avatar/dino-geometry.d.ts +12 -0
  208. package/lib/browser/avatar/dino-geometry.js +47 -0
  209. package/lib/browser/avatar/dino-kinds.d.ts +16 -0
  210. package/lib/browser/avatar/dino-kinds.js +547 -0
  211. package/lib/browser/avatar/dino-motion.js +2 -2
  212. package/lib/browser/avatar/dino-shape.d.ts +81 -0
  213. package/lib/browser/avatar/dino-shape.js +126 -0
  214. package/lib/browser/avatar/dino-species.d.ts +1 -61
  215. package/lib/browser/avatar/dino-species.js +34 -687
  216. package/lib/browser/chat/chat-packages.d.ts +40 -0
  217. package/lib/browser/chat/chat-packages.js +74 -0
  218. package/lib/browser/chat/chat-protocol.d.ts +23 -1
  219. package/lib/browser/chat/chat-stores.d.ts +60 -0
  220. package/lib/browser/chat/chat-stores.js +125 -0
  221. package/lib/browser/chat/chat-util.d.ts +18 -0
  222. package/lib/browser/chat/chat-util.js +64 -0
  223. package/lib/browser/chat/chat-view.js +33 -12
  224. package/lib/browser/chat/chat.d.ts +31 -39
  225. package/lib/browser/chat/chat.js +227 -176
  226. package/lib/browser/components/access-view.js +2 -2
  227. package/lib/browser/components/account-menu.js +2 -2
  228. package/lib/browser/components/app-nav.d.ts +6 -3
  229. package/lib/browser/components/app-nav.js +17 -8
  230. package/lib/browser/components/app-shell-hooks.d.ts +48 -0
  231. package/lib/browser/components/app-shell-hooks.js +211 -0
  232. package/lib/browser/components/app-view.js +89 -180
  233. package/lib/browser/components/auth-view.js +3 -3
  234. package/lib/browser/components/chat-list.d.ts +20 -2
  235. package/lib/browser/components/chat-list.js +137 -21
  236. package/lib/browser/components/composer-box.d.ts +5 -5
  237. package/lib/browser/components/composer-box.js +111 -4
  238. package/lib/browser/components/composer.d.ts +7 -0
  239. package/lib/browser/components/composer.js +22 -14
  240. package/lib/browser/components/connection-bar.js +48 -15
  241. package/lib/browser/components/context-menu.d.ts +30 -4
  242. package/lib/browser/components/context-menu.js +198 -36
  243. package/lib/browser/components/conversation-scroll.d.ts +129 -6
  244. package/lib/browser/components/conversation-scroll.js +431 -110
  245. package/lib/browser/components/dino.js +3 -3
  246. package/lib/browser/components/earlier-messages.d.ts +2 -1
  247. package/lib/browser/components/earlier-messages.js +2 -17
  248. package/lib/browser/components/editor-area.d.ts +3 -1
  249. package/lib/browser/components/editor-area.js +5 -4
  250. package/lib/browser/components/empty-pictures.d.ts +0 -2
  251. package/lib/browser/components/empty-pictures.js +0 -17
  252. package/lib/browser/components/folder-picker.d.ts +5 -2
  253. package/lib/browser/components/folder-picker.js +30 -9
  254. package/lib/browser/components/held-talk.d.ts +29 -0
  255. package/lib/browser/components/held-talk.js +79 -0
  256. package/lib/browser/components/host-view.d.ts +1 -1
  257. package/lib/browser/components/host-view.js +5 -5
  258. package/lib/browser/components/icon.d.ts +2 -2
  259. package/lib/browser/components/icon.js +7 -6
  260. package/lib/browser/components/image-viewer.d.ts +125 -0
  261. package/lib/browser/components/image-viewer.js +435 -0
  262. package/lib/browser/components/lightbox.d.ts +12 -0
  263. package/lib/browser/components/lightbox.js +60 -0
  264. package/lib/browser/components/markdown.d.ts +6 -2
  265. package/lib/browser/components/markdown.js +24 -10
  266. package/lib/browser/components/media.js +2 -11
  267. package/lib/browser/components/message-footer.d.ts +16 -2
  268. package/lib/browser/components/message-footer.js +31 -12
  269. package/lib/browser/components/message-list.d.ts +24 -3
  270. package/lib/browser/components/message-list.js +146 -16
  271. package/lib/browser/components/message-menu.d.ts +3 -1
  272. package/lib/browser/components/message-menu.js +17 -2
  273. package/lib/browser/components/nav-places.d.ts +16 -1
  274. package/lib/browser/components/nav-places.js +13 -3
  275. package/lib/browser/components/phone-shell.d.ts +4 -1
  276. package/lib/browser/components/phone-shell.js +3 -1
  277. package/lib/browser/components/run-status.js +3 -3
  278. package/lib/browser/components/select-bar.d.ts +10 -0
  279. package/lib/browser/components/select-bar.js +61 -0
  280. package/lib/browser/components/session-settings.d.ts +6 -0
  281. package/lib/browser/components/session-settings.js +14 -1
  282. package/lib/browser/components/session-view.js +7 -3
  283. package/lib/browser/components/settings-choices.d.ts +36 -0
  284. package/lib/browser/components/settings-choices.js +156 -0
  285. package/lib/browser/components/settings-parts.d.ts +22 -0
  286. package/lib/browser/components/settings-parts.js +359 -0
  287. package/lib/browser/components/settings-view.d.ts +0 -6
  288. package/lib/browser/components/settings-view.js +2 -405
  289. package/lib/browser/components/swipe-row.d.ts +2 -2
  290. package/lib/browser/components/swipe-row.js +7 -3
  291. package/lib/browser/components/tool-view.js +14 -12
  292. package/lib/browser/components/voice-button.d.ts +1 -1
  293. package/lib/browser/components/voice-button.js +1 -1
  294. package/lib/browser/components/voice-talk.d.ts +44 -0
  295. package/lib/browser/components/voice-talk.js +260 -0
  296. package/lib/browser/components/workbench-view.js +3 -3
  297. package/lib/browser/device/device.d.ts +3 -0
  298. package/lib/browser/device/device.js +11 -1
  299. package/lib/browser/device/hold.d.ts +43 -0
  300. package/lib/browser/device/hold.js +173 -0
  301. package/lib/browser/device/launch-screen.d.ts +1 -1
  302. package/lib/browser/device/launch-screen.js +1 -1
  303. package/lib/browser/device/long-press.d.ts +2 -0
  304. package/lib/browser/device/long-press.js +16 -1
  305. package/lib/browser/device/pull-down.d.ts +4 -2
  306. package/lib/browser/device/pull-down.js +63 -75
  307. package/lib/browser/device/row-swipe.d.ts +35 -10
  308. package/lib/browser/device/row-swipe.js +148 -70
  309. package/lib/browser/device/shake-undo.d.ts +17 -0
  310. package/lib/browser/device/shake-undo.js +63 -0
  311. package/lib/browser/device/sheet-swipe.d.ts +118 -18
  312. package/lib/browser/device/sheet-swipe.js +410 -108
  313. package/lib/browser/extension/icons.js +1 -0
  314. package/lib/browser/extension/web-extension-api.d.ts +135 -2
  315. package/lib/browser/extension/web-extension-code.d.ts +6 -0
  316. package/lib/browser/extension/web-extension-code.js +24 -0
  317. package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
  318. package/lib/browser/extension/web-extension-protocol.js +9 -1
  319. package/lib/browser/extension/web-extensions.d.ts +14 -1
  320. package/lib/browser/extension/web-extensions.js +125 -21
  321. package/lib/browser/extension/web-tasks.d.ts +9 -1
  322. package/lib/browser/extension/web-tasks.js +24 -0
  323. package/lib/browser/files/files-protocol.d.ts +26 -0
  324. package/lib/browser/files/files-protocol.js +5 -0
  325. package/lib/browser/files/files.d.ts +36 -0
  326. package/lib/browser/files/files.js +122 -0
  327. package/lib/browser/hooks.d.ts +3 -1
  328. package/lib/browser/hooks.js +9 -0
  329. package/lib/browser/i18n/locales.d.ts +29 -2
  330. package/lib/browser/i18n/messages.d.ts +28 -1
  331. package/lib/browser/i18n/messages.js +58 -4
  332. package/lib/browser/index.d.ts +6 -0
  333. package/lib/browser/index.js +6 -0
  334. package/lib/browser/notices/notices-protocol.d.ts +9 -1
  335. package/lib/browser/notices/notices.d.ts +2 -0
  336. package/lib/browser/notices/notices.js +20 -10
  337. package/lib/browser/offline/device-values.d.ts +56 -0
  338. package/lib/browser/offline/device-values.js +148 -0
  339. package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
  340. package/lib/browser/offline/kept-chats-protocol.js +5 -0
  341. package/lib/browser/offline/kept-chats.d.ts +48 -0
  342. package/lib/browser/offline/kept-chats.js +149 -0
  343. package/lib/browser/offline/offline-reads.d.ts +45 -0
  344. package/lib/browser/offline/offline-reads.js +111 -0
  345. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  346. package/lib/browser/settings/settings-protocol.js +2 -0
  347. package/lib/browser/style/conversation.d.ts +1 -1
  348. package/lib/browser/style/conversation.js +57 -17
  349. package/lib/browser/style/device.js +43 -4
  350. package/lib/browser/style/layout.d.ts +1 -1
  351. package/lib/browser/style/layout.js +67 -15
  352. package/lib/browser/style/pages.d.ts +1 -1
  353. package/lib/browser/style/pages.js +2 -1
  354. package/lib/browser/style/shell.d.ts +1 -1
  355. package/lib/browser/style/shell.js +47 -3
  356. package/lib/browser/style/tasks.d.ts +1 -1
  357. package/lib/browser/style/tasks.js +2 -0
  358. package/lib/browser/util/frame.d.ts +5 -4
  359. package/lib/browser/util/frame.js +5 -4
  360. package/lib/browser/util/markdown.d.ts +18 -1
  361. package/lib/browser/util/markdown.js +119 -5
  362. package/lib/browser/util/process.d.ts +21 -0
  363. package/lib/browser/util/process.js +46 -2
  364. package/lib/browser/util/voice.d.ts +5 -2
  365. package/lib/browser/util/voice.js +6 -3
  366. package/lib/browser/util/zoom.d.ts +47 -0
  367. package/lib/browser/util/zoom.js +99 -0
  368. package/lib/browser/workbench-calls.d.ts +60 -0
  369. package/lib/browser/workbench-calls.js +145 -0
  370. package/lib/browser/workbench-protocol.d.ts +5 -1
  371. package/lib/browser/workbench-util.d.ts +69 -0
  372. package/lib/browser/workbench-util.js +151 -0
  373. package/lib/browser/workbench.d.ts +15 -42
  374. package/lib/browser/workbench.js +74 -189
  375. package/package.json +10 -10
  376. package/public/launch.svg +46 -42
@@ -1,27 +1,29 @@
1
- import { ChevronLeft, LayoutGrid } from 'lucide-react';
1
+ import { useInject } from '@celljs/react';
2
+ import { ChevronLeft } from 'lucide-react';
2
3
  import * as React from 'react';
3
4
  import { AssistantChatList } from '../assistant/assistant-chat-list.js';
4
5
  import { REMOVED_CHATS } from '../chat/chat-protocol.js';
5
6
  import { ChatView, useChat } from '../chat/chat-view.js';
6
7
  import { useDevice } from '../device/device.js';
7
8
  import { LaunchScreenUtil } from '../device/launch-screen.js';
8
- import { useSheetSwipe } from '../device/sheet-swipe.js';
9
9
  import { MessageRenderers, SessionAvatars } from '../extension/extension-view.js';
10
+ import { WebCwdUtil } from '../extension/web-extension-protocol.js';
11
+ import { TaFiles } from '../files/files-protocol.js';
10
12
  import { useOpenLink, usePersisted, useSettings, useWebExtensions, useWorkbench } from '../hooks.js';
11
- import { message } from '../i18n/messages.js';
12
13
  import { useT } from '../i18n/use-t.js';
13
14
  import { SIGN_IN_EVENT } from '../notices/notices.js';
14
- import { THEME_COLORS } from '../settings/settings.js';
15
- import { StateUtil } from '../state/state-protocol.js';
15
+ import { Voice } from '../util/voice.js';
16
16
  import { PageView, Rail, SidebarView, useNavigation } from './app-nav.js';
17
+ import { CARDS_ID, EDITOR, FIRST_SIDE, LOGIN_LATER, RAIL, SIDE, SIDEBAR, useDrawerSwipe, useKeys, useRefresh, useRight, useTitlebarColor, useWorkbenchCards, } from './app-shell-hooks.js';
17
18
  import { AuthUtil, LoginPage, useAuthProviders } from './auth-view.js';
18
19
  import { BoardSurface, useSurfaces } from './board.js';
19
20
  import { BY_DIRECTORY, FOLDED } from './chat-list.js';
20
21
  import { ConnectionBar } from './connection-bar.js';
21
22
  import { DinoLookHost, DinoLookProvider } from './dino-look.js';
22
23
  import { DiscoverView } from './discover-view.js';
23
- import { EditorArea, WorkbenchCards } from './editor-area.js';
24
+ import { EditorArea } from './editor-area.js';
24
25
  import { EnvironmentPage } from './environment-view.js';
26
+ import { HeldTalk } from './held-talk.js';
25
27
  import { SwitchingVeil } from './host-view.js';
26
28
  import { IconButton, SidebarLeft } from './icon.js';
27
29
  import { KeptPages } from './kept-pages.js';
@@ -36,117 +38,11 @@ import { PhoneShell } from './phone-shell.js';
36
38
  import { RemotePrompts } from './remote-prompts.js';
37
39
  import { SettingsView } from './settings-view.js';
38
40
  import { ShareHost } from './share-dialog.js';
39
- import { SideListUtil } from './side-lists.js';
41
+ import { DOUBLE_PAGE, SideListUtil } from './side-lists.js';
40
42
  import { paneStyle, Sash, usePane } from './split-pane.js';
41
43
  import { SurfaceFlyout } from './surface-flyout.js';
42
44
  import { WorkbenchToggleContext } from './workbench-toggle.js';
43
45
  import { SignIn, useDocument } from './workbench-view.js';
44
- /**
45
- * What the sidebar shows in this tab: `` for the chats, else the id of a sidebar view. Until the user picks
46
- * a tab, the first sidebar view of web extensions (the agents), or the chats if there is none.
47
- */
48
- const FIRST_SIDE = '*';
49
- /** The user put off signing in to a model, in this tab: the page shows the app until the tab is reopened. */
50
- const LOGIN_LATER = { key: 'login.later', tier: 'tab', initial: false, parse: StateUtil.boolean };
51
- const SIDE = { key: 'side', tier: 'tab', initial: FIRST_SIDE, parse: StateUtil.string };
52
- /** Whether the workbench on the right shows, in this browser, whose screen decides. */
53
- const RIGHT = { key: 'panel', tier: 'device', initial: true, parse: StateUtil.boolean };
54
- /** Sessions change with other clients too; while the tab is visible they are read again now and then. */
55
- const REFRESH_MS = 5000;
56
- /** The cards of web extensions, as a tool of the workbench and its tab. */
57
- const CARDS_ID = 'ta/cards';
58
- const CARDS_TAB_ID = `view:${CARDS_ID}`;
59
- function cardsTab(title) {
60
- return { id: CARDS_TAB_ID, extension: 'ta', title, icon: LayoutGrid, render: WorkbenchCards };
61
- }
62
- const SIDEBAR = { key: 'sidebar', initial: 300, min: 200, max: 520 };
63
- const EDITOR = { key: 'editor', initial: 480, min: 320, max: 1200 };
64
- /** The width of the navigation rail, in style.ts. */
65
- const RAIL = 56;
66
- /**
67
- * Whether the right of the page (editors and cards) shows; on narrow screens it starts hidden. The last of
68
- * them hides it where it lies over the conversation, the user's choice kept.
69
- */
70
- function useRight() {
71
- const [kept, keep] = usePersisted(RIGHT);
72
- // Where it does not fit beside the conversation it opens over it: only when asked, in this page.
73
- const inline = useDevice(device => device.layout) === 'expanded';
74
- const [asked, setAsked] = React.useState(false);
75
- const open = kept && (inline || asked);
76
- const set = React.useCallback((next) => {
77
- setAsked(next);
78
- keep(next);
79
- }, [keep]);
80
- const toggle = React.useCallback(() => set(!open), [set, open]);
81
- const reveal = React.useCallback(() => set(true), [set]);
82
- const uncover = React.useCallback(() => setAsked(false), []);
83
- // `set` is stable, so `reveal` is too: effects may depend on it.
84
- return [open, toggle, reveal, uncover];
85
- }
86
- /** Cmd/Ctrl+B shows or hides the sidebar and Cmd/Ctrl+, opens the settings, as in an IDE. */
87
- function useKeys(toggle, openSettings) {
88
- React.useEffect(() => {
89
- const onKey = (event) => {
90
- if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
91
- return;
92
- }
93
- const key = event.key.toLowerCase();
94
- if (key === 'b') {
95
- event.preventDefault();
96
- toggle();
97
- }
98
- else if (key === ',') {
99
- event.preventDefault();
100
- openSettings();
101
- }
102
- };
103
- window.addEventListener('keydown', onKey);
104
- return () => window.removeEventListener('keydown', onKey);
105
- }, [toggle, openSettings]);
106
- }
107
- /** Reads the open sessions and the web extensions again while the tab is visible: other clients change them too. */
108
- /**
109
- * The installed app with its title bar hidden draws the bar itself (see .ta-titlebar), but the browser
110
- * paints the corners of the window's buttons with theme-color: the traffic lights at the left over the
111
- * side columns, its own buttons at the right. So the bar is the colour of the side columns throughout, the
112
- * conversation below it too. Otherwise the whole title bar has the conversation's colour, as the sign-in page.
113
- */
114
- function useTitlebarColor(signedIn, theme) {
115
- React.useEffect(() => {
116
- const overlay = matchMedia('(display-mode: window-controls-overlay)');
117
- const apply = () => {
118
- const meta = document.querySelector('meta[name="theme-color"]');
119
- if (meta) {
120
- meta.content = THEME_COLORS[theme][overlay.matches && signedIn ? 'side' : 'main'];
121
- }
122
- };
123
- apply();
124
- overlay.addEventListener('change', apply);
125
- return () => overlay.removeEventListener('change', apply);
126
- }, [signedIn, theme]);
127
- }
128
- function useRefresh(online) {
129
- const [, workbench] = useWorkbench();
130
- const [, extensions] = useWebExtensions();
131
- React.useEffect(() => {
132
- if (!online) {
133
- return;
134
- }
135
- const sessions = () => document.visibilityState === 'visible' && workbench.refresh().catch(() => undefined);
136
- const shown = () => {
137
- sessions();
138
- if (document.visibilityState === 'visible') {
139
- extensions.refresh().catch(() => undefined);
140
- }
141
- };
142
- const timer = setInterval(sessions, REFRESH_MS);
143
- document.addEventListener('visibilitychange', shown);
144
- return () => {
145
- clearInterval(timer);
146
- document.removeEventListener('visibilitychange', shown);
147
- };
148
- }, [online, workbench, extensions]);
149
- }
150
46
  /**
151
47
  * ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
152
48
  * extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
@@ -155,8 +51,8 @@ function useRefresh(online) {
155
51
  * the conversation instead.
156
52
  */
157
53
  function AppShell() {
158
- var _a, _b;
159
- var _c, _d;
54
+ var _a, _b, _c, _d;
55
+ var _e, _f, _g, _h;
160
56
  const t = useT();
161
57
  const [workbench, bench] = useWorkbench();
162
58
  const [extensions, host] = useWebExtensions();
@@ -202,12 +98,13 @@ function AppShell() {
202
98
  const settingsShown = settings !== undefined && (!phone || screenOpen);
203
99
  const [rightOpen, toggleRight, revealRight, uncoverRight] = useRight();
204
100
  const [maximized, setMaximized] = React.useState(false);
205
- const [{ theme, language }, settingsStore] = useSettings();
101
+ const [{ theme, language }] = useSettings();
206
102
  const sidebar = usePane(SIDEBAR);
207
103
  const editor = usePane(EDITOR);
208
104
  const online = workbench.status === 'online';
209
105
  // Files named in replies outside a conversation (channels, pages) are in the server's directory.
210
- const fileUrl = React.useCallback((path) => bench.workspace.fileUrl(path), [bench]);
106
+ const files = useInject(TaFiles);
107
+ const fileUrl = React.useCallback(async (path) => files.loadable(await bench.workspace.fileUrl(path)), [bench, files]);
211
108
  const openLink = useOpenLink(undefined);
212
109
  useDocument();
213
110
  useRefresh(online);
@@ -220,6 +117,16 @@ function AppShell() {
220
117
  React.useEffect(() => {
221
118
  void bench.start();
222
119
  }, [bench]);
120
+ // The computer cannot be reached from the start: the web extensions of the last time start anyway (from
121
+ // the code this device kept) and show what they read last; online, `chat.start` loads them.
122
+ const offline = workbench.status === 'offline';
123
+ const startedOffline = React.useRef(false);
124
+ React.useEffect(() => {
125
+ if (offline && !startedOffline.current) {
126
+ startedOffline.current = true;
127
+ void host.refresh().catch(() => undefined);
128
+ }
129
+ }, [offline, host]);
223
130
  /** The conversation the page opens with is shown: those shown after are the user's doing. */
224
131
  const started = React.useRef(false);
225
132
  React.useEffect(() => {
@@ -236,6 +143,8 @@ function AppShell() {
236
143
  if (focus > 0) {
237
144
  revealRight();
238
145
  revealEditor();
146
+ // Opened from the launcher or the board: the workbench comes in their place.
147
+ setSurface(undefined);
239
148
  }
240
149
  }, [focus, revealRight, revealEditor]);
241
150
  // A web extension shows another conversation: the conversation, not a page, a drawer or the workbench over it, is then in front.
@@ -288,32 +197,7 @@ function AppShell() {
288
197
  setSideId('');
289
198
  }
290
199
  }, [shownSession]);
291
- // The cards of web extensions are a tab of the workbench: it opens when the first card comes, if nothing else is open there, and goes with the last.
292
- const hasCards = extensions.widgets.some(widget => widget.placement === 'panel');
293
- const cardsOpen = extensions.editors.some(candidate => candidate.id === CARDS_TAB_ID);
294
- const openCards = React.useCallback(() => host.open(cardsTab(() => message(settingsStore.state.language, 'ta.workbench.cards'))), [host, settingsStore]);
295
- const quiet = extensions.editors.length === 0 && rightOpen && !editor.collapsed;
296
- // Only when cards come: not when the user closes their tab.
297
- // biome-ignore lint/correctness/useExhaustiveDependencies: follows whether there are cards
298
- React.useEffect(() => {
299
- if (hasCards && !cardsOpen && quiet) {
300
- openCards();
301
- }
302
- }, [hasCards]);
303
- React.useEffect(() => {
304
- if (!hasCards && cardsOpen) {
305
- void host.closeEditor(CARDS_TAB_ID);
306
- }
307
- }, [hasCards, cardsOpen, host]);
308
- const cardsTool = {
309
- id: CARDS_ID,
310
- extension: 'ta',
311
- title: () => message(settingsStore.state.language, 'ta.workbench.cards'),
312
- component: WorkbenchCards,
313
- icon: LayoutGrid,
314
- location: 'panel',
315
- order: 0,
316
- };
200
+ const { hasCards, openCards, cardsTool } = useWorkbenchCards(rightOpen && !editor.collapsed);
317
201
  const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
318
202
  const sideViews = SideListUtil.sidebarViews(extensions.views);
319
203
  const sideView = sideId === FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
@@ -340,18 +224,7 @@ function AppShell() {
340
224
  }
341
225
  tabsBefore.current = tabCount;
342
226
  }, [tabCount, showEditors, toggleRight, layout]);
343
- // The drawer of a compact layout comes out from the left edge under the finger, and goes the same way.
344
- useSheetSwipe({
345
- enabled: touch && layout === 'compact' && !phone && !showEditors,
346
- open: navOpen,
347
- setOpen: setNavOpen,
348
- side: 'left',
349
- opensFrom: 'edge',
350
- closesFrom: 'anywhere',
351
- sheet: '.ta-nav',
352
- scrim: '.ta-scrim',
353
- settleMs: 240,
354
- });
227
+ useDrawerSwipe(touch && layout === 'compact' && !phone && !showEditors, navOpen, setNavOpen);
355
228
  // The pages of the rail: in the navigation, or under Discover.
356
229
  const navigation = useNavigation(extensions.views);
357
230
  // Without a sidebar view that lists the double, its page is the first tab: it opens there, once the views are in.
@@ -368,6 +241,11 @@ function AppShell() {
368
241
  const railView = view && (view === navigation.home || navigation.pages.includes(view)) ? view : undefined;
369
242
  // On a phone a page of a list (a channel, the double) or of Discover comes in front of the tabs; one of the navigation is a tab.
370
243
  const tabView = view && (view === navigation.home || navigation.nav.includes(view)) ? view : undefined;
244
+ // A page of the screen, and those in the background beside it, kept as they were.
245
+ const screenPage = settings === undefined && view && !tabView ? view : undefined;
246
+ // The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
247
+ const conversationShown = phone ? screenOpen && settings === undefined && !screenPage : settings === undefined && tabPage !== 'discover' && !view;
248
+ React.useEffect(() => host.setConversationShown(conversationShown), [host, conversationShown]);
371
249
  const { pageShown } = extensions;
372
250
  // biome-ignore lint/correctness/useExhaustiveDependencies: follows the pages shown
373
251
  React.useEffect(() => {
@@ -431,7 +309,20 @@ function AppShell() {
431
309
  sidebar.reveal();
432
310
  }
433
311
  };
434
- useKeys(toggleSide, openSettings);
312
+ const toggleWorkbench = () => {
313
+ if (showEditors) {
314
+ toggleRight();
315
+ }
316
+ else {
317
+ // Over the settings of a wide screen (the rail, Cmd/Ctrl+J): they give way to what was under them.
318
+ if (!phone && settings !== undefined) {
319
+ setSettings(undefined);
320
+ }
321
+ revealRight();
322
+ editor.reveal();
323
+ }
324
+ };
325
+ useKeys(toggleSide, openSettings, () => editors && toggleWorkbench());
435
326
  useTitlebarColor(workbench.status !== 'signed-out', theme);
436
327
  const [providers, reloadProviders] = useAuthProviders(online);
437
328
  const [later, setLater] = usePersisted(LOGIN_LATER);
@@ -445,6 +336,8 @@ function AppShell() {
445
336
  window.addEventListener(SIGN_IN_EVENT, ask);
446
337
  return () => window.removeEventListener(SIGN_IN_EVENT, ask);
447
338
  }, [reloadProviders]);
339
+ /** The page of the double: its own, or the one a sidebar view that lists it opens. */
340
+ const doubleId = (_e = (_b = navigation.home) === null || _b === void 0 ? void 0 : _b.id) !== null && _e !== void 0 ? _e : DOUBLE_PAGE;
448
341
  if (workbench.status === 'signed-out') {
449
342
  return React.createElement(SignIn, { error: workbench.error });
450
343
  }
@@ -460,15 +353,6 @@ function AppShell() {
460
353
  reloadProviders();
461
354
  } }));
462
355
  }
463
- const toggleWorkbench = () => {
464
- if (showEditors) {
465
- toggleRight();
466
- }
467
- else {
468
- revealRight();
469
- editor.reveal();
470
- }
471
- };
472
356
  // What the columns beside the conversation and the editors take, so that the editors never take more than the conversation.
473
357
  const sideWidths = {
474
358
  '--ta-left': `${RAIL + (sideShown ? sidebar.size : 0)}px`,
@@ -488,7 +372,7 @@ function AppShell() {
488
372
  }
489
373
  };
490
374
  const chats = (React.createElement(AssistantChatList, { sessions: workbench.sessions, saved: workbench.saved, removed: removedChats, selected: view || phone ? undefined : (pending !== null && pending !== void 0 ? pending : store === null || store === void 0 ? void 0 : store.sessionId), chat: chat, byDirectory: chatsByDirectory, onByDirectory: setChatsByDirectory, folded: foldedChats, onFolded: setFoldedChats, onPicked: picked }));
491
- const editorArea = (React.createElement(EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
375
+ const editorArea = (React.createElement(EditorArea, { editors: extensions.editors, active: activeEditor, views: tools, onShow: id => host.showEditor(id), onClose: ids => void host.closeEditors(ids), onPin: id => host.pinEditor(id), onOpenView: openTool, onHide: editor.toggle, cwd: (_f = WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (_c = workbench.server) === null || _c === void 0 ? void 0 : _c.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
492
376
  const overlays = (React.createElement(React.Fragment, null,
493
377
  React.createElement(NoticeCenter, null),
494
378
  React.createElement(LinkDialog, null),
@@ -513,19 +397,44 @@ function AppShell() {
513
397
  }
514
398
  };
515
399
  const discoverView = (leading) => (React.createElement(DiscoverView, { pages: navigation.discover, onOpen: openDiscovered, onPin: pinDiscovered, onSettings: () => openSettings('navigation'), leading: leading }));
400
+ // A held entry of the navigation talks, without a menu: the double opens and its box listens, the chats open a
401
+ // new conversation whose box does; letting go gives what was said (HeldTalk). Nowhere to talk, they are a tap.
402
+ const talkHold = (place, open) => ({
403
+ start: () => {
404
+ open();
405
+ HeldTalk.hold(place);
406
+ },
407
+ move: HeldTalk.point,
408
+ end: HeldTalk.release,
409
+ cancel: HeldTalk.cancel,
410
+ });
411
+ const holds = Voice.canListen()
412
+ ? {
413
+ double: talkHold('double', () => {
414
+ showPage(doubleId);
415
+ // Over the tabs when a sidebar view lists the double; as a tab of its own elsewhere.
416
+ if (phone) {
417
+ setScreenOpen(!navigation.home);
418
+ }
419
+ }),
420
+ chats: talkHold('draft', () => {
421
+ void chat.draft();
422
+ picked();
423
+ }),
424
+ }
425
+ : {};
516
426
  const tabs = phone
517
427
  ? phoneTabs(lists, navigation, {
518
428
  discover: t('ta.discover'),
519
429
  me: t('ta.me'),
520
430
  fold: t('ta.nav.fold'),
521
431
  settings: { label: t('ta.nav.settings'), run: () => openSettings('navigation') },
432
+ holds,
522
433
  })
523
434
  : [];
524
- const tab = tabPage === 'me' ? ME_TAB : tabPage === 'discover' ? DISCOVER : ((_c = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _c !== void 0 ? _c : side);
435
+ const tab = tabPage === 'me' ? ME_TAB : tabPage === 'discover' ? DISCOVER : ((_g = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _g !== void 0 ? _g : side);
525
436
  // The launcher and the board are over the first tab only, as WeChat's over its chats.
526
- const firstTab = ((_b = tabs[0]) === null || _b === void 0 ? void 0 : _b.id) === tab;
527
- // A page of the screen, and those in the background beside it, kept as they were.
528
- const screenPage = settings === undefined && view && !tabView ? view : undefined;
437
+ const firstTab = ((_d = tabs[0]) === null || _d === void 0 ? void 0 : _d.id) === tab;
529
438
  const content = phone ? (React.createElement(PhoneShell, { tabs: tabs, tab: tab, launcher: firstTab && surfaces.launcher ? React.createElement(LauncherSurface, { active: surface === 'launcher' }) : undefined, board: firstTab && surfaces.board ? (React.createElement(BoardSurface, { leading: React.createElement(IconButton, { icon: ChevronLeft, label: t('ta.back'), onClick: () => setSurface(undefined) }) })) : undefined, surface: surface, onSurface: setSurface, onTab: id => {
530
439
  var _a;
531
440
  setSurface(undefined);
@@ -547,11 +456,11 @@ function AppShell() {
547
456
  settings !== undefined ? (React.createElement(SettingsView, { key: settingsOpened, section: settings || undefined, onClose: closeSettings, onBack: closeSettings })) : screenPage ? null : (React.createElement(ChatView, { widgets: extensions.widgets, onMenu: closeScreen, back: true }))), screenOpen: screenOpen, onBack: closeScreen, workbench: editors && !settingsShown ? (React.createElement("div", { className: "ta-editors-pane", inert: !showEditors }, editorArea)) : undefined, workbenchOpen: showEditors, onWorkbench: open => (open ? toggleWorkbench() : showEditors && toggleRight()) }, overlays)) : (React.createElement("div", { className: classes.filter(Boolean).join(' '), style: sideWidths },
548
457
  navOpen && React.createElement("button", { type: "button", className: "ta-scrim", "aria-label": t('ta.close'), onClick: () => setNavOpen(false) }),
549
458
  React.createElement("div", { className: "ta-nav" },
550
- React.createElement(Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? DISCOVER : ((_d = view === null || view === void 0 ? void 0 : view.id) !== null && _d !== void 0 ? _d : ''), onPage: showPage, onDiscover: () => {
459
+ React.createElement(Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? DISCOVER : ((_h = view === null || view === void 0 ? void 0 : view.id) !== null && _h !== void 0 ? _h : ''), onPage: showPage, onDiscover: () => {
551
460
  setSettings(undefined);
552
461
  setNavOpen(false);
553
462
  setTabPage('discover');
554
- }, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface }),
463
+ }, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds }),
555
464
  sideShown && (React.createElement("div", { className: "ta-sidebar", style: paneStyle(sidebar) },
556
465
  sideView ? React.createElement(SidebarView, { view: sideView }) : chats,
557
466
  React.createElement(Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { useNotices, useWorkbench } from '../hooks.js';
5
5
  import { useT } from '../i18n/use-t.js';
6
- import { WorkbenchUtil } from '../workbench.js';
6
+ import { WorkbenchUtil } from '../workbench-util.js';
7
7
  import { AuthPicture } from './auth-pictures.js';
8
8
  import { Callout } from './callout.js';
9
9
  import { EmptyState } from './empty-state.js';
@@ -39,6 +39,8 @@ export declare const BY_DIRECTORY: StateSpec<boolean>;
39
39
  export declare const FOLDED: StateSpec<string[]>;
40
40
  export declare namespace ChatListUtil {
41
41
  function isOpen(entry: ChatEntry): entry is TaSessionInfo;
42
+ /** Whether it is the double's own conversation: its session, or before that is open its file. */
43
+ function isDouble(entry: ChatEntry, double: Pick<ChatListDouble, 'session' | 'sessionFile'>): boolean;
42
44
  /** The id of an open session, the file of a saved one. */
43
45
  function key(entry: ChatEntry): string;
44
46
  /**
@@ -64,15 +66,31 @@ export declare namespace ChatListUtil {
64
66
  /** `19:59` today, `11/8` before. */
65
67
  function clock(time: number, now: number): string;
66
68
  function title(session: ChatEntry, t: Translate): string;
69
+ /**
70
+ * Whether a row shows the same: what of its conversation and its place it shows, and the rest as is. The list
71
+ * reads the conversations again every few seconds into new objects: one that answers draws its row again, not every row.
72
+ */
73
+ function sameRow<T extends {
74
+ session: ChatEntry;
75
+ source: ChatSource;
76
+ }>(before: T, after: T): boolean;
77
+ /** What a row says under its title: the last thing said, unless it is the title again. */
78
+ function preview(session: ChatEntry, title: string): string | undefined;
67
79
  /** The first letter of a name, for its avatar. */
68
80
  function initial(name: string): string;
69
81
  }
82
+ /** What a task of the double came to, as the list says it beside the conversation. */
83
+ export type ChatTaskStatus = 'running' | 'done' | 'failed' | 'stopped';
70
84
  /** The double, for the list: which conversations are its tasks, and how to hand it one. */
71
85
  export interface ChatListDouble {
72
- /** The sessions of its tasks. */
73
- tasks: ReadonlySet<string>;
86
+ /** The sessions of its tasks, and where each is. */
87
+ tasks: ReadonlyMap<string, ChatTaskStatus>;
74
88
  /** Its own conversation. */
75
89
  session?: string;
90
+ /** The file of its own conversation: it is known before the conversation opens (and without the computer). */
91
+ sessionFile?: string;
92
+ /** What the user calls it. */
93
+ name: string;
76
94
  hand(session: TaSessionInfo, title: string): void;
77
95
  }
78
96
  export interface ChatListProps {