@celljs/ta-web 4.28.0 → 4.30.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 (437) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-thread.js +15 -2
  4. package/esm/browser/assistant/call-scenes.d.ts +5 -4
  5. package/esm/browser/assistant/call-scenes.js +10 -7
  6. package/esm/browser/chat/chat-protocol.d.ts +2 -0
  7. package/esm/browser/chat/chat-shown.d.ts +3 -1
  8. package/esm/browser/chat/chat-shown.js +25 -3
  9. package/esm/browser/chat/chat-view.js +1 -1
  10. package/esm/browser/chat/chat.d.ts +5 -1
  11. package/esm/browser/chat/chat.js +32 -16
  12. package/esm/browser/components/account-menu.d.ts +6 -16
  13. package/esm/browser/components/account-menu.js +47 -101
  14. package/esm/browser/components/app-contexts.js +7 -4
  15. package/esm/browser/components/app-nav.js +4 -4
  16. package/esm/browser/components/chat-list-row.js +7 -2
  17. package/esm/browser/components/chat-tag.d.ts +20 -0
  18. package/esm/browser/components/chat-tag.js +103 -0
  19. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  20. package/esm/browser/components/composer-box-protocol.d.ts +2 -0
  21. package/esm/browser/components/composer-box.js +20 -1
  22. package/esm/browser/components/composer-emoji.d.ts +22 -0
  23. package/esm/browser/components/composer-emoji.js +50 -0
  24. package/esm/browser/components/custom-host.js +1 -1
  25. package/esm/browser/components/discover-view.d.ts +4 -3
  26. package/esm/browser/components/discover-view.js +5 -4
  27. package/esm/browser/components/editor-area.js +1 -1
  28. package/esm/browser/components/emoji-panel.d.ts +22 -0
  29. package/esm/browser/components/emoji-panel.js +54 -0
  30. package/esm/browser/components/host-view.d.ts +1 -1
  31. package/esm/browser/components/launcher-surface.js +1 -1
  32. package/esm/browser/components/markdown.d.ts +6 -1
  33. package/esm/browser/components/markdown.js +6 -2
  34. package/esm/browser/components/me-rows.d.ts +24 -0
  35. package/esm/browser/components/me-rows.js +19 -0
  36. package/esm/browser/components/me-view.d.ts +2 -1
  37. package/esm/browser/components/me-view.js +3 -2
  38. package/esm/browser/components/message-list.js +47 -7
  39. package/esm/browser/components/message-steps.js +13 -0
  40. package/esm/browser/components/nav-places.js +1 -1
  41. package/esm/browser/components/session-view.js +6 -1
  42. package/esm/browser/components/settings-choices.js +3 -0
  43. package/esm/browser/components/settings-controls.d.ts +13 -0
  44. package/esm/browser/components/settings-controls.js +19 -0
  45. package/esm/browser/components/settings-more.d.ts +1 -1
  46. package/esm/browser/components/settings-more.js +28 -39
  47. package/esm/browser/components/settings-parts.d.ts +4 -2
  48. package/esm/browser/components/settings-parts.js +14 -9
  49. package/esm/browser/components/settings-view.js +2 -6
  50. package/esm/browser/components/web-composer.d.ts +1 -1
  51. package/esm/browser/components/web-composer.js +2 -2
  52. package/esm/browser/device/file-save.d.ts +31 -0
  53. package/esm/browser/device/file-save.js +80 -0
  54. package/esm/browser/extension/extension-view.d.ts +9 -0
  55. package/esm/browser/extension/extension-view.js +7 -0
  56. package/esm/browser/extension/icons.js +2 -1
  57. package/esm/browser/extension/web-api-call.d.ts +45 -0
  58. package/esm/browser/extension/web-api-chats.d.ts +29 -0
  59. package/esm/browser/extension/web-api-components.d.ts +4 -0
  60. package/esm/browser/extension/web-api-contributions.d.ts +13 -14
  61. package/esm/browser/extension/web-api-desktop.d.ts +16 -1
  62. package/esm/browser/extension/web-api-desktop.js +1 -0
  63. package/esm/browser/extension/web-extension-api.d.ts +9 -12
  64. package/esm/browser/extension/web-extension-code.d.ts +15 -8
  65. package/esm/browser/extension/web-extension-code.js +25 -27
  66. package/esm/browser/extension/web-extension-context.js +4 -0
  67. package/esm/browser/extension/web-extension-protocol.d.ts +15 -1
  68. package/esm/browser/extension/web-extension-protocol.js +2 -0
  69. package/esm/browser/extension/web-extension-run.d.ts +4 -2
  70. package/esm/browser/extension/web-extension-run.js +10 -4
  71. package/esm/browser/extension/web-extensions-running.d.ts +3 -0
  72. package/esm/browser/extension/web-extensions-running.js +20 -7
  73. package/esm/browser/extension/web-extensions.js +5 -1
  74. package/esm/browser/extension/web-metrics.d.ts +32 -0
  75. package/esm/browser/extension/web-metrics.js +98 -0
  76. package/esm/browser/extension/web-pages.d.ts +2 -0
  77. package/esm/browser/extension/web-pages.js +2 -0
  78. package/esm/browser/i18n/en/account.d.ts +202 -0
  79. package/esm/browser/i18n/en/account.js +205 -0
  80. package/esm/browser/i18n/en/assistant.d.ts +129 -0
  81. package/esm/browser/i18n/en/assistant.js +130 -0
  82. package/esm/browser/i18n/en/call.d.ts +86 -0
  83. package/esm/browser/i18n/en/call.js +87 -0
  84. package/esm/browser/i18n/en/chat.d.ts +213 -0
  85. package/esm/browser/i18n/en/chat.js +214 -0
  86. package/esm/browser/i18n/en/common.d.ts +99 -0
  87. package/esm/browser/i18n/en/common.js +101 -0
  88. package/esm/browser/i18n/en/console.d.ts +230 -0
  89. package/esm/browser/i18n/en/console.js +232 -0
  90. package/esm/browser/i18n/en/discover.d.ts +117 -0
  91. package/esm/browser/i18n/en/discover.js +119 -0
  92. package/esm/browser/i18n/en/service.d.ts +242 -0
  93. package/esm/browser/i18n/en/service.js +245 -0
  94. package/esm/browser/i18n/en/settings.d.ts +213 -0
  95. package/esm/browser/i18n/en/settings.js +214 -0
  96. package/esm/browser/i18n/en/tools.d.ts +85 -0
  97. package/esm/browser/i18n/en/tools.js +87 -0
  98. package/esm/browser/i18n/ja/account.d.ts +2 -0
  99. package/esm/browser/i18n/ja/account.js +202 -0
  100. package/esm/browser/i18n/ja/assistant.d.ts +2 -0
  101. package/esm/browser/i18n/ja/assistant.js +129 -0
  102. package/esm/browser/i18n/ja/call.d.ts +2 -0
  103. package/esm/browser/i18n/ja/call.js +86 -0
  104. package/esm/browser/i18n/ja/chat.d.ts +2 -0
  105. package/esm/browser/i18n/ja/chat.js +213 -0
  106. package/esm/browser/i18n/ja/common.d.ts +2 -0
  107. package/esm/browser/i18n/ja/common.js +99 -0
  108. package/esm/browser/i18n/ja/console.d.ts +2 -0
  109. package/esm/browser/i18n/ja/console.js +230 -0
  110. package/esm/browser/i18n/ja/discover.d.ts +2 -0
  111. package/esm/browser/i18n/ja/discover.js +117 -0
  112. package/esm/browser/i18n/ja/service.d.ts +2 -0
  113. package/esm/browser/i18n/ja/service.js +242 -0
  114. package/esm/browser/i18n/ja/settings.d.ts +2 -0
  115. package/esm/browser/i18n/ja/settings.js +213 -0
  116. package/esm/browser/i18n/ja/tools.d.ts +2 -0
  117. package/esm/browser/i18n/ja/tools.js +85 -0
  118. package/esm/browser/i18n/locales.d.ts +1136 -1136
  119. package/esm/browser/i18n/messages-ja.js +20 -1586
  120. package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
  121. package/esm/browser/i18n/messages-zh-tw.js +20 -1587
  122. package/esm/browser/i18n/messages.d.ts +1139 -1136
  123. package/esm/browser/i18n/messages.js +44 -3183
  124. package/esm/browser/i18n/zh/account.d.ts +2 -0
  125. package/esm/browser/i18n/zh/account.js +203 -0
  126. package/esm/browser/i18n/zh/assistant.d.ts +2 -0
  127. package/esm/browser/i18n/zh/assistant.js +129 -0
  128. package/esm/browser/i18n/zh/call.d.ts +2 -0
  129. package/esm/browser/i18n/zh/call.js +86 -0
  130. package/esm/browser/i18n/zh/chat.d.ts +2 -0
  131. package/esm/browser/i18n/zh/chat.js +213 -0
  132. package/esm/browser/i18n/zh/common.d.ts +2 -0
  133. package/esm/browser/i18n/zh/common.js +99 -0
  134. package/esm/browser/i18n/zh/console.d.ts +2 -0
  135. package/esm/browser/i18n/zh/console.js +230 -0
  136. package/esm/browser/i18n/zh/discover.d.ts +2 -0
  137. package/esm/browser/i18n/zh/discover.js +117 -0
  138. package/esm/browser/i18n/zh/service.d.ts +2 -0
  139. package/esm/browser/i18n/zh/service.js +242 -0
  140. package/esm/browser/i18n/zh/settings.d.ts +2 -0
  141. package/esm/browser/i18n/zh/settings.js +213 -0
  142. package/esm/browser/i18n/zh/tools.d.ts +2 -0
  143. package/esm/browser/i18n/zh/tools.js +86 -0
  144. package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
  145. package/esm/browser/i18n/zh-tw/account.js +202 -0
  146. package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
  147. package/esm/browser/i18n/zh-tw/assistant.js +129 -0
  148. package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
  149. package/esm/browser/i18n/zh-tw/call.js +86 -0
  150. package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
  151. package/esm/browser/i18n/zh-tw/chat.js +213 -0
  152. package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
  153. package/esm/browser/i18n/zh-tw/common.js +99 -0
  154. package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
  155. package/esm/browser/i18n/zh-tw/console.js +230 -0
  156. package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
  157. package/esm/browser/i18n/zh-tw/discover.js +117 -0
  158. package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
  159. package/esm/browser/i18n/zh-tw/service.js +242 -0
  160. package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
  161. package/esm/browser/i18n/zh-tw/settings.js +213 -0
  162. package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
  163. package/esm/browser/i18n/zh-tw/tools.js +85 -0
  164. package/esm/browser/offline/device-values.d.ts +4 -0
  165. package/esm/browser/offline/device-values.js +10 -0
  166. package/esm/browser/pwa/page-build.d.ts +15 -0
  167. package/esm/browser/pwa/page-build.js +45 -0
  168. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  169. package/esm/browser/settings/settings-protocol.js +2 -0
  170. package/esm/browser/style/base.d.ts +1 -1
  171. package/esm/browser/style/base.js +3 -0
  172. package/esm/browser/style/chat-list.d.ts +1 -1
  173. package/esm/browser/style/chat-list.js +6 -0
  174. package/esm/browser/style/conversation-column.d.ts +1 -1
  175. package/esm/browser/style/conversation-column.js +17 -0
  176. package/esm/browser/style/conversation.d.ts +1 -1
  177. package/esm/browser/style/conversation.js +5 -0
  178. package/esm/browser/style/pages.d.ts +1 -1
  179. package/esm/browser/style/pages.js +0 -7
  180. package/esm/browser/style/video-call.d.ts +1 -1
  181. package/esm/browser/style/video-call.js +15 -4
  182. package/esm/browser/util/call-transcript.d.ts +16 -0
  183. package/esm/browser/util/call-transcript.js +110 -0
  184. package/esm/browser/util/process.d.ts +6 -0
  185. package/esm/browser/util/process.js +18 -5
  186. package/esm/browser/video-call/call-people.d.ts +21 -0
  187. package/esm/browser/video-call/call-people.js +29 -0
  188. package/esm/browser/video-call/clip-plan.d.ts +11 -2
  189. package/esm/browser/video-call/clip-plan.js +19 -3
  190. package/esm/browser/video-call/face-camera.d.ts +93 -0
  191. package/esm/browser/video-call/face-camera.js +192 -0
  192. package/esm/browser/video-call/face-files.d.ts +43 -5
  193. package/esm/browser/video-call/face-files.js +73 -18
  194. package/esm/browser/video-call/face-moves.d.ts +68 -0
  195. package/esm/browser/video-call/face-moves.js +180 -0
  196. package/esm/browser/video-call/face-stage.d.ts +139 -0
  197. package/esm/browser/video-call/face-stage.js +219 -0
  198. package/esm/browser/video-call/mouth-layer.d.ts +81 -0
  199. package/esm/browser/video-call/mouth-layer.js +241 -0
  200. package/esm/browser/video-call/video-call-view.js +44 -4
  201. package/esm/browser/video-call/video-face.d.ts +11 -5
  202. package/esm/browser/video-call/video-face.js +302 -328
  203. package/esm/browser/workbench.d.ts +8 -0
  204. package/esm/browser/workbench.js +37 -1
  205. package/lib/browser/assistant/assistant-thread.js +15 -2
  206. package/lib/browser/assistant/call-scenes.d.ts +5 -4
  207. package/lib/browser/assistant/call-scenes.js +10 -7
  208. package/lib/browser/chat/chat-protocol.d.ts +2 -0
  209. package/lib/browser/chat/chat-shown.d.ts +3 -1
  210. package/lib/browser/chat/chat-shown.js +25 -3
  211. package/lib/browser/chat/chat-view.js +1 -1
  212. package/lib/browser/chat/chat.d.ts +5 -1
  213. package/lib/browser/chat/chat.js +32 -16
  214. package/lib/browser/components/account-menu.d.ts +6 -16
  215. package/lib/browser/components/account-menu.js +45 -99
  216. package/lib/browser/components/app-contexts.js +6 -3
  217. package/lib/browser/components/app-nav.js +4 -4
  218. package/lib/browser/components/chat-list-row.js +7 -2
  219. package/lib/browser/components/chat-tag.d.ts +21 -0
  220. package/lib/browser/components/chat-tag.js +142 -0
  221. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  222. package/lib/browser/components/composer-box-protocol.d.ts +2 -0
  223. package/lib/browser/components/composer-box.js +20 -1
  224. package/lib/browser/components/composer-emoji.d.ts +23 -0
  225. package/lib/browser/components/composer-emoji.js +87 -0
  226. package/lib/browser/components/custom-host.js +1 -1
  227. package/lib/browser/components/discover-view.d.ts +4 -3
  228. package/lib/browser/components/discover-view.js +5 -4
  229. package/lib/browser/components/editor-area.js +1 -1
  230. package/lib/browser/components/emoji-panel.d.ts +23 -0
  231. package/lib/browser/components/emoji-panel.js +90 -0
  232. package/lib/browser/components/host-view.d.ts +1 -1
  233. package/lib/browser/components/launcher-surface.js +1 -1
  234. package/lib/browser/components/markdown.d.ts +6 -1
  235. package/lib/browser/components/markdown.js +6 -2
  236. package/lib/browser/components/me-rows.d.ts +25 -0
  237. package/lib/browser/components/me-rows.js +22 -0
  238. package/lib/browser/components/me-view.d.ts +2 -1
  239. package/lib/browser/components/me-view.js +3 -2
  240. package/lib/browser/components/message-list.js +46 -6
  241. package/lib/browser/components/message-steps.js +13 -0
  242. package/lib/browser/components/nav-places.js +1 -1
  243. package/lib/browser/components/session-view.js +6 -1
  244. package/lib/browser/components/settings-choices.js +3 -0
  245. package/lib/browser/components/settings-controls.d.ts +13 -0
  246. package/lib/browser/components/settings-controls.js +19 -0
  247. package/lib/browser/components/settings-more.d.ts +1 -1
  248. package/lib/browser/components/settings-more.js +27 -38
  249. package/lib/browser/components/settings-parts.d.ts +4 -2
  250. package/lib/browser/components/settings-parts.js +13 -8
  251. package/lib/browser/components/settings-view.js +2 -6
  252. package/lib/browser/components/web-composer.d.ts +1 -1
  253. package/lib/browser/components/web-composer.js +2 -2
  254. package/lib/browser/device/file-save.d.ts +32 -0
  255. package/lib/browser/device/file-save.js +83 -0
  256. package/lib/browser/extension/extension-view.d.ts +9 -0
  257. package/lib/browser/extension/extension-view.js +8 -1
  258. package/lib/browser/extension/icons.js +1 -0
  259. package/lib/browser/extension/web-api-call.d.ts +45 -0
  260. package/lib/browser/extension/web-api-chats.d.ts +29 -0
  261. package/lib/browser/extension/web-api-components.d.ts +4 -0
  262. package/lib/browser/extension/web-api-contributions.d.ts +13 -14
  263. package/lib/browser/extension/web-api-desktop.d.ts +16 -1
  264. package/lib/browser/extension/web-api-desktop.js +1 -0
  265. package/lib/browser/extension/web-extension-api.d.ts +9 -12
  266. package/lib/browser/extension/web-extension-code.d.ts +15 -8
  267. package/lib/browser/extension/web-extension-code.js +25 -27
  268. package/lib/browser/extension/web-extension-context.js +4 -0
  269. package/lib/browser/extension/web-extension-protocol.d.ts +15 -1
  270. package/lib/browser/extension/web-extension-protocol.js +2 -0
  271. package/lib/browser/extension/web-extension-run.d.ts +4 -2
  272. package/lib/browser/extension/web-extension-run.js +10 -4
  273. package/lib/browser/extension/web-extensions-running.d.ts +3 -0
  274. package/lib/browser/extension/web-extensions-running.js +20 -7
  275. package/lib/browser/extension/web-extensions.js +5 -1
  276. package/lib/browser/extension/web-metrics.d.ts +33 -0
  277. package/lib/browser/extension/web-metrics.js +102 -0
  278. package/lib/browser/extension/web-pages.d.ts +2 -0
  279. package/lib/browser/extension/web-pages.js +2 -0
  280. package/lib/browser/i18n/en/account.d.ts +203 -0
  281. package/lib/browser/i18n/en/account.js +208 -0
  282. package/lib/browser/i18n/en/assistant.d.ts +130 -0
  283. package/lib/browser/i18n/en/assistant.js +133 -0
  284. package/lib/browser/i18n/en/call.d.ts +87 -0
  285. package/lib/browser/i18n/en/call.js +90 -0
  286. package/lib/browser/i18n/en/chat.d.ts +214 -0
  287. package/lib/browser/i18n/en/chat.js +217 -0
  288. package/lib/browser/i18n/en/common.d.ts +100 -0
  289. package/lib/browser/i18n/en/common.js +104 -0
  290. package/lib/browser/i18n/en/console.d.ts +231 -0
  291. package/lib/browser/i18n/en/console.js +235 -0
  292. package/lib/browser/i18n/en/discover.d.ts +118 -0
  293. package/lib/browser/i18n/en/discover.js +122 -0
  294. package/lib/browser/i18n/en/service.d.ts +243 -0
  295. package/lib/browser/i18n/en/service.js +248 -0
  296. package/lib/browser/i18n/en/settings.d.ts +214 -0
  297. package/lib/browser/i18n/en/settings.js +217 -0
  298. package/lib/browser/i18n/en/tools.d.ts +86 -0
  299. package/lib/browser/i18n/en/tools.js +90 -0
  300. package/lib/browser/i18n/ja/account.d.ts +3 -0
  301. package/lib/browser/i18n/ja/account.js +205 -0
  302. package/lib/browser/i18n/ja/assistant.d.ts +3 -0
  303. package/lib/browser/i18n/ja/assistant.js +132 -0
  304. package/lib/browser/i18n/ja/call.d.ts +3 -0
  305. package/lib/browser/i18n/ja/call.js +89 -0
  306. package/lib/browser/i18n/ja/chat.d.ts +3 -0
  307. package/lib/browser/i18n/ja/chat.js +216 -0
  308. package/lib/browser/i18n/ja/common.d.ts +3 -0
  309. package/lib/browser/i18n/ja/common.js +102 -0
  310. package/lib/browser/i18n/ja/console.d.ts +3 -0
  311. package/lib/browser/i18n/ja/console.js +233 -0
  312. package/lib/browser/i18n/ja/discover.d.ts +3 -0
  313. package/lib/browser/i18n/ja/discover.js +120 -0
  314. package/lib/browser/i18n/ja/service.d.ts +3 -0
  315. package/lib/browser/i18n/ja/service.js +245 -0
  316. package/lib/browser/i18n/ja/settings.d.ts +3 -0
  317. package/lib/browser/i18n/ja/settings.js +216 -0
  318. package/lib/browser/i18n/ja/tools.d.ts +3 -0
  319. package/lib/browser/i18n/ja/tools.js +88 -0
  320. package/lib/browser/i18n/locales.d.ts +1136 -1136
  321. package/lib/browser/i18n/messages-ja.js +20 -1586
  322. package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
  323. package/lib/browser/i18n/messages-zh-tw.js +20 -1587
  324. package/lib/browser/i18n/messages.d.ts +1139 -1136
  325. package/lib/browser/i18n/messages.js +44 -3183
  326. package/lib/browser/i18n/zh/account.d.ts +3 -0
  327. package/lib/browser/i18n/zh/account.js +206 -0
  328. package/lib/browser/i18n/zh/assistant.d.ts +3 -0
  329. package/lib/browser/i18n/zh/assistant.js +132 -0
  330. package/lib/browser/i18n/zh/call.d.ts +3 -0
  331. package/lib/browser/i18n/zh/call.js +89 -0
  332. package/lib/browser/i18n/zh/chat.d.ts +3 -0
  333. package/lib/browser/i18n/zh/chat.js +216 -0
  334. package/lib/browser/i18n/zh/common.d.ts +3 -0
  335. package/lib/browser/i18n/zh/common.js +102 -0
  336. package/lib/browser/i18n/zh/console.d.ts +3 -0
  337. package/lib/browser/i18n/zh/console.js +233 -0
  338. package/lib/browser/i18n/zh/discover.d.ts +3 -0
  339. package/lib/browser/i18n/zh/discover.js +120 -0
  340. package/lib/browser/i18n/zh/service.d.ts +3 -0
  341. package/lib/browser/i18n/zh/service.js +245 -0
  342. package/lib/browser/i18n/zh/settings.d.ts +3 -0
  343. package/lib/browser/i18n/zh/settings.js +216 -0
  344. package/lib/browser/i18n/zh/tools.d.ts +3 -0
  345. package/lib/browser/i18n/zh/tools.js +89 -0
  346. package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
  347. package/lib/browser/i18n/zh-tw/account.js +205 -0
  348. package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
  349. package/lib/browser/i18n/zh-tw/assistant.js +132 -0
  350. package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
  351. package/lib/browser/i18n/zh-tw/call.js +89 -0
  352. package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
  353. package/lib/browser/i18n/zh-tw/chat.js +216 -0
  354. package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
  355. package/lib/browser/i18n/zh-tw/common.js +102 -0
  356. package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
  357. package/lib/browser/i18n/zh-tw/console.js +233 -0
  358. package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
  359. package/lib/browser/i18n/zh-tw/discover.js +120 -0
  360. package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
  361. package/lib/browser/i18n/zh-tw/service.js +245 -0
  362. package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
  363. package/lib/browser/i18n/zh-tw/settings.js +216 -0
  364. package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
  365. package/lib/browser/i18n/zh-tw/tools.js +88 -0
  366. package/lib/browser/offline/device-values.d.ts +4 -0
  367. package/lib/browser/offline/device-values.js +10 -0
  368. package/lib/browser/pwa/page-build.d.ts +16 -0
  369. package/lib/browser/pwa/page-build.js +48 -0
  370. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  371. package/lib/browser/settings/settings-protocol.js +2 -0
  372. package/lib/browser/style/base.d.ts +1 -1
  373. package/lib/browser/style/base.js +3 -0
  374. package/lib/browser/style/chat-list.d.ts +1 -1
  375. package/lib/browser/style/chat-list.js +6 -0
  376. package/lib/browser/style/conversation-column.d.ts +1 -1
  377. package/lib/browser/style/conversation-column.js +17 -0
  378. package/lib/browser/style/conversation.d.ts +1 -1
  379. package/lib/browser/style/conversation.js +5 -0
  380. package/lib/browser/style/pages.d.ts +1 -1
  381. package/lib/browser/style/pages.js +0 -7
  382. package/lib/browser/style/video-call.d.ts +1 -1
  383. package/lib/browser/style/video-call.js +15 -4
  384. package/lib/browser/util/call-transcript.d.ts +17 -0
  385. package/lib/browser/util/call-transcript.js +113 -0
  386. package/lib/browser/util/process.d.ts +6 -0
  387. package/lib/browser/util/process.js +17 -4
  388. package/lib/browser/video-call/call-people.d.ts +22 -0
  389. package/lib/browser/video-call/call-people.js +32 -0
  390. package/lib/browser/video-call/clip-plan.d.ts +11 -2
  391. package/lib/browser/video-call/clip-plan.js +19 -3
  392. package/lib/browser/video-call/face-camera.d.ts +94 -0
  393. package/lib/browser/video-call/face-camera.js +197 -0
  394. package/lib/browser/video-call/face-files.d.ts +43 -5
  395. package/lib/browser/video-call/face-files.js +73 -18
  396. package/lib/browser/video-call/face-moves.d.ts +69 -0
  397. package/lib/browser/video-call/face-moves.js +184 -0
  398. package/lib/browser/video-call/face-stage.d.ts +140 -0
  399. package/lib/browser/video-call/face-stage.js +223 -0
  400. package/lib/browser/video-call/mouth-layer.d.ts +82 -0
  401. package/lib/browser/video-call/mouth-layer.js +245 -0
  402. package/lib/browser/video-call/video-call-view.js +44 -4
  403. package/lib/browser/video-call/video-face.d.ts +11 -5
  404. package/lib/browser/video-call/video-face.js +302 -328
  405. package/lib/browser/workbench.d.ts +8 -0
  406. package/lib/browser/workbench.js +36 -0
  407. package/package.json +7 -7
  408. package/public/faces/README.md +17 -4
  409. package/public/faces/blonde/clap.mp4 +0 -0
  410. package/public/faces/blonde/dance.mp4 +0 -0
  411. package/public/faces/blonde/face.jpg +0 -0
  412. package/public/faces/blonde/happy.mp4 +0 -0
  413. package/public/faces/blonde/heart.mp4 +0 -0
  414. package/public/faces/blonde/idle-1.mp4 +0 -0
  415. package/public/faces/blonde/idle-2.mp4 +0 -0
  416. package/public/faces/blonde/idle-3.mp4 +0 -0
  417. package/public/faces/blonde/laugh.mp4 +0 -0
  418. package/public/faces/blonde/listening.mp4 +0 -0
  419. package/public/faces/blonde/poster.jpg +0 -0
  420. package/public/faces/blonde/shy.mp4 +0 -0
  421. package/public/faces/blonde/sorry.mp4 +0 -0
  422. package/public/faces/blonde/stretch.mp4 +0 -0
  423. package/public/faces/blonde/surprised.mp4 +0 -0
  424. package/public/faces/blonde/talk-1.mp4 +0 -0
  425. package/public/faces/blonde/talk-2.mp4 +0 -0
  426. package/public/faces/blonde/think-2.mp4 +0 -0
  427. package/public/faces/blonde/thinking.mp4 +0 -0
  428. package/public/faces/blonde/wave.mp4 +0 -0
  429. package/public/faces/dance.mp4 +0 -0
  430. package/public/faces/face.jpg +0 -0
  431. package/public/faces/framing.json +1 -0
  432. package/public/faces/lips.json +1 -1
  433. package/public/faces/stretch.mp4 +0 -0
  434. package/esm/browser/video-call/face-clips.d.ts +0 -33
  435. package/esm/browser/video-call/face-clips.js +0 -93
  436. package/lib/browser/video-call/face-clips.d.ts +0 -34
  437. package/lib/browser/video-call/face-clips.js +0 -96
@@ -1,11 +1,13 @@
1
1
  import { TaConnection } from '@celljs/ta-client';
2
2
  import { type TaServerInfo } from '@celljs/ta-protocol';
3
+ import { TaCallKeeper } from './assistant/call-keeper.js';
3
4
  import { PresenceReporter } from './presence/presence-reporter.js';
4
5
  import { PageAnswers } from './screen/page-answers.js';
5
6
  import { WorkbenchCalls } from './workbench-calls.js';
6
7
  import { WorkbenchHosts } from './workbench-hosts.js';
7
8
  import { type Credential, TaWorkbench, type WorkbenchState } from './workbench-protocol.js';
8
9
  export declare class TaWorkbenchImpl extends WorkbenchHosts implements TaWorkbench {
10
+ protected readonly callKeeper?: TaCallKeeper;
9
11
  /** Signed out from the first frame when nothing is there to sign in with: the sign-in, not the app for a moment before it. */
10
12
  protected current: WorkbenchState;
11
13
  /** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
@@ -82,6 +84,12 @@ export declare class TaWorkbenchImpl extends WorkbenchHosts implements TaWorkben
82
84
  * page was not seen gets its grace from now.
83
85
  */
84
86
  protected watchWake(): void;
87
+ /**
88
+ * The page is of another build than ta serve serves now (PageBuild): it loads again, once no call goes on (the
89
+ * window of a video call is drawn by this page, and would go on with the scripts of before). Not the app, which
90
+ * carries the page it was built with.
91
+ */
92
+ protected checkPage(): Promise<void>;
85
93
  /** Whether another build of Ta was installed since (TaServerInfo.update), read while the page is seen. */
86
94
  protected checkUpdate(): Promise<void>;
87
95
  protected update(change: Partial<WorkbenchState>): void;
@@ -4,12 +4,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { Component } from '@celljs/core';
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Autowired, Component } from '@celljs/core';
8
11
  import { TaConnection } from '@celljs/ta-client';
9
12
  import { TaErrorCode, TaRoomWatchUtil } from '@celljs/ta-protocol';
10
13
  import { RelayRouteSocket } from '@celljs/ta-relay';
14
+ import { TaCallKeeper } from './assistant/call-keeper.js';
11
15
  import { HostUtil } from './hosts.js';
12
16
  import { PresenceReporter } from './presence/presence-reporter.js';
17
+ import { PageBuild } from './pwa/page-build.js';
13
18
  import { PageAnswers } from './screen/page-answers.js';
14
19
  import { ScreenUtil } from './screen/screen-protocol.js';
15
20
  import { DesktopUtil } from './util/desktop.js';
@@ -313,6 +318,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl extends WorkbenchHosts {
313
318
  this.update({ status: 'online', error: undefined, retryAt: undefined, server });
314
319
  this.presence.resend();
315
320
  this.pages.tell();
321
+ void this.checkPage();
316
322
  await this.refresh();
317
323
  }
318
324
  /** A connection to the computer of `credential`, not opened yet, and whether that computer refused it once it failed. */
@@ -447,8 +453,34 @@ let TaWorkbenchImpl = class TaWorkbenchImpl extends WorkbenchHosts {
447
453
  window.addEventListener('pageshow', wake);
448
454
  setInterval(() => void this.checkUpdate(), UPDATE_CHECK_MS);
449
455
  }
456
+ /**
457
+ * The page is of another build than ta serve serves now (PageBuild): it loads again, once no call goes on (the
458
+ * window of a video call is drawn by this page, and would go on with the scripts of before). Not the app, which
459
+ * carries the page it was built with.
460
+ */
461
+ async checkPage() {
462
+ var _a;
463
+ if (typeof document === 'undefined' || WorkbenchUtil.isApp() || this.restart) {
464
+ return;
465
+ }
466
+ const own = PageBuild.own(document);
467
+ if (!own || !PageBuild.stale(own, await PageBuild.served(document.baseURI))) {
468
+ return;
469
+ }
470
+ if ((_a = this.callKeeper) === null || _a === void 0 ? void 0 : _a.kept) {
471
+ return;
472
+ }
473
+ // Once for a build: a page that loads again into the same build of before (a cache) does not go round.
474
+ const key = 'ta.pageBuild.reloaded';
475
+ if (sessionStorage.getItem(key) === own) {
476
+ return;
477
+ }
478
+ sessionStorage.setItem(key, own);
479
+ this.reload();
480
+ }
450
481
  /** Whether another build of Ta was installed since (TaServerInfo.update), read while the page is seen. */
451
482
  async checkUpdate() {
483
+ void this.checkPage();
452
484
  const connection = this.connection;
453
485
  if (!connection || this.current.status !== 'online' || this.restart || document.visibilityState === 'hidden') {
454
486
  return;
@@ -503,6 +535,10 @@ let TaWorkbenchImpl = class TaWorkbenchImpl extends WorkbenchHosts {
503
535
  }
504
536
  }
505
537
  };
538
+ __decorate([
539
+ Autowired({ id: TaCallKeeper, detached: true }),
540
+ __metadata("design:type", Object)
541
+ ], TaWorkbenchImpl.prototype, "callKeeper", void 0);
506
542
  TaWorkbenchImpl = __decorate([
507
543
  Component(TaWorkbench)
508
544
  ], TaWorkbenchImpl);
@@ -74,7 +74,7 @@ function DoubleTurn({ item, latest, children }) {
74
74
  function DoubleUserMessage({ message, blocks }) {
75
75
  const { text, copied, skill } = (0, message_user_1.userWords)(blocks);
76
76
  const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({ kind: 'user', message, text: copied });
77
- return (React.createElement("div", { className: `ta-msg-user ${conversation_scroll_util_1.ASK_CLASS}`, onContextMenu: onContextMenu },
77
+ return (React.createElement("div", { className: "ta-msg-user", onContextMenu: onContextMenu },
78
78
  React.createElement(message_user_1.UserMarks, { blocks: blocks }),
79
79
  skill && React.createElement(message_user_1.SkillUse, { skill: skill }),
80
80
  React.createElement(message_user_1.UserSaid, { blocks: blocks, text: text, bubble: "ta-msg-bubble", timestamp: message.timestamp }),
@@ -118,6 +118,18 @@ function DoubleRowView({ item, tools, mood, status, latest, started, onTask, t }
118
118
  }
119
119
  return React.createElement(DoubleUserMessage, { message: item.message, blocks: blocks });
120
120
  }
121
+ /**
122
+ * Whether the row of `item` is what the user said (DoubleUserMessage), not a task's note nor a notice: marked on the
123
+ * row itself (ASK_CLASS), as in any conversation. Marked inside it, the view would go by the place of the message in its
124
+ * row while the row comes in with a motion (its transform makes it the offsetParent), to the top of the thread first.
125
+ */
126
+ function isAskRow(item) {
127
+ if (item.kind !== 'message' || item.message.role !== 'user') {
128
+ return false;
129
+ }
130
+ const text = message_1.MessageUtil.text(message_1.MessageUtil.blocks(item.message)).trim();
131
+ return !assistant_task_util_1.AssistantTaskUtil.noteOf(text) && !ta_protocol_1.TaMessageSource.isNotice(text);
132
+ }
121
133
  function sameTasks(a, b) {
122
134
  return a.length === b.length && a.every((task, index) => task === b[index]);
123
135
  }
@@ -139,6 +151,7 @@ exports.AssistantThread = React.memo(function AssistantThread({ state, reply, ta
139
151
  const renderers = React.useContext(extension_view_1.MessageRenderers);
140
152
  const items = React.useMemo(() => process_1.ProcessUtil.items(state.messages, state.working, state.start, renderers, state.head), [state.messages, state.working, state.start, renderers, state.head]);
141
153
  const starts = React.useMemo(() => process_1.ProcessUtil.starts(items), [items]);
154
+ const asks = React.useMemo(() => items.map(isAskRow), [items]);
142
155
  const breaks = React.useMemo(() => process_1.ProcessUtil.timeBreaks(starts, index => process_1.ProcessUtil.shown(items[index], renderers)), [starts, items, renderers]);
143
156
  // A turn's cards know what the user said after it: a choice they asked for is made (message-list.tsx).
144
157
  const answers = React.useMemo(() => process_1.ProcessUtil.answers(items, message => (0, message_user_1.userWords)(message_1.MessageUtil.blocks(message)).copied), [items]);
@@ -162,7 +175,7 @@ exports.AssistantThread = React.memo(function AssistantThread({ state, reply, ta
162
175
  }
163
176
  const turn = item.kind === 'turn';
164
177
  const started = turn ? web_tasks_1.WebTaskUtil.startedIn(own, origin, starts[index], (_a = starts[index + 1]) !== null && _a !== void 0 ? _a : Number.POSITIVE_INFINITY) : NO_TASKS;
165
- return (React.createElement("div", { key: item.key, "data-row": item.key, className: shown.className(index) },
178
+ return (React.createElement("div", { key: item.key, "data-row": item.key, className: shown.className(index, asks[index] && conversation_scroll_util_1.ASK_CLASS) },
166
179
  breaks[index] !== undefined && React.createElement(message_footer_1.TimeBreak, { timestamp: breaks[index] }),
167
180
  React.createElement(code_renderers_1.CodeAnswer.Provider, { value: answers[index] },
168
181
  React.createElement(DoubleRow, { item: item, tools: state.tools, mood: turn ? process_1.ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn, started: started, onTask: onTask, t: t }))));
@@ -1,9 +1,10 @@
1
- import { type TaCallScene, type TaCallView } from '@celljs/ta-protocol';
1
+ import { type TaCallOwnMove, type TaCallScene, type TaCallView } from '@celljs/ta-protocol';
2
2
  import type { VoiceCall } from './voice-call';
3
- /** What the view of a call shows of it now (VideoCallView): the user's camera, and how the call shows. */
3
+ /** What the view of a call shows of it now (VideoCallView): the user's camera, how the call shows, what she can do (VideoFace). */
4
4
  interface Shown {
5
5
  camera?: boolean;
6
6
  view?: TaCallView;
7
+ moves?: TaCallOwnMove[];
7
8
  }
8
9
  /**
9
10
  * How a call is for the user (TaCallScene, docs/design/ta-call.md 13), from the call (video or voice, when it began),
@@ -12,8 +13,8 @@ interface Shown {
12
13
  */
13
14
  export declare namespace CallScenes {
14
15
  function of(call: VoiceCall, device: TaCallScene['device']): TaCallScene;
15
- /** The view of the call shows this now. */
16
- function show(call: VoiceCall, now: Shown): void;
16
+ /** The view of the call shows this now (what it names; the rest as it was). */
17
+ function show(call: VoiceCall, part: Shown): void;
17
18
  /** Tells `changed` the scene of `call` as it changes and stays so a moment; until what it returns is called. */
18
19
  function watch(call: VoiceCall, device: TaCallScene['device'], changed: (scene: TaCallScene) => void): () => void;
19
20
  /**
@@ -17,25 +17,28 @@ var CallScenes;
17
17
  const told = new WeakMap();
18
18
  function of(call, device) {
19
19
  var _a, _b;
20
- const { camera, view } = (_a = shown.get(call)) !== null && _a !== void 0 ? _a : {};
20
+ const { camera, view, moves } = (_a = shown.get(call)) !== null && _a !== void 0 ? _a : {};
21
21
  return {
22
22
  video: call.state.video === true,
23
23
  ...(call.state.video && camera ? { camera } : {}),
24
24
  ...(call.state.video && view ? { view } : {}),
25
25
  ...(device ? { device } : {}),
26
26
  since: (_b = call.state.since) !== null && _b !== void 0 ? _b : Date.now(),
27
+ ...(call.state.video && (moves === null || moves === void 0 ? void 0 : moves.length) ? { moves } : {}),
27
28
  };
28
29
  }
29
30
  CallScenes.of = of;
30
- /** The view of the call shows this now. */
31
- function show(call, now) {
32
- var _a;
33
- const before = shown.get(call);
34
- if ((before === null || before === void 0 ? void 0 : before.camera) === now.camera && (before === null || before === void 0 ? void 0 : before.view) === now.view) {
31
+ /** The view of the call shows this now (what it names; the rest as it was). */
32
+ function show(call, part) {
33
+ var _a, _b;
34
+ const before = (_a = shown.get(call)) !== null && _a !== void 0 ? _a : {};
35
+ const now = { ...before, ...part };
36
+ const key = (value) => JSON.stringify([value.camera, value.view, value.moves]);
37
+ if (key(before) === key(now)) {
35
38
  return;
36
39
  }
37
40
  shown.set(call, now);
38
- for (const listener of [...((_a = listeners.get(call)) !== null && _a !== void 0 ? _a : [])]) {
41
+ for (const listener of [...((_b = listeners.get(call)) !== null && _b !== void 0 ? _b : [])]) {
39
42
  listener();
40
43
  }
41
44
  }
@@ -17,6 +17,8 @@ export interface ChatDraft {
17
17
  sending?: {
18
18
  message: string;
19
19
  images?: ImageContent[];
20
+ /** Of this first message and its opening (openId, clientMessageId): sent again, it opens and runs once. */
21
+ id: string;
20
22
  failed?: string;
21
23
  heldAt?: number;
22
24
  };
@@ -46,7 +46,9 @@ export declare abstract class ChatShown {
46
46
  protected attach({ sessionId, attachment }: {
47
47
  sessionId: string;
48
48
  attachment?: TaAttachResult;
49
- }, send?: (store: SessionStore) => Promise<unknown>, sessionFile?: string): Promise<void>;
49
+ }, send?: (store: SessionStore) => Promise<unknown>, sessionFile?: string, wanted?: () => boolean): Promise<void>;
50
+ /** A store attached for a conversation no longer shown: detached, and kept to show again at once. */
51
+ protected putAway(store: SessionStore, tools: string): void;
50
52
  /**
51
53
  * The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
52
54
  * showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
@@ -75,17 +75,21 @@ class ChatShown {
75
75
  * switching does not flash an empty page. `attachment`: what opening it attached already (ChatStores.open),
76
76
  * taken by the store in the same turn of the event loop, so that no event after it is missed.
77
77
  */
78
- async attach({ sessionId, attachment }, send, sessionFile) {
78
+ async attach({ sessionId, attachment }, send, sessionFile, wanted) {
79
79
  var _a;
80
80
  var _b;
81
81
  const tools = this.stores.toolNames();
82
82
  const file = sessionFile !== null && sessionFile !== void 0 ? sessionFile : this.stores.fileOf(sessionId);
83
+ // Something else picked meanwhile (another conversation, a new one): this one is kept, not shown over it.
84
+ // `wanted`: whether what the caller was asked for is still what is wanted, from before it opened the session.
85
+ const asked = this.wanted;
86
+ const still = wanted !== null && wanted !== void 0 ? wanted : (() => this.wanted === asked);
83
87
  const shown = this.current.store;
84
88
  // Shown already, from the device before the connection: attached now, as it is.
85
89
  const early = (shown === null || shown === void 0 ? void 0 : shown.sessionId) === sessionId && !this.stores.isAttached(shown) && this.stores.toolsOf(shown) === tools ? shown : undefined;
86
90
  const kept = early !== null && early !== void 0 ? early : this.stores.recent.take(sessionId, tools);
87
91
  if (kept && this.stores.listed(sessionId)) {
88
- if (!early) {
92
+ if (!early && still()) {
89
93
  this.enter(kept, file);
90
94
  }
91
95
  try {
@@ -97,6 +101,9 @@ class ChatShown {
97
101
  if (this.current.store === kept) {
98
102
  this.listen(kept);
99
103
  }
104
+ else {
105
+ this.putAway(kept, tools);
106
+ }
100
107
  await sending;
101
108
  return;
102
109
  }
@@ -115,7 +122,7 @@ class ChatShown {
115
122
  // What failed to go there stays.
116
123
  store.carry(standing);
117
124
  }
118
- if (initial) {
125
+ if (initial && still()) {
119
126
  // As this device saw it, at once.
120
127
  this.enter(store, file);
121
128
  }
@@ -135,12 +142,27 @@ class ChatShown {
135
142
  throw error;
136
143
  }
137
144
  this.stores.setAttached(store);
145
+ // Shown from the device and left since, or not shown yet with another picked: not shown over what is.
146
+ if (this.current.store !== store && (initial || !still())) {
147
+ this.putAway(store, tools);
148
+ await sending;
149
+ return;
150
+ }
138
151
  if (!initial) {
139
152
  this.enter(store, file);
140
153
  }
141
154
  this.listen(store);
142
155
  await sending;
143
156
  }
157
+ /** A store attached for a conversation no longer shown: detached, and kept to show again at once. */
158
+ putAway(store, tools) {
159
+ if (this.stores.setDetached(store)) {
160
+ store.detach().catch(() => undefined);
161
+ if (!store.state.closed) {
162
+ this.stores.recent.keep(store, tools);
163
+ }
164
+ }
165
+ }
144
166
  /**
145
167
  * The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
146
168
  * showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
@@ -74,7 +74,7 @@ function useChat() {
74
74
  /** What a web extension draws: in its own boundary, so that a failure stays in its place. */
75
75
  function Widget({ widget }) {
76
76
  const Content = widget.component;
77
- return (React.createElement(extension_view_1.ExtensionBoundary, { name: web_extension_protocol_1.WebLabelUtil.text(widget.title) || widget.id, resetKey: Content },
77
+ return (React.createElement(extension_view_1.ExtensionBoundary, { name: web_extension_protocol_1.WebLabelUtil.text(widget.title) || widget.id, extension: widget.extension, resetKey: Content },
78
78
  React.createElement(Content, null)));
79
79
  }
80
80
  function Hero({ cwd, onPick }) {
@@ -4,6 +4,10 @@ import { type ChatDraft, type ChatOpening, TaChat } from './chat-protocol';
4
4
  import { ChatShown } from './chat-shown';
5
5
  export declare class TaChatImpl extends ChatShown implements TaChat {
6
6
  start(): Promise<void>;
7
+ /**
8
+ * At once, not behind what is queued (a conversation that waits for the connection, or attaches over a slow one):
9
+ * what was asked last is the new conversation, and what was asked before it does not show over it (`wanted`).
10
+ */
7
11
  draft(): Promise<void>;
8
12
  setDraftCwd(cwd: string): Promise<void>;
9
13
  /** A new conversation is in the default directory, as it changes here or on another device. */
@@ -36,7 +40,7 @@ export declare class TaChatImpl extends ChatShown implements TaChat {
36
40
  * A session of the list that the service closed since the list was read (idle, or a restart): opened
37
41
  * again from its file. One of a package's group is left to its package, which opens it with its role.
38
42
  */
39
- protected reopenClosed(sessionId: string, error: unknown): Promise<void>;
43
+ protected reopenClosed(sessionId: string, error: unknown, wanted?: () => boolean): Promise<void>;
40
44
  /** The conversation shown, opened again from its file; the newest other one if that fails. */
41
45
  protected recover(): Promise<void>;
42
46
  /** The newest other open session, or a new conversation. */
@@ -19,6 +19,8 @@ const chat_util_1 = require("./chat-util");
19
19
  const FILE = { key: 'chat.file', tier: 'user', initial: '', parse: state_protocol_1.StateUtil.string, passive: true };
20
20
  /** That conversation is of a package's group: the page shows it again only while it is open, as its package opens it with a role of its own. */
21
21
  const GROUPED = { key: 'chat.grouped', tier: 'user', initial: false, parse: state_protocol_1.StateUtil.boolean };
22
+ /** What `wanted` is once a new conversation was asked for: no session has it. */
23
+ const DRAFT = 'draft';
22
24
  let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
23
25
  start() {
24
26
  return this.enqueue(async () => {
@@ -65,13 +67,20 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
65
67
  }
66
68
  });
67
69
  }
70
+ /**
71
+ * At once, not behind what is queued (a conversation that waits for the connection, or attaches over a slow one):
72
+ * what was asked last is the new conversation, and what was asked before it does not show over it (`wanted`).
73
+ */
68
74
  draft() {
69
- return this.enqueue(async () => {
70
- if (!this.current.draft) {
71
- this.leave();
72
- this.showDraft();
73
- }
74
- });
75
+ this.wanted = DRAFT;
76
+ if (this.current.pending) {
77
+ this.update({ pending: undefined, opening: undefined });
78
+ }
79
+ if (!this.current.draft) {
80
+ this.leave();
81
+ this.showDraft();
82
+ }
83
+ return Promise.resolve();
75
84
  }
76
85
  async setDraftCwd(cwd) {
77
86
  if (this.current.draft) {
@@ -117,7 +126,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
117
126
  if (draft) {
118
127
  // What was sent shows at once, with Ta at work, while the conversation opens.
119
128
  this.stopping = false;
120
- this.update({ draft: { ...draft, sending: { message, images } } });
129
+ this.update({ draft: { ...draft, sending: { message, images, id: crypto.randomUUID() } } });
121
130
  }
122
131
  return this.openDraft();
123
132
  }
@@ -128,14 +137,15 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
128
137
  if (!(draft === null || draft === void 0 ? void 0 : draft.sending)) {
129
138
  return;
130
139
  }
131
- const { message, images } = draft.sending;
140
+ const { message, images, id } = draft.sending;
132
141
  let sessionId;
133
142
  try {
134
- const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model });
143
+ // By the id of this first message: opened and sent again after a lost connection, it opens and runs once.
144
+ const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model, openId: id });
135
145
  sessionId = opened.sessionId;
136
146
  // Sent with the attach, not after it: one round trip less before Ta starts. A failure to send
137
147
  // stays on the message in the conversation.
138
- await this.attach(opened, store => store.send(message, { images }));
148
+ await this.attach(opened, store => store.send(message, { images, clientMessageId: id }));
139
149
  }
140
150
  catch (error) {
141
151
  // No conversation: the message stays, marked, to send again; for a lost connection, once it is back.
@@ -175,8 +185,14 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
175
185
  }
176
186
  resendDraft() {
177
187
  var _a;
178
- const sending = (_a = this.current.draft) === null || _a === void 0 ? void 0 : _a.sending;
179
- return (sending === null || sending === void 0 ? void 0 : sending.failed) ? this.submit(sending.message, sending.images) : Promise.resolve();
188
+ const { draft } = this.current;
189
+ if (!((_a = draft === null || draft === void 0 ? void 0 : draft.sending) === null || _a === void 0 ? void 0 : _a.failed)) {
190
+ return Promise.resolve();
191
+ }
192
+ // With its id: one that opened before the failure was told is not opened again.
193
+ this.stopping = false;
194
+ this.update({ draft: { ...draft, sending: { ...draft.sending, failed: undefined, heldAt: undefined } } });
195
+ return this.openDraft();
180
196
  }
181
197
  discardDraft() {
182
198
  var _a;
@@ -216,7 +232,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
216
232
  await chat_util_1.ChatUtil.untilConnected(async () => {
217
233
  const { store } = this.current;
218
234
  if (wanted() && ((store === null || store === void 0 ? void 0 : store.sessionId) !== sessionId || !this.stores.isAttached(store))) {
219
- await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile).catch(error => this.reopenClosed(sessionId, error));
235
+ await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile, wanted).catch(error => this.reopenClosed(sessionId, error, wanted));
220
236
  }
221
237
  }, () => this.workbench.connected(), wanted);
222
238
  }).finally(() => {
@@ -264,7 +280,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
264
280
  if (!wanted() || (open && (store === null || store === void 0 ? void 0 : store.sessionId) === open.sessionId && this.stores.isAttached(store))) {
265
281
  return;
266
282
  }
267
- await this.attach(open !== null && open !== void 0 ? open : (await this.stores.open({ sessionFile, cwd: saved === null || saved === void 0 ? void 0 : saved.cwd })), undefined, sessionFile);
283
+ await this.attach(open !== null && open !== void 0 ? open : (await this.stores.open({ sessionFile, cwd: saved === null || saved === void 0 ? void 0 : saved.cwd })), undefined, sessionFile, wanted);
268
284
  }, () => this.workbench.connected(), wanted);
269
285
  }).finally(() => {
270
286
  if (this.current.pending === sessionFile) {
@@ -316,13 +332,13 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
316
332
  * A session of the list that the service closed since the list was read (idle, or a restart): opened
317
333
  * again from its file. One of a package's group is left to its package, which opens it with its role.
318
334
  */
319
- async reopenClosed(sessionId, error) {
335
+ async reopenClosed(sessionId, error, wanted) {
320
336
  const info = this.workbench.state.sessions.find(session => session.sessionId === sessionId);
321
337
  if ((error === null || error === void 0 ? void 0 : error.code) !== ta_protocol_1.TaErrorCode.SESSION_NOT_FOUND || !(info === null || info === void 0 ? void 0 : info.sessionFile) || info.group) {
322
338
  await this.workbench.refresh().catch(() => undefined);
323
339
  throw error;
324
340
  }
325
- await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile);
341
+ await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile, wanted);
326
342
  }
327
343
  /** The conversation shown, opened again from its file; the newest other one if that fails. */
328
344
  async recover() {
@@ -2,13 +2,7 @@ import { type LucideIcon } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import type { SettingsSection } from './settings-view';
4
4
  /** What an entry of the account opens over the page. */
5
- export type AccountDialog = 'accounts' | 'directory' | 'relay' | 'devices' | 'profile';
6
- export interface AccountChoice {
7
- key: string;
8
- label: string;
9
- checked: boolean;
10
- pick(): void;
11
- }
5
+ export type AccountDialog = 'accounts' | 'relay' | 'devices' | 'profile';
12
6
  /** An entry of the account: an item of the menu of the rail, a row of Me on a phone. */
13
7
  export interface AccountEntry {
14
8
  key: string;
@@ -18,16 +12,12 @@ export interface AccountEntry {
18
12
  /** The keys that do it too. */
19
13
  keys?: string;
20
14
  danger?: boolean;
21
- /** A second menu beside the first, of the menu; the row of a phone shows the one chosen and opens the settings. */
22
- choices?: AccountChoice[];
15
+ /** Something to do now (restart to a new version, install the app): a row of a phone without a chevron. */
16
+ action?: boolean;
23
17
  /** What the row of a phone shows on its right, muted. */
24
18
  detail?: string;
25
19
  }
26
- /**
27
- * The entries of the account and of the settings, in groups: the settings, the packages and the keys; the model
28
- * accounts, the default directory and the phone; the theme and the language; the pages of extensions that are the
29
- * user's own (WebView.group `me`: their feedback), about, and signing out.
30
- */
20
+ /** The entries of the account: the rows of Me on a phone, the menu of the account on the rail (MeUtil.keys). */
31
21
  export declare function useAccountEntries(onSettings: (section?: SettingsSection) => void, onDialog: (dialog: AccountDialog) => void): AccountEntry[][];
32
22
  /** What the entries of the account open over the page. */
33
23
  export declare function AccountDialogs({ dialog, onClose, onDialog }: {
@@ -62,8 +52,8 @@ export interface AccountMenuProps {
62
52
  }
63
53
  /**
64
54
  * The account at the foot of the rail, with the settings: who is signed in to which machine and whether the
65
- * page is connected (a dot on the figure while it is not), then the entries of useAccountEntries, the theme and
66
- * the language a step away, in a second menu beside the first. A phone has them as its tab Me (me-view.tsx).
55
+ * page is connected (a dot on the figure while it is not), then the entries of useAccountEntries. A phone has them as
56
+ * its tab Me (me-view.tsx).
67
57
  */
68
58
  export declare function AccountMenu({ onSettings, active }: AccountMenuProps): React.JSX.Element;
69
59
  //# sourceMappingURL=account-menu.d.ts.map