@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
@@ -49,6 +49,7 @@ const React = __importStar(require("react"));
49
49
  const chat_protocol_1 = require("../chat/chat-protocol");
50
50
  const chat_asks_1 = require("../components/chat-asks");
51
51
  const chat_icon_1 = require("../components/chat-icon");
52
+ const chat_list_util_1 = require("../components/chat-list-util");
52
53
  const chat_seen_1 = require("../components/chat-seen");
53
54
  const dino_look_picker_1 = require("../components/dino-look-picker");
54
55
  const web_extension_protocol_1 = require("../extension/web-extension-protocol");
@@ -63,9 +64,23 @@ const assistant_task_source_1 = require("./assistant-task-source");
63
64
  const assistant_view_1 = require("./assistant-view");
64
65
  const chat_task_source_1 = require("./chat-task-source");
65
66
  const task_card_1 = require("./task-card");
66
- /** The face of the row of the conversations going on: as the folders of the chats draw theirs. */
67
- function chatsIcon({ size }) {
68
- return React.createElement(chat_icon_1.ChatIconTile, { found: { icon: lucide_react_1.MessagesSquare, tint: 'chats' }, size });
67
+ /** Faces of conversations as the chats draw them, one component for each look, so that a row drawn again keeps it. */
68
+ const letterFaces = new Map();
69
+ const iconFaces = new WeakMap();
70
+ /** The face of a conversation: the icon an extension gives it, else the letter of its directory in its tone. */
71
+ function chatFace(found, initial, tone) {
72
+ var _a, _b, _c;
73
+ if (found) {
74
+ const tints = (_a = iconFaces.get(found.icon)) !== null && _a !== void 0 ? _a : new Map();
75
+ iconFaces.set(found.icon, tints);
76
+ const face = (_b = tints.get(found.tint)) !== null && _b !== void 0 ? _b : (({ size }) => React.createElement(chat_icon_1.ChatIconTile, { found, size }));
77
+ tints.set(found.tint, face);
78
+ return face;
79
+ }
80
+ const key = `${tone}:${initial}`;
81
+ 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));
82
+ letterFaces.set(key, face);
83
+ return face;
69
84
  }
70
85
  function download(name, text) {
71
86
  const url = URL.createObjectURL(new Blob([text], { type: 'text/markdown;charset=utf-8' }));
@@ -104,11 +119,31 @@ let AssistantWebExtension = class AssistantWebExtension {
104
119
  await this.assistant.removeTask(task.id);
105
120
  pi.ui.closeEditor(editorId(task));
106
121
  };
107
- /** What can be done with a task, in its … wherever it shows: stop or take over, then remove (a running one is stopped first). */
122
+ /** The conversation of a task, when its turn is over and it asks the user to decide (not let go). */
123
+ const askingEntry = (task) => {
124
+ if (task.status === 'running' || task.takenOver) {
125
+ return undefined;
126
+ }
127
+ const { sessions, saved } = this.workbench.state;
128
+ const entry = chat_asks_1.ChatAskUtil.entryOf(sessions, saved, task);
129
+ return entry && chat_asks_1.ChatAskUtil.asking(entry, this.persisted.get(chat_asks_1.LET_GO_ASKS)) ? entry : undefined;
130
+ };
131
+ /** 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). */
108
132
  const taskMenu = (task) => {
109
133
  const running = task.status === 'running' && !task.takenOver;
134
+ const asks = askingEntry(task);
110
135
  return [
111
136
  [
137
+ ...(asks
138
+ ? [
139
+ {
140
+ key: 'letGo',
141
+ label: t('ta.chat.letGo'),
142
+ icon: lucide_react_1.CircleSlash,
143
+ run: () => this.persisted.set(chat_asks_1.LET_GO_ASKS, chat_asks_1.ChatAskUtil.letGoAll(this.persisted.get(chat_asks_1.LET_GO_ASKS), [asks])),
144
+ },
145
+ ]
146
+ : []),
112
147
  ...(running
113
148
  ? [{ key: 'stop', label: t('ta.assistant.stop'), icon: lucide_react_1.Square, run: () => void this.assistant.stopTask(task.id).catch(fail) }]
114
149
  : []),
@@ -138,15 +173,18 @@ let AssistantWebExtension = class AssistantWebExtension {
138
173
  const tasks = new assistant_task_source_1.AssistantTaskSource(this.assistant, {
139
174
  t: (id, values) => (0, use_t_1.translator)(pi.ui.language)(id, values),
140
175
  open: openTask,
176
+ show: task => {
177
+ if (task.sessionFile) {
178
+ void pi.openChat(task.sessionFile).catch(fail);
179
+ }
180
+ else {
181
+ openTask(task);
182
+ }
183
+ },
141
184
  openDouble: () => pi.ui.showView(`${assistant_view_1.ASSISTANT_NAME}/assistant`),
142
185
  menu: taskMenu,
143
186
  remove,
144
- asking: task => {
145
- var _a;
146
- const { sessions, saved } = this.workbench.state;
147
- const entry = chat_asks_1.ChatAskUtil.entryOf(sessions, saved, task);
148
- return entry && ((_a = chat_asks_1.ChatAskUtil.asking(entry, this.persisted.get(chat_asks_1.LET_GO_ASKS))) === null || _a === void 0 ? void 0 : _a.question);
149
- },
187
+ 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; },
150
188
  watchAsking: listener => {
151
189
  const stops = [this.workbench.subscribe(() => listener()), this.persisted.subscribe(() => listener())];
152
190
  return () => {
@@ -157,7 +195,7 @@ let AssistantWebExtension = class AssistantWebExtension {
157
195
  },
158
196
  });
159
197
  pi.registerTasks(tasks);
160
- // The conversations the user has going on themselves: one row of the tasks, which opens them in the chats.
198
+ // The conversations of the user's own that wait for them to decide, under the double on its list.
161
199
  // The runs of a scheduled task are theirs too, folded into a folder of the chats (WebChatIcon.folder).
162
200
  const folderOf = () => chat_icon_1.ChatIconUtil.folderOf(this.extensions.state.chatIcons);
163
201
  const chatTasks = new chat_task_source_1.ChatTaskSource({
@@ -192,9 +230,26 @@ let AssistantWebExtension = class AssistantWebExtension {
192
230
  }
193
231
  };
194
232
  },
195
- icon: chatsIcon,
196
- open: () => pi.ui.showChats({ busy: true }),
197
- stop: sessionIds => Promise.all(sessionIds.map(id => pi.server.abort(id))).then(() => undefined, fail),
233
+ glyph: lucide_react_1.MessagesSquare,
234
+ openChat: entry => void pi.openChat(chat_list_util_1.ChatListUtil.file(entry)).catch(fail),
235
+ letGo: entry => {
236
+ var _a;
237
+ const at = (_a = entry.asking) === null || _a === void 0 ? void 0 : _a.at;
238
+ if (at !== undefined) {
239
+ this.persisted.set(chat_asks_1.LET_GO_ASKS, chat_asks_1.ChatAskUtil.letGo(this.persisted.get(chat_asks_1.LET_GO_ASKS), chat_list_util_1.ChatListUtil.file(entry), at));
240
+ }
241
+ },
242
+ face: (entry) => {
243
+ var _a, _b;
244
+ const { sessions, saved } = this.workbench.state;
245
+ const found = chat_icon_1.ChatIconUtil.find(this.extensions.state.chatIcons, {
246
+ sessionFile: entry.sessionFile,
247
+ cwd: entry.cwd,
248
+ ...(entry.group ? { group: entry.group } : {}),
249
+ });
250
+ const source = chat_list_util_1.ChatListUtil.sources([...sessions, ...saved]).find(each => { var _a; return each.title === ((_a = entry.group) !== null && _a !== void 0 ? _a : entry.cwd); });
251
+ 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);
252
+ },
198
253
  });
199
254
  pi.registerTasks(chatTasks);
200
255
  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';
@@ -5,12 +5,12 @@ exports.assistantRole = assistantRole;
5
5
  const ta_protocol_1 = require("@celljs/ta-protocol");
6
6
  /** The role of ta in its conversation with the user. */
7
7
  exports.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.
8
- - 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.
8
+ - 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.
9
9
  - 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.
10
10
  - 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.
11
- - 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.
11
+ - 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.
12
12
  - 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.
13
- - 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.
13
+ - 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.
14
14
  - Ask before anything risky or irreversible the user did not clearly ask for.
15
15
  - Your replies are read aloud: short plain sentences, no tables, no code unless asked. Reply in the user's language.`;
16
16
  /**
@@ -48,7 +48,10 @@ exports.ASSISTANT_TOOLS = {
48
48
  type: 'boolean',
49
49
  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.',
50
50
  },
51
- 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.' },
51
+ verify: {
52
+ type: 'string',
53
+ 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.',
54
+ },
52
55
  verifies: { type: 'string', description: "The id of the task this one checks: its first line, PASS or FAIL, is that task's verdict." },
53
56
  },
54
57
  required: ['title', 'instructions'],
@@ -4,10 +4,14 @@ import type { Translate } from '../i18n/use-t';
4
4
  import type { AssistantAsk, AssistantState, AssistantTask, TaAssistant } from './assistant-protocol';
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[][];
@@ -2,15 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AssistantTaskSource = void 0;
4
4
  exports.activity = activity;
5
- const process_1 = require("../util/process");
5
+ exports.verdict = verdict;
6
+ const ta_protocol_1 = require("@celljs/ta-protocol");
7
+ const lucide_react_1 = require("lucide-react");
6
8
  const progress_1 = require("../util/progress");
9
+ const assistant_task_util_1 = require("./assistant-task-util");
7
10
  /** What a task does now, in a few words: what the loading line of its conversation says (ProgressUtil.text), the same. */
8
11
  function activity(task, state, t) {
9
- var _a;
10
12
  if (task.status === 'running' && (state === null || state === void 0 ? void 0 : state.working)) {
11
13
  return progress_1.ProgressUtil.text(progress_1.ProgressUtil.phase(state), t, { working: state.workingMessage });
12
14
  }
13
- return task.status === 'running' ? t('ta.task.running') : process_1.ProcessUtil.preview((_a = task.result) !== null && _a !== void 0 ? _a : '', 80) || t(`ta.task.${task.status}`);
15
+ // A check's words follow its verdict, which the list says in words of the user's language.
16
+ const said = task.verifies ? assistant_task_util_1.AssistantTaskUtil.verdictReason(task.result) : task.result;
17
+ // A card of its reply (ta-glance) is drawn in its conversation, not read out here.
18
+ return task.status === 'running' ? t('ta.task.running') : ta_protocol_1.TaSaid.line(said !== null && said !== void 0 ? said : '', { chars: 80 }) || t(`ta.task.${task.status}`);
19
+ }
20
+ /** How a task came out of a check: its own verdict for a check that ended, else the verdict of the check of it. */
21
+ function verdict(task) {
22
+ return task.verifies ? (task.status === 'done' ? assistant_task_util_1.AssistantTaskUtil.verdictOf(task.result) : undefined) : task.verdict;
14
23
  }
15
24
  /**
16
25
  * The double's own tasks as a source of WebExtensionAPI.registerTasks, which lists them with those of
@@ -138,7 +147,7 @@ class AssistantTaskSource {
138
147
  }
139
148
  // How a check found it, and the branch it is on, before what it did.
140
149
  const marks = [
141
- task.verdict && t(task.verdict === 'pass' ? 'ta.task.verdictPass' : 'ta.task.verdictFail'),
150
+ verdict(task) && t(verdict(task) === 'pass' ? 'ta.task.verdictPass' : 'ta.task.verdictFail'),
142
151
  task.worktree && t('ta.task.branch', { branch: task.worktree.branch }),
143
152
  ].filter(Boolean);
144
153
  const said = activity(task, state, t);
@@ -155,15 +164,21 @@ class AssistantTaskSource {
155
164
  };
156
165
  }
157
166
  entry(task, status, detail) {
167
+ var _a;
158
168
  return {
159
169
  id: task.id,
160
170
  title: task.title,
161
171
  status,
162
172
  detail,
173
+ ...(verdict(task) ? { tone: verdict(task) === 'pass' ? 'good' : 'bad' } : {}),
174
+ // A check of another task's work says so on its tile.
175
+ ...(task.verifies ? { glyph: lucide_react_1.ShieldCheck } : {}),
163
176
  startedAt: task.startedAt,
164
177
  endedAt: task.endedAt,
165
178
  origin: task.origin,
179
+ session: (_a = task.sessionFile) !== null && _a !== void 0 ? _a : task.sessionId,
166
180
  open: () => this.actions.open(task),
181
+ ...(this.actions.show ? { show: () => { var _a, _b; return (_b = (_a = this.actions).show) === null || _b === void 0 ? void 0 : _b.call(_a, task); } } : {}),
167
182
  menu: () => this.actions.menu(task),
168
183
  remove: () => this.actions.remove(task),
169
184
  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;
@@ -139,13 +139,19 @@ var AssistantTaskUtil;
139
139
  ? `the changes of the branch ${task.worktree.branch} since ${task.worktree.base} (git diff ${task.worktree.base})`
140
140
  : 'the changes in this directory (git diff, git status)';
141
141
  return [
142
- `Check the work of another agent on "${task.title}". Do not change any file: only read, and run what checks it.`,
143
- `Look at ${change}, and check it this way: ${task.verify}.`,
142
+ `Check the work of another agent on "${task.title}". Do not change any file.`,
143
+ `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.`,
144
144
  `What the agent said it did:\n${((_a = task.result) !== null && _a !== void 0 ? _a : '').slice(0, 1500)}`,
145
- 'Answer with PASS or FAIL alone on the first line, then why in a few lines: what you ran and what it showed.',
145
+ AssistantTaskUtil.CHECK_ANSWER,
146
146
  ].join('\n\n');
147
147
  }
148
148
  AssistantTaskUtil.checkInstructions = checkInstructions;
149
+ /**
150
+ * How a check answers, added to its instructions whatever the double wrote: the verdict alone on the first line
151
+ * (verdictOf), then what it ran and what it showed as it shows any result to the user, a card where its replies
152
+ * are drawn as cards, not lines of plain words.
153
+ */
154
+ 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.';
149
155
  /** What a check answered on its first line of words: PASS or FAIL. */
150
156
  function verdictOf(result) {
151
157
  var _a, _b;
@@ -157,6 +163,11 @@ var AssistantTaskUtil;
157
163
  return word === 'PASS' ? 'pass' : word === 'FAIL' ? 'fail' : undefined;
158
164
  }
159
165
  AssistantTaskUtil.verdictOf = verdictOf;
166
+ /** What a check said after its verdict (verdictOf): its words without PASS or FAIL in front. */
167
+ function verdictReason(result) {
168
+ return (result !== null && result !== void 0 ? result : '').replace(/^[\s*_`#>]*(?:verdict:?\s*)?(?:PASS|FAIL)\b[*_`]*[\s::.,,。—-]*/i, '');
169
+ }
170
+ AssistantTaskUtil.verdictReason = verdictReason;
160
171
  /** The worktree of a task, beside the repository at `root`: `<root>-ta-<id>`, on the branch `ta/<id>-<words of its title>`. */
161
172
  function worktreeOf(root, id, title, at) {
162
173
  const words = title
@@ -42,7 +42,7 @@ const React = __importStar(require("react"));
42
42
  const context_menu_1 = require("../components/context-menu");
43
43
  const empty_state_1 = require("../components/empty-state");
44
44
  const icon_1 = require("../components/icon");
45
- const list_skeleton_1 = require("../components/list-skeleton");
45
+ const loading_1 = require("../components/loading");
46
46
  const markdown_1 = require("../components/markdown");
47
47
  const session_view_1 = require("../components/session-view");
48
48
  const hooks_1 = require("../hooks");
@@ -124,6 +124,6 @@ function AssistantTaskView({ taskId, onTakeOver, onTasks, menu }) {
124
124
  store ? (React.createElement(session_view_1.SessionView, { store: store, server: workbench.server, workspace: workbench.workspace, info: info, onClosed: () => setClosed(store), onActivity: () => undefined })) : failed ? (React.createElement("div", { className: "ta-scroll" },
125
125
  React.createElement("div", { className: "ta-task-result" },
126
126
  React.createElement("p", { className: "ta-task-result-note" }, t('ta.assistant.taskEnded')),
127
- React.createElement(markdown_1.Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(list_skeleton_1.ListSkeleton, { rows: 3 }))));
127
+ React.createElement(markdown_1.Markdown, { text: task.result || t(`ta.task.${task.status}`) })))) : (React.createElement(loading_1.Loading, null))));
128
128
  }
129
129
  //# sourceMappingURL=assistant-tasks.js.map
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.AssistantThread = AssistantThread;
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 callout_1 = require("../components/callout");
@@ -133,6 +134,9 @@ function AssistantThread({ state, reply, tasks, origin, onTask, t }) {
133
134
  React.createElement("span", { className: "ta-task-update-text" }, line),
134
135
  React.createElement(icon_1.Icon, { icon: lucide_react_1.ChevronRight, size: 13, className: "ta-task-update-chevron" }))) : null;
135
136
  }
137
+ if (ta_protocol_1.TaMessageSource.isNotice(text)) {
138
+ return React.createElement(message_user_1.NoticeMessage, { key: item.key, message: item.message });
139
+ }
136
140
  return React.createElement(DoubleUserMessage, { key: item.key, message: item.message, blocks: blocks });
137
141
  };
138
142
  return (React.createElement(code_renderers_1.CodeReply.Provider, { value: reply },
@@ -48,6 +48,7 @@ const dialog_view_1 = require("../components/dialog-view");
48
48
  const earlier_messages_1 = require("../components/earlier-messages");
49
49
  const hero_cards_1 = require("../components/hero-cards");
50
50
  const icon_1 = require("../components/icon");
51
+ const loading_1 = require("../components/loading");
51
52
  const message_actions_1 = require("../components/message-actions");
52
53
  const message_footer_1 = require("../components/message-footer");
53
54
  const message_images_1 = require("../components/message-images");
@@ -152,7 +153,7 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
152
153
  voice: () => voice,
153
154
  send: text => say(text),
154
155
  ended: (reason, detail) => notices.notify((0, voice_call_bar_1.callEndedNotice)(t, reason, detail)),
155
- }, { sessionId: store.sessionId, double: true });
156
+ }, { sessionId: store.sessionId, double: true }, name || 'Ta');
156
157
  const mood = moodOf({
157
158
  working: state.working,
158
159
  attention: attentions.length > 0 || asks.length > 0,
@@ -397,9 +398,6 @@ function AssistantPanel({ onTask }) {
397
398
  React.createElement(task_views_1.TasksChip, { tasks: allTasks, onOpen: openTasks }),
398
399
  React.createElement(workbench_toggle_1.WorkbenchToggle, null)),
399
400
  React.createElement("div", { className: "ta-assistant-body" },
400
- 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_1.Callout, { level: "error" }, state.error)) : workbench.offlineShown ? (React.createElement("span", { className: "ta-muted" }, t('ta.assistant.offline'))) : (React.createElement(React.Fragment, null,
401
- React.createElement("span", { className: "ta-spinner" }),
402
- " ",
403
- t('ta.assistant.waking'))))))))));
401
+ 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_1.Callout, { level: "error" }, state.error)) : (React.createElement("span", { className: "ta-muted" }, t('ta.assistant.offline'))))) : (React.createElement(loading_1.Loading, { label: t('ta.assistant.waking') })))))));
404
402
  }
405
403
  //# sourceMappingURL=assistant-view.js.map
@@ -331,7 +331,8 @@ let TaAssistantImpl = class TaAssistantImpl extends assistant_conversation_1.Ass
331
331
  };
332
332
  this.book.add(task);
333
333
  const store = await this.follow(task);
334
- await store.prompt(ta_protocol_1.TaMessageSource.mark(instructions, ta_protocol_1.TaMessageSource.DOUBLE));
334
+ const asked = verifies && !instructions.includes(assistant_task_util_1.AssistantTaskUtil.CHECK_ANSWER) ? `${instructions}\n\n${assistant_task_util_1.AssistantTaskUtil.CHECK_ANSWER}` : instructions;
335
+ await store.prompt(ta_protocol_1.TaMessageSource.mark(asked, ta_protocol_1.TaMessageSource.DOUBLE));
335
336
  const { sessionFile } = await this.server.getState(info.sessionId);
336
337
  this.book.change(task, { sessionFile });
337
338
  const apart = worktree ? ` (a git worktree on the branch ${worktree.worktree.branch})` : '';
@@ -0,0 +1,143 @@
1
+ import { ScreenAwake } from '../device/screen-awake';
2
+ import { type StateSpec, TaState } from '../state/state-protocol';
3
+ import type { CallPhase, VoiceCall } from './voice-call';
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
+ }
143
+ //# sourceMappingURL=call-keeper.d.ts.map