@celljs/ta-web 4.49.0 → 4.50.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 (382) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/account/account-side.js +4 -0
  4. package/esm/browser/account/device-account.d.ts +6 -0
  5. package/esm/browser/account/device-account.js +20 -5
  6. package/esm/browser/assistant/assistant-view.js +2 -0
  7. package/esm/browser/assistant/call-announcing.d.ts +25 -0
  8. package/esm/browser/assistant/call-announcing.js +32 -0
  9. package/esm/browser/assistant/call-answering.d.ts +43 -0
  10. package/esm/browser/assistant/call-answering.js +63 -0
  11. package/esm/browser/assistant/call-hearing.d.ts +53 -0
  12. package/esm/browser/assistant/call-hearing.js +98 -0
  13. package/esm/browser/assistant/call-pausing.d.ts +40 -0
  14. package/esm/browser/assistant/call-pausing.js +82 -0
  15. package/esm/browser/assistant/call-reading.d.ts +32 -0
  16. package/esm/browser/assistant/call-reading.js +35 -0
  17. package/esm/browser/assistant/call-revoicing.d.ts +33 -0
  18. package/esm/browser/assistant/call-revoicing.js +68 -0
  19. package/esm/browser/assistant/call-turns.d.ts +29 -0
  20. package/esm/browser/assistant/call-turns.js +33 -0
  21. package/esm/browser/assistant/spoken-answer.d.ts +21 -0
  22. package/esm/browser/assistant/spoken-answer.js +69 -0
  23. package/esm/browser/assistant/spoken-call.d.ts +7 -0
  24. package/esm/browser/assistant/spoken-call.js +16 -0
  25. package/esm/browser/assistant/voice-call-protocol.d.ts +5 -0
  26. package/esm/browser/assistant/voice-call.d.ts +47 -43
  27. package/esm/browser/assistant/voice-call.js +193 -219
  28. package/esm/browser/chat/chat-view.js +2 -1
  29. package/esm/browser/components/account-recovery-view.d.ts +11 -0
  30. package/esm/browser/components/account-recovery-view.js +81 -0
  31. package/esm/browser/components/account-view.d.ts +1 -2
  32. package/esm/browser/components/account-view.js +10 -1
  33. package/esm/browser/components/app-nav.js +19 -8
  34. package/esm/browser/components/app-shell-hooks.d.ts +5 -0
  35. package/esm/browser/components/app-shell-hooks.js +45 -0
  36. package/esm/browser/components/app-shell-state.js +2 -1
  37. package/esm/browser/components/app-view.js +9 -5
  38. package/esm/browser/components/chat-emoji.d.ts +35 -0
  39. package/esm/browser/components/chat-emoji.js +129 -0
  40. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  41. package/esm/browser/components/composer-attachments.d.ts +6 -0
  42. package/esm/browser/components/composer-attachments.js +12 -1
  43. package/esm/browser/components/composer-box-protocol.d.ts +15 -0
  44. package/esm/browser/components/composer-box.js +110 -87
  45. package/esm/browser/components/composer-drop-hooks.d.ts +26 -0
  46. package/esm/browser/components/composer-drop-hooks.js +36 -0
  47. package/esm/browser/components/composer-emoji.js +1 -1
  48. package/esm/browser/components/composer-faces.d.ts +16 -0
  49. package/esm/browser/components/composer-faces.js +37 -0
  50. package/esm/browser/components/composer-media.d.ts +10 -0
  51. package/esm/browser/components/composer-media.js +12 -1
  52. package/esm/browser/components/composer-target.d.ts +4 -0
  53. package/esm/browser/components/composer-target.js +18 -7
  54. package/esm/browser/components/composer-type-focus.d.ts +24 -0
  55. package/esm/browser/components/composer-type-focus.js +17 -0
  56. package/esm/browser/components/composer-voice.d.ts +24 -0
  57. package/esm/browser/components/composer-voice.js +37 -0
  58. package/esm/browser/components/composer.d.ts +2 -2
  59. package/esm/browser/components/composer.js +39 -8
  60. package/esm/browser/components/context-menu.js +2 -1
  61. package/esm/browser/components/emoji-panel.d.ts +11 -7
  62. package/esm/browser/components/emoji-panel.js +40 -22
  63. package/esm/browser/components/extension-settings.js +2 -2
  64. package/esm/browser/components/folder-new.d.ts +18 -0
  65. package/esm/browser/components/folder-new.js +53 -0
  66. package/esm/browser/components/folder-picker.d.ts +5 -2
  67. package/esm/browser/components/folder-picker.js +18 -6
  68. package/esm/browser/components/host-view.d.ts +1 -1
  69. package/esm/browser/components/image-menu.d.ts +8 -3
  70. package/esm/browser/components/image-menu.js +34 -9
  71. package/esm/browser/components/markdown.js +9 -2
  72. package/esm/browser/components/media.js +3 -2
  73. package/esm/browser/components/message-list.js +2 -2
  74. package/esm/browser/components/message-steps.js +20 -11
  75. package/esm/browser/components/message-user.js +2 -2
  76. package/esm/browser/components/moved-notice.js +2 -1
  77. package/esm/browser/components/nav-places.d.ts +2 -0
  78. package/esm/browser/components/nav-places.js +4 -2
  79. package/esm/browser/components/phone-shell.d.ts +2 -0
  80. package/esm/browser/components/phone-shell.js +5 -1
  81. package/esm/browser/components/secret-text.d.ts +1 -1
  82. package/esm/browser/components/secret-text.js +4 -3
  83. package/esm/browser/components/session-view.js +3 -0
  84. package/esm/browser/components/settings-choices.d.ts +2 -1
  85. package/esm/browser/components/settings-choices.js +13 -5
  86. package/esm/browser/components/settings-more.js +3 -3
  87. package/esm/browser/components/settings-parts.js +13 -2
  88. package/esm/browser/components/share-item-sheet.js +7 -1
  89. package/esm/browser/components/tab-title.d.ts +27 -0
  90. package/esm/browser/components/tab-title.js +35 -0
  91. package/esm/browser/components/use-composer-attachments.d.ts +28 -0
  92. package/esm/browser/components/use-composer-attachments.js +65 -0
  93. package/esm/browser/components/use-composer-files.d.ts +25 -0
  94. package/esm/browser/components/use-composer-files.js +52 -0
  95. package/esm/browser/components/web-composer.d.ts +3 -1
  96. package/esm/browser/components/web-composer.js +3 -2
  97. package/esm/browser/components/workbench-view.js +1 -0
  98. package/esm/browser/components/working-directory.js +2 -1
  99. package/esm/browser/device/drag-move.d.ts +21 -0
  100. package/esm/browser/device/drag-move.js +86 -0
  101. package/esm/browser/extension/icons.js +7 -1
  102. package/esm/browser/extension/web-api-desktop.d.ts +19 -0
  103. package/esm/browser/extension/web-api-menus.d.ts +19 -0
  104. package/esm/browser/extension/web-api-spec.js +2 -0
  105. package/esm/browser/extension/web-extension-api.d.ts +24 -23
  106. package/esm/browser/extension/web-extension-context.d.ts +1 -0
  107. package/esm/browser/extension/web-extension-context.js +12 -5
  108. package/esm/browser/extension/web-extension-run.js +1 -0
  109. package/esm/browser/extension/web-share-ui.d.ts +1 -1
  110. package/esm/browser/extension/web-share-ui.js +2 -0
  111. package/esm/browser/extension/web-share.d.ts +13 -0
  112. package/esm/browser/extension/web-share.js +37 -2
  113. package/esm/browser/i18n/en/account.d.ts +18 -0
  114. package/esm/browser/i18n/en/account.js +18 -0
  115. package/esm/browser/i18n/en/call.js +1 -1
  116. package/esm/browser/i18n/en/chat.d.ts +15 -0
  117. package/esm/browser/i18n/en/chat.js +16 -1
  118. package/esm/browser/i18n/en/common.d.ts +2 -0
  119. package/esm/browser/i18n/en/common.js +2 -0
  120. package/esm/browser/i18n/en/discover.d.ts +2 -0
  121. package/esm/browser/i18n/en/discover.js +2 -0
  122. package/esm/browser/i18n/en/settings.d.ts +17 -0
  123. package/esm/browser/i18n/en/settings.js +17 -0
  124. package/esm/browser/i18n/ja/account.js +18 -0
  125. package/esm/browser/i18n/ja/call.js +1 -1
  126. package/esm/browser/i18n/ja/chat.js +16 -1
  127. package/esm/browser/i18n/ja/common.js +2 -0
  128. package/esm/browser/i18n/ja/discover.js +3 -1
  129. package/esm/browser/i18n/ja/settings.js +17 -0
  130. package/esm/browser/i18n/locales.d.ts +55 -1
  131. package/esm/browser/i18n/messages.d.ts +54 -0
  132. package/esm/browser/i18n/zh/account.js +18 -0
  133. package/esm/browser/i18n/zh/call.js +1 -1
  134. package/esm/browser/i18n/zh/chat.js +16 -1
  135. package/esm/browser/i18n/zh/common.js +2 -0
  136. package/esm/browser/i18n/zh/discover.js +3 -1
  137. package/esm/browser/i18n/zh/settings.js +17 -0
  138. package/esm/browser/i18n/zh-tw/account.js +18 -0
  139. package/esm/browser/i18n/zh-tw/call.js +1 -1
  140. package/esm/browser/i18n/zh-tw/chat.js +16 -1
  141. package/esm/browser/i18n/zh-tw/common.js +2 -0
  142. package/esm/browser/i18n/zh-tw/discover.js +3 -1
  143. package/esm/browser/i18n/zh-tw/settings.js +17 -0
  144. package/esm/browser/offline/kept-chats.d.ts +3 -1
  145. package/esm/browser/offline/kept-chats.js +1 -1
  146. package/esm/browser/partners/group-picker.d.ts +3 -2
  147. package/esm/browser/partners/group-picker.js +8 -3
  148. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  149. package/esm/browser/sandbox/work/work-docs.js +5 -2
  150. package/esm/browser/sandbox/work/work-frame.d.ts +3 -0
  151. package/esm/browser/sandbox/work/work-frame.js +9 -3
  152. package/esm/browser/sandbox/work/work-gates.d.ts +77 -0
  153. package/esm/browser/sandbox/work/work-gates.js +182 -0
  154. package/esm/browser/settings/agent-settings.js +1 -1
  155. package/esm/browser/settings/navigation.d.ts +38 -10
  156. package/esm/browser/settings/navigation.js +73 -17
  157. package/esm/browser/settings/settings-protocol.d.ts +16 -1
  158. package/esm/browser/settings/settings-protocol.js +20 -2
  159. package/esm/browser/settings/settings.js +4 -1
  160. package/esm/browser/style/base.d.ts +1 -1
  161. package/esm/browser/style/base.js +15 -2
  162. package/esm/browser/style/chat-list.d.ts +1 -1
  163. package/esm/browser/style/chat-list.js +6 -3
  164. package/esm/browser/style/conversation-column.d.ts +1 -1
  165. package/esm/browser/style/conversation-column.js +28 -8
  166. package/esm/browser/style/conversation.d.ts +1 -1
  167. package/esm/browser/style/conversation.js +5 -0
  168. package/esm/browser/style/device.js +5 -0
  169. package/esm/browser/style/pages.d.ts +1 -1
  170. package/esm/browser/style/pages.js +3 -3
  171. package/esm/browser/style/shell.d.ts +1 -1
  172. package/esm/browser/style/shell.js +13 -6
  173. package/esm/browser/style/tasks.d.ts +1 -1
  174. package/esm/browser/style/tasks.js +4 -2
  175. package/esm/browser/util/chat-emoji.d.ts +44 -0
  176. package/esm/browser/util/chat-emoji.js +269 -0
  177. package/esm/browser/util/composer-drop.d.ts +26 -0
  178. package/esm/browser/util/composer-drop.js +40 -0
  179. package/esm/browser/util/composer-files.d.ts +48 -0
  180. package/esm/browser/util/composer-files.js +99 -0
  181. package/esm/browser/util/composer.d.ts +13 -1
  182. package/esm/browser/util/composer.js +24 -6
  183. package/esm/browser/util/markdown.d.ts +5 -0
  184. package/esm/browser/util/markdown.js +18 -0
  185. package/esm/browser/util/message.d.ts +6 -1
  186. package/esm/browser/util/message.js +13 -2
  187. package/esm/browser/util/process.d.ts +10 -13
  188. package/esm/browser/util/process.js +31 -83
  189. package/esm/browser/util/turn-join.d.ts +38 -0
  190. package/esm/browser/util/turn-join.js +119 -0
  191. package/esm/browser/workbench-services.js +1 -1
  192. package/lib/browser/account/account-side.js +4 -0
  193. package/lib/browser/account/device-account.d.ts +6 -0
  194. package/lib/browser/account/device-account.js +20 -5
  195. package/lib/browser/assistant/assistant-view.js +2 -0
  196. package/lib/browser/assistant/call-announcing.d.ts +26 -0
  197. package/lib/browser/assistant/call-announcing.js +36 -0
  198. package/lib/browser/assistant/call-answering.d.ts +44 -0
  199. package/lib/browser/assistant/call-answering.js +67 -0
  200. package/lib/browser/assistant/call-hearing.d.ts +54 -0
  201. package/lib/browser/assistant/call-hearing.js +102 -0
  202. package/lib/browser/assistant/call-pausing.d.ts +41 -0
  203. package/lib/browser/assistant/call-pausing.js +86 -0
  204. package/lib/browser/assistant/call-reading.d.ts +33 -0
  205. package/lib/browser/assistant/call-reading.js +39 -0
  206. package/lib/browser/assistant/call-revoicing.d.ts +34 -0
  207. package/lib/browser/assistant/call-revoicing.js +72 -0
  208. package/lib/browser/assistant/call-turns.d.ts +30 -0
  209. package/lib/browser/assistant/call-turns.js +37 -0
  210. package/lib/browser/assistant/spoken-answer.d.ts +22 -0
  211. package/lib/browser/assistant/spoken-answer.js +73 -0
  212. package/lib/browser/assistant/spoken-call.d.ts +8 -0
  213. package/lib/browser/assistant/spoken-call.js +19 -0
  214. package/lib/browser/assistant/voice-call-protocol.d.ts +5 -0
  215. package/lib/browser/assistant/voice-call.d.ts +47 -43
  216. package/lib/browser/assistant/voice-call.js +192 -218
  217. package/lib/browser/chat/chat-view.js +2 -1
  218. package/lib/browser/components/account-recovery-view.d.ts +12 -0
  219. package/lib/browser/components/account-recovery-view.js +117 -0
  220. package/lib/browser/components/account-view.d.ts +1 -2
  221. package/lib/browser/components/account-view.js +10 -1
  222. package/lib/browser/components/app-nav.js +19 -8
  223. package/lib/browser/components/app-shell-hooks.d.ts +5 -0
  224. package/lib/browser/components/app-shell-hooks.js +46 -0
  225. package/lib/browser/components/app-shell-state.js +1 -0
  226. package/lib/browser/components/app-view.js +8 -4
  227. package/lib/browser/components/chat-emoji.d.ts +36 -0
  228. package/lib/browser/components/chat-emoji.js +167 -0
  229. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  230. package/lib/browser/components/composer-attachments.d.ts +6 -0
  231. package/lib/browser/components/composer-attachments.js +12 -0
  232. package/lib/browser/components/composer-box-protocol.d.ts +15 -0
  233. package/lib/browser/components/composer-box.js +107 -84
  234. package/lib/browser/components/composer-drop-hooks.d.ts +27 -0
  235. package/lib/browser/components/composer-drop-hooks.js +72 -0
  236. package/lib/browser/components/composer-emoji.js +1 -1
  237. package/lib/browser/components/composer-faces.d.ts +17 -0
  238. package/lib/browser/components/composer-faces.js +73 -0
  239. package/lib/browser/components/composer-media.d.ts +10 -0
  240. package/lib/browser/components/composer-media.js +13 -0
  241. package/lib/browser/components/composer-target.d.ts +4 -0
  242. package/lib/browser/components/composer-target.js +18 -7
  243. package/lib/browser/components/composer-type-focus.d.ts +25 -0
  244. package/lib/browser/components/composer-type-focus.js +20 -0
  245. package/lib/browser/components/composer-voice.d.ts +25 -0
  246. package/lib/browser/components/composer-voice.js +73 -0
  247. package/lib/browser/components/composer.d.ts +2 -2
  248. package/lib/browser/components/composer.js +38 -7
  249. package/lib/browser/components/context-menu.js +2 -1
  250. package/lib/browser/components/emoji-panel.d.ts +11 -7
  251. package/lib/browser/components/emoji-panel.js +40 -22
  252. package/lib/browser/components/extension-settings.js +1 -1
  253. package/lib/browser/components/folder-new.d.ts +19 -0
  254. package/lib/browser/components/folder-new.js +90 -0
  255. package/lib/browser/components/folder-picker.d.ts +5 -2
  256. package/lib/browser/components/folder-picker.js +17 -5
  257. package/lib/browser/components/host-view.d.ts +1 -1
  258. package/lib/browser/components/image-menu.d.ts +8 -3
  259. package/lib/browser/components/image-menu.js +34 -9
  260. package/lib/browser/components/markdown.js +9 -2
  261. package/lib/browser/components/media.js +3 -2
  262. package/lib/browser/components/message-list.js +2 -2
  263. package/lib/browser/components/message-steps.js +20 -11
  264. package/lib/browser/components/message-user.js +1 -1
  265. package/lib/browser/components/moved-notice.js +2 -1
  266. package/lib/browser/components/nav-places.d.ts +2 -0
  267. package/lib/browser/components/nav-places.js +4 -2
  268. package/lib/browser/components/phone-shell.d.ts +2 -0
  269. package/lib/browser/components/phone-shell.js +5 -1
  270. package/lib/browser/components/secret-text.d.ts +1 -1
  271. package/lib/browser/components/secret-text.js +4 -3
  272. package/lib/browser/components/session-view.js +3 -0
  273. package/lib/browser/components/settings-choices.d.ts +2 -1
  274. package/lib/browser/components/settings-choices.js +12 -4
  275. package/lib/browser/components/settings-more.js +2 -2
  276. package/lib/browser/components/settings-parts.js +11 -0
  277. package/lib/browser/components/share-item-sheet.js +7 -1
  278. package/lib/browser/components/tab-title.d.ts +28 -0
  279. package/lib/browser/components/tab-title.js +38 -0
  280. package/lib/browser/components/use-composer-attachments.d.ts +29 -0
  281. package/lib/browser/components/use-composer-attachments.js +101 -0
  282. package/lib/browser/components/use-composer-files.d.ts +26 -0
  283. package/lib/browser/components/use-composer-files.js +88 -0
  284. package/lib/browser/components/web-composer.d.ts +3 -1
  285. package/lib/browser/components/web-composer.js +3 -2
  286. package/lib/browser/components/workbench-view.js +1 -0
  287. package/lib/browser/components/working-directory.js +2 -1
  288. package/lib/browser/device/drag-move.d.ts +22 -0
  289. package/lib/browser/device/drag-move.js +122 -0
  290. package/lib/browser/extension/icons.js +6 -0
  291. package/lib/browser/extension/web-api-desktop.d.ts +19 -0
  292. package/lib/browser/extension/web-api-menus.d.ts +19 -0
  293. package/lib/browser/extension/web-api-spec.js +2 -0
  294. package/lib/browser/extension/web-extension-api.d.ts +24 -23
  295. package/lib/browser/extension/web-extension-context.d.ts +1 -0
  296. package/lib/browser/extension/web-extension-context.js +12 -5
  297. package/lib/browser/extension/web-extension-run.js +1 -0
  298. package/lib/browser/extension/web-share-ui.d.ts +1 -1
  299. package/lib/browser/extension/web-share-ui.js +2 -0
  300. package/lib/browser/extension/web-share.d.ts +13 -0
  301. package/lib/browser/extension/web-share.js +37 -2
  302. package/lib/browser/i18n/en/account.d.ts +18 -0
  303. package/lib/browser/i18n/en/account.js +18 -0
  304. package/lib/browser/i18n/en/call.js +1 -1
  305. package/lib/browser/i18n/en/chat.d.ts +15 -0
  306. package/lib/browser/i18n/en/chat.js +16 -1
  307. package/lib/browser/i18n/en/common.d.ts +2 -0
  308. package/lib/browser/i18n/en/common.js +2 -0
  309. package/lib/browser/i18n/en/discover.d.ts +2 -0
  310. package/lib/browser/i18n/en/discover.js +2 -0
  311. package/lib/browser/i18n/en/settings.d.ts +17 -0
  312. package/lib/browser/i18n/en/settings.js +17 -0
  313. package/lib/browser/i18n/ja/account.js +18 -0
  314. package/lib/browser/i18n/ja/call.js +1 -1
  315. package/lib/browser/i18n/ja/chat.js +16 -1
  316. package/lib/browser/i18n/ja/common.js +2 -0
  317. package/lib/browser/i18n/ja/discover.js +3 -1
  318. package/lib/browser/i18n/ja/settings.js +17 -0
  319. package/lib/browser/i18n/locales.d.ts +55 -1
  320. package/lib/browser/i18n/messages.d.ts +54 -0
  321. package/lib/browser/i18n/zh/account.js +18 -0
  322. package/lib/browser/i18n/zh/call.js +1 -1
  323. package/lib/browser/i18n/zh/chat.js +16 -1
  324. package/lib/browser/i18n/zh/common.js +2 -0
  325. package/lib/browser/i18n/zh/discover.js +3 -1
  326. package/lib/browser/i18n/zh/settings.js +17 -0
  327. package/lib/browser/i18n/zh-tw/account.js +18 -0
  328. package/lib/browser/i18n/zh-tw/call.js +1 -1
  329. package/lib/browser/i18n/zh-tw/chat.js +16 -1
  330. package/lib/browser/i18n/zh-tw/common.js +2 -0
  331. package/lib/browser/i18n/zh-tw/discover.js +3 -1
  332. package/lib/browser/i18n/zh-tw/settings.js +17 -0
  333. package/lib/browser/offline/kept-chats.d.ts +3 -1
  334. package/lib/browser/offline/kept-chats.js +1 -1
  335. package/lib/browser/partners/group-picker.d.ts +3 -2
  336. package/lib/browser/partners/group-picker.js +8 -3
  337. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  338. package/lib/browser/sandbox/work/work-docs.js +5 -2
  339. package/lib/browser/sandbox/work/work-frame.d.ts +3 -0
  340. package/lib/browser/sandbox/work/work-frame.js +9 -3
  341. package/lib/browser/sandbox/work/work-gates.d.ts +78 -0
  342. package/lib/browser/sandbox/work/work-gates.js +185 -0
  343. package/lib/browser/settings/agent-settings.js +1 -1
  344. package/lib/browser/settings/navigation.d.ts +38 -10
  345. package/lib/browser/settings/navigation.js +74 -18
  346. package/lib/browser/settings/settings-protocol.d.ts +16 -1
  347. package/lib/browser/settings/settings-protocol.js +21 -3
  348. package/lib/browser/settings/settings.js +3 -0
  349. package/lib/browser/style/base.d.ts +1 -1
  350. package/lib/browser/style/base.js +15 -2
  351. package/lib/browser/style/chat-list.d.ts +1 -1
  352. package/lib/browser/style/chat-list.js +6 -3
  353. package/lib/browser/style/conversation-column.d.ts +1 -1
  354. package/lib/browser/style/conversation-column.js +28 -8
  355. package/lib/browser/style/conversation.d.ts +1 -1
  356. package/lib/browser/style/conversation.js +5 -0
  357. package/lib/browser/style/device.js +5 -0
  358. package/lib/browser/style/pages.d.ts +1 -1
  359. package/lib/browser/style/pages.js +3 -3
  360. package/lib/browser/style/shell.d.ts +1 -1
  361. package/lib/browser/style/shell.js +13 -6
  362. package/lib/browser/style/tasks.d.ts +1 -1
  363. package/lib/browser/style/tasks.js +4 -2
  364. package/lib/browser/util/chat-emoji.d.ts +45 -0
  365. package/lib/browser/util/chat-emoji.js +272 -0
  366. package/lib/browser/util/composer-drop.d.ts +27 -0
  367. package/lib/browser/util/composer-drop.js +43 -0
  368. package/lib/browser/util/composer-files.d.ts +49 -0
  369. package/lib/browser/util/composer-files.js +102 -0
  370. package/lib/browser/util/composer.d.ts +13 -1
  371. package/lib/browser/util/composer.js +24 -6
  372. package/lib/browser/util/markdown.d.ts +5 -0
  373. package/lib/browser/util/markdown.js +18 -0
  374. package/lib/browser/util/message.d.ts +6 -1
  375. package/lib/browser/util/message.js +13 -2
  376. package/lib/browser/util/process.d.ts +10 -13
  377. package/lib/browser/util/process.js +32 -84
  378. package/lib/browser/util/turn-join.d.ts +39 -0
  379. package/lib/browser/util/turn-join.js +122 -0
  380. package/lib/browser/workbench-services.js +1 -1
  381. package/package.json +7 -7
  382. package/public/emoji/wechat-v1.webp +0 -0
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpokenAnswer = void 0;
4
+ exports.plain = plain;
5
+ const YES = /^(y|yes|yeah|yep|ok|okay|sure|go ahead|do it|approve(d)?|allow|是|是的|对|对的|好|好的|可以|行|确认|确认执行|同意|批准|允许|はい|ええ|オッケー|いいよ)$/i;
6
+ const NO = /^(n|no|nope|cancel|stop|deny|reject|don't|dont|not now|不|不是|不要|不行|不可以|取消|拒绝|不同意|いいえ|やめて|だめ|キャンセル)$/i;
7
+ /** How an option is counted out: `2`, `the second`, `第二个`, `2番`. */
8
+ const ORDINALS = [
9
+ [/^(?:1|one|first|the first|第一个|第1个|第一|1番目|最初)$/i],
10
+ [/^(?:2|two|second|the second|第二个|第2个|第二|2番目|次)$/i],
11
+ [/^(?:3|three|third|the third|第三个|第3个|第三|3番目)$/i],
12
+ [/^(?:4|four|fourth|the fourth|第四个|第4个|第四|4番目)$/i],
13
+ [/^(?:5|five|fifth|the fifth|第五个|第5个|第五|5番目)$/i],
14
+ [/^(?:6|six|sixth|the sixth|第六个|第6个|第六|6番目)$/i],
15
+ [/^(?:7|seven|seventh|the seventh|第七个|第7个|第七|7番目)$/i],
16
+ [/^(?:8|eight|eighth|the eighth|第八个|第8个|第八|8番目)$/i],
17
+ ];
18
+ /** The words said, without the punctuation and spaces that a recognizer adds. */
19
+ function plain(said) {
20
+ return said
21
+ .trim()
22
+ .replace(/[\s.!?。!?,,、…]+$/g, '')
23
+ .replace(/^[\s"'“”‘’]+|[\s"'“”‘’]+$/g, '');
24
+ }
25
+ function ordinal(said, count) {
26
+ for (let index = 0; index < Math.min(count, ORDINALS.length); index++) {
27
+ if (ORDINALS[index].some(pattern => pattern.test(said))) {
28
+ return index;
29
+ }
30
+ }
31
+ return undefined;
32
+ }
33
+ /** The option the words name: its text, part of it, or its number; none when several do. */
34
+ function option(said, options) {
35
+ const lower = said.toLowerCase();
36
+ const exact = options.filter(each => plain(each).toLowerCase() === lower);
37
+ if (exact.length === 1) {
38
+ return exact[0];
39
+ }
40
+ const named = options.filter(each => {
41
+ const words = plain(each).toLowerCase();
42
+ return words.length > 1 && (words.includes(lower) || lower.includes(words));
43
+ });
44
+ return named.length === 1 ? named[0] : undefined;
45
+ }
46
+ var SpokenAnswer;
47
+ (function (SpokenAnswer) {
48
+ /** What the words answer of the dialog; undefined for words that do not answer it, which go to the conversation. */
49
+ function of(dialog, said) {
50
+ var _a;
51
+ const words = plain(said);
52
+ if (!dialog || !words) {
53
+ return undefined;
54
+ }
55
+ if (dialog.method === 'confirm') {
56
+ if (YES.test(words)) {
57
+ return { confirmed: true };
58
+ }
59
+ return NO.test(words) ? { confirmed: false } : undefined;
60
+ }
61
+ if (dialog.method === 'select' && ((_a = dialog.options) === null || _a === void 0 ? void 0 : _a.length)) {
62
+ const at = ordinal(words, dialog.options.length);
63
+ if (at !== undefined) {
64
+ return { value: dialog.options[at] };
65
+ }
66
+ const named = option(words, dialog.options);
67
+ return named === undefined ? undefined : { value: named };
68
+ }
69
+ return undefined;
70
+ }
71
+ SpokenAnswer.of = of;
72
+ })(SpokenAnswer || (exports.SpokenAnswer = SpokenAnswer = {}));
73
+ //# sourceMappingURL=spoken-answer.js.map
@@ -0,0 +1,8 @@
1
+ import type { RpcExtensionUIRequest, RpcExtensionUIResponse } from '@celljs/ta-protocol';
2
+ /**
3
+ * What a call hears for the question its conversation waits on: the question answered with it (a permission's yes or
4
+ * no, a choice's option), true; false for words that do not answer it, or a question that takes typed words, which go
5
+ * to the conversation. What was said is done by `respond`.
6
+ */
7
+ export declare function answerSpoken(request: RpcExtensionUIRequest | undefined, said: string, respond: (response: RpcExtensionUIResponse) => Promise<unknown>): Promise<boolean>;
8
+ //# sourceMappingURL=spoken-call.d.ts.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.answerSpoken = answerSpoken;
4
+ const spoken_answer_1 = require("./spoken-answer");
5
+ /**
6
+ * What a call hears for the question its conversation waits on: the question answered with it (a permission's yes or
7
+ * no, a choice's option), true; false for words that do not answer it, or a question that takes typed words, which go
8
+ * to the conversation. What was said is done by `respond`.
9
+ */
10
+ async function answerSpoken(request, said, respond) {
11
+ const dialog = request;
12
+ const answer = spoken_answer_1.SpokenAnswer.of(dialog, said);
13
+ if (!request || !answer) {
14
+ return false;
15
+ }
16
+ await respond({ type: 'extension_ui_response', id: request.id, ...answer });
17
+ return true;
18
+ }
19
+ //# sourceMappingURL=spoken-call.js.map
@@ -118,6 +118,11 @@ export interface CallOptions extends CallTurnTimes {
118
118
  voice(): string | undefined;
119
119
  /** Sends what the user said to the conversation. */
120
120
  send(text: string): Promise<unknown>;
121
+ /**
122
+ * What the user said answers a question the conversation waits on (a permission, a choice): it is answered with it,
123
+ * not sent as words. True once answered; false (or failing) for words that do not answer it.
124
+ */
125
+ answer?(said: string): Promise<boolean>;
121
126
  /** The call ended by itself: why, for a notice; `detail` what the voice service said. */
122
127
  ended?(reason: CallEnd, detail?: string): void;
123
128
  /**
@@ -1,10 +1,16 @@
1
1
  import { Voice } from '../util/voice';
2
+ import { CallAnnouncing } from './call-announcing';
3
+ import { CallAnswering } from './call-answering';
2
4
  import { CallConversing, CallDrafts } from './call-conversing';
5
+ import { CallHearing } from './call-hearing';
3
6
  import { CallPartnering } from './call-partnering';
7
+ import { CallPausing } from './call-pausing';
8
+ import { CallReading } from './call-reading';
9
+ import { CallRevoicing } from './call-revoicing';
4
10
  import { CallTurnEnd } from './call-turn-end';
11
+ import { CallTurns } from './call-turns';
5
12
  import type { CallEnd, CallOptions, CallPartner, CallState, CallVoice } from './voice-call-protocol';
6
13
  import { CallSounds } from './voice-reading';
7
- import { VoiceReopen } from './voice-reopen';
8
14
  /**
9
15
  * A call with a conversation (the double's, or any other), by the voice of the page: Ta listens until the user pauses, sends what they said, reads
10
16
  * its answer out, then listens again, until the user hangs up or says nothing for a while. With the voice of the device
@@ -19,14 +25,14 @@ export declare class VoiceCall {
19
25
  protected listening?: Voice.Listening;
20
26
  /** Of the listen now: one that ended or was stopped for another says nothing more. */
21
27
  protected round: number;
22
- protected silent: number;
23
- /** When someone last spoke (the user, or Ta): the silence that ends the call counts from it. */
24
- protected spoke: number;
25
- protected retry?: ReturnType<typeof setTimeout>;
28
+ /** What the call hears of the user between listens (CallHearing). */
29
+ protected readonly hearing: CallHearing;
26
30
  /** When the user is done with what they say. */
27
31
  protected readonly turnEnd: CallTurnEnd;
28
- /** An answer that came while paused: read once the page shows again. */
32
+ /** An answer that came while paused: read once the page shows again (CallPausing). */
29
33
  protected pending?: string;
34
+ /** What Ta says aloud in this call (CallReading). */
35
+ protected readonly reading: CallReading;
30
36
  /** The voice of this call: the device's, or a service's opened as it started. */
31
37
  protected voice: CallVoice;
32
38
  /** Of the call now: a voice opened for a call hung up is let go. */
@@ -37,10 +43,18 @@ export declare class VoiceCall {
37
43
  protected waiting?: string;
38
44
  /** Who answers in this call in place of the conversation (CallOptions.openPartner), once open. */
39
45
  protected readonly partners: CallPartnering;
40
- /** Its voice service opening again (revoice). */
41
- protected reopening?: VoiceReopen;
46
+ /** Its voice service opening again (CallRevoicing). */
47
+ protected readonly revoicing: CallRevoicing;
42
48
  /** The answer begun on what the user said so far (CallPartner.draft). */
43
49
  protected readonly drafts: CallDrafts;
50
+ /** The turns of the conversation the call asked: which reply is its, and when it is read (CallTurns). */
51
+ protected readonly turns: CallTurns;
52
+ /** What a call paused is and says again as it shows (CallPausing). */
53
+ protected readonly pausing: CallPausing;
54
+ /** What the user says over the call that answers the question the conversation waits on (CallAnswering). */
55
+ protected readonly answering?: CallAnswering;
56
+ /** What comes up that the user should hear over the call, in order (CallAnnouncing). */
57
+ protected readonly announcing: CallAnnouncing;
44
58
  /** Of a voice that thinks, which answers by itself. */
45
59
  protected readonly conversing: CallConversing;
46
60
  constructor(options: CallOptions, device?: CallVoice);
@@ -56,60 +70,42 @@ export declare class VoiceCall {
56
70
  direct?: boolean;
57
71
  video?: boolean;
58
72
  }): void;
73
+ /** Its voice service and partner are there, or none is: the call hears it, or says why it failed. */
74
+ protected opened(opening: Promise<[CallVoice | undefined, CallPartner | undefined]>): void;
59
75
  /** The voice of a service is the call's now: it hears the user cut in, or answers by itself (thinks). */
60
76
  protected takeVoice(voice: CallVoice): void;
61
77
  /** Its voice is there: the answer that came meanwhile is read, a turn at work is waited for, else Ta listens. */
62
78
  protected voiced(): void;
63
79
  /**
64
80
  * Its voice service is gone (ta serve restarted, the connection dropped): the call says it connects, and opens it
65
- * again as the connection comes back (VoiceReopen); a service no longer chosen gives the voice of the device.
81
+ * again as the connection comes back (CallRevoicing); a service no longer chosen gives the voice of the device.
66
82
  */
67
83
  protected revoice(): void;
68
84
  hangUp(): void;
69
- /** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
70
- protected announcements: string[];
71
- /**
72
- * Says something the user did not ask for, which they should hear in a call (Ta waits for them, a task ended):
73
- * at once while Ta listens and the user has said nothing yet, else once what goes on now is over; never over
74
- * the user, nor over an answer.
75
- */
85
+ /** What the user did not ask for, said in a silence (CallAnnouncing). */
76
86
  announce(text: string): void;
77
87
  /** The user began to speak while Ta reads: it stops and listens to them. */
78
88
  protected bargeIn(): void;
79
- /**
80
- * The page went to the background, where the device stops its listening and reading: the call stops them itself
81
- * and waits, rather than look as if it listened. What was being said is said again on resume.
82
- */
89
+ /** The page went to the background: the call waits, rather than look as if it listened (CallPausing). */
83
90
  pause(): void;
84
91
  /** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
85
92
  resume(): void;
93
+ /** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
94
+ protected over(): void;
95
+ /** What is being read now, to read again after a pause. */
96
+ protected get speaking(): string | undefined;
97
+ /** A call says \`said\` aloud, then listens. */
98
+ protected read(said: string): void;
86
99
  /** For the face of the call (CallSounds): Ta's voice, whichever the call has (it opens after the call shows). */
87
100
  readonly sounds: CallSounds;
88
101
  readonly level: () => number | undefined;
89
102
  /** While Ta speaks (an answer, or news it tells by itself): it stops and listens to the user, before any more news. */
90
103
  interrupt(): void;
91
- /** The run of the turn the call asked has started: its reply is the first after `before`. */
92
- protected asked?: {
93
- before: number | undefined;
94
- };
95
- /**
96
- * How the conversation is, as it changes: a run that started after what the user said is the call's turn, and
97
- * once it settles its reply is read. A run already going when the call asked (a follow-up) is its turn too.
98
- */
99
- turn(working: boolean, reply: {
100
- index: number;
101
- text: string;
102
- } | undefined): void;
103
104
  /**
104
105
  * The conversation's turn settled: its answer, if a new one came, is read out, and Ta listens again. Only for a turn
105
106
  * the call asked; what comes while Ta listens (a task that reports back) does not cut the user off.
106
107
  */
107
108
  turnEnded(reply: string | undefined): void;
108
- /** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
109
- protected over(): void;
110
- /** What is being read now, to read again after a pause. */
111
- protected speaking?: string;
112
- protected read(said: string): void;
113
109
  /**
114
110
  * Listens; first says what waits to be said, unless the user just cut in to speak (`announce` false). `held`: sounds
115
111
  * alone a listen ended on, which what is heard now follows, gone or sent once it waited FILLER_MS for words.
@@ -117,17 +113,21 @@ export declare class VoiceCall {
117
113
  protected listen(announce?: boolean, held?: string): void;
118
114
  /** The user says they are done (the mark of the bar tapped): what was heard goes now as it is, sounds alone too. */
119
115
  endTurn(): void;
120
- /** The words heard stayed the same a while, or the turn is at its longest (CallTurnEnd): the user is done. */
116
+ /** The words heard stayed the same a while: the user is done (CallHearing). */
121
117
  protected quiet(): void;
122
- /** What was heard of a listen going on, while Ta listens; undefined else. */
118
+ /** What was heard of a listen going on (CallHearing). */
123
119
  protected listened(): string | undefined;
120
+ /** A listen ended (CallHearing). */
121
+ protected heard(said: string, error: string | undefined, waited?: boolean): void;
124
122
  /**
125
- * A listen ended: what was said goes to the double; nothing, Ta listens again, a few times. Sounds alone wait on in
126
- * the next listen until they waited FILLER_MS (`waited`); then a hesitation is dropped and a backchannel goes.
123
+ * What the user said goes to the partner, or to the conversation; words that answer the question it waits on answer
124
+ * it, and the work goes on from there (CallAnswering).
127
125
  */
128
- protected heard(said: string, error: string | undefined, waited?: boolean): void;
129
- /** What the user said goes to the partner, or to the conversation. */
130
126
  protected take(said: string): void;
127
+ /** What the user said goes to the conversation: it thinks of it, and its reply is read as any turn. */
128
+ protected thinking(said: string): void;
129
+ /** What the user said goes to the partner, or to the conversation. */
130
+ protected send(said: string): void;
131
131
  /**
132
132
  * The words heard stayed the same a little, and may be all the user says: the partner begins its answer, said only
133
133
  * should they be done with these words (take), dropped as they say more (docs/design/ta-call.md 10).
@@ -138,6 +138,10 @@ export declare class VoiceCall {
138
138
  /** What the user said did not go: not in the captions as if it had, and Ta listens again. */
139
139
  protected unsent(): void;
140
140
  protected end(reason: CallEnd, detail?: string): void;
141
+ turn(working: boolean, reply: {
142
+ index: number;
143
+ text: string;
144
+ } | undefined): void;
141
145
  protected stopListening(): void;
142
146
  protected set(change: Partial<CallState>): void;
143
147
  }