@celljs/ta-web 4.49.0 → 4.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/account/account-side.js +4 -0
  4. package/esm/browser/account/device-account.d.ts +6 -0
  5. package/esm/browser/account/device-account.js +20 -5
  6. package/esm/browser/assistant/assistant-view.js +2 -0
  7. package/esm/browser/assistant/call-announcing.d.ts +25 -0
  8. package/esm/browser/assistant/call-announcing.js +32 -0
  9. package/esm/browser/assistant/call-answering.d.ts +43 -0
  10. package/esm/browser/assistant/call-answering.js +63 -0
  11. package/esm/browser/assistant/call-hearing.d.ts +53 -0
  12. package/esm/browser/assistant/call-hearing.js +98 -0
  13. package/esm/browser/assistant/call-pausing.d.ts +40 -0
  14. package/esm/browser/assistant/call-pausing.js +82 -0
  15. package/esm/browser/assistant/call-reading.d.ts +32 -0
  16. package/esm/browser/assistant/call-reading.js +35 -0
  17. package/esm/browser/assistant/call-revoicing.d.ts +33 -0
  18. package/esm/browser/assistant/call-revoicing.js +68 -0
  19. package/esm/browser/assistant/call-turns.d.ts +29 -0
  20. package/esm/browser/assistant/call-turns.js +33 -0
  21. package/esm/browser/assistant/spoken-answer.d.ts +21 -0
  22. package/esm/browser/assistant/spoken-answer.js +69 -0
  23. package/esm/browser/assistant/spoken-call.d.ts +7 -0
  24. package/esm/browser/assistant/spoken-call.js +16 -0
  25. package/esm/browser/assistant/voice-call-protocol.d.ts +5 -0
  26. package/esm/browser/assistant/voice-call.d.ts +47 -43
  27. package/esm/browser/assistant/voice-call.js +193 -219
  28. package/esm/browser/chat/chat-view.js +2 -1
  29. package/esm/browser/components/account-recovery-view.d.ts +11 -0
  30. package/esm/browser/components/account-recovery-view.js +81 -0
  31. package/esm/browser/components/account-view.d.ts +1 -2
  32. package/esm/browser/components/account-view.js +10 -1
  33. package/esm/browser/components/app-nav.js +19 -8
  34. package/esm/browser/components/app-shell-hooks.d.ts +5 -0
  35. package/esm/browser/components/app-shell-hooks.js +45 -0
  36. package/esm/browser/components/app-shell-state.js +2 -1
  37. package/esm/browser/components/app-view.js +9 -5
  38. package/esm/browser/components/chat-emoji.d.ts +35 -0
  39. package/esm/browser/components/chat-emoji.js +129 -0
  40. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  41. package/esm/browser/components/composer-attachments.d.ts +6 -0
  42. package/esm/browser/components/composer-attachments.js +12 -1
  43. package/esm/browser/components/composer-box-protocol.d.ts +15 -0
  44. package/esm/browser/components/composer-box.js +110 -87
  45. package/esm/browser/components/composer-drop-hooks.d.ts +26 -0
  46. package/esm/browser/components/composer-drop-hooks.js +36 -0
  47. package/esm/browser/components/composer-emoji.js +1 -1
  48. package/esm/browser/components/composer-faces.d.ts +16 -0
  49. package/esm/browser/components/composer-faces.js +37 -0
  50. package/esm/browser/components/composer-media.d.ts +10 -0
  51. package/esm/browser/components/composer-media.js +12 -1
  52. package/esm/browser/components/composer-target.d.ts +4 -0
  53. package/esm/browser/components/composer-target.js +18 -7
  54. package/esm/browser/components/composer-type-focus.d.ts +24 -0
  55. package/esm/browser/components/composer-type-focus.js +17 -0
  56. package/esm/browser/components/composer-voice.d.ts +24 -0
  57. package/esm/browser/components/composer-voice.js +37 -0
  58. package/esm/browser/components/composer.d.ts +2 -2
  59. package/esm/browser/components/composer.js +39 -8
  60. package/esm/browser/components/context-menu.js +2 -1
  61. package/esm/browser/components/emoji-panel.d.ts +11 -7
  62. package/esm/browser/components/emoji-panel.js +40 -22
  63. package/esm/browser/components/extension-settings.js +2 -2
  64. package/esm/browser/components/folder-new.d.ts +18 -0
  65. package/esm/browser/components/folder-new.js +53 -0
  66. package/esm/browser/components/folder-picker.d.ts +5 -2
  67. package/esm/browser/components/folder-picker.js +18 -6
  68. package/esm/browser/components/host-view.d.ts +1 -1
  69. package/esm/browser/components/image-menu.d.ts +8 -3
  70. package/esm/browser/components/image-menu.js +34 -9
  71. package/esm/browser/components/markdown.js +9 -2
  72. package/esm/browser/components/media.js +3 -2
  73. package/esm/browser/components/message-list.js +2 -2
  74. package/esm/browser/components/message-steps.js +20 -11
  75. package/esm/browser/components/message-user.js +2 -2
  76. package/esm/browser/components/moved-notice.js +2 -1
  77. package/esm/browser/components/nav-places.d.ts +2 -0
  78. package/esm/browser/components/nav-places.js +4 -2
  79. package/esm/browser/components/phone-shell.d.ts +2 -0
  80. package/esm/browser/components/phone-shell.js +5 -1
  81. package/esm/browser/components/secret-text.d.ts +1 -1
  82. package/esm/browser/components/secret-text.js +4 -3
  83. package/esm/browser/components/session-view.js +3 -0
  84. package/esm/browser/components/settings-choices.d.ts +2 -1
  85. package/esm/browser/components/settings-choices.js +13 -5
  86. package/esm/browser/components/settings-more.js +3 -3
  87. package/esm/browser/components/settings-parts.js +13 -2
  88. package/esm/browser/components/share-item-sheet.js +7 -1
  89. package/esm/browser/components/tab-title.d.ts +27 -0
  90. package/esm/browser/components/tab-title.js +35 -0
  91. package/esm/browser/components/use-composer-attachments.d.ts +28 -0
  92. package/esm/browser/components/use-composer-attachments.js +65 -0
  93. package/esm/browser/components/use-composer-files.d.ts +25 -0
  94. package/esm/browser/components/use-composer-files.js +52 -0
  95. package/esm/browser/components/web-composer.d.ts +3 -1
  96. package/esm/browser/components/web-composer.js +3 -2
  97. package/esm/browser/components/workbench-view.js +1 -0
  98. package/esm/browser/components/working-directory.js +2 -1
  99. package/esm/browser/device/drag-move.d.ts +21 -0
  100. package/esm/browser/device/drag-move.js +86 -0
  101. package/esm/browser/extension/icons.js +7 -1
  102. package/esm/browser/extension/web-api-desktop.d.ts +19 -0
  103. package/esm/browser/extension/web-api-menus.d.ts +19 -0
  104. package/esm/browser/extension/web-api-spec.js +2 -0
  105. package/esm/browser/extension/web-extension-api.d.ts +24 -23
  106. package/esm/browser/extension/web-extension-context.d.ts +1 -0
  107. package/esm/browser/extension/web-extension-context.js +12 -5
  108. package/esm/browser/extension/web-extension-run.js +1 -0
  109. package/esm/browser/extension/web-share-ui.d.ts +1 -1
  110. package/esm/browser/extension/web-share-ui.js +2 -0
  111. package/esm/browser/extension/web-share.d.ts +13 -0
  112. package/esm/browser/extension/web-share.js +37 -2
  113. package/esm/browser/i18n/en/account.d.ts +18 -0
  114. package/esm/browser/i18n/en/account.js +18 -0
  115. package/esm/browser/i18n/en/call.js +1 -1
  116. package/esm/browser/i18n/en/chat.d.ts +15 -0
  117. package/esm/browser/i18n/en/chat.js +16 -1
  118. package/esm/browser/i18n/en/common.d.ts +2 -0
  119. package/esm/browser/i18n/en/common.js +2 -0
  120. package/esm/browser/i18n/en/discover.d.ts +2 -0
  121. package/esm/browser/i18n/en/discover.js +2 -0
  122. package/esm/browser/i18n/en/settings.d.ts +17 -0
  123. package/esm/browser/i18n/en/settings.js +17 -0
  124. package/esm/browser/i18n/ja/account.js +18 -0
  125. package/esm/browser/i18n/ja/call.js +1 -1
  126. package/esm/browser/i18n/ja/chat.js +16 -1
  127. package/esm/browser/i18n/ja/common.js +2 -0
  128. package/esm/browser/i18n/ja/discover.js +3 -1
  129. package/esm/browser/i18n/ja/settings.js +17 -0
  130. package/esm/browser/i18n/locales.d.ts +55 -1
  131. package/esm/browser/i18n/messages.d.ts +54 -0
  132. package/esm/browser/i18n/zh/account.js +18 -0
  133. package/esm/browser/i18n/zh/call.js +1 -1
  134. package/esm/browser/i18n/zh/chat.js +16 -1
  135. package/esm/browser/i18n/zh/common.js +2 -0
  136. package/esm/browser/i18n/zh/discover.js +3 -1
  137. package/esm/browser/i18n/zh/settings.js +17 -0
  138. package/esm/browser/i18n/zh-tw/account.js +18 -0
  139. package/esm/browser/i18n/zh-tw/call.js +1 -1
  140. package/esm/browser/i18n/zh-tw/chat.js +16 -1
  141. package/esm/browser/i18n/zh-tw/common.js +2 -0
  142. package/esm/browser/i18n/zh-tw/discover.js +3 -1
  143. package/esm/browser/i18n/zh-tw/settings.js +17 -0
  144. package/esm/browser/offline/kept-chats.d.ts +3 -1
  145. package/esm/browser/offline/kept-chats.js +1 -1
  146. package/esm/browser/partners/group-picker.d.ts +3 -2
  147. package/esm/browser/partners/group-picker.js +8 -3
  148. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  149. package/esm/browser/sandbox/work/work-docs.js +5 -2
  150. package/esm/browser/sandbox/work/work-frame.d.ts +3 -0
  151. package/esm/browser/sandbox/work/work-frame.js +9 -3
  152. package/esm/browser/sandbox/work/work-gates.d.ts +77 -0
  153. package/esm/browser/sandbox/work/work-gates.js +182 -0
  154. package/esm/browser/settings/agent-settings.js +1 -1
  155. package/esm/browser/settings/navigation.d.ts +38 -10
  156. package/esm/browser/settings/navigation.js +73 -17
  157. package/esm/browser/settings/settings-protocol.d.ts +16 -1
  158. package/esm/browser/settings/settings-protocol.js +20 -2
  159. package/esm/browser/settings/settings.js +4 -1
  160. package/esm/browser/style/base.d.ts +1 -1
  161. package/esm/browser/style/base.js +15 -2
  162. package/esm/browser/style/chat-list.d.ts +1 -1
  163. package/esm/browser/style/chat-list.js +6 -3
  164. package/esm/browser/style/conversation-column.d.ts +1 -1
  165. package/esm/browser/style/conversation-column.js +28 -8
  166. package/esm/browser/style/conversation.d.ts +1 -1
  167. package/esm/browser/style/conversation.js +5 -0
  168. package/esm/browser/style/device.js +5 -0
  169. package/esm/browser/style/pages.d.ts +1 -1
  170. package/esm/browser/style/pages.js +3 -3
  171. package/esm/browser/style/shell.d.ts +1 -1
  172. package/esm/browser/style/shell.js +13 -6
  173. package/esm/browser/style/tasks.d.ts +1 -1
  174. package/esm/browser/style/tasks.js +4 -2
  175. package/esm/browser/util/chat-emoji.d.ts +44 -0
  176. package/esm/browser/util/chat-emoji.js +269 -0
  177. package/esm/browser/util/composer-drop.d.ts +26 -0
  178. package/esm/browser/util/composer-drop.js +40 -0
  179. package/esm/browser/util/composer-files.d.ts +48 -0
  180. package/esm/browser/util/composer-files.js +99 -0
  181. package/esm/browser/util/composer.d.ts +13 -1
  182. package/esm/browser/util/composer.js +24 -6
  183. package/esm/browser/util/markdown.d.ts +5 -0
  184. package/esm/browser/util/markdown.js +18 -0
  185. package/esm/browser/util/message.d.ts +6 -1
  186. package/esm/browser/util/message.js +13 -2
  187. package/esm/browser/util/process.d.ts +10 -13
  188. package/esm/browser/util/process.js +31 -83
  189. package/esm/browser/util/turn-join.d.ts +38 -0
  190. package/esm/browser/util/turn-join.js +119 -0
  191. package/esm/browser/workbench-services.js +1 -1
  192. package/lib/browser/account/account-side.js +4 -0
  193. package/lib/browser/account/device-account.d.ts +6 -0
  194. package/lib/browser/account/device-account.js +20 -5
  195. package/lib/browser/assistant/assistant-view.js +2 -0
  196. package/lib/browser/assistant/call-announcing.d.ts +26 -0
  197. package/lib/browser/assistant/call-announcing.js +36 -0
  198. package/lib/browser/assistant/call-answering.d.ts +44 -0
  199. package/lib/browser/assistant/call-answering.js +67 -0
  200. package/lib/browser/assistant/call-hearing.d.ts +54 -0
  201. package/lib/browser/assistant/call-hearing.js +102 -0
  202. package/lib/browser/assistant/call-pausing.d.ts +41 -0
  203. package/lib/browser/assistant/call-pausing.js +86 -0
  204. package/lib/browser/assistant/call-reading.d.ts +33 -0
  205. package/lib/browser/assistant/call-reading.js +39 -0
  206. package/lib/browser/assistant/call-revoicing.d.ts +34 -0
  207. package/lib/browser/assistant/call-revoicing.js +72 -0
  208. package/lib/browser/assistant/call-turns.d.ts +30 -0
  209. package/lib/browser/assistant/call-turns.js +37 -0
  210. package/lib/browser/assistant/spoken-answer.d.ts +22 -0
  211. package/lib/browser/assistant/spoken-answer.js +73 -0
  212. package/lib/browser/assistant/spoken-call.d.ts +8 -0
  213. package/lib/browser/assistant/spoken-call.js +19 -0
  214. package/lib/browser/assistant/voice-call-protocol.d.ts +5 -0
  215. package/lib/browser/assistant/voice-call.d.ts +47 -43
  216. package/lib/browser/assistant/voice-call.js +192 -218
  217. package/lib/browser/chat/chat-view.js +2 -1
  218. package/lib/browser/components/account-recovery-view.d.ts +12 -0
  219. package/lib/browser/components/account-recovery-view.js +117 -0
  220. package/lib/browser/components/account-view.d.ts +1 -2
  221. package/lib/browser/components/account-view.js +10 -1
  222. package/lib/browser/components/app-nav.js +19 -8
  223. package/lib/browser/components/app-shell-hooks.d.ts +5 -0
  224. package/lib/browser/components/app-shell-hooks.js +46 -0
  225. package/lib/browser/components/app-shell-state.js +1 -0
  226. package/lib/browser/components/app-view.js +8 -4
  227. package/lib/browser/components/chat-emoji.d.ts +36 -0
  228. package/lib/browser/components/chat-emoji.js +167 -0
  229. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  230. package/lib/browser/components/composer-attachments.d.ts +6 -0
  231. package/lib/browser/components/composer-attachments.js +12 -0
  232. package/lib/browser/components/composer-box-protocol.d.ts +15 -0
  233. package/lib/browser/components/composer-box.js +107 -84
  234. package/lib/browser/components/composer-drop-hooks.d.ts +27 -0
  235. package/lib/browser/components/composer-drop-hooks.js +72 -0
  236. package/lib/browser/components/composer-emoji.js +1 -1
  237. package/lib/browser/components/composer-faces.d.ts +17 -0
  238. package/lib/browser/components/composer-faces.js +73 -0
  239. package/lib/browser/components/composer-media.d.ts +10 -0
  240. package/lib/browser/components/composer-media.js +13 -0
  241. package/lib/browser/components/composer-target.d.ts +4 -0
  242. package/lib/browser/components/composer-target.js +18 -7
  243. package/lib/browser/components/composer-type-focus.d.ts +25 -0
  244. package/lib/browser/components/composer-type-focus.js +20 -0
  245. package/lib/browser/components/composer-voice.d.ts +25 -0
  246. package/lib/browser/components/composer-voice.js +73 -0
  247. package/lib/browser/components/composer.d.ts +2 -2
  248. package/lib/browser/components/composer.js +38 -7
  249. package/lib/browser/components/context-menu.js +2 -1
  250. package/lib/browser/components/emoji-panel.d.ts +11 -7
  251. package/lib/browser/components/emoji-panel.js +40 -22
  252. package/lib/browser/components/extension-settings.js +1 -1
  253. package/lib/browser/components/folder-new.d.ts +19 -0
  254. package/lib/browser/components/folder-new.js +90 -0
  255. package/lib/browser/components/folder-picker.d.ts +5 -2
  256. package/lib/browser/components/folder-picker.js +17 -5
  257. package/lib/browser/components/host-view.d.ts +1 -1
  258. package/lib/browser/components/image-menu.d.ts +8 -3
  259. package/lib/browser/components/image-menu.js +34 -9
  260. package/lib/browser/components/markdown.js +9 -2
  261. package/lib/browser/components/media.js +3 -2
  262. package/lib/browser/components/message-list.js +2 -2
  263. package/lib/browser/components/message-steps.js +20 -11
  264. package/lib/browser/components/message-user.js +1 -1
  265. package/lib/browser/components/moved-notice.js +2 -1
  266. package/lib/browser/components/nav-places.d.ts +2 -0
  267. package/lib/browser/components/nav-places.js +4 -2
  268. package/lib/browser/components/phone-shell.d.ts +2 -0
  269. package/lib/browser/components/phone-shell.js +5 -1
  270. package/lib/browser/components/secret-text.d.ts +1 -1
  271. package/lib/browser/components/secret-text.js +4 -3
  272. package/lib/browser/components/session-view.js +3 -0
  273. package/lib/browser/components/settings-choices.d.ts +2 -1
  274. package/lib/browser/components/settings-choices.js +12 -4
  275. package/lib/browser/components/settings-more.js +2 -2
  276. package/lib/browser/components/settings-parts.js +11 -0
  277. package/lib/browser/components/share-item-sheet.js +7 -1
  278. package/lib/browser/components/tab-title.d.ts +28 -0
  279. package/lib/browser/components/tab-title.js +38 -0
  280. package/lib/browser/components/use-composer-attachments.d.ts +29 -0
  281. package/lib/browser/components/use-composer-attachments.js +101 -0
  282. package/lib/browser/components/use-composer-files.d.ts +26 -0
  283. package/lib/browser/components/use-composer-files.js +88 -0
  284. package/lib/browser/components/web-composer.d.ts +3 -1
  285. package/lib/browser/components/web-composer.js +3 -2
  286. package/lib/browser/components/workbench-view.js +1 -0
  287. package/lib/browser/components/working-directory.js +2 -1
  288. package/lib/browser/device/drag-move.d.ts +22 -0
  289. package/lib/browser/device/drag-move.js +122 -0
  290. package/lib/browser/extension/icons.js +6 -0
  291. package/lib/browser/extension/web-api-desktop.d.ts +19 -0
  292. package/lib/browser/extension/web-api-menus.d.ts +19 -0
  293. package/lib/browser/extension/web-api-spec.js +2 -0
  294. package/lib/browser/extension/web-extension-api.d.ts +24 -23
  295. package/lib/browser/extension/web-extension-context.d.ts +1 -0
  296. package/lib/browser/extension/web-extension-context.js +12 -5
  297. package/lib/browser/extension/web-extension-run.js +1 -0
  298. package/lib/browser/extension/web-share-ui.d.ts +1 -1
  299. package/lib/browser/extension/web-share-ui.js +2 -0
  300. package/lib/browser/extension/web-share.d.ts +13 -0
  301. package/lib/browser/extension/web-share.js +37 -2
  302. package/lib/browser/i18n/en/account.d.ts +18 -0
  303. package/lib/browser/i18n/en/account.js +18 -0
  304. package/lib/browser/i18n/en/call.js +1 -1
  305. package/lib/browser/i18n/en/chat.d.ts +15 -0
  306. package/lib/browser/i18n/en/chat.js +16 -1
  307. package/lib/browser/i18n/en/common.d.ts +2 -0
  308. package/lib/browser/i18n/en/common.js +2 -0
  309. package/lib/browser/i18n/en/discover.d.ts +2 -0
  310. package/lib/browser/i18n/en/discover.js +2 -0
  311. package/lib/browser/i18n/en/settings.d.ts +17 -0
  312. package/lib/browser/i18n/en/settings.js +17 -0
  313. package/lib/browser/i18n/ja/account.js +18 -0
  314. package/lib/browser/i18n/ja/call.js +1 -1
  315. package/lib/browser/i18n/ja/chat.js +16 -1
  316. package/lib/browser/i18n/ja/common.js +2 -0
  317. package/lib/browser/i18n/ja/discover.js +3 -1
  318. package/lib/browser/i18n/ja/settings.js +17 -0
  319. package/lib/browser/i18n/locales.d.ts +55 -1
  320. package/lib/browser/i18n/messages.d.ts +54 -0
  321. package/lib/browser/i18n/zh/account.js +18 -0
  322. package/lib/browser/i18n/zh/call.js +1 -1
  323. package/lib/browser/i18n/zh/chat.js +16 -1
  324. package/lib/browser/i18n/zh/common.js +2 -0
  325. package/lib/browser/i18n/zh/discover.js +3 -1
  326. package/lib/browser/i18n/zh/settings.js +17 -0
  327. package/lib/browser/i18n/zh-tw/account.js +18 -0
  328. package/lib/browser/i18n/zh-tw/call.js +1 -1
  329. package/lib/browser/i18n/zh-tw/chat.js +16 -1
  330. package/lib/browser/i18n/zh-tw/common.js +2 -0
  331. package/lib/browser/i18n/zh-tw/discover.js +3 -1
  332. package/lib/browser/i18n/zh-tw/settings.js +17 -0
  333. package/lib/browser/offline/kept-chats.d.ts +3 -1
  334. package/lib/browser/offline/kept-chats.js +1 -1
  335. package/lib/browser/partners/group-picker.d.ts +3 -2
  336. package/lib/browser/partners/group-picker.js +8 -3
  337. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  338. package/lib/browser/sandbox/work/work-docs.js +5 -2
  339. package/lib/browser/sandbox/work/work-frame.d.ts +3 -0
  340. package/lib/browser/sandbox/work/work-frame.js +9 -3
  341. package/lib/browser/sandbox/work/work-gates.d.ts +78 -0
  342. package/lib/browser/sandbox/work/work-gates.js +185 -0
  343. package/lib/browser/settings/agent-settings.js +1 -1
  344. package/lib/browser/settings/navigation.d.ts +38 -10
  345. package/lib/browser/settings/navigation.js +74 -18
  346. package/lib/browser/settings/settings-protocol.d.ts +16 -1
  347. package/lib/browser/settings/settings-protocol.js +21 -3
  348. package/lib/browser/settings/settings.js +3 -0
  349. package/lib/browser/style/base.d.ts +1 -1
  350. package/lib/browser/style/base.js +15 -2
  351. package/lib/browser/style/chat-list.d.ts +1 -1
  352. package/lib/browser/style/chat-list.js +6 -3
  353. package/lib/browser/style/conversation-column.d.ts +1 -1
  354. package/lib/browser/style/conversation-column.js +28 -8
  355. package/lib/browser/style/conversation.d.ts +1 -1
  356. package/lib/browser/style/conversation.js +5 -0
  357. package/lib/browser/style/device.js +5 -0
  358. package/lib/browser/style/pages.d.ts +1 -1
  359. package/lib/browser/style/pages.js +3 -3
  360. package/lib/browser/style/shell.d.ts +1 -1
  361. package/lib/browser/style/shell.js +13 -6
  362. package/lib/browser/style/tasks.d.ts +1 -1
  363. package/lib/browser/style/tasks.js +4 -2
  364. package/lib/browser/util/chat-emoji.d.ts +45 -0
  365. package/lib/browser/util/chat-emoji.js +272 -0
  366. package/lib/browser/util/composer-drop.d.ts +27 -0
  367. package/lib/browser/util/composer-drop.js +43 -0
  368. package/lib/browser/util/composer-files.d.ts +49 -0
  369. package/lib/browser/util/composer-files.js +102 -0
  370. package/lib/browser/util/composer.d.ts +13 -1
  371. package/lib/browser/util/composer.js +24 -6
  372. package/lib/browser/util/markdown.d.ts +5 -0
  373. package/lib/browser/util/markdown.js +18 -0
  374. package/lib/browser/util/message.d.ts +6 -1
  375. package/lib/browser/util/message.js +13 -2
  376. package/lib/browser/util/process.d.ts +10 -13
  377. package/lib/browser/util/process.js +32 -84
  378. package/lib/browser/util/turn-join.d.ts +39 -0
  379. package/lib/browser/util/turn-join.js +122 -0
  380. package/lib/browser/workbench-services.js +1 -1
  381. package/package.json +7 -7
  382. package/public/emoji/wechat-v1.webp +0 -0
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Process = Process;
37
+ const ta_protocol_1 = require("@celljs/ta-protocol");
37
38
  const lucide_react_1 = require("lucide-react");
38
39
  const React = __importStar(require("react"));
39
40
  const use_t_1 = require("../i18n/use-t");
@@ -44,6 +45,7 @@ const tool_1 = require("../util/tool");
44
45
  const icon_1 = require("./icon");
45
46
  const link_1 = require("./link");
46
47
  const markdown_1 = require("./markdown");
48
+ const message_images_1 = require("./message-images");
47
49
  const message_user_1 = require("./message-user");
48
50
  const tool_view_1 = require("./tool-view");
49
51
  /** The summary an agent compacted its context to: folded into one line, it opens to the whole summary. */
@@ -80,20 +82,27 @@ const ErrorStep = React.memo(function ErrorStep({ text }) {
80
82
  open && text && React.createElement("div", { className: "ta-thinking-text" }, text)));
81
83
  });
82
84
  /**
83
- * What the user said while the agent worked (steering), where in its work it read it: a small bubble on the string of
84
- * the steps, marked as said on the way, with where it came from when not typed. It stays in sight when the steps fold.
85
+ * What the user said on the string of the steps (while the agent worked, or once a run stopped short and it goes on
86
+ * with what they said): one line of their words, marked where it came in, as quiet as the steps around it. It stays in
87
+ * sight when the steps fold.
85
88
  */
86
- const SaidStep = React.memo(function SaidStep({ message }) {
89
+ const SaidStep = React.memo(function SaidStep({ message, wentOn }) {
87
90
  const t = (0, use_t_1.useT)();
88
91
  const blocks = message_1.MessageUtil.blocks(message);
89
92
  const { text } = (0, message_user_1.userWords)(blocks);
90
- return (React.createElement("div", { className: "ta-step-said" },
93
+ const timestamp = message.timestamp;
94
+ const pictures = message_images_1.UserImageUtil.images(blocks).length > 0;
95
+ // One line, as the other steps are: the mark, a tag in the colour of the user's words, and what they said (a clip;
96
+ // the whole of it when opened). Words a part of Ta wrote for them, and pictures, show as they were said.
97
+ const line = !pictures && !ta_protocol_1.TaMessageSource.of(message_1.MessageUtil.text(blocks));
98
+ return (React.createElement("div", { className: line ? 'ta-step-said ta-said-line' : 'ta-step-said' },
91
99
  React.createElement("span", { className: "ta-status ta-status-said" }),
92
- React.createElement("div", { className: "ta-said-head", title: t('ta.message.steeredTitle') },
93
- React.createElement(icon_1.Icon, { icon: lucide_react_1.CornerDownRight, size: 12 }),
94
- React.createElement("span", null, t('ta.message.steered')),
95
- React.createElement(message_user_1.MessageOrigin, { blocks: blocks })),
96
- React.createElement(message_user_1.UserSaid, { blocks: blocks, text: text, bubble: "ta-said-bubble", timestamp: message.timestamp })));
100
+ React.createElement("div", { className: "ta-said-head", title: t(wentOn ? 'ta.message.wentOnTitle' : 'ta.message.steeredTitle') },
101
+ React.createElement(icon_1.Icon, { icon: lucide_react_1.CornerDownRight, size: 12, className: "ta-said-arrow" }),
102
+ React.createElement("span", { className: "ta-said-tag" }, t(wentOn ? 'ta.message.wentOn' : 'ta.message.steered')),
103
+ React.createElement(message_user_1.MessageOrigin, { blocks: blocks }),
104
+ line && text && React.createElement("span", { className: "ta-said-text" }, text)),
105
+ line ? null : React.createElement(message_user_1.UserSaid, { blocks: blocks, text: text, bubble: "ta-said-bubble", timestamp: timestamp })));
97
106
  });
98
107
  /**
99
108
  * Where the work went on after it was cut short (Ta restarted, the network came back, a part of Ta told it something,
@@ -123,7 +132,7 @@ function Step({ step, results, tools, tagged, streaming, }) {
123
132
  case 'error':
124
133
  return React.createElement(ErrorStep, { text: step.text });
125
134
  case 'said':
126
- return React.createElement(SaidStep, { message: step.message });
135
+ return React.createElement(SaidStep, { message: step.message, wentOn: step.wentOn });
127
136
  case 'resumed':
128
137
  return React.createElement(ResumedStep, { online: step.online, text: step.text });
129
138
  default:
@@ -245,7 +254,7 @@ function Process({ steps, active, results, tools, leading, status, stopped, }) {
245
254
  React.createElement("span", { className: "ta-status ta-status-thought" }),
246
255
  React.createElement("button", { type: "button", className: "ta-link ta-more", onClick: () => setShowAll(true) }, earlier ? t('ta.process.earlier', { count: earlier }) : t('ta.process.showAll')))),
247
256
  inline.map((step, index) => (React.createElement(Step, { key: step.key, step: step, results: results, tools: tools, tagged: !thoughtOnly, streaming: active && index === inline.length - 1 }))))),
248
- said.length > 0 && (React.createElement("div", { className: "ta-process-steps ta-said-folded" }, said.map(step => (React.createElement(SaidStep, { key: step.key, message: step.message }))))),
257
+ said.length > 0 && (React.createElement("div", { className: "ta-process-steps ta-said-folded" }, said.map(step => (React.createElement(SaidStep, { key: step.key, message: step.message, wentOn: step.wentOn }))))),
249
258
  pinned.map(step => (React.createElement(markdown_1.Markdown, { key: step.key, text: step.text })))));
250
259
  }
251
260
  //# sourceMappingURL=message-steps.js.map
@@ -138,7 +138,7 @@ function useOrigin(from) {
138
138
  const info = (_a = extensions.find(extension => extension.name === from)) === null || _a === void 0 ? void 0 : _a.info;
139
139
  return {
140
140
  name: (_b = ta_protocol_1.TaPackageTextUtil.pick(info === null || info === void 0 ? void 0 : info.title, language)) !== null && _b !== void 0 ? _b : (from !== null && from !== void 0 ? from : '').replace(/^@[^/]+\//, ''),
141
- glyph: ((info === null || info === void 0 ? void 0 : info.icon) && icons_1.WEB_ICONS[info.icon]) || lucide_react_1.Puzzle,
141
+ glyph: ((info === null || info === void 0 ? void 0 : info.icon) && icons_1.WEB_ICONS[info.icon]) || icons_1.WEB_ICONS.Blocks,
142
142
  };
143
143
  }
144
144
  /**
@@ -60,6 +60,7 @@ function MovedNotice({ server, sessionId, sessionFile, movedFrom, cwd, }) {
60
60
  const [picking, setPicking] = React.useState(false);
61
61
  const [busy, run] = (0, busy_1.useBusy)();
62
62
  const list = React.useCallback((directory) => bench.workspace.listDirectory('.', directory), [bench]);
63
+ const create = React.useCallback((directory, name) => bench.workspace.createDirectory(name, directory), [bench]);
63
64
  if (closed) {
64
65
  return null;
65
66
  }
@@ -91,6 +92,6 @@ function MovedNotice({ server, sessionId, sessionFile, movedFrom, cwd, }) {
91
92
  React.createElement("button", { type: "button", className: "ta-button ta-small", disabled: busy, onClick: copy }, t('ta.session.movedCopy')),
92
93
  React.createElement(icon_1.IconButton, { icon: lucide_react_1.X, label: t('ta.session.movedKeep'), onClick: () => setClosed(true) })) },
93
94
  React.createElement("span", { title: movedFrom }, t('ta.session.moved', { dir: message_1.MessageUtil.basename(movedFrom) || movedFrom })),
94
- picking && (React.createElement(folder_picker_1.FolderPicker, { list: list, initial: cwd || ((_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.', remote: bench, onPick: relocate, onClose: () => setPicking(false) }))));
95
+ picking && (React.createElement(folder_picker_1.FolderPicker, { list: list, create: create, initial: cwd || ((_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.', remote: bench, onPick: relocate, onClose: () => setPicking(false) }))));
95
96
  }
96
97
  //# sourceMappingURL=moved-notice.js.map
@@ -49,6 +49,8 @@ export interface Navigation {
49
49
  showAll(on: boolean): void;
50
50
  pin(id: string): void;
51
51
  fold(id: string): void;
52
+ /** A page dragged before another, or last (NavigationUtil.move): the order the user put them in, for every device. */
53
+ move(page: string, before: string | undefined): void;
52
54
  update(setting: NavigationSetting): void;
53
55
  }
54
56
  /**
@@ -47,8 +47,8 @@ function fixedTabs(views) {
47
47
  */
48
48
  function places(views, setting, handheld, own = false) {
49
49
  const pages = railPages(views);
50
- const room = handheld ? Math.max(1, navigation_1.NavigationUtil.PHONE_TABS - fixedTabs(views)) : undefined;
51
- return { pages, ...navigation_1.NavigationUtil.arrange(pages, setting, room, own) };
50
+ const room = handheld ? Math.max(1, navigation_1.NavigationUtil.tabs(setting) - fixedTabs(views)) : undefined;
51
+ return { pages, ...navigation_1.NavigationUtil.arrange(pages, setting, room, own, handheld) };
52
52
  }
53
53
  /**
54
54
  * Where each page of the extensions is on this device (WebPageInfo.place): in the navigation, under Discover, or
@@ -91,6 +91,8 @@ function phoneTabs(lists, navigation, labels) {
91
91
  label: web_extension_protocol_1.WebLabelUtil.text(view.title),
92
92
  icon: (_a = view.icon) !== null && _a !== void 0 ? _a : lucide_react_1.PanelTop,
93
93
  menu,
94
+ // A page dragged among the others moves for every device, the tabs of a phone being the same pages.
95
+ move: navigation.move,
94
96
  }); };
95
97
  const list = (entry) => ({ ...entry, hold: entryHold(entry.id, entry.double, labels.holds) });
96
98
  return [
@@ -21,6 +21,8 @@ export interface PhoneTab {
21
21
  asks?: number;
22
22
  /** How many messages people sent the user has not seen (the chats' tab): a red number, before all else. */
23
23
  count?: number;
24
+ /** A page of the navigation: dragged among the others, it takes their place (NavigationUtil.move). */
25
+ move?(page: string, target: string | undefined): void;
24
26
  }
25
27
  export interface PhoneShellProps {
26
28
  tabs: PhoneTab[];
@@ -42,6 +42,7 @@ const React = __importStar(require("react"));
42
42
  const back_stack_1 = require("../device/back-stack");
43
43
  const device_1 = require("../device/device");
44
44
  const device_protocol_1 = require("../device/device-protocol");
45
+ const drag_move_1 = require("../device/drag-move");
45
46
  const hold_1 = require("../device/hold");
46
47
  const pull_down_1 = require("../device/pull-down");
47
48
  const sheet_swipe_1 = require("../device/sheet-swipe");
@@ -266,6 +267,8 @@ function TabBar({ tabs, tab, onTab }) {
266
267
  const t = (0, use_t_1.useT)();
267
268
  const [menu, openMenu] = (0, context_menu_1.useContextMenu)();
268
269
  const held = (0, hold_1.useHeld)();
270
+ // A page of the navigation dragged among the tabs, as on the rail: held by a finger first, then it follows.
271
+ const drag = (0, drag_move_1.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); } });
269
272
  // The tab shown tapped again: to the next row with a dot, as WeChat's; tapped twice quickly, to the top.
270
273
  const lastTap = React.useRef({ id: '', at: 0 });
271
274
  const again = (id, home) => {
@@ -278,9 +281,10 @@ function TabBar({ tabs, tab, onTab }) {
278
281
  };
279
282
  return (React.createElement("nav", { className: "ta-tabbar", "aria-label": t('ta.menu') },
280
283
  tabs.map(item => {
284
+ var _a;
281
285
  const Glyph = item.icon;
282
286
  const active = item.id === tab;
283
- 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) },
287
+ 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) },
284
288
  React.createElement("span", { className: "ta-tabbar-icon" },
285
289
  item.double ? React.createElement(ta_avatar_1.DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 22, strokeWidth: active ? 2 : 1.6 }),
286
290
  item.count ? (React.createElement(asks_badge_1.PeopleBadge, { count: item.count, onDismiss: item.onSeeAll })) : item.asks ? (React.createElement(asks_badge_1.AsksBadge, { count: item.asks, onDismiss: item.onSeeAll })) : (item.unseen && React.createElement(unseen_drop_1.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;
@@ -40,6 +40,7 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
40
40
  const lucide_react_1 = require("lucide-react");
41
41
  const React = __importStar(require("react"));
42
42
  const use_t_1 = require("../i18n/use-t");
43
+ const chat_emoji_1 = require("./chat-emoji");
43
44
  const context_menu_1 = require("./context-menu");
44
45
  const icon_1 = require("./icon");
45
46
  exports.SecretPeeks = React.createContext(undefined);
@@ -108,11 +109,11 @@ function SecretChip({ name, kind }) {
108
109
  React.createElement("button", { type: "button", className: "ta-secret-chip", title: t('ta.secret.title'), "aria-haspopup": "menu", onClick: open }, content),
109
110
  menu));
110
111
  }
111
- /** Words with the names of the vault in them drawn as {@link SecretChip}; the words alone as they are. */
112
+ /** Words with the names of the vault in them drawn as {@link SecretChip}, and the faces of a chat (`[微笑]`) as theirs. */
112
113
  function SecretText({ text }) {
113
114
  if (!ta_protocol_1.TaSecretRef.has(text)) {
114
- return React.createElement(React.Fragment, null, text);
115
+ return React.createElement(chat_emoji_1.EmojiText, { text: text });
115
116
  }
116
- return (React.createElement(React.Fragment, null, ta_protocol_1.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))));
117
+ return (React.createElement(React.Fragment, null, ta_protocol_1.TaSecretRef.split(text).map((part, index) => 'secret' in part ? React.createElement(SecretChip, { key: index, name: part.secret, kind: part.kind }) : React.createElement(chat_emoji_1.EmojiText, { key: index, text: part.text }))));
117
118
  }
118
119
  //# sourceMappingURL=secret-text.js.map
@@ -39,6 +39,7 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
39
39
  const lucide_react_1 = require("lucide-react");
40
40
  const React = __importStar(require("react"));
41
41
  const call_face_1 = require("../assistant/call-face");
42
+ const spoken_call_1 = require("../assistant/spoken-call");
42
43
  const voice_call_bar_1 = require("../assistant/voice-call-bar");
43
44
  const device_1 = require("../device/device");
44
45
  const drafts_protocol_1 = require("../drafts/drafts-protocol");
@@ -197,6 +198,8 @@ function SessionView({ store, server, workspace, info, onClosed, onActivity, lea
197
198
  language: () => settingsState.language,
198
199
  voice: () => settingsState.settings.voice,
199
200
  send: text => store.prompt(text, { streamingBehavior: 'followUp' }),
201
+ // Said over a call, an answer to what the conversation waits on answers it, rather than going to the model.
202
+ answer: said => (0, spoken_call_1.answerSpoken)(state.pendingUi[0], said, response => store.respondUi(response)),
200
203
  ended: (reason, detail) => notices.notify((0, voice_call_bar_1.callEndedNotice)(t, reason, detail)),
201
204
  }, { 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 ? message_1.MessageUtil.basename(info.cwd) : t('ta.session.title')));
202
205
  (0, voice_call_bar_1.useCallTurns)(call, callState, state.working, message_1.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';
4
4
  import type { MessageId } from '../i18n/messages';
5
5
  import type { useT } from '../i18n/use-t';
6
- import { type DiagramStyle, type FontSize, type LanguageSetting, type SkinGlass, type ThemeSetting } from '../settings/settings-protocol';
6
+ import { type DiagramStyle, type FontSize, type LanguageSetting, type PageWidth, type SkinGlass, type ThemeSetting } from '../settings/settings-protocol';
7
7
  import type { Navigation } from './nav-places';
8
8
  import { type Choice, type RowEntry } from './settings-controls';
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>[];
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.SHORTCUTS = exports.SETTINGS_GROUPS = exports.GROUP_ICONS = exports.LANGUAGES = exports.GLASS_CHOICES = exports.DIAGRAM_STYLE_CHOICES = exports.FONT_SIZES = exports.THEMES = void 0;
36
+ exports.SHORTCUTS = exports.SETTINGS_GROUPS = exports.GROUP_ICONS = exports.LANGUAGES = exports.GLASS_CHOICES = exports.DIAGRAM_STYLE_CHOICES = exports.PAGE_WIDTH_CHOICES = exports.FONT_SIZES = exports.THEMES = void 0;
37
37
  exports.usePackages = usePackages;
38
38
  exports.navigationRows = navigationRows;
39
39
  exports.packageLabel = packageLabel;
@@ -43,6 +43,7 @@ const React = __importStar(require("react"));
43
43
  const icons_1 = require("../extension/icons");
44
44
  const web_extension_protocol_1 = require("../extension/web-extension-protocol");
45
45
  const hooks_1 = require("../hooks");
46
+ const navigation_1 = require("../settings/navigation");
46
47
  const settings_protocol_1 = require("../settings/settings-protocol");
47
48
  const settings_controls_1 = require("./settings-controls");
48
49
  exports.THEMES = [
@@ -56,6 +57,11 @@ exports.FONT_SIZES = [
56
57
  { value: 'large', label: 'ta.settings.fontSize.large' },
57
58
  { value: 'xlarge', label: 'ta.settings.fontSize.xlarge' },
58
59
  ];
60
+ exports.PAGE_WIDTH_CHOICES = [
61
+ { value: 'standard', label: 'ta.settings.pageWidth.standard' },
62
+ { value: 'wide', label: 'ta.settings.pageWidth.wide' },
63
+ { value: 'wider', label: 'ta.settings.pageWidth.wider' },
64
+ ];
59
65
  exports.DIAGRAM_STYLE_CHOICES = settings_protocol_1.DIAGRAM_STYLES.map(value => ({ value, label: `ta.settings.diagramStyle.${value}` }));
60
66
  exports.GLASS_CHOICES = settings_protocol_1.SKIN_GLASSES.map(value => ({ value, label: `ta.settings.glass.${value}` }));
61
67
  exports.LANGUAGES = [
@@ -124,15 +130,17 @@ function navigationRows(navigation, t) {
124
130
  if (navigation.nav.some(page => page.id === id)) {
125
131
  return t('ta.settings.navigation.inNav');
126
132
  }
127
- return t(navigation.setting.pinned.includes(id) ? 'ta.settings.navigation.overflow' : 'ta.settings.navigation.folded');
133
+ return t(navigation_1.NavigationUtil.isPinned(navigation.setting, id) ? 'ta.settings.navigation.overflow' : 'ta.settings.navigation.folded');
128
134
  };
129
135
  return [
136
+ (0, settings_controls_1.row)('nav-tabs', [t('ta.settings.navigation.tabs'), t('ta.settings.navigation.tabsHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.navigation.tabs'), description: t('ta.settings.navigation.tabsHint'), stacked: true },
137
+ React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.navigation.tabs'), value: String(navigation_1.NavigationUtil.tabs(navigation.setting)), choices: navigation_1.NavigationUtil.PHONE_TABS.map(tabs => ({ value: String(tabs), label: String(tabs) })), onChange: tabs => navigation.update({ ...navigation.setting, tabs: Number(tabs) }) }))),
130
138
  (0, settings_controls_1.row)('all-features', [t('ta.settings.allFeatures'), t('ta.settings.allFeaturesHint'), t('ta.discover.all')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.allFeatures'), description: t('ta.settings.allFeaturesHint') },
131
139
  React.createElement(settings_controls_1.Switch, { label: t('ta.settings.allFeatures'), checked: !navigation.first, onChange: navigation.showAll }))),
132
140
  ...navigation.pages.map(page => {
133
141
  const title = web_extension_protocol_1.WebLabelUtil.text(page.title);
134
142
  return (0, settings_controls_1.row)(`navigation:${page.id}`, [title, t('ta.settings.navigation')], React.createElement(settings_controls_1.Row, { label: title, description: where(page.id) },
135
- React.createElement(settings_controls_1.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)) })));
143
+ React.createElement(settings_controls_1.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)) })));
136
144
  }),
137
145
  ...(navigation.pages.length === 0
138
146
  ? [(0, settings_controls_1.row)('navigation:none', [t('ta.settings.navigation.none')], React.createElement(settings_controls_1.EmptyRow, { title: t('ta.settings.navigation.none') }))]
@@ -145,7 +153,7 @@ function packageLabel(pkg, language) {
145
153
  return {
146
154
  title: (_a = ta_protocol_1.TaPackageTextUtil.pick(pkg.title, language)) !== null && _a !== void 0 ? _a : pkg.name,
147
155
  summary: (_b = ta_protocol_1.TaPackageTextUtil.pick(pkg.summary, language)) !== null && _b !== void 0 ? _b : pkg.description,
148
- icon: (pkg.icon && icons_1.WEB_ICONS[pkg.icon]) || lucide_react_1.Puzzle,
156
+ icon: (pkg.icon && icons_1.WEB_ICONS[pkg.icon]) || lucide_react_1.Blocks,
149
157
  };
150
158
  }
151
159
  //# sourceMappingURL=settings-choices.js.map
@@ -119,7 +119,7 @@ function useMoreSections(onDialog) {
119
119
  {
120
120
  id: 'packages',
121
121
  title: t('ta.packages.installed'),
122
- icon: lucide_react_1.Puzzle,
122
+ icon: lucide_react_1.Blocks,
123
123
  group: 'extensions',
124
124
  rows: [
125
125
  (0, settings_controls_1.row)('packages', [t('ta.packages'), t('ta.packages.hint')], React.createElement(settings_controls_1.Row, { label: t('ta.packages.installed'), description: t('ta.packages.hint') },
@@ -154,7 +154,7 @@ function useMoreSections(onDialog) {
154
154
  // The console only for administrators of a gateway, where it shows.
155
155
  ...host.builtins
156
156
  .filter(builtin => { var _a; return !builtin.gatewayAdmin || ((_a = gateway.info) === null || _a === void 0 ? void 0 : _a.admin); })
157
- .map(builtin => { var _a; return (0, settings_controls_1.row)(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(settings_controls_1.Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : lucide_react_1.Puzzle, label: t(builtin.title), description: t(builtin.description) },
157
+ .map(builtin => { var _a; return (0, settings_controls_1.row)(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(settings_controls_1.Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : lucide_react_1.Blocks, label: t(builtin.title), description: t(builtin.description) },
158
158
  React.createElement(settings_controls_1.Switch, { label: t(builtin.title), checked: !settings.builtinsOff.includes(builtin.name), onChange: on => toggleBuiltin(builtin.name, on) }))); }),
159
159
  ...builtinPackages.map(info => {
160
160
  const { title, summary, icon } = (0, settings_choices_1.packageLabel)(info, language);
@@ -100,6 +100,13 @@ function useParts(scope, onScope, onDialog) {
100
100
  React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.fontSize'), value: settings.fontSize, choices: settings_choices_1.FONT_SIZES, onChange: fontSize => store.update({ fontSize }) }))),
101
101
  (0, settings_controls_1.row)('chat-font-size', [t('ta.settings.chatFontSize'), t('ta.settings.chatFontSizeHint'), 'font'], React.createElement(settings_controls_1.Row, { label: t('ta.settings.chatFontSize'), description: t('ta.settings.chatFontSizeHint'), stacked: true },
102
102
  React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.chatFontSize'), value: settings.chatFontSize, choices: settings_choices_1.FONT_SIZES, onChange: chatFontSize => store.update({ chatFontSize }) }))),
103
+ // A phone shows a page the width of its screen.
104
+ ...(handheld
105
+ ? []
106
+ : [
107
+ (0, settings_controls_1.row)('page-width', [t('ta.settings.pageWidth'), t('ta.settings.pageWidthHint'), 'width'], React.createElement(settings_controls_1.Row, { label: t('ta.settings.pageWidth'), description: t('ta.settings.pageWidthHint'), stacked: true },
108
+ React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.pageWidth'), value: settings.pageWidth, choices: settings_choices_1.PAGE_WIDTH_CHOICES, onChange: pageWidth => store.update({ pageWidth }) }))),
109
+ ]),
103
110
  (0, settings_controls_1.row)('diagram-style', [t('ta.settings.diagramStyle'), t('ta.settings.diagramStyleHint'), 'mermaid', 'diagram'], React.createElement(settings_controls_1.Row, { label: t('ta.settings.diagramStyle'), description: t('ta.settings.diagramStyleHint'), stacked: true },
104
111
  React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.diagramStyle'), value: settings.diagramStyle, choices: settings_choices_1.DIAGRAM_STYLE_CHOICES, onChange: diagramStyle => store.update({ diagramStyle }) }))),
105
112
  (0, settings_controls_1.row)('motion', [t('ta.settings.motion'), t('ta.settings.motionHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.motion'), description: t('ta.settings.motionHint') },
@@ -139,6 +146,10 @@ function useParts(scope, onScope, onDialog) {
139
146
  value: String(days),
140
147
  label: days ? t('ta.settings.days', { count: days }) : t('ta.settings.never'),
141
148
  })), onChange: value => store.update({ chatFoldDays: Number(value) }) }))),
149
+ (0, settings_controls_1.row)('tab-title', [t('ta.settings.tabTitle'), t('ta.settings.tabTitleHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.tabTitle'), description: t('ta.settings.tabTitleHint'), stacked: true },
150
+ React.createElement("input", { className: "ta-input", value: settings.tabTitle, placeholder: "Ta", maxLength: settings_protocol_1.TAB_TITLE_CHARS, "aria-label": t('ta.settings.tabTitle'), spellCheck: false, onChange: event => store.update({ tabTitle: event.target.value }) }))),
151
+ (0, settings_controls_1.row)('tab-counts', [t('ta.settings.tabCounts'), t('ta.settings.tabCountsHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.tabCounts'), description: t('ta.settings.tabCountsHint') },
152
+ React.createElement(settings_controls_1.Switch, { label: t('ta.settings.tabCounts'), checked: settings.tabCounts, onChange: tabCounts => store.update({ tabCounts }) }))),
142
153
  (0, settings_controls_1.row)('chat-archive', [t('ta.settings.chatArchive'), t('ta.settings.chatArchiveHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.chatArchive'), description: t('ta.settings.chatArchiveHint'), stacked: true },
143
154
  React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.chatArchive'), value: String(settings.chatArchiveDays), choices: settings_protocol_1.CHAT_ARCHIVE_CHOICES.map(days => ({
144
155
  value: String(days),
@@ -69,7 +69,13 @@ function ShareItemSheet({ item, ways, onClose }) {
69
69
  React.createElement(Icon, { size: 22 })),
70
70
  React.createElement("span", { className: "ta-share-who-text" },
71
71
  React.createElement("strong", { className: "ta-share-name" }, name),
72
- React.createElement("span", { className: "ta-share-gets" }, item.kind === 'file' ? t('ta.share.itemFile') : item.kind === 'link' ? item.gets : t('ta.share.itemWork'))))),
72
+ React.createElement("span", { className: "ta-share-gets" }, item.kind === 'file'
73
+ ? t('ta.share.itemFile')
74
+ : item.kind === 'link'
75
+ ? item.gets
76
+ : item.kind === 'media'
77
+ ? t('ta.share.itemMedia')
78
+ : t('ta.share.itemWork'))))),
73
79
  taking.length ? (React.createElement("div", { className: "ta-share-tiles" }, taking.map(way => (React.createElement(share_sheet_1.Tile, { key: way.key, icon: way.icon, label: web_share_1.WebShareUtil.label(way), onClick: () => pick(way) }))))) : (React.createElement(empty_state_1.EmptyState, { title: t('ta.share.noWay'), compact: true })))));
74
80
  }
75
81
  //# sourceMappingURL=share-item-sheet.js.map
@@ -0,0 +1,28 @@
1
+ import type { WebTaskEntry } from '../extension/web-extension-api';
2
+ import type { Translate } from '../i18n/use-t';
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
+ }
28
+ //# sourceMappingURL=tab-title.d.ts.map
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TabTitleUtil = void 0;
4
+ const web_tasks_1 = require("../extension/web-tasks");
5
+ const asks_badge_1 = require("./asks-badge");
6
+ /**
7
+ * The title of the tab of the browser, made in one place: `Ta`, or with what waits for the user, `(3) Ta · 2 待办 ·
8
+ * 1 紧急`, as a messenger shows the messages not read there. A count is left out while there is none.
9
+ *
10
+ * Both counts come from the tasks the page already lists (WebTaskUtil, `ui.useTasks`): those that go on are the work
11
+ * left, those that wait for the user what is urgent, a conversation that asked being one of them already
12
+ * (ChatTaskSource), so the title never says what the double's list does not.
13
+ */
14
+ var TabTitleUtil;
15
+ (function (TabTitleUtil) {
16
+ /** What the tab says, of these facts: the name of Ta, or the one the user gave it. */
17
+ function text(facts, t) {
18
+ const name = facts.name.trim() || 'Ta';
19
+ const parts = [facts.unseen > 0 ? `(${asks_badge_1.CountUtil.text(facts.unseen)}) ${name}` : name];
20
+ if (facts.todo > 0) {
21
+ parts.push(t('ta.tab.todo', { count: facts.todo }));
22
+ }
23
+ if (facts.urgent > 0) {
24
+ parts.push(t('ta.tab.urgent', { count: facts.urgent }));
25
+ }
26
+ return parts.join(' · ');
27
+ }
28
+ TabTitleUtil.text = text;
29
+ /** The counts of these tasks, for the tab. */
30
+ function counts(tasks) {
31
+ return {
32
+ todo: tasks.filter(task => !web_tasks_1.WebTaskUtil.ended(task)).length,
33
+ urgent: tasks.filter(task => task.status === 'waiting').length,
34
+ };
35
+ }
36
+ TabTitleUtil.counts = counts;
37
+ })(TabTitleUtil || (exports.TabTitleUtil = TabTitleUtil = {}));
38
+ //# sourceMappingURL=tab-title.js.map
@@ -0,0 +1,29 @@
1
+ import type { WebPickedVideo } from '../extension/web-api-components';
2
+ import type { MessageId } from '../i18n/messages';
3
+ import { type ComposerAttachment } from '../util/composer';
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;
29
+ //# sourceMappingURL=use-composer-attachments.d.ts.map
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.useComposerAttachments = useComposerAttachments;
37
+ const React = __importStar(require("react"));
38
+ const video_picks_1 = require("../device/video-picks");
39
+ const composer_1 = require("../util/composer");
40
+ const composer_attachments_1 = require("./composer-attachments");
41
+ /**
42
+ * The pictures a model sees itself: each is shown from its file at once and read at the same time, so that a box
43
+ * closes or another conversation opens without them lost; a file of another kind goes to `files` (the files of
44
+ * the box, uploaded), and a video to `videos` when the box takes them.
45
+ */
46
+ function useComposerAttachments(options) {
47
+ const { images, videos, files, addFiles, t, onError } = options;
48
+ const [attachments, setAttachments] = React.useState([]);
49
+ // The previews of a box that goes away go with it.
50
+ const shown = React.useRef(attachments);
51
+ shown.current = attachments;
52
+ React.useEffect(() => () => composer_1.ComposerUtil.release(shown.current), []);
53
+ const known = React.useRef(attachments);
54
+ known.current = attachments;
55
+ const add = React.useCallback((list) => {
56
+ const added = [];
57
+ const uploads = [];
58
+ for (const file of video_picks_1.VideoPicks.take(list, videos)) {
59
+ const reason = composer_1.ComposerUtil.rejectImage(file, known.current.length + added.length);
60
+ // What a model cannot see as a picture (a PDF, a HEIC, one over 5 MB) goes as a file it opens.
61
+ if (files && (!images || reason === 'type' || reason === 'size')) {
62
+ uploads.push(file);
63
+ continue;
64
+ }
65
+ if (reason) {
66
+ onError(new Error(t(`ta.composer.image.${reason}`, { name: file.name })));
67
+ continue;
68
+ }
69
+ added.push({ attachment: { id: crypto.randomUUID(), preview: URL.createObjectURL(file) }, file });
70
+ }
71
+ if (uploads.length) {
72
+ addFiles === null || addFiles === void 0 ? void 0 : addFiles(uploads);
73
+ }
74
+ if (!added.length) {
75
+ return;
76
+ }
77
+ setAttachments(previous => [...previous, ...added.map(({ attachment }) => attachment)]);
78
+ for (const { attachment, file } of added) {
79
+ void (0, composer_attachments_1.readImage)(file).then(image => {
80
+ if (!image) {
81
+ composer_1.ComposerUtil.release([attachment]);
82
+ }
83
+ setAttachments(previous => image
84
+ ? previous.map(other => (other.id === attachment.id ? { ...other, image } : other))
85
+ : previous.filter(other => other.id !== attachment.id));
86
+ });
87
+ }
88
+ }, [images, files, videos, addFiles, t, onError]);
89
+ const remove = React.useCallback((id) => {
90
+ setAttachments(previous => {
91
+ composer_1.ComposerUtil.release(previous.filter(attachment => attachment.id === id));
92
+ return previous.filter(attachment => attachment.id !== id);
93
+ });
94
+ }, []);
95
+ const set = React.useCallback((next) => setAttachments(previous => {
96
+ composer_1.ComposerUtil.release(previous.filter(attachment => !next.includes(attachment)));
97
+ return next;
98
+ }), []);
99
+ return { attachments, set, add, remove };
100
+ }
101
+ //# sourceMappingURL=use-composer-attachments.js.map
@@ -0,0 +1,26 @@
1
+ import type { TaWorkspaceServer } from '@celljs/ta-protocol';
2
+ import type { MessageId } from '../i18n/messages';
3
+ import { type ComposerFile } from '../util/composer-files';
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;
26
+ //# sourceMappingURL=use-composer-files.d.ts.map