@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
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.AppView = AppView;
37
+ const react_1 = require("@celljs/react");
37
38
  const lucide_react_1 = require("lucide-react");
38
39
  const React = __importStar(require("react"));
39
40
  const assistant_chat_list_1 = require("../assistant/assistant-chat-list");
@@ -41,15 +42,15 @@ const chat_protocol_1 = require("../chat/chat-protocol");
41
42
  const chat_view_1 = require("../chat/chat-view");
42
43
  const device_1 = require("../device/device");
43
44
  const launch_screen_1 = require("../device/launch-screen");
44
- const sheet_swipe_1 = require("../device/sheet-swipe");
45
45
  const extension_view_1 = require("../extension/extension-view");
46
+ const web_extension_protocol_1 = require("../extension/web-extension-protocol");
47
+ const files_protocol_1 = require("../files/files-protocol");
46
48
  const hooks_1 = require("../hooks");
47
- const messages_1 = require("../i18n/messages");
48
49
  const use_t_1 = require("../i18n/use-t");
49
50
  const notices_1 = require("../notices/notices");
50
- const settings_1 = require("../settings/settings");
51
- const state_protocol_1 = require("../state/state-protocol");
51
+ const voice_1 = require("../util/voice");
52
52
  const app_nav_1 = require("./app-nav");
53
+ const app_shell_hooks_1 = require("./app-shell-hooks");
53
54
  const auth_view_1 = require("./auth-view");
54
55
  const board_1 = require("./board");
55
56
  const chat_list_1 = require("./chat-list");
@@ -58,6 +59,7 @@ const dino_look_1 = require("./dino-look");
58
59
  const discover_view_1 = require("./discover-view");
59
60
  const editor_area_1 = require("./editor-area");
60
61
  const environment_view_1 = require("./environment-view");
62
+ const held_talk_1 = require("./held-talk");
61
63
  const host_view_1 = require("./host-view");
62
64
  const icon_1 = require("./icon");
63
65
  const kept_pages_1 = require("./kept-pages");
@@ -77,112 +79,6 @@ const split_pane_1 = require("./split-pane");
77
79
  const surface_flyout_1 = require("./surface-flyout");
78
80
  const workbench_toggle_1 = require("./workbench-toggle");
79
81
  const workbench_view_1 = require("./workbench-view");
80
- /**
81
- * What the sidebar shows in this tab: `` for the chats, else the id of a sidebar view. Until the user picks
82
- * a tab, the first sidebar view of web extensions (the agents), or the chats if there is none.
83
- */
84
- const FIRST_SIDE = '*';
85
- /** The user put off signing in to a model, in this tab: the page shows the app until the tab is reopened. */
86
- const LOGIN_LATER = { key: 'login.later', tier: 'tab', initial: false, parse: state_protocol_1.StateUtil.boolean };
87
- const SIDE = { key: 'side', tier: 'tab', initial: FIRST_SIDE, parse: state_protocol_1.StateUtil.string };
88
- /** Whether the workbench on the right shows, in this browser, whose screen decides. */
89
- const RIGHT = { key: 'panel', tier: 'device', initial: true, parse: state_protocol_1.StateUtil.boolean };
90
- /** Sessions change with other clients too; while the tab is visible they are read again now and then. */
91
- const REFRESH_MS = 5000;
92
- /** The cards of web extensions, as a tool of the workbench and its tab. */
93
- const CARDS_ID = 'ta/cards';
94
- const CARDS_TAB_ID = `view:${CARDS_ID}`;
95
- function cardsTab(title) {
96
- return { id: CARDS_TAB_ID, extension: 'ta', title, icon: lucide_react_1.LayoutGrid, render: editor_area_1.WorkbenchCards };
97
- }
98
- const SIDEBAR = { key: 'sidebar', initial: 300, min: 200, max: 520 };
99
- const EDITOR = { key: 'editor', initial: 480, min: 320, max: 1200 };
100
- /** The width of the navigation rail, in style.ts. */
101
- const RAIL = 56;
102
- /**
103
- * Whether the right of the page (editors and cards) shows; on narrow screens it starts hidden. The last of
104
- * them hides it where it lies over the conversation, the user's choice kept.
105
- */
106
- function useRight() {
107
- const [kept, keep] = (0, hooks_1.usePersisted)(RIGHT);
108
- // Where it does not fit beside the conversation it opens over it: only when asked, in this page.
109
- const inline = (0, device_1.useDevice)(device => device.layout) === 'expanded';
110
- const [asked, setAsked] = React.useState(false);
111
- const open = kept && (inline || asked);
112
- const set = React.useCallback((next) => {
113
- setAsked(next);
114
- keep(next);
115
- }, [keep]);
116
- const toggle = React.useCallback(() => set(!open), [set, open]);
117
- const reveal = React.useCallback(() => set(true), [set]);
118
- const uncover = React.useCallback(() => setAsked(false), []);
119
- // `set` is stable, so `reveal` is too: effects may depend on it.
120
- return [open, toggle, reveal, uncover];
121
- }
122
- /** Cmd/Ctrl+B shows or hides the sidebar and Cmd/Ctrl+, opens the settings, as in an IDE. */
123
- function useKeys(toggle, openSettings) {
124
- React.useEffect(() => {
125
- const onKey = (event) => {
126
- if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
127
- return;
128
- }
129
- const key = event.key.toLowerCase();
130
- if (key === 'b') {
131
- event.preventDefault();
132
- toggle();
133
- }
134
- else if (key === ',') {
135
- event.preventDefault();
136
- openSettings();
137
- }
138
- };
139
- window.addEventListener('keydown', onKey);
140
- return () => window.removeEventListener('keydown', onKey);
141
- }, [toggle, openSettings]);
142
- }
143
- /** Reads the open sessions and the web extensions again while the tab is visible: other clients change them too. */
144
- /**
145
- * The installed app with its title bar hidden draws the bar itself (see .ta-titlebar), but the browser
146
- * paints the corners of the window's buttons with theme-color: the traffic lights at the left over the
147
- * side columns, its own buttons at the right. So the bar is the colour of the side columns throughout, the
148
- * conversation below it too. Otherwise the whole title bar has the conversation's colour, as the sign-in page.
149
- */
150
- function useTitlebarColor(signedIn, theme) {
151
- React.useEffect(() => {
152
- const overlay = matchMedia('(display-mode: window-controls-overlay)');
153
- const apply = () => {
154
- const meta = document.querySelector('meta[name="theme-color"]');
155
- if (meta) {
156
- meta.content = settings_1.THEME_COLORS[theme][overlay.matches && signedIn ? 'side' : 'main'];
157
- }
158
- };
159
- apply();
160
- overlay.addEventListener('change', apply);
161
- return () => overlay.removeEventListener('change', apply);
162
- }, [signedIn, theme]);
163
- }
164
- function useRefresh(online) {
165
- const [, workbench] = (0, hooks_1.useWorkbench)();
166
- const [, extensions] = (0, hooks_1.useWebExtensions)();
167
- React.useEffect(() => {
168
- if (!online) {
169
- return;
170
- }
171
- const sessions = () => document.visibilityState === 'visible' && workbench.refresh().catch(() => undefined);
172
- const shown = () => {
173
- sessions();
174
- if (document.visibilityState === 'visible') {
175
- extensions.refresh().catch(() => undefined);
176
- }
177
- };
178
- const timer = setInterval(sessions, REFRESH_MS);
179
- document.addEventListener('visibilitychange', shown);
180
- return () => {
181
- clearInterval(timer);
182
- document.removeEventListener('visibilitychange', shown);
183
- };
184
- }, [online, workbench, extensions]);
185
- }
186
82
  /**
187
83
  * ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
188
84
  * extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
@@ -191,13 +87,13 @@ function useRefresh(online) {
191
87
  * the conversation instead.
192
88
  */
193
89
  function AppShell() {
194
- var _a, _b;
195
- var _c, _d;
90
+ var _a, _b, _c, _d;
91
+ var _e, _f, _g, _h;
196
92
  const t = (0, use_t_1.useT)();
197
93
  const [workbench, bench] = (0, hooks_1.useWorkbench)();
198
94
  const [extensions, host] = (0, hooks_1.useWebExtensions)();
199
95
  const [{ store, pending }, chat] = (0, chat_view_1.useChat)();
200
- const [sideId, setSideId] = (0, hooks_1.usePersisted)(SIDE);
96
+ const [sideId, setSideId] = (0, hooks_1.usePersisted)(app_shell_hooks_1.SIDE);
201
97
  const [removedChats] = (0, hooks_1.usePersisted)(chat_protocol_1.REMOVED_CHATS);
202
98
  const [chatsByDirectory, setChatsByDirectory] = (0, hooks_1.usePersisted)(chat_list_1.BY_DIRECTORY);
203
99
  const [foldedChats, setFoldedChats] = (0, hooks_1.usePersisted)(chat_list_1.FOLDED);
@@ -216,7 +112,7 @@ function AppShell() {
216
112
  React.useEffect(() => {
217
113
  if (phone && !opened.current) {
218
114
  opened.current = true;
219
- setSideId(FIRST_SIDE);
115
+ setSideId(app_shell_hooks_1.FIRST_SIDE);
220
116
  host.showPage('');
221
117
  }
222
118
  }, [phone, setSideId, host]);
@@ -236,17 +132,18 @@ function AppShell() {
236
132
  }, [phone]);
237
133
  const closeSettings = React.useCallback(() => (phone ? setScreenOpen(false) : setSettings(undefined)), [phone]);
238
134
  const settingsShown = settings !== undefined && (!phone || screenOpen);
239
- const [rightOpen, toggleRight, revealRight, uncoverRight] = useRight();
135
+ const [rightOpen, toggleRight, revealRight, uncoverRight] = (0, app_shell_hooks_1.useRight)();
240
136
  const [maximized, setMaximized] = React.useState(false);
241
- const [{ theme, language }, settingsStore] = (0, hooks_1.useSettings)();
242
- const sidebar = (0, split_pane_1.usePane)(SIDEBAR);
243
- const editor = (0, split_pane_1.usePane)(EDITOR);
137
+ const [{ theme, language }] = (0, hooks_1.useSettings)();
138
+ const sidebar = (0, split_pane_1.usePane)(app_shell_hooks_1.SIDEBAR);
139
+ const editor = (0, split_pane_1.usePane)(app_shell_hooks_1.EDITOR);
244
140
  const online = workbench.status === 'online';
245
141
  // Files named in replies outside a conversation (channels, pages) are in the server's directory.
246
- const fileUrl = React.useCallback((path) => bench.workspace.fileUrl(path), [bench]);
142
+ const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
143
+ const fileUrl = React.useCallback(async (path) => files.loadable(await bench.workspace.fileUrl(path)), [bench, files]);
247
144
  const openLink = (0, hooks_1.useOpenLink)(undefined);
248
145
  (0, workbench_view_1.useDocument)();
249
- useRefresh(online);
146
+ (0, app_shell_hooks_1.useRefresh)(online);
250
147
  // What the server and its packages say (errors, questions) is in the language of the page.
251
148
  React.useEffect(() => {
252
149
  if (online) {
@@ -256,6 +153,16 @@ function AppShell() {
256
153
  React.useEffect(() => {
257
154
  void bench.start();
258
155
  }, [bench]);
156
+ // The computer cannot be reached from the start: the web extensions of the last time start anyway (from
157
+ // the code this device kept) and show what they read last; online, `chat.start` loads them.
158
+ const offline = workbench.status === 'offline';
159
+ const startedOffline = React.useRef(false);
160
+ React.useEffect(() => {
161
+ if (offline && !startedOffline.current) {
162
+ startedOffline.current = true;
163
+ void host.refresh().catch(() => undefined);
164
+ }
165
+ }, [offline, host]);
259
166
  /** The conversation the page opens with is shown: those shown after are the user's doing. */
260
167
  const started = React.useRef(false);
261
168
  React.useEffect(() => {
@@ -272,6 +179,8 @@ function AppShell() {
272
179
  if (focus > 0) {
273
180
  revealRight();
274
181
  revealEditor();
182
+ // Opened from the launcher or the board: the workbench comes in their place.
183
+ setSurface(undefined);
275
184
  }
276
185
  }, [focus, revealRight, revealEditor]);
277
186
  // A web extension shows another conversation: the conversation, not a page, a drawer or the workbench over it, is then in front.
@@ -324,35 +233,10 @@ function AppShell() {
324
233
  setSideId('');
325
234
  }
326
235
  }, [shownSession]);
327
- // 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.
328
- const hasCards = extensions.widgets.some(widget => widget.placement === 'panel');
329
- const cardsOpen = extensions.editors.some(candidate => candidate.id === CARDS_TAB_ID);
330
- const openCards = React.useCallback(() => host.open(cardsTab(() => (0, messages_1.message)(settingsStore.state.language, 'ta.workbench.cards'))), [host, settingsStore]);
331
- const quiet = extensions.editors.length === 0 && rightOpen && !editor.collapsed;
332
- // Only when cards come: not when the user closes their tab.
333
- // biome-ignore lint/correctness/useExhaustiveDependencies: follows whether there are cards
334
- React.useEffect(() => {
335
- if (hasCards && !cardsOpen && quiet) {
336
- openCards();
337
- }
338
- }, [hasCards]);
339
- React.useEffect(() => {
340
- if (!hasCards && cardsOpen) {
341
- void host.closeEditor(CARDS_TAB_ID);
342
- }
343
- }, [hasCards, cardsOpen, host]);
344
- const cardsTool = {
345
- id: CARDS_ID,
346
- extension: 'ta',
347
- title: () => (0, messages_1.message)(settingsStore.state.language, 'ta.workbench.cards'),
348
- component: editor_area_1.WorkbenchCards,
349
- icon: lucide_react_1.LayoutGrid,
350
- location: 'panel',
351
- order: 0,
352
- };
236
+ const { hasCards, openCards, cardsTool } = (0, app_shell_hooks_1.useWorkbenchCards)(rightOpen && !editor.collapsed);
353
237
  const view = extensions.views.find(candidate => candidate.id === page && candidate.location === 'page');
354
238
  const sideViews = side_lists_1.SideListUtil.sidebarViews(extensions.views);
355
- const sideView = sideId === FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
239
+ const sideView = sideId === app_shell_hooks_1.FIRST_SIDE ? sideViews[0] : sideViews.find(candidate => candidate.id === sideId);
356
240
  const side = sideView ? sideView.id : '';
357
241
  const showPage = (id) => {
358
242
  host.showPage(id);
@@ -362,7 +246,7 @@ function AppShell() {
362
246
  };
363
247
  const lists = side_lists_1.SideListUtil.of(sideViews, t('ta.chat'));
364
248
  const tools = [...(hasCards ? [cardsTool] : []), ...extensions.views.filter(candidate => candidate.location === 'panel')];
365
- const openTool = (id) => (id === CARDS_ID ? openCards() : host.openView(id));
249
+ const openTool = (id) => (id === app_shell_hooks_1.CARDS_ID ? openCards() : host.openView(id));
366
250
  // The workbench: the tabs open, or the tools that open there.
367
251
  const editors = extensions.editors.length > 0 || tools.length > 0;
368
252
  // The settings take the place of the conversation and of the workbench, as a page of their own.
@@ -376,18 +260,7 @@ function AppShell() {
376
260
  }
377
261
  tabsBefore.current = tabCount;
378
262
  }, [tabCount, showEditors, toggleRight, layout]);
379
- // The drawer of a compact layout comes out from the left edge under the finger, and goes the same way.
380
- (0, sheet_swipe_1.useSheetSwipe)({
381
- enabled: touch && layout === 'compact' && !phone && !showEditors,
382
- open: navOpen,
383
- setOpen: setNavOpen,
384
- side: 'left',
385
- opensFrom: 'edge',
386
- closesFrom: 'anywhere',
387
- sheet: '.ta-nav',
388
- scrim: '.ta-scrim',
389
- settleMs: 240,
390
- });
263
+ (0, app_shell_hooks_1.useDrawerSwipe)(touch && layout === 'compact' && !phone && !showEditors, navOpen, setNavOpen);
391
264
  // The pages of the rail: in the navigation, or under Discover.
392
265
  const navigation = (0, app_nav_1.useNavigation)(extensions.views);
393
266
  // Without a sidebar view that lists the double, its page is the first tab: it opens there, once the views are in.
@@ -404,6 +277,11 @@ function AppShell() {
404
277
  const railView = view && (view === navigation.home || navigation.pages.includes(view)) ? view : undefined;
405
278
  // 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.
406
279
  const tabView = view && (view === navigation.home || navigation.nav.includes(view)) ? view : undefined;
280
+ // A page of the screen, and those in the background beside it, kept as they were.
281
+ const screenPage = settings === undefined && view && !tabView ? view : undefined;
282
+ // The conversation in front, where the tools of the workbench follow its directory; else they are in the default one.
283
+ const conversationShown = phone ? screenOpen && settings === undefined && !screenPage : settings === undefined && tabPage !== 'discover' && !view;
284
+ React.useEffect(() => host.setConversationShown(conversationShown), [host, conversationShown]);
407
285
  const { pageShown } = extensions;
408
286
  // biome-ignore lint/correctness/useExhaustiveDependencies: follows the pages shown
409
287
  React.useEffect(() => {
@@ -467,10 +345,23 @@ function AppShell() {
467
345
  sidebar.reveal();
468
346
  }
469
347
  };
470
- useKeys(toggleSide, openSettings);
471
- useTitlebarColor(workbench.status !== 'signed-out', theme);
348
+ const toggleWorkbench = () => {
349
+ if (showEditors) {
350
+ toggleRight();
351
+ }
352
+ else {
353
+ // Over the settings of a wide screen (the rail, Cmd/Ctrl+J): they give way to what was under them.
354
+ if (!phone && settings !== undefined) {
355
+ setSettings(undefined);
356
+ }
357
+ revealRight();
358
+ editor.reveal();
359
+ }
360
+ };
361
+ (0, app_shell_hooks_1.useKeys)(toggleSide, openSettings, () => editors && toggleWorkbench());
362
+ (0, app_shell_hooks_1.useTitlebarColor)(workbench.status !== 'signed-out', theme);
472
363
  const [providers, reloadProviders] = (0, auth_view_1.useAuthProviders)(online);
473
- const [later, setLater] = (0, hooks_1.usePersisted)(LOGIN_LATER);
364
+ const [later, setLater] = (0, hooks_1.usePersisted)(app_shell_hooks_1.LOGIN_LATER);
474
365
  /** A call failed for want of a sign-in (SIGN_IN_EVENT): the page of sign-in, even if the user put it off. */
475
366
  const [asked, setAsked] = React.useState(false);
476
367
  React.useEffect(() => {
@@ -481,6 +372,8 @@ function AppShell() {
481
372
  window.addEventListener(notices_1.SIGN_IN_EVENT, ask);
482
373
  return () => window.removeEventListener(notices_1.SIGN_IN_EVENT, ask);
483
374
  }, [reloadProviders]);
375
+ /** The page of the double: its own, or the one a sidebar view that lists it opens. */
376
+ const doubleId = (_e = (_b = navigation.home) === null || _b === void 0 ? void 0 : _b.id) !== null && _e !== void 0 ? _e : side_lists_1.DOUBLE_PAGE;
484
377
  if (workbench.status === 'signed-out') {
485
378
  return React.createElement(workbench_view_1.SignIn, { error: workbench.error });
486
379
  }
@@ -496,18 +389,9 @@ function AppShell() {
496
389
  reloadProviders();
497
390
  } }));
498
391
  }
499
- const toggleWorkbench = () => {
500
- if (showEditors) {
501
- toggleRight();
502
- }
503
- else {
504
- revealRight();
505
- editor.reveal();
506
- }
507
- };
508
392
  // What the columns beside the conversation and the editors take, so that the editors never take more than the conversation.
509
393
  const sideWidths = {
510
- '--ta-left': `${RAIL + (sideShown ? sidebar.size : 0)}px`,
394
+ '--ta-left': `${app_shell_hooks_1.RAIL + (sideShown ? sidebar.size : 0)}px`,
511
395
  };
512
396
  const classes = ['ta-app', navOpen && 'ta-nav-open', showEditors && 'ta-editors-open', showEditors && maximized && 'ta-workbench-max'];
513
397
  const toggle = editors ? { open: showEditors, toggle: toggleWorkbench, tabs: extensions.editors.length } : undefined;
@@ -524,7 +408,7 @@ function AppShell() {
524
408
  }
525
409
  };
526
410
  const chats = (React.createElement(assistant_chat_list_1.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 }));
527
- const editorArea = (React.createElement(editor_area_1.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) }));
411
+ const editorArea = (React.createElement(editor_area_1.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 = web_extension_protocol_1.WebCwdUtil.shown(extensions)) !== null && _f !== void 0 ? _f : (_c = workbench.server) === null || _c === void 0 ? void 0 : _c.cwd, maximized: maximized, onMaximize: () => setMaximized(!maximized) }));
528
412
  const overlays = (React.createElement(React.Fragment, null,
529
413
  React.createElement(notice_center_1.NoticeCenter, null),
530
414
  React.createElement(link_dialog_1.LinkDialog, null),
@@ -549,19 +433,44 @@ function AppShell() {
549
433
  }
550
434
  };
551
435
  const discoverView = (leading) => (React.createElement(discover_view_1.DiscoverView, { pages: navigation.discover, onOpen: openDiscovered, onPin: pinDiscovered, onSettings: () => openSettings('navigation'), leading: leading }));
436
+ // A held entry of the navigation talks, without a menu: the double opens and its box listens, the chats open a
437
+ // new conversation whose box does; letting go gives what was said (HeldTalk). Nowhere to talk, they are a tap.
438
+ const talkHold = (place, open) => ({
439
+ start: () => {
440
+ open();
441
+ held_talk_1.HeldTalk.hold(place);
442
+ },
443
+ move: held_talk_1.HeldTalk.point,
444
+ end: held_talk_1.HeldTalk.release,
445
+ cancel: held_talk_1.HeldTalk.cancel,
446
+ });
447
+ const holds = voice_1.Voice.canListen()
448
+ ? {
449
+ double: talkHold('double', () => {
450
+ showPage(doubleId);
451
+ // Over the tabs when a sidebar view lists the double; as a tab of its own elsewhere.
452
+ if (phone) {
453
+ setScreenOpen(!navigation.home);
454
+ }
455
+ }),
456
+ chats: talkHold('draft', () => {
457
+ void chat.draft();
458
+ picked();
459
+ }),
460
+ }
461
+ : {};
552
462
  const tabs = phone
553
463
  ? (0, nav_places_1.phoneTabs)(lists, navigation, {
554
464
  discover: t('ta.discover'),
555
465
  me: t('ta.me'),
556
466
  fold: t('ta.nav.fold'),
557
467
  settings: { label: t('ta.nav.settings'), run: () => openSettings('navigation') },
468
+ holds,
558
469
  })
559
470
  : [];
560
- const tab = tabPage === 'me' ? nav_places_1.ME_TAB : tabPage === 'discover' ? nav_places_1.DISCOVER : ((_c = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _c !== void 0 ? _c : side);
471
+ const tab = tabPage === 'me' ? nav_places_1.ME_TAB : tabPage === 'discover' ? nav_places_1.DISCOVER : ((_g = tabView === null || tabView === void 0 ? void 0 : tabView.id) !== null && _g !== void 0 ? _g : side);
561
472
  // The launcher and the board are over the first tab only, as WeChat's over its chats.
562
- const firstTab = ((_b = tabs[0]) === null || _b === void 0 ? void 0 : _b.id) === tab;
563
- // A page of the screen, and those in the background beside it, kept as they were.
564
- const screenPage = settings === undefined && view && !tabView ? view : undefined;
473
+ const firstTab = ((_d = tabs[0]) === null || _d === void 0 ? void 0 : _d.id) === tab;
565
474
  const content = phone ? (React.createElement(phone_shell_1.PhoneShell, { tabs: tabs, tab: tab, launcher: firstTab && surfaces.launcher ? React.createElement(launcher_surface_1.LauncherSurface, { active: surface === 'launcher' }) : undefined, board: firstTab && surfaces.board ? (React.createElement(board_1.BoardSurface, { leading: React.createElement(icon_1.IconButton, { icon: lucide_react_1.ChevronLeft, label: t('ta.back'), onClick: () => setSurface(undefined) }) })) : undefined, surface: surface, onSurface: setSurface, onTab: id => {
566
475
  var _a;
567
476
  setSurface(undefined);
@@ -583,11 +492,11 @@ function AppShell() {
583
492
  settings !== undefined ? (React.createElement(settings_view_1.SettingsView, { key: settingsOpened, section: settings || undefined, onClose: closeSettings, onBack: closeSettings })) : screenPage ? null : (React.createElement(chat_view_1.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 },
584
493
  navOpen && React.createElement("button", { type: "button", className: "ta-scrim", "aria-label": t('ta.close'), onClick: () => setNavOpen(false) }),
585
494
  React.createElement("div", { className: "ta-nav" },
586
- React.createElement(app_nav_1.Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? nav_places_1.DISCOVER : ((_d = view === null || view === void 0 ? void 0 : view.id) !== null && _d !== void 0 ? _d : ''), onPage: showPage, onDiscover: () => {
495
+ React.createElement(app_nav_1.Rail, { lists: lists, list: sideShown ? side : undefined, onList: showList, navigation: navigation, current: tabPage === 'discover' || (view && navigation.discover.includes(view)) ? nav_places_1.DISCOVER : ((_h = view === null || view === void 0 ? void 0 : view.id) !== null && _h !== void 0 ? _h : ''), onPage: showPage, onDiscover: () => {
587
496
  setSettings(undefined);
588
497
  setNavOpen(false);
589
498
  setTabPage('discover');
590
- }, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface }),
499
+ }, onSettings: openSettings, settingsShown: settings !== undefined, surfaces: surfaces, surface: surface, onSurface: setSurface, holds: holds }),
591
500
  sideShown && (React.createElement("div", { className: "ta-sidebar", style: (0, split_pane_1.paneStyle)(sidebar) },
592
501
  sideView ? React.createElement(app_nav_1.SidebarView, { view: sideView }) : chats,
593
502
  React.createElement(split_pane_1.Sash, { pane: sidebar, side: "start", label: t('ta.layout.sidebar') })))),
@@ -43,7 +43,7 @@ const React = __importStar(require("react"));
43
43
  const react_dom_1 = require("react-dom");
44
44
  const hooks_1 = require("../hooks");
45
45
  const use_t_1 = require("../i18n/use-t");
46
- const workbench_1 = require("../workbench");
46
+ const workbench_util_1 = require("../workbench-util");
47
47
  const auth_pictures_1 = require("./auth-pictures");
48
48
  const callout_1 = require("./callout");
49
49
  const empty_state_1 = require("./empty-state");
@@ -126,7 +126,7 @@ function AuthFlow({ provider, onDone, onBack }) {
126
126
  const t = (0, use_t_1.useT)();
127
127
  const [workbench, bench] = (0, hooks_1.useWorkbench)();
128
128
  // The provider sends the browser back to the machine of ta serve, which is not this one: the address is pasted.
129
- const elsewhere = workbench_1.WorkbenchUtil.elsewhere(workbench.host);
129
+ const elsewhere = workbench_util_1.WorkbenchUtil.elsewhere(workbench.host);
130
130
  const [state, dispatch] = React.useReducer(AuthUtil.reduce, { infos: [] });
131
131
  const [answer, setAnswer] = React.useState('');
132
132
  const loginId = React.useRef(undefined);
@@ -339,7 +339,7 @@ function LoginPage({ onLater, onSignedIn }) {
339
339
  React.createElement("div", { className: "ta-card ta-login-card" },
340
340
  React.createElement(ta_avatar_1.TaAvatar, { size: 72 }),
341
341
  React.createElement("h1", null, t('ta.auth.title')),
342
- React.createElement("p", null, t(workbench_1.WorkbenchUtil.elsewhere(workbench.host) ? 'ta.auth.hintRemote' : 'ta.auth.hint')),
342
+ React.createElement("p", null, t(workbench_util_1.WorkbenchUtil.elsewhere(workbench.host) ? 'ta.auth.hintRemote' : 'ta.auth.hint')),
343
343
  React.createElement(AuthPanel, { kinds: true, onSignedIn: onSignedIn }),
344
344
  React.createElement("button", { type: "button", className: "ta-login-later", onClick: onLater }, t('ta.auth.later')))));
345
345
  }
@@ -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 {