@celljs/ta-web 4.17.0 → 4.19.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 (599) hide show
  1. package/README.en.md +2 -1
  2. package/README.md +2 -1
  3. package/esm/browser/account/account-side.d.ts +13 -0
  4. package/esm/browser/account/account-side.js +74 -0
  5. package/esm/browser/account/device-account.d.ts +69 -0
  6. package/esm/browser/account/device-account.js +215 -0
  7. package/esm/browser/assistant/assistant-chat-list.d.ts +4 -4
  8. package/esm/browser/assistant/assistant-chat-list.js +74 -4
  9. package/esm/browser/assistant/assistant-export.js +6 -2
  10. package/esm/browser/assistant/assistant-extension.js +70 -15
  11. package/esm/browser/assistant/assistant-role.d.ts +2 -2
  12. package/esm/browser/assistant/assistant-role.js +7 -4
  13. package/esm/browser/assistant/assistant-task-source.d.ts +4 -0
  14. package/esm/browser/assistant/assistant-task-source.js +18 -4
  15. package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
  16. package/esm/browser/assistant/assistant-task-util.js +14 -3
  17. package/esm/browser/assistant/assistant-tasks.js +2 -2
  18. package/esm/browser/assistant/assistant-thread.js +5 -1
  19. package/esm/browser/assistant/assistant-view.js +3 -5
  20. package/esm/browser/assistant/assistant.js +2 -1
  21. package/esm/browser/assistant/call-keeper.d.ts +142 -0
  22. package/esm/browser/assistant/call-keeper.js +292 -0
  23. package/esm/browser/assistant/call-screen.d.ts +39 -0
  24. package/esm/browser/assistant/call-screen.js +75 -0
  25. package/esm/browser/assistant/chat-task-source.d.ts +16 -18
  26. package/esm/browser/assistant/chat-task-source.js +27 -52
  27. package/esm/browser/assistant/realtime-voice.d.ts +62 -1
  28. package/esm/browser/assistant/realtime-voice.js +188 -29
  29. package/esm/browser/assistant/task-views.d.ts +9 -6
  30. package/esm/browser/assistant/task-views.js +28 -10
  31. package/esm/browser/assistant/voice-call-bar.d.ts +11 -4
  32. package/esm/browser/assistant/voice-call-bar.js +102 -46
  33. package/esm/browser/assistant/voice-call.d.ts +33 -1
  34. package/esm/browser/assistant/voice-call.js +131 -28
  35. package/esm/browser/assistant/voice-reopen.d.ts +18 -0
  36. package/esm/browser/assistant/voice-reopen.js +54 -0
  37. package/esm/browser/chat/chat-view.js +5 -8
  38. package/esm/browser/cloud/cloud-sign-in.d.ts +100 -0
  39. package/esm/browser/cloud/cloud-sign-in.js +239 -0
  40. package/esm/browser/cloud/device-page.d.ts +15 -0
  41. package/esm/browser/cloud/device-page.js +39 -0
  42. package/esm/browser/components/access-view.js +25 -1
  43. package/esm/browser/components/account-menu.d.ts +1 -1
  44. package/esm/browser/components/account-menu.js +7 -2
  45. package/esm/browser/components/account-view.d.ts +17 -0
  46. package/esm/browser/components/account-view.js +216 -0
  47. package/esm/browser/components/app-contexts.d.ts +12 -0
  48. package/esm/browser/components/app-contexts.js +28 -0
  49. package/esm/browser/components/app-nav.d.ts +5 -3
  50. package/esm/browser/components/app-nav.js +11 -8
  51. package/esm/browser/components/app-shell-state.d.ts +2 -2
  52. package/esm/browser/components/app-shell-state.js +33 -28
  53. package/esm/browser/components/app-view.js +113 -82
  54. package/esm/browser/components/auth-view.js +3 -5
  55. package/esm/browser/components/call-pill.d.ts +11 -0
  56. package/esm/browser/components/call-pill.js +19 -0
  57. package/esm/browser/components/chat-home-util.d.ts +112 -0
  58. package/esm/browser/components/chat-home-util.js +123 -0
  59. package/esm/browser/components/chat-home.d.ts +54 -0
  60. package/esm/browser/components/chat-home.js +125 -0
  61. package/esm/browser/components/chat-icon.d.ts +4 -2
  62. package/esm/browser/components/chat-icon.js +15 -5
  63. package/esm/browser/components/chat-list-hooks.d.ts +30 -0
  64. package/esm/browser/components/chat-list-hooks.js +81 -0
  65. package/esm/browser/components/chat-list-props.d.ts +54 -0
  66. package/esm/browser/components/chat-list-props.js +2 -0
  67. package/esm/browser/components/chat-list-row.d.ts +14 -2
  68. package/esm/browser/components/chat-list-row.js +27 -17
  69. package/esm/browser/components/chat-list-util.d.ts +40 -9
  70. package/esm/browser/components/chat-list-util.js +72 -9
  71. package/esm/browser/components/chat-list.d.ts +4 -49
  72. package/esm/browser/components/chat-list.js +118 -87
  73. package/esm/browser/components/cloud-sign-in-view.d.ts +65 -0
  74. package/esm/browser/components/cloud-sign-in-view.js +351 -0
  75. package/esm/browser/components/code-editor.js +2 -1
  76. package/esm/browser/components/composer-box.js +7 -0
  77. package/esm/browser/components/connection-bar.js +22 -3
  78. package/esm/browser/components/context-menu.d.ts +11 -2
  79. package/esm/browser/components/context-menu.js +14 -3
  80. package/esm/browser/components/conversation-scroll.d.ts +2 -0
  81. package/esm/browser/components/conversation-scroll.js +14 -0
  82. package/esm/browser/components/device-sign-in-page.d.ts +12 -0
  83. package/esm/browser/components/device-sign-in-page.js +74 -0
  84. package/esm/browser/components/diff-editor.js +2 -1
  85. package/esm/browser/components/entry-holds.d.ts +22 -0
  86. package/esm/browser/components/entry-holds.js +49 -0
  87. package/esm/browser/components/environment-view.js +8 -8
  88. package/esm/browser/components/face.d.ts +1 -1
  89. package/esm/browser/components/fold-text.js +3 -1
  90. package/esm/browser/components/fork-view.js +2 -4
  91. package/esm/browser/components/gallery.js +2 -1
  92. package/esm/browser/components/held-talk.d.ts +6 -2
  93. package/esm/browser/components/held-talk.js +20 -2
  94. package/esm/browser/components/host-view.d.ts +11 -4
  95. package/esm/browser/components/host-view.js +60 -14
  96. package/esm/browser/components/image-swipe.d.ts +50 -0
  97. package/esm/browser/components/image-swipe.js +139 -0
  98. package/esm/browser/components/image-viewer.d.ts +10 -114
  99. package/esm/browser/components/image-viewer.js +46 -365
  100. package/esm/browser/components/image-zoom.d.ts +112 -0
  101. package/esm/browser/components/image-zoom.js +355 -0
  102. package/esm/browser/components/kept-call-bar.d.ts +12 -0
  103. package/esm/browser/components/kept-call-bar.js +99 -0
  104. package/esm/browser/components/lightbox.d.ts +6 -2
  105. package/esm/browser/components/lightbox.js +4 -3
  106. package/esm/browser/components/link-dialog.d.ts +2 -1
  107. package/esm/browser/components/link-dialog.js +5 -1
  108. package/esm/browser/components/link.d.ts +4 -0
  109. package/esm/browser/components/link.js +11 -0
  110. package/esm/browser/components/loading.d.ts +12 -0
  111. package/esm/browser/components/loading.js +18 -0
  112. package/esm/browser/components/markdown.js +2 -1
  113. package/esm/browser/components/mermaid-view.js +14 -7
  114. package/esm/browser/components/message-images.js +1 -1
  115. package/esm/browser/components/message-list.js +12 -7
  116. package/esm/browser/components/message-steps.js +31 -23
  117. package/esm/browser/components/message-user.d.ts +10 -1
  118. package/esm/browser/components/message-user.js +48 -13
  119. package/esm/browser/components/model-picker.d.ts +3 -1
  120. package/esm/browser/components/model-picker.js +14 -3
  121. package/esm/browser/components/nav-places.d.ts +7 -12
  122. package/esm/browser/components/nav-places.js +10 -13
  123. package/esm/browser/components/phone-shell.d.ts +1 -1
  124. package/esm/browser/components/scan-screen.d.ts +4 -2
  125. package/esm/browser/components/scan-screen.js +46 -20
  126. package/esm/browser/components/search-page.js +3 -2
  127. package/esm/browser/components/secret-peek.d.ts +3 -0
  128. package/esm/browser/components/secret-peek.js +19 -0
  129. package/esm/browser/components/secret-text.d.ts +41 -0
  130. package/esm/browser/components/secret-text.js +80 -0
  131. package/esm/browser/components/session-view.js +44 -13
  132. package/esm/browser/components/settings-choices.d.ts +3 -3
  133. package/esm/browser/components/settings-choices.js +9 -29
  134. package/esm/browser/components/settings-parts.js +5 -2
  135. package/esm/browser/components/settings-view.js +2 -2
  136. package/esm/browser/components/share-dialog.d.ts +2 -3
  137. package/esm/browser/components/share-dialog.js +6 -41
  138. package/esm/browser/components/share-friends.d.ts +18 -0
  139. package/esm/browser/components/share-friends.js +56 -0
  140. package/esm/browser/components/share-sheet.d.ts +15 -0
  141. package/esm/browser/components/share-sheet.js +79 -0
  142. package/esm/browser/components/side-lists.d.ts +16 -4
  143. package/esm/browser/components/side-lists.js +28 -12
  144. package/esm/browser/components/sign-in-accounts.d.ts +2 -1
  145. package/esm/browser/components/sign-in-accounts.js +59 -5
  146. package/esm/browser/components/sign-in-label.d.ts +5 -0
  147. package/esm/browser/components/sign-in-label.js +10 -0
  148. package/esm/browser/components/system-link-host.d.ts +2 -0
  149. package/esm/browser/components/system-link-host.js +17 -0
  150. package/esm/browser/components/tool-result.d.ts +3 -2
  151. package/esm/browser/components/tool-result.js +5 -3
  152. package/esm/browser/components/tool-view.d.ts +21 -3
  153. package/esm/browser/components/tool-view.js +103 -35
  154. package/esm/browser/components/unseen-drop.d.ts +2 -1
  155. package/esm/browser/components/unseen-drop.js +1 -1
  156. package/esm/browser/components/voice-services.js +26 -3
  157. package/esm/browser/components/workbench-view.d.ts +1 -1
  158. package/esm/browser/components/workbench-view.js +42 -5
  159. package/esm/browser/device/code-scan.d.ts +23 -10
  160. package/esm/browser/device/code-scan.js +48 -43
  161. package/esm/browser/device/edge-back.d.ts +17 -0
  162. package/esm/browser/device/edge-back.js +52 -0
  163. package/esm/browser/device/launch-screen.d.ts +1 -1
  164. package/esm/browser/device/launch-screen.js +2 -2
  165. package/esm/browser/device/screen-awake.d.ts +24 -0
  166. package/esm/browser/device/screen-awake.js +59 -0
  167. package/esm/browser/extension/icons.js +13 -2
  168. package/esm/browser/extension/share-sheet-compat.d.ts +11 -0
  169. package/esm/browser/extension/share-sheet-compat.js +27 -0
  170. package/esm/browser/extension/web-api-chats.d.ts +49 -0
  171. package/esm/browser/extension/web-api-chats.js +2 -0
  172. package/esm/browser/extension/web-api-components.d.ts +61 -6
  173. package/esm/browser/extension/web-api-contributions.d.ts +28 -53
  174. package/esm/browser/extension/web-api-screen-share.d.ts +10 -0
  175. package/esm/browser/extension/web-api-screen-share.js +3 -0
  176. package/esm/browser/extension/web-api-services.d.ts +50 -0
  177. package/esm/browser/extension/web-api-services.js +2 -0
  178. package/esm/browser/extension/web-extension-api.d.ts +45 -65
  179. package/esm/browser/extension/web-extension-context.d.ts +5 -10
  180. package/esm/browser/extension/web-extension-context.js +33 -21
  181. package/esm/browser/extension/web-extension-protocol.d.ts +8 -3
  182. package/esm/browser/extension/web-extension-run.js +0 -1
  183. package/esm/browser/extension/web-extensions.d.ts +4 -1
  184. package/esm/browser/extension/web-extensions.js +12 -0
  185. package/esm/browser/extension/web-tasks.d.ts +6 -1
  186. package/esm/browser/extension/web-tasks.js +11 -3
  187. package/esm/browser/extension/web-view-util.d.ts +0 -1
  188. package/esm/browser/extension/web-view-util.js +4 -5
  189. package/esm/browser/files/files.d.ts +1 -0
  190. package/esm/browser/files/files.js +14 -3
  191. package/esm/browser/game/game-control.d.ts +118 -0
  192. package/esm/browser/game/game-control.js +341 -0
  193. package/esm/browser/game/game-host.d.ts +14 -2
  194. package/esm/browser/game/game-host.js +22 -5
  195. package/esm/browser/game/game-protocol.d.ts +15 -0
  196. package/esm/browser/game/game-runner.d.ts +3 -1
  197. package/esm/browser/game/game-runner.js +6 -0
  198. package/esm/browser/game/game-util.d.ts +3 -0
  199. package/esm/browser/game/game-util.js +3 -0
  200. package/esm/browser/game/game-view.d.ts +5 -2
  201. package/esm/browser/game/game-view.js +4 -4
  202. package/esm/browser/game/game3d-protocol.d.ts +5 -1
  203. package/esm/browser/game/game3d-runner.d.ts +3 -1
  204. package/esm/browser/game/game3d-runner.js +14 -0
  205. package/esm/browser/gateway/console-agents.d.ts +11 -0
  206. package/esm/browser/gateway/console-agents.js +128 -0
  207. package/esm/browser/gateway/console-extension.js +0 -1
  208. package/esm/browser/gateway/console-limits.d.ts +19 -0
  209. package/esm/browser/gateway/console-limits.js +164 -0
  210. package/esm/browser/gateway/console-parts.d.ts +29 -22
  211. package/esm/browser/gateway/console-parts.js +67 -137
  212. package/esm/browser/gateway/console-tenant.d.ts +2 -4
  213. package/esm/browser/gateway/console-tenant.js +117 -209
  214. package/esm/browser/gateway/console-trend.js +6 -4
  215. package/esm/browser/gateway/console-view.js +136 -109
  216. package/esm/browser/hooks.js +1 -3
  217. package/esm/browser/hosts.d.ts +7 -0
  218. package/esm/browser/hosts.js +23 -2
  219. package/esm/browser/i18n/locales.d.ts +169 -14
  220. package/esm/browser/i18n/messages-ja.js +178 -23
  221. package/esm/browser/i18n/messages-zh-tw.js +178 -23
  222. package/esm/browser/i18n/messages.d.ts +166 -11
  223. package/esm/browser/i18n/messages.js +357 -47
  224. package/esm/browser/index.d.ts +1 -0
  225. package/esm/browser/index.js +1 -0
  226. package/esm/browser/links/links-protocol.d.ts +10 -1
  227. package/esm/browser/links/links.d.ts +11 -2
  228. package/esm/browser/links/links.js +65 -7
  229. package/esm/browser/links/system-links.d.ts +21 -0
  230. package/esm/browser/links/system-links.js +54 -0
  231. package/esm/browser/markdown/hooks.d.ts +3 -1
  232. package/esm/browser/markdown/hooks.js +11 -3
  233. package/esm/browser/markdown/mermaid.d.ts +18 -4
  234. package/esm/browser/markdown/mermaid.js +117 -17
  235. package/esm/browser/screen/screen-protocol.d.ts +74 -1
  236. package/esm/browser/screen/screen-protocol.js +15 -0
  237. package/esm/browser/screen/screen-scroll.d.ts +55 -0
  238. package/esm/browser/screen/screen-scroll.js +182 -0
  239. package/esm/browser/screen/screen.d.ts +34 -1
  240. package/esm/browser/screen/screen.js +172 -2
  241. package/esm/browser/settings/navigation.d.ts +9 -21
  242. package/esm/browser/settings/navigation.js +11 -31
  243. package/esm/browser/settings/settings-protocol.d.ts +9 -0
  244. package/esm/browser/settings/settings-protocol.js +18 -0
  245. package/esm/browser/settings/settings.d.ts +7 -1
  246. package/esm/browser/settings/settings.js +31 -7
  247. package/esm/browser/share/shared-extensions.js +4 -3
  248. package/esm/browser/share/shared-page.js +2 -2
  249. package/esm/browser/style/base.d.ts +1 -1
  250. package/esm/browser/style/base.js +8 -1
  251. package/esm/browser/style/chat-list.d.ts +1 -1
  252. package/esm/browser/style/chat-list.js +0 -3
  253. package/esm/browser/style/conversation.d.ts +1 -1
  254. package/esm/browser/style/conversation.js +42 -4
  255. package/esm/browser/style/dialogs.d.ts +1 -1
  256. package/esm/browser/style/dialogs.js +31 -1
  257. package/esm/browser/style/layout.d.ts +1 -1
  258. package/esm/browser/style/layout.js +7 -15
  259. package/esm/browser/style/pages.d.ts +1 -1
  260. package/esm/browser/style/pages.js +168 -112
  261. package/esm/browser/style/phone.d.ts +1 -1
  262. package/esm/browser/style/phone.js +10 -3
  263. package/esm/browser/style/shared.d.ts +1 -1
  264. package/esm/browser/style/shared.js +1 -0
  265. package/esm/browser/style/shell.d.ts +1 -1
  266. package/esm/browser/style/shell.js +12 -0
  267. package/esm/browser/style/surfaces.d.ts +1 -1
  268. package/esm/browser/style/surfaces.js +38 -13
  269. package/esm/browser/style/tasks.d.ts +1 -1
  270. package/esm/browser/style/tasks.js +16 -2
  271. package/esm/browser/style/tints.d.ts +5 -4
  272. package/esm/browser/style/tints.js +9 -9
  273. package/esm/browser/util/desktop.d.ts +7 -1
  274. package/esm/browser/util/desktop.js +17 -0
  275. package/esm/browser/util/image-swipe.d.ts +42 -0
  276. package/esm/browser/util/image-swipe.js +66 -0
  277. package/esm/browser/util/process.d.ts +31 -3
  278. package/esm/browser/util/process.js +75 -8
  279. package/esm/browser/util/share-link.d.ts +5 -0
  280. package/esm/browser/util/share-link.js +10 -0
  281. package/esm/browser/util/shell-words.d.ts +18 -0
  282. package/esm/browser/util/shell-words.js +397 -0
  283. package/esm/browser/util/spoken.d.ts +5 -0
  284. package/esm/browser/util/spoken.js +11 -2
  285. package/esm/browser/util/tool.d.ts +9 -0
  286. package/esm/browser/util/tool.js +71 -6
  287. package/esm/browser/util/transcript.js +3 -1
  288. package/esm/browser/util/turn-end.d.ts +17 -0
  289. package/esm/browser/util/turn-end.js +164 -0
  290. package/esm/browser/workbench-hosts.d.ts +8 -1
  291. package/esm/browser/workbench-hosts.js +22 -2
  292. package/esm/browser/workbench-protocol.d.ts +25 -3
  293. package/esm/browser/workbench-services.d.ts +10 -1
  294. package/esm/browser/workbench-services.js +41 -0
  295. package/esm/browser/workbench-util.d.ts +9 -3
  296. package/esm/browser/workbench-util.js +24 -4
  297. package/esm/browser/workbench.d.ts +3 -0
  298. package/esm/browser/workbench.js +36 -9
  299. package/lib/browser/account/account-side.d.ts +14 -0
  300. package/lib/browser/account/account-side.js +111 -0
  301. package/lib/browser/account/device-account.d.ts +70 -0
  302. package/lib/browser/account/device-account.js +219 -0
  303. package/lib/browser/assistant/assistant-chat-list.d.ts +4 -4
  304. package/lib/browser/assistant/assistant-chat-list.js +73 -3
  305. package/lib/browser/assistant/assistant-export.js +5 -1
  306. package/lib/browser/assistant/assistant-extension.js +69 -14
  307. package/lib/browser/assistant/assistant-role.d.ts +2 -2
  308. package/lib/browser/assistant/assistant-role.js +7 -4
  309. package/lib/browser/assistant/assistant-task-source.d.ts +4 -0
  310. package/lib/browser/assistant/assistant-task-source.js +19 -4
  311. package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
  312. package/lib/browser/assistant/assistant-task-util.js +14 -3
  313. package/lib/browser/assistant/assistant-tasks.js +2 -2
  314. package/lib/browser/assistant/assistant-thread.js +4 -0
  315. package/lib/browser/assistant/assistant-view.js +3 -5
  316. package/lib/browser/assistant/assistant.js +2 -1
  317. package/lib/browser/assistant/call-keeper.d.ts +143 -0
  318. package/lib/browser/assistant/call-keeper.js +295 -0
  319. package/lib/browser/assistant/call-screen.d.ts +40 -0
  320. package/lib/browser/assistant/call-screen.js +78 -0
  321. package/lib/browser/assistant/chat-task-source.d.ts +16 -18
  322. package/lib/browser/assistant/chat-task-source.js +28 -53
  323. package/lib/browser/assistant/realtime-voice.d.ts +62 -1
  324. package/lib/browser/assistant/realtime-voice.js +188 -29
  325. package/lib/browser/assistant/task-views.d.ts +9 -6
  326. package/lib/browser/assistant/task-views.js +29 -10
  327. package/lib/browser/assistant/voice-call-bar.d.ts +11 -4
  328. package/lib/browser/assistant/voice-call-bar.js +102 -46
  329. package/lib/browser/assistant/voice-call.d.ts +33 -1
  330. package/lib/browser/assistant/voice-call.js +132 -29
  331. package/lib/browser/assistant/voice-reopen.d.ts +19 -0
  332. package/lib/browser/assistant/voice-reopen.js +58 -0
  333. package/lib/browser/chat/chat-view.js +5 -8
  334. package/lib/browser/cloud/cloud-sign-in.d.ts +101 -0
  335. package/lib/browser/cloud/cloud-sign-in.js +244 -0
  336. package/lib/browser/cloud/device-page.d.ts +16 -0
  337. package/lib/browser/cloud/device-page.js +42 -0
  338. package/lib/browser/components/access-view.js +24 -0
  339. package/lib/browser/components/account-menu.d.ts +1 -1
  340. package/lib/browser/components/account-menu.js +6 -1
  341. package/lib/browser/components/account-view.d.ts +18 -0
  342. package/lib/browser/components/account-view.js +255 -0
  343. package/lib/browser/components/app-contexts.d.ts +13 -0
  344. package/lib/browser/components/app-contexts.js +64 -0
  345. package/lib/browser/components/app-nav.d.ts +5 -3
  346. package/lib/browser/components/app-nav.js +11 -8
  347. package/lib/browser/components/app-shell-state.d.ts +2 -2
  348. package/lib/browser/components/app-shell-state.js +33 -28
  349. package/lib/browser/components/app-view.js +109 -78
  350. package/lib/browser/components/auth-view.js +3 -5
  351. package/lib/browser/components/call-pill.d.ts +12 -0
  352. package/lib/browser/components/call-pill.js +55 -0
  353. package/lib/browser/components/chat-home-util.d.ts +113 -0
  354. package/lib/browser/components/chat-home-util.js +126 -0
  355. package/lib/browser/components/chat-home.d.ts +55 -0
  356. package/lib/browser/components/chat-home.js +164 -0
  357. package/lib/browser/components/chat-icon.d.ts +4 -2
  358. package/lib/browser/components/chat-icon.js +15 -5
  359. package/lib/browser/components/chat-list-hooks.d.ts +31 -0
  360. package/lib/browser/components/chat-list-hooks.js +120 -0
  361. package/lib/browser/components/chat-list-props.d.ts +55 -0
  362. package/lib/browser/components/chat-list-props.js +3 -0
  363. package/lib/browser/components/chat-list-row.d.ts +14 -2
  364. package/lib/browser/components/chat-list-row.js +27 -16
  365. package/lib/browser/components/chat-list-util.d.ts +40 -9
  366. package/lib/browser/components/chat-list-util.js +73 -10
  367. package/lib/browser/components/chat-list.d.ts +4 -49
  368. package/lib/browser/components/chat-list.js +121 -90
  369. package/lib/browser/components/cloud-sign-in-view.d.ts +66 -0
  370. package/lib/browser/components/cloud-sign-in-view.js +394 -0
  371. package/lib/browser/components/code-editor.js +2 -1
  372. package/lib/browser/components/composer-box.js +7 -0
  373. package/lib/browser/components/connection-bar.js +22 -3
  374. package/lib/browser/components/context-menu.d.ts +11 -2
  375. package/lib/browser/components/context-menu.js +14 -3
  376. package/lib/browser/components/conversation-scroll.d.ts +2 -0
  377. package/lib/browser/components/conversation-scroll.js +14 -0
  378. package/lib/browser/components/device-sign-in-page.d.ts +13 -0
  379. package/lib/browser/components/device-sign-in-page.js +110 -0
  380. package/lib/browser/components/diff-editor.js +2 -1
  381. package/lib/browser/components/entry-holds.d.ts +23 -0
  382. package/lib/browser/components/entry-holds.js +86 -0
  383. package/lib/browser/components/environment-view.js +8 -8
  384. package/lib/browser/components/face.d.ts +1 -1
  385. package/lib/browser/components/fold-text.js +3 -1
  386. package/lib/browser/components/fork-view.js +2 -4
  387. package/lib/browser/components/gallery.js +2 -1
  388. package/lib/browser/components/held-talk.d.ts +6 -2
  389. package/lib/browser/components/held-talk.js +20 -2
  390. package/lib/browser/components/host-view.d.ts +11 -4
  391. package/lib/browser/components/host-view.js +60 -13
  392. package/lib/browser/components/image-swipe.d.ts +51 -0
  393. package/lib/browser/components/image-swipe.js +143 -0
  394. package/lib/browser/components/image-viewer.d.ts +10 -114
  395. package/lib/browser/components/image-viewer.js +47 -368
  396. package/lib/browser/components/image-zoom.d.ts +113 -0
  397. package/lib/browser/components/image-zoom.js +359 -0
  398. package/lib/browser/components/kept-call-bar.d.ts +13 -0
  399. package/lib/browser/components/kept-call-bar.js +135 -0
  400. package/lib/browser/components/lightbox.d.ts +6 -2
  401. package/lib/browser/components/lightbox.js +4 -3
  402. package/lib/browser/components/link-dialog.d.ts +2 -1
  403. package/lib/browser/components/link-dialog.js +5 -1
  404. package/lib/browser/components/link.d.ts +4 -0
  405. package/lib/browser/components/link.js +12 -0
  406. package/lib/browser/components/loading.d.ts +13 -0
  407. package/lib/browser/components/loading.js +55 -0
  408. package/lib/browser/components/markdown.js +2 -1
  409. package/lib/browser/components/mermaid-view.js +13 -6
  410. package/lib/browser/components/message-images.js +1 -1
  411. package/lib/browser/components/message-list.js +12 -7
  412. package/lib/browser/components/message-steps.js +31 -23
  413. package/lib/browser/components/message-user.d.ts +10 -1
  414. package/lib/browser/components/message-user.js +48 -12
  415. package/lib/browser/components/model-picker.d.ts +3 -1
  416. package/lib/browser/components/model-picker.js +14 -3
  417. package/lib/browser/components/nav-places.d.ts +7 -12
  418. package/lib/browser/components/nav-places.js +10 -13
  419. package/lib/browser/components/phone-shell.d.ts +1 -1
  420. package/lib/browser/components/scan-screen.d.ts +4 -2
  421. package/lib/browser/components/scan-screen.js +47 -20
  422. package/lib/browser/components/search-page.js +3 -2
  423. package/lib/browser/components/secret-peek.d.ts +4 -0
  424. package/lib/browser/components/secret-peek.js +55 -0
  425. package/lib/browser/components/secret-text.d.ts +42 -0
  426. package/lib/browser/components/secret-text.js +118 -0
  427. package/lib/browser/components/session-view.js +43 -12
  428. package/lib/browser/components/settings-choices.d.ts +3 -3
  429. package/lib/browser/components/settings-choices.js +8 -28
  430. package/lib/browser/components/settings-parts.js +4 -1
  431. package/lib/browser/components/settings-view.js +2 -2
  432. package/lib/browser/components/share-dialog.d.ts +2 -3
  433. package/lib/browser/components/share-dialog.js +5 -40
  434. package/lib/browser/components/share-friends.d.ts +19 -0
  435. package/lib/browser/components/share-friends.js +93 -0
  436. package/lib/browser/components/share-sheet.d.ts +16 -0
  437. package/lib/browser/components/share-sheet.js +115 -0
  438. package/lib/browser/components/side-lists.d.ts +16 -4
  439. package/lib/browser/components/side-lists.js +28 -12
  440. package/lib/browser/components/sign-in-accounts.d.ts +2 -1
  441. package/lib/browser/components/sign-in-accounts.js +59 -5
  442. package/lib/browser/components/sign-in-label.d.ts +6 -0
  443. package/lib/browser/components/sign-in-label.js +13 -0
  444. package/lib/browser/components/system-link-host.d.ts +3 -0
  445. package/lib/browser/components/system-link-host.js +53 -0
  446. package/lib/browser/components/tool-result.d.ts +3 -2
  447. package/lib/browser/components/tool-result.js +5 -3
  448. package/lib/browser/components/tool-view.d.ts +21 -3
  449. package/lib/browser/components/tool-view.js +104 -36
  450. package/lib/browser/components/unseen-drop.d.ts +2 -1
  451. package/lib/browser/components/unseen-drop.js +1 -1
  452. package/lib/browser/components/voice-services.js +23 -0
  453. package/lib/browser/components/workbench-view.d.ts +1 -1
  454. package/lib/browser/components/workbench-view.js +42 -5
  455. package/lib/browser/device/code-scan.d.ts +23 -10
  456. package/lib/browser/device/code-scan.js +47 -42
  457. package/lib/browser/device/edge-back.d.ts +18 -0
  458. package/lib/browser/device/edge-back.js +89 -0
  459. package/lib/browser/device/launch-screen.d.ts +1 -1
  460. package/lib/browser/device/launch-screen.js +2 -2
  461. package/lib/browser/device/screen-awake.d.ts +25 -0
  462. package/lib/browser/device/screen-awake.js +63 -0
  463. package/lib/browser/extension/icons.js +12 -1
  464. package/lib/browser/extension/share-sheet-compat.d.ts +12 -0
  465. package/lib/browser/extension/share-sheet-compat.js +30 -0
  466. package/lib/browser/extension/web-api-chats.d.ts +50 -0
  467. package/lib/browser/extension/web-api-chats.js +3 -0
  468. package/lib/browser/extension/web-api-components.d.ts +61 -6
  469. package/lib/browser/extension/web-api-contributions.d.ts +28 -53
  470. package/lib/browser/extension/web-api-screen-share.d.ts +11 -0
  471. package/lib/browser/extension/web-api-screen-share.js +6 -0
  472. package/lib/browser/extension/web-api-services.d.ts +51 -0
  473. package/lib/browser/extension/web-api-services.js +3 -0
  474. package/lib/browser/extension/web-extension-api.d.ts +45 -65
  475. package/lib/browser/extension/web-extension-context.d.ts +5 -10
  476. package/lib/browser/extension/web-extension-context.js +33 -21
  477. package/lib/browser/extension/web-extension-protocol.d.ts +8 -3
  478. package/lib/browser/extension/web-extension-run.js +0 -1
  479. package/lib/browser/extension/web-extensions.d.ts +4 -1
  480. package/lib/browser/extension/web-extensions.js +12 -0
  481. package/lib/browser/extension/web-tasks.d.ts +6 -1
  482. package/lib/browser/extension/web-tasks.js +11 -3
  483. package/lib/browser/extension/web-view-util.d.ts +0 -1
  484. package/lib/browser/extension/web-view-util.js +4 -5
  485. package/lib/browser/files/files.d.ts +1 -0
  486. package/lib/browser/files/files.js +14 -3
  487. package/lib/browser/game/game-control.d.ts +119 -0
  488. package/lib/browser/game/game-control.js +345 -0
  489. package/lib/browser/game/game-host.d.ts +14 -2
  490. package/lib/browser/game/game-host.js +22 -5
  491. package/lib/browser/game/game-protocol.d.ts +15 -0
  492. package/lib/browser/game/game-runner.d.ts +3 -1
  493. package/lib/browser/game/game-runner.js +6 -0
  494. package/lib/browser/game/game-util.d.ts +3 -0
  495. package/lib/browser/game/game-util.js +3 -0
  496. package/lib/browser/game/game-view.d.ts +5 -2
  497. package/lib/browser/game/game-view.js +4 -4
  498. package/lib/browser/game/game3d-protocol.d.ts +5 -1
  499. package/lib/browser/game/game3d-runner.d.ts +3 -1
  500. package/lib/browser/game/game3d-runner.js +14 -0
  501. package/lib/browser/gateway/console-agents.d.ts +12 -0
  502. package/lib/browser/gateway/console-agents.js +165 -0
  503. package/lib/browser/gateway/console-extension.js +0 -1
  504. package/lib/browser/gateway/console-limits.d.ts +20 -0
  505. package/lib/browser/gateway/console-limits.js +200 -0
  506. package/lib/browser/gateway/console-parts.d.ts +29 -22
  507. package/lib/browser/gateway/console-parts.js +72 -141
  508. package/lib/browser/gateway/console-tenant.d.ts +2 -4
  509. package/lib/browser/gateway/console-tenant.js +115 -208
  510. package/lib/browser/gateway/console-trend.js +6 -4
  511. package/lib/browser/gateway/console-view.js +134 -107
  512. package/lib/browser/hooks.js +1 -3
  513. package/lib/browser/hosts.d.ts +7 -0
  514. package/lib/browser/hosts.js +23 -2
  515. package/lib/browser/i18n/locales.d.ts +169 -14
  516. package/lib/browser/i18n/messages-ja.js +178 -23
  517. package/lib/browser/i18n/messages-zh-tw.js +178 -23
  518. package/lib/browser/i18n/messages.d.ts +166 -11
  519. package/lib/browser/i18n/messages.js +357 -47
  520. package/lib/browser/index.d.ts +1 -0
  521. package/lib/browser/index.js +1 -0
  522. package/lib/browser/links/links-protocol.d.ts +10 -1
  523. package/lib/browser/links/links.d.ts +11 -2
  524. package/lib/browser/links/links.js +65 -7
  525. package/lib/browser/links/system-links.d.ts +22 -0
  526. package/lib/browser/links/system-links.js +58 -0
  527. package/lib/browser/markdown/hooks.d.ts +3 -1
  528. package/lib/browser/markdown/hooks.js +12 -3
  529. package/lib/browser/markdown/mermaid.d.ts +18 -4
  530. package/lib/browser/markdown/mermaid.js +117 -17
  531. package/lib/browser/screen/screen-protocol.d.ts +74 -1
  532. package/lib/browser/screen/screen-protocol.js +15 -0
  533. package/lib/browser/screen/screen-scroll.d.ts +56 -0
  534. package/lib/browser/screen/screen-scroll.js +185 -0
  535. package/lib/browser/screen/screen.d.ts +34 -1
  536. package/lib/browser/screen/screen.js +172 -2
  537. package/lib/browser/settings/navigation.d.ts +9 -21
  538. package/lib/browser/settings/navigation.js +11 -31
  539. package/lib/browser/settings/settings-protocol.d.ts +9 -0
  540. package/lib/browser/settings/settings-protocol.js +19 -1
  541. package/lib/browser/settings/settings.d.ts +7 -1
  542. package/lib/browser/settings/settings.js +31 -7
  543. package/lib/browser/share/shared-extensions.js +4 -3
  544. package/lib/browser/share/shared-page.js +2 -2
  545. package/lib/browser/style/base.d.ts +1 -1
  546. package/lib/browser/style/base.js +8 -1
  547. package/lib/browser/style/chat-list.d.ts +1 -1
  548. package/lib/browser/style/chat-list.js +0 -3
  549. package/lib/browser/style/conversation.d.ts +1 -1
  550. package/lib/browser/style/conversation.js +42 -4
  551. package/lib/browser/style/dialogs.d.ts +1 -1
  552. package/lib/browser/style/dialogs.js +31 -1
  553. package/lib/browser/style/layout.d.ts +1 -1
  554. package/lib/browser/style/layout.js +7 -15
  555. package/lib/browser/style/pages.d.ts +1 -1
  556. package/lib/browser/style/pages.js +168 -112
  557. package/lib/browser/style/phone.d.ts +1 -1
  558. package/lib/browser/style/phone.js +10 -3
  559. package/lib/browser/style/shared.d.ts +1 -1
  560. package/lib/browser/style/shared.js +1 -0
  561. package/lib/browser/style/shell.d.ts +1 -1
  562. package/lib/browser/style/shell.js +12 -0
  563. package/lib/browser/style/surfaces.d.ts +1 -1
  564. package/lib/browser/style/surfaces.js +38 -13
  565. package/lib/browser/style/tasks.d.ts +1 -1
  566. package/lib/browser/style/tasks.js +16 -2
  567. package/lib/browser/style/tints.d.ts +5 -4
  568. package/lib/browser/style/tints.js +9 -9
  569. package/lib/browser/util/desktop.d.ts +7 -1
  570. package/lib/browser/util/desktop.js +17 -0
  571. package/lib/browser/util/image-swipe.d.ts +43 -0
  572. package/lib/browser/util/image-swipe.js +69 -0
  573. package/lib/browser/util/process.d.ts +31 -3
  574. package/lib/browser/util/process.js +74 -7
  575. package/lib/browser/util/share-link.d.ts +5 -0
  576. package/lib/browser/util/share-link.js +10 -0
  577. package/lib/browser/util/shell-words.d.ts +19 -0
  578. package/lib/browser/util/shell-words.js +400 -0
  579. package/lib/browser/util/spoken.d.ts +5 -0
  580. package/lib/browser/util/spoken.js +10 -1
  581. package/lib/browser/util/tool.d.ts +9 -0
  582. package/lib/browser/util/tool.js +71 -6
  583. package/lib/browser/util/transcript.js +3 -1
  584. package/lib/browser/util/turn-end.d.ts +18 -0
  585. package/lib/browser/util/turn-end.js +167 -0
  586. package/lib/browser/workbench-hosts.d.ts +8 -1
  587. package/lib/browser/workbench-hosts.js +22 -2
  588. package/lib/browser/workbench-protocol.d.ts +25 -3
  589. package/lib/browser/workbench-services.d.ts +10 -1
  590. package/lib/browser/workbench-services.js +41 -0
  591. package/lib/browser/workbench-util.d.ts +9 -3
  592. package/lib/browser/workbench-util.js +24 -4
  593. package/lib/browser/workbench.d.ts +3 -0
  594. package/lib/browser/workbench.js +35 -8
  595. package/package.json +7 -7
  596. package/esm/browser/components/list-skeleton.d.ts +0 -10
  597. package/esm/browser/components/list-skeleton.js +0 -31
  598. package/lib/browser/components/list-skeleton.d.ts +0 -11
  599. package/lib/browser/components/list-skeleton.js +0 -68
@@ -1,4 +1,4 @@
1
- import { TaTaskNote } from '@celljs/ta-protocol';
1
+ import { TaSaid, TaTaskNote } from '@celljs/ta-protocol';
2
2
  import { MessageUtil } from '../util/message.js';
3
3
  export var AssistantExport;
4
4
  (function (AssistantExport) {
@@ -22,7 +22,11 @@ export var AssistantExport;
22
22
  parts.push('', `## ${labels.task} · ${note.title} · ${labels.status(note.status)}`, '', note.body.trim());
23
23
  }
24
24
  else if (!note) {
25
- parts.push('', `## ${message.role === 'user' ? labels.user : labels.ta}`, '', text);
25
+ // What a person reads of it (TaSaid): no context for the model, no summary of a compacted context.
26
+ const said = TaSaid.words(message.role, text);
27
+ if (said) {
28
+ parts.push('', `## ${message.role === 'user' ? labels.user : labels.ta}`, '', said);
29
+ }
26
30
  }
27
31
  }
28
32
  return `${parts.join('\n')}\n`;
@@ -8,11 +8,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { Autowired, Component } from '@celljs/core';
11
- import { Bot, Copy, Download, Hand, ListTodo, MessagesSquare, Pencil, RotateCcw, ScrollText, Sparkles, Square, Trash2 } from 'lucide-react';
11
+ import { Bot, CircleSlash, Copy, Download, Hand, ListTodo, MessagesSquare, Pencil, RotateCcw, ScrollText, Sparkles, Square, Trash2 } from 'lucide-react';
12
12
  import * as React from 'react';
13
13
  import { REMOVED_CHATS } from '../chat/chat-protocol.js';
14
14
  import { ChatAskUtil, LET_GO_ASKS } from '../components/chat-asks.js';
15
15
  import { ChatIconTile, ChatIconUtil } from '../components/chat-icon.js';
16
+ import { ChatListUtil } from '../components/chat-list-util.js';
16
17
  import { SEEN_CHATS } from '../components/chat-seen.js';
17
18
  import { DinoLookPicker } from '../components/dino-look-picker.js';
18
19
  import { BuiltinWebExtension, TaWebExtensions } from '../extension/web-extension-protocol.js';
@@ -27,9 +28,23 @@ import { AssistantTaskSource } from './assistant-task-source.js';
27
28
  import { ASSISTANT_NAME, ASSISTANT_TASKS_VIEW, AssistantPanel, AssistantTasks, AssistantTaskView } from './assistant-view.js';
28
29
  import { ChatTaskSource } from './chat-task-source.js';
29
30
  import { TasksBoardCard } from './task-card.js';
30
- /** The face of the row of the conversations going on: as the folders of the chats draw theirs. */
31
- function chatsIcon({ size }) {
32
- return React.createElement(ChatIconTile, { found: { icon: MessagesSquare, tint: 'chats' }, size });
31
+ /** Faces of conversations as the chats draw them, one component for each look, so that a row drawn again keeps it. */
32
+ const letterFaces = new Map();
33
+ const iconFaces = new WeakMap();
34
+ /** The face of a conversation: the icon an extension gives it, else the letter of its directory in its tone. */
35
+ function chatFace(found, initial, tone) {
36
+ var _a, _b, _c;
37
+ if (found) {
38
+ const tints = (_a = iconFaces.get(found.icon)) !== null && _a !== void 0 ? _a : new Map();
39
+ iconFaces.set(found.icon, tints);
40
+ const face = (_b = tints.get(found.tint)) !== null && _b !== void 0 ? _b : (({ size }) => React.createElement(ChatIconTile, { found, size }));
41
+ tints.set(found.tint, face);
42
+ return face;
43
+ }
44
+ const key = `${tone}:${initial}`;
45
+ const face = (_c = letterFaces.get(key)) !== null && _c !== void 0 ? _c : (({ size }) => React.createElement('span', { className: `ta-chat-avatar ta-tone-${tone}`, style: { width: size, height: size }, 'aria-hidden': true }, initial));
46
+ letterFaces.set(key, face);
47
+ return face;
33
48
  }
34
49
  function download(name, text) {
35
50
  const url = URL.createObjectURL(new Blob([text], { type: 'text/markdown;charset=utf-8' }));
@@ -68,11 +83,31 @@ let AssistantWebExtension = class AssistantWebExtension {
68
83
  await this.assistant.removeTask(task.id);
69
84
  pi.ui.closeEditor(editorId(task));
70
85
  };
71
- /** What can be done with a task, in its … wherever it shows: stop or take over, then remove (a running one is stopped first). */
86
+ /** The conversation of a task, when its turn is over and it asks the user to decide (not let go). */
87
+ const askingEntry = (task) => {
88
+ if (task.status === 'running' || task.takenOver) {
89
+ return undefined;
90
+ }
91
+ const { sessions, saved } = this.workbench.state;
92
+ const entry = ChatAskUtil.entryOf(sessions, saved, task);
93
+ return entry && ChatAskUtil.asking(entry, this.persisted.get(LET_GO_ASKS)) ? entry : undefined;
94
+ };
95
+ /** What can be done with a task, in its … wherever it shows: stop, let its ask go or take over, then remove (a running one is stopped first). */
72
96
  const taskMenu = (task) => {
73
97
  const running = task.status === 'running' && !task.takenOver;
98
+ const asks = askingEntry(task);
74
99
  return [
75
100
  [
101
+ ...(asks
102
+ ? [
103
+ {
104
+ key: 'letGo',
105
+ label: t('ta.chat.letGo'),
106
+ icon: CircleSlash,
107
+ run: () => this.persisted.set(LET_GO_ASKS, ChatAskUtil.letGoAll(this.persisted.get(LET_GO_ASKS), [asks])),
108
+ },
109
+ ]
110
+ : []),
76
111
  ...(running
77
112
  ? [{ key: 'stop', label: t('ta.assistant.stop'), icon: Square, run: () => void this.assistant.stopTask(task.id).catch(fail) }]
78
113
  : []),
@@ -102,15 +137,18 @@ let AssistantWebExtension = class AssistantWebExtension {
102
137
  const tasks = new AssistantTaskSource(this.assistant, {
103
138
  t: (id, values) => translator(pi.ui.language)(id, values),
104
139
  open: openTask,
140
+ show: task => {
141
+ if (task.sessionFile) {
142
+ void pi.openChat(task.sessionFile).catch(fail);
143
+ }
144
+ else {
145
+ openTask(task);
146
+ }
147
+ },
105
148
  openDouble: () => pi.ui.showView(`${ASSISTANT_NAME}/assistant`),
106
149
  menu: taskMenu,
107
150
  remove,
108
- asking: task => {
109
- var _a;
110
- const { sessions, saved } = this.workbench.state;
111
- const entry = ChatAskUtil.entryOf(sessions, saved, task);
112
- return entry && ((_a = ChatAskUtil.asking(entry, this.persisted.get(LET_GO_ASKS))) === null || _a === void 0 ? void 0 : _a.question);
113
- },
151
+ asking: task => { var _a, _b; return (_b = (_a = askingEntry(task)) === null || _a === void 0 ? void 0 : _a.asking) === null || _b === void 0 ? void 0 : _b.question; },
114
152
  watchAsking: listener => {
115
153
  const stops = [this.workbench.subscribe(() => listener()), this.persisted.subscribe(() => listener())];
116
154
  return () => {
@@ -121,7 +159,7 @@ let AssistantWebExtension = class AssistantWebExtension {
121
159
  },
122
160
  });
123
161
  pi.registerTasks(tasks);
124
- // The conversations the user has going on themselves: one row of the tasks, which opens them in the chats.
162
+ // The conversations of the user's own that wait for them to decide, under the double on its list.
125
163
  // The runs of a scheduled task are theirs too, folded into a folder of the chats (WebChatIcon.folder).
126
164
  const folderOf = () => ChatIconUtil.folderOf(this.extensions.state.chatIcons);
127
165
  const chatTasks = new ChatTaskSource({
@@ -156,9 +194,26 @@ let AssistantWebExtension = class AssistantWebExtension {
156
194
  }
157
195
  };
158
196
  },
159
- icon: chatsIcon,
160
- open: () => pi.ui.showChats({ busy: true }),
161
- stop: sessionIds => Promise.all(sessionIds.map(id => pi.server.abort(id))).then(() => undefined, fail),
197
+ glyph: MessagesSquare,
198
+ openChat: entry => void pi.openChat(ChatListUtil.file(entry)).catch(fail),
199
+ letGo: entry => {
200
+ var _a;
201
+ const at = (_a = entry.asking) === null || _a === void 0 ? void 0 : _a.at;
202
+ if (at !== undefined) {
203
+ this.persisted.set(LET_GO_ASKS, ChatAskUtil.letGo(this.persisted.get(LET_GO_ASKS), ChatListUtil.file(entry), at));
204
+ }
205
+ },
206
+ face: (entry) => {
207
+ var _a, _b;
208
+ const { sessions, saved } = this.workbench.state;
209
+ const found = ChatIconUtil.find(this.extensions.state.chatIcons, {
210
+ sessionFile: entry.sessionFile,
211
+ cwd: entry.cwd,
212
+ ...(entry.group ? { group: entry.group } : {}),
213
+ });
214
+ const source = ChatListUtil.sources([...sessions, ...saved]).find(each => { var _a; return each.title === ((_a = entry.group) !== null && _a !== void 0 ? _a : entry.cwd); });
215
+ return chatFace(found, (_a = source === null || source === void 0 ? void 0 : source.initial) !== null && _a !== void 0 ? _a : '', (_b = source === null || source === void 0 ? void 0 : source.tone) !== null && _b !== void 0 ? _b : 0);
216
+ },
162
217
  });
163
218
  pi.registerTasks(chatTasks);
164
219
  const registerPage = () => pi.registerView('assistant', {
@@ -1,6 +1,6 @@
1
1
  import { type TaDelegateLevel } from '@celljs/ta-protocol';
2
2
  /** The role of ta in its conversation with the user. */
3
- export declare const ASSISTANT_PROMPT = "You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.\n- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Start independent tasks in parallel. Then tell the user in one sentence what you started.\n- A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.\n- When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.\n- For a change worth checking, give verify: how to check it (a command such as \"bun test\", or what to look at). When such a task ends, its update asks you to start a check: do it with start_task and verifies, and tell the user what the check found.\n- When the user asks what goes on, list_tasks has your tasks and the conversations they have going on themselves. You cannot write to those or stop them: tell the user, and if they want you to follow one, they hand it to you from the list of chats.\n- When a <task_update> message arrives, tell the user how the task ended in one or two sentences, and what they need to decide, if anything. get_task has the details.\n- Ask before anything risky or irreversible the user did not clearly ask for.\n- Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.";
3
+ export declare const ASSISTANT_PROMPT = "You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.\n- To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Say in them what to do and what to answer, never how the answer looks (its length, its format): Ta shows every answer as the user reads it. Start independent tasks in parallel. Then tell the user in one sentence what you started.\n- A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.\n- When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.\n- Give verify only for a change a second look may catch out: code changed across several files, or behavior the user relies on. Not for documents, a small fix of a file or two, research, or what the task checks well itself. verify is one check (a command such as \"bun test\", or one thing to look at), not a list; and when you give it, add no steps of checking again to the instructions: the check does that. When such a task ends, its update asks you to start a check: do it with start_task and verifies, with the instructions it gives as they are, and tell the user what the check found.\n- When the user asks what goes on, list_tasks has your tasks and the conversations they have going on themselves. You cannot write to those or stop them: tell the user, and if they want you to follow one, they hand it to you from the list of chats.\n- When a <task_update> message arrives, the user already sees that the task ended and what it said, its cards too: tell them in one or two sentences what was done and what was not, and whether they need to decide anything. Do not repeat the numbers, lists of files, comparisons or tests it already shows, and write no card of your own for it. With nothing to decide, suggest nothing; with something, name that one thing alone. get_task has the details.\n- Ask before anything risky or irreversible the user did not clearly ask for.\n- Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.";
4
4
  /**
5
5
  * In the role while the user wants to be asked first (Settings.confirmTasks). The team tools of ta-channels
6
6
  * read the same words in the system prompt to ask before they build a team: keep them as they are.
@@ -39,7 +39,7 @@ export declare const ASSISTANT_TOOLS: {
39
39
  };
40
40
  readonly verify: {
41
41
  readonly type: 'string';
42
- readonly description: 'How to check the work once it ends: a command, or what to look at. Its update then asks for a check.';
42
+ readonly description: 'Only for a risky change: the one check to run once it ends, a command or one thing to look at. Its update then asks for a check.';
43
43
  };
44
44
  readonly verifies: {
45
45
  readonly type: 'string';
@@ -1,12 +1,12 @@
1
1
  import { TaDelegateUtil } from '@celljs/ta-protocol';
2
2
  /** The role of ta in its conversation with the user. */
3
3
  export const ASSISTANT_PROMPT = `You are Ta, the user's personal agent: a little green dinosaur they talk to by voice or text in a web page. The user hands you work and mostly does not care how it gets done: you talk with them and hand the work out to tasks, which do it.
4
- - To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Start independent tasks in parallel. Then tell the user in one sentence what you started.
4
+ - To hand out work, call start_task with a short title and complete, self-contained instructions: a task runs in its own session that cannot see this conversation. Say in them what to do and what to answer, never how the answer looks (its length, its format): Ta shows every answer as the user reads it. Start independent tasks in parallel. Then tell the user in one sentence what you started.
5
5
  - A task opens in the user's default directory, which they may change at any time; start_task says which it was. Give a cwd only when the user names a directory.
6
6
  - When tasks change code in parallel, or a change should not touch the user's working copy until they agree, start them with isolate: each works in a git worktree of its own, on a branch of its own, and its update says which; merging is for the user to ask.
7
- - For a change worth checking, give verify: how to check it (a command such as "bun test", or what to look at). When such a task ends, its update asks you to start a check: do it with start_task and verifies, and tell the user what the check found.
7
+ - Give verify only for a change a second look may catch out: code changed across several files, or behavior the user relies on. Not for documents, a small fix of a file or two, research, or what the task checks well itself. verify is one check (a command such as "bun test", or one thing to look at), not a list; and when you give it, add no steps of checking again to the instructions: the check does that. When such a task ends, its update asks you to start a check: do it with start_task and verifies, with the instructions it gives as they are, and tell the user what the check found.
8
8
  - When the user asks what goes on, list_tasks has your tasks and the conversations they have going on themselves. You cannot write to those or stop them: tell the user, and if they want you to follow one, they hand it to you from the list of chats.
9
- - When a <task_update> message arrives, tell the user how the task ended in one or two sentences, and what they need to decide, if anything. get_task has the details.
9
+ - When a <task_update> message arrives, the user already sees that the task ended and what it said, its cards too: tell them in one or two sentences what was done and what was not, and whether they need to decide anything. Do not repeat the numbers, lists of files, comparisons or tests it already shows, and write no card of your own for it. With nothing to decide, suggest nothing; with something, name that one thing alone. get_task has the details.
10
10
  - Ask before anything risky or irreversible the user did not clearly ask for.
11
11
  - Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.`;
12
12
  /**
@@ -44,7 +44,10 @@ export const ASSISTANT_TOOLS = {
44
44
  type: 'boolean',
45
45
  description: 'Work in a git worktree of its own beside the repository, on a branch of its own, so that tasks in parallel and the user do not touch the same files.',
46
46
  },
47
- verify: { type: 'string', description: 'How to check the work once it ends: a command, or what to look at. Its update then asks for a check.' },
47
+ verify: {
48
+ type: 'string',
49
+ description: 'Only for a risky change: the one check to run once it ends, a command or one thing to look at. Its update then asks for a check.',
50
+ },
48
51
  verifies: { type: 'string', description: "The id of the task this one checks: its first line, PASS or FAIL, is that task's verdict." },
49
52
  },
50
53
  required: ['title', 'instructions'],
@@ -4,10 +4,14 @@ import type { Translate } from '../i18n/use-t.js';
4
4
  import type { AssistantAsk, AssistantState, AssistantTask, TaAssistant } from './assistant-protocol.js';
5
5
  /** What a task does now, in a few words: what the loading line of its conversation says (ProgressUtil.text), the same. */
6
6
  export declare function activity(task: AssistantTask, state: SessionState | undefined, t: Translate): string;
7
+ /** How a task came out of a check: its own verdict for a check that ended, else the verdict of the check of it. */
8
+ export declare function verdict(task: AssistantTask): AssistantTask['verdict'];
7
9
  /** What the source does with a task besides listing it: the workbench and the menus are the extension's. */
8
10
  export interface AssistantTaskActions {
9
11
  t: Translate;
10
12
  open(task: AssistantTask): void;
13
+ /** Opens its conversation in the main area (WebTask.show). */
14
+ show?(task: AssistantTask): void;
11
15
  /** Shows the double, where a start waits for the user's go. */
12
16
  openDouble(): void;
13
17
  menu(task: AssistantTask): WebMenuItem[][];
@@ -1,12 +1,20 @@
1
- import { ProcessUtil } from '../util/process.js';
1
+ import { TaSaid } from '@celljs/ta-protocol';
2
+ import { ShieldCheck } from 'lucide-react';
2
3
  import { ProgressUtil } from '../util/progress.js';
4
+ import { AssistantTaskUtil } from './assistant-task-util.js';
3
5
  /** What a task does now, in a few words: what the loading line of its conversation says (ProgressUtil.text), the same. */
4
6
  export function activity(task, state, t) {
5
- var _a;
6
7
  if (task.status === 'running' && (state === null || state === void 0 ? void 0 : state.working)) {
7
8
  return ProgressUtil.text(ProgressUtil.phase(state), t, { working: state.workingMessage });
8
9
  }
9
- return task.status === 'running' ? t('ta.task.running') : ProcessUtil.preview((_a = task.result) !== null && _a !== void 0 ? _a : '', 80) || t(`ta.task.${task.status}`);
10
+ // A check's words follow its verdict, which the list says in words of the user's language.
11
+ const said = task.verifies ? AssistantTaskUtil.verdictReason(task.result) : task.result;
12
+ // A card of its reply (ta-glance) is drawn in its conversation, not read out here.
13
+ return task.status === 'running' ? t('ta.task.running') : TaSaid.line(said !== null && said !== void 0 ? said : '', { chars: 80 }) || t(`ta.task.${task.status}`);
14
+ }
15
+ /** How a task came out of a check: its own verdict for a check that ended, else the verdict of the check of it. */
16
+ export function verdict(task) {
17
+ return task.verifies ? (task.status === 'done' ? AssistantTaskUtil.verdictOf(task.result) : undefined) : task.verdict;
10
18
  }
11
19
  /**
12
20
  * The double's own tasks as a source of WebExtensionAPI.registerTasks, which lists them with those of
@@ -134,7 +142,7 @@ export class AssistantTaskSource {
134
142
  }
135
143
  // How a check found it, and the branch it is on, before what it did.
136
144
  const marks = [
137
- task.verdict && t(task.verdict === 'pass' ? 'ta.task.verdictPass' : 'ta.task.verdictFail'),
145
+ verdict(task) && t(verdict(task) === 'pass' ? 'ta.task.verdictPass' : 'ta.task.verdictFail'),
138
146
  task.worktree && t('ta.task.branch', { branch: task.worktree.branch }),
139
147
  ].filter(Boolean);
140
148
  const said = activity(task, state, t);
@@ -151,15 +159,21 @@ export class AssistantTaskSource {
151
159
  };
152
160
  }
153
161
  entry(task, status, detail) {
162
+ var _a;
154
163
  return {
155
164
  id: task.id,
156
165
  title: task.title,
157
166
  status,
158
167
  detail,
168
+ ...(verdict(task) ? { tone: verdict(task) === 'pass' ? 'good' : 'bad' } : {}),
169
+ // A check of another task's work says so on its tile.
170
+ ...(task.verifies ? { glyph: ShieldCheck } : {}),
159
171
  startedAt: task.startedAt,
160
172
  endedAt: task.endedAt,
161
173
  origin: task.origin,
174
+ session: (_a = task.sessionFile) !== null && _a !== void 0 ? _a : task.sessionId,
162
175
  open: () => this.actions.open(task),
176
+ ...(this.actions.show ? { show: () => { var _a, _b; return (_b = (_a = this.actions).show) === null || _b === void 0 ? void 0 : _b.call(_a, task); } } : {}),
163
177
  menu: () => this.actions.menu(task),
164
178
  remove: () => this.actions.remove(task),
165
179
  removeHint: this.actions.t('ta.task.removeHint'),
@@ -53,8 +53,16 @@ export declare namespace AssistantTaskUtil {
53
53
  function updateNote(task: AssistantTask): string;
54
54
  /** What a task that checks another is told: look at its change, run the check, and say PASS or FAIL first. */
55
55
  function checkInstructions(task: Pick<AssistantTask, 'title' | 'verify' | 'worktree' | 'result'>): string;
56
+ /**
57
+ * How a check answers, added to its instructions whatever the double wrote: the verdict alone on the first line
58
+ * (verdictOf), then what it ran and what it showed as it shows any result to the user, a card where its replies
59
+ * are drawn as cards, not lines of plain words.
60
+ */
61
+ const CHECK_ANSWER = "Answer with PASS or FAIL alone on the first line; after it, show what you ran and what it showed the way you show any result to the user.";
56
62
  /** What a check answered on its first line of words: PASS or FAIL. */
57
63
  function verdictOf(result: string | undefined): 'pass' | 'fail' | undefined;
64
+ /** What a check said after its verdict (verdictOf): its words without PASS or FAIL in front. */
65
+ function verdictReason(result: string | undefined): string;
58
66
  /** The worktree of a task, beside the repository at `root`: `<root>-ta-<id>`, on the branch `ta/<id>-<words of its title>`. */
59
67
  function worktreeOf(root: string, id: string, title: string, at: number): {
60
68
  path: string;
@@ -136,13 +136,19 @@ export var AssistantTaskUtil;
136
136
  ? `the changes of the branch ${task.worktree.branch} since ${task.worktree.base} (git diff ${task.worktree.base})`
137
137
  : 'the changes in this directory (git diff, git status)';
138
138
  return [
139
- `Check the work of another agent on "${task.title}". Do not change any file: only read, and run what checks it.`,
140
- `Look at ${change}, and check it this way: ${task.verify}.`,
139
+ `Check the work of another agent on "${task.title}". Do not change any file.`,
140
+ `Run only this check: ${task.verify}. Look over ${change} once, to see what it covers. Run no other tests, builds or screenshots, and do not review the rest of the code: the agent checked its own work already.`,
141
141
  `What the agent said it did:\n${((_a = task.result) !== null && _a !== void 0 ? _a : '').slice(0, 1500)}`,
142
- 'Answer with PASS or FAIL alone on the first line, then why in a few lines: what you ran and what it showed.',
142
+ AssistantTaskUtil.CHECK_ANSWER,
143
143
  ].join('\n\n');
144
144
  }
145
145
  AssistantTaskUtil.checkInstructions = checkInstructions;
146
+ /**
147
+ * How a check answers, added to its instructions whatever the double wrote: the verdict alone on the first line
148
+ * (verdictOf), then what it ran and what it showed as it shows any result to the user, a card where its replies
149
+ * are drawn as cards, not lines of plain words.
150
+ */
151
+ AssistantTaskUtil.CHECK_ANSWER = 'Answer with PASS or FAIL alone on the first line; after it, show what you ran and what it showed the way you show any result to the user.';
146
152
  /** What a check answered on its first line of words: PASS or FAIL. */
147
153
  function verdictOf(result) {
148
154
  var _a, _b;
@@ -154,6 +160,11 @@ export var AssistantTaskUtil;
154
160
  return word === 'PASS' ? 'pass' : word === 'FAIL' ? 'fail' : undefined;
155
161
  }
156
162
  AssistantTaskUtil.verdictOf = verdictOf;
163
+ /** What a check said after its verdict (verdictOf): its words without PASS or FAIL in front. */
164
+ function verdictReason(result) {
165
+ return (result !== null && result !== void 0 ? result : '').replace(/^[\s*_`#>]*(?:verdict:?\s*)?(?:PASS|FAIL)\b[*_`]*[\s::.,,。—-]*/i, '');
166
+ }
167
+ AssistantTaskUtil.verdictReason = verdictReason;
157
168
  /** The worktree of a task, beside the repository at `root`: `<root>-ta-<id>`, on the branch `ta/<id>-<words of its title>`. */
158
169
  function worktreeOf(root, id, title, at) {
159
170
  const words = title
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { useContextMenu } from '../components/context-menu.js';
4
4
  import { EmptyState } from '../components/empty-state.js';
5
5
  import { Icon, IconButton } from '../components/icon.js';
6
- import { ListSkeleton } from '../components/list-skeleton.js';
6
+ import { Loading } from '../components/loading.js';
7
7
  import { Markdown } from '../components/markdown.js';
8
8
  import { SessionView } from '../components/session-view.js';
9
9
  import { useRemoveTasks, useTasks, useWorkbench } from '../hooks.js';
@@ -85,6 +85,6 @@ export function AssistantTaskView({ taskId, onTakeOver, onTasks, menu }) {
85
85
  store ? (React.createElement(SessionView, { store: store, server: workbench.server, workspace: workbench.workspace, info: info, onClosed: () => setClosed(store), onActivity: () => undefined })) : failed ? (React.createElement("div", { className: "ta-scroll" },
86
86
  React.createElement("div", { className: "ta-task-result" },
87
87
  React.createElement("p", { className: "ta-task-result-note" }, t('ta.assistant.taskEnded')),
88
- React.createElement(Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(ListSkeleton, { rows: 3 }))));
88
+ React.createElement(Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(Loading, null))));
89
89
  }
90
90
  //# sourceMappingURL=assistant-tasks.js.map
@@ -1,3 +1,4 @@
1
+ import { TaMessageSource } from '@celljs/ta-protocol';
1
2
  import { ChevronRight } from 'lucide-react';
2
3
  import * as React from 'react';
3
4
  import { Callout } from '../components/callout.js';
@@ -8,7 +9,7 @@ import { TimeBreak, TurnFooter, UserFooter } from '../components/message-footer.
8
9
  import { endsInSteps, quiet, TurnAvatar } from '../components/message-list.js';
9
10
  import { useMessageMenu } from '../components/message-menu.js';
10
11
  import { Process } from '../components/message-steps.js';
11
- import { SkillUse, UserMarks, UserSaid, userWords } from '../components/message-user.js';
12
+ import { NoticeMessage, SkillUse, UserMarks, UserSaid, userWords } from '../components/message-user.js';
12
13
  import { RunStatus } from '../components/run-status.js';
13
14
  import { CustomMessage, MessageRenderers } from '../extension/extension-view.js';
14
15
  import { WebTaskUtil } from '../extension/web-tasks.js';
@@ -97,6 +98,9 @@ export function AssistantThread({ state, reply, tasks, origin, onTask, t }) {
97
98
  React.createElement("span", { className: "ta-task-update-text" }, line),
98
99
  React.createElement(Icon, { icon: ChevronRight, size: 13, className: "ta-task-update-chevron" }))) : null;
99
100
  }
101
+ if (TaMessageSource.isNotice(text)) {
102
+ return React.createElement(NoticeMessage, { key: item.key, message: item.message });
103
+ }
100
104
  return React.createElement(DoubleUserMessage, { key: item.key, message: item.message, blocks: blocks });
101
105
  };
102
106
  return (React.createElement(CodeReply.Provider, { value: reply },
@@ -10,6 +10,7 @@ import { DialogView } from '../components/dialog-view.js';
10
10
  import { isAsk, useAsked, useEarlierMessages } from '../components/earlier-messages.js';
11
11
  import { HeroCards, HeroSteps } from '../components/hero-cards.js';
12
12
  import { Icon } from '../components/icon.js';
13
+ import { Loading } from '../components/loading.js';
13
14
  import { useMessageActions } from '../components/message-actions.js';
14
15
  import { MessageActions } from '../components/message-footer.js';
15
16
  import { MessageImages } from '../components/message-images.js';
@@ -111,7 +112,7 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
111
112
  voice: () => voice,
112
113
  send: text => say(text),
113
114
  ended: (reason, detail) => notices.notify(callEndedNotice(t, reason, detail)),
114
- }, { sessionId: store.sessionId, double: true });
115
+ }, { sessionId: store.sessionId, double: true }, name || 'Ta');
115
116
  const mood = moodOf({
116
117
  working: state.working,
117
118
  attention: attentions.length > 0 || asks.length > 0,
@@ -356,9 +357,6 @@ export function AssistantPanel({ onTask }) {
356
357
  React.createElement(TasksChip, { tasks: allTasks, onOpen: openTasks }),
357
358
  React.createElement(WorkbenchToggle, null)),
358
359
  React.createElement("div", { className: "ta-assistant-body" },
359
- React.createElement("div", { className: "ta-assistant-chat" }, store ? (React.createElement(Chat, { store: store, tasks: state.tasks, taskStates: taskStates, onTask: openTask, onMood: setMood, onTasks: openTasks })) : (React.createElement("div", { className: "ta-empty" }, state.error ? (React.createElement(Callout, { level: "error" }, state.error)) : workbench.offlineShown ? (React.createElement("span", { className: "ta-muted" }, t('ta.assistant.offline'))) : (React.createElement(React.Fragment, null,
360
- React.createElement("span", { className: "ta-spinner" }),
361
- " ",
362
- t('ta.assistant.waking'))))))))));
360
+ React.createElement("div", { className: "ta-assistant-chat" }, store ? (React.createElement(Chat, { store: store, tasks: state.tasks, taskStates: taskStates, onTask: openTask, onMood: setMood, onTasks: openTasks })) : state.error || workbench.offlineShown ? (React.createElement("div", { className: "ta-empty" }, state.error ? (React.createElement(Callout, { level: "error" }, state.error)) : (React.createElement("span", { className: "ta-muted" }, t('ta.assistant.offline'))))) : (React.createElement(Loading, { label: t('ta.assistant.waking') })))))));
363
361
  }
364
362
  //# sourceMappingURL=assistant-view.js.map
@@ -328,7 +328,8 @@ let TaAssistantImpl = class TaAssistantImpl extends AssistantConversation {
328
328
  };
329
329
  this.book.add(task);
330
330
  const store = await this.follow(task);
331
- await store.prompt(TaMessageSource.mark(instructions, TaMessageSource.DOUBLE));
331
+ const asked = verifies && !instructions.includes(AssistantTaskUtil.CHECK_ANSWER) ? `${instructions}\n\n${AssistantTaskUtil.CHECK_ANSWER}` : instructions;
332
+ await store.prompt(TaMessageSource.mark(asked, TaMessageSource.DOUBLE));
332
333
  const { sessionFile } = await this.server.getState(info.sessionId);
333
334
  this.book.change(task, { sessionFile });
334
335
  const apart = worktree ? ` (a git worktree on the branch ${worktree.worktree.branch})` : '';
@@ -0,0 +1,142 @@
1
+ import { ScreenAwake } from '../device/screen-awake.js';
2
+ import { type StateSpec, TaState } from '../state/state-protocol.js';
3
+ import type { CallPhase, VoiceCall } from './voice-call.js';
4
+ export declare const TaCallKeeper: unique symbol;
5
+ /** A call and what its hook gives it, kept as they are while no view shows its conversation. */
6
+ export interface HeldCall {
7
+ call: VoiceCall;
8
+ /** The hook's references, set again by the view that takes the call back. */
9
+ refs: object;
10
+ }
11
+ /** Where a call goes on: the conversation, as the page shows it again. */
12
+ export interface CallSpot {
13
+ sessionId: string;
14
+ double?: boolean;
15
+ title: string;
16
+ }
17
+ /** The call going on, noted as it changes: the page that loads again (the app restarted) calls again. */
18
+ export interface NotedCall extends CallSpot {
19
+ /** When it last went on. */
20
+ at: number;
21
+ }
22
+ export declare namespace CallKeeperUtil {
23
+ /** A call that went on this long before the page loaded again is called again. */
24
+ const RESUME_MS = 90000;
25
+ /** How often a call going on is noted again. */
26
+ const NOTE_MS = 5000;
27
+ const NOTED: StateSpec<NotedCall | undefined>;
28
+ /** How often a call going on says again how it is to the user's other pages, its phase the same (SHARED). */
29
+ const SHARE_MS = 30000;
30
+ /** A call shared that said nothing for this long is gone: its page was closed or put to sleep. */
31
+ const SHARED_MS = 75000;
32
+ const SHARED: StateSpec<SharedCall | undefined>;
33
+ /** The call of another page of the user (`page` is this one's), going on and heard of lately; undefined when none. */
34
+ function elsewhere(shared: SharedCall | undefined, page: string, now: number): SharedCall | undefined;
35
+ /** The call noted, if it went on lately enough to call again. */
36
+ function resumable(noted: NotedCall | undefined, now: number): CallSpot | undefined;
37
+ }
38
+ /**
39
+ * A call going on in a page of the user, as their other pages see it (CallKeeperUtil.SHARED): what it is at, on which
40
+ * device; it is heard and spoken on that device alone, the others show it and may hang it up (`end`).
41
+ */
42
+ export interface SharedCall extends CallSpot {
43
+ /** The page it goes on in (TaCallKeeper.page). */
44
+ page: string;
45
+ phase: CallPhase;
46
+ paused?: boolean;
47
+ /** It goes on on a phone (DeviceMedia.HANDHELD), else on a computer or a tablet. */
48
+ handheld?: boolean;
49
+ /** When it last said how it is. */
50
+ at: number;
51
+ /** Another page asked it to hang up. */
52
+ end?: boolean;
53
+ }
54
+ /** A call going on while its conversation is not on the screen: the page took the user, or Ta, elsewhere. */
55
+ export interface KeptCall {
56
+ sessionId: string;
57
+ /** The double's: it shows on its page. */
58
+ double?: boolean;
59
+ title: string;
60
+ held: HeldCall;
61
+ }
62
+ /**
63
+ * The call going on, one at a time, as a messenger's (docs/design/ta-app-use.md 6.2): its view tells it as it begins,
64
+ * and while its conversation is not in front of the user, wherever the page is, it floats at the top (KeptCallBar),
65
+ * a tap back to it and Hang up. Its view may go meanwhile (another conversation, the settings): a call a partner
66
+ * answers (CallState.partnered) goes on without it, and the view of its conversation takes it back as it shows again.
67
+ * A call begun hangs up the one before.
68
+ */
69
+ export interface TaCallKeeper {
70
+ /** The call going on, its view on the screen or not; undefined when none. */
71
+ readonly kept: KeptCall | undefined;
72
+ /** A call of a view began. */
73
+ begin(call: KeptCall): void;
74
+ /** Its view went: the call goes on without it. */
75
+ keep(call: KeptCall): void;
76
+ /** The call of a conversation, given back to its view; undefined when none goes on without one. */
77
+ take(sessionId: string): HeldCall | undefined;
78
+ /**
79
+ * The call that went on as the page went away (it loaded again, the app restarted), within RESUME_MS: its
80
+ * conversation, to show again and call again; undefined when none.
81
+ */
82
+ readonly resuming: CallSpot | undefined;
83
+ /**
84
+ * The view of a conversation showed: whether to call it again, as its call went on as the page went away; asked
85
+ * once. The double's is called again by whichever conversation is the double's now.
86
+ */
87
+ resume(sessionId: string, double?: boolean): boolean;
88
+ hangUp(): void;
89
+ /**
90
+ * The call going on in another page of the user (on their phone, another computer), as it says of itself
91
+ * (SharedCall); undefined when none, or when this page has one.
92
+ */
93
+ readonly elsewhere: SharedCall | undefined;
94
+ /** Asks the page of the call elsewhere to hang it up. */
95
+ hangUpElsewhere(): void;
96
+ subscribe(listener: () => void): () => void;
97
+ }
98
+ export declare class TaCallKeeperImpl implements TaCallKeeper {
99
+ protected readonly persisted?: TaState;
100
+ protected current?: KeptCall;
101
+ /** When the call going on was noted last. */
102
+ protected notedAt: number;
103
+ /** The call of the page before, as this one loaded: read once. */
104
+ protected before?: CallSpot | null;
105
+ /** Its view is gone. */
106
+ protected viewless: boolean;
107
+ protected offState?: () => void;
108
+ protected offShown?: () => void;
109
+ protected readonly listeners: Set<() => void>;
110
+ /** This page, as the call it shares says (SharedCall.page). */
111
+ readonly page: string;
112
+ /** How the call going on was last shared: what of it changes. */
113
+ protected sharedAs?: string;
114
+ protected sharedAt: number;
115
+ /** The call shared, as last read. */
116
+ protected lastShared?: SharedCall;
117
+ protected offShared?: () => void;
118
+ get kept(): KeptCall | undefined;
119
+ get elsewhere(): SharedCall | undefined;
120
+ hangUpElsewhere(): void;
121
+ begin(call: KeptCall): void;
122
+ keep(call: KeptCall): void;
123
+ take(sessionId: string): HeldCall | undefined;
124
+ get resuming(): CallSpot | undefined;
125
+ resume(sessionId: string, double?: boolean): boolean;
126
+ hangUp(): void;
127
+ subscribe(listener: () => void): () => void;
128
+ /** The call going on now: the one before, of another conversation, hangs up. */
129
+ protected watch(call: KeptCall): void;
130
+ /** Notes the call going on, for the page that loads next (resuming); undefined once it is over. */
131
+ protected note(spot: CallSpot | undefined): void;
132
+ /** Tells the user's other pages how the call going on is: as it changes, and every SHARE_MS. */
133
+ protected share(call: KeptCall): void;
134
+ /** Follows the call shared: another page asked this one's to hang up, or one went on or ended elsewhere. */
135
+ protected follow(): void;
136
+ protected drop(): void;
137
+ /** What Ta Desktop was told last: whether a call goes on. */
138
+ protected told: boolean;
139
+ /** The screen stays on while a call goes on: locked, the device stops hearing the user. */
140
+ protected readonly awake: ScreenAwake;
141
+ protected changed(): void;
142
+ }