@celljs/ta-web 4.49.0 → 4.50.1

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 (400) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/account/account-side.js +4 -0
  4. package/esm/browser/account/device-account.d.ts +6 -0
  5. package/esm/browser/account/device-account.js +20 -5
  6. package/esm/browser/assistant/assistant-view.js +2 -0
  7. package/esm/browser/assistant/call-announcing.d.ts +25 -0
  8. package/esm/browser/assistant/call-announcing.js +32 -0
  9. package/esm/browser/assistant/call-answering.d.ts +43 -0
  10. package/esm/browser/assistant/call-answering.js +63 -0
  11. package/esm/browser/assistant/call-hearing.d.ts +53 -0
  12. package/esm/browser/assistant/call-hearing.js +98 -0
  13. package/esm/browser/assistant/call-pausing.d.ts +40 -0
  14. package/esm/browser/assistant/call-pausing.js +82 -0
  15. package/esm/browser/assistant/call-reading.d.ts +32 -0
  16. package/esm/browser/assistant/call-reading.js +35 -0
  17. package/esm/browser/assistant/call-revoicing.d.ts +33 -0
  18. package/esm/browser/assistant/call-revoicing.js +68 -0
  19. package/esm/browser/assistant/call-turns.d.ts +29 -0
  20. package/esm/browser/assistant/call-turns.js +33 -0
  21. package/esm/browser/assistant/spoken-answer.d.ts +21 -0
  22. package/esm/browser/assistant/spoken-answer.js +69 -0
  23. package/esm/browser/assistant/spoken-call.d.ts +7 -0
  24. package/esm/browser/assistant/spoken-call.js +16 -0
  25. package/esm/browser/assistant/voice-call-protocol.d.ts +5 -0
  26. package/esm/browser/assistant/voice-call.d.ts +47 -43
  27. package/esm/browser/assistant/voice-call.js +193 -219
  28. package/esm/browser/chat/chat-view.js +2 -1
  29. package/esm/browser/components/account-menu.js +1 -1
  30. package/esm/browser/components/account-recovery-view.d.ts +11 -0
  31. package/esm/browser/components/account-recovery-view.js +81 -0
  32. package/esm/browser/components/account-view.d.ts +1 -2
  33. package/esm/browser/components/account-view.js +10 -1
  34. package/esm/browser/components/app-nav.js +19 -8
  35. package/esm/browser/components/app-shell-hooks.d.ts +5 -0
  36. package/esm/browser/components/app-shell-hooks.js +45 -0
  37. package/esm/browser/components/app-shell-state.js +2 -1
  38. package/esm/browser/components/app-update-view.js +4 -4
  39. package/esm/browser/components/app-view.js +9 -5
  40. package/esm/browser/components/chat-emoji.d.ts +35 -0
  41. package/esm/browser/components/chat-emoji.js +129 -0
  42. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  43. package/esm/browser/components/composer-attachments.d.ts +6 -0
  44. package/esm/browser/components/composer-attachments.js +12 -1
  45. package/esm/browser/components/composer-box-protocol.d.ts +15 -0
  46. package/esm/browser/components/composer-box.js +110 -87
  47. package/esm/browser/components/composer-drop-hooks.d.ts +26 -0
  48. package/esm/browser/components/composer-drop-hooks.js +36 -0
  49. package/esm/browser/components/composer-emoji.js +1 -1
  50. package/esm/browser/components/composer-faces.d.ts +16 -0
  51. package/esm/browser/components/composer-faces.js +37 -0
  52. package/esm/browser/components/composer-media.d.ts +10 -0
  53. package/esm/browser/components/composer-media.js +12 -1
  54. package/esm/browser/components/composer-target.d.ts +4 -0
  55. package/esm/browser/components/composer-target.js +18 -7
  56. package/esm/browser/components/composer-type-focus.d.ts +24 -0
  57. package/esm/browser/components/composer-type-focus.js +17 -0
  58. package/esm/browser/components/composer-voice.d.ts +24 -0
  59. package/esm/browser/components/composer-voice.js +37 -0
  60. package/esm/browser/components/composer.d.ts +2 -2
  61. package/esm/browser/components/composer.js +39 -8
  62. package/esm/browser/components/context-menu.js +2 -1
  63. package/esm/browser/components/emoji-panel.d.ts +11 -7
  64. package/esm/browser/components/emoji-panel.js +40 -22
  65. package/esm/browser/components/extension-settings.js +2 -2
  66. package/esm/browser/components/folder-new.d.ts +18 -0
  67. package/esm/browser/components/folder-new.js +53 -0
  68. package/esm/browser/components/folder-picker.d.ts +5 -2
  69. package/esm/browser/components/folder-picker.js +18 -6
  70. package/esm/browser/components/host-view.d.ts +1 -1
  71. package/esm/browser/components/image-menu.d.ts +8 -3
  72. package/esm/browser/components/image-menu.js +34 -9
  73. package/esm/browser/components/markdown.js +9 -2
  74. package/esm/browser/components/media.js +3 -2
  75. package/esm/browser/components/message-list.js +2 -2
  76. package/esm/browser/components/message-steps.js +20 -11
  77. package/esm/browser/components/message-user.js +2 -2
  78. package/esm/browser/components/moved-notice.js +2 -1
  79. package/esm/browser/components/nav-places.d.ts +2 -0
  80. package/esm/browser/components/nav-places.js +4 -2
  81. package/esm/browser/components/phone-shell.d.ts +2 -0
  82. package/esm/browser/components/phone-shell.js +5 -1
  83. package/esm/browser/components/secret-text.d.ts +1 -1
  84. package/esm/browser/components/secret-text.js +4 -3
  85. package/esm/browser/components/session-view.js +3 -0
  86. package/esm/browser/components/settings-choices.d.ts +2 -1
  87. package/esm/browser/components/settings-choices.js +13 -5
  88. package/esm/browser/components/settings-more.js +3 -3
  89. package/esm/browser/components/settings-parts.js +13 -2
  90. package/esm/browser/components/share-item-sheet.js +7 -1
  91. package/esm/browser/components/tab-title.d.ts +27 -0
  92. package/esm/browser/components/tab-title.js +35 -0
  93. package/esm/browser/components/use-composer-attachments.d.ts +28 -0
  94. package/esm/browser/components/use-composer-attachments.js +65 -0
  95. package/esm/browser/components/use-composer-files.d.ts +25 -0
  96. package/esm/browser/components/use-composer-files.js +52 -0
  97. package/esm/browser/components/web-composer.d.ts +3 -1
  98. package/esm/browser/components/web-composer.js +3 -2
  99. package/esm/browser/components/workbench-view.js +1 -0
  100. package/esm/browser/components/working-directory.js +2 -1
  101. package/esm/browser/device/app-update.d.ts +6 -3
  102. package/esm/browser/device/app-update.js +11 -5
  103. package/esm/browser/device/drag-move.d.ts +21 -0
  104. package/esm/browser/device/drag-move.js +86 -0
  105. package/esm/browser/extension/icons.js +7 -1
  106. package/esm/browser/extension/web-api-desktop.d.ts +19 -0
  107. package/esm/browser/extension/web-api-menus.d.ts +19 -0
  108. package/esm/browser/extension/web-api-spec.js +2 -0
  109. package/esm/browser/extension/web-extension-api.d.ts +24 -23
  110. package/esm/browser/extension/web-extension-context.d.ts +1 -0
  111. package/esm/browser/extension/web-extension-context.js +12 -5
  112. package/esm/browser/extension/web-extension-run.js +1 -0
  113. package/esm/browser/extension/web-share-ui.d.ts +1 -1
  114. package/esm/browser/extension/web-share-ui.js +2 -0
  115. package/esm/browser/extension/web-share.d.ts +13 -0
  116. package/esm/browser/extension/web-share.js +37 -2
  117. package/esm/browser/i18n/en/account.d.ts +18 -0
  118. package/esm/browser/i18n/en/account.js +18 -0
  119. package/esm/browser/i18n/en/call.js +1 -1
  120. package/esm/browser/i18n/en/chat.d.ts +15 -0
  121. package/esm/browser/i18n/en/chat.js +16 -1
  122. package/esm/browser/i18n/en/common.d.ts +2 -0
  123. package/esm/browser/i18n/en/common.js +2 -0
  124. package/esm/browser/i18n/en/discover.d.ts +2 -0
  125. package/esm/browser/i18n/en/discover.js +2 -0
  126. package/esm/browser/i18n/en/service.d.ts +4 -0
  127. package/esm/browser/i18n/en/service.js +4 -0
  128. package/esm/browser/i18n/en/settings.d.ts +17 -0
  129. package/esm/browser/i18n/en/settings.js +17 -0
  130. package/esm/browser/i18n/ja/account.js +18 -0
  131. package/esm/browser/i18n/ja/call.js +1 -1
  132. package/esm/browser/i18n/ja/chat.js +16 -1
  133. package/esm/browser/i18n/ja/common.js +2 -0
  134. package/esm/browser/i18n/ja/discover.js +3 -1
  135. package/esm/browser/i18n/ja/service.js +4 -0
  136. package/esm/browser/i18n/ja/settings.js +17 -0
  137. package/esm/browser/i18n/locales.d.ts +59 -1
  138. package/esm/browser/i18n/messages.d.ts +58 -0
  139. package/esm/browser/i18n/zh/account.js +18 -0
  140. package/esm/browser/i18n/zh/call.js +1 -1
  141. package/esm/browser/i18n/zh/chat.js +16 -1
  142. package/esm/browser/i18n/zh/common.js +2 -0
  143. package/esm/browser/i18n/zh/discover.js +3 -1
  144. package/esm/browser/i18n/zh/service.js +4 -0
  145. package/esm/browser/i18n/zh/settings.js +17 -0
  146. package/esm/browser/i18n/zh-tw/account.js +18 -0
  147. package/esm/browser/i18n/zh-tw/call.js +1 -1
  148. package/esm/browser/i18n/zh-tw/chat.js +16 -1
  149. package/esm/browser/i18n/zh-tw/common.js +2 -0
  150. package/esm/browser/i18n/zh-tw/discover.js +3 -1
  151. package/esm/browser/i18n/zh-tw/service.js +4 -0
  152. package/esm/browser/i18n/zh-tw/settings.js +17 -0
  153. package/esm/browser/offline/kept-chats.d.ts +3 -1
  154. package/esm/browser/offline/kept-chats.js +1 -1
  155. package/esm/browser/partners/group-picker.d.ts +3 -2
  156. package/esm/browser/partners/group-picker.js +8 -3
  157. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  158. package/esm/browser/sandbox/work/work-docs.js +5 -2
  159. package/esm/browser/sandbox/work/work-frame.d.ts +3 -0
  160. package/esm/browser/sandbox/work/work-frame.js +9 -3
  161. package/esm/browser/sandbox/work/work-gates.d.ts +77 -0
  162. package/esm/browser/sandbox/work/work-gates.js +182 -0
  163. package/esm/browser/settings/agent-settings.js +1 -1
  164. package/esm/browser/settings/navigation.d.ts +38 -10
  165. package/esm/browser/settings/navigation.js +73 -17
  166. package/esm/browser/settings/settings-protocol.d.ts +16 -1
  167. package/esm/browser/settings/settings-protocol.js +20 -2
  168. package/esm/browser/settings/settings.js +4 -1
  169. package/esm/browser/style/base.d.ts +1 -1
  170. package/esm/browser/style/base.js +15 -2
  171. package/esm/browser/style/chat-list.d.ts +1 -1
  172. package/esm/browser/style/chat-list.js +6 -3
  173. package/esm/browser/style/conversation-column.d.ts +1 -1
  174. package/esm/browser/style/conversation-column.js +28 -8
  175. package/esm/browser/style/conversation.d.ts +1 -1
  176. package/esm/browser/style/conversation.js +5 -0
  177. package/esm/browser/style/device.js +5 -0
  178. package/esm/browser/style/pages.d.ts +1 -1
  179. package/esm/browser/style/pages.js +3 -3
  180. package/esm/browser/style/shell.d.ts +1 -1
  181. package/esm/browser/style/shell.js +13 -6
  182. package/esm/browser/style/tasks.d.ts +1 -1
  183. package/esm/browser/style/tasks.js +4 -2
  184. package/esm/browser/util/chat-emoji.d.ts +44 -0
  185. package/esm/browser/util/chat-emoji.js +269 -0
  186. package/esm/browser/util/composer-drop.d.ts +26 -0
  187. package/esm/browser/util/composer-drop.js +40 -0
  188. package/esm/browser/util/composer-files.d.ts +48 -0
  189. package/esm/browser/util/composer-files.js +99 -0
  190. package/esm/browser/util/composer.d.ts +13 -1
  191. package/esm/browser/util/composer.js +24 -6
  192. package/esm/browser/util/markdown.d.ts +5 -0
  193. package/esm/browser/util/markdown.js +18 -0
  194. package/esm/browser/util/message.d.ts +6 -1
  195. package/esm/browser/util/message.js +13 -2
  196. package/esm/browser/util/process.d.ts +10 -13
  197. package/esm/browser/util/process.js +31 -83
  198. package/esm/browser/util/turn-join.d.ts +38 -0
  199. package/esm/browser/util/turn-join.js +119 -0
  200. package/esm/browser/workbench-services.js +1 -1
  201. package/lib/browser/account/account-side.js +4 -0
  202. package/lib/browser/account/device-account.d.ts +6 -0
  203. package/lib/browser/account/device-account.js +20 -5
  204. package/lib/browser/assistant/assistant-view.js +2 -0
  205. package/lib/browser/assistant/call-announcing.d.ts +26 -0
  206. package/lib/browser/assistant/call-announcing.js +36 -0
  207. package/lib/browser/assistant/call-answering.d.ts +44 -0
  208. package/lib/browser/assistant/call-answering.js +67 -0
  209. package/lib/browser/assistant/call-hearing.d.ts +54 -0
  210. package/lib/browser/assistant/call-hearing.js +102 -0
  211. package/lib/browser/assistant/call-pausing.d.ts +41 -0
  212. package/lib/browser/assistant/call-pausing.js +86 -0
  213. package/lib/browser/assistant/call-reading.d.ts +33 -0
  214. package/lib/browser/assistant/call-reading.js +39 -0
  215. package/lib/browser/assistant/call-revoicing.d.ts +34 -0
  216. package/lib/browser/assistant/call-revoicing.js +72 -0
  217. package/lib/browser/assistant/call-turns.d.ts +30 -0
  218. package/lib/browser/assistant/call-turns.js +37 -0
  219. package/lib/browser/assistant/spoken-answer.d.ts +22 -0
  220. package/lib/browser/assistant/spoken-answer.js +73 -0
  221. package/lib/browser/assistant/spoken-call.d.ts +8 -0
  222. package/lib/browser/assistant/spoken-call.js +19 -0
  223. package/lib/browser/assistant/voice-call-protocol.d.ts +5 -0
  224. package/lib/browser/assistant/voice-call.d.ts +47 -43
  225. package/lib/browser/assistant/voice-call.js +192 -218
  226. package/lib/browser/chat/chat-view.js +2 -1
  227. package/lib/browser/components/account-menu.js +1 -1
  228. package/lib/browser/components/account-recovery-view.d.ts +12 -0
  229. package/lib/browser/components/account-recovery-view.js +117 -0
  230. package/lib/browser/components/account-view.d.ts +1 -2
  231. package/lib/browser/components/account-view.js +10 -1
  232. package/lib/browser/components/app-nav.js +19 -8
  233. package/lib/browser/components/app-shell-hooks.d.ts +5 -0
  234. package/lib/browser/components/app-shell-hooks.js +46 -0
  235. package/lib/browser/components/app-shell-state.js +1 -0
  236. package/lib/browser/components/app-update-view.js +4 -4
  237. package/lib/browser/components/app-view.js +8 -4
  238. package/lib/browser/components/chat-emoji.d.ts +36 -0
  239. package/lib/browser/components/chat-emoji.js +167 -0
  240. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  241. package/lib/browser/components/composer-attachments.d.ts +6 -0
  242. package/lib/browser/components/composer-attachments.js +12 -0
  243. package/lib/browser/components/composer-box-protocol.d.ts +15 -0
  244. package/lib/browser/components/composer-box.js +107 -84
  245. package/lib/browser/components/composer-drop-hooks.d.ts +27 -0
  246. package/lib/browser/components/composer-drop-hooks.js +72 -0
  247. package/lib/browser/components/composer-emoji.js +1 -1
  248. package/lib/browser/components/composer-faces.d.ts +17 -0
  249. package/lib/browser/components/composer-faces.js +73 -0
  250. package/lib/browser/components/composer-media.d.ts +10 -0
  251. package/lib/browser/components/composer-media.js +13 -0
  252. package/lib/browser/components/composer-target.d.ts +4 -0
  253. package/lib/browser/components/composer-target.js +18 -7
  254. package/lib/browser/components/composer-type-focus.d.ts +25 -0
  255. package/lib/browser/components/composer-type-focus.js +20 -0
  256. package/lib/browser/components/composer-voice.d.ts +25 -0
  257. package/lib/browser/components/composer-voice.js +73 -0
  258. package/lib/browser/components/composer.d.ts +2 -2
  259. package/lib/browser/components/composer.js +38 -7
  260. package/lib/browser/components/context-menu.js +2 -1
  261. package/lib/browser/components/emoji-panel.d.ts +11 -7
  262. package/lib/browser/components/emoji-panel.js +40 -22
  263. package/lib/browser/components/extension-settings.js +1 -1
  264. package/lib/browser/components/folder-new.d.ts +19 -0
  265. package/lib/browser/components/folder-new.js +90 -0
  266. package/lib/browser/components/folder-picker.d.ts +5 -2
  267. package/lib/browser/components/folder-picker.js +17 -5
  268. package/lib/browser/components/host-view.d.ts +1 -1
  269. package/lib/browser/components/image-menu.d.ts +8 -3
  270. package/lib/browser/components/image-menu.js +34 -9
  271. package/lib/browser/components/markdown.js +9 -2
  272. package/lib/browser/components/media.js +3 -2
  273. package/lib/browser/components/message-list.js +2 -2
  274. package/lib/browser/components/message-steps.js +20 -11
  275. package/lib/browser/components/message-user.js +1 -1
  276. package/lib/browser/components/moved-notice.js +2 -1
  277. package/lib/browser/components/nav-places.d.ts +2 -0
  278. package/lib/browser/components/nav-places.js +4 -2
  279. package/lib/browser/components/phone-shell.d.ts +2 -0
  280. package/lib/browser/components/phone-shell.js +5 -1
  281. package/lib/browser/components/secret-text.d.ts +1 -1
  282. package/lib/browser/components/secret-text.js +4 -3
  283. package/lib/browser/components/session-view.js +3 -0
  284. package/lib/browser/components/settings-choices.d.ts +2 -1
  285. package/lib/browser/components/settings-choices.js +12 -4
  286. package/lib/browser/components/settings-more.js +2 -2
  287. package/lib/browser/components/settings-parts.js +11 -0
  288. package/lib/browser/components/share-item-sheet.js +7 -1
  289. package/lib/browser/components/tab-title.d.ts +28 -0
  290. package/lib/browser/components/tab-title.js +38 -0
  291. package/lib/browser/components/use-composer-attachments.d.ts +29 -0
  292. package/lib/browser/components/use-composer-attachments.js +101 -0
  293. package/lib/browser/components/use-composer-files.d.ts +26 -0
  294. package/lib/browser/components/use-composer-files.js +88 -0
  295. package/lib/browser/components/web-composer.d.ts +3 -1
  296. package/lib/browser/components/web-composer.js +3 -2
  297. package/lib/browser/components/workbench-view.js +1 -0
  298. package/lib/browser/components/working-directory.js +2 -1
  299. package/lib/browser/device/app-update.d.ts +6 -3
  300. package/lib/browser/device/app-update.js +11 -5
  301. package/lib/browser/device/drag-move.d.ts +22 -0
  302. package/lib/browser/device/drag-move.js +122 -0
  303. package/lib/browser/extension/icons.js +6 -0
  304. package/lib/browser/extension/web-api-desktop.d.ts +19 -0
  305. package/lib/browser/extension/web-api-menus.d.ts +19 -0
  306. package/lib/browser/extension/web-api-spec.js +2 -0
  307. package/lib/browser/extension/web-extension-api.d.ts +24 -23
  308. package/lib/browser/extension/web-extension-context.d.ts +1 -0
  309. package/lib/browser/extension/web-extension-context.js +12 -5
  310. package/lib/browser/extension/web-extension-run.js +1 -0
  311. package/lib/browser/extension/web-share-ui.d.ts +1 -1
  312. package/lib/browser/extension/web-share-ui.js +2 -0
  313. package/lib/browser/extension/web-share.d.ts +13 -0
  314. package/lib/browser/extension/web-share.js +37 -2
  315. package/lib/browser/i18n/en/account.d.ts +18 -0
  316. package/lib/browser/i18n/en/account.js +18 -0
  317. package/lib/browser/i18n/en/call.js +1 -1
  318. package/lib/browser/i18n/en/chat.d.ts +15 -0
  319. package/lib/browser/i18n/en/chat.js +16 -1
  320. package/lib/browser/i18n/en/common.d.ts +2 -0
  321. package/lib/browser/i18n/en/common.js +2 -0
  322. package/lib/browser/i18n/en/discover.d.ts +2 -0
  323. package/lib/browser/i18n/en/discover.js +2 -0
  324. package/lib/browser/i18n/en/service.d.ts +4 -0
  325. package/lib/browser/i18n/en/service.js +4 -0
  326. package/lib/browser/i18n/en/settings.d.ts +17 -0
  327. package/lib/browser/i18n/en/settings.js +17 -0
  328. package/lib/browser/i18n/ja/account.js +18 -0
  329. package/lib/browser/i18n/ja/call.js +1 -1
  330. package/lib/browser/i18n/ja/chat.js +16 -1
  331. package/lib/browser/i18n/ja/common.js +2 -0
  332. package/lib/browser/i18n/ja/discover.js +3 -1
  333. package/lib/browser/i18n/ja/service.js +4 -0
  334. package/lib/browser/i18n/ja/settings.js +17 -0
  335. package/lib/browser/i18n/locales.d.ts +59 -1
  336. package/lib/browser/i18n/messages.d.ts +58 -0
  337. package/lib/browser/i18n/zh/account.js +18 -0
  338. package/lib/browser/i18n/zh/call.js +1 -1
  339. package/lib/browser/i18n/zh/chat.js +16 -1
  340. package/lib/browser/i18n/zh/common.js +2 -0
  341. package/lib/browser/i18n/zh/discover.js +3 -1
  342. package/lib/browser/i18n/zh/service.js +4 -0
  343. package/lib/browser/i18n/zh/settings.js +17 -0
  344. package/lib/browser/i18n/zh-tw/account.js +18 -0
  345. package/lib/browser/i18n/zh-tw/call.js +1 -1
  346. package/lib/browser/i18n/zh-tw/chat.js +16 -1
  347. package/lib/browser/i18n/zh-tw/common.js +2 -0
  348. package/lib/browser/i18n/zh-tw/discover.js +3 -1
  349. package/lib/browser/i18n/zh-tw/service.js +4 -0
  350. package/lib/browser/i18n/zh-tw/settings.js +17 -0
  351. package/lib/browser/offline/kept-chats.d.ts +3 -1
  352. package/lib/browser/offline/kept-chats.js +1 -1
  353. package/lib/browser/partners/group-picker.d.ts +3 -2
  354. package/lib/browser/partners/group-picker.js +8 -3
  355. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  356. package/lib/browser/sandbox/work/work-docs.js +5 -2
  357. package/lib/browser/sandbox/work/work-frame.d.ts +3 -0
  358. package/lib/browser/sandbox/work/work-frame.js +9 -3
  359. package/lib/browser/sandbox/work/work-gates.d.ts +78 -0
  360. package/lib/browser/sandbox/work/work-gates.js +185 -0
  361. package/lib/browser/settings/agent-settings.js +1 -1
  362. package/lib/browser/settings/navigation.d.ts +38 -10
  363. package/lib/browser/settings/navigation.js +74 -18
  364. package/lib/browser/settings/settings-protocol.d.ts +16 -1
  365. package/lib/browser/settings/settings-protocol.js +21 -3
  366. package/lib/browser/settings/settings.js +3 -0
  367. package/lib/browser/style/base.d.ts +1 -1
  368. package/lib/browser/style/base.js +15 -2
  369. package/lib/browser/style/chat-list.d.ts +1 -1
  370. package/lib/browser/style/chat-list.js +6 -3
  371. package/lib/browser/style/conversation-column.d.ts +1 -1
  372. package/lib/browser/style/conversation-column.js +28 -8
  373. package/lib/browser/style/conversation.d.ts +1 -1
  374. package/lib/browser/style/conversation.js +5 -0
  375. package/lib/browser/style/device.js +5 -0
  376. package/lib/browser/style/pages.d.ts +1 -1
  377. package/lib/browser/style/pages.js +3 -3
  378. package/lib/browser/style/shell.d.ts +1 -1
  379. package/lib/browser/style/shell.js +13 -6
  380. package/lib/browser/style/tasks.d.ts +1 -1
  381. package/lib/browser/style/tasks.js +4 -2
  382. package/lib/browser/util/chat-emoji.d.ts +45 -0
  383. package/lib/browser/util/chat-emoji.js +272 -0
  384. package/lib/browser/util/composer-drop.d.ts +27 -0
  385. package/lib/browser/util/composer-drop.js +43 -0
  386. package/lib/browser/util/composer-files.d.ts +49 -0
  387. package/lib/browser/util/composer-files.js +102 -0
  388. package/lib/browser/util/composer.d.ts +13 -1
  389. package/lib/browser/util/composer.js +24 -6
  390. package/lib/browser/util/markdown.d.ts +5 -0
  391. package/lib/browser/util/markdown.js +18 -0
  392. package/lib/browser/util/message.d.ts +6 -1
  393. package/lib/browser/util/message.js +13 -2
  394. package/lib/browser/util/process.d.ts +10 -13
  395. package/lib/browser/util/process.js +32 -84
  396. package/lib/browser/util/turn-join.d.ts +39 -0
  397. package/lib/browser/util/turn-join.js +122 -0
  398. package/lib/browser/workbench-services.js +1 -1
  399. package/package.json +7 -7
  400. package/public/emoji/wechat-v1.webp +0 -0
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { BackLayerContext, useBackLayer, useNoBackLayer } from '../device/back-stack.js';
3
3
  import { useDevice } from '../device/device.js';
4
4
  import { DeviceMotion } from '../device/device-protocol.js';
5
+ import { useDragMove } from '../device/drag-move.js';
5
6
  import { useHeld } from '../device/hold.js';
6
7
  import { usePullDown } from '../device/pull-down.js';
7
8
  import { useSheetSwipe } from '../device/sheet-swipe.js';
@@ -226,6 +227,8 @@ function TabBar({ tabs, tab, onTab }) {
226
227
  const t = useT();
227
228
  const [menu, openMenu] = useContextMenu();
228
229
  const held = useHeld();
230
+ // A page of the navigation dragged among the tabs, as on the rail: held by a finger first, then it follows.
231
+ const drag = useDragMove({ attr: 'data-nav-page', onMove: (page, target) => { var _a, _b; return (_b = (_a = tabs.find(item => item.move)) === null || _a === void 0 ? void 0 : _a.move) === null || _b === void 0 ? void 0 : _b.call(_a, page, target); } });
229
232
  // The tab shown tapped again: to the next row with a dot, as WeChat's; tapped twice quickly, to the top.
230
233
  const lastTap = React.useRef({ id: '', at: 0 });
231
234
  const again = (id, home) => {
@@ -238,9 +241,10 @@ function TabBar({ tabs, tab, onTab }) {
238
241
  };
239
242
  return (React.createElement("nav", { className: "ta-tabbar", "aria-label": t('ta.menu') },
240
243
  tabs.map(item => {
244
+ var _a;
241
245
  const Glyph = item.icon;
242
246
  const active = item.id === tab;
243
- return (React.createElement("button", { key: item.id, type: "button", className: `ta-tabbar-item${active ? ' ta-active' : ''}`, "aria-current": active ? 'page' : undefined, onClick: event => (active ? again(item.id, event.currentTarget.closest('.ta-phone-home')) : onTab(item.id)), onContextMenu: item.menu ? event => { var _a; return openMenu(event, (_a = item.menu) !== null && _a !== void 0 ? _a : []); } : undefined, ...held(item.hold) },
247
+ return (React.createElement("button", { key: item.id, type: "button", className: `ta-tabbar-item${active ? ' ta-active' : ''}${((_a = drag.dragging) === null || _a === void 0 ? void 0 : _a.page) === item.id ? ' ta-dragged' : ''}`, "aria-current": active ? 'page' : undefined, "data-nav-page": item.move ? item.id : undefined, onClick: event => (active ? again(item.id, event.currentTarget.closest('.ta-phone-home')) : onTab(item.id)), onContextMenu: item.menu ? event => { var _a; return openMenu(event, (_a = item.menu) !== null && _a !== void 0 ? _a : []); } : undefined, onPointerDown: item.move ? drag.onPointerDown : undefined, ...held(item.hold) },
244
248
  React.createElement("span", { className: "ta-tabbar-icon" },
245
249
  item.double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 22, strokeWidth: active ? 2 : 1.6 }),
246
250
  item.count ? (React.createElement(PeopleBadge, { count: item.count, onDismiss: item.onSeeAll })) : item.asks ? (React.createElement(AsksBadge, { count: item.asks, onDismiss: item.onSeeAll })) : (item.unseen && React.createElement(UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: item.onSeeAll }))),
@@ -35,7 +35,7 @@ export declare function SecretChip({ name, kind }: {
35
35
  name: string;
36
36
  kind: TaSecretKind;
37
37
  }): React.JSX.Element;
38
- /** Words with the names of the vault in them drawn as {@link SecretChip}; the words alone as they are. */
38
+ /** Words with the names of the vault in them drawn as {@link SecretChip}, and the faces of a chat (`[微笑]`) as theirs. */
39
39
  export declare function SecretText({ text }: {
40
40
  text: string;
41
41
  }): React.JSX.Element;
@@ -2,6 +2,7 @@ import { TaSecretRef } from '@celljs/ta-protocol';
2
2
  import { LockKeyhole } from 'lucide-react';
3
3
  import * as React from 'react';
4
4
  import { useT } from '../i18n/use-t.js';
5
+ import { EmojiText } from './chat-emoji.js';
5
6
  import { useContextMenu } from './context-menu.js';
6
7
  import { Icon } from './icon.js';
7
8
  export const SecretPeeks = React.createContext(undefined);
@@ -70,11 +71,11 @@ export function SecretChip({ name, kind }) {
70
71
  React.createElement("button", { type: "button", className: "ta-secret-chip", title: t('ta.secret.title'), "aria-haspopup": "menu", onClick: open }, content),
71
72
  menu));
72
73
  }
73
- /** Words with the names of the vault in them drawn as {@link SecretChip}; the words alone as they are. */
74
+ /** Words with the names of the vault in them drawn as {@link SecretChip}, and the faces of a chat (`[微笑]`) as theirs. */
74
75
  export function SecretText({ text }) {
75
76
  if (!TaSecretRef.has(text)) {
76
- return React.createElement(React.Fragment, null, text);
77
+ return React.createElement(EmojiText, { text: text });
77
78
  }
78
- return (React.createElement(React.Fragment, null, TaSecretRef.split(text).map((part, index) => 'secret' in part ? React.createElement(SecretChip, { key: index, name: part.secret, kind: part.kind }) : React.createElement(React.Fragment, { key: index }, part.text))));
79
+ return (React.createElement(React.Fragment, null, TaSecretRef.split(text).map((part, index) => 'secret' in part ? React.createElement(SecretChip, { key: index, name: part.secret, kind: part.kind }) : React.createElement(EmojiText, { key: index, text: part.text }))));
79
80
  }
80
81
  //# sourceMappingURL=secret-text.js.map
@@ -3,6 +3,7 @@ import { TA_OWNER } from '@celljs/ta-protocol';
3
3
  import { ArrowDown, TextSearch } from 'lucide-react';
4
4
  import * as React from 'react';
5
5
  import { CallFace } from '../assistant/call-face.js';
6
+ import { answerSpoken } from '../assistant/spoken-call.js';
6
7
  import { CallBar, callAction, callEndedNotice, dialogAnnouncements, talkCall, useCallAnnouncements, useCallTurns, useTalkCalls, useVoiceCall, videoCallAction, } from '../assistant/voice-call-bar.js';
7
8
  import { useKeyboardDismiss } from '../device/device.js';
8
9
  import { DraftPlaces } from '../drafts/drafts-protocol.js';
@@ -161,6 +162,8 @@ export function SessionView({ store, server, workspace, info, onClosed, onActivi
161
162
  language: () => settingsState.language,
162
163
  voice: () => settingsState.settings.voice,
163
164
  send: text => store.prompt(text, { streamingBehavior: 'followUp' }),
165
+ // Said over a call, an answer to what the conversation waits on answers it, rather than going to the model.
166
+ answer: said => answerSpoken(state.pendingUi[0], said, response => store.respondUi(response)),
164
167
  ended: (reason, detail) => notices.notify(callEndedNotice(t, reason, detail)),
165
168
  }, { sessionId: store.sessionId, sessionFile: info === null || info === void 0 ? void 0 : info.sessionFile, cwd: info === null || info === void 0 ? void 0 : info.cwd, double: false }, (info === null || info === void 0 ? void 0 : info.sessionName) || (info === null || info === void 0 ? void 0 : info.firstMessage) || (info ? MessageUtil.basename(info.cwd) : t('ta.session.title')));
166
169
  useCallTurns(call, callState, state.working, MessageUtil.lastReply(state.messages, state.start));
@@ -3,11 +3,12 @@ import { type LucideIcon } from 'lucide-react';
3
3
  import type { WebSettingsGroup } from '../extension/web-extension-api.js';
4
4
  import type { MessageId } from '../i18n/messages.js';
5
5
  import type { useT } from '../i18n/use-t.js';
6
- import { type DiagramStyle, type FontSize, type LanguageSetting, type SkinGlass, type ThemeSetting } from '../settings/settings-protocol.js';
6
+ import { type DiagramStyle, type FontSize, type LanguageSetting, type PageWidth, type SkinGlass, type ThemeSetting } from '../settings/settings-protocol.js';
7
7
  import type { Navigation } from './nav-places.js';
8
8
  import { type Choice, type RowEntry } from './settings-controls.js';
9
9
  export declare const THEMES: Choice<ThemeSetting>[];
10
10
  export declare const FONT_SIZES: Choice<FontSize>[];
11
+ export declare const PAGE_WIDTH_CHOICES: Choice<PageWidth>[];
11
12
  export declare const DIAGRAM_STYLE_CHOICES: Choice<DiagramStyle>[];
12
13
  export declare const GLASS_CHOICES: Choice<SkinGlass>[];
13
14
  export declare const LANGUAGES: Choice<LanguageSetting>[];
@@ -1,11 +1,12 @@
1
1
  import { TaLanguageUtil, TaPackageTextUtil } from '@celljs/ta-protocol';
2
- import { Box, Globe, Layers, MessagesSquare, Monitor, Moon, Puzzle, Sun, Wrench } from 'lucide-react';
2
+ import { Blocks, Box, Globe, Layers, MessagesSquare, Monitor, Moon, Sun, Wrench } from 'lucide-react';
3
3
  import * as React from 'react';
4
4
  import { WEB_ICONS } from '../extension/icons.js';
5
5
  import { WebLabelUtil } from '../extension/web-extension-protocol.js';
6
6
  import { useWebExtensions, useWorkbench } from '../hooks.js';
7
+ import { NavigationUtil } from '../settings/navigation.js';
7
8
  import { DIAGRAM_STYLES, SKIN_GLASSES, } from '../settings/settings-protocol.js';
8
- import { EmptyRow, Row, row, Switch } from './settings-controls.js';
9
+ import { EmptyRow, Row, row, Segmented, Switch } from './settings-controls.js';
9
10
  export const THEMES = [
10
11
  { value: 'system', icon: Monitor, label: 'ta.settings.theme.system' },
11
12
  { value: 'light', icon: Sun, label: 'ta.settings.theme.light' },
@@ -17,6 +18,11 @@ export const FONT_SIZES = [
17
18
  { value: 'large', label: 'ta.settings.fontSize.large' },
18
19
  { value: 'xlarge', label: 'ta.settings.fontSize.xlarge' },
19
20
  ];
21
+ export const PAGE_WIDTH_CHOICES = [
22
+ { value: 'standard', label: 'ta.settings.pageWidth.standard' },
23
+ { value: 'wide', label: 'ta.settings.pageWidth.wide' },
24
+ { value: 'wider', label: 'ta.settings.pageWidth.wider' },
25
+ ];
20
26
  export const DIAGRAM_STYLE_CHOICES = DIAGRAM_STYLES.map(value => ({ value, label: `ta.settings.diagramStyle.${value}` }));
21
27
  export const GLASS_CHOICES = SKIN_GLASSES.map(value => ({ value, label: `ta.settings.glass.${value}` }));
22
28
  export const LANGUAGES = [
@@ -85,15 +91,17 @@ export function navigationRows(navigation, t) {
85
91
  if (navigation.nav.some(page => page.id === id)) {
86
92
  return t('ta.settings.navigation.inNav');
87
93
  }
88
- return t(navigation.setting.pinned.includes(id) ? 'ta.settings.navigation.overflow' : 'ta.settings.navigation.folded');
94
+ return t(NavigationUtil.isPinned(navigation.setting, id) ? 'ta.settings.navigation.overflow' : 'ta.settings.navigation.folded');
89
95
  };
90
96
  return [
97
+ row('nav-tabs', [t('ta.settings.navigation.tabs'), t('ta.settings.navigation.tabsHint')], React.createElement(Row, { label: t('ta.settings.navigation.tabs'), description: t('ta.settings.navigation.tabsHint'), stacked: true },
98
+ React.createElement(Segmented, { label: t('ta.settings.navigation.tabs'), value: String(NavigationUtil.tabs(navigation.setting)), choices: NavigationUtil.PHONE_TABS.map(tabs => ({ value: String(tabs), label: String(tabs) })), onChange: tabs => navigation.update({ ...navigation.setting, tabs: Number(tabs) }) }))),
91
99
  row('all-features', [t('ta.settings.allFeatures'), t('ta.settings.allFeaturesHint'), t('ta.discover.all')], React.createElement(Row, { label: t('ta.settings.allFeatures'), description: t('ta.settings.allFeaturesHint') },
92
100
  React.createElement(Switch, { label: t('ta.settings.allFeatures'), checked: !navigation.first, onChange: navigation.showAll }))),
93
101
  ...navigation.pages.map(page => {
94
102
  const title = WebLabelUtil.text(page.title);
95
103
  return row(`navigation:${page.id}`, [title, t('ta.settings.navigation')], React.createElement(Row, { label: title, description: where(page.id) },
96
- React.createElement(Switch, { label: `${t('ta.settings.navigation.show')} · ${title}`, checked: navigation.setting.pinned.includes(page.id), onChange: on => (on ? navigation.pin(page.id) : navigation.fold(page.id)) })));
104
+ React.createElement(Switch, { label: `${t('ta.settings.navigation.show')} · ${title}`, checked: navigation.nav.some(other => other.id === page.id), onChange: on => (on ? navigation.pin(page.id) : navigation.fold(page.id)) })));
97
105
  }),
98
106
  ...(navigation.pages.length === 0
99
107
  ? [row('navigation:none', [t('ta.settings.navigation.none')], React.createElement(EmptyRow, { title: t('ta.settings.navigation.none') }))]
@@ -106,7 +114,7 @@ export function packageLabel(pkg, language) {
106
114
  return {
107
115
  title: (_a = TaPackageTextUtil.pick(pkg.title, language)) !== null && _a !== void 0 ? _a : pkg.name,
108
116
  summary: (_b = TaPackageTextUtil.pick(pkg.summary, language)) !== null && _b !== void 0 ? _b : pkg.description,
109
- icon: (pkg.icon && WEB_ICONS[pkg.icon]) || Puzzle,
117
+ icon: (pkg.icon && WEB_ICONS[pkg.icon]) || Blocks,
110
118
  };
111
119
  }
112
120
  //# sourceMappingURL=settings-choices.js.map
@@ -1,4 +1,4 @@
1
- import { Blocks, Cloud, FolderOpen, Info, Keyboard, Puzzle, RefreshCw, RotateCw, Server, ShieldCheck, Trash2, Waypoints } from 'lucide-react';
1
+ import { Blocks, Cloud, FolderOpen, Info, Keyboard, RefreshCw, RotateCw, Server, ShieldCheck, Trash2, Waypoints } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import { useAppRows } from '../apps/app-settings.js';
4
4
  import { useDevice } from '../device/device.js';
@@ -83,7 +83,7 @@ export function useMoreSections(onDialog) {
83
83
  {
84
84
  id: 'packages',
85
85
  title: t('ta.packages.installed'),
86
- icon: Puzzle,
86
+ icon: Blocks,
87
87
  group: 'extensions',
88
88
  rows: [
89
89
  row('packages', [t('ta.packages'), t('ta.packages.hint')], React.createElement(Row, { label: t('ta.packages.installed'), description: t('ta.packages.hint') },
@@ -118,7 +118,7 @@ export function useMoreSections(onDialog) {
118
118
  // The console only for administrators of a gateway, where it shows.
119
119
  ...host.builtins
120
120
  .filter(builtin => { var _a; return !builtin.gatewayAdmin || ((_a = gateway.info) === null || _a === void 0 ? void 0 : _a.admin); })
121
- .map(builtin => { var _a; return row(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : Puzzle, label: t(builtin.title), description: t(builtin.description) },
121
+ .map(builtin => { var _a; return row(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : Blocks, label: t(builtin.title), description: t(builtin.description) },
122
122
  React.createElement(Switch, { label: t(builtin.title), checked: !settings.builtinsOff.includes(builtin.name), onChange: on => toggleBuiltin(builtin.name, on) }))); }),
123
123
  ...builtinPackages.map(info => {
124
124
  const { title, summary, icon } = packageLabel(info, language);
@@ -6,7 +6,7 @@ import { WebLabelUtil } from '../extension/web-extension-protocol.js';
6
6
  import { useSettings, useSettingsServer, useWebExtensions, useWorkbench } from '../hooks.js';
7
7
  import { useT } from '../i18n/use-t.js';
8
8
  import { AGENT_SETTINGS_GROUPS, AgentSettingsUtil, QUEUE_SETTINGS, ShortcutUtil } from '../settings/agent-settings.js';
9
- import { CHAT_ARCHIVE_CHOICES, CHAT_FOLD_CHOICES, MAX_TASKS_CHOICES, NO_SKIN, SEND_WHILE_WORKING } from '../settings/settings-protocol.js';
9
+ import { CHAT_ARCHIVE_CHOICES, CHAT_FOLD_CHOICES, MAX_TASKS_CHOICES, NO_SKIN, SEND_WHILE_WORKING, TAB_TITLE_CHARS, } from '../settings/settings-protocol.js';
10
10
  import { SkinUtil } from '../skin/skin-util.js';
11
11
  import { ComposerUtil } from '../util/composer.js';
12
12
  import { Voice } from '../util/voice.js';
@@ -15,7 +15,7 @@ import { useNavigation } from './app-nav.js';
15
15
  import { Loading } from './loading.js';
16
16
  import { SettingsModelPicker } from './model-picker.js';
17
17
  import { RecentShotsAccess } from './recent-shots-access.js';
18
- import { DIAGRAM_STYLE_CHOICES, FONT_SIZES, GLASS_CHOICES, GROUP_ICONS, LANGUAGES, navigationRows, SETTINGS_GROUPS, THEMES } from './settings-choices.js';
18
+ import { DIAGRAM_STYLE_CHOICES, FONT_SIZES, GLASS_CHOICES, GROUP_ICONS, LANGUAGES, navigationRows, PAGE_WIDTH_CHOICES, SETTINGS_GROUPS, THEMES, } from './settings-choices.js';
19
19
  import { ChoiceRow, Row, row, Segmented, SettingsViewUtil, Switch } from './settings-controls.js';
20
20
  import { useMoreSections } from './settings-more.js';
21
21
  import { TrustedDomains } from './trusted-domains.js';
@@ -64,6 +64,13 @@ export function useParts(scope, onScope, onDialog) {
64
64
  React.createElement(Segmented, { label: t('ta.settings.fontSize'), value: settings.fontSize, choices: FONT_SIZES, onChange: fontSize => store.update({ fontSize }) }))),
65
65
  row('chat-font-size', [t('ta.settings.chatFontSize'), t('ta.settings.chatFontSizeHint'), 'font'], React.createElement(Row, { label: t('ta.settings.chatFontSize'), description: t('ta.settings.chatFontSizeHint'), stacked: true },
66
66
  React.createElement(Segmented, { label: t('ta.settings.chatFontSize'), value: settings.chatFontSize, choices: FONT_SIZES, onChange: chatFontSize => store.update({ chatFontSize }) }))),
67
+ // A phone shows a page the width of its screen.
68
+ ...(handheld
69
+ ? []
70
+ : [
71
+ row('page-width', [t('ta.settings.pageWidth'), t('ta.settings.pageWidthHint'), 'width'], React.createElement(Row, { label: t('ta.settings.pageWidth'), description: t('ta.settings.pageWidthHint'), stacked: true },
72
+ React.createElement(Segmented, { label: t('ta.settings.pageWidth'), value: settings.pageWidth, choices: PAGE_WIDTH_CHOICES, onChange: pageWidth => store.update({ pageWidth }) }))),
73
+ ]),
67
74
  row('diagram-style', [t('ta.settings.diagramStyle'), t('ta.settings.diagramStyleHint'), 'mermaid', 'diagram'], React.createElement(Row, { label: t('ta.settings.diagramStyle'), description: t('ta.settings.diagramStyleHint'), stacked: true },
68
75
  React.createElement(Segmented, { label: t('ta.settings.diagramStyle'), value: settings.diagramStyle, choices: DIAGRAM_STYLE_CHOICES, onChange: diagramStyle => store.update({ diagramStyle }) }))),
69
76
  row('motion', [t('ta.settings.motion'), t('ta.settings.motionHint')], React.createElement(Row, { label: t('ta.settings.motion'), description: t('ta.settings.motionHint') },
@@ -103,6 +110,10 @@ export function useParts(scope, onScope, onDialog) {
103
110
  value: String(days),
104
111
  label: days ? t('ta.settings.days', { count: days }) : t('ta.settings.never'),
105
112
  })), onChange: value => store.update({ chatFoldDays: Number(value) }) }))),
113
+ row('tab-title', [t('ta.settings.tabTitle'), t('ta.settings.tabTitleHint')], React.createElement(Row, { label: t('ta.settings.tabTitle'), description: t('ta.settings.tabTitleHint'), stacked: true },
114
+ React.createElement("input", { className: "ta-input", value: settings.tabTitle, placeholder: "Ta", maxLength: TAB_TITLE_CHARS, "aria-label": t('ta.settings.tabTitle'), spellCheck: false, onChange: event => store.update({ tabTitle: event.target.value }) }))),
115
+ row('tab-counts', [t('ta.settings.tabCounts'), t('ta.settings.tabCountsHint')], React.createElement(Row, { label: t('ta.settings.tabCounts'), description: t('ta.settings.tabCountsHint') },
116
+ React.createElement(Switch, { label: t('ta.settings.tabCounts'), checked: settings.tabCounts, onChange: tabCounts => store.update({ tabCounts }) }))),
106
117
  row('chat-archive', [t('ta.settings.chatArchive'), t('ta.settings.chatArchiveHint')], React.createElement(Row, { label: t('ta.settings.chatArchive'), description: t('ta.settings.chatArchiveHint'), stacked: true },
107
118
  React.createElement(Segmented, { label: t('ta.settings.chatArchive'), value: String(settings.chatArchiveDays), choices: CHAT_ARCHIVE_CHOICES.map(days => ({
108
119
  value: String(days),
@@ -33,7 +33,13 @@ export function ShareItemSheet({ item, ways, onClose }) {
33
33
  React.createElement(Icon, { size: 22 })),
34
34
  React.createElement("span", { className: "ta-share-who-text" },
35
35
  React.createElement("strong", { className: "ta-share-name" }, name),
36
- React.createElement("span", { className: "ta-share-gets" }, item.kind === 'file' ? t('ta.share.itemFile') : item.kind === 'link' ? item.gets : t('ta.share.itemWork'))))),
36
+ React.createElement("span", { className: "ta-share-gets" }, item.kind === 'file'
37
+ ? t('ta.share.itemFile')
38
+ : item.kind === 'link'
39
+ ? item.gets
40
+ : item.kind === 'media'
41
+ ? t('ta.share.itemMedia')
42
+ : t('ta.share.itemWork'))))),
37
43
  taking.length ? (React.createElement("div", { className: "ta-share-tiles" }, taking.map(way => (React.createElement(Tile, { key: way.key, icon: way.icon, label: WebShareUtil.label(way), onClick: () => pick(way) }))))) : (React.createElement(EmptyState, { title: t('ta.share.noWay'), compact: true })))));
38
44
  }
39
45
  //# sourceMappingURL=share-item-sheet.js.map
@@ -0,0 +1,27 @@
1
+ import type { WebTaskEntry } from '../extension/web-extension-api.js';
2
+ import type { Translate } from '../i18n/use-t.js';
3
+ /** What the tab of a browser says of Ta: its name, and what waits for the user. */
4
+ export interface TabTitleFacts {
5
+ /** What the user calls this Ta (Settings.tabTitle): `Ta` when they named none. */
6
+ name: string;
7
+ /** The messages of people the user has not seen (useChatsDot.count): the number before the name, as a messenger's. */
8
+ unseen: number;
9
+ /** The tasks that go on, those waiting for the user among them: what is left to do. */
10
+ todo: number;
11
+ /** What waits for the user to decide: the tasks that ask, a conversation that asked among them. */
12
+ urgent: number;
13
+ }
14
+ /**
15
+ * The title of the tab of the browser, made in one place: `Ta`, or with what waits for the user, `(3) Ta · 2 待办 ·
16
+ * 1 紧急`, as a messenger shows the messages not read there. A count is left out while there is none.
17
+ *
18
+ * Both counts come from the tasks the page already lists (WebTaskUtil, `ui.useTasks`): those that go on are the work
19
+ * left, those that wait for the user what is urgent, a conversation that asked being one of them already
20
+ * (ChatTaskSource), so the title never says what the double's list does not.
21
+ */
22
+ export declare namespace TabTitleUtil {
23
+ /** What the tab says, of these facts: the name of Ta, or the one the user gave it. */
24
+ function text(facts: TabTitleFacts, t: Translate): string;
25
+ /** The counts of these tasks, for the tab. */
26
+ function counts(tasks: readonly WebTaskEntry[]): Pick<TabTitleFacts, 'todo' | 'urgent'>;
27
+ }
@@ -0,0 +1,35 @@
1
+ import { WebTaskUtil } from '../extension/web-tasks.js';
2
+ import { CountUtil } from './asks-badge.js';
3
+ /**
4
+ * The title of the tab of the browser, made in one place: `Ta`, or with what waits for the user, `(3) Ta · 2 待办 ·
5
+ * 1 紧急`, as a messenger shows the messages not read there. A count is left out while there is none.
6
+ *
7
+ * Both counts come from the tasks the page already lists (WebTaskUtil, `ui.useTasks`): those that go on are the work
8
+ * left, those that wait for the user what is urgent, a conversation that asked being one of them already
9
+ * (ChatTaskSource), so the title never says what the double's list does not.
10
+ */
11
+ export var TabTitleUtil;
12
+ (function (TabTitleUtil) {
13
+ /** What the tab says, of these facts: the name of Ta, or the one the user gave it. */
14
+ function text(facts, t) {
15
+ const name = facts.name.trim() || 'Ta';
16
+ const parts = [facts.unseen > 0 ? `(${CountUtil.text(facts.unseen)}) ${name}` : name];
17
+ if (facts.todo > 0) {
18
+ parts.push(t('ta.tab.todo', { count: facts.todo }));
19
+ }
20
+ if (facts.urgent > 0) {
21
+ parts.push(t('ta.tab.urgent', { count: facts.urgent }));
22
+ }
23
+ return parts.join(' · ');
24
+ }
25
+ TabTitleUtil.text = text;
26
+ /** The counts of these tasks, for the tab. */
27
+ function counts(tasks) {
28
+ return {
29
+ todo: tasks.filter(task => !WebTaskUtil.ended(task)).length,
30
+ urgent: tasks.filter(task => task.status === 'waiting').length,
31
+ };
32
+ }
33
+ TabTitleUtil.counts = counts;
34
+ })(TabTitleUtil || (TabTitleUtil = {}));
35
+ //# sourceMappingURL=tab-title.js.map
@@ -0,0 +1,28 @@
1
+ import type { WebPickedVideo } from '../extension/web-api-components.js';
2
+ import type { MessageId } from '../i18n/messages.js';
3
+ import { type ComposerAttachment } from '../util/composer.js';
4
+ /** The pictures (and videos) of the message box: shown at once, read before they may be sent. */
5
+ export interface ComposerAttachments {
6
+ attachments: ComposerAttachment[];
7
+ /** As the draft of the place hands them back. */
8
+ set(next: ComposerAttachment[]): void;
9
+ /** Takes the files picked, dropped or pasted: pictures as pictures, videos to their owner, the rest as files. */
10
+ add(files: FileList | File[]): void;
11
+ remove(id: string): void;
12
+ }
13
+ /**
14
+ * The pictures a model sees itself: each is shown from its file at once and read at the same time, so that a box
15
+ * closes or another conversation opens without them lost; a file of another kind goes to `files` (the files of
16
+ * the box, uploaded), and a video to `videos` when the box takes them.
17
+ */
18
+ export declare function useComposerAttachments(options: {
19
+ /** Articles of the box that are taken as pictures. */
20
+ images: boolean;
21
+ videos?: (videos: WebPickedVideo[]) => void;
22
+ /** Whether the box takes other files (ComposerBoxProps.files). */
23
+ files: boolean;
24
+ /** Where those go: the files of the box (useComposerFiles.add). */
25
+ addFiles?(files: File[]): void;
26
+ t: (id: MessageId, values?: Record<string, string | number>) => string;
27
+ onError(error: unknown): void;
28
+ }): ComposerAttachments;
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import { VideoPicks } from '../device/video-picks.js';
3
+ import { ComposerUtil } from '../util/composer.js';
4
+ import { readImage } from './composer-attachments.js';
5
+ /**
6
+ * The pictures a model sees itself: each is shown from its file at once and read at the same time, so that a box
7
+ * closes or another conversation opens without them lost; a file of another kind goes to `files` (the files of
8
+ * the box, uploaded), and a video to `videos` when the box takes them.
9
+ */
10
+ export function useComposerAttachments(options) {
11
+ const { images, videos, files, addFiles, t, onError } = options;
12
+ const [attachments, setAttachments] = React.useState([]);
13
+ // The previews of a box that goes away go with it.
14
+ const shown = React.useRef(attachments);
15
+ shown.current = attachments;
16
+ React.useEffect(() => () => ComposerUtil.release(shown.current), []);
17
+ const known = React.useRef(attachments);
18
+ known.current = attachments;
19
+ const add = React.useCallback((list) => {
20
+ const added = [];
21
+ const uploads = [];
22
+ for (const file of VideoPicks.take(list, videos)) {
23
+ const reason = ComposerUtil.rejectImage(file, known.current.length + added.length);
24
+ // What a model cannot see as a picture (a PDF, a HEIC, one over 5 MB) goes as a file it opens.
25
+ if (files && (!images || reason === 'type' || reason === 'size')) {
26
+ uploads.push(file);
27
+ continue;
28
+ }
29
+ if (reason) {
30
+ onError(new Error(t(`ta.composer.image.${reason}`, { name: file.name })));
31
+ continue;
32
+ }
33
+ added.push({ attachment: { id: crypto.randomUUID(), preview: URL.createObjectURL(file) }, file });
34
+ }
35
+ if (uploads.length) {
36
+ addFiles === null || addFiles === void 0 ? void 0 : addFiles(uploads);
37
+ }
38
+ if (!added.length) {
39
+ return;
40
+ }
41
+ setAttachments(previous => [...previous, ...added.map(({ attachment }) => attachment)]);
42
+ for (const { attachment, file } of added) {
43
+ void readImage(file).then(image => {
44
+ if (!image) {
45
+ ComposerUtil.release([attachment]);
46
+ }
47
+ setAttachments(previous => image
48
+ ? previous.map(other => (other.id === attachment.id ? { ...other, image } : other))
49
+ : previous.filter(other => other.id !== attachment.id));
50
+ });
51
+ }
52
+ }, [images, files, videos, addFiles, t, onError]);
53
+ const remove = React.useCallback((id) => {
54
+ setAttachments(previous => {
55
+ ComposerUtil.release(previous.filter(attachment => attachment.id === id));
56
+ return previous.filter(attachment => attachment.id !== id);
57
+ });
58
+ }, []);
59
+ const set = React.useCallback((next) => setAttachments(previous => {
60
+ ComposerUtil.release(previous.filter(attachment => !next.includes(attachment)));
61
+ return next;
62
+ }), []);
63
+ return { attachments, set, add, remove };
64
+ }
65
+ //# sourceMappingURL=use-composer-attachments.js.map
@@ -0,0 +1,25 @@
1
+ import type { TaWorkspaceServer } from '@celljs/ta-protocol';
2
+ import type { MessageId } from '../i18n/messages.js';
3
+ import { type ComposerFile } from '../util/composer-files.js';
4
+ /** The files of the message box (ComposerBoxProps.files): what was picked, uploaded under `uploads/` of `cwd`. */
5
+ export interface ComposerFileBox {
6
+ /** The files picked, each with how far it is uploaded. */
7
+ files: ComposerFile[];
8
+ /** All of them are there: the message may go. */
9
+ ready: boolean;
10
+ /** Takes files picked, dropped or pasted; the pictures a model sees itself are the box's (addFiles). */
11
+ add(files: readonly File[]): void;
12
+ remove(id: string): void;
13
+ /** Sent, or given up: the box holds none. */
14
+ clear(): void;
15
+ /** The sending failed: they are in the box again, as they were. */
16
+ restore(files: ComposerFile[]): void;
17
+ }
18
+ /**
19
+ * Picks files of the box other than the pictures a model sees itself: each shows at once and is uploaded under
20
+ * `uploads/` of the directory of the conversation, where the message names it as an `@` reference (ComposerFileUtil).
21
+ * A file that fails to go takes its chip away, and says why.
22
+ */
23
+ export declare function useComposerFiles(files: {
24
+ workspace: Pick<TaWorkspaceServer, 'uploadFile' | 'listDirectory'>;
25
+ } | undefined, cwd: string | undefined, t: (id: MessageId, values?: Record<string, string | number>) => string, onError: (error: unknown) => void): ComposerFileBox;
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import { ComposerFileUtil, MAX_FILE_BYTES } from '../util/composer-files.js';
3
+ /**
4
+ * Picks files of the box other than the pictures a model sees itself: each shows at once and is uploaded under
5
+ * `uploads/` of the directory of the conversation, where the message names it as an `@` reference (ComposerFileUtil).
6
+ * A file that fails to go takes its chip away, and says why.
7
+ */
8
+ export function useComposerFiles(files, cwd, t, onError) {
9
+ const [picked, setPicked] = React.useState([]);
10
+ const add = React.useCallback((list) => {
11
+ const workspace = files === null || files === void 0 ? void 0 : files.workspace;
12
+ if (!workspace || !list.length) {
13
+ return;
14
+ }
15
+ if (!cwd) {
16
+ onError(new Error(t('ta.composer.file.noDir')));
17
+ return;
18
+ }
19
+ const refused = list.flatMap(file => {
20
+ const reason = ComposerFileUtil.refuse(file);
21
+ return reason ? [{ file, reason }] : [];
22
+ });
23
+ for (const { file, reason } of refused) {
24
+ onError(new Error(t(`ta.composer.file.${reason}`, { name: file.name, mb: Math.round(MAX_FILE_BYTES / (1024 * 1024)) })));
25
+ }
26
+ const accepted = list.filter(file => !ComposerFileUtil.refuse(file));
27
+ if (!accepted.length) {
28
+ return;
29
+ }
30
+ void ComposerFileUtil.taken(workspace, cwd).then(there => {
31
+ // Each place is taken at once, so that two files of a name picked together do not meet.
32
+ const shown = accepted.map(file => {
33
+ const path = ComposerFileUtil.place(file.name, there);
34
+ there.add(path);
35
+ return { id: crypto.randomUUID(), name: file.name, path, size: file.size, done: 0 };
36
+ });
37
+ setPicked(previous => [...previous, ...shown]);
38
+ accepted.forEach((file, index) => {
39
+ const entry = shown[index];
40
+ void ComposerFileUtil.upload(workspace, cwd, entry.path, file, done => setPicked(previous => previous.map(other => (other.id === entry.id ? { ...other, done } : other)))).catch(error => {
41
+ setPicked(previous => previous.filter(other => other.id !== entry.id));
42
+ onError(error);
43
+ });
44
+ });
45
+ }, error => onError(error));
46
+ }, [files, cwd, t, onError]);
47
+ const remove = React.useCallback((id) => setPicked(previous => previous.filter(file => file.id !== id)), []);
48
+ const clear = React.useCallback(() => setPicked([]), []);
49
+ const restore = React.useCallback((files) => setPicked(files), []);
50
+ return { files: picked, ready: picked.every(file => file.done >= 1), add, remove, clear, restore };
51
+ }
52
+ //# sourceMappingURL=use-composer-files.js.map
@@ -10,6 +10,8 @@ export interface WebComposerHostProps extends WebComposerProps {
10
10
  server: Pick<TaServer, 'getDirectoryCommands'>;
11
11
  /** The entries of a directory of the server, for the button of `onPickCwd`. */
12
12
  listDirectory?(directory: string): Promise<TaDirEntry[]>;
13
+ /** Makes the folder `name` in a directory of the server, for the button of `onPickCwd`. */
14
+ createDirectory?(directory: string, name: string): Promise<void>;
13
15
  /** The directory of ta serve: that of a `cwd` left empty. */
14
16
  serverCwd?: string;
15
17
  /** The hosts of ssh, which the button offers too. */
@@ -19,4 +21,4 @@ export interface WebComposerHostProps extends WebComposerProps {
19
21
  * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
20
22
  * the limits given), `@` for the names they give; a failure is a notice of the page.
21
23
  */
22
- export declare function WebComposer({ notices, placeholder, onSend, images, videos, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
24
+ export declare function WebComposer({ notices, placeholder, onSend, images, videos, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, createDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
@@ -11,7 +11,7 @@ import { DirectoryButton } from './folder-picker.js';
11
11
  * The message box as web extensions get it (`pi.ui.Composer`): text, and pictures when it takes them (shrunk within
12
12
  * the limits given), `@` for the names they give; a failure is a notice of the page.
13
13
  */
14
- export function WebComposer({ notices, placeholder, onSend, images, videos, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, serverCwd, remote, }) {
14
+ export function WebComposer({ notices, placeholder, onSend, images, videos, emoji, autoFocus, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, draft, server, listDirectory, createDirectory, serverCwd, remote, }) {
15
15
  const t = useT();
16
16
  const language = useLanguage();
17
17
  const [query, setQuery] = React.useState();
@@ -36,6 +36,7 @@ export function WebComposer({ notices, placeholder, onSend, images, videos, emoj
36
36
  detail: mention.detail,
37
37
  })),
38
38
  }
39
- : undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions === null || actions === void 0 ? void 0 : actions.map(section => section.map(ComposerAddonUtil.action)), head: onPickCwd && listDirectory && React.createElement(DirectoryButton, { cwd: cwd || serverCwd || '', list: listDirectory, remote: remote, onPick: onPickCwd }), cwd: cwd || serverCwd, working: working, onStop: onStop, voiceSends: voiceSends, draft: draft, onTalkSent: onTalkSent, onListening: onListening, after: after, onError: cause => notices.error(cause) }));
39
+ : undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions === null || actions === void 0 ? void 0 : actions.map(section => section.map(ComposerAddonUtil.action)), head: onPickCwd &&
40
+ listDirectory && (React.createElement(DirectoryButton, { cwd: cwd || serverCwd || '', list: listDirectory, create: createDirectory, remote: remote, onPick: onPickCwd })), cwd: cwd || serverCwd, working: working, onStop: onStop, voiceSends: voiceSends, draft: draft, onTalkSent: onTalkSent, onListening: onListening, after: after, onError: cause => notices.error(cause) }));
40
41
  }
41
42
  //# sourceMappingURL=web-composer.js.map
@@ -23,6 +23,7 @@ export function useDocument() {
23
23
  // Before the browser draws what this commit made.
24
24
  React.useLayoutEffect(() => PageStyle.attach(), []);
25
25
  React.useEffect(() => {
26
+ // The name alone: the shell gives it with what waits for the user over this (TabTitleUtil).
26
27
  document.title = 'Ta';
27
28
  // Where the installed app's window is dragged when the page draws its title bar.
28
29
  const titlebar = document.createElement('div');
@@ -10,6 +10,7 @@ export function WorkingDirectoryPicker({ onClose }) {
10
10
  const [workbench, bench] = useWorkbench();
11
11
  const [, notices] = useNotices();
12
12
  const list = React.useCallback((directory) => bench.workspace.listDirectory('.', directory), [bench]);
13
+ const create = React.useCallback((directory, name) => bench.workspace.createDirectory(name, directory), [bench]);
13
14
  const pick = async (path) => {
14
15
  try {
15
16
  await bench.setWorkingDirectory(path);
@@ -20,6 +21,6 @@ export function WorkingDirectoryPicker({ onClose }) {
20
21
  notices.error(error);
21
22
  }
22
23
  };
23
- return React.createElement(FolderPicker, { list: list, initial: (_b = (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd) !== null && _b !== void 0 ? _b : '.', remote: bench, onPick: pick, onClose: onClose });
24
+ return React.createElement(FolderPicker, { list: list, create: create, initial: (_b = (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd) !== null && _b !== void 0 ? _b : '.', remote: bench, onPick: pick, onClose: onClose });
24
25
  }
25
26
  //# sourceMappingURL=working-directory.js.map
@@ -12,11 +12,13 @@ export interface AppUpdateSource {
12
12
  version: string;
13
13
  build: number;
14
14
  }
15
- /** A newer build of the app: its version, and the link that installs it. */
15
+ /** A newer build of the app, or an earlier one to go back to (`back`): its version, and the link that installs it. */
16
16
  export interface AppUpdateOffer {
17
17
  version: string;
18
18
  build: number;
19
19
  link: string;
20
+ /** The publisher took the build of the app back (`rollback` of the manifest): this earlier one replaces it. */
21
+ back?: boolean;
20
22
  }
21
23
  /** What the updates read of the app; tests give their own. */
22
24
  export interface AppUpdateEnvironment {
@@ -33,8 +35,9 @@ export declare namespace AppUpdateUtil {
33
35
  const FILE = "ta-app.json";
34
36
  function source(value: unknown): AppUpdateSource | undefined;
35
37
  /**
36
- * The build of the manifest when it is newer than the app's, with the link that installs it: the itms-services link
37
- * the manifest gives (iOS), else the address of its file; either only of the site of the manifest.
38
+ * The build of the manifest when it is newer than the app's, or when it takes the app's build back (`rollback`: an
39
+ * earlier build is the latest again, for the builds up to `from`), with the link that installs it: the itms-services
40
+ * link the manifest gives (iOS), else the address of its file; either only of the site of the manifest.
38
41
  */
39
42
  function offer(source: AppUpdateSource, manifest: unknown): AppUpdateOffer | undefined;
40
43
  }
@@ -15,18 +15,24 @@ export var AppUpdateUtil;
15
15
  }
16
16
  AppUpdateUtil.source = source;
17
17
  /**
18
- * The build of the manifest when it is newer than the app's, with the link that installs it: the itms-services link
19
- * the manifest gives (iOS), else the address of its file; either only of the site of the manifest.
18
+ * The build of the manifest when it is newer than the app's, or when it takes the app's build back (`rollback`: an
19
+ * earlier build is the latest again, for the builds up to `from`), with the link that installs it: the itms-services
20
+ * link the manifest gives (iOS), else the address of its file; either only of the site of the manifest.
20
21
  */
21
22
  function offer(source, manifest) {
22
- var _a;
23
+ var _a, _b;
23
24
  const one = manifest;
24
25
  const file = (_a = one === null || one === void 0 ? void 0 : one.files) === null || _a === void 0 ? void 0 : _a[source.target];
25
- if (typeof (one === null || one === void 0 ? void 0 : one.version) !== 'string' || typeof one.build !== 'number' || !(one.build > source.build) || !file) {
26
+ if (typeof (one === null || one === void 0 ? void 0 : one.version) !== 'string' || typeof one.build !== 'number' || !file) {
27
+ return undefined;
28
+ }
29
+ const from = (_b = one.rollback) === null || _b === void 0 ? void 0 : _b.from;
30
+ const back = typeof from === 'number' && one.build < source.build && source.build <= from;
31
+ if (!(one.build > source.build) && !back) {
26
32
  return undefined;
27
33
  }
28
34
  const link = linkOf(source.updates, file);
29
- return link ? { version: one.version, build: one.build, link } : undefined;
35
+ return link ? { version: one.version, build: one.build, link, ...(back ? { back } : {}) } : undefined;
30
36
  }
31
37
  AppUpdateUtil.offer = offer;
32
38
  function linkOf(updates, file) {