@celljs/ta-web 4.15.2 → 4.17.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 (601) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
  4. package/esm/browser/assistant/assistant-ask-book.js +96 -0
  5. package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
  6. package/esm/browser/assistant/assistant-conversation.js +351 -0
  7. package/esm/browser/assistant/assistant-export.js +6 -7
  8. package/esm/browser/assistant/assistant-extension.d.ts +3 -2
  9. package/esm/browser/assistant/assistant-extension.js +57 -4
  10. package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
  11. package/esm/browser/assistant/assistant-role.d.ts +22 -4
  12. package/esm/browser/assistant/assistant-role.js +29 -7
  13. package/esm/browser/assistant/assistant-state.d.ts +5 -1
  14. package/esm/browser/assistant/assistant-state.js +11 -0
  15. package/esm/browser/assistant/assistant-task-source.js +7 -1
  16. package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
  17. package/esm/browser/assistant/assistant-task-util.js +73 -20
  18. package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
  19. package/esm/browser/assistant/assistant-tasks.js +0 -2
  20. package/esm/browser/assistant/assistant-thread.d.ts +22 -0
  21. package/esm/browser/assistant/assistant-thread.js +108 -0
  22. package/esm/browser/assistant/assistant-view.js +77 -126
  23. package/esm/browser/assistant/assistant.d.ts +33 -105
  24. package/esm/browser/assistant/assistant.js +103 -356
  25. package/esm/browser/assistant/chat-task-source.d.ts +58 -0
  26. package/esm/browser/assistant/chat-task-source.js +107 -0
  27. package/esm/browser/assistant/read-aloud.d.ts +34 -0
  28. package/esm/browser/assistant/read-aloud.js +98 -0
  29. package/esm/browser/assistant/realtime-voice.d.ts +77 -0
  30. package/esm/browser/assistant/realtime-voice.js +320 -0
  31. package/esm/browser/assistant/task-views.d.ts +2 -3
  32. package/esm/browser/assistant/task-views.js +20 -16
  33. package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
  34. package/esm/browser/assistant/voice-call-bar.js +260 -0
  35. package/esm/browser/assistant/voice-call.d.ts +175 -0
  36. package/esm/browser/assistant/voice-call.js +366 -0
  37. package/esm/browser/chat/chat-shown.d.ts +78 -0
  38. package/esm/browser/chat/chat-shown.js +262 -0
  39. package/esm/browser/chat/chat-view.js +2 -1
  40. package/esm/browser/chat/chat.d.ts +4 -68
  41. package/esm/browser/chat/chat.js +5 -253
  42. package/esm/browser/chat/draft-model.d.ts +1 -1
  43. package/esm/browser/components/access-view.js +1 -1
  44. package/esm/browser/components/account-menu.js +1 -1
  45. package/esm/browser/components/app-nav.d.ts +3 -1
  46. package/esm/browser/components/app-nav.js +7 -7
  47. package/esm/browser/components/app-shell-hooks.d.ts +11 -2
  48. package/esm/browser/components/app-shell-hooks.js +25 -4
  49. package/esm/browser/components/app-shell-state.d.ts +80 -0
  50. package/esm/browser/components/app-shell-state.js +466 -0
  51. package/esm/browser/components/app-view.js +128 -334
  52. package/esm/browser/components/asks-badge.d.ts +6 -2
  53. package/esm/browser/components/asks-badge.js +7 -3
  54. package/esm/browser/components/auth-pictures.d.ts +2 -2
  55. package/esm/browser/components/auth-pictures.js +13 -1
  56. package/esm/browser/components/auth-view.d.ts +4 -3
  57. package/esm/browser/components/auth-view.js +54 -5
  58. package/esm/browser/components/chat-asks.d.ts +2 -0
  59. package/esm/browser/components/chat-asks.js +8 -0
  60. package/esm/browser/components/chat-busy.d.ts +32 -0
  61. package/esm/browser/components/chat-busy.js +49 -0
  62. package/esm/browser/components/chat-icon.d.ts +6 -0
  63. package/esm/browser/components/chat-icon.js +17 -1
  64. package/esm/browser/components/chat-list-row.d.ts +84 -0
  65. package/esm/browser/components/chat-list-row.js +198 -0
  66. package/esm/browser/components/chat-list-util.d.ts +166 -0
  67. package/esm/browser/components/chat-list-util.js +335 -0
  68. package/esm/browser/components/chat-list.d.ts +11 -148
  69. package/esm/browser/components/chat-list.js +280 -511
  70. package/esm/browser/components/chat-seen.d.ts +7 -0
  71. package/esm/browser/components/chat-seen.js +58 -10
  72. package/esm/browser/components/composer-addon-util.d.ts +1 -1
  73. package/esm/browser/components/composer-addons.d.ts +1 -1
  74. package/esm/browser/components/composer-attachments.d.ts +11 -0
  75. package/esm/browser/components/composer-attachments.js +27 -0
  76. package/esm/browser/components/composer-box-hooks.d.ts +9 -0
  77. package/esm/browser/components/composer-box-hooks.js +138 -0
  78. package/esm/browser/components/composer-box-protocol.d.ts +108 -0
  79. package/esm/browser/components/composer-box-protocol.js +2 -0
  80. package/esm/browser/components/composer-box.d.ts +1 -95
  81. package/esm/browser/components/composer-box.js +49 -156
  82. package/esm/browser/components/composer-target.d.ts +21 -0
  83. package/esm/browser/components/composer-target.js +43 -0
  84. package/esm/browser/components/composer.d.ts +7 -1
  85. package/esm/browser/components/composer.js +13 -9
  86. package/esm/browser/components/context-menu.js +4 -0
  87. package/esm/browser/components/conversation-find.d.ts +27 -0
  88. package/esm/browser/components/conversation-find.js +151 -0
  89. package/esm/browser/components/conversation-scroll-hooks.js +2 -1
  90. package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
  91. package/esm/browser/components/conversation-scroll-util.js +80 -0
  92. package/esm/browser/components/conversation-scroll.d.ts +1 -35
  93. package/esm/browser/components/conversation-scroll.js +2 -81
  94. package/esm/browser/components/conversation-view.d.ts +8 -0
  95. package/esm/browser/components/conversation-view.js +41 -0
  96. package/esm/browser/components/discover-view.d.ts +3 -2
  97. package/esm/browser/components/discover-view.js +31 -26
  98. package/esm/browser/components/dismiss.js +2 -0
  99. package/esm/browser/components/earlier-messages.d.ts +2 -0
  100. package/esm/browser/components/earlier-messages.js +2 -1
  101. package/esm/browser/components/environment-view.js +50 -1
  102. package/esm/browser/components/folder-picker.d.ts +7 -0
  103. package/esm/browser/components/folder-picker.js +90 -20
  104. package/esm/browser/components/gallery.d.ts +1 -1
  105. package/esm/browser/components/gallery.js +57 -14
  106. package/esm/browser/components/host-tag.js +2 -2
  107. package/esm/browser/components/host-view.d.ts +1 -1
  108. package/esm/browser/components/host-view.js +3 -1
  109. package/esm/browser/components/image-menu.d.ts +11 -0
  110. package/esm/browser/components/image-menu.js +29 -0
  111. package/esm/browser/components/image-viewer.d.ts +3 -2
  112. package/esm/browser/components/image-viewer.js +29 -4
  113. package/esm/browser/components/lightbox.js +2 -0
  114. package/esm/browser/components/link-dialog.js +2 -0
  115. package/esm/browser/components/list-rows.d.ts +3 -1
  116. package/esm/browser/components/list-rows.js +2 -1
  117. package/esm/browser/components/markdown.js +5 -0
  118. package/esm/browser/components/media.d.ts +2 -0
  119. package/esm/browser/components/media.js +16 -1
  120. package/esm/browser/components/message-actions.d.ts +1 -1
  121. package/esm/browser/components/message-actions.js +9 -0
  122. package/esm/browser/components/message-footer.d.ts +3 -1
  123. package/esm/browser/components/message-footer.js +3 -2
  124. package/esm/browser/components/message-images.d.ts +41 -0
  125. package/esm/browser/components/message-images.js +120 -0
  126. package/esm/browser/components/message-list.d.ts +4 -100
  127. package/esm/browser/components/message-list.js +10 -447
  128. package/esm/browser/components/message-menu.js +4 -0
  129. package/esm/browser/components/message-steps.d.ts +21 -0
  130. package/esm/browser/components/message-steps.js +182 -0
  131. package/esm/browser/components/message-user.d.ts +54 -0
  132. package/esm/browser/components/message-user.js +169 -0
  133. package/esm/browser/components/model-picker.d.ts +1 -1
  134. package/esm/browser/components/model-picker.js +2 -0
  135. package/esm/browser/components/moved-notice.d.ts +14 -0
  136. package/esm/browser/components/moved-notice.js +60 -0
  137. package/esm/browser/components/nav-places.d.ts +12 -1
  138. package/esm/browser/components/nav-places.js +10 -2
  139. package/esm/browser/components/notice-center.js +36 -1
  140. package/esm/browser/components/notice-face.js +2 -1
  141. package/esm/browser/components/phone-shell.d.ts +4 -3
  142. package/esm/browser/components/phone-shell.js +60 -68
  143. package/esm/browser/components/plus-menu.d.ts +1 -1
  144. package/esm/browser/components/relay-services.d.ts +6 -1
  145. package/esm/browser/components/relay-services.js +109 -2
  146. package/esm/browser/components/relay-view.js +2 -0
  147. package/esm/browser/components/remote-hosts.d.ts +10 -0
  148. package/esm/browser/components/remote-hosts.js +67 -5
  149. package/esm/browser/components/remote-prompts.js +2 -0
  150. package/esm/browser/components/scan-screen.js +7 -0
  151. package/esm/browser/components/screen-navigator-util.d.ts +28 -0
  152. package/esm/browser/components/screen-navigator-util.js +33 -0
  153. package/esm/browser/components/screen-navigator.d.ts +30 -0
  154. package/esm/browser/components/screen-navigator.js +47 -0
  155. package/esm/browser/components/session-settings.d.ts +1 -1
  156. package/esm/browser/components/session-view.js +157 -7
  157. package/esm/browser/components/settings-choices.d.ts +6 -0
  158. package/esm/browser/components/settings-choices.js +8 -0
  159. package/esm/browser/components/settings-more.d.ts +7 -0
  160. package/esm/browser/components/settings-more.js +263 -0
  161. package/esm/browser/components/settings-parts.d.ts +8 -3
  162. package/esm/browser/components/settings-parts.js +31 -249
  163. package/esm/browser/components/settings-view.js +43 -15
  164. package/esm/browser/components/stop-times.js +1 -0
  165. package/esm/browser/components/surface-flyout.js +2 -0
  166. package/esm/browser/components/unseen-drop.d.ts +10 -4
  167. package/esm/browser/components/unseen-drop.js +9 -8
  168. package/esm/browser/components/use-seen-chats.js +1 -1
  169. package/esm/browser/components/voice-services.d.ts +6 -0
  170. package/esm/browser/components/voice-services.js +137 -0
  171. package/esm/browser/components/voice-talk.d.ts +23 -6
  172. package/esm/browser/components/voice-talk.js +46 -11
  173. package/esm/browser/components/web-composer.d.ts +1 -1
  174. package/esm/browser/components/web-composer.js +2 -2
  175. package/esm/browser/components/web-dialog.js +2 -0
  176. package/esm/browser/device/back-stack.d.ts +89 -11
  177. package/esm/browser/device/back-stack.js +200 -29
  178. package/esm/browser/device/device-protocol.d.ts +1 -1
  179. package/esm/browser/device/device-protocol.js +1 -1
  180. package/esm/browser/device/own-gestures.d.ts +1 -1
  181. package/esm/browser/device/pull-down.js +3 -1
  182. package/esm/browser/device/row-swipe.js +3 -1
  183. package/esm/browser/device/sheet-swipe.d.ts +1 -179
  184. package/esm/browser/device/sheet-swipe.js +3 -433
  185. package/esm/browser/device/swipe-finger.d.ts +31 -0
  186. package/esm/browser/device/swipe-finger.js +83 -0
  187. package/esm/browser/device/swipe-settle.d.ts +52 -0
  188. package/esm/browser/device/swipe-settle.js +170 -0
  189. package/esm/browser/device/swipe-util.d.ts +97 -0
  190. package/esm/browser/device/swipe-util.js +183 -0
  191. package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
  192. package/esm/browser/drafts/drafts-protocol.js +75 -0
  193. package/esm/browser/drafts/drafts.d.ts +21 -0
  194. package/esm/browser/drafts/drafts.js +91 -0
  195. package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
  196. package/esm/browser/drafts/use-composer-draft.js +108 -0
  197. package/esm/browser/extension/icons.js +25 -4
  198. package/esm/browser/extension/web-api-components.d.ts +13 -0
  199. package/esm/browser/extension/web-api-contributions.d.ts +125 -0
  200. package/esm/browser/extension/web-extension-api.d.ts +88 -5
  201. package/esm/browser/extension/web-extension-context.d.ts +5 -0
  202. package/esm/browser/extension/web-extension-context.js +60 -7
  203. package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
  204. package/esm/browser/extension/web-extension-protocol.js +3 -0
  205. package/esm/browser/extension/web-extension-run.d.ts +5 -2
  206. package/esm/browser/extension/web-extension-run.js +13 -1
  207. package/esm/browser/extension/web-extensions-running.d.ts +93 -0
  208. package/esm/browser/extension/web-extensions-running.js +339 -0
  209. package/esm/browser/extension/web-extensions.d.ts +6 -82
  210. package/esm/browser/extension/web-extensions.js +10 -319
  211. package/esm/browser/extension/web-pages.js +1 -0
  212. package/esm/browser/extension/web-session-notices.js +6 -1
  213. package/esm/browser/extension/web-tasks.d.ts +2 -0
  214. package/esm/browser/extension/web-tasks.js +6 -0
  215. package/esm/browser/extension/web-view-util.d.ts +2 -1
  216. package/esm/browser/extension/web-view-util.js +4 -1
  217. package/esm/browser/gateway/console-parts.d.ts +4 -12
  218. package/esm/browser/gateway/console-parts.js +42 -125
  219. package/esm/browser/gateway/console-tenant.js +3 -2
  220. package/esm/browser/gateway/console-trend.d.ts +11 -0
  221. package/esm/browser/gateway/console-trend.js +115 -0
  222. package/esm/browser/gateway/console-util.js +2 -2
  223. package/esm/browser/gateway/console-view.js +49 -3
  224. package/esm/browser/i18n/locales.d.ts +170 -6
  225. package/esm/browser/i18n/messages-ja.js +171 -7
  226. package/esm/browser/i18n/messages-zh-tw.js +171 -7
  227. package/esm/browser/i18n/messages.d.ts +167 -3
  228. package/esm/browser/i18n/messages.js +342 -14
  229. package/esm/browser/index.d.ts +17 -0
  230. package/esm/browser/index.js +17 -0
  231. package/esm/browser/notices/notices-protocol.d.ts +12 -0
  232. package/esm/browser/notices/notices.js +7 -4
  233. package/esm/browser/offline/device-values.d.ts +2 -0
  234. package/esm/browser/offline/device-values.js +6 -1
  235. package/esm/browser/screen/page-answers.d.ts +42 -0
  236. package/esm/browser/screen/page-answers.js +89 -0
  237. package/esm/browser/screen/screen-protocol.d.ts +112 -0
  238. package/esm/browser/screen/screen-protocol.js +45 -0
  239. package/esm/browser/screen/screen.d.ts +20 -0
  240. package/esm/browser/screen/screen.js +122 -0
  241. package/esm/browser/screen/use-screen-part.d.ts +6 -0
  242. package/esm/browser/screen/use-screen-part.js +14 -0
  243. package/esm/browser/settings/settings-protocol.d.ts +5 -1
  244. package/esm/browser/settings/settings-protocol.js +6 -2
  245. package/esm/browser/share/shared-extensions.d.ts +29 -0
  246. package/esm/browser/share/shared-extensions.js +145 -0
  247. package/esm/browser/share/shared-link.d.ts +11 -0
  248. package/esm/browser/share/shared-link.js +38 -0
  249. package/esm/browser/share/shared-page.d.ts +5 -0
  250. package/esm/browser/share/shared-page.js +137 -0
  251. package/esm/browser/state/state-protocol.d.ts +14 -0
  252. package/esm/browser/state/state-protocol.js +18 -0
  253. package/esm/browser/state/state.d.ts +10 -2
  254. package/esm/browser/state/state.js +19 -3
  255. package/esm/browser/style/base.d.ts +1 -1
  256. package/esm/browser/style/base.js +4 -0
  257. package/esm/browser/style/chat-list.d.ts +2 -0
  258. package/esm/browser/style/chat-list.js +153 -0
  259. package/esm/browser/style/conversation-column.d.ts +2 -0
  260. package/esm/browser/style/conversation-column.js +250 -0
  261. package/esm/browser/style/conversation.d.ts +1 -1
  262. package/esm/browser/style/conversation.js +24 -8
  263. package/esm/browser/style/dialogs.d.ts +2 -0
  264. package/esm/browser/style/dialogs.js +163 -0
  265. package/esm/browser/style/layout.d.ts +2 -2
  266. package/esm/browser/style/layout.js +1 -525
  267. package/esm/browser/style/pages.d.ts +1 -1
  268. package/esm/browser/style/pages.js +10 -3
  269. package/esm/browser/style/phone.d.ts +1 -1
  270. package/esm/browser/style/phone.js +6 -2
  271. package/esm/browser/style/shared.d.ts +2 -0
  272. package/esm/browser/style/shared.js +23 -0
  273. package/esm/browser/style/shell.d.ts +1 -1
  274. package/esm/browser/style/shell.js +47 -0
  275. package/esm/browser/style/tasks.d.ts +1 -1
  276. package/esm/browser/style/tasks.js +13 -8
  277. package/esm/browser/style.js +8 -0
  278. package/esm/browser/util/gallery.d.ts +24 -2
  279. package/esm/browser/util/gallery.js +82 -2
  280. package/esm/browser/util/image-copy.d.ts +16 -0
  281. package/esm/browser/util/image-copy.js +57 -0
  282. package/esm/browser/util/message.d.ts +5 -0
  283. package/esm/browser/util/message.js +14 -0
  284. package/esm/browser/util/process.d.ts +6 -2
  285. package/esm/browser/util/process.js +6 -2
  286. package/esm/browser/util/spoken.d.ts +24 -0
  287. package/esm/browser/util/spoken.js +83 -0
  288. package/esm/browser/util/transcript.d.ts +22 -0
  289. package/esm/browser/util/transcript.js +46 -0
  290. package/esm/browser/util/voice.d.ts +5 -1
  291. package/esm/browser/util/voice.js +6 -1
  292. package/esm/browser/workbench-hosts.d.ts +36 -0
  293. package/esm/browser/workbench-hosts.js +120 -0
  294. package/esm/browser/workbench-lists.d.ts +33 -0
  295. package/esm/browser/workbench-lists.js +128 -0
  296. package/esm/browser/workbench-protocol.d.ts +14 -1
  297. package/esm/browser/workbench-services.d.ts +49 -0
  298. package/esm/browser/workbench-services.js +120 -0
  299. package/esm/browser/workbench-util.d.ts +1 -1
  300. package/esm/browser/workbench.d.ts +6 -89
  301. package/esm/browser/workbench.js +26 -336
  302. package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
  303. package/lib/browser/assistant/assistant-ask-book.js +100 -0
  304. package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
  305. package/lib/browser/assistant/assistant-conversation.js +355 -0
  306. package/lib/browser/assistant/assistant-export.js +6 -7
  307. package/lib/browser/assistant/assistant-extension.d.ts +3 -2
  308. package/lib/browser/assistant/assistant-extension.js +55 -2
  309. package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
  310. package/lib/browser/assistant/assistant-role.d.ts +22 -4
  311. package/lib/browser/assistant/assistant-role.js +30 -8
  312. package/lib/browser/assistant/assistant-state.d.ts +5 -1
  313. package/lib/browser/assistant/assistant-state.js +11 -0
  314. package/lib/browser/assistant/assistant-task-source.js +7 -1
  315. package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
  316. package/lib/browser/assistant/assistant-task-util.js +73 -20
  317. package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
  318. package/lib/browser/assistant/assistant-tasks.js +1 -3
  319. package/lib/browser/assistant/assistant-thread.d.ts +23 -0
  320. package/lib/browser/assistant/assistant-thread.js +144 -0
  321. package/lib/browser/assistant/assistant-view.js +74 -123
  322. package/lib/browser/assistant/assistant.d.ts +33 -105
  323. package/lib/browser/assistant/assistant.js +100 -353
  324. package/lib/browser/assistant/chat-task-source.d.ts +59 -0
  325. package/lib/browser/assistant/chat-task-source.js +111 -0
  326. package/lib/browser/assistant/read-aloud.d.ts +35 -0
  327. package/lib/browser/assistant/read-aloud.js +102 -0
  328. package/lib/browser/assistant/realtime-voice.d.ts +78 -0
  329. package/lib/browser/assistant/realtime-voice.js +324 -0
  330. package/lib/browser/assistant/task-views.d.ts +2 -3
  331. package/lib/browser/assistant/task-views.js +19 -15
  332. package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
  333. package/lib/browser/assistant/voice-call-bar.js +306 -0
  334. package/lib/browser/assistant/voice-call.d.ts +176 -0
  335. package/lib/browser/assistant/voice-call.js +370 -0
  336. package/lib/browser/chat/chat-shown.d.ts +79 -0
  337. package/lib/browser/chat/chat-shown.js +266 -0
  338. package/lib/browser/chat/chat-view.js +2 -1
  339. package/lib/browser/chat/chat.d.ts +4 -68
  340. package/lib/browser/chat/chat.js +3 -251
  341. package/lib/browser/chat/draft-model.d.ts +1 -1
  342. package/lib/browser/components/access-view.js +2 -2
  343. package/lib/browser/components/account-menu.js +1 -1
  344. package/lib/browser/components/app-nav.d.ts +3 -1
  345. package/lib/browser/components/app-nav.js +7 -7
  346. package/lib/browser/components/app-shell-hooks.d.ts +11 -2
  347. package/lib/browser/components/app-shell-hooks.js +26 -5
  348. package/lib/browser/components/app-shell-state.d.ts +81 -0
  349. package/lib/browser/components/app-shell-state.js +502 -0
  350. package/lib/browser/components/app-view.js +120 -326
  351. package/lib/browser/components/asks-badge.d.ts +6 -2
  352. package/lib/browser/components/asks-badge.js +7 -3
  353. package/lib/browser/components/auth-pictures.d.ts +2 -2
  354. package/lib/browser/components/auth-pictures.js +13 -1
  355. package/lib/browser/components/auth-view.d.ts +4 -3
  356. package/lib/browser/components/auth-view.js +53 -4
  357. package/lib/browser/components/chat-asks.d.ts +2 -0
  358. package/lib/browser/components/chat-asks.js +8 -0
  359. package/lib/browser/components/chat-busy.d.ts +33 -0
  360. package/lib/browser/components/chat-busy.js +52 -0
  361. package/lib/browser/components/chat-icon.d.ts +6 -0
  362. package/lib/browser/components/chat-icon.js +17 -1
  363. package/lib/browser/components/chat-list-row.d.ts +85 -0
  364. package/lib/browser/components/chat-list-row.js +236 -0
  365. package/lib/browser/components/chat-list-util.d.ts +167 -0
  366. package/lib/browser/components/chat-list-util.js +338 -0
  367. package/lib/browser/components/chat-list.d.ts +11 -148
  368. package/lib/browser/components/chat-list.js +297 -530
  369. package/lib/browser/components/chat-seen.d.ts +7 -0
  370. package/lib/browser/components/chat-seen.js +58 -10
  371. package/lib/browser/components/composer-addon-util.d.ts +1 -1
  372. package/lib/browser/components/composer-addons.d.ts +1 -1
  373. package/lib/browser/components/composer-attachments.d.ts +12 -0
  374. package/lib/browser/components/composer-attachments.js +64 -0
  375. package/lib/browser/components/composer-box-hooks.d.ts +10 -0
  376. package/lib/browser/components/composer-box-hooks.js +178 -0
  377. package/lib/browser/components/composer-box-protocol.d.ts +109 -0
  378. package/lib/browser/components/composer-box-protocol.js +3 -0
  379. package/lib/browser/components/composer-box.d.ts +1 -95
  380. package/lib/browser/components/composer-box.js +51 -159
  381. package/lib/browser/components/composer-target.d.ts +22 -0
  382. package/lib/browser/components/composer-target.js +46 -0
  383. package/lib/browser/components/composer.d.ts +7 -1
  384. package/lib/browser/components/composer.js +15 -11
  385. package/lib/browser/components/context-menu.js +4 -0
  386. package/lib/browser/components/conversation-find.d.ts +28 -0
  387. package/lib/browser/components/conversation-find.js +188 -0
  388. package/lib/browser/components/conversation-scroll-hooks.js +3 -2
  389. package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
  390. package/lib/browser/components/conversation-scroll-util.js +85 -1
  391. package/lib/browser/components/conversation-scroll.d.ts +1 -35
  392. package/lib/browser/components/conversation-scroll.js +20 -100
  393. package/lib/browser/components/conversation-view.d.ts +9 -0
  394. package/lib/browser/components/conversation-view.js +77 -0
  395. package/lib/browser/components/discover-view.d.ts +3 -2
  396. package/lib/browser/components/discover-view.js +30 -25
  397. package/lib/browser/components/dismiss.js +2 -0
  398. package/lib/browser/components/earlier-messages.d.ts +2 -0
  399. package/lib/browser/components/earlier-messages.js +2 -1
  400. package/lib/browser/components/environment-view.js +49 -0
  401. package/lib/browser/components/folder-picker.d.ts +7 -0
  402. package/lib/browser/components/folder-picker.js +89 -19
  403. package/lib/browser/components/gallery.d.ts +1 -1
  404. package/lib/browser/components/gallery.js +56 -13
  405. package/lib/browser/components/host-tag.js +1 -1
  406. package/lib/browser/components/host-view.d.ts +1 -1
  407. package/lib/browser/components/host-view.js +4 -2
  408. package/lib/browser/components/image-menu.d.ts +12 -0
  409. package/lib/browser/components/image-menu.js +65 -0
  410. package/lib/browser/components/image-viewer.d.ts +3 -2
  411. package/lib/browser/components/image-viewer.js +28 -3
  412. package/lib/browser/components/lightbox.js +2 -0
  413. package/lib/browser/components/link-dialog.js +2 -0
  414. package/lib/browser/components/list-rows.d.ts +3 -1
  415. package/lib/browser/components/list-rows.js +2 -1
  416. package/lib/browser/components/markdown.js +5 -0
  417. package/lib/browser/components/media.d.ts +2 -0
  418. package/lib/browser/components/media.js +17 -1
  419. package/lib/browser/components/message-actions.d.ts +1 -1
  420. package/lib/browser/components/message-actions.js +9 -0
  421. package/lib/browser/components/message-footer.d.ts +3 -1
  422. package/lib/browser/components/message-footer.js +2 -1
  423. package/lib/browser/components/message-images.d.ts +42 -0
  424. package/lib/browser/components/message-images.js +157 -0
  425. package/lib/browser/components/message-list.d.ts +4 -100
  426. package/lib/browser/components/message-list.js +11 -455
  427. package/lib/browser/components/message-menu.js +4 -0
  428. package/lib/browser/components/message-steps.d.ts +22 -0
  429. package/lib/browser/components/message-steps.js +218 -0
  430. package/lib/browser/components/message-user.d.ts +55 -0
  431. package/lib/browser/components/message-user.js +211 -0
  432. package/lib/browser/components/model-picker.d.ts +1 -1
  433. package/lib/browser/components/model-picker.js +2 -0
  434. package/lib/browser/components/moved-notice.d.ts +15 -0
  435. package/lib/browser/components/moved-notice.js +96 -0
  436. package/lib/browser/components/nav-places.d.ts +12 -1
  437. package/lib/browser/components/nav-places.js +12 -3
  438. package/lib/browser/components/notice-center.js +35 -0
  439. package/lib/browser/components/notice-face.js +7 -6
  440. package/lib/browser/components/phone-shell.d.ts +4 -3
  441. package/lib/browser/components/phone-shell.js +59 -67
  442. package/lib/browser/components/plus-menu.d.ts +1 -1
  443. package/lib/browser/components/relay-services.d.ts +6 -1
  444. package/lib/browser/components/relay-services.js +107 -0
  445. package/lib/browser/components/relay-view.js +2 -0
  446. package/lib/browser/components/remote-hosts.d.ts +10 -0
  447. package/lib/browser/components/remote-hosts.js +67 -4
  448. package/lib/browser/components/remote-prompts.js +2 -0
  449. package/lib/browser/components/scan-screen.js +7 -0
  450. package/lib/browser/components/screen-navigator-util.d.ts +29 -0
  451. package/lib/browser/components/screen-navigator-util.js +36 -0
  452. package/lib/browser/components/screen-navigator.d.ts +31 -0
  453. package/lib/browser/components/screen-navigator.js +83 -0
  454. package/lib/browser/components/session-settings.d.ts +1 -1
  455. package/lib/browser/components/session-view.js +157 -7
  456. package/lib/browser/components/settings-choices.d.ts +7 -1
  457. package/lib/browser/components/settings-choices.js +9 -1
  458. package/lib/browser/components/settings-more.d.ts +8 -0
  459. package/lib/browser/components/settings-more.js +299 -0
  460. package/lib/browser/components/settings-parts.d.ts +8 -3
  461. package/lib/browser/components/settings-parts.js +27 -245
  462. package/lib/browser/components/settings-view.js +43 -15
  463. package/lib/browser/components/stop-times.js +1 -0
  464. package/lib/browser/components/surface-flyout.js +2 -0
  465. package/lib/browser/components/unseen-drop.d.ts +10 -4
  466. package/lib/browser/components/unseen-drop.js +9 -8
  467. package/lib/browser/components/use-seen-chats.js +2 -2
  468. package/lib/browser/components/voice-services.d.ts +7 -0
  469. package/lib/browser/components/voice-services.js +173 -0
  470. package/lib/browser/components/voice-talk.d.ts +23 -6
  471. package/lib/browser/components/voice-talk.js +45 -10
  472. package/lib/browser/components/web-composer.d.ts +1 -1
  473. package/lib/browser/components/web-composer.js +2 -2
  474. package/lib/browser/components/web-dialog.js +2 -0
  475. package/lib/browser/device/back-stack.d.ts +89 -11
  476. package/lib/browser/device/back-stack.js +205 -31
  477. package/lib/browser/device/device-protocol.d.ts +1 -1
  478. package/lib/browser/device/device-protocol.js +1 -1
  479. package/lib/browser/device/own-gestures.d.ts +1 -1
  480. package/lib/browser/device/pull-down.js +8 -6
  481. package/lib/browser/device/row-swipe.js +11 -9
  482. package/lib/browser/device/sheet-swipe.d.ts +1 -179
  483. package/lib/browser/device/sheet-swipe.js +16 -452
  484. package/lib/browser/device/swipe-finger.d.ts +32 -0
  485. package/lib/browser/device/swipe-finger.js +87 -0
  486. package/lib/browser/device/swipe-settle.d.ts +53 -0
  487. package/lib/browser/device/swipe-settle.js +176 -0
  488. package/lib/browser/device/swipe-util.d.ts +98 -0
  489. package/lib/browser/device/swipe-util.js +187 -0
  490. package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
  491. package/lib/browser/drafts/drafts-protocol.js +78 -0
  492. package/lib/browser/drafts/drafts.d.ts +22 -0
  493. package/lib/browser/drafts/drafts.js +94 -0
  494. package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
  495. package/lib/browser/drafts/use-composer-draft.js +146 -0
  496. package/lib/browser/extension/icons.js +24 -3
  497. package/lib/browser/extension/web-api-components.d.ts +13 -0
  498. package/lib/browser/extension/web-api-contributions.d.ts +125 -0
  499. package/lib/browser/extension/web-extension-api.d.ts +88 -5
  500. package/lib/browser/extension/web-extension-context.d.ts +5 -0
  501. package/lib/browser/extension/web-extension-context.js +62 -9
  502. package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
  503. package/lib/browser/extension/web-extension-protocol.js +3 -0
  504. package/lib/browser/extension/web-extension-run.d.ts +5 -2
  505. package/lib/browser/extension/web-extension-run.js +13 -1
  506. package/lib/browser/extension/web-extensions-running.d.ts +94 -0
  507. package/lib/browser/extension/web-extensions-running.js +343 -0
  508. package/lib/browser/extension/web-extensions.d.ts +6 -82
  509. package/lib/browser/extension/web-extensions.js +7 -316
  510. package/lib/browser/extension/web-pages.js +1 -0
  511. package/lib/browser/extension/web-session-notices.js +8 -3
  512. package/lib/browser/extension/web-tasks.d.ts +2 -0
  513. package/lib/browser/extension/web-tasks.js +6 -0
  514. package/lib/browser/extension/web-view-util.d.ts +2 -1
  515. package/lib/browser/extension/web-view-util.js +4 -1
  516. package/lib/browser/gateway/console-parts.d.ts +4 -12
  517. package/lib/browser/gateway/console-parts.js +42 -126
  518. package/lib/browser/gateway/console-tenant.js +3 -2
  519. package/lib/browser/gateway/console-trend.d.ts +12 -0
  520. package/lib/browser/gateway/console-trend.js +151 -0
  521. package/lib/browser/gateway/console-util.js +2 -2
  522. package/lib/browser/gateway/console-view.js +48 -2
  523. package/lib/browser/i18n/locales.d.ts +170 -6
  524. package/lib/browser/i18n/messages-ja.js +171 -7
  525. package/lib/browser/i18n/messages-zh-tw.js +171 -7
  526. package/lib/browser/i18n/messages.d.ts +167 -3
  527. package/lib/browser/i18n/messages.js +342 -14
  528. package/lib/browser/index.d.ts +17 -0
  529. package/lib/browser/index.js +17 -0
  530. package/lib/browser/notices/notices-protocol.d.ts +12 -0
  531. package/lib/browser/notices/notices.js +7 -4
  532. package/lib/browser/offline/device-values.d.ts +2 -0
  533. package/lib/browser/offline/device-values.js +6 -1
  534. package/lib/browser/screen/page-answers.d.ts +43 -0
  535. package/lib/browser/screen/page-answers.js +93 -0
  536. package/lib/browser/screen/screen-protocol.d.ts +113 -0
  537. package/lib/browser/screen/screen-protocol.js +48 -0
  538. package/lib/browser/screen/screen.d.ts +21 -0
  539. package/lib/browser/screen/screen.js +125 -0
  540. package/lib/browser/screen/use-screen-part.d.ts +7 -0
  541. package/lib/browser/screen/use-screen-part.js +50 -0
  542. package/lib/browser/settings/settings-protocol.d.ts +5 -1
  543. package/lib/browser/settings/settings-protocol.js +5 -1
  544. package/lib/browser/share/shared-extensions.d.ts +30 -0
  545. package/lib/browser/share/shared-extensions.js +181 -0
  546. package/lib/browser/share/shared-link.d.ts +12 -0
  547. package/lib/browser/share/shared-link.js +41 -0
  548. package/lib/browser/share/shared-page.d.ts +6 -0
  549. package/lib/browser/share/shared-page.js +173 -0
  550. package/lib/browser/state/state-protocol.d.ts +14 -0
  551. package/lib/browser/state/state-protocol.js +20 -1
  552. package/lib/browser/state/state.d.ts +10 -2
  553. package/lib/browser/state/state.js +18 -2
  554. package/lib/browser/style/base.d.ts +1 -1
  555. package/lib/browser/style/base.js +4 -0
  556. package/lib/browser/style/chat-list.d.ts +3 -0
  557. package/lib/browser/style/chat-list.js +156 -0
  558. package/lib/browser/style/conversation-column.d.ts +3 -0
  559. package/lib/browser/style/conversation-column.js +253 -0
  560. package/lib/browser/style/conversation.d.ts +1 -1
  561. package/lib/browser/style/conversation.js +24 -8
  562. package/lib/browser/style/dialogs.d.ts +3 -0
  563. package/lib/browser/style/dialogs.js +166 -0
  564. package/lib/browser/style/layout.d.ts +2 -2
  565. package/lib/browser/style/layout.js +1 -525
  566. package/lib/browser/style/pages.d.ts +1 -1
  567. package/lib/browser/style/pages.js +10 -3
  568. package/lib/browser/style/phone.d.ts +1 -1
  569. package/lib/browser/style/phone.js +7 -3
  570. package/lib/browser/style/shared.d.ts +3 -0
  571. package/lib/browser/style/shared.js +26 -0
  572. package/lib/browser/style/shell.d.ts +1 -1
  573. package/lib/browser/style/shell.js +47 -0
  574. package/lib/browser/style/tasks.d.ts +1 -1
  575. package/lib/browser/style/tasks.js +13 -8
  576. package/lib/browser/style.js +8 -0
  577. package/lib/browser/util/gallery.d.ts +24 -2
  578. package/lib/browser/util/gallery.js +82 -2
  579. package/lib/browser/util/image-copy.d.ts +17 -0
  580. package/lib/browser/util/image-copy.js +60 -0
  581. package/lib/browser/util/message.d.ts +5 -0
  582. package/lib/browser/util/message.js +14 -0
  583. package/lib/browser/util/process.d.ts +6 -2
  584. package/lib/browser/util/process.js +6 -2
  585. package/lib/browser/util/spoken.d.ts +25 -0
  586. package/lib/browser/util/spoken.js +86 -0
  587. package/lib/browser/util/transcript.d.ts +23 -0
  588. package/lib/browser/util/transcript.js +49 -0
  589. package/lib/browser/util/voice.d.ts +5 -1
  590. package/lib/browser/util/voice.js +6 -1
  591. package/lib/browser/workbench-hosts.d.ts +37 -0
  592. package/lib/browser/workbench-hosts.js +124 -0
  593. package/lib/browser/workbench-lists.d.ts +34 -0
  594. package/lib/browser/workbench-lists.js +132 -0
  595. package/lib/browser/workbench-protocol.d.ts +14 -1
  596. package/lib/browser/workbench-services.d.ts +50 -0
  597. package/lib/browser/workbench-services.js +124 -0
  598. package/lib/browser/workbench-util.d.ts +1 -1
  599. package/lib/browser/workbench.d.ts +6 -89
  600. package/lib/browser/workbench.js +23 -333
  601. package/package.json +7 -7
@@ -52,6 +52,7 @@ const select_bar_1 = require("../components/select-bar");
52
52
  const swipe_row_1 = require("../components/swipe-row");
53
53
  const web_tasks_1 = require("../extension/web-tasks");
54
54
  const use_t_1 = require("../i18n/use-t");
55
+ const message_1 = require("../util/message");
55
56
  // The tasks of the double and of extensions, drawn alike: a card in the turn that started it, a row in the lists.
56
57
  /** The dot of a status, in the colors of the steps of a turn. */
57
58
  exports.TASK_DOT = { running: 'running', waiting: 'waiting', done: 'done', failed: 'error', stopped: 'cancelled' };
@@ -176,7 +177,7 @@ exports.TaskRow = React.memo(function TaskRow({ task, actions, selecting = false
176
177
  React.createElement("span", { className: "ta-task-row-detail" },
177
178
  React.createElement("span", { className: `ta-status ta-status-${exports.TASK_DOT[task.status]}` }),
178
179
  React.createElement("span", null, taskLine(task, t)))),
179
- React.createElement(Elapsed, { task: task })),
180
+ task.gathered ? React.createElement("span", { className: "ta-task-time" }, web_tasks_1.WebTaskUtil.size(task)) : React.createElement(Elapsed, { task: task })),
180
181
  (task.menu || removable) && !selecting && React.createElement(icon_1.IconButton, { icon: lucide_react_1.MoreHorizontal, label: t('ta.more'), className: "ta-task-more", onClick: openMenu })));
181
182
  });
182
183
  const ENDED_SHOWN = 8;
@@ -248,8 +249,9 @@ function TaskBoardList({ tasks, onRemove }) {
248
249
  /** In the head of the double: how many run and how many wait for the user; the tasks open on a click. */
249
250
  function TasksChip({ tasks, onOpen }) {
250
251
  const t = (0, use_t_1.useT)();
251
- const running = tasks.filter(task => task.status === 'running').length;
252
- const waiting = tasks.filter(task => task.status === 'waiting').length;
252
+ // The double's own work: not the conversations the user has going on (WebTask.gathered).
253
+ const running = tasks.filter(task => task.status === 'running' && !task.gathered).length;
254
+ const waiting = tasks.filter(task => task.status === 'waiting' && !task.gathered).length;
253
255
  if (running === 0 && waiting === 0) {
254
256
  return React.createElement(icon_1.IconButton, { icon: lucide_react_1.ListTodo, label: t('ta.assistant.showTasks'), onClick: onOpen });
255
257
  }
@@ -261,22 +263,24 @@ function TasksChip({ tasks, onOpen }) {
261
263
  React.createElement("span", { className: "ta-status ta-status-waiting" }),
262
264
  t('ta.tasks.waitingCount', { count: waiting })))));
263
265
  }
264
- /** A task the double is about to start, waiting for the user's go: what it would do, where. */
265
- function AskCard({ ask, focus, onAnswer }) {
266
+ /** A task the double is about to start, waiting for the user's go on any of their pages: what it is, what it would do, where. */
267
+ function AskCard({ ask, onAnswer }) {
266
268
  const t = (0, use_t_1.useT)();
267
269
  const [open, setOpen] = React.useState(false);
268
270
  return (React.createElement("div", { className: "ta-dialog ta-glass ta-ask-card", role: "dialog", "aria-label": ask.title, onKeyDown: event => event.key === 'Escape' && onAnswer(false) },
269
- React.createElement("div", { className: "ta-ask-card-head" },
270
- React.createElement("span", { className: "ta-task-icon ta-task-glyph", style: { width: 28, height: 28 } },
271
- React.createElement(icon_1.Icon, { icon: lucide_react_1.ListTodo, size: 14 })),
272
- React.createElement("span", { className: "ta-ask-card-text" },
273
- React.createElement("span", { className: "ta-dialog-title" }, t('ta.ask.title', { title: ask.title })),
274
- React.createElement("span", { className: "ta-ask-card-where", title: ask.cwd }, ask.cwd))),
275
- React.createElement("button", { type: "button", className: `ta-ask-card-plan${open ? ' ta-open' : ''}`, "aria-expanded": open, onClick: () => setOpen(!open) }, ask.instructions),
276
- React.createElement("div", { className: "ta-dialog-actions" },
271
+ React.createElement("div", { className: "ta-ask-card-label" },
272
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.ListTodo, size: 13 }),
273
+ t('ta.ask.title')),
274
+ React.createElement("div", { className: "ta-ask-card-title" }, ask.title),
275
+ React.createElement("button", { type: "button", className: `ta-ask-card-plan${open ? ' ta-open' : ''}`, "aria-expanded": open, onClick: () => setOpen(!open) },
276
+ React.createElement("span", { className: "ta-ask-card-plan-text" }, ask.instructions)),
277
+ React.createElement("div", { className: "ta-ask-card-foot" },
278
+ React.createElement("span", { className: "ta-ask-card-where", title: ask.cwd },
279
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.Folder, size: 12 }),
280
+ React.createElement("span", null, message_1.MessageUtil.basename(ask.cwd) || ask.cwd)),
277
281
  React.createElement("button", { type: "button", className: "ta-button", onClick: () => onAnswer(false) }, t('ta.ask.no')),
278
- React.createElement("button", { type: "button", className: "ta-button ta-primary", autoFocus: focus, onClick: () => onAnswer(true) },
279
- React.createElement(icon_1.Icon, { icon: lucide_react_1.Play, size: 13 }),
282
+ React.createElement("button", { type: "button", className: "ta-button ta-primary", onClick: () => onAnswer(true) },
283
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.Play, size: 12 }),
280
284
  " ",
281
285
  t('ta.ask.start')))));
282
286
  }
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import type { ComposerAction } from '../components/composer-box-protocol';
3
+ import type { TalkCall } from '../components/voice-talk';
4
+ import type { WebCallPartner, WebCallTarget } from '../extension/web-api-contributions';
5
+ import { type Translate } from '../i18n/use-t';
6
+ import { type CallEnd, type CallOptions, type CallPartner, type CallState, VoiceCall } from './voice-call';
7
+ /** What a notice says of a call that ended by itself. */
8
+ export declare function callEndedNotice(t: Translate, reason: CallEnd, detail?: string): string;
9
+ /**
10
+ * A call of a conversation (VoiceCall), its state as it changes; it hangs up as the page leaves. It talks through the
11
+ * voice service chosen in Settings (voices.json), else with the voice of the device. With `target`, the conversation
12
+ * called, a partner an extension registered (WebExtensionAPI.registerCallPartner) answers in its place.
13
+ */
14
+ export declare function useVoiceCall(options: CallOptions, target?: Omit<WebCallTarget, 'language'>): [CallState, VoiceCall];
15
+ /**
16
+ * What a talk of the box goes on as, let go over the overlay (docs/design/ta-call.md 1): 持续说, the conversation's
17
+ * voice kept on, always; 通话 only where an extension answers calls, else it would be the same.
18
+ */
19
+ export declare function useTalkCalls(): readonly TalkCall[];
20
+ /** The call of a conversation as a talk goes on: 持续说 talks with the conversation itself (direct), 通话 through the partner. */
21
+ export declare function talkCall(call: VoiceCall): (said: {
22
+ text: string;
23
+ sent: Promise<unknown>;
24
+ } | undefined, how: TalkCall) => void;
25
+ export declare namespace CallPartnerUtil {
26
+ /** The side of a call of a partner of an extension, its replies made what is said aloud; undefined when it leaves the call to the conversation. */
27
+ function open(partner: WebCallPartner, target: WebCallTarget, spoken: (reply: string) => string): Promise<CallPartner | undefined>;
28
+ /** After a failure to ask for what the partner says by itself, before it asks again. */
29
+ const RETRY_MS = 3000;
30
+ /** Asks for what the partner says by itself again and again, each as it comes, until the call is over. */
31
+ function follow(next: () => Promise<string | undefined>, closed: () => boolean, told: (text: string) => void): Promise<void>;
32
+ }
33
+ /** What of a reply is said aloud (SpokenReply), with the blocks of the extensions of the page and its words. */
34
+ export declare function useSpokenReply(): (reply: string) => string;
35
+ /** Tells the call how its conversation is (VoiceCall.turn): the reply of the turn it asked is read once the turn settles, as it is said aloud. */
36
+ export declare function useCallTurns(call: VoiceCall, state: CallState, working: boolean, reply: {
37
+ index: number;
38
+ text: string;
39
+ } | undefined): void;
40
+ /** Something to say in a call the user did not ask for (VoiceCall.announce), once, by its id. */
41
+ export interface CallAnnouncement {
42
+ id: string;
43
+ text: string;
44
+ }
45
+ /**
46
+ * Says in a call what comes up that the user should hear (Ta waits for them, a task ended): each once, as it
47
+ * comes; what was there before the call began is not said.
48
+ */
49
+ export declare function useCallAnnouncements(call: VoiceCall, state: CallState, announcements: readonly CallAnnouncement[]): void;
50
+ /** What a call says of the dialogs a conversation waits on (its pendingUi): Ta waits for the user. */
51
+ export declare function dialogAnnouncements(requests: readonly {
52
+ id: string;
53
+ }[], t: Translate): CallAnnouncement[];
54
+ /** Call, in the + of a conversation's box. */
55
+ export declare function callAction(state: CallState, call: VoiceCall, t: Translate): ComposerAction;
56
+ /** Over the message box while in a call: what Ta does now (with captions, what is said, in its line), and the buttons to interrupt it and hang up. */
57
+ export declare function CallBar({ state, call }: {
58
+ state: CallState;
59
+ call: VoiceCall;
60
+ }): React.JSX.Element | null;
61
+ //# sourceMappingURL=voice-call-bar.d.ts.map
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CallPartnerUtil = void 0;
37
+ exports.callEndedNotice = callEndedNotice;
38
+ exports.useVoiceCall = useVoiceCall;
39
+ exports.useTalkCalls = useTalkCalls;
40
+ exports.talkCall = talkCall;
41
+ exports.useSpokenReply = useSpokenReply;
42
+ exports.useCallTurns = useCallTurns;
43
+ exports.useCallAnnouncements = useCallAnnouncements;
44
+ exports.dialogAnnouncements = dialogAnnouncements;
45
+ exports.callAction = callAction;
46
+ exports.CallBar = CallBar;
47
+ const lucide_react_1 = require("lucide-react");
48
+ const React = __importStar(require("react"));
49
+ const icon_1 = require("../components/icon");
50
+ const hooks_1 = require("../hooks");
51
+ const use_t_1 = require("../i18n/use-t");
52
+ const spoken_1 = require("../util/spoken");
53
+ const realtime_voice_1 = require("./realtime-voice");
54
+ const voice_call_1 = require("./voice-call");
55
+ /** What a notice says of a call that ended by itself. */
56
+ function callEndedNotice(t, reason, detail) {
57
+ if (reason === 'failed') {
58
+ return t('ta.call.endedFailed', { error: detail !== null && detail !== void 0 ? detail : '' });
59
+ }
60
+ return t(reason === 'silent' ? 'ta.call.endedSilent' : 'ta.call.endedUnavailable');
61
+ }
62
+ /**
63
+ * A call of a conversation (VoiceCall), its state as it changes; it hangs up as the page leaves. It talks through the
64
+ * voice service chosen in Settings (voices.json), else with the voice of the device. With `target`, the conversation
65
+ * called, a partner an extension registered (WebExtensionAPI.registerCallPartner) answers in its place.
66
+ */
67
+ function useVoiceCall(options, target) {
68
+ const latest = React.useRef(options);
69
+ latest.current = options;
70
+ const [, bench] = (0, hooks_1.useWorkbench)();
71
+ const [{ callPartner }] = (0, hooks_1.useWebExtensions)();
72
+ const spoken = useSpokenReply();
73
+ const partnering = React.useRef({ callPartner, target, spoken });
74
+ partnering.current = { callPartner, target, spoken };
75
+ const [call] = React.useState(() => new voice_call_1.VoiceCall({
76
+ language: () => latest.current.language(),
77
+ voice: () => latest.current.voice(),
78
+ // What the user says goes with the note that asks for what to say back (SpokenReply).
79
+ send: text => latest.current.send(spoken_1.SpokenReply.asked(text)),
80
+ ended: (reason, detail) => { var _a, _b; return (_b = (_a = latest.current).ended) === null || _b === void 0 ? void 0 : _b.call(_a, reason, detail); },
81
+ openVoice: async () => {
82
+ // A Ta of before, or one let in who may not see the settings: the voice of the device.
83
+ const voices = await bench.voice.listVoices().catch(() => undefined);
84
+ return (voices === null || voices === void 0 ? void 0 : voices.use) ? new realtime_voice_1.RealtimeVoice(bench).open(latest.current.language()) : undefined;
85
+ },
86
+ openPartner: () => {
87
+ const { callPartner: partner, target: called, spoken: say } = partnering.current;
88
+ return partner && called ? CallPartnerUtil.open(partner, { ...called, language: latest.current.language() }, say) : undefined;
89
+ },
90
+ }));
91
+ const state = React.useSyncExternalStore(listener => call.subscribe(listener), () => call.state);
92
+ React.useEffect(() => {
93
+ // Another app in front or the screen locked: the device stops listening and reading, so the call waits.
94
+ const shown = () => (document.visibilityState === 'hidden' ? call.pause() : call.resume());
95
+ document.addEventListener('visibilitychange', shown);
96
+ window.addEventListener('pagehide', shown);
97
+ return () => {
98
+ document.removeEventListener('visibilitychange', shown);
99
+ window.removeEventListener('pagehide', shown);
100
+ call.hangUp();
101
+ };
102
+ }, [call]);
103
+ return [state, call];
104
+ }
105
+ /**
106
+ * What a talk of the box goes on as, let go over the overlay (docs/design/ta-call.md 1): 持续说, the conversation's
107
+ * voice kept on, always; 通话 only where an extension answers calls, else it would be the same.
108
+ */
109
+ function useTalkCalls() {
110
+ const [{ callPartner }] = (0, hooks_1.useWebExtensions)();
111
+ return callPartner ? BOTH : KEEP;
112
+ }
113
+ const BOTH = ['keep', 'call'];
114
+ const KEEP = ['keep'];
115
+ /** The call of a conversation as a talk goes on: 持续说 talks with the conversation itself (direct), 通话 through the partner. */
116
+ function talkCall(call) {
117
+ return (said, how) => call.start(said, { direct: how === 'keep' });
118
+ }
119
+ var CallPartnerUtil;
120
+ (function (CallPartnerUtil) {
121
+ /** The side of a call of a partner of an extension, its replies made what is said aloud; undefined when it leaves the call to the conversation. */
122
+ async function open(partner, target, spoken) {
123
+ const session = await partner.open(target);
124
+ let closed = false;
125
+ return (session && {
126
+ say: async (text, options) => {
127
+ const reply = await session.say(text, options);
128
+ return reply ? spoken(reply) : undefined;
129
+ },
130
+ news: listener => {
131
+ if (session.next) {
132
+ void CallPartnerUtil.follow(session.next.bind(session), () => closed, text => listener(spoken(text)));
133
+ }
134
+ },
135
+ close: () => {
136
+ closed = true;
137
+ session.close();
138
+ },
139
+ });
140
+ }
141
+ CallPartnerUtil.open = open;
142
+ /** After a failure to ask for what the partner says by itself, before it asks again. */
143
+ CallPartnerUtil.RETRY_MS = 3000;
144
+ /** Asks for what the partner says by itself again and again, each as it comes, until the call is over. */
145
+ async function follow(next, closed, told) {
146
+ while (!closed()) {
147
+ const text = await next().catch(async () => {
148
+ await new Promise(resolve => setTimeout(resolve, CallPartnerUtil.RETRY_MS));
149
+ return undefined;
150
+ });
151
+ if (text && !closed()) {
152
+ told(text);
153
+ }
154
+ }
155
+ }
156
+ CallPartnerUtil.follow = follow;
157
+ })(CallPartnerUtil || (exports.CallPartnerUtil = CallPartnerUtil = {}));
158
+ /** What of a reply is said aloud (SpokenReply), with the blocks of the extensions of the page and its words. */
159
+ function useSpokenReply() {
160
+ const t = (0, use_t_1.useT)();
161
+ const [{ codeSpeech }] = (0, hooks_1.useWebExtensions)();
162
+ return React.useCallback((reply) => spoken_1.SpokenReply.of(reply, codeSpeech, { onScreen: t('ta.call.onScreen') }), [codeSpeech, t]);
163
+ }
164
+ /** Tells the call how its conversation is (VoiceCall.turn): the reply of the turn it asked is read once the turn settles, as it is said aloud. */
165
+ function useCallTurns(call, state, working, reply) {
166
+ const spoken = useSpokenReply();
167
+ const index = reply === null || reply === void 0 ? void 0 : reply.index;
168
+ const replyText = reply === null || reply === void 0 ? void 0 : reply.text;
169
+ const text = React.useMemo(() => (replyText === undefined ? undefined : spoken(replyText)), [replyText, spoken]);
170
+ // biome-ignore lint/correctness/useExhaustiveDependencies: told again as the call changes phase
171
+ React.useEffect(() => call.turn(working, index === undefined || text === undefined ? undefined : { index, text }), [call, state.active, state.phase, working, index, text]);
172
+ }
173
+ /**
174
+ * Says in a call what comes up that the user should hear (Ta waits for them, a task ended): each once, as it
175
+ * comes; what was there before the call began is not said.
176
+ */
177
+ function useCallAnnouncements(call, state, announcements) {
178
+ const seen = React.useRef(undefined);
179
+ const latest = React.useRef(announcements);
180
+ latest.current = announcements;
181
+ const ids = announcements.map(each => each.id).join('\n');
182
+ // biome-ignore lint/correctness/useExhaustiveDependencies: told again as the ids change
183
+ React.useEffect(() => {
184
+ // A partner tells the news of the work itself, in its own words.
185
+ if (!state.active || state.partnered) {
186
+ seen.current = undefined;
187
+ return;
188
+ }
189
+ if (!seen.current) {
190
+ seen.current = new Set(latest.current.map(each => each.id));
191
+ return;
192
+ }
193
+ for (const each of latest.current) {
194
+ if (!seen.current.has(each.id)) {
195
+ seen.current.add(each.id);
196
+ call.announce(each.text);
197
+ }
198
+ }
199
+ }, [call, state.active, state.partnered, ids]);
200
+ }
201
+ /** What a call says of the dialogs a conversation waits on (its pendingUi): Ta waits for the user. */
202
+ function dialogAnnouncements(requests, t) {
203
+ return requests.map(request => {
204
+ const { title, message } = request;
205
+ return { id: `dialog:${request.id}`, text: t('ta.call.waitsDialog', { title: title || message || '' }) };
206
+ });
207
+ }
208
+ /** Call, in the + of a conversation's box. */
209
+ function callAction(state, call, t) {
210
+ return {
211
+ key: 'call',
212
+ label: t('ta.call.start'),
213
+ title: t('ta.call.startTitle'),
214
+ icon: React.createElement(icon_1.Icon, { icon: lucide_react_1.Phone, size: 16 }),
215
+ disabled: state.active,
216
+ run: () => call.start(),
217
+ };
218
+ }
219
+ /**
220
+ * A caption in the one line of the bar of a call, as a ticker: what the user says keeps its newest words in sight as
221
+ * it grows (`follow`); a sentence Ta reads shows from its start and scrolls on to its end, about as fast as it is read
222
+ * (`read`). Faded where it goes on past the line.
223
+ */
224
+ function CaptionTicker({ text, mode }) {
225
+ const box = React.useRef(null);
226
+ const [over, setOver] = React.useState(0);
227
+ // biome-ignore lint/correctness/useExhaustiveDependencies: measured again as the text changes
228
+ React.useLayoutEffect(() => {
229
+ const element = box.current;
230
+ const inner = element === null || element === void 0 ? void 0 : element.firstElementChild;
231
+ if (!element || !inner) {
232
+ return;
233
+ }
234
+ const measure = () => setOver(Math.max(0, inner.scrollWidth - element.clientWidth));
235
+ measure();
236
+ if (typeof ResizeObserver === 'undefined') {
237
+ return;
238
+ }
239
+ const observer = new ResizeObserver(measure);
240
+ observer.observe(element);
241
+ return () => observer.disconnect();
242
+ }, [text]);
243
+ const style = {
244
+ '--ta-ticker-over': `${-over}px`,
245
+ // A sentence read scrolls by as it is said: about 4 characters a second, after a moment on its start.
246
+ '--ta-ticker-time': `${Math.max(2, text.length / 4)}s`,
247
+ };
248
+ return (React.createElement("span", { ref: box, className: `ta-call-ticker ta-ticker-${mode}${over > 0 ? ' ta-over' : ''}`, style: style },
249
+ React.createElement("span", { key: mode === 'read' ? text : undefined }, text)));
250
+ }
251
+ /** What the line of the bar of a call says with captions: the user's words as they come, or the sentence Ta reads. */
252
+ function caption(state) {
253
+ var _a;
254
+ if (state.phase === 'speaking' && state.reading) {
255
+ const now = state.reading.pieces[state.reading.at];
256
+ return now ? { text: now, mode: 'read' } : undefined;
257
+ }
258
+ const mine = (_a = (state.phase === 'listening' ? state.heard.trim() || state.said : state.said)) === null || _a === void 0 ? void 0 : _a.trim();
259
+ return mine ? { text: mine, mode: 'follow' } : undefined;
260
+ }
261
+ /** Over the message box while in a call: what Ta does now (with captions, what is said, in its line), and the buttons to interrupt it and hang up. */
262
+ function CallBar({ state, call }) {
263
+ const t = (0, use_t_1.useT)();
264
+ // Captions, off unless the user turned them on (here, or in Settings → Voice): kept for the next call too.
265
+ const [{ settings }, store] = (0, hooks_1.useSettings)();
266
+ const captions = settings.callCaptions;
267
+ if (!state.active) {
268
+ return null;
269
+ }
270
+ const label = state.paused
271
+ ? t('ta.call.paused')
272
+ : t(state.phase === 'connecting'
273
+ ? 'ta.call.connecting'
274
+ : state.phase === 'listening'
275
+ ? 'ta.call.listening'
276
+ : state.phase === 'thinking'
277
+ ? 'ta.call.thinking'
278
+ : 'ta.call.speaking');
279
+ // The mark says the state (its motion, its label for a screen reader); the one line beside it is what is said:
280
+ // with captions both sides, else the user's words as they come. Paused, what brings the call back.
281
+ const said = state.paused
282
+ ? undefined
283
+ : captions
284
+ ? caption(state)
285
+ : state.phase === 'listening' && state.heard.trim()
286
+ ? { text: state.heard.trim(), mode: 'follow' }
287
+ : undefined;
288
+ // The mark is what the user taps: with words heard, they are done (voices around may keep the recognizer going);
289
+ // while Ta speaks, it stops for them. Nothing shows it: a tap where Ta is is what one does.
290
+ const done = !state.paused && state.phase === 'listening' && !!state.heard.trim();
291
+ const cut = !state.paused && state.phase === 'speaking';
292
+ const tap = done ? t('ta.call.done') : cut ? t('ta.call.interrupt') : label;
293
+ return (React.createElement("div", { className: `ta-call ta-call-${state.paused ? 'paused' : state.phase}`, role: "status", "aria-live": "polite" },
294
+ React.createElement("div", { className: "ta-call-row" },
295
+ React.createElement("button", { type: "button", className: "ta-call-mark", "aria-label": tap, title: tap, disabled: !done && !cut, onClick: () => (cut ? call.interrupt() : call.endTurn()) }, state.paused ? (React.createElement(icon_1.Icon, { icon: lucide_react_1.Pause, size: 14 })) : state.phase === 'thinking' || state.phase === 'connecting' ? (React.createElement("span", { className: "ta-spinner" })) : (React.createElement("span", { className: "ta-wave" },
296
+ React.createElement("i", null),
297
+ React.createElement("i", null),
298
+ React.createElement("i", null),
299
+ React.createElement("i", null)))),
300
+ React.createElement("span", { className: "ta-call-text" }, said ? (React.createElement(CaptionTicker, { text: said.text, mode: said.mode })) : (state.paused && React.createElement("span", { className: "ta-call-heard" }, t('ta.call.pausedHint')))),
301
+ React.createElement("button", { type: "button", className: "ta-call-captions-toggle", "aria-pressed": captions, "aria-label": t(captions ? 'ta.call.captionsOff' : 'ta.call.captionsOn'), title: t(captions ? 'ta.call.captionsOff' : 'ta.call.captionsOn'), onClick: () => store.update({ callCaptions: !captions }) },
302
+ React.createElement(icon_1.Icon, { icon: captions ? lucide_react_1.Captions : lucide_react_1.CaptionsOff, size: 18 })),
303
+ React.createElement("button", { type: "button", className: "ta-call-end", "aria-label": t('ta.call.hangUp'), title: t('ta.call.hangUp'), onClick: () => call.hangUp() },
304
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.PhoneOff, size: 16 })))));
305
+ }
306
+ //# sourceMappingURL=voice-call-bar.js.map
@@ -0,0 +1,176 @@
1
+ import { Voice } from '../util/voice';
2
+ /** Where a call is: Ta listens to the user, works on what they said, or says its answer. */
3
+ export type CallPhase = 'connecting' | 'listening' | 'thinking' | 'speaking';
4
+ export interface CallState {
5
+ active: boolean;
6
+ phase: CallPhase;
7
+ /** What the user has said so far, while Ta listens. */
8
+ heard: string;
9
+ /** What the user said last, kept while Ta works on it and answers, until they say more: the captions. */
10
+ said?: string;
11
+ /** The answer being read, by sentences, and the one being read now: the captions. Kept after, until the user says more. */
12
+ reading?: {
13
+ pieces: string[];
14
+ at: number;
15
+ };
16
+ /** The page is hidden (another app in front, the screen locked): Ta neither listens nor speaks until it shows again. */
17
+ paused?: boolean;
18
+ /** A partner answers in this call (CallPartner), and tells the news of the work itself. */
19
+ partnered?: boolean;
20
+ /** Its voice hears the user cut in while Ta speaks: no need to tap. */
21
+ bargeIn?: boolean;
22
+ }
23
+ /** What a call uses of the page's voice: Voice by default, a service of voices.json (RealtimeVoice), a fake in tests. */
24
+ export interface CallVoice {
25
+ listen: typeof Voice.listen;
26
+ speak(text: string, language: string, onEnd: () => void, voice?: string, onPiece?: (pieces: string[], index: number) => void): void;
27
+ hush(): void;
28
+ /** It hears the user begin to speak even while Ta reads: the call stops reading and listens (barge-in). */
29
+ onSpeech?(listener: () => void): () => void;
30
+ /** The call ended: it lets go of what it holds (the microphone, the service). */
31
+ stop?(): void;
32
+ }
33
+ /**
34
+ * Who answers in a call in place of the conversation itself: a front that only talks, handing the work to the
35
+ * conversation (docs/design/ta-call.md), opened as the call starts and closed as it ends.
36
+ */
37
+ export interface CallPartner {
38
+ /** What the user said; the reply, as said aloud. `sent`: it went to the conversation already (let go over 通话). */
39
+ say(text: string, options?: {
40
+ sent?: boolean;
41
+ }): Promise<string | undefined>;
42
+ /** What it says by itself (news of the work), told as it comes, until it closes: the call announces it. */
43
+ news?(listener: (text: string) => void): void;
44
+ close(): void;
45
+ }
46
+ /** Why a call ended by itself. */
47
+ export type CallEnd = 'silent' | 'denied' | 'unavailable' | 'failed';
48
+ export interface CallOptions {
49
+ language(): string;
50
+ voice(): string | undefined;
51
+ /** Sends what the user said to the conversation. */
52
+ send(text: string): Promise<unknown>;
53
+ /** The call ended by itself: why, for a notice; `detail` what the voice service said. */
54
+ ended?(reason: CallEnd, detail?: string): void;
55
+ /** The voice of a service the call opens as it starts; undefined for that of the device. */
56
+ openVoice?(): Promise<CallVoice | undefined> | undefined;
57
+ /** Who answers in its place, opened as the call starts; undefined (or failing) for the conversation itself. */
58
+ openPartner?(): Promise<CallPartner | undefined> | undefined;
59
+ /** How long the words heard stay the same before the user is taken to be done; default END_MS. */
60
+ endMs?: number;
61
+ /** How long the user may speak in one turn; default TURN_MS. */
62
+ turnMs?: number;
63
+ }
64
+ /** Listens heard nothing this many times in a row: nobody is there, the call ends. */
65
+ export declare const SILENT_ROUNDS = 4;
66
+ /**
67
+ * The words heard stay the same this long: the user is done, though the recognizer goes on (it hears voices around them
68
+ * and waits for a silence that never comes).
69
+ */
70
+ export declare const END_MS = 1300;
71
+ /** At most this long a turn, from the first words: talk around the user that keeps the words coming ends there too. */
72
+ export declare const TURN_MS = 15000;
73
+ /**
74
+ * 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
75
+ * its answer out, then listens again, until the user hangs up or says nothing for a while. With the voice of the device
76
+ * one speaks at a time: Ta does not listen while it speaks (the user interrupts with a tap), so it never hears itself.
77
+ * A voice service hears the user begin to speak while Ta reads, and the call stops reading for them (onSpeech).
78
+ */
79
+ export declare class VoiceCall {
80
+ protected readonly options: CallOptions;
81
+ protected readonly device: CallVoice;
82
+ state: CallState;
83
+ protected readonly listeners: Set<() => void>;
84
+ protected listening?: Voice.Listening;
85
+ /** Of the listen now: one that ended or was stopped for another says nothing more. */
86
+ protected round: number;
87
+ protected silent: number;
88
+ protected retry?: ReturnType<typeof setTimeout>;
89
+ /** The user is done when it fires (END_MS), and at the latest when the other does (TURN_MS). */
90
+ protected endTimer?: ReturnType<typeof setTimeout>;
91
+ protected turnTimer?: ReturnType<typeof setTimeout>;
92
+ /** An answer that came while paused: read once the page shows again. */
93
+ protected pending?: string;
94
+ /** The voice of this call: the device's, or a service's opened as it started. */
95
+ protected voice: CallVoice;
96
+ /** Of the call now: a voice opened for a call hung up is let go. */
97
+ protected calls: number;
98
+ protected offSpeech?: () => void;
99
+ /** Its voice service is opening: an answer that comes meanwhile waits for it (`waiting`, '' for none). */
100
+ protected opening: boolean;
101
+ protected waiting?: string;
102
+ /** Who answers in this call in place of the conversation (CallOptions.openPartner), once open. */
103
+ protected partner?: CallPartner;
104
+ constructor(options: CallOptions, device?: CallVoice);
105
+ subscribe(listener: () => void): () => void;
106
+ /**
107
+ * Begins the call: Ta listens. With what the user said as they called (let go over 通话 of a talk), already being
108
+ * sent by the box, Ta waits for its turn and reads the answer instead; should the sending fail, it listens.
109
+ * `direct`: the conversation's voice kept on (let go over 持续说), the conversation answering, no partner.
110
+ */
111
+ start(said?: {
112
+ text: string;
113
+ sent: Promise<unknown>;
114
+ }, { direct }?: {
115
+ direct?: boolean;
116
+ }): void;
117
+ hangUp(): void;
118
+ /** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
119
+ protected announcements: string[];
120
+ /**
121
+ * Says something the user did not ask for, which they should hear in a call (Ta waits for them, a task ended):
122
+ * at once while Ta listens and the user has said nothing yet, else once what goes on now is over; never over
123
+ * the user, nor over an answer.
124
+ */
125
+ announce(text: string): void;
126
+ /** The user began to speak while Ta reads: it stops and listens to them. */
127
+ protected bargeIn(): void;
128
+ /**
129
+ * The page went to the background, where the device stops its listening and reading: the call stops them itself
130
+ * and waits, rather than look as if it listened. What was being said is said again on resume.
131
+ */
132
+ pause(): void;
133
+ /** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
134
+ resume(): void;
135
+ /** While Ta speaks (an answer, or news it tells by itself): it stops and listens to the user, before any more news. */
136
+ interrupt(): void;
137
+ /** The run of the turn the call asked has started: its reply is the first after `before`. */
138
+ protected asked?: {
139
+ before: number | undefined;
140
+ };
141
+ /**
142
+ * How the conversation is, as it changes: a run that started after what the user said is the call's turn, and
143
+ * once it settles its reply is read. A run already going when the call asked (a follow-up) is its turn too.
144
+ */
145
+ turn(working: boolean, reply: {
146
+ index: number;
147
+ text: string;
148
+ } | undefined): void;
149
+ /**
150
+ * The conversation's turn settled: its answer, if a new one came, is read out, and Ta listens again. Only for a turn
151
+ * the call asked; what comes while Ta listens (a task that reports back) does not cut the user off.
152
+ */
153
+ turnEnded(reply: string | undefined): void;
154
+ /** What is being read now, to read again after a pause. */
155
+ protected speaking?: string;
156
+ protected read(said: string): void;
157
+ /** Listens; first says what waits to be said, unless the user just cut in to speak (`announce` false). */
158
+ protected listen(announce?: boolean): void;
159
+ /**
160
+ * The user is done speaking (a pause after their words, or the mark of the bar tapped): what was heard goes now,
161
+ * the recognizer stopped, whatever it would still hear.
162
+ */
163
+ endTurn(): void;
164
+ /** A listen ended: what was said goes to the double; nothing, Ta listens again, a few times. */
165
+ protected heard(said: string, error: string | undefined): void;
166
+ /** The voice and the partner the call opens as it starts; undefined when it opens neither. A partner that fails is none. */
167
+ protected open(direct: boolean): Promise<[CallVoice | undefined, CallPartner | undefined]> | undefined;
168
+ /** The partner answers what the user said; its reply is read as a turn's is. */
169
+ protected ask(text: string, sent?: boolean): void;
170
+ /** What the user said did not go: not in the captions as if it had, and Ta listens again. */
171
+ protected unsent(): void;
172
+ protected end(reason: CallEnd, detail?: string): void;
173
+ protected stopListening(): void;
174
+ protected set(change: Partial<CallState>): void;
175
+ }
176
+ //# sourceMappingURL=voice-call.d.ts.map