@celljs/ta-web 4.27.0 → 4.29.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 (586) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-role.d.ts +9 -4
  4. package/esm/browser/assistant/assistant-role.js +17 -5
  5. package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
  6. package/esm/browser/assistant/assistant-task-util.js +12 -1
  7. package/esm/browser/assistant/assistant-thread.js +15 -2
  8. package/esm/browser/assistant/assistant-view.js +4 -1
  9. package/esm/browser/assistant/assistant.d.ts +2 -1
  10. package/esm/browser/assistant/assistant.js +9 -7
  11. package/esm/browser/assistant/call-conversing.d.ts +45 -0
  12. package/esm/browser/assistant/call-conversing.js +91 -0
  13. package/esm/browser/assistant/call-face.d.ts +13 -0
  14. package/esm/browser/assistant/call-face.js +81 -0
  15. package/esm/browser/assistant/call-keeper.d.ts +8 -4
  16. package/esm/browser/assistant/call-keeper.js +32 -11
  17. package/esm/browser/assistant/call-partnering.d.ts +37 -0
  18. package/esm/browser/assistant/call-partnering.js +79 -0
  19. package/esm/browser/assistant/call-scenes.d.ts +26 -0
  20. package/esm/browser/assistant/call-scenes.js +85 -0
  21. package/esm/browser/assistant/call-screen.d.ts +3 -0
  22. package/esm/browser/assistant/call-screen.js +15 -0
  23. package/esm/browser/assistant/mic-sense.d.ts +31 -0
  24. package/esm/browser/assistant/mic-sense.js +119 -0
  25. package/esm/browser/assistant/noise-gate.d.ts +32 -0
  26. package/esm/browser/assistant/noise-gate.js +66 -0
  27. package/esm/browser/assistant/pcm-util.d.ts +10 -0
  28. package/esm/browser/assistant/pcm-util.js +55 -0
  29. package/esm/browser/assistant/read-aloud.d.ts +2 -1
  30. package/esm/browser/assistant/realtime-voice-protocol.d.ts +84 -0
  31. package/esm/browser/assistant/realtime-voice-protocol.js +40 -0
  32. package/esm/browser/assistant/realtime-voice.d.ts +50 -62
  33. package/esm/browser/assistant/realtime-voice.js +213 -134
  34. package/esm/browser/assistant/spoken-timeline.d.ts +27 -0
  35. package/esm/browser/assistant/spoken-timeline.js +49 -0
  36. package/esm/browser/assistant/voice-call-bar.d.ts +9 -2
  37. package/esm/browser/assistant/voice-call-bar.js +81 -31
  38. package/esm/browser/assistant/voice-call-protocol.d.ts +61 -4
  39. package/esm/browser/assistant/voice-call.d.ts +16 -23
  40. package/esm/browser/assistant/voice-call.js +134 -117
  41. package/esm/browser/assistant/voice-reading.d.ts +83 -0
  42. package/esm/browser/assistant/voice-reading.js +150 -0
  43. package/esm/browser/avatar/dino-talk.d.ts +15 -0
  44. package/esm/browser/avatar/dino-talk.js +34 -0
  45. package/esm/browser/chat/chat-protocol.d.ts +2 -0
  46. package/esm/browser/chat/chat-shown.d.ts +3 -1
  47. package/esm/browser/chat/chat-shown.js +25 -3
  48. package/esm/browser/chat/chat.d.ts +5 -1
  49. package/esm/browser/chat/chat.js +32 -16
  50. package/esm/browser/components/account-menu.d.ts +6 -16
  51. package/esm/browser/components/account-menu.js +47 -101
  52. package/esm/browser/components/app-contexts.js +3 -2
  53. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  54. package/esm/browser/components/composer-box-protocol.d.ts +2 -0
  55. package/esm/browser/components/composer-box.js +20 -1
  56. package/esm/browser/components/composer-emoji.d.ts +22 -0
  57. package/esm/browser/components/composer-emoji.js +50 -0
  58. package/esm/browser/components/conversation-scroll-util.d.ts +8 -1
  59. package/esm/browser/components/conversation-scroll-util.js +21 -0
  60. package/esm/browser/components/conversation-scroll.js +10 -11
  61. package/esm/browser/components/discover-view.d.ts +4 -3
  62. package/esm/browser/components/discover-view.js +5 -4
  63. package/esm/browser/components/emoji-panel.d.ts +22 -0
  64. package/esm/browser/components/emoji-panel.js +54 -0
  65. package/esm/browser/components/gallery.js +28 -7
  66. package/esm/browser/components/host-view.d.ts +1 -1
  67. package/esm/browser/components/image-pull.d.ts +64 -0
  68. package/esm/browser/components/image-pull.js +202 -0
  69. package/esm/browser/components/kept-call-bar.js +2 -1
  70. package/esm/browser/components/lightbox.d.ts +1 -1
  71. package/esm/browser/components/lightbox.js +57 -2
  72. package/esm/browser/components/markdown.d.ts +8 -1
  73. package/esm/browser/components/markdown.js +12 -4
  74. package/esm/browser/components/me-rows.d.ts +24 -0
  75. package/esm/browser/components/me-rows.js +19 -0
  76. package/esm/browser/components/me-view.d.ts +2 -1
  77. package/esm/browser/components/me-view.js +3 -2
  78. package/esm/browser/components/message-list.js +47 -7
  79. package/esm/browser/components/message-steps.js +13 -0
  80. package/esm/browser/components/nav-places.js +1 -1
  81. package/esm/browser/components/partner-row.js +2 -1
  82. package/esm/browser/components/relay-services.d.ts +9 -3
  83. package/esm/browser/components/relay-services.js +73 -35
  84. package/esm/browser/components/session-view.js +4 -2
  85. package/esm/browser/components/settings-choices.js +3 -0
  86. package/esm/browser/components/settings-controls.d.ts +13 -0
  87. package/esm/browser/components/settings-controls.js +19 -0
  88. package/esm/browser/components/settings-more.d.ts +1 -1
  89. package/esm/browser/components/settings-more.js +28 -39
  90. package/esm/browser/components/settings-parts.d.ts +4 -2
  91. package/esm/browser/components/settings-parts.js +16 -9
  92. package/esm/browser/components/settings-view.js +2 -6
  93. package/esm/browser/components/ta-avatar.d.ts +15 -1
  94. package/esm/browser/components/ta-avatar.js +38 -5
  95. package/esm/browser/components/voice-services.js +6 -1
  96. package/esm/browser/components/web-composer.d.ts +1 -1
  97. package/esm/browser/components/web-composer.js +2 -2
  98. package/esm/browser/device/file-save.d.ts +31 -0
  99. package/esm/browser/device/file-save.js +80 -0
  100. package/esm/browser/extension/extension-view.d.ts +2 -0
  101. package/esm/browser/extension/extension-view.js +2 -0
  102. package/esm/browser/extension/web-api-call.d.ts +109 -2
  103. package/esm/browser/extension/web-api-components.d.ts +4 -0
  104. package/esm/browser/extension/web-api-contributions.d.ts +14 -14
  105. package/esm/browser/extension/web-api-desktop.d.ts +16 -1
  106. package/esm/browser/extension/web-api-desktop.js +1 -0
  107. package/esm/browser/extension/web-api-partners.d.ts +2 -0
  108. package/esm/browser/extension/web-extension-api.d.ts +8 -10
  109. package/esm/browser/extension/web-extension-code.d.ts +15 -8
  110. package/esm/browser/extension/web-extension-code.js +25 -27
  111. package/esm/browser/extension/web-extension-context.js +4 -0
  112. package/esm/browser/extension/web-extension-protocol.d.ts +10 -1
  113. package/esm/browser/extension/web-extension-protocol.js +1 -0
  114. package/esm/browser/extension/web-extension-run.d.ts +4 -2
  115. package/esm/browser/extension/web-extension-run.js +10 -4
  116. package/esm/browser/extension/web-extensions-running.js +7 -6
  117. package/esm/browser/extension/web-pages.d.ts +2 -0
  118. package/esm/browser/extension/web-pages.js +2 -0
  119. package/esm/browser/i18n/en/account.d.ts +202 -0
  120. package/esm/browser/i18n/en/account.js +205 -0
  121. package/esm/browser/i18n/en/assistant.d.ts +129 -0
  122. package/esm/browser/i18n/en/assistant.js +130 -0
  123. package/esm/browser/i18n/en/call.d.ts +86 -0
  124. package/esm/browser/i18n/en/call.js +87 -0
  125. package/esm/browser/i18n/en/chat.d.ts +213 -0
  126. package/esm/browser/i18n/en/chat.js +214 -0
  127. package/esm/browser/i18n/en/common.d.ts +99 -0
  128. package/esm/browser/i18n/en/common.js +101 -0
  129. package/esm/browser/i18n/en/console.d.ts +230 -0
  130. package/esm/browser/i18n/en/console.js +232 -0
  131. package/esm/browser/i18n/en/discover.d.ts +117 -0
  132. package/esm/browser/i18n/en/discover.js +119 -0
  133. package/esm/browser/i18n/en/service.d.ts +242 -0
  134. package/esm/browser/i18n/en/service.js +245 -0
  135. package/esm/browser/i18n/en/settings.d.ts +213 -0
  136. package/esm/browser/i18n/en/settings.js +214 -0
  137. package/esm/browser/i18n/en/tools.d.ts +85 -0
  138. package/esm/browser/i18n/en/tools.js +87 -0
  139. package/esm/browser/i18n/ja/account.d.ts +2 -0
  140. package/esm/browser/i18n/ja/account.js +202 -0
  141. package/esm/browser/i18n/ja/assistant.d.ts +2 -0
  142. package/esm/browser/i18n/ja/assistant.js +129 -0
  143. package/esm/browser/i18n/ja/call.d.ts +2 -0
  144. package/esm/browser/i18n/ja/call.js +86 -0
  145. package/esm/browser/i18n/ja/chat.d.ts +2 -0
  146. package/esm/browser/i18n/ja/chat.js +213 -0
  147. package/esm/browser/i18n/ja/common.d.ts +2 -0
  148. package/esm/browser/i18n/ja/common.js +99 -0
  149. package/esm/browser/i18n/ja/console.d.ts +2 -0
  150. package/esm/browser/i18n/ja/console.js +230 -0
  151. package/esm/browser/i18n/ja/discover.d.ts +2 -0
  152. package/esm/browser/i18n/ja/discover.js +117 -0
  153. package/esm/browser/i18n/ja/service.d.ts +2 -0
  154. package/esm/browser/i18n/ja/service.js +242 -0
  155. package/esm/browser/i18n/ja/settings.d.ts +2 -0
  156. package/esm/browser/i18n/ja/settings.js +213 -0
  157. package/esm/browser/i18n/ja/tools.d.ts +2 -0
  158. package/esm/browser/i18n/ja/tools.js +85 -0
  159. package/esm/browser/i18n/locales.d.ts +1150 -1131
  160. package/esm/browser/i18n/messages-ja.js +20 -1567
  161. package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
  162. package/esm/browser/i18n/messages-zh-tw.js +20 -1568
  163. package/esm/browser/i18n/messages.d.ts +1153 -1131
  164. package/esm/browser/i18n/messages.js +44 -3145
  165. package/esm/browser/i18n/zh/account.d.ts +2 -0
  166. package/esm/browser/i18n/zh/account.js +203 -0
  167. package/esm/browser/i18n/zh/assistant.d.ts +2 -0
  168. package/esm/browser/i18n/zh/assistant.js +129 -0
  169. package/esm/browser/i18n/zh/call.d.ts +2 -0
  170. package/esm/browser/i18n/zh/call.js +86 -0
  171. package/esm/browser/i18n/zh/chat.d.ts +2 -0
  172. package/esm/browser/i18n/zh/chat.js +213 -0
  173. package/esm/browser/i18n/zh/common.d.ts +2 -0
  174. package/esm/browser/i18n/zh/common.js +99 -0
  175. package/esm/browser/i18n/zh/console.d.ts +2 -0
  176. package/esm/browser/i18n/zh/console.js +230 -0
  177. package/esm/browser/i18n/zh/discover.d.ts +2 -0
  178. package/esm/browser/i18n/zh/discover.js +117 -0
  179. package/esm/browser/i18n/zh/service.d.ts +2 -0
  180. package/esm/browser/i18n/zh/service.js +242 -0
  181. package/esm/browser/i18n/zh/settings.d.ts +2 -0
  182. package/esm/browser/i18n/zh/settings.js +213 -0
  183. package/esm/browser/i18n/zh/tools.d.ts +2 -0
  184. package/esm/browser/i18n/zh/tools.js +86 -0
  185. package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
  186. package/esm/browser/i18n/zh-tw/account.js +202 -0
  187. package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
  188. package/esm/browser/i18n/zh-tw/assistant.js +129 -0
  189. package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
  190. package/esm/browser/i18n/zh-tw/call.js +86 -0
  191. package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
  192. package/esm/browser/i18n/zh-tw/chat.js +213 -0
  193. package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
  194. package/esm/browser/i18n/zh-tw/common.js +99 -0
  195. package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
  196. package/esm/browser/i18n/zh-tw/console.js +230 -0
  197. package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
  198. package/esm/browser/i18n/zh-tw/discover.js +117 -0
  199. package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
  200. package/esm/browser/i18n/zh-tw/service.js +242 -0
  201. package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
  202. package/esm/browser/i18n/zh-tw/settings.js +213 -0
  203. package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
  204. package/esm/browser/i18n/zh-tw/tools.js +85 -0
  205. package/esm/browser/markdown/code-renderers.d.ts +2 -0
  206. package/esm/browser/markdown/code-renderers.js +2 -0
  207. package/esm/browser/offline/device-values.d.ts +4 -0
  208. package/esm/browser/offline/device-values.js +10 -0
  209. package/esm/browser/pwa/page-build.d.ts +15 -0
  210. package/esm/browser/pwa/page-build.js +45 -0
  211. package/esm/browser/screen/page-answers.d.ts +2 -1
  212. package/esm/browser/screen/page-answers.js +7 -4
  213. package/esm/browser/settings/settings-protocol.d.ts +4 -0
  214. package/esm/browser/settings/settings-protocol.js +4 -0
  215. package/esm/browser/style/base.d.ts +1 -1
  216. package/esm/browser/style/base.js +3 -0
  217. package/esm/browser/style/chat-list.d.ts +1 -1
  218. package/esm/browser/style/chat-list.js +1 -1
  219. package/esm/browser/style/conversation-column.d.ts +1 -1
  220. package/esm/browser/style/conversation-column.js +17 -0
  221. package/esm/browser/style/conversation.d.ts +1 -1
  222. package/esm/browser/style/conversation.js +11 -1
  223. package/esm/browser/style/device.js +1 -0
  224. package/esm/browser/style/dialogs.d.ts +1 -1
  225. package/esm/browser/style/dialogs.js +1 -1
  226. package/esm/browser/style/layout.d.ts +1 -1
  227. package/esm/browser/style/layout.js +135 -57
  228. package/esm/browser/style/pages.d.ts +1 -1
  229. package/esm/browser/style/pages.js +0 -7
  230. package/esm/browser/style/shell.d.ts +1 -1
  231. package/esm/browser/style/shell.js +8 -0
  232. package/esm/browser/style/video-call.d.ts +2 -0
  233. package/esm/browser/style/video-call.js +63 -0
  234. package/esm/browser/style.js +2 -0
  235. package/esm/browser/util/call-transcript.d.ts +16 -0
  236. package/esm/browser/util/call-transcript.js +110 -0
  237. package/esm/browser/util/desktop.d.ts +10 -1
  238. package/esm/browser/util/desktop.js +10 -0
  239. package/esm/browser/util/image-pull.d.ts +61 -0
  240. package/esm/browser/util/image-pull.js +88 -0
  241. package/esm/browser/util/process.d.ts +6 -0
  242. package/esm/browser/util/process.js +18 -5
  243. package/esm/browser/util/spoken.d.ts +3 -3
  244. package/esm/browser/util/spoken.js +4 -4
  245. package/esm/browser/video-call/call-camera.d.ts +59 -0
  246. package/esm/browser/video-call/call-camera.js +188 -0
  247. package/esm/browser/video-call/call-people.d.ts +21 -0
  248. package/esm/browser/video-call/call-people.js +29 -0
  249. package/esm/browser/video-call/call-window.d.ts +19 -0
  250. package/esm/browser/video-call/call-window.js +80 -0
  251. package/esm/browser/video-call/clip-plan.d.ts +56 -0
  252. package/esm/browser/video-call/clip-plan.js +76 -0
  253. package/esm/browser/video-call/face-camera.d.ts +93 -0
  254. package/esm/browser/video-call/face-camera.js +192 -0
  255. package/esm/browser/video-call/face-files.d.ts +69 -0
  256. package/esm/browser/video-call/face-files.js +132 -0
  257. package/esm/browser/video-call/face-moves.d.ts +68 -0
  258. package/esm/browser/video-call/face-moves.js +180 -0
  259. package/esm/browser/video-call/face-stage.d.ts +139 -0
  260. package/esm/browser/video-call/face-stage.js +219 -0
  261. package/esm/browser/video-call/mouth-layer.d.ts +81 -0
  262. package/esm/browser/video-call/mouth-layer.js +241 -0
  263. package/esm/browser/video-call/video-call-view.d.ts +19 -0
  264. package/esm/browser/video-call/video-call-view.js +254 -0
  265. package/esm/browser/video-call/video-face.d.ts +19 -0
  266. package/esm/browser/video-call/video-face.js +471 -0
  267. package/esm/browser/workbench-hosts.d.ts +1 -0
  268. package/esm/browser/workbench-protocol.d.ts +2 -0
  269. package/esm/browser/workbench-util.d.ts +5 -0
  270. package/esm/browser/workbench-util.js +18 -0
  271. package/esm/browser/workbench.d.ts +14 -0
  272. package/esm/browser/workbench.js +73 -6
  273. package/lib/browser/assistant/assistant-role.d.ts +9 -4
  274. package/lib/browser/assistant/assistant-role.js +17 -5
  275. package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
  276. package/lib/browser/assistant/assistant-task-util.js +11 -0
  277. package/lib/browser/assistant/assistant-thread.js +15 -2
  278. package/lib/browser/assistant/assistant-view.js +3 -0
  279. package/lib/browser/assistant/assistant.d.ts +2 -1
  280. package/lib/browser/assistant/assistant.js +9 -7
  281. package/lib/browser/assistant/call-conversing.d.ts +46 -0
  282. package/lib/browser/assistant/call-conversing.js +96 -0
  283. package/lib/browser/assistant/call-face.d.ts +14 -0
  284. package/lib/browser/assistant/call-face.js +117 -0
  285. package/lib/browser/assistant/call-keeper.d.ts +8 -4
  286. package/lib/browser/assistant/call-keeper.js +32 -11
  287. package/lib/browser/assistant/call-partnering.d.ts +38 -0
  288. package/lib/browser/assistant/call-partnering.js +83 -0
  289. package/lib/browser/assistant/call-scenes.d.ts +27 -0
  290. package/lib/browser/assistant/call-scenes.js +88 -0
  291. package/lib/browser/assistant/call-screen.d.ts +3 -0
  292. package/lib/browser/assistant/call-screen.js +15 -0
  293. package/lib/browser/assistant/mic-sense.d.ts +32 -0
  294. package/lib/browser/assistant/mic-sense.js +123 -0
  295. package/lib/browser/assistant/noise-gate.d.ts +33 -0
  296. package/lib/browser/assistant/noise-gate.js +71 -0
  297. package/lib/browser/assistant/pcm-util.d.ts +11 -0
  298. package/lib/browser/assistant/pcm-util.js +58 -0
  299. package/lib/browser/assistant/read-aloud.d.ts +2 -1
  300. package/lib/browser/assistant/realtime-voice-protocol.d.ts +85 -0
  301. package/lib/browser/assistant/realtime-voice-protocol.js +43 -0
  302. package/lib/browser/assistant/realtime-voice.d.ts +50 -62
  303. package/lib/browser/assistant/realtime-voice.js +217 -138
  304. package/lib/browser/assistant/spoken-timeline.d.ts +28 -0
  305. package/lib/browser/assistant/spoken-timeline.js +53 -0
  306. package/lib/browser/assistant/voice-call-bar.d.ts +9 -2
  307. package/lib/browser/assistant/voice-call-bar.js +81 -30
  308. package/lib/browser/assistant/voice-call-protocol.d.ts +61 -4
  309. package/lib/browser/assistant/voice-call.d.ts +16 -23
  310. package/lib/browser/assistant/voice-call.js +134 -117
  311. package/lib/browser/assistant/voice-reading.d.ts +84 -0
  312. package/lib/browser/assistant/voice-reading.js +156 -0
  313. package/lib/browser/avatar/dino-talk.d.ts +16 -0
  314. package/lib/browser/avatar/dino-talk.js +37 -0
  315. package/lib/browser/chat/chat-protocol.d.ts +2 -0
  316. package/lib/browser/chat/chat-shown.d.ts +3 -1
  317. package/lib/browser/chat/chat-shown.js +25 -3
  318. package/lib/browser/chat/chat.d.ts +5 -1
  319. package/lib/browser/chat/chat.js +32 -16
  320. package/lib/browser/components/account-menu.d.ts +6 -16
  321. package/lib/browser/components/account-menu.js +45 -99
  322. package/lib/browser/components/app-contexts.js +2 -1
  323. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  324. package/lib/browser/components/composer-box-protocol.d.ts +2 -0
  325. package/lib/browser/components/composer-box.js +20 -1
  326. package/lib/browser/components/composer-emoji.d.ts +23 -0
  327. package/lib/browser/components/composer-emoji.js +87 -0
  328. package/lib/browser/components/conversation-scroll-util.d.ts +8 -1
  329. package/lib/browser/components/conversation-scroll-util.js +21 -0
  330. package/lib/browser/components/conversation-scroll.js +10 -11
  331. package/lib/browser/components/discover-view.d.ts +4 -3
  332. package/lib/browser/components/discover-view.js +5 -4
  333. package/lib/browser/components/emoji-panel.d.ts +23 -0
  334. package/lib/browser/components/emoji-panel.js +90 -0
  335. package/lib/browser/components/gallery.js +28 -7
  336. package/lib/browser/components/host-view.d.ts +1 -1
  337. package/lib/browser/components/image-pull.d.ts +65 -0
  338. package/lib/browser/components/image-pull.js +206 -0
  339. package/lib/browser/components/kept-call-bar.js +2 -1
  340. package/lib/browser/components/lightbox.d.ts +1 -1
  341. package/lib/browser/components/lightbox.js +57 -2
  342. package/lib/browser/components/markdown.d.ts +8 -1
  343. package/lib/browser/components/markdown.js +11 -3
  344. package/lib/browser/components/me-rows.d.ts +25 -0
  345. package/lib/browser/components/me-rows.js +22 -0
  346. package/lib/browser/components/me-view.d.ts +2 -1
  347. package/lib/browser/components/me-view.js +3 -2
  348. package/lib/browser/components/message-list.js +46 -6
  349. package/lib/browser/components/message-steps.js +13 -0
  350. package/lib/browser/components/nav-places.js +1 -1
  351. package/lib/browser/components/partner-row.js +2 -1
  352. package/lib/browser/components/relay-services.d.ts +9 -3
  353. package/lib/browser/components/relay-services.js +71 -33
  354. package/lib/browser/components/session-view.js +3 -1
  355. package/lib/browser/components/settings-choices.js +3 -0
  356. package/lib/browser/components/settings-controls.d.ts +13 -0
  357. package/lib/browser/components/settings-controls.js +19 -0
  358. package/lib/browser/components/settings-more.d.ts +1 -1
  359. package/lib/browser/components/settings-more.js +27 -38
  360. package/lib/browser/components/settings-parts.d.ts +4 -2
  361. package/lib/browser/components/settings-parts.js +15 -8
  362. package/lib/browser/components/settings-view.js +2 -6
  363. package/lib/browser/components/ta-avatar.d.ts +15 -1
  364. package/lib/browser/components/ta-avatar.js +38 -5
  365. package/lib/browser/components/voice-services.js +5 -0
  366. package/lib/browser/components/web-composer.d.ts +1 -1
  367. package/lib/browser/components/web-composer.js +2 -2
  368. package/lib/browser/device/file-save.d.ts +32 -0
  369. package/lib/browser/device/file-save.js +83 -0
  370. package/lib/browser/extension/extension-view.d.ts +2 -0
  371. package/lib/browser/extension/extension-view.js +3 -1
  372. package/lib/browser/extension/web-api-call.d.ts +109 -2
  373. package/lib/browser/extension/web-api-components.d.ts +4 -0
  374. package/lib/browser/extension/web-api-contributions.d.ts +14 -14
  375. package/lib/browser/extension/web-api-desktop.d.ts +16 -1
  376. package/lib/browser/extension/web-api-desktop.js +1 -0
  377. package/lib/browser/extension/web-api-partners.d.ts +2 -0
  378. package/lib/browser/extension/web-extension-api.d.ts +8 -10
  379. package/lib/browser/extension/web-extension-code.d.ts +15 -8
  380. package/lib/browser/extension/web-extension-code.js +25 -27
  381. package/lib/browser/extension/web-extension-context.js +4 -0
  382. package/lib/browser/extension/web-extension-protocol.d.ts +10 -1
  383. package/lib/browser/extension/web-extension-protocol.js +1 -0
  384. package/lib/browser/extension/web-extension-run.d.ts +4 -2
  385. package/lib/browser/extension/web-extension-run.js +10 -4
  386. package/lib/browser/extension/web-extensions-running.js +7 -6
  387. package/lib/browser/extension/web-pages.d.ts +2 -0
  388. package/lib/browser/extension/web-pages.js +2 -0
  389. package/lib/browser/i18n/en/account.d.ts +203 -0
  390. package/lib/browser/i18n/en/account.js +208 -0
  391. package/lib/browser/i18n/en/assistant.d.ts +130 -0
  392. package/lib/browser/i18n/en/assistant.js +133 -0
  393. package/lib/browser/i18n/en/call.d.ts +87 -0
  394. package/lib/browser/i18n/en/call.js +90 -0
  395. package/lib/browser/i18n/en/chat.d.ts +214 -0
  396. package/lib/browser/i18n/en/chat.js +217 -0
  397. package/lib/browser/i18n/en/common.d.ts +100 -0
  398. package/lib/browser/i18n/en/common.js +104 -0
  399. package/lib/browser/i18n/en/console.d.ts +231 -0
  400. package/lib/browser/i18n/en/console.js +235 -0
  401. package/lib/browser/i18n/en/discover.d.ts +118 -0
  402. package/lib/browser/i18n/en/discover.js +122 -0
  403. package/lib/browser/i18n/en/service.d.ts +243 -0
  404. package/lib/browser/i18n/en/service.js +248 -0
  405. package/lib/browser/i18n/en/settings.d.ts +214 -0
  406. package/lib/browser/i18n/en/settings.js +217 -0
  407. package/lib/browser/i18n/en/tools.d.ts +86 -0
  408. package/lib/browser/i18n/en/tools.js +90 -0
  409. package/lib/browser/i18n/ja/account.d.ts +3 -0
  410. package/lib/browser/i18n/ja/account.js +205 -0
  411. package/lib/browser/i18n/ja/assistant.d.ts +3 -0
  412. package/lib/browser/i18n/ja/assistant.js +132 -0
  413. package/lib/browser/i18n/ja/call.d.ts +3 -0
  414. package/lib/browser/i18n/ja/call.js +89 -0
  415. package/lib/browser/i18n/ja/chat.d.ts +3 -0
  416. package/lib/browser/i18n/ja/chat.js +216 -0
  417. package/lib/browser/i18n/ja/common.d.ts +3 -0
  418. package/lib/browser/i18n/ja/common.js +102 -0
  419. package/lib/browser/i18n/ja/console.d.ts +3 -0
  420. package/lib/browser/i18n/ja/console.js +233 -0
  421. package/lib/browser/i18n/ja/discover.d.ts +3 -0
  422. package/lib/browser/i18n/ja/discover.js +120 -0
  423. package/lib/browser/i18n/ja/service.d.ts +3 -0
  424. package/lib/browser/i18n/ja/service.js +245 -0
  425. package/lib/browser/i18n/ja/settings.d.ts +3 -0
  426. package/lib/browser/i18n/ja/settings.js +216 -0
  427. package/lib/browser/i18n/ja/tools.d.ts +3 -0
  428. package/lib/browser/i18n/ja/tools.js +88 -0
  429. package/lib/browser/i18n/locales.d.ts +1150 -1131
  430. package/lib/browser/i18n/messages-ja.js +20 -1567
  431. package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
  432. package/lib/browser/i18n/messages-zh-tw.js +20 -1568
  433. package/lib/browser/i18n/messages.d.ts +1153 -1131
  434. package/lib/browser/i18n/messages.js +44 -3145
  435. package/lib/browser/i18n/zh/account.d.ts +3 -0
  436. package/lib/browser/i18n/zh/account.js +206 -0
  437. package/lib/browser/i18n/zh/assistant.d.ts +3 -0
  438. package/lib/browser/i18n/zh/assistant.js +132 -0
  439. package/lib/browser/i18n/zh/call.d.ts +3 -0
  440. package/lib/browser/i18n/zh/call.js +89 -0
  441. package/lib/browser/i18n/zh/chat.d.ts +3 -0
  442. package/lib/browser/i18n/zh/chat.js +216 -0
  443. package/lib/browser/i18n/zh/common.d.ts +3 -0
  444. package/lib/browser/i18n/zh/common.js +102 -0
  445. package/lib/browser/i18n/zh/console.d.ts +3 -0
  446. package/lib/browser/i18n/zh/console.js +233 -0
  447. package/lib/browser/i18n/zh/discover.d.ts +3 -0
  448. package/lib/browser/i18n/zh/discover.js +120 -0
  449. package/lib/browser/i18n/zh/service.d.ts +3 -0
  450. package/lib/browser/i18n/zh/service.js +245 -0
  451. package/lib/browser/i18n/zh/settings.d.ts +3 -0
  452. package/lib/browser/i18n/zh/settings.js +216 -0
  453. package/lib/browser/i18n/zh/tools.d.ts +3 -0
  454. package/lib/browser/i18n/zh/tools.js +89 -0
  455. package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
  456. package/lib/browser/i18n/zh-tw/account.js +205 -0
  457. package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
  458. package/lib/browser/i18n/zh-tw/assistant.js +132 -0
  459. package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
  460. package/lib/browser/i18n/zh-tw/call.js +89 -0
  461. package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
  462. package/lib/browser/i18n/zh-tw/chat.js +216 -0
  463. package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
  464. package/lib/browser/i18n/zh-tw/common.js +102 -0
  465. package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
  466. package/lib/browser/i18n/zh-tw/console.js +233 -0
  467. package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
  468. package/lib/browser/i18n/zh-tw/discover.js +120 -0
  469. package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
  470. package/lib/browser/i18n/zh-tw/service.js +245 -0
  471. package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
  472. package/lib/browser/i18n/zh-tw/settings.js +216 -0
  473. package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
  474. package/lib/browser/i18n/zh-tw/tools.js +88 -0
  475. package/lib/browser/markdown/code-renderers.d.ts +2 -0
  476. package/lib/browser/markdown/code-renderers.js +3 -1
  477. package/lib/browser/offline/device-values.d.ts +4 -0
  478. package/lib/browser/offline/device-values.js +10 -0
  479. package/lib/browser/pwa/page-build.d.ts +16 -0
  480. package/lib/browser/pwa/page-build.js +48 -0
  481. package/lib/browser/screen/page-answers.d.ts +2 -1
  482. package/lib/browser/screen/page-answers.js +7 -4
  483. package/lib/browser/settings/settings-protocol.d.ts +4 -0
  484. package/lib/browser/settings/settings-protocol.js +4 -0
  485. package/lib/browser/style/base.d.ts +1 -1
  486. package/lib/browser/style/base.js +3 -0
  487. package/lib/browser/style/chat-list.d.ts +1 -1
  488. package/lib/browser/style/chat-list.js +1 -1
  489. package/lib/browser/style/conversation-column.d.ts +1 -1
  490. package/lib/browser/style/conversation-column.js +17 -0
  491. package/lib/browser/style/conversation.d.ts +1 -1
  492. package/lib/browser/style/conversation.js +11 -1
  493. package/lib/browser/style/device.js +1 -0
  494. package/lib/browser/style/dialogs.d.ts +1 -1
  495. package/lib/browser/style/dialogs.js +1 -1
  496. package/lib/browser/style/layout.d.ts +1 -1
  497. package/lib/browser/style/layout.js +135 -57
  498. package/lib/browser/style/pages.d.ts +1 -1
  499. package/lib/browser/style/pages.js +0 -7
  500. package/lib/browser/style/shell.d.ts +1 -1
  501. package/lib/browser/style/shell.js +8 -0
  502. package/lib/browser/style/video-call.d.ts +3 -0
  503. package/lib/browser/style/video-call.js +66 -0
  504. package/lib/browser/style.js +2 -0
  505. package/lib/browser/util/call-transcript.d.ts +17 -0
  506. package/lib/browser/util/call-transcript.js +113 -0
  507. package/lib/browser/util/desktop.d.ts +10 -1
  508. package/lib/browser/util/desktop.js +10 -0
  509. package/lib/browser/util/image-pull.d.ts +62 -0
  510. package/lib/browser/util/image-pull.js +91 -0
  511. package/lib/browser/util/process.d.ts +6 -0
  512. package/lib/browser/util/process.js +17 -4
  513. package/lib/browser/util/spoken.d.ts +3 -3
  514. package/lib/browser/util/spoken.js +4 -4
  515. package/lib/browser/video-call/call-camera.d.ts +60 -0
  516. package/lib/browser/video-call/call-camera.js +192 -0
  517. package/lib/browser/video-call/call-people.d.ts +22 -0
  518. package/lib/browser/video-call/call-people.js +32 -0
  519. package/lib/browser/video-call/call-window.d.ts +20 -0
  520. package/lib/browser/video-call/call-window.js +83 -0
  521. package/lib/browser/video-call/clip-plan.d.ts +57 -0
  522. package/lib/browser/video-call/clip-plan.js +80 -0
  523. package/lib/browser/video-call/face-camera.d.ts +94 -0
  524. package/lib/browser/video-call/face-camera.js +197 -0
  525. package/lib/browser/video-call/face-files.d.ts +70 -0
  526. package/lib/browser/video-call/face-files.js +137 -0
  527. package/lib/browser/video-call/face-moves.d.ts +69 -0
  528. package/lib/browser/video-call/face-moves.js +184 -0
  529. package/lib/browser/video-call/face-stage.d.ts +140 -0
  530. package/lib/browser/video-call/face-stage.js +223 -0
  531. package/lib/browser/video-call/mouth-layer.d.ts +82 -0
  532. package/lib/browser/video-call/mouth-layer.js +245 -0
  533. package/lib/browser/video-call/video-call-view.d.ts +20 -0
  534. package/lib/browser/video-call/video-call-view.js +290 -0
  535. package/lib/browser/video-call/video-face.d.ts +20 -0
  536. package/lib/browser/video-call/video-face.js +507 -0
  537. package/lib/browser/workbench-hosts.d.ts +1 -0
  538. package/lib/browser/workbench-protocol.d.ts +2 -0
  539. package/lib/browser/workbench-util.d.ts +5 -0
  540. package/lib/browser/workbench-util.js +18 -0
  541. package/lib/browser/workbench.d.ts +14 -0
  542. package/lib/browser/workbench.js +71 -4
  543. package/package.json +7 -7
  544. package/public/faces/README.md +40 -0
  545. package/public/faces/blonde/clap.mp4 +0 -0
  546. package/public/faces/blonde/dance.mp4 +0 -0
  547. package/public/faces/blonde/face.jpg +0 -0
  548. package/public/faces/blonde/happy.mp4 +0 -0
  549. package/public/faces/blonde/heart.mp4 +0 -0
  550. package/public/faces/blonde/idle-1.mp4 +0 -0
  551. package/public/faces/blonde/idle-2.mp4 +0 -0
  552. package/public/faces/blonde/idle-3.mp4 +0 -0
  553. package/public/faces/blonde/laugh.mp4 +0 -0
  554. package/public/faces/blonde/listening.mp4 +0 -0
  555. package/public/faces/blonde/poster.jpg +0 -0
  556. package/public/faces/blonde/shy.mp4 +0 -0
  557. package/public/faces/blonde/sorry.mp4 +0 -0
  558. package/public/faces/blonde/stretch.mp4 +0 -0
  559. package/public/faces/blonde/surprised.mp4 +0 -0
  560. package/public/faces/blonde/talk-1.mp4 +0 -0
  561. package/public/faces/blonde/talk-2.mp4 +0 -0
  562. package/public/faces/blonde/think-2.mp4 +0 -0
  563. package/public/faces/blonde/thinking.mp4 +0 -0
  564. package/public/faces/blonde/wave.mp4 +0 -0
  565. package/public/faces/clap.mp4 +0 -0
  566. package/public/faces/dance.mp4 +0 -0
  567. package/public/faces/face.jpg +0 -0
  568. package/public/faces/framing.json +1 -0
  569. package/public/faces/happy.mp4 +0 -0
  570. package/public/faces/heart.mp4 +0 -0
  571. package/public/faces/idle-1.mp4 +0 -0
  572. package/public/faces/idle-2.mp4 +0 -0
  573. package/public/faces/idle-3.mp4 +0 -0
  574. package/public/faces/laugh.mp4 +0 -0
  575. package/public/faces/lips.json +1 -0
  576. package/public/faces/listening.mp4 +0 -0
  577. package/public/faces/poster.jpg +0 -0
  578. package/public/faces/shy.mp4 +0 -0
  579. package/public/faces/sorry.mp4 +0 -0
  580. package/public/faces/stretch.mp4 +0 -0
  581. package/public/faces/surprised.mp4 +0 -0
  582. package/public/faces/talk-1.mp4 +0 -0
  583. package/public/faces/talk-2.mp4 +0 -0
  584. package/public/faces/think-2.mp4 +0 -0
  585. package/public/faces/thinking.mp4 +0 -0
  586. package/public/faces/wave.mp4 +0 -0
@@ -0,0 +1,150 @@
1
+ import { SpokenTimeline } from './spoken-timeline.js';
2
+ /** How often the captions look where the reading is, in ms. */
3
+ const CAPTION_MS = 80;
4
+ /**
5
+ * What a voice service reads now, on the clock of its sound as it plays (CallReading): it begins where its first sound
6
+ * plays, held as long as the face of a video call asks (RealtimeVoice.hold), and its captions show each sentence as it
7
+ * is heard, by the same timeline the face asks.
8
+ */
9
+ export class VoiceReading {
10
+ constructor(say, pieces, context, holdS,
11
+ /** Whether it is still what plays: once not, its captions stop. */
12
+ live, onPiece) {
13
+ this.say = say;
14
+ this.pieces = pieces;
15
+ this.context = context;
16
+ this.holdS = holdS;
17
+ this.live = live;
18
+ this.onPiece = onPiece;
19
+ /** Its sound as it was put to play: from `at` on the clock of the audio context, `from` seconds into it, for `seconds`. */
20
+ this.played = [];
21
+ this.shown = -1;
22
+ this.timeline = new SpokenTimeline(pieces, SpokenTimeline.pace(pieces.join('')));
23
+ }
24
+ /**
25
+ * How far into its sound it plays: where the sound playing now is in it, or where the last played ended while what
26
+ * comes next is late (the sound stopped short), so that the words, the clip and the mouth wait with the voice.
27
+ */
28
+ now() {
29
+ if (this.startAt === undefined) {
30
+ return -this.holdS;
31
+ }
32
+ const time = this.context.currentTime;
33
+ for (let i = this.played.length - 1; i >= 0; i--) {
34
+ const sound = this.played[i];
35
+ if (sound.at <= time) {
36
+ return sound.from + Math.min(sound.seconds, time - sound.at);
37
+ }
38
+ }
39
+ return time - this.startAt;
40
+ }
41
+ pieceAt(seconds) {
42
+ return this.timeline.at(Math.max(0, seconds));
43
+ }
44
+ /** More of its sound came: when the first of it plays, and how much of it there is. */
45
+ heard(at, seconds) {
46
+ if (this.startAt === undefined) {
47
+ this.startAt = at;
48
+ this.caption();
49
+ }
50
+ this.played.push({ at, from: this.timeline.received, seconds });
51
+ this.timeline.received += seconds;
52
+ }
53
+ /** Its words, more of them as they came (a voice that thinks says them as it goes): its sentences timed again. */
54
+ words(pieces) {
55
+ if (pieces.join('') === this.pieces.join('')) {
56
+ return;
57
+ }
58
+ const { received, said } = this.timeline;
59
+ this.pieces = pieces;
60
+ this.timeline = new SpokenTimeline(pieces, SpokenTimeline.pace(pieces.join('')));
61
+ this.timeline.received = received;
62
+ this.timeline.said = said;
63
+ this.shown = Math.min(this.shown, pieces.length - 1);
64
+ this.lastPieces = undefined;
65
+ }
66
+ /** All of its sound came: the timeline knows how long it is. */
67
+ said() {
68
+ this.timeline.said = true;
69
+ }
70
+ caption() {
71
+ if (!this.onPiece || this.timer) {
72
+ return;
73
+ }
74
+ const tick = () => {
75
+ var _a;
76
+ if (!this.live()) {
77
+ clearInterval(this.timer);
78
+ return;
79
+ }
80
+ const now = this.now();
81
+ // A sentence shown stays until the next is heard, its words timed again or not.
82
+ const index = now < 0 ? -1 : Math.max(this.shown, this.pieceAt(now));
83
+ if (index >= 0 && (index !== this.shown || this.lastPieces !== this.pieces)) {
84
+ this.shown = index;
85
+ this.lastPieces = this.pieces;
86
+ (_a = this.onPiece) === null || _a === void 0 ? void 0 : _a.call(this, [...this.pieces], index);
87
+ }
88
+ };
89
+ this.timer = setInterval(tick, CAPTION_MS);
90
+ tick();
91
+ }
92
+ }
93
+ /** The sound of what a voice reads, for the face of a video call (CallVoice.onSound), and the hold it asks (hold). */
94
+ export class VoiceSoundTap {
95
+ constructor() {
96
+ /** How long each reading waits before it plays, in seconds. */
97
+ this.holdS = 0;
98
+ this.listeners = new Set();
99
+ this.on = (listener) => {
100
+ this.listeners.add(listener);
101
+ return () => this.listeners.delete(listener);
102
+ };
103
+ this.hold = (ms) => {
104
+ var _a, _b;
105
+ this.holdS = Math.max(0, ms) / 1000;
106
+ (_b = (_a = this.voice) === null || _a === void 0 ? void 0 : _a.hold) === null || _b === void 0 ? void 0 : _b.call(_a, ms);
107
+ };
108
+ }
109
+ /** Of a call: the sound of its voice is told here, and the hold asked here goes to it; stops with what it returns. */
110
+ follow(voice) {
111
+ var _a, _b;
112
+ (_a = voice.hold) === null || _a === void 0 ? void 0 : _a.call(voice, this.holdS * 1000);
113
+ this.voice = voice;
114
+ const off = (_b = voice.onSound) === null || _b === void 0 ? void 0 : _b.call(voice, (say, pcm, rate) => this.tell(say, pcm, rate));
115
+ return () => {
116
+ off === null || off === void 0 ? void 0 : off();
117
+ if (this.voice === voice) {
118
+ this.voice = undefined;
119
+ }
120
+ };
121
+ }
122
+ tell(say, pcm, rate = 24000) {
123
+ for (const listener of this.listeners) {
124
+ listener(say, pcm, rate);
125
+ }
126
+ }
127
+ }
128
+ /**
129
+ * What the face of a call reads of its voice, whichever voice the call has now: how loud it plays (RMS, 0 to 1;
130
+ * undefined for the device's, which cannot tell), what it reads on the clock of its sound, and that sound.
131
+ */
132
+ export class CallSounds extends VoiceSoundTap {
133
+ constructor(voiceNow) {
134
+ super();
135
+ this.voiceNow = voiceNow;
136
+ this.level = () => { var _a, _b; return (_b = (_a = this.voiceNow()).level) === null || _b === void 0 ? void 0 : _b.call(_a); };
137
+ this.nowReading = () => { var _a, _b; return (_b = (_a = this.voiceNow()).nowReading) === null || _b === void 0 ? void 0 : _b.call(_a); };
138
+ }
139
+ /** Hears the user cut in while the voice of the call reads, and its sound (follow): stops both with what it returns. */
140
+ heard(voice, cut) {
141
+ var _a;
142
+ const offSound = this.follow(voice);
143
+ const offSpeech = (_a = voice.onSpeech) === null || _a === void 0 ? void 0 : _a.call(voice, cut);
144
+ return () => {
145
+ offSound();
146
+ offSpeech === null || offSpeech === void 0 ? void 0 : offSpeech();
147
+ };
148
+ }
149
+ }
150
+ //# sourceMappingURL=voice-reading.js.map
@@ -0,0 +1,15 @@
1
+ import type { Pose } from './dino-avatar.js';
2
+ /** How long a nod of a close-up that hears the user takes, in seconds. */
3
+ export declare const NOD = 0.55;
4
+ /** How a close-up moves in a call (CallFace): its mouth by the sound it plays, a nod to the words it hears. */
5
+ export declare namespace DinoTalkMotion {
6
+ /**
7
+ * How open the mouth of a close-up in a call is, `dt` seconds after it was `open`, for what plays now as loud as
8
+ * `level` (RMS, 0 to 1): it opens at once with a syllable and closes a little slower, as a mouth does.
9
+ */
10
+ function mouth(open: number, level: number, dt: number): number;
11
+ /** A close-up speaking by the sound it plays: the jaw as open as `open` (0 to 1), the head lifted a little with it. */
12
+ function speak(pose: Pose, open: number): Pose;
13
+ /** A close-up that hears the user nods, `t` seconds into a nod (NOD long). */
14
+ function nod(pose: Pose, t: number): Pose;
15
+ }
@@ -0,0 +1,34 @@
1
+ /** How long a nod of a close-up that hears the user takes, in seconds. */
2
+ export const NOD = 0.55;
3
+ /** How quickly the mouth of a close-up in a call opens with a syllable, and closes after it, in seconds. */
4
+ const MOUTH_OPEN = 0.035;
5
+ const MOUTH_CLOSE = 0.09;
6
+ /** How a close-up moves in a call (CallFace): its mouth by the sound it plays, a nod to the words it hears. */
7
+ export var DinoTalkMotion;
8
+ (function (DinoTalkMotion) {
9
+ /**
10
+ * How open the mouth of a close-up in a call is, `dt` seconds after it was `open`, for what plays now as loud as
11
+ * `level` (RMS, 0 to 1): it opens at once with a syllable and closes a little slower, as a mouth does.
12
+ */
13
+ function mouth(open, level, dt) {
14
+ // Speech plays at an RMS of about 0.05 to 0.3: its square root spreads it over the mouth.
15
+ const goal = Math.min(1, Math.sqrt(Math.max(0, level)) * 2.2);
16
+ const k = 1 - Math.exp(-dt / (goal > open ? MOUTH_OPEN : MOUTH_CLOSE));
17
+ return open + (goal - open) * k;
18
+ }
19
+ DinoTalkMotion.mouth = mouth;
20
+ /** A close-up speaking by the sound it plays: the jaw as open as `open` (0 to 1), the head lifted a little with it. */
21
+ function speak(pose, open) {
22
+ return { ...pose, jaw: 2 + 16 * open, head: pose.head - 2.5 * open };
23
+ }
24
+ DinoTalkMotion.speak = speak;
25
+ /** A close-up that hears the user nods, `t` seconds into a nod (NOD long). */
26
+ function nod(pose, t) {
27
+ if (t < 0 || t >= NOD) {
28
+ return pose;
29
+ }
30
+ return { ...pose, head: pose.head + 7 * Math.sin((t / NOD) * Math.PI), y: pose.y + 1.5 * Math.sin((t / NOD) * Math.PI) };
31
+ }
32
+ DinoTalkMotion.nod = nod;
33
+ })(DinoTalkMotion || (DinoTalkMotion = {}));
34
+ //# sourceMappingURL=dino-talk.js.map
@@ -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
@@ -72,17 +72,21 @@ export class ChatShown {
72
72
  * switching does not flash an empty page. `attachment`: what opening it attached already (ChatStores.open),
73
73
  * taken by the store in the same turn of the event loop, so that no event after it is missed.
74
74
  */
75
- async attach({ sessionId, attachment }, send, sessionFile) {
75
+ async attach({ sessionId, attachment }, send, sessionFile, wanted) {
76
76
  var _a;
77
77
  var _b;
78
78
  const tools = this.stores.toolNames();
79
79
  const file = sessionFile !== null && sessionFile !== void 0 ? sessionFile : this.stores.fileOf(sessionId);
80
+ // Something else picked meanwhile (another conversation, a new one): this one is kept, not shown over it.
81
+ // `wanted`: whether what the caller was asked for is still what is wanted, from before it opened the session.
82
+ const asked = this.wanted;
83
+ const still = wanted !== null && wanted !== void 0 ? wanted : (() => this.wanted === asked);
80
84
  const shown = this.current.store;
81
85
  // Shown already, from the device before the connection: attached now, as it is.
82
86
  const early = (shown === null || shown === void 0 ? void 0 : shown.sessionId) === sessionId && !this.stores.isAttached(shown) && this.stores.toolsOf(shown) === tools ? shown : undefined;
83
87
  const kept = early !== null && early !== void 0 ? early : this.stores.recent.take(sessionId, tools);
84
88
  if (kept && this.stores.listed(sessionId)) {
85
- if (!early) {
89
+ if (!early && still()) {
86
90
  this.enter(kept, file);
87
91
  }
88
92
  try {
@@ -94,6 +98,9 @@ export class ChatShown {
94
98
  if (this.current.store === kept) {
95
99
  this.listen(kept);
96
100
  }
101
+ else {
102
+ this.putAway(kept, tools);
103
+ }
97
104
  await sending;
98
105
  return;
99
106
  }
@@ -112,7 +119,7 @@ export class ChatShown {
112
119
  // What failed to go there stays.
113
120
  store.carry(standing);
114
121
  }
115
- if (initial) {
122
+ if (initial && still()) {
116
123
  // As this device saw it, at once.
117
124
  this.enter(store, file);
118
125
  }
@@ -132,12 +139,27 @@ export class ChatShown {
132
139
  throw error;
133
140
  }
134
141
  this.stores.setAttached(store);
142
+ // Shown from the device and left since, or not shown yet with another picked: not shown over what is.
143
+ if (this.current.store !== store && (initial || !still())) {
144
+ this.putAway(store, tools);
145
+ await sending;
146
+ return;
147
+ }
135
148
  if (!initial) {
136
149
  this.enter(store, file);
137
150
  }
138
151
  this.listen(store);
139
152
  await sending;
140
153
  }
154
+ /** A store attached for a conversation no longer shown: detached, and kept to show again at once. */
155
+ putAway(store, tools) {
156
+ if (this.stores.setDetached(store)) {
157
+ store.detach().catch(() => undefined);
158
+ if (!store.state.closed) {
159
+ this.stores.recent.keep(store, tools);
160
+ }
161
+ }
162
+ }
141
163
  /**
142
164
  * The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
143
165
  * showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
@@ -4,6 +4,10 @@ import { type ChatDraft, type ChatOpening, TaChat } from './chat-protocol.js';
4
4
  import { ChatShown } from './chat-shown.js';
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. */
@@ -16,6 +16,8 @@ import { ChatUtil } from './chat-util.js';
16
16
  const FILE = { key: 'chat.file', tier: 'user', initial: '', parse: StateUtil.string, passive: true };
17
17
  /** 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. */
18
18
  const GROUPED = { key: 'chat.grouped', tier: 'user', initial: false, parse: StateUtil.boolean };
19
+ /** What `wanted` is once a new conversation was asked for: no session has it. */
20
+ const DRAFT = 'draft';
19
21
  let TaChatImpl = class TaChatImpl extends ChatShown {
20
22
  start() {
21
23
  return this.enqueue(async () => {
@@ -62,13 +64,20 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
62
64
  }
63
65
  });
64
66
  }
67
+ /**
68
+ * At once, not behind what is queued (a conversation that waits for the connection, or attaches over a slow one):
69
+ * what was asked last is the new conversation, and what was asked before it does not show over it (`wanted`).
70
+ */
65
71
  draft() {
66
- return this.enqueue(async () => {
67
- if (!this.current.draft) {
68
- this.leave();
69
- this.showDraft();
70
- }
71
- });
72
+ this.wanted = DRAFT;
73
+ if (this.current.pending) {
74
+ this.update({ pending: undefined, opening: undefined });
75
+ }
76
+ if (!this.current.draft) {
77
+ this.leave();
78
+ this.showDraft();
79
+ }
80
+ return Promise.resolve();
72
81
  }
73
82
  async setDraftCwd(cwd) {
74
83
  if (this.current.draft) {
@@ -114,7 +123,7 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
114
123
  if (draft) {
115
124
  // What was sent shows at once, with Ta at work, while the conversation opens.
116
125
  this.stopping = false;
117
- this.update({ draft: { ...draft, sending: { message, images } } });
126
+ this.update({ draft: { ...draft, sending: { message, images, id: crypto.randomUUID() } } });
118
127
  }
119
128
  return this.openDraft();
120
129
  }
@@ -125,14 +134,15 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
125
134
  if (!(draft === null || draft === void 0 ? void 0 : draft.sending)) {
126
135
  return;
127
136
  }
128
- const { message, images } = draft.sending;
137
+ const { message, images, id } = draft.sending;
129
138
  let sessionId;
130
139
  try {
131
- const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model });
140
+ // By the id of this first message: opened and sent again after a lost connection, it opens and runs once.
141
+ const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model, openId: id });
132
142
  sessionId = opened.sessionId;
133
143
  // Sent with the attach, not after it: one round trip less before Ta starts. A failure to send
134
144
  // stays on the message in the conversation.
135
- await this.attach(opened, store => store.send(message, { images }));
145
+ await this.attach(opened, store => store.send(message, { images, clientMessageId: id }));
136
146
  }
137
147
  catch (error) {
138
148
  // No conversation: the message stays, marked, to send again; for a lost connection, once it is back.
@@ -172,8 +182,14 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
172
182
  }
173
183
  resendDraft() {
174
184
  var _a;
175
- const sending = (_a = this.current.draft) === null || _a === void 0 ? void 0 : _a.sending;
176
- return (sending === null || sending === void 0 ? void 0 : sending.failed) ? this.submit(sending.message, sending.images) : Promise.resolve();
185
+ const { draft } = this.current;
186
+ if (!((_a = draft === null || draft === void 0 ? void 0 : draft.sending) === null || _a === void 0 ? void 0 : _a.failed)) {
187
+ return Promise.resolve();
188
+ }
189
+ // With its id: one that opened before the failure was told is not opened again.
190
+ this.stopping = false;
191
+ this.update({ draft: { ...draft, sending: { ...draft.sending, failed: undefined, heldAt: undefined } } });
192
+ return this.openDraft();
177
193
  }
178
194
  discardDraft() {
179
195
  var _a;
@@ -213,7 +229,7 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
213
229
  await ChatUtil.untilConnected(async () => {
214
230
  const { store } = this.current;
215
231
  if (wanted() && ((store === null || store === void 0 ? void 0 : store.sessionId) !== sessionId || !this.stores.isAttached(store))) {
216
- await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile).catch(error => this.reopenClosed(sessionId, error));
232
+ await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile, wanted).catch(error => this.reopenClosed(sessionId, error, wanted));
217
233
  }
218
234
  }, () => this.workbench.connected(), wanted);
219
235
  }).finally(() => {
@@ -261,7 +277,7 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
261
277
  if (!wanted() || (open && (store === null || store === void 0 ? void 0 : store.sessionId) === open.sessionId && this.stores.isAttached(store))) {
262
278
  return;
263
279
  }
264
- 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);
280
+ 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);
265
281
  }, () => this.workbench.connected(), wanted);
266
282
  }).finally(() => {
267
283
  if (this.current.pending === sessionFile) {
@@ -313,13 +329,13 @@ let TaChatImpl = class TaChatImpl extends ChatShown {
313
329
  * A session of the list that the service closed since the list was read (idle, or a restart): opened
314
330
  * again from its file. One of a package's group is left to its package, which opens it with its role.
315
331
  */
316
- async reopenClosed(sessionId, error) {
332
+ async reopenClosed(sessionId, error, wanted) {
317
333
  const info = this.workbench.state.sessions.find(session => session.sessionId === sessionId);
318
334
  if ((error === null || error === void 0 ? void 0 : error.code) !== TaErrorCode.SESSION_NOT_FOUND || !(info === null || info === void 0 ? void 0 : info.sessionFile) || info.group) {
319
335
  await this.workbench.refresh().catch(() => undefined);
320
336
  throw error;
321
337
  }
322
- await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile);
338
+ await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile, wanted);
323
339
  }
324
340
  /** The conversation shown, opened again from its file; the newest other one if that fails. */
325
341
  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.js';
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,7 +52,7 @@ 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;