@celljs/ta-web 4.27.0 → 4.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (586) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-role.d.ts +9 -4
  4. package/esm/browser/assistant/assistant-role.js +17 -5
  5. package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
  6. package/esm/browser/assistant/assistant-task-util.js +12 -1
  7. package/esm/browser/assistant/assistant-thread.js +15 -2
  8. package/esm/browser/assistant/assistant-view.js +4 -1
  9. package/esm/browser/assistant/assistant.d.ts +2 -1
  10. package/esm/browser/assistant/assistant.js +9 -7
  11. package/esm/browser/assistant/call-conversing.d.ts +45 -0
  12. package/esm/browser/assistant/call-conversing.js +91 -0
  13. package/esm/browser/assistant/call-face.d.ts +13 -0
  14. package/esm/browser/assistant/call-face.js +81 -0
  15. package/esm/browser/assistant/call-keeper.d.ts +8 -4
  16. package/esm/browser/assistant/call-keeper.js +32 -11
  17. package/esm/browser/assistant/call-partnering.d.ts +37 -0
  18. package/esm/browser/assistant/call-partnering.js +79 -0
  19. package/esm/browser/assistant/call-scenes.d.ts +26 -0
  20. package/esm/browser/assistant/call-scenes.js +85 -0
  21. package/esm/browser/assistant/call-screen.d.ts +3 -0
  22. package/esm/browser/assistant/call-screen.js +15 -0
  23. package/esm/browser/assistant/mic-sense.d.ts +31 -0
  24. package/esm/browser/assistant/mic-sense.js +119 -0
  25. package/esm/browser/assistant/noise-gate.d.ts +32 -0
  26. package/esm/browser/assistant/noise-gate.js +66 -0
  27. package/esm/browser/assistant/pcm-util.d.ts +10 -0
  28. package/esm/browser/assistant/pcm-util.js +55 -0
  29. package/esm/browser/assistant/read-aloud.d.ts +2 -1
  30. package/esm/browser/assistant/realtime-voice-protocol.d.ts +84 -0
  31. package/esm/browser/assistant/realtime-voice-protocol.js +40 -0
  32. package/esm/browser/assistant/realtime-voice.d.ts +50 -62
  33. package/esm/browser/assistant/realtime-voice.js +213 -134
  34. package/esm/browser/assistant/spoken-timeline.d.ts +27 -0
  35. package/esm/browser/assistant/spoken-timeline.js +49 -0
  36. package/esm/browser/assistant/voice-call-bar.d.ts +9 -2
  37. package/esm/browser/assistant/voice-call-bar.js +81 -31
  38. package/esm/browser/assistant/voice-call-protocol.d.ts +61 -4
  39. package/esm/browser/assistant/voice-call.d.ts +16 -23
  40. package/esm/browser/assistant/voice-call.js +134 -117
  41. package/esm/browser/assistant/voice-reading.d.ts +83 -0
  42. package/esm/browser/assistant/voice-reading.js +150 -0
  43. package/esm/browser/avatar/dino-talk.d.ts +15 -0
  44. package/esm/browser/avatar/dino-talk.js +34 -0
  45. package/esm/browser/chat/chat-protocol.d.ts +2 -0
  46. package/esm/browser/chat/chat-shown.d.ts +3 -1
  47. package/esm/browser/chat/chat-shown.js +25 -3
  48. package/esm/browser/chat/chat.d.ts +5 -1
  49. package/esm/browser/chat/chat.js +32 -16
  50. package/esm/browser/components/account-menu.d.ts +6 -16
  51. package/esm/browser/components/account-menu.js +47 -101
  52. package/esm/browser/components/app-contexts.js +3 -2
  53. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  54. package/esm/browser/components/composer-box-protocol.d.ts +2 -0
  55. package/esm/browser/components/composer-box.js +20 -1
  56. package/esm/browser/components/composer-emoji.d.ts +22 -0
  57. package/esm/browser/components/composer-emoji.js +50 -0
  58. package/esm/browser/components/conversation-scroll-util.d.ts +8 -1
  59. package/esm/browser/components/conversation-scroll-util.js +21 -0
  60. package/esm/browser/components/conversation-scroll.js +10 -11
  61. package/esm/browser/components/discover-view.d.ts +4 -3
  62. package/esm/browser/components/discover-view.js +5 -4
  63. package/esm/browser/components/emoji-panel.d.ts +22 -0
  64. package/esm/browser/components/emoji-panel.js +54 -0
  65. package/esm/browser/components/gallery.js +28 -7
  66. package/esm/browser/components/host-view.d.ts +1 -1
  67. package/esm/browser/components/image-pull.d.ts +64 -0
  68. package/esm/browser/components/image-pull.js +202 -0
  69. package/esm/browser/components/kept-call-bar.js +2 -1
  70. package/esm/browser/components/lightbox.d.ts +1 -1
  71. package/esm/browser/components/lightbox.js +57 -2
  72. package/esm/browser/components/markdown.d.ts +8 -1
  73. package/esm/browser/components/markdown.js +12 -4
  74. package/esm/browser/components/me-rows.d.ts +24 -0
  75. package/esm/browser/components/me-rows.js +19 -0
  76. package/esm/browser/components/me-view.d.ts +2 -1
  77. package/esm/browser/components/me-view.js +3 -2
  78. package/esm/browser/components/message-list.js +47 -7
  79. package/esm/browser/components/message-steps.js +13 -0
  80. package/esm/browser/components/nav-places.js +1 -1
  81. package/esm/browser/components/partner-row.js +2 -1
  82. package/esm/browser/components/relay-services.d.ts +9 -3
  83. package/esm/browser/components/relay-services.js +73 -35
  84. package/esm/browser/components/session-view.js +4 -2
  85. package/esm/browser/components/settings-choices.js +3 -0
  86. package/esm/browser/components/settings-controls.d.ts +13 -0
  87. package/esm/browser/components/settings-controls.js +19 -0
  88. package/esm/browser/components/settings-more.d.ts +1 -1
  89. package/esm/browser/components/settings-more.js +28 -39
  90. package/esm/browser/components/settings-parts.d.ts +4 -2
  91. package/esm/browser/components/settings-parts.js +16 -9
  92. package/esm/browser/components/settings-view.js +2 -6
  93. package/esm/browser/components/ta-avatar.d.ts +15 -1
  94. package/esm/browser/components/ta-avatar.js +38 -5
  95. package/esm/browser/components/voice-services.js +6 -1
  96. package/esm/browser/components/web-composer.d.ts +1 -1
  97. package/esm/browser/components/web-composer.js +2 -2
  98. package/esm/browser/device/file-save.d.ts +31 -0
  99. package/esm/browser/device/file-save.js +80 -0
  100. package/esm/browser/extension/extension-view.d.ts +2 -0
  101. package/esm/browser/extension/extension-view.js +2 -0
  102. package/esm/browser/extension/web-api-call.d.ts +109 -2
  103. package/esm/browser/extension/web-api-components.d.ts +4 -0
  104. package/esm/browser/extension/web-api-contributions.d.ts +14 -14
  105. package/esm/browser/extension/web-api-desktop.d.ts +16 -1
  106. package/esm/browser/extension/web-api-desktop.js +1 -0
  107. package/esm/browser/extension/web-api-partners.d.ts +2 -0
  108. package/esm/browser/extension/web-extension-api.d.ts +8 -10
  109. package/esm/browser/extension/web-extension-code.d.ts +15 -8
  110. package/esm/browser/extension/web-extension-code.js +25 -27
  111. package/esm/browser/extension/web-extension-context.js +4 -0
  112. package/esm/browser/extension/web-extension-protocol.d.ts +10 -1
  113. package/esm/browser/extension/web-extension-protocol.js +1 -0
  114. package/esm/browser/extension/web-extension-run.d.ts +4 -2
  115. package/esm/browser/extension/web-extension-run.js +10 -4
  116. package/esm/browser/extension/web-extensions-running.js +7 -6
  117. package/esm/browser/extension/web-pages.d.ts +2 -0
  118. package/esm/browser/extension/web-pages.js +2 -0
  119. package/esm/browser/i18n/en/account.d.ts +202 -0
  120. package/esm/browser/i18n/en/account.js +205 -0
  121. package/esm/browser/i18n/en/assistant.d.ts +129 -0
  122. package/esm/browser/i18n/en/assistant.js +130 -0
  123. package/esm/browser/i18n/en/call.d.ts +86 -0
  124. package/esm/browser/i18n/en/call.js +87 -0
  125. package/esm/browser/i18n/en/chat.d.ts +213 -0
  126. package/esm/browser/i18n/en/chat.js +214 -0
  127. package/esm/browser/i18n/en/common.d.ts +99 -0
  128. package/esm/browser/i18n/en/common.js +101 -0
  129. package/esm/browser/i18n/en/console.d.ts +230 -0
  130. package/esm/browser/i18n/en/console.js +232 -0
  131. package/esm/browser/i18n/en/discover.d.ts +117 -0
  132. package/esm/browser/i18n/en/discover.js +119 -0
  133. package/esm/browser/i18n/en/service.d.ts +242 -0
  134. package/esm/browser/i18n/en/service.js +245 -0
  135. package/esm/browser/i18n/en/settings.d.ts +213 -0
  136. package/esm/browser/i18n/en/settings.js +214 -0
  137. package/esm/browser/i18n/en/tools.d.ts +85 -0
  138. package/esm/browser/i18n/en/tools.js +87 -0
  139. package/esm/browser/i18n/ja/account.d.ts +2 -0
  140. package/esm/browser/i18n/ja/account.js +202 -0
  141. package/esm/browser/i18n/ja/assistant.d.ts +2 -0
  142. package/esm/browser/i18n/ja/assistant.js +129 -0
  143. package/esm/browser/i18n/ja/call.d.ts +2 -0
  144. package/esm/browser/i18n/ja/call.js +86 -0
  145. package/esm/browser/i18n/ja/chat.d.ts +2 -0
  146. package/esm/browser/i18n/ja/chat.js +213 -0
  147. package/esm/browser/i18n/ja/common.d.ts +2 -0
  148. package/esm/browser/i18n/ja/common.js +99 -0
  149. package/esm/browser/i18n/ja/console.d.ts +2 -0
  150. package/esm/browser/i18n/ja/console.js +230 -0
  151. package/esm/browser/i18n/ja/discover.d.ts +2 -0
  152. package/esm/browser/i18n/ja/discover.js +117 -0
  153. package/esm/browser/i18n/ja/service.d.ts +2 -0
  154. package/esm/browser/i18n/ja/service.js +242 -0
  155. package/esm/browser/i18n/ja/settings.d.ts +2 -0
  156. package/esm/browser/i18n/ja/settings.js +213 -0
  157. package/esm/browser/i18n/ja/tools.d.ts +2 -0
  158. package/esm/browser/i18n/ja/tools.js +85 -0
  159. package/esm/browser/i18n/locales.d.ts +1150 -1131
  160. package/esm/browser/i18n/messages-ja.js +20 -1567
  161. package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
  162. package/esm/browser/i18n/messages-zh-tw.js +20 -1568
  163. package/esm/browser/i18n/messages.d.ts +1153 -1131
  164. package/esm/browser/i18n/messages.js +44 -3145
  165. package/esm/browser/i18n/zh/account.d.ts +2 -0
  166. package/esm/browser/i18n/zh/account.js +203 -0
  167. package/esm/browser/i18n/zh/assistant.d.ts +2 -0
  168. package/esm/browser/i18n/zh/assistant.js +129 -0
  169. package/esm/browser/i18n/zh/call.d.ts +2 -0
  170. package/esm/browser/i18n/zh/call.js +86 -0
  171. package/esm/browser/i18n/zh/chat.d.ts +2 -0
  172. package/esm/browser/i18n/zh/chat.js +213 -0
  173. package/esm/browser/i18n/zh/common.d.ts +2 -0
  174. package/esm/browser/i18n/zh/common.js +99 -0
  175. package/esm/browser/i18n/zh/console.d.ts +2 -0
  176. package/esm/browser/i18n/zh/console.js +230 -0
  177. package/esm/browser/i18n/zh/discover.d.ts +2 -0
  178. package/esm/browser/i18n/zh/discover.js +117 -0
  179. package/esm/browser/i18n/zh/service.d.ts +2 -0
  180. package/esm/browser/i18n/zh/service.js +242 -0
  181. package/esm/browser/i18n/zh/settings.d.ts +2 -0
  182. package/esm/browser/i18n/zh/settings.js +213 -0
  183. package/esm/browser/i18n/zh/tools.d.ts +2 -0
  184. package/esm/browser/i18n/zh/tools.js +86 -0
  185. package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
  186. package/esm/browser/i18n/zh-tw/account.js +202 -0
  187. package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
  188. package/esm/browser/i18n/zh-tw/assistant.js +129 -0
  189. package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
  190. package/esm/browser/i18n/zh-tw/call.js +86 -0
  191. package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
  192. package/esm/browser/i18n/zh-tw/chat.js +213 -0
  193. package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
  194. package/esm/browser/i18n/zh-tw/common.js +99 -0
  195. package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
  196. package/esm/browser/i18n/zh-tw/console.js +230 -0
  197. package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
  198. package/esm/browser/i18n/zh-tw/discover.js +117 -0
  199. package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
  200. package/esm/browser/i18n/zh-tw/service.js +242 -0
  201. package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
  202. package/esm/browser/i18n/zh-tw/settings.js +213 -0
  203. package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
  204. package/esm/browser/i18n/zh-tw/tools.js +85 -0
  205. package/esm/browser/markdown/code-renderers.d.ts +2 -0
  206. package/esm/browser/markdown/code-renderers.js +2 -0
  207. package/esm/browser/offline/device-values.d.ts +4 -0
  208. package/esm/browser/offline/device-values.js +10 -0
  209. package/esm/browser/pwa/page-build.d.ts +15 -0
  210. package/esm/browser/pwa/page-build.js +45 -0
  211. package/esm/browser/screen/page-answers.d.ts +2 -1
  212. package/esm/browser/screen/page-answers.js +7 -4
  213. package/esm/browser/settings/settings-protocol.d.ts +4 -0
  214. package/esm/browser/settings/settings-protocol.js +4 -0
  215. package/esm/browser/style/base.d.ts +1 -1
  216. package/esm/browser/style/base.js +3 -0
  217. package/esm/browser/style/chat-list.d.ts +1 -1
  218. package/esm/browser/style/chat-list.js +1 -1
  219. package/esm/browser/style/conversation-column.d.ts +1 -1
  220. package/esm/browser/style/conversation-column.js +17 -0
  221. package/esm/browser/style/conversation.d.ts +1 -1
  222. package/esm/browser/style/conversation.js +11 -1
  223. package/esm/browser/style/device.js +1 -0
  224. package/esm/browser/style/dialogs.d.ts +1 -1
  225. package/esm/browser/style/dialogs.js +1 -1
  226. package/esm/browser/style/layout.d.ts +1 -1
  227. package/esm/browser/style/layout.js +135 -57
  228. package/esm/browser/style/pages.d.ts +1 -1
  229. package/esm/browser/style/pages.js +0 -7
  230. package/esm/browser/style/shell.d.ts +1 -1
  231. package/esm/browser/style/shell.js +8 -0
  232. package/esm/browser/style/video-call.d.ts +2 -0
  233. package/esm/browser/style/video-call.js +63 -0
  234. package/esm/browser/style.js +2 -0
  235. package/esm/browser/util/call-transcript.d.ts +16 -0
  236. package/esm/browser/util/call-transcript.js +110 -0
  237. package/esm/browser/util/desktop.d.ts +10 -1
  238. package/esm/browser/util/desktop.js +10 -0
  239. package/esm/browser/util/image-pull.d.ts +61 -0
  240. package/esm/browser/util/image-pull.js +88 -0
  241. package/esm/browser/util/process.d.ts +6 -0
  242. package/esm/browser/util/process.js +18 -5
  243. package/esm/browser/util/spoken.d.ts +3 -3
  244. package/esm/browser/util/spoken.js +4 -4
  245. package/esm/browser/video-call/call-camera.d.ts +59 -0
  246. package/esm/browser/video-call/call-camera.js +188 -0
  247. package/esm/browser/video-call/call-people.d.ts +21 -0
  248. package/esm/browser/video-call/call-people.js +29 -0
  249. package/esm/browser/video-call/call-window.d.ts +19 -0
  250. package/esm/browser/video-call/call-window.js +80 -0
  251. package/esm/browser/video-call/clip-plan.d.ts +56 -0
  252. package/esm/browser/video-call/clip-plan.js +76 -0
  253. package/esm/browser/video-call/face-camera.d.ts +93 -0
  254. package/esm/browser/video-call/face-camera.js +192 -0
  255. package/esm/browser/video-call/face-files.d.ts +69 -0
  256. package/esm/browser/video-call/face-files.js +132 -0
  257. package/esm/browser/video-call/face-moves.d.ts +68 -0
  258. package/esm/browser/video-call/face-moves.js +180 -0
  259. package/esm/browser/video-call/face-stage.d.ts +139 -0
  260. package/esm/browser/video-call/face-stage.js +219 -0
  261. package/esm/browser/video-call/mouth-layer.d.ts +81 -0
  262. package/esm/browser/video-call/mouth-layer.js +241 -0
  263. package/esm/browser/video-call/video-call-view.d.ts +19 -0
  264. package/esm/browser/video-call/video-call-view.js +254 -0
  265. package/esm/browser/video-call/video-face.d.ts +19 -0
  266. package/esm/browser/video-call/video-face.js +471 -0
  267. package/esm/browser/workbench-hosts.d.ts +1 -0
  268. package/esm/browser/workbench-protocol.d.ts +2 -0
  269. package/esm/browser/workbench-util.d.ts +5 -0
  270. package/esm/browser/workbench-util.js +18 -0
  271. package/esm/browser/workbench.d.ts +14 -0
  272. package/esm/browser/workbench.js +73 -6
  273. package/lib/browser/assistant/assistant-role.d.ts +9 -4
  274. package/lib/browser/assistant/assistant-role.js +17 -5
  275. package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
  276. package/lib/browser/assistant/assistant-task-util.js +11 -0
  277. package/lib/browser/assistant/assistant-thread.js +15 -2
  278. package/lib/browser/assistant/assistant-view.js +3 -0
  279. package/lib/browser/assistant/assistant.d.ts +2 -1
  280. package/lib/browser/assistant/assistant.js +9 -7
  281. package/lib/browser/assistant/call-conversing.d.ts +46 -0
  282. package/lib/browser/assistant/call-conversing.js +96 -0
  283. package/lib/browser/assistant/call-face.d.ts +14 -0
  284. package/lib/browser/assistant/call-face.js +117 -0
  285. package/lib/browser/assistant/call-keeper.d.ts +8 -4
  286. package/lib/browser/assistant/call-keeper.js +32 -11
  287. package/lib/browser/assistant/call-partnering.d.ts +38 -0
  288. package/lib/browser/assistant/call-partnering.js +83 -0
  289. package/lib/browser/assistant/call-scenes.d.ts +27 -0
  290. package/lib/browser/assistant/call-scenes.js +88 -0
  291. package/lib/browser/assistant/call-screen.d.ts +3 -0
  292. package/lib/browser/assistant/call-screen.js +15 -0
  293. package/lib/browser/assistant/mic-sense.d.ts +32 -0
  294. package/lib/browser/assistant/mic-sense.js +123 -0
  295. package/lib/browser/assistant/noise-gate.d.ts +33 -0
  296. package/lib/browser/assistant/noise-gate.js +71 -0
  297. package/lib/browser/assistant/pcm-util.d.ts +11 -0
  298. package/lib/browser/assistant/pcm-util.js +58 -0
  299. package/lib/browser/assistant/read-aloud.d.ts +2 -1
  300. package/lib/browser/assistant/realtime-voice-protocol.d.ts +85 -0
  301. package/lib/browser/assistant/realtime-voice-protocol.js +43 -0
  302. package/lib/browser/assistant/realtime-voice.d.ts +50 -62
  303. package/lib/browser/assistant/realtime-voice.js +217 -138
  304. package/lib/browser/assistant/spoken-timeline.d.ts +28 -0
  305. package/lib/browser/assistant/spoken-timeline.js +53 -0
  306. package/lib/browser/assistant/voice-call-bar.d.ts +9 -2
  307. package/lib/browser/assistant/voice-call-bar.js +81 -30
  308. package/lib/browser/assistant/voice-call-protocol.d.ts +61 -4
  309. package/lib/browser/assistant/voice-call.d.ts +16 -23
  310. package/lib/browser/assistant/voice-call.js +134 -117
  311. package/lib/browser/assistant/voice-reading.d.ts +84 -0
  312. package/lib/browser/assistant/voice-reading.js +156 -0
  313. package/lib/browser/avatar/dino-talk.d.ts +16 -0
  314. package/lib/browser/avatar/dino-talk.js +37 -0
  315. package/lib/browser/chat/chat-protocol.d.ts +2 -0
  316. package/lib/browser/chat/chat-shown.d.ts +3 -1
  317. package/lib/browser/chat/chat-shown.js +25 -3
  318. package/lib/browser/chat/chat.d.ts +5 -1
  319. package/lib/browser/chat/chat.js +32 -16
  320. package/lib/browser/components/account-menu.d.ts +6 -16
  321. package/lib/browser/components/account-menu.js +45 -99
  322. package/lib/browser/components/app-contexts.js +2 -1
  323. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  324. package/lib/browser/components/composer-box-protocol.d.ts +2 -0
  325. package/lib/browser/components/composer-box.js +20 -1
  326. package/lib/browser/components/composer-emoji.d.ts +23 -0
  327. package/lib/browser/components/composer-emoji.js +87 -0
  328. package/lib/browser/components/conversation-scroll-util.d.ts +8 -1
  329. package/lib/browser/components/conversation-scroll-util.js +21 -0
  330. package/lib/browser/components/conversation-scroll.js +10 -11
  331. package/lib/browser/components/discover-view.d.ts +4 -3
  332. package/lib/browser/components/discover-view.js +5 -4
  333. package/lib/browser/components/emoji-panel.d.ts +23 -0
  334. package/lib/browser/components/emoji-panel.js +90 -0
  335. package/lib/browser/components/gallery.js +28 -7
  336. package/lib/browser/components/host-view.d.ts +1 -1
  337. package/lib/browser/components/image-pull.d.ts +65 -0
  338. package/lib/browser/components/image-pull.js +206 -0
  339. package/lib/browser/components/kept-call-bar.js +2 -1
  340. package/lib/browser/components/lightbox.d.ts +1 -1
  341. package/lib/browser/components/lightbox.js +57 -2
  342. package/lib/browser/components/markdown.d.ts +8 -1
  343. package/lib/browser/components/markdown.js +11 -3
  344. package/lib/browser/components/me-rows.d.ts +25 -0
  345. package/lib/browser/components/me-rows.js +22 -0
  346. package/lib/browser/components/me-view.d.ts +2 -1
  347. package/lib/browser/components/me-view.js +3 -2
  348. package/lib/browser/components/message-list.js +46 -6
  349. package/lib/browser/components/message-steps.js +13 -0
  350. package/lib/browser/components/nav-places.js +1 -1
  351. package/lib/browser/components/partner-row.js +2 -1
  352. package/lib/browser/components/relay-services.d.ts +9 -3
  353. package/lib/browser/components/relay-services.js +71 -33
  354. package/lib/browser/components/session-view.js +3 -1
  355. package/lib/browser/components/settings-choices.js +3 -0
  356. package/lib/browser/components/settings-controls.d.ts +13 -0
  357. package/lib/browser/components/settings-controls.js +19 -0
  358. package/lib/browser/components/settings-more.d.ts +1 -1
  359. package/lib/browser/components/settings-more.js +27 -38
  360. package/lib/browser/components/settings-parts.d.ts +4 -2
  361. package/lib/browser/components/settings-parts.js +15 -8
  362. package/lib/browser/components/settings-view.js +2 -6
  363. package/lib/browser/components/ta-avatar.d.ts +15 -1
  364. package/lib/browser/components/ta-avatar.js +38 -5
  365. package/lib/browser/components/voice-services.js +5 -0
  366. package/lib/browser/components/web-composer.d.ts +1 -1
  367. package/lib/browser/components/web-composer.js +2 -2
  368. package/lib/browser/device/file-save.d.ts +32 -0
  369. package/lib/browser/device/file-save.js +83 -0
  370. package/lib/browser/extension/extension-view.d.ts +2 -0
  371. package/lib/browser/extension/extension-view.js +3 -1
  372. package/lib/browser/extension/web-api-call.d.ts +109 -2
  373. package/lib/browser/extension/web-api-components.d.ts +4 -0
  374. package/lib/browser/extension/web-api-contributions.d.ts +14 -14
  375. package/lib/browser/extension/web-api-desktop.d.ts +16 -1
  376. package/lib/browser/extension/web-api-desktop.js +1 -0
  377. package/lib/browser/extension/web-api-partners.d.ts +2 -0
  378. package/lib/browser/extension/web-extension-api.d.ts +8 -10
  379. package/lib/browser/extension/web-extension-code.d.ts +15 -8
  380. package/lib/browser/extension/web-extension-code.js +25 -27
  381. package/lib/browser/extension/web-extension-context.js +4 -0
  382. package/lib/browser/extension/web-extension-protocol.d.ts +10 -1
  383. package/lib/browser/extension/web-extension-protocol.js +1 -0
  384. package/lib/browser/extension/web-extension-run.d.ts +4 -2
  385. package/lib/browser/extension/web-extension-run.js +10 -4
  386. package/lib/browser/extension/web-extensions-running.js +7 -6
  387. package/lib/browser/extension/web-pages.d.ts +2 -0
  388. package/lib/browser/extension/web-pages.js +2 -0
  389. package/lib/browser/i18n/en/account.d.ts +203 -0
  390. package/lib/browser/i18n/en/account.js +208 -0
  391. package/lib/browser/i18n/en/assistant.d.ts +130 -0
  392. package/lib/browser/i18n/en/assistant.js +133 -0
  393. package/lib/browser/i18n/en/call.d.ts +87 -0
  394. package/lib/browser/i18n/en/call.js +90 -0
  395. package/lib/browser/i18n/en/chat.d.ts +214 -0
  396. package/lib/browser/i18n/en/chat.js +217 -0
  397. package/lib/browser/i18n/en/common.d.ts +100 -0
  398. package/lib/browser/i18n/en/common.js +104 -0
  399. package/lib/browser/i18n/en/console.d.ts +231 -0
  400. package/lib/browser/i18n/en/console.js +235 -0
  401. package/lib/browser/i18n/en/discover.d.ts +118 -0
  402. package/lib/browser/i18n/en/discover.js +122 -0
  403. package/lib/browser/i18n/en/service.d.ts +243 -0
  404. package/lib/browser/i18n/en/service.js +248 -0
  405. package/lib/browser/i18n/en/settings.d.ts +214 -0
  406. package/lib/browser/i18n/en/settings.js +217 -0
  407. package/lib/browser/i18n/en/tools.d.ts +86 -0
  408. package/lib/browser/i18n/en/tools.js +90 -0
  409. package/lib/browser/i18n/ja/account.d.ts +3 -0
  410. package/lib/browser/i18n/ja/account.js +205 -0
  411. package/lib/browser/i18n/ja/assistant.d.ts +3 -0
  412. package/lib/browser/i18n/ja/assistant.js +132 -0
  413. package/lib/browser/i18n/ja/call.d.ts +3 -0
  414. package/lib/browser/i18n/ja/call.js +89 -0
  415. package/lib/browser/i18n/ja/chat.d.ts +3 -0
  416. package/lib/browser/i18n/ja/chat.js +216 -0
  417. package/lib/browser/i18n/ja/common.d.ts +3 -0
  418. package/lib/browser/i18n/ja/common.js +102 -0
  419. package/lib/browser/i18n/ja/console.d.ts +3 -0
  420. package/lib/browser/i18n/ja/console.js +233 -0
  421. package/lib/browser/i18n/ja/discover.d.ts +3 -0
  422. package/lib/browser/i18n/ja/discover.js +120 -0
  423. package/lib/browser/i18n/ja/service.d.ts +3 -0
  424. package/lib/browser/i18n/ja/service.js +245 -0
  425. package/lib/browser/i18n/ja/settings.d.ts +3 -0
  426. package/lib/browser/i18n/ja/settings.js +216 -0
  427. package/lib/browser/i18n/ja/tools.d.ts +3 -0
  428. package/lib/browser/i18n/ja/tools.js +88 -0
  429. package/lib/browser/i18n/locales.d.ts +1150 -1131
  430. package/lib/browser/i18n/messages-ja.js +20 -1567
  431. package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
  432. package/lib/browser/i18n/messages-zh-tw.js +20 -1568
  433. package/lib/browser/i18n/messages.d.ts +1153 -1131
  434. package/lib/browser/i18n/messages.js +44 -3145
  435. package/lib/browser/i18n/zh/account.d.ts +3 -0
  436. package/lib/browser/i18n/zh/account.js +206 -0
  437. package/lib/browser/i18n/zh/assistant.d.ts +3 -0
  438. package/lib/browser/i18n/zh/assistant.js +132 -0
  439. package/lib/browser/i18n/zh/call.d.ts +3 -0
  440. package/lib/browser/i18n/zh/call.js +89 -0
  441. package/lib/browser/i18n/zh/chat.d.ts +3 -0
  442. package/lib/browser/i18n/zh/chat.js +216 -0
  443. package/lib/browser/i18n/zh/common.d.ts +3 -0
  444. package/lib/browser/i18n/zh/common.js +102 -0
  445. package/lib/browser/i18n/zh/console.d.ts +3 -0
  446. package/lib/browser/i18n/zh/console.js +233 -0
  447. package/lib/browser/i18n/zh/discover.d.ts +3 -0
  448. package/lib/browser/i18n/zh/discover.js +120 -0
  449. package/lib/browser/i18n/zh/service.d.ts +3 -0
  450. package/lib/browser/i18n/zh/service.js +245 -0
  451. package/lib/browser/i18n/zh/settings.d.ts +3 -0
  452. package/lib/browser/i18n/zh/settings.js +216 -0
  453. package/lib/browser/i18n/zh/tools.d.ts +3 -0
  454. package/lib/browser/i18n/zh/tools.js +89 -0
  455. package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
  456. package/lib/browser/i18n/zh-tw/account.js +205 -0
  457. package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
  458. package/lib/browser/i18n/zh-tw/assistant.js +132 -0
  459. package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
  460. package/lib/browser/i18n/zh-tw/call.js +89 -0
  461. package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
  462. package/lib/browser/i18n/zh-tw/chat.js +216 -0
  463. package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
  464. package/lib/browser/i18n/zh-tw/common.js +102 -0
  465. package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
  466. package/lib/browser/i18n/zh-tw/console.js +233 -0
  467. package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
  468. package/lib/browser/i18n/zh-tw/discover.js +120 -0
  469. package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
  470. package/lib/browser/i18n/zh-tw/service.js +245 -0
  471. package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
  472. package/lib/browser/i18n/zh-tw/settings.js +216 -0
  473. package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
  474. package/lib/browser/i18n/zh-tw/tools.js +88 -0
  475. package/lib/browser/markdown/code-renderers.d.ts +2 -0
  476. package/lib/browser/markdown/code-renderers.js +3 -1
  477. package/lib/browser/offline/device-values.d.ts +4 -0
  478. package/lib/browser/offline/device-values.js +10 -0
  479. package/lib/browser/pwa/page-build.d.ts +16 -0
  480. package/lib/browser/pwa/page-build.js +48 -0
  481. package/lib/browser/screen/page-answers.d.ts +2 -1
  482. package/lib/browser/screen/page-answers.js +7 -4
  483. package/lib/browser/settings/settings-protocol.d.ts +4 -0
  484. package/lib/browser/settings/settings-protocol.js +4 -0
  485. package/lib/browser/style/base.d.ts +1 -1
  486. package/lib/browser/style/base.js +3 -0
  487. package/lib/browser/style/chat-list.d.ts +1 -1
  488. package/lib/browser/style/chat-list.js +1 -1
  489. package/lib/browser/style/conversation-column.d.ts +1 -1
  490. package/lib/browser/style/conversation-column.js +17 -0
  491. package/lib/browser/style/conversation.d.ts +1 -1
  492. package/lib/browser/style/conversation.js +11 -1
  493. package/lib/browser/style/device.js +1 -0
  494. package/lib/browser/style/dialogs.d.ts +1 -1
  495. package/lib/browser/style/dialogs.js +1 -1
  496. package/lib/browser/style/layout.d.ts +1 -1
  497. package/lib/browser/style/layout.js +135 -57
  498. package/lib/browser/style/pages.d.ts +1 -1
  499. package/lib/browser/style/pages.js +0 -7
  500. package/lib/browser/style/shell.d.ts +1 -1
  501. package/lib/browser/style/shell.js +8 -0
  502. package/lib/browser/style/video-call.d.ts +3 -0
  503. package/lib/browser/style/video-call.js +66 -0
  504. package/lib/browser/style.js +2 -0
  505. package/lib/browser/util/call-transcript.d.ts +17 -0
  506. package/lib/browser/util/call-transcript.js +113 -0
  507. package/lib/browser/util/desktop.d.ts +10 -1
  508. package/lib/browser/util/desktop.js +10 -0
  509. package/lib/browser/util/image-pull.d.ts +62 -0
  510. package/lib/browser/util/image-pull.js +91 -0
  511. package/lib/browser/util/process.d.ts +6 -0
  512. package/lib/browser/util/process.js +17 -4
  513. package/lib/browser/util/spoken.d.ts +3 -3
  514. package/lib/browser/util/spoken.js +4 -4
  515. package/lib/browser/video-call/call-camera.d.ts +60 -0
  516. package/lib/browser/video-call/call-camera.js +192 -0
  517. package/lib/browser/video-call/call-people.d.ts +22 -0
  518. package/lib/browser/video-call/call-people.js +32 -0
  519. package/lib/browser/video-call/call-window.d.ts +20 -0
  520. package/lib/browser/video-call/call-window.js +83 -0
  521. package/lib/browser/video-call/clip-plan.d.ts +57 -0
  522. package/lib/browser/video-call/clip-plan.js +80 -0
  523. package/lib/browser/video-call/face-camera.d.ts +94 -0
  524. package/lib/browser/video-call/face-camera.js +197 -0
  525. package/lib/browser/video-call/face-files.d.ts +70 -0
  526. package/lib/browser/video-call/face-files.js +137 -0
  527. package/lib/browser/video-call/face-moves.d.ts +69 -0
  528. package/lib/browser/video-call/face-moves.js +184 -0
  529. package/lib/browser/video-call/face-stage.d.ts +140 -0
  530. package/lib/browser/video-call/face-stage.js +223 -0
  531. package/lib/browser/video-call/mouth-layer.d.ts +82 -0
  532. package/lib/browser/video-call/mouth-layer.js +245 -0
  533. package/lib/browser/video-call/video-call-view.d.ts +20 -0
  534. package/lib/browser/video-call/video-call-view.js +290 -0
  535. package/lib/browser/video-call/video-face.d.ts +20 -0
  536. package/lib/browser/video-call/video-face.js +507 -0
  537. package/lib/browser/workbench-hosts.d.ts +1 -0
  538. package/lib/browser/workbench-protocol.d.ts +2 -0
  539. package/lib/browser/workbench-util.d.ts +5 -0
  540. package/lib/browser/workbench-util.js +18 -0
  541. package/lib/browser/workbench.d.ts +14 -0
  542. package/lib/browser/workbench.js +71 -4
  543. package/package.json +7 -7
  544. package/public/faces/README.md +40 -0
  545. package/public/faces/blonde/clap.mp4 +0 -0
  546. package/public/faces/blonde/dance.mp4 +0 -0
  547. package/public/faces/blonde/face.jpg +0 -0
  548. package/public/faces/blonde/happy.mp4 +0 -0
  549. package/public/faces/blonde/heart.mp4 +0 -0
  550. package/public/faces/blonde/idle-1.mp4 +0 -0
  551. package/public/faces/blonde/idle-2.mp4 +0 -0
  552. package/public/faces/blonde/idle-3.mp4 +0 -0
  553. package/public/faces/blonde/laugh.mp4 +0 -0
  554. package/public/faces/blonde/listening.mp4 +0 -0
  555. package/public/faces/blonde/poster.jpg +0 -0
  556. package/public/faces/blonde/shy.mp4 +0 -0
  557. package/public/faces/blonde/sorry.mp4 +0 -0
  558. package/public/faces/blonde/stretch.mp4 +0 -0
  559. package/public/faces/blonde/surprised.mp4 +0 -0
  560. package/public/faces/blonde/talk-1.mp4 +0 -0
  561. package/public/faces/blonde/talk-2.mp4 +0 -0
  562. package/public/faces/blonde/think-2.mp4 +0 -0
  563. package/public/faces/blonde/thinking.mp4 +0 -0
  564. package/public/faces/blonde/wave.mp4 +0 -0
  565. package/public/faces/clap.mp4 +0 -0
  566. package/public/faces/dance.mp4 +0 -0
  567. package/public/faces/face.jpg +0 -0
  568. package/public/faces/framing.json +1 -0
  569. package/public/faces/happy.mp4 +0 -0
  570. package/public/faces/heart.mp4 +0 -0
  571. package/public/faces/idle-1.mp4 +0 -0
  572. package/public/faces/idle-2.mp4 +0 -0
  573. package/public/faces/idle-3.mp4 +0 -0
  574. package/public/faces/laugh.mp4 +0 -0
  575. package/public/faces/lips.json +1 -0
  576. package/public/faces/listening.mp4 +0 -0
  577. package/public/faces/poster.jpg +0 -0
  578. package/public/faces/shy.mp4 +0 -0
  579. package/public/faces/sorry.mp4 +0 -0
  580. package/public/faces/stretch.mp4 +0 -0
  581. package/public/faces/surprised.mp4 +0 -0
  582. package/public/faces/talk-1.mp4 +0 -0
  583. package/public/faces/talk-2.mp4 +0 -0
  584. package/public/faces/think-2.mp4 +0 -0
  585. package/public/faces/thinking.mp4 +0 -0
  586. package/public/faces/wave.mp4 +0 -0
@@ -63,6 +63,19 @@ export declare namespace SettingsViewUtil {
63
63
  }, P extends {
64
64
  sections: S[];
65
65
  }>(parts: P[], query: string): P[];
66
+ /**
67
+ * The sections in their parts, in the order of `groups`: a section without a group in the first, those of a part by
68
+ * `order` (default 0), in the order given for the same; parts without a section left out.
69
+ */
70
+ function parts<S extends {
71
+ group?: string;
72
+ order?: number;
73
+ }>(sections: readonly S[], groups: readonly {
74
+ id: string;
75
+ }[]): {
76
+ id: string;
77
+ sections: S[];
78
+ }[];
66
79
  /** Where `scroller` puts `element` at its top, below its scroll padding; no further than it scrolls. */
67
80
  function scrollTop(scroller: HTMLElement, element: HTMLElement): number;
68
81
  }
@@ -113,6 +113,25 @@ var SettingsViewUtil;
113
113
  .filter(part => part.sections.length > 0);
114
114
  }
115
115
  SettingsViewUtil.filter = filter;
116
+ /**
117
+ * The sections in their parts, in the order of `groups`: a section without a group in the first, those of a part by
118
+ * `order` (default 0), in the order given for the same; parts without a section left out.
119
+ */
120
+ function parts(sections, groups) {
121
+ var _a;
122
+ const first = (_a = groups[0]) === null || _a === void 0 ? void 0 : _a.id;
123
+ return groups
124
+ .map(({ id }) => ({
125
+ id,
126
+ sections: sections
127
+ .filter(entry => { var _a; return ((_a = entry.group) !== null && _a !== void 0 ? _a : first) === id; })
128
+ .map((entry, index) => ({ entry, index }))
129
+ .sort((a, b) => { var _a, _b; return ((_a = a.entry.order) !== null && _a !== void 0 ? _a : 0) - ((_b = b.entry.order) !== null && _b !== void 0 ? _b : 0) || a.index - b.index; })
130
+ .map(({ entry }) => entry),
131
+ }))
132
+ .filter(part => part.sections.length > 0);
133
+ }
134
+ SettingsViewUtil.parts = parts;
116
135
  /** Where `scroller` puts `element` at its top, below its scroll padding; no further than it scrolls. */
117
136
  function scrollTop(scroller, element) {
118
137
  const padding = Number.parseFloat(getComputedStyle(scroller).scrollPaddingTop) || 0;
@@ -4,5 +4,5 @@ import type { SectionEntry, SettingsDialog } from './settings-parts';
4
4
  * those built in, those of extensions where they ask, the computers and services Ta reaches, who may come in, the
5
5
  * keys, and what is about Ta and this computer.
6
6
  */
7
- export declare function useMoreSections(onClose: () => void, onDialog: (dialog: SettingsDialog) => void): SectionEntry[];
7
+ export declare function useMoreSections(onDialog: (dialog: SettingsDialog) => void): SectionEntry[];
8
8
  //# sourceMappingURL=settings-more.d.ts.map
@@ -41,7 +41,6 @@ const extension_view_1 = require("../extension/extension-view");
41
41
  const web_extension_protocol_1 = require("../extension/web-extension-protocol");
42
42
  const hooks_1 = require("../hooks");
43
43
  const use_t_1 = require("../i18n/use-t");
44
- const workbench_util_1 = require("../workbench-util");
45
44
  const access_view_1 = require("./access-view");
46
45
  const busy_1 = require("./busy");
47
46
  const environment_view_1 = require("./environment-view");
@@ -59,12 +58,12 @@ const sign_in_setup_1 = require("./sign-in-setup");
59
58
  * those built in, those of extensions where they ask, the computers and services Ta reaches, who may come in, the
60
59
  * keys, and what is about Ta and this computer.
61
60
  */
62
- function useMoreSections(onClose, onDialog) {
61
+ function useMoreSections(onDialog) {
63
62
  var _a, _b;
64
63
  const t = (0, use_t_1.useT)();
65
64
  const language = (0, use_t_1.useLanguage)();
66
65
  const [{ settings }, store] = (0, hooks_1.useSettings)();
67
- const [workbench, bench] = (0, hooks_1.useWorkbench)();
66
+ const [workbench] = (0, hooks_1.useWorkbench)();
68
67
  const [{ extensions, settingsSections }, host] = (0, hooks_1.useWebExtensions)();
69
68
  const packageList = (0, settings_choices_1.usePackages)();
70
69
  const builtinPackages = packageList.packages.filter(pkg => pkg.origin === 'builtin');
@@ -73,10 +72,8 @@ function useMoreSections(onClose, onDialog) {
73
72
  const signInConfig = (0, sign_in_setup_1.useSignInConfig)();
74
73
  const gateway = (0, environment_view_1.useGateway)();
75
74
  const restartTa = (0, serve_restart_1.useRestartTa)();
76
- // As the menu of the account (useAccountEntries): a finger has no keys to learn; a phone is not the computer
77
- // that pairs phones, and signs out at the foot of Me.
75
+ // A finger has no keys to learn.
78
76
  const touch = (0, device_1.useDevice)(device => device.touch);
79
- const handheld = (0, device_1.useDevice)(device => device.handheld);
80
77
  // What runs, one thing at a time: its control turns (Switch, IconButton busy), the others wait.
81
78
  const [busy, setBusy] = React.useState();
82
79
  const run = (key, action, done) => {
@@ -221,14 +218,36 @@ function useMoreSections(onClose, onDialog) {
221
218
  id: 'shortcuts',
222
219
  title: t('ta.settings.shortcuts'),
223
220
  icon: lucide_react_1.Keyboard,
221
+ // Last of General, with About, after those of extensions there.
222
+ order: 900,
224
223
  rows: settings_choices_1.SHORTCUTS.map(shortcut => (0, settings_controls_1.row)(`key:${shortcut.keys}`, [t(shortcut.label), shortcut.keys, t('ta.settings.shortcuts')], React.createElement(settings_controls_1.Row, { label: t(shortcut.label) },
225
224
  React.createElement(settings_controls_1.Keys, { keys: shortcut.keys })))),
226
225
  },
227
226
  ]),
227
+ // Where new chats open: how Ta works, beside its model and tools.
228
+ ...(workbench.server
229
+ ? [
230
+ {
231
+ id: 'directory',
232
+ title: t('ta.settings.cwd'),
233
+ icon: lucide_react_1.FolderOpen,
234
+ group: 'ta',
235
+ order: 50,
236
+ rows: [
237
+ (0, settings_controls_1.row)('cwd', [t('ta.settings.cwd'), workbench.server.cwd], React.createElement(settings_controls_1.Row, { label: t('ta.settings.cwd'), description: t('ta.settings.cwdDescription', { path: workbench.server.cwd }) },
238
+ React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('directory') },
239
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.FolderOpen, size: 15 }),
240
+ " ",
241
+ t('ta.settings.cwdChange')))),
242
+ ],
243
+ },
244
+ ]
245
+ : []),
228
246
  {
229
247
  id: 'about',
230
248
  title: t('ta.settings.about'),
231
249
  icon: lucide_react_1.Info,
250
+ order: 1000,
232
251
  rows: workbench.server
233
252
  ? [
234
253
  (0, settings_controls_1.row)('version', [t('ta.settings.version'), 'version'], React.createElement(settings_controls_1.Row, { label: t('ta.settings.version'), description: restartTa.update
@@ -245,37 +264,6 @@ function useMoreSections(onClose, onDialog) {
245
264
  ]
246
265
  : []),
247
266
  (0, settings_controls_1.row)('settings-files', [t('ta.settings.files'), 'settings.json', 'models.json', 'JSON'], React.createElement(settings_files_1.SettingsFilesRow, null)),
248
- (0, settings_controls_1.row)('cwd', [t('ta.settings.cwd'), workbench.server.cwd], React.createElement(settings_controls_1.Row, { label: t('ta.settings.cwd'), description: t('ta.settings.cwdDescription', { path: workbench.server.cwd }) },
249
- React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('directory') },
250
- React.createElement(icon_1.Icon, { icon: lucide_react_1.FolderOpen, size: 15 }),
251
- " ",
252
- t('ta.settings.cwdChange')))),
253
- (0, settings_controls_1.row)('accounts', [t('ta.settings.accounts'), t('ta.settings.accountsDescription')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.accounts'), description: t('ta.settings.accountsDescription') },
254
- React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('accounts') },
255
- React.createElement(icon_1.Icon, { icon: lucide_react_1.KeyRound, size: 15 }),
256
- " ",
257
- t('ta.settings.manageAccounts')))),
258
- ...(workbench_util_1.WorkbenchUtil.isApp() || handheld
259
- ? []
260
- : [
261
- (0, settings_controls_1.row)('relay', [t('ta.settings.relay'), t('ta.settings.relayDescription')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.relay'), description: t('ta.settings.relayDescription') },
262
- React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('relay') },
263
- React.createElement(icon_1.Icon, { icon: lucide_react_1.Smartphone, size: 15 }),
264
- " ",
265
- t('ta.settings.manageAccounts')))),
266
- ]),
267
- ...(handheld
268
- ? []
269
- : [
270
- (0, settings_controls_1.row)('signOut', [t('ta.settings.signOut')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.signOut') },
271
- React.createElement("button", { type: "button", className: "ta-button ta-danger", onClick: () => {
272
- onClose();
273
- bench.signOut();
274
- } },
275
- React.createElement(icon_1.Icon, { icon: lucide_react_1.LogOut, size: 15 }),
276
- " ",
277
- t('ta.settings.signOut')))),
278
- ]),
279
267
  ]
280
268
  : [],
281
269
  },
@@ -284,13 +272,14 @@ function useMoreSections(onClose, onDialog) {
284
272
  }
285
273
  /** A section an extension added (WebExtensionAPI.registerSettings): its rows as Ta's, each control in a boundary of its own. */
286
274
  function extensionSection({ id, section }) {
287
- var _a;
275
+ var _a, _b;
288
276
  const title = web_extension_protocol_1.WebLabelUtil.text(section.title);
289
277
  return {
290
278
  id: `extension-${id.replace(/[^\w-]+/g, '-')}`,
291
279
  title,
292
280
  icon: (_a = section.icon) !== null && _a !== void 0 ? _a : lucide_react_1.Puzzle,
293
281
  group: section.group && settings_choices_1.SETTINGS_GROUPS.some(group => group.id === section.group) ? section.group : 'extensions',
282
+ order: (_b = section.order) !== null && _b !== void 0 ? _b : 100,
294
283
  rows: section.rows.map(item => {
295
284
  const label = web_extension_protocol_1.WebLabelUtil.text(item.label);
296
285
  const description = item.description === undefined ? undefined : web_extension_protocol_1.WebLabelUtil.text(item.description);
@@ -10,6 +10,8 @@ export interface SectionEntry {
10
10
  rows: RowEntry[];
11
11
  /** The part it is in; default `general`. */
12
12
  group?: WebSettingsGroup;
13
+ /** Smaller first in its part, in the order given for the same; default 0, an extension's 100 (WebSettingsSection.order). */
14
+ order?: number;
13
15
  /** A setting of pi's files, of the user or of the project: under the scope of its part (Part.lead). */
14
16
  scoped?: boolean;
15
17
  }
@@ -21,7 +23,7 @@ export interface Part {
21
23
  lead?: React.ReactNode;
22
24
  }
23
25
  /** What a row of the settings opens over them. */
24
- export type SettingsDialog = 'accounts' | 'directory' | 'relay';
26
+ export type SettingsDialog = 'directory';
25
27
  /** The sections of the page and of ta, by part, with their rows. */
26
- export declare function useParts(scope: TaSettingsScope, onScope: (scope: TaSettingsScope) => void, onClose: () => void, onDialog: (dialog: SettingsDialog) => void): Part[];
28
+ export declare function useParts(scope: TaSettingsScope, onScope: (scope: TaSettingsScope) => void, onDialog: (dialog: SettingsDialog) => void): Part[];
27
29
  //# sourceMappingURL=settings-parts.d.ts.map
@@ -54,7 +54,7 @@ const trusted_domains_1 = require("./trusted-domains");
54
54
  const voice_picker_1 = require("./voice-picker");
55
55
  const voice_services_1 = require("./voice-services");
56
56
  /** The sections of the page and of ta, by part, with their rows. */
57
- function useParts(scope, onScope, onClose, onDialog) {
57
+ function useParts(scope, onScope, onDialog) {
58
58
  var _a;
59
59
  const t = (0, use_t_1.useT)();
60
60
  const [{ settings }, store] = (0, hooks_1.useSettings)();
@@ -63,7 +63,7 @@ function useParts(scope, onScope, onClose, onDialog) {
63
63
  const [{ cwd, views }] = (0, hooks_1.useWebExtensions)();
64
64
  const navigation = (0, app_nav_1.useNavigation)(views);
65
65
  const agent = (0, agent_settings_view_1.useAgentSettings)(cwd !== null && cwd !== void 0 ? cwd : (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd);
66
- const more = (0, settings_more_1.useMoreSections)(onClose, onDialog);
66
+ const more = (0, settings_more_1.useMoreSections)(onDialog);
67
67
  const handheld = (0, device_1.useDevice)(device => device.handheld);
68
68
  const web = [
69
69
  {
@@ -108,6 +108,7 @@ function useParts(scope, onScope, onClose, onDialog) {
108
108
  id: 'chats',
109
109
  title: t('ta.settings.chats'),
110
110
  icon: lucide_react_1.List,
111
+ group: 'chats',
111
112
  rows: [
112
113
  (0, settings_controls_1.row)('chat-fold', [t('ta.settings.chatFold'), t('ta.settings.chatFoldHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.chatFold'), description: t('ta.settings.chatFoldHint'), stacked: true },
113
114
  React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.chatFold'), value: String(settings.chatFoldDays), choices: settings_protocol_1.CHAT_FOLD_CHOICES.map(days => ({
@@ -127,6 +128,9 @@ function useParts(scope, onScope, onClose, onDialog) {
127
128
  id: 'links',
128
129
  title: t('ta.settings.links'),
129
130
  icon: lucide_react_1.Link2,
131
+ group: 'chats',
132
+ // After the notices and who answers others, before what is kept.
133
+ order: 30,
130
134
  rows: [
131
135
  (0, settings_controls_1.row)('trusted-domains', [t('ta.settings.trustedDomains'), t('ta.settings.trustedDomainsHint'), ...settings.trustedDomains], React.createElement(trusted_domains_1.TrustedDomains, null)),
132
136
  ],
@@ -156,6 +160,7 @@ function useParts(scope, onScope, onClose, onDialog) {
156
160
  id: 'voice',
157
161
  title: t('ta.settings.voice'),
158
162
  icon: lucide_react_1.Volume2,
163
+ group: 'voice',
159
164
  rows: [
160
165
  (0, settings_controls_1.row)('speak', [t('ta.settings.speak'), t('ta.settings.speakHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.speak'), description: t('ta.settings.speakHint') },
161
166
  React.createElement(settings_controls_1.Switch, { label: t('ta.settings.speak'), checked: settings.speak, onChange: speak => store.update({ speak }) }))),
@@ -163,6 +168,8 @@ function useParts(scope, onScope, onClose, onDialog) {
163
168
  React.createElement(settings_controls_1.Switch, { label: t('ta.settings.speakTalk'), checked: settings.speakTalk, onChange: speakTalk => store.update({ speakTalk }) }))),
164
169
  (0, settings_controls_1.row)('callCaptions', [t('ta.settings.callCaptions'), t('ta.settings.callCaptionsHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.callCaptions'), description: t('ta.settings.callCaptionsHint') },
165
170
  React.createElement(settings_controls_1.Switch, { label: t('ta.settings.callCaptions'), checked: settings.callCaptions, onChange: callCaptions => store.update({ callCaptions }) }))),
171
+ (0, settings_controls_1.row)('callFace', [t('ta.settings.callFace'), t('ta.settings.callFaceHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.callFace'), description: t('ta.settings.callFaceHint') },
172
+ React.createElement(settings_controls_1.Switch, { label: t('ta.settings.callFace'), checked: settings.callFace, onChange: callFace => store.update({ callFace }) }))),
166
173
  ...(voice_1.Voice.canSpeak()
167
174
  ? [
168
175
  (0, settings_controls_1.row)('voiceName', [t('ta.settings.voiceName'), t('ta.settings.voiceNameHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.voiceName'), description: t('ta.settings.voiceNameHint'), stacked: true },
@@ -206,11 +213,11 @@ function useParts(scope, onScope, onClose, onDialog) {
206
213
  }); });
207
214
  // Ta's scoped sections first in its part, under their scope; each part's own sections before those of extensions.
208
215
  const sections = [...web.filter(entry => entry.group !== 'ta'), ...ta, ...web.filter(entry => entry.group === 'ta'), ...more];
209
- return settings_choices_1.SETTINGS_GROUPS.map(group => ({
210
- id: group.id,
211
- title: t(group.title),
212
- sections: sections.filter(entry => { var _a; return ((_a = entry.group) !== null && _a !== void 0 ? _a : 'general') === group.id; }),
213
- ...(group.id === 'ta' ? { lead } : {}),
214
- })).filter(part => part.sections.length > 0);
216
+ return settings_controls_1.SettingsViewUtil.parts(sections, settings_choices_1.SETTINGS_GROUPS).map(({ id, sections: own }) => { var _a; var _b; return ({
217
+ id,
218
+ title: t((_b = (_a = settings_choices_1.SETTINGS_GROUPS.find(group => group.id === id)) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'ta.settings.general'),
219
+ sections: own,
220
+ ...(id === 'ta' ? { lead } : {}),
221
+ }); });
215
222
  }
216
223
  //# sourceMappingURL=settings-parts.js.map
@@ -40,13 +40,11 @@ const device_1 = require("../device/device");
40
40
  const use_t_1 = require("../i18n/use-t");
41
41
  const screen_protocol_1 = require("../screen/screen-protocol");
42
42
  const use_screen_part_1 = require("../screen/use-screen-part");
43
- const auth_view_1 = require("./auth-view");
44
43
  const empty_state_1 = require("./empty-state");
45
44
  const icon_1 = require("./icon");
46
45
  const list_rows_1 = require("./list-rows");
47
46
  const loading_1 = require("./loading");
48
47
  const phone_shell_1 = require("./phone-shell");
49
- const relay_view_1 = require("./relay-view");
50
48
  const settings_controls_1 = require("./settings-controls");
51
49
  const settings_parts_1 = require("./settings-parts");
52
50
  const working_directory_1 = require("./working-directory");
@@ -64,7 +62,7 @@ function SettingsView({ section, onClose, onMenu, onBack }) {
64
62
  const [scope, setScope] = React.useState('user');
65
63
  const [dialog, setDialog] = React.useState();
66
64
  const closeDialog = React.useCallback(() => setDialog(undefined), []);
67
- const parts = (0, settings_parts_1.useParts)(scope, setScope, onClose, setDialog);
65
+ const parts = (0, settings_parts_1.useParts)(scope, setScope, setDialog);
68
66
  // What an agent reads of the settings and where it goes in them (docs/design/ta-app-use.md 3); the rows are read as they show.
69
67
  (0, use_screen_part_1.useScreenPart)({
70
68
  id: 'settings',
@@ -103,9 +101,7 @@ function SettingsView({ section, onClose, onMenu, onBack }) {
103
101
  const props = { parts, query, search, section };
104
102
  return (React.createElement("section", { className: "ta-settings-page", "aria-label": t('ta.settings'), ...screen_protocol_1.ScreenUtil.part('settings') },
105
103
  handheld ? React.createElement(PhoneSettings, { ...props, onBack: onBack !== null && onBack !== void 0 ? onBack : onClose }) : React.createElement(WideSettings, { ...props, onClose: onClose, onMenu: onMenu, onBack: onBack }),
106
- dialog === 'accounts' && React.createElement(auth_view_1.AuthDialog, { onClose: closeDialog }),
107
- dialog === 'directory' && React.createElement(working_directory_1.WorkingDirectoryPicker, { onClose: closeDialog }),
108
- dialog === 'relay' && React.createElement(relay_view_1.RelayDialog, { onClose: closeDialog })));
104
+ dialog === 'directory' && React.createElement(working_directory_1.WorkingDirectoryPicker, { onClose: closeDialog })));
109
105
  }
110
106
  /** The rows of a section, in a card. */
111
107
  function SectionRows({ entry }) {
@@ -2,6 +2,16 @@ import * as React from 'react';
2
2
  import { type Mood } from '../avatar/dino-avatar';
3
3
  import { type Gait } from '../avatar/dino-motion';
4
4
  import { type SpeciesId } from '../avatar/dino-species';
5
+ /**
6
+ * What moves a close-up in a call (the face of a call): the mouth by the sound that plays while it speaks, a nod as the
7
+ * user's words come.
8
+ */
9
+ export interface DinoTalk {
10
+ /** How loud what plays now is (RMS, 0 to 1); undefined when nothing tells, and the mouth moves by itself. */
11
+ level?(): number | undefined;
12
+ /** Changes as the user's words come: it nods (once in a while). */
13
+ nods?: number;
14
+ }
5
15
  /** The kind of dinosaur ta is and how it walks, as the user picked them for the double; the logo walking until then. */
6
16
  export interface DinoLook {
7
17
  species: SpeciesId;
@@ -26,10 +36,14 @@ export declare function TaAvatar({ mood, size, mark, className, roam, species, g
26
36
  * A close-up of ta's head in a round frame tinted with its color, sweet rather than fierce: the figure of the
27
37
  * account. It tilts its head, blinks, follows the pointer with its eyes, and laughs when poked.
28
38
  */
29
- export declare function DinoFace({ mood, size, species, className }: {
39
+ export declare function DinoFace({ mood, size, species, className, talk, fill, }: {
30
40
  mood?: Mood;
31
41
  size?: number;
32
42
  species?: SpeciesId;
33
43
  className?: string;
44
+ /** In a call: its mouth moves by the sound it plays, it nods to the words it hears. */
45
+ talk?: DinoTalk;
46
+ /** As large as its box, which the styles size; `size` says how large it is drawn at most. */
47
+ fill?: boolean;
34
48
  }): React.JSX.Element;
35
49
  //# sourceMappingURL=ta-avatar.d.ts.map
@@ -40,6 +40,7 @@ const React = __importStar(require("react"));
40
40
  const dino_avatar_1 = require("../avatar/dino-avatar");
41
41
  const dino_motion_1 = require("../avatar/dino-motion");
42
42
  const dino_species_1 = require("../avatar/dino-species");
43
+ const dino_talk_1 = require("../avatar/dino-talk");
43
44
  const scroll_rest_1 = require("../util/scroll-rest");
44
45
  let next = 0;
45
46
  /** How long a change of mood takes to blend into the new motion, in seconds. */
@@ -52,6 +53,8 @@ const FINE = 48;
52
53
  const BOX_MS = 200;
53
54
  /** The whole dinosaur's viewBox: its left and top edge, and its width. */
54
55
  const WHOLE = [-8, -8, 272];
56
+ /** How long after a nod a close-up nods again, however often the words it hears come, in seconds. */
57
+ const NOD_GAP = 1.4;
55
58
  exports.DinoLook = React.createContext({ species: dino_species_1.DinoSpecies.DEFAULT, gait: 'walk' });
56
59
  /** One loop of animation frames for every ta on the page; only those on screen move, and none when motion is reduced. */
57
60
  const players = new Set();
@@ -116,6 +119,9 @@ function draw(player, now) {
116
119
  player.last = now;
117
120
  const since = (now - player.poked) / 1000;
118
121
  // A close-up only tilts its head toward the pointer, and laughs when poked; the whole dinosaur roars.
122
+ if (player.face && player.talk) {
123
+ pose = talking(player, pose, now, dt);
124
+ }
119
125
  pose = player.face
120
126
  ? dino_motion_1.DinoMotion.tickle(dino_motion_1.DinoMotion.look(pose, { ...look, weight: look.weight * 0.5 }), since)
121
127
  : dino_motion_1.DinoMotion.poke(dino_motion_1.DinoMotion.look(pose, look), since);
@@ -166,6 +172,27 @@ function draw(player, now) {
166
172
  svg.classList.toggle('ta-dino-poked', since >= 0 && since < dino_motion_1.POKE);
167
173
  }
168
174
  }
175
+ /** A close-up in a call: its mouth by the sound it plays as it speaks, a nod to the words it hears. */
176
+ function talking(player, pose, now, dt) {
177
+ var _a;
178
+ const talk = player.talk;
179
+ const level = player.mood === 'speaking' ? (_a = talk === null || talk === void 0 ? void 0 : talk.level) === null || _a === void 0 ? void 0 : _a.call(talk) : undefined;
180
+ let posed = pose;
181
+ if (level !== undefined) {
182
+ player.open = dino_talk_1.DinoTalkMotion.mouth(player.open, level, dt);
183
+ posed = dino_talk_1.DinoTalkMotion.speak(posed, player.open);
184
+ }
185
+ else {
186
+ player.open = 0;
187
+ }
188
+ if ((talk === null || talk === void 0 ? void 0 : talk.nods) !== player.nods) {
189
+ player.nods = talk === null || talk === void 0 ? void 0 : talk.nods;
190
+ if (player.mood === 'listening' && (now - player.nodded) / 1000 >= NOD_GAP) {
191
+ player.nodded = now;
192
+ }
193
+ }
194
+ return dino_talk_1.DinoTalkMotion.nod(posed, (now - player.nodded) / 1000);
195
+ }
169
196
  function tick(now) {
170
197
  loop = 0;
171
198
  if (document.documentElement.hasAttribute('data-reduce-motion')) {
@@ -233,7 +260,7 @@ function start(player) {
233
260
  };
234
261
  }
235
262
  /** Plays the drawing in `svg`: its markup (which changes with the mood and the kind only) and the frames that move what is in it. */
236
- function usePlayer(svg, { mood, size, roam, species, gait, face }) {
263
+ function usePlayer(svg, { mood, size, roam, species, gait, face, talk }) {
237
264
  const id = React.useMemo(() => `ta-${++next}`, []);
238
265
  const player = React.useRef(undefined);
239
266
  const detail = size >= FINE;
@@ -255,6 +282,7 @@ function usePlayer(svg, { mood, size, roam, species, gait, face }) {
255
282
  const view = face ? species.face : WHOLE;
256
283
  if (current) {
257
284
  current.svg = element;
285
+ current.talk = talk;
258
286
  current.fine = size >= FINE;
259
287
  current.view = view;
260
288
  if (current.species !== species) {
@@ -287,10 +315,14 @@ function usePlayer(svg, { mood, size, roam, species, gait, face }) {
287
315
  look: { x: 0, y: 0, weight: 0 },
288
316
  last: now,
289
317
  poked: -Infinity,
318
+ talk,
319
+ open: 0,
320
+ nods: talk === null || talk === void 0 ? void 0 : talk.nods,
321
+ nodded: -Infinity,
290
322
  boxedAt: -Infinity,
291
323
  parts: new Map(),
292
324
  };
293
- }, [mood, roam, size, species, gait, face]);
325
+ }, [mood, roam, size, species, gait, face, talk]);
294
326
  React.useEffect(() => {
295
327
  const current = player.current;
296
328
  return current ? start(current) : undefined;
@@ -322,12 +354,13 @@ function TaAvatar({ mood = 'idle', size = 40, mark, className = '', roam = false
322
354
  * A close-up of ta's head in a round frame tinted with its color, sweet rather than fierce: the figure of the
323
355
  * account. It tilts its head, blinks, follows the pointer with its eyes, and laughs when poked.
324
356
  */
325
- function DinoFace({ mood = 'idle', size = 32, species, className = '' }) {
357
+ function DinoFace({ mood = 'idle', size = 32, species, className = '', talk, fill = false, }) {
326
358
  const look = React.useContext(exports.DinoLook);
327
359
  const kind = dino_species_1.DinoSpecies.of(species !== null && species !== void 0 ? species : look.species);
328
360
  const svgRef = React.useRef(null);
329
- const markup = usePlayer(svgRef, { mood, size, roam: false, species: kind, gait: look.gait, face: true });
330
- return (React.createElement("span", { className: `ta-dino-face ${className}`, style: { width: size, height: size, '--ta-dino': kind.colors.skin } },
361
+ const markup = usePlayer(svgRef, { mood, size, roam: false, species: kind, gait: look.gait, face: true, talk });
362
+ const box = fill ? {} : { width: size, height: size };
363
+ return (React.createElement("span", { className: `ta-dino-face ${className}`, style: { ...box, ['--ta-dino']: kind.colors.skin } },
331
364
  React.createElement("svg", { ref: svgRef, className: `ta-avatar ta-avatar-${mood}`, width: size, height: size, viewBox: dino_avatar_1.DinoAvatar.faceBox(kind), "aria-hidden": "true",
332
365
  // biome-ignore lint/security/noDangerouslySetInnerHtml: markup made here from constants, nothing from outside
333
366
  dangerouslySetInnerHTML: { __html: markup } })));
@@ -47,6 +47,7 @@ const settings_controls_1 = require("./settings-controls");
47
47
  * to use it; the types packages registered, each with a form to add one. Keys are typed here and never shown again.
48
48
  */
49
49
  function VoiceServices() {
50
+ var _a;
50
51
  const t = (0, use_t_1.useT)();
51
52
  const language = (0, use_t_1.useLanguage)();
52
53
  const [workbench, bench] = (0, hooks_1.useWorkbench)();
@@ -78,6 +79,8 @@ function VoiceServices() {
78
79
  }
79
80
  const title = (type, fallback) => (type && ta_protocol_1.TaPackageTextUtil.pick(type.title, language)) || fallback;
80
81
  const typeOf = (name) => voices.types.find(type => type.type === name);
82
+ const inUse = voices.services.find(service => service.id === voices.use);
83
+ const thinks = !!inUse && !!((_a = typeOf(inUse.type)) === null || _a === void 0 ? void 0 : _a.thinks);
81
84
  const chosen = (id) => voices.use === id ? (React.createElement(icon_1.Icon, { icon: lucide_react_1.Check, size: 18, className: "ta-setting-check" })) : (React.createElement("button", { type: "button", className: "ta-button", disabled: busy !== undefined, onClick: () => void run('use', () => bench.voice.chooseVoice(id !== null && id !== void 0 ? id : null)) }, t('ta.voices.use')));
82
85
  return (React.createElement(React.Fragment, null,
83
86
  React.createElement(settings_controls_1.Row, { icon: lucide_react_1.Smartphone, label: t('ta.voices.device'), description: t('ta.voices.deviceHint') }, chosen(undefined)),
@@ -97,6 +100,8 @@ function VoiceServices() {
97
100
  await read();
98
101
  } })))));
99
102
  }),
103
+ thinks && (React.createElement(settings_controls_1.Row, { icon: lucide_react_1.BrainCircuit, label: t('ta.voices.brain'), description: t('ta.voices.brainHint') },
104
+ React.createElement(settings_controls_1.Switch, { checked: voices.brain === 'service', label: t('ta.voices.brain'), onChange: on => run('brain', () => bench.voice.setBrain(on ? 'service' : 'ta')) }))),
100
105
  voices.use && (React.createElement(settings_controls_1.Row, { icon: lucide_react_1.Hand, label: t('ta.voices.cutIn'), description: t('ta.voices.cutInHint') },
101
106
  React.createElement(settings_controls_1.Switch, { checked: !voices.bargeIn.tap, label: t('ta.voices.cutIn'), onChange: on => run('bargeIn', () => bench.voice.setBargeIn({ tap: !on })) }))),
102
107
  voices.use && !voices.bargeIn.tap && (React.createElement(BargeInRow, { bargeIn: voices.bargeIn, onChange: bargeIn => void run('bargeIn', () => bench.voice.setBargeIn(bargeIn)) })),
@@ -19,5 +19,5 @@ export interface WebComposerHostProps extends WebComposerProps {
19
19
  * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
20
20
  * the limits given), `@` for the names they give; a failure is a notice of the page.
21
21
  */
22
- export declare function WebComposer({ notices, placeholder, onSend, images, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
22
+ export declare function WebComposer({ notices, placeholder, onSend, images, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
23
23
  //# sourceMappingURL=web-composer.d.ts.map
@@ -46,7 +46,7 @@ const folder_picker_1 = require("./folder-picker");
46
46
  * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
47
47
  * the limits given), `@` for the names they give; a failure is a notice of the page.
48
48
  */
49
- function WebComposer({ notices, placeholder, onSend, images, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }) {
49
+ function WebComposer({ notices, placeholder, onSend, images, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }) {
50
50
  const t = (0, use_t_1.useT)();
51
51
  const language = (0, use_t_1.useLanguage)();
52
52
  const [query, setQuery] = React.useState();
@@ -55,7 +55,7 @@ function WebComposer({ notices, placeholder, onSend, images, mentions, mentionLa
55
55
  return (React.createElement(composer_box_1.ComposerBox, { placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('ta.composer.label'), onSend: async (text, attached) => {
56
56
  const limits = typeof images === 'object' ? images : undefined;
57
57
  await onSend(text, limits ? await Promise.all(attached.map(image => image_shrink_1.ImageShrink.shrink(image, limits))) : attached);
58
- }, images: !!images, commands: listed, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
58
+ }, images: !!images, emoji: emoji, autoFocus: autoFocus, commands: listed, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
59
59
  ? {
60
60
  items: composer_1.ComposerUtil.commands(mentions, query).map(mention => ({
61
61
  key: mention.name,
@@ -0,0 +1,32 @@
1
+ import type { WebFileSaved as FileSaveResult } from '../extension/web-api-desktop';
2
+ /** What the page asks the Ta app: TaSave.swift of apps/ta-mobile on iOS, MainActivity.java on Android. */
3
+ export interface FileSaveMessage {
4
+ id: string;
5
+ action: 'begin' | 'chunk' | 'end';
6
+ /** `begin`: the name of the file, its type. */
7
+ name?: string;
8
+ type?: string;
9
+ /** `chunk`: the next bytes, in base64. */
10
+ data?: string;
11
+ }
12
+ /**
13
+ * Files kept on a phone as its system keeps them, where a browser's download does nothing (the web view of the Ta
14
+ * app has none): on iOS pictures and videos go to the album, other files to Files where the user picks; on Android
15
+ * everything goes to Downloads. The bytes go to the app in pieces, which it writes to a file of its own before it
16
+ * keeps it. Elsewhere (a browser, Ta Desktop) there is none: the page downloads as browsers do.
17
+ */
18
+ export declare namespace FileSave {
19
+ const EVENT = "ta-save";
20
+ /** The bytes of one message: a multiple of 3, so that each piece is base64 of its own, without padding inside. */
21
+ const CHUNK_BYTES: number;
22
+ /** Whether the device keeps files itself here: in the Ta app on iOS and Android. */
23
+ function available(): boolean;
24
+ /** Base64 of bytes, a piece at a time: `String.fromCharCode` takes only so many arguments. */
25
+ function base64(bytes: Uint8Array): string;
26
+ /**
27
+ * Keeps `file` on the device as `name`. Not timed out: the user takes the time they need in Files. Rejects when
28
+ * the app could not write or keep it; resolves `cancelled` in a browser.
29
+ */
30
+ function save(file: Blob, name: string): Promise<FileSaveResult>;
31
+ }
32
+ //# sourceMappingURL=file-save.d.ts.map
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileSave = void 0;
4
+ /**
5
+ * Files kept on a phone as its system keeps them, where a browser's download does nothing (the web view of the Ta
6
+ * app has none): on iOS pictures and videos go to the album, other files to Files where the user picks; on Android
7
+ * everything goes to Downloads. The bytes go to the app in pieces, which it writes to a file of its own before it
8
+ * keeps it. Elsewhere (a browser, Ta Desktop) there is none: the page downloads as browsers do.
9
+ */
10
+ var FileSave;
11
+ (function (FileSave) {
12
+ FileSave.EVENT = 'ta-save';
13
+ /** The bytes of one message: a multiple of 3, so that each piece is base64 of its own, without padding inside. */
14
+ FileSave.CHUNK_BYTES = 3 * 256 * 1024;
15
+ let next = 0;
16
+ function native() {
17
+ var _a, _b;
18
+ const scope = globalThis;
19
+ const ios = (_b = (_a = scope.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taSave;
20
+ if (ios) {
21
+ return { post: message => ios.postMessage(message) };
22
+ }
23
+ const android = scope.taSaveAndroid;
24
+ return android ? { post: message => android.post(JSON.stringify(message)) } : undefined;
25
+ }
26
+ /** Whether the device keeps files itself here: in the Ta app on iOS and Android. */
27
+ function available() {
28
+ return native() !== undefined;
29
+ }
30
+ FileSave.available = available;
31
+ /** Base64 of bytes, a piece at a time: `String.fromCharCode` takes only so many arguments. */
32
+ function base64(bytes) {
33
+ let text = '';
34
+ for (let start = 0; start < bytes.length; start += 0x8000) {
35
+ text += String.fromCharCode(...bytes.subarray(start, start + 0x8000));
36
+ }
37
+ return btoa(text);
38
+ }
39
+ FileSave.base64 = base64;
40
+ /**
41
+ * Keeps `file` on the device as `name`. Not timed out: the user takes the time they need in Files. Rejects when
42
+ * the app could not write or keep it; resolves `cancelled` in a browser.
43
+ */
44
+ async function save(file, name) {
45
+ const app = native();
46
+ if (!app) {
47
+ return 'cancelled';
48
+ }
49
+ const id = `s${++next}`;
50
+ let onEvent = () => undefined;
51
+ const answer = new Promise((resolve, reject) => {
52
+ onEvent = (event) => {
53
+ const detail = event.detail;
54
+ if ((detail === null || detail === void 0 ? void 0 : detail.id) !== id) {
55
+ return;
56
+ }
57
+ globalThis.removeEventListener(FileSave.EVENT, onEvent);
58
+ if (detail.result) {
59
+ resolve(detail.result);
60
+ }
61
+ else {
62
+ reject(new Error(detail.error || 'The file could not be saved'));
63
+ }
64
+ };
65
+ globalThis.addEventListener(FileSave.EVENT, onEvent);
66
+ });
67
+ try {
68
+ app.post({ id, action: 'begin', name, type: file.type });
69
+ for (let start = 0; start < file.size; start += FileSave.CHUNK_BYTES) {
70
+ const piece = new Uint8Array(await file.slice(start, start + FileSave.CHUNK_BYTES).arrayBuffer());
71
+ app.post({ id, action: 'chunk', data: base64(piece) });
72
+ }
73
+ app.post({ id, action: 'end' });
74
+ }
75
+ catch (error) {
76
+ globalThis.removeEventListener(FileSave.EVENT, onEvent);
77
+ throw error;
78
+ }
79
+ return answer;
80
+ }
81
+ FileSave.save = save;
82
+ })(FileSave || (exports.FileSave = FileSave = {}));
83
+ //# sourceMappingURL=file-save.js.map
@@ -14,6 +14,8 @@ export declare const ChatIcons: React.Context<{
14
14
  }>;
15
15
  /** The avatars that web extensions registered for the sessions of their groups. */
16
16
  export declare const SessionAvatars: React.Context<Record<string, React.ComponentType<import("./web-extension-api").WebAvatarProps>>>;
17
+ /** The group of the conversations calls are answered in (WebExtensionsState.callGroup): shown as the record of a call. */
18
+ export declare const CallGroup: React.Context<string | undefined>;
17
19
  /** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
18
20
  export declare const SessionMenus: React.Context<import("./web-api-menus").WebSessionMenu[]>;
19
21
  /** The web extensions loaded: what a message one of their packages sent as the user calls it (TaMessageSource). */