@celljs/ta-web 4.10.0 → 4.12.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 (559) hide show
  1. package/README.en.md +7 -7
  2. package/README.md +7 -7
  3. package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
  4. package/esm/browser/assistant/assistant-chat-list.js +12 -0
  5. package/esm/browser/assistant/assistant-extension.js +5 -0
  6. package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
  7. package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
  8. package/esm/browser/assistant/assistant-task-book.js +23 -4
  9. package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
  10. package/esm/browser/assistant/assistant-task-source.js +5 -10
  11. package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
  12. package/esm/browser/assistant/assistant-task-util.js +59 -12
  13. package/esm/browser/assistant/assistant-view.js +48 -24
  14. package/esm/browser/assistant/assistant.d.ts +18 -4
  15. package/esm/browser/assistant/assistant.js +52 -17
  16. package/esm/browser/avatar/dino-face.js +1 -2
  17. package/esm/browser/chat/chat-protocol.d.ts +5 -0
  18. package/esm/browser/chat/chat-stores.d.ts +8 -5
  19. package/esm/browser/chat/chat-stores.js +17 -9
  20. package/esm/browser/chat/chat-view.js +23 -15
  21. package/esm/browser/chat/chat.d.ts +16 -8
  22. package/esm/browser/chat/chat.js +86 -51
  23. package/esm/browser/components/account-menu.d.ts +0 -2
  24. package/esm/browser/components/account-menu.js +1 -27
  25. package/esm/browser/components/agent-settings-view.d.ts +3 -2
  26. package/esm/browser/components/agent-settings-view.js +2 -1
  27. package/esm/browser/components/app-nav.d.ts +5 -2
  28. package/esm/browser/components/app-nav.js +22 -9
  29. package/esm/browser/components/app-shell-hooks.js +5 -3
  30. package/esm/browser/components/app-view.js +84 -20
  31. package/esm/browser/components/busy.d.ts +25 -0
  32. package/esm/browser/components/busy.js +52 -0
  33. package/esm/browser/components/chat-icon.d.ts +29 -0
  34. package/esm/browser/components/chat-icon.js +78 -0
  35. package/esm/browser/components/chat-list.d.ts +73 -6
  36. package/esm/browser/components/chat-list.js +295 -60
  37. package/esm/browser/components/chat-seen.d.ts +53 -0
  38. package/esm/browser/components/chat-seen.js +101 -0
  39. package/esm/browser/components/composer-box.d.ts +15 -4
  40. package/esm/browser/components/composer-box.js +139 -77
  41. package/esm/browser/components/composer.d.ts +9 -6
  42. package/esm/browser/components/composer.js +32 -4
  43. package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
  44. package/esm/browser/components/conversation-scroll-hooks.js +98 -0
  45. package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
  46. package/esm/browser/components/conversation-scroll-util.js +56 -0
  47. package/esm/browser/components/conversation-scroll.d.ts +52 -31
  48. package/esm/browser/components/conversation-scroll.js +170 -129
  49. package/esm/browser/components/custom-host.d.ts +3 -0
  50. package/esm/browser/components/custom-host.js +14 -0
  51. package/esm/browser/components/directory-commands.d.ts +6 -0
  52. package/esm/browser/components/directory-commands.js +34 -0
  53. package/esm/browser/components/discover-view.d.ts +11 -4
  54. package/esm/browser/components/discover-view.js +20 -11
  55. package/esm/browser/components/dismiss.d.ts +3 -0
  56. package/esm/browser/components/dismiss.js +29 -0
  57. package/esm/browser/components/earlier-messages.d.ts +34 -3
  58. package/esm/browser/components/earlier-messages.js +42 -8
  59. package/esm/browser/components/editor-area.d.ts +6 -22
  60. package/esm/browser/components/editor-area.js +10 -97
  61. package/esm/browser/components/face.d.ts +24 -0
  62. package/esm/browser/components/face.js +42 -0
  63. package/esm/browser/components/fold-text.d.ts +20 -0
  64. package/esm/browser/components/fold-text.js +66 -0
  65. package/esm/browser/components/folder-picker.d.ts +1 -1
  66. package/esm/browser/components/folder-picker.js +1 -1
  67. package/esm/browser/components/full-screen.d.ts +9 -0
  68. package/esm/browser/components/full-screen.js +26 -0
  69. package/esm/browser/components/grow-box.d.ts +9 -0
  70. package/esm/browser/components/grow-box.js +50 -0
  71. package/esm/browser/components/hold-to-talk.d.ts +22 -0
  72. package/esm/browser/components/hold-to-talk.js +29 -0
  73. package/esm/browser/components/host-view.d.ts +1 -1
  74. package/esm/browser/components/icon.d.ts +3 -1
  75. package/esm/browser/components/icon.js +4 -3
  76. package/esm/browser/components/image-viewer.d.ts +10 -2
  77. package/esm/browser/components/image-viewer.js +48 -11
  78. package/esm/browser/components/launcher-search-util.d.ts +4 -3
  79. package/esm/browser/components/launcher-search-util.js +12 -4
  80. package/esm/browser/components/lightbox.d.ts +5 -2
  81. package/esm/browser/components/lightbox.js +4 -3
  82. package/esm/browser/components/list-rows.d.ts +9 -1
  83. package/esm/browser/components/list-rows.js +17 -3
  84. package/esm/browser/components/markdown.js +36 -4
  85. package/esm/browser/components/media.js +73 -7
  86. package/esm/browser/components/message-actions.js +3 -0
  87. package/esm/browser/components/message-footer.d.ts +8 -0
  88. package/esm/browser/components/message-footer.js +20 -3
  89. package/esm/browser/components/message-list.d.ts +60 -7
  90. package/esm/browser/components/message-list.js +206 -58
  91. package/esm/browser/components/message-menu.js +6 -1
  92. package/esm/browser/components/model-picker.js +1 -0
  93. package/esm/browser/components/nav-places.d.ts +21 -2
  94. package/esm/browser/components/nav-places.js +20 -4
  95. package/esm/browser/components/notice-center.js +34 -0
  96. package/esm/browser/components/notice-face.d.ts +10 -0
  97. package/esm/browser/components/notice-face.js +28 -0
  98. package/esm/browser/components/phone-shell.d.ts +23 -1
  99. package/esm/browser/components/phone-shell.js +98 -9
  100. package/esm/browser/components/picture.d.ts +8 -1
  101. package/esm/browser/components/picture.js +12 -1
  102. package/esm/browser/components/plus-menu.d.ts +23 -0
  103. package/esm/browser/components/plus-menu.js +90 -0
  104. package/esm/browser/components/recent-shot.d.ts +15 -0
  105. package/esm/browser/components/recent-shot.js +174 -0
  106. package/esm/browser/components/relay-view.js +10 -3
  107. package/esm/browser/components/run-status.d.ts +1 -1
  108. package/esm/browser/components/run-status.js +17 -29
  109. package/esm/browser/components/said-text.d.ts +6 -0
  110. package/esm/browser/components/said-text.js +14 -0
  111. package/esm/browser/components/scan-screen.d.ts +10 -0
  112. package/esm/browser/components/scan-screen.js +230 -0
  113. package/esm/browser/components/search-page.js +10 -6
  114. package/esm/browser/components/session-settings.d.ts +2 -3
  115. package/esm/browser/components/session-settings.js +1 -0
  116. package/esm/browser/components/session-view.d.ts +3 -1
  117. package/esm/browser/components/session-view.js +35 -21
  118. package/esm/browser/components/settings-choices.d.ts +1 -0
  119. package/esm/browser/components/settings-choices.js +3 -2
  120. package/esm/browser/components/settings-controls.d.ts +5 -3
  121. package/esm/browser/components/settings-controls.js +10 -1
  122. package/esm/browser/components/settings-parts.js +45 -14
  123. package/esm/browser/components/stop-times.d.ts +47 -0
  124. package/esm/browser/components/stop-times.js +81 -0
  125. package/esm/browser/components/tool-view.js +7 -2
  126. package/esm/browser/components/unseen-drop.d.ts +39 -0
  127. package/esm/browser/components/unseen-drop.js +219 -0
  128. package/esm/browser/components/use-seen-chats.d.ts +8 -0
  129. package/esm/browser/components/use-seen-chats.js +49 -0
  130. package/esm/browser/components/use-stop-times.d.ts +3 -0
  131. package/esm/browser/components/use-stop-times.js +17 -0
  132. package/esm/browser/components/voice-button.d.ts +7 -1
  133. package/esm/browser/components/voice-button.js +15 -2
  134. package/esm/browser/components/voice-picker.d.ts +6 -0
  135. package/esm/browser/components/voice-picker.js +53 -0
  136. package/esm/browser/components/voice-talk.d.ts +11 -3
  137. package/esm/browser/components/voice-talk.js +24 -4
  138. package/esm/browser/components/web-composer.d.ts +4 -2
  139. package/esm/browser/components/web-composer.js +8 -4
  140. package/esm/browser/components/workbench-tabs.d.ts +41 -0
  141. package/esm/browser/components/workbench-tabs.js +193 -0
  142. package/esm/browser/components/workbench-toggle.d.ts +0 -13
  143. package/esm/browser/components/workbench-toggle.js +1 -28
  144. package/esm/browser/device/code-scan.d.ts +55 -0
  145. package/esm/browser/device/code-scan.js +137 -0
  146. package/esm/browser/device/code-vision.d.ts +51 -0
  147. package/esm/browser/device/code-vision.js +100 -0
  148. package/esm/browser/device/hold.js +4 -6
  149. package/esm/browser/device/long-press.d.ts +10 -0
  150. package/esm/browser/device/long-press.js +28 -12
  151. package/esm/browser/device/own-gestures.d.ts +25 -0
  152. package/esm/browser/device/own-gestures.js +39 -0
  153. package/esm/browser/device/photo-picker.d.ts +14 -0
  154. package/esm/browser/device/photo-picker.js +48 -0
  155. package/esm/browser/device/pull-down.js +3 -2
  156. package/esm/browser/device/recent-shots.d.ts +45 -0
  157. package/esm/browser/device/recent-shots.js +142 -0
  158. package/esm/browser/device/row-swipe.d.ts +2 -0
  159. package/esm/browser/device/row-swipe.js +14 -3
  160. package/esm/browser/device/sheet-swipe.d.ts +1 -1
  161. package/esm/browser/device/sheet-swipe.js +25 -4
  162. package/esm/browser/extension/extension-view.d.ts +10 -0
  163. package/esm/browser/extension/extension-view.js +6 -0
  164. package/esm/browser/extension/icons.js +16 -2
  165. package/esm/browser/extension/web-api-components.d.ts +287 -0
  166. package/esm/browser/extension/web-api-components.js +2 -0
  167. package/esm/browser/extension/web-api-contributions.d.ts +394 -0
  168. package/esm/browser/extension/web-api-contributions.js +2 -0
  169. package/esm/browser/extension/web-api-desktop.d.ts +55 -0
  170. package/esm/browser/extension/web-api-desktop.js +2 -0
  171. package/esm/browser/extension/web-api-terminal.d.ts +71 -0
  172. package/esm/browser/extension/web-api-terminal.js +2 -0
  173. package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
  174. package/esm/browser/extension/web-editor-tabs.js +137 -0
  175. package/esm/browser/extension/web-extension-api.d.ts +186 -565
  176. package/esm/browser/extension/web-extension-context.d.ts +78 -0
  177. package/esm/browser/extension/web-extension-context.js +354 -0
  178. package/esm/browser/extension/web-extension-protocol.d.ts +57 -7
  179. package/esm/browser/extension/web-extension-protocol.js +34 -0
  180. package/esm/browser/extension/web-extension-run.d.ts +54 -0
  181. package/esm/browser/extension/web-extension-run.js +120 -0
  182. package/esm/browser/extension/web-extensions.d.ts +29 -69
  183. package/esm/browser/extension/web-extensions.js +121 -516
  184. package/esm/browser/extension/web-home.d.ts +19 -0
  185. package/esm/browser/extension/web-home.js +72 -0
  186. package/esm/browser/extension/web-pages.d.ts +13 -3
  187. package/esm/browser/extension/web-pages.js +23 -3
  188. package/esm/browser/extension/web-session-notices.d.ts +36 -0
  189. package/esm/browser/extension/web-session-notices.js +174 -0
  190. package/esm/browser/extension/web-sharing.d.ts +2 -0
  191. package/esm/browser/extension/web-sharing.js +4 -0
  192. package/esm/browser/game/game-host.d.ts +27 -0
  193. package/esm/browser/game/game-host.js +127 -0
  194. package/esm/browser/game/game-loader.d.ts +10 -0
  195. package/esm/browser/game/game-loader.js +28 -0
  196. package/esm/browser/game/game-protocol.d.ts +49 -0
  197. package/esm/browser/game/game-protocol.js +2 -0
  198. package/esm/browser/game/game-runner.d.ts +27 -0
  199. package/esm/browser/game/game-runner.js +60 -0
  200. package/esm/browser/game/game-util.d.ts +29 -0
  201. package/esm/browser/game/game-util.js +180 -0
  202. package/esm/browser/game/game-view.d.ts +12 -0
  203. package/esm/browser/game/game-view.js +31 -0
  204. package/esm/browser/game/game3d-protocol.d.ts +51 -0
  205. package/esm/browser/game/game3d-protocol.js +2 -0
  206. package/esm/browser/game/game3d-runner.d.ts +27 -0
  207. package/esm/browser/game/game3d-runner.js +149 -0
  208. package/esm/browser/hooks.d.ts +5 -1
  209. package/esm/browser/hooks.js +13 -2
  210. package/esm/browser/i18n/locales.d.ts +92 -2
  211. package/esm/browser/i18n/messages.d.ts +91 -1
  212. package/esm/browser/i18n/messages.js +187 -7
  213. package/esm/browser/index.d.ts +9 -0
  214. package/esm/browser/index.js +9 -0
  215. package/esm/browser/links/links-protocol.d.ts +7 -0
  216. package/esm/browser/links/links.d.ts +24 -7
  217. package/esm/browser/links/links.js +64 -11
  218. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  219. package/esm/browser/markdown/code-renderers.js +4 -0
  220. package/esm/browser/notices/notices-protocol.d.ts +17 -0
  221. package/esm/browser/notices/notices.d.ts +1 -1
  222. package/esm/browser/notices/notices.js +6 -2
  223. package/esm/browser/notices/session-notices.d.ts +69 -0
  224. package/esm/browser/notices/session-notices.js +92 -0
  225. package/esm/browser/offline/device-values.js +12 -3
  226. package/esm/browser/offline/offline-reads.js +3 -1
  227. package/esm/browser/settings/navigation.d.ts +3 -2
  228. package/esm/browser/settings/navigation.js +4 -3
  229. package/esm/browser/settings/settings-protocol.d.ts +15 -0
  230. package/esm/browser/settings/settings-protocol.js +18 -4
  231. package/esm/browser/state/state-protocol.d.ts +8 -1
  232. package/esm/browser/state/state.d.ts +2 -0
  233. package/esm/browser/state/state.js +21 -2
  234. package/esm/browser/style/base.d.ts +1 -1
  235. package/esm/browser/style/base.js +27 -1
  236. package/esm/browser/style/conversation.d.ts +1 -1
  237. package/esm/browser/style/conversation.js +45 -5
  238. package/esm/browser/style/device.js +15 -1
  239. package/esm/browser/style/layout.d.ts +1 -1
  240. package/esm/browser/style/layout.js +192 -56
  241. package/esm/browser/style/pages.d.ts +1 -1
  242. package/esm/browser/style/pages.js +39 -1
  243. package/esm/browser/style/phone.d.ts +1 -1
  244. package/esm/browser/style/phone.js +15 -0
  245. package/esm/browser/style/shell.d.ts +1 -1
  246. package/esm/browser/style/shell.js +32 -6
  247. package/esm/browser/style/surfaces.d.ts +1 -1
  248. package/esm/browser/style/surfaces.js +21 -2
  249. package/esm/browser/style/tints.d.ts +27 -0
  250. package/esm/browser/style/tints.js +56 -0
  251. package/esm/browser/style.js +13 -1
  252. package/esm/browser/util/composer.d.ts +6 -0
  253. package/esm/browser/util/composer.js +16 -0
  254. package/esm/browser/util/desktop.d.ts +19 -1
  255. package/esm/browser/util/desktop.js +15 -0
  256. package/esm/browser/util/frame.d.ts +2 -0
  257. package/esm/browser/util/frame.js +2 -0
  258. package/esm/browser/util/link.d.ts +18 -0
  259. package/esm/browser/util/link.js +66 -1
  260. package/esm/browser/util/markdown.d.ts +4 -1
  261. package/esm/browser/util/markdown.js +1 -1
  262. package/esm/browser/util/message.d.ts +5 -0
  263. package/esm/browser/util/message.js +30 -0
  264. package/esm/browser/util/process.d.ts +57 -3
  265. package/esm/browser/util/process.js +123 -11
  266. package/esm/browser/util/progress.d.ts +19 -1
  267. package/esm/browser/util/progress.js +57 -4
  268. package/esm/browser/util/quote.d.ts +19 -0
  269. package/esm/browser/util/quote.js +58 -0
  270. package/esm/browser/util/tool.d.ts +19 -2
  271. package/esm/browser/util/tool.js +70 -2
  272. package/esm/browser/util/voice.d.ts +47 -7
  273. package/esm/browser/util/voice.js +269 -27
  274. package/esm/browser/workbench-calls.d.ts +6 -4
  275. package/esm/browser/workbench-calls.js +15 -10
  276. package/esm/browser/workbench-protocol.d.ts +31 -2
  277. package/esm/browser/workbench-util.d.ts +15 -4
  278. package/esm/browser/workbench-util.js +28 -5
  279. package/esm/browser/workbench.d.ts +33 -1
  280. package/esm/browser/workbench.js +142 -14
  281. package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
  282. package/lib/browser/assistant/assistant-chat-list.js +13 -0
  283. package/lib/browser/assistant/assistant-extension.js +5 -0
  284. package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
  285. package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
  286. package/lib/browser/assistant/assistant-task-book.js +23 -4
  287. package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
  288. package/lib/browser/assistant/assistant-task-source.js +5 -10
  289. package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
  290. package/lib/browser/assistant/assistant-task-util.js +59 -12
  291. package/lib/browser/assistant/assistant-view.js +46 -22
  292. package/lib/browser/assistant/assistant.d.ts +18 -4
  293. package/lib/browser/assistant/assistant.js +52 -17
  294. package/lib/browser/avatar/dino-face.js +1 -2
  295. package/lib/browser/chat/chat-protocol.d.ts +5 -0
  296. package/lib/browser/chat/chat-stores.d.ts +8 -5
  297. package/lib/browser/chat/chat-stores.js +17 -9
  298. package/lib/browser/chat/chat-view.js +22 -14
  299. package/lib/browser/chat/chat.d.ts +16 -8
  300. package/lib/browser/chat/chat.js +86 -51
  301. package/lib/browser/components/account-menu.d.ts +0 -2
  302. package/lib/browser/components/account-menu.js +2 -29
  303. package/lib/browser/components/agent-settings-view.d.ts +3 -2
  304. package/lib/browser/components/agent-settings-view.js +2 -1
  305. package/lib/browser/components/app-nav.d.ts +5 -2
  306. package/lib/browser/components/app-nav.js +18 -5
  307. package/lib/browser/components/app-shell-hooks.js +5 -3
  308. package/lib/browser/components/app-view.js +80 -16
  309. package/lib/browser/components/busy.d.ts +26 -0
  310. package/lib/browser/components/busy.js +91 -0
  311. package/lib/browser/components/chat-icon.d.ts +30 -0
  312. package/lib/browser/components/chat-icon.js +117 -0
  313. package/lib/browser/components/chat-list.d.ts +73 -6
  314. package/lib/browser/components/chat-list.js +295 -59
  315. package/lib/browser/components/chat-seen.d.ts +54 -0
  316. package/lib/browser/components/chat-seen.js +104 -0
  317. package/lib/browser/components/composer-box.d.ts +15 -4
  318. package/lib/browser/components/composer-box.js +136 -74
  319. package/lib/browser/components/composer.d.ts +9 -6
  320. package/lib/browser/components/composer.js +31 -3
  321. package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
  322. package/lib/browser/components/conversation-scroll-hooks.js +135 -0
  323. package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
  324. package/lib/browser/components/conversation-scroll-util.js +60 -0
  325. package/lib/browser/components/conversation-scroll.d.ts +52 -31
  326. package/lib/browser/components/conversation-scroll.js +171 -164
  327. package/lib/browser/components/custom-host.d.ts +4 -0
  328. package/lib/browser/components/custom-host.js +50 -0
  329. package/lib/browser/components/directory-commands.d.ts +7 -0
  330. package/lib/browser/components/directory-commands.js +70 -0
  331. package/lib/browser/components/discover-view.d.ts +11 -4
  332. package/lib/browser/components/discover-view.js +19 -10
  333. package/lib/browser/components/dismiss.d.ts +4 -0
  334. package/lib/browser/components/dismiss.js +65 -0
  335. package/lib/browser/components/earlier-messages.d.ts +34 -3
  336. package/lib/browser/components/earlier-messages.js +44 -9
  337. package/lib/browser/components/editor-area.d.ts +6 -22
  338. package/lib/browser/components/editor-area.js +11 -98
  339. package/lib/browser/components/face.d.ts +25 -0
  340. package/lib/browser/components/face.js +79 -0
  341. package/lib/browser/components/fold-text.d.ts +21 -0
  342. package/lib/browser/components/fold-text.js +103 -0
  343. package/lib/browser/components/folder-picker.d.ts +1 -1
  344. package/lib/browser/components/folder-picker.js +1 -1
  345. package/lib/browser/components/full-screen.d.ts +10 -0
  346. package/lib/browser/components/full-screen.js +62 -0
  347. package/lib/browser/components/grow-box.d.ts +10 -0
  348. package/lib/browser/components/grow-box.js +86 -0
  349. package/lib/browser/components/hold-to-talk.d.ts +23 -0
  350. package/lib/browser/components/hold-to-talk.js +65 -0
  351. package/lib/browser/components/host-view.d.ts +1 -1
  352. package/lib/browser/components/icon.d.ts +3 -1
  353. package/lib/browser/components/icon.js +4 -3
  354. package/lib/browser/components/image-viewer.d.ts +10 -2
  355. package/lib/browser/components/image-viewer.js +47 -10
  356. package/lib/browser/components/launcher-search-util.d.ts +4 -3
  357. package/lib/browser/components/launcher-search-util.js +12 -4
  358. package/lib/browser/components/lightbox.d.ts +5 -2
  359. package/lib/browser/components/lightbox.js +4 -3
  360. package/lib/browser/components/list-rows.d.ts +9 -1
  361. package/lib/browser/components/list-rows.js +18 -3
  362. package/lib/browser/components/markdown.js +36 -4
  363. package/lib/browser/components/media.js +73 -7
  364. package/lib/browser/components/message-actions.js +3 -0
  365. package/lib/browser/components/message-footer.d.ts +8 -0
  366. package/lib/browser/components/message-footer.js +20 -2
  367. package/lib/browser/components/message-list.d.ts +60 -7
  368. package/lib/browser/components/message-list.js +206 -55
  369. package/lib/browser/components/message-menu.js +6 -1
  370. package/lib/browser/components/model-picker.js +1 -0
  371. package/lib/browser/components/nav-places.d.ts +21 -2
  372. package/lib/browser/components/nav-places.js +22 -4
  373. package/lib/browser/components/notice-center.js +34 -0
  374. package/lib/browser/components/notice-face.d.ts +11 -0
  375. package/lib/browser/components/notice-face.js +64 -0
  376. package/lib/browser/components/phone-shell.d.ts +23 -1
  377. package/lib/browser/components/phone-shell.js +99 -10
  378. package/lib/browser/components/picture.d.ts +8 -1
  379. package/lib/browser/components/picture.js +13 -1
  380. package/lib/browser/components/plus-menu.d.ts +24 -0
  381. package/lib/browser/components/plus-menu.js +126 -0
  382. package/lib/browser/components/recent-shot.d.ts +16 -0
  383. package/lib/browser/components/recent-shot.js +210 -0
  384. package/lib/browser/components/relay-view.js +10 -3
  385. package/lib/browser/components/run-status.d.ts +1 -1
  386. package/lib/browser/components/run-status.js +17 -29
  387. package/lib/browser/components/said-text.d.ts +7 -0
  388. package/lib/browser/components/said-text.js +50 -0
  389. package/lib/browser/components/scan-screen.d.ts +11 -0
  390. package/lib/browser/components/scan-screen.js +266 -0
  391. package/lib/browser/components/search-page.js +10 -6
  392. package/lib/browser/components/session-settings.d.ts +2 -3
  393. package/lib/browser/components/session-settings.js +1 -0
  394. package/lib/browser/components/session-view.d.ts +3 -1
  395. package/lib/browser/components/session-view.js +32 -18
  396. package/lib/browser/components/settings-choices.d.ts +1 -0
  397. package/lib/browser/components/settings-choices.js +2 -1
  398. package/lib/browser/components/settings-controls.d.ts +5 -3
  399. package/lib/browser/components/settings-controls.js +10 -1
  400. package/lib/browser/components/settings-parts.js +43 -12
  401. package/lib/browser/components/stop-times.d.ts +48 -0
  402. package/lib/browser/components/stop-times.js +85 -0
  403. package/lib/browser/components/tool-view.js +7 -2
  404. package/lib/browser/components/unseen-drop.d.ts +40 -0
  405. package/lib/browser/components/unseen-drop.js +256 -0
  406. package/lib/browser/components/use-seen-chats.d.ts +9 -0
  407. package/lib/browser/components/use-seen-chats.js +85 -0
  408. package/lib/browser/components/use-stop-times.d.ts +4 -0
  409. package/lib/browser/components/use-stop-times.js +53 -0
  410. package/lib/browser/components/voice-button.d.ts +7 -1
  411. package/lib/browser/components/voice-button.js +16 -2
  412. package/lib/browser/components/voice-picker.d.ts +7 -0
  413. package/lib/browser/components/voice-picker.js +89 -0
  414. package/lib/browser/components/voice-talk.d.ts +11 -3
  415. package/lib/browser/components/voice-talk.js +25 -4
  416. package/lib/browser/components/web-composer.d.ts +4 -2
  417. package/lib/browser/components/web-composer.js +7 -3
  418. package/lib/browser/components/workbench-tabs.d.ts +42 -0
  419. package/lib/browser/components/workbench-tabs.js +232 -0
  420. package/lib/browser/components/workbench-toggle.d.ts +0 -13
  421. package/lib/browser/components/workbench-toggle.js +1 -29
  422. package/lib/browser/device/code-scan.d.ts +56 -0
  423. package/lib/browser/device/code-scan.js +141 -0
  424. package/lib/browser/device/code-vision.d.ts +52 -0
  425. package/lib/browser/device/code-vision.js +103 -0
  426. package/lib/browser/device/hold.js +4 -6
  427. package/lib/browser/device/long-press.d.ts +10 -0
  428. package/lib/browser/device/long-press.js +28 -12
  429. package/lib/browser/device/own-gestures.d.ts +26 -0
  430. package/lib/browser/device/own-gestures.js +42 -0
  431. package/lib/browser/device/photo-picker.d.ts +15 -0
  432. package/lib/browser/device/photo-picker.js +51 -0
  433. package/lib/browser/device/pull-down.js +3 -2
  434. package/lib/browser/device/recent-shots.d.ts +46 -0
  435. package/lib/browser/device/recent-shots.js +145 -0
  436. package/lib/browser/device/row-swipe.d.ts +2 -0
  437. package/lib/browser/device/row-swipe.js +14 -3
  438. package/lib/browser/device/sheet-swipe.d.ts +1 -1
  439. package/lib/browser/device/sheet-swipe.js +25 -4
  440. package/lib/browser/extension/extension-view.d.ts +10 -0
  441. package/lib/browser/extension/extension-view.js +7 -1
  442. package/lib/browser/extension/icons.js +15 -1
  443. package/lib/browser/extension/web-api-components.d.ts +288 -0
  444. package/lib/browser/extension/web-api-components.js +3 -0
  445. package/lib/browser/extension/web-api-contributions.d.ts +395 -0
  446. package/lib/browser/extension/web-api-contributions.js +3 -0
  447. package/lib/browser/extension/web-api-desktop.d.ts +56 -0
  448. package/lib/browser/extension/web-api-desktop.js +3 -0
  449. package/lib/browser/extension/web-api-terminal.d.ts +72 -0
  450. package/lib/browser/extension/web-api-terminal.js +3 -0
  451. package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
  452. package/lib/browser/extension/web-editor-tabs.js +141 -0
  453. package/lib/browser/extension/web-extension-api.d.ts +186 -565
  454. package/lib/browser/extension/web-extension-context.d.ts +79 -0
  455. package/lib/browser/extension/web-extension-context.js +391 -0
  456. package/lib/browser/extension/web-extension-protocol.d.ts +57 -7
  457. package/lib/browser/extension/web-extension-protocol.js +35 -1
  458. package/lib/browser/extension/web-extension-run.d.ts +55 -0
  459. package/lib/browser/extension/web-extension-run.js +123 -0
  460. package/lib/browser/extension/web-extensions.d.ts +29 -69
  461. package/lib/browser/extension/web-extensions.js +117 -545
  462. package/lib/browser/extension/web-home.d.ts +20 -0
  463. package/lib/browser/extension/web-home.js +76 -0
  464. package/lib/browser/extension/web-pages.d.ts +13 -3
  465. package/lib/browser/extension/web-pages.js +23 -3
  466. package/lib/browser/extension/web-session-notices.d.ts +37 -0
  467. package/lib/browser/extension/web-session-notices.js +177 -0
  468. package/lib/browser/extension/web-sharing.d.ts +2 -0
  469. package/lib/browser/extension/web-sharing.js +4 -0
  470. package/lib/browser/game/game-host.d.ts +28 -0
  471. package/lib/browser/game/game-host.js +163 -0
  472. package/lib/browser/game/game-loader.d.ts +11 -0
  473. package/lib/browser/game/game-loader.js +31 -0
  474. package/lib/browser/game/game-protocol.d.ts +50 -0
  475. package/lib/browser/game/game-protocol.js +3 -0
  476. package/lib/browser/game/game-runner.d.ts +28 -0
  477. package/lib/browser/game/game-runner.js +64 -0
  478. package/lib/browser/game/game-util.d.ts +30 -0
  479. package/lib/browser/game/game-util.js +183 -0
  480. package/lib/browser/game/game-view.d.ts +13 -0
  481. package/lib/browser/game/game-view.js +68 -0
  482. package/lib/browser/game/game3d-protocol.d.ts +52 -0
  483. package/lib/browser/game/game3d-protocol.js +3 -0
  484. package/lib/browser/game/game3d-runner.d.ts +28 -0
  485. package/lib/browser/game/game3d-runner.js +153 -0
  486. package/lib/browser/hooks.d.ts +5 -1
  487. package/lib/browser/hooks.js +14 -2
  488. package/lib/browser/i18n/locales.d.ts +92 -2
  489. package/lib/browser/i18n/messages.d.ts +91 -1
  490. package/lib/browser/i18n/messages.js +187 -7
  491. package/lib/browser/index.d.ts +9 -0
  492. package/lib/browser/index.js +9 -0
  493. package/lib/browser/links/links-protocol.d.ts +7 -0
  494. package/lib/browser/links/links.d.ts +24 -7
  495. package/lib/browser/links/links.js +64 -11
  496. package/lib/browser/markdown/code-renderers.d.ts +5 -0
  497. package/lib/browser/markdown/code-renderers.js +40 -0
  498. package/lib/browser/notices/notices-protocol.d.ts +17 -0
  499. package/lib/browser/notices/notices.d.ts +1 -1
  500. package/lib/browser/notices/notices.js +6 -2
  501. package/lib/browser/notices/session-notices.d.ts +70 -0
  502. package/lib/browser/notices/session-notices.js +96 -0
  503. package/lib/browser/offline/device-values.js +12 -3
  504. package/lib/browser/offline/offline-reads.js +3 -1
  505. package/lib/browser/settings/navigation.d.ts +3 -2
  506. package/lib/browser/settings/navigation.js +4 -3
  507. package/lib/browser/settings/settings-protocol.d.ts +15 -0
  508. package/lib/browser/settings/settings-protocol.js +19 -5
  509. package/lib/browser/state/state-protocol.d.ts +8 -1
  510. package/lib/browser/state/state.d.ts +2 -0
  511. package/lib/browser/state/state.js +21 -2
  512. package/lib/browser/style/base.d.ts +1 -1
  513. package/lib/browser/style/base.js +27 -1
  514. package/lib/browser/style/conversation.d.ts +1 -1
  515. package/lib/browser/style/conversation.js +45 -5
  516. package/lib/browser/style/device.js +15 -1
  517. package/lib/browser/style/layout.d.ts +1 -1
  518. package/lib/browser/style/layout.js +192 -56
  519. package/lib/browser/style/pages.d.ts +1 -1
  520. package/lib/browser/style/pages.js +39 -1
  521. package/lib/browser/style/phone.d.ts +1 -1
  522. package/lib/browser/style/phone.js +15 -0
  523. package/lib/browser/style/shell.d.ts +1 -1
  524. package/lib/browser/style/shell.js +32 -6
  525. package/lib/browser/style/surfaces.d.ts +1 -1
  526. package/lib/browser/style/surfaces.js +21 -2
  527. package/lib/browser/style/tints.d.ts +28 -0
  528. package/lib/browser/style/tints.js +59 -0
  529. package/lib/browser/style.js +13 -1
  530. package/lib/browser/util/composer.d.ts +6 -0
  531. package/lib/browser/util/composer.js +16 -0
  532. package/lib/browser/util/desktop.d.ts +19 -1
  533. package/lib/browser/util/desktop.js +15 -0
  534. package/lib/browser/util/frame.d.ts +2 -0
  535. package/lib/browser/util/frame.js +2 -0
  536. package/lib/browser/util/link.d.ts +18 -0
  537. package/lib/browser/util/link.js +66 -1
  538. package/lib/browser/util/markdown.d.ts +4 -1
  539. package/lib/browser/util/markdown.js +1 -1
  540. package/lib/browser/util/message.d.ts +5 -0
  541. package/lib/browser/util/message.js +30 -0
  542. package/lib/browser/util/process.d.ts +57 -3
  543. package/lib/browser/util/process.js +125 -12
  544. package/lib/browser/util/progress.d.ts +19 -1
  545. package/lib/browser/util/progress.js +57 -4
  546. package/lib/browser/util/quote.d.ts +20 -0
  547. package/lib/browser/util/quote.js +61 -0
  548. package/lib/browser/util/tool.d.ts +19 -2
  549. package/lib/browser/util/tool.js +70 -2
  550. package/lib/browser/util/voice.d.ts +47 -7
  551. package/lib/browser/util/voice.js +269 -27
  552. package/lib/browser/workbench-calls.d.ts +6 -4
  553. package/lib/browser/workbench-calls.js +15 -10
  554. package/lib/browser/workbench-protocol.d.ts +31 -2
  555. package/lib/browser/workbench-util.d.ts +15 -4
  556. package/lib/browser/workbench-util.js +28 -5
  557. package/lib/browser/workbench.d.ts +33 -1
  558. package/lib/browser/workbench.js +140 -12
  559. package/package.json +11 -8
@@ -8,82 +8,55 @@ 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, Optional, PostConstruct } from '@celljs/core';
11
- import * as React from 'react';
12
- import { CodeEditor } from '../components/code-editor.js';
13
- import { ContextMenuUtil, useContextMenu } from '../components/context-menu.js';
14
- import { useConversationScroll } from '../components/conversation-scroll.js';
15
- import { DiffEditor } from '../components/diff-editor.js';
16
- import { EmptyState } from '../components/empty-state.js';
17
- import { FolderPicker } from '../components/folder-picker.js';
18
- import { HostTag } from '../components/host-tag.js';
19
- import { ImageViewer } from '../components/image-viewer.js';
20
- import { ListSkeleton } from '../components/list-skeleton.js';
21
- import { Markdown } from '../components/markdown.js';
22
- import { SettingsModelPicker } from '../components/model-picker.js';
23
- import { places } from '../components/nav-places.js';
24
- import { Picture, PictureCards } from '../components/picture.js';
25
- import { QrView } from '../components/qr-view.js';
26
- import { SelectBar, SelectCheck } from '../components/select-bar.js';
27
- import { SwipeRow } from '../components/swipe-row.js';
28
- import { TaAvatar } from '../components/ta-avatar.js';
29
- import { WebComposer } from '../components/web-composer.js';
30
- import { WebDialog } from '../components/web-dialog.js';
31
- import { Device, useDevice } from '../device/device.js';
32
- import { Scanner } from '../device/scanner.js';
11
+ import { arrangeViews } from '../components/nav-places.js';
12
+ import { Device } from '../device/device.js';
33
13
  import { TaFiles } from '../files/files-protocol.js';
34
14
  import { message as messageOf } from '../i18n/messages.js';
35
- import { translator } from '../i18n/use-t.js';
36
15
  import { TaLinks } from '../links/links-protocol.js';
37
16
  import { TaNotices } from '../notices/notices-protocol.js';
17
+ import { TaSessionNotices } from '../notices/session-notices.js';
38
18
  import { TaSettings } from '../settings/settings-protocol.js';
39
19
  import { TaState } from '../state/state-protocol.js';
40
- import { DefaultWebTerminal } from '../terminal/web-terminal.js';
41
- import { DesktopUtil } from '../util/desktop.js';
42
- import { FileDragUtil } from '../util/file-drag.js';
43
20
  import { TaWorkbench } from '../workbench-protocol.js';
44
- import { WEB_ICONS } from './icons.js';
21
+ import { WebEditorTabs } from './web-editor-tabs.js';
45
22
  import { WebExtensionCode } from './web-extension-code.js';
46
- import { BuiltinWebExtension, TaWebExtensions, WebCwdUtil, WebLabelUtil, } from './web-extension-protocol.js';
23
+ import { WebExtensionContext } from './web-extension-context.js';
24
+ import { BuiltinWebExtension, TaWebExtensions, WebExtensionsStateUtil, } from './web-extension-protocol.js';
25
+ import { WebExtensionRunUtil } from './web-extension-run.js';
26
+ import { WebHomeBoard } from './web-home.js';
47
27
  import { WebOnDemand } from './web-on-demand.js';
48
28
  import { WebPagesUtil } from './web-pages.js';
49
29
  import { WebSharing } from './web-sharing.js';
50
- import { WebTaskBoard, WebTaskUtil } from './web-tasks.js';
30
+ import { WebTaskBoard } from './web-tasks.js';
51
31
  import { WebExtensionUtil, WebViewUtil } from './web-view-util.js';
52
- const DEFAULT_ORDER = 100;
53
- const FILE_DRAG = Object.freeze({ set: FileDragUtil.set, has: FileDragUtil.has, get: FileDragUtil.get, paths: FileDragUtil.paths });
54
32
  let TaWebExtensionsImpl = class TaWebExtensionsImpl {
55
33
  constructor() {
56
34
  this.builtins = [];
57
35
  this.tasks = new WebTaskBoard();
36
+ this.home = new WebHomeBoard();
37
+ this.tabs = new WebEditorTabs({
38
+ state: () => this.current,
39
+ update: change => this.update(change),
40
+ persisted: () => this.persisted,
41
+ notices: () => this.notices,
42
+ language: () => this.settings.state.language,
43
+ closed: editor => {
44
+ const run = this.running.get(editor.extension);
45
+ if (editor.onClose && run) {
46
+ this.guard(run, editor.onClose);
47
+ }
48
+ },
49
+ openView: id => this.openView(id, true),
50
+ });
58
51
  /** The code read before, by its hash: a start reads only what changed. */
59
52
  this.code = new WebExtensionCode(() => (typeof localStorage === 'undefined' ? undefined : localStorage));
60
- this.current = {
61
- extensions: [],
62
- views: [],
63
- widgets: [],
64
- composerAddons: [],
65
- settingsSections: [],
66
- renderers: {},
67
- avatars: {},
68
- tools: [],
69
- openers: [],
70
- editors: [],
71
- focus: 0,
72
- page: '',
73
- pageShown: 0,
74
- conversationShown: true,
75
- onOpen: [],
76
- kept: [],
77
- usage: {},
78
- searches: [],
79
- };
53
+ this.current = WebExtensionsStateUtil.empty();
80
54
  this.running = new Map();
81
55
  this.listeners = new Set();
82
56
  this.refreshing = Promise.resolve(false);
83
- /** The tabs of before are open again: from now on, what is open is kept. */
84
- this.restored = false;
85
57
  /** The extensions of the list of the last time have started (startKept), once. */
86
58
  this.keptStarted = false;
59
+ this.nextCustom = 0;
87
60
  this.sharing = new WebSharing({
88
61
  language: () => this.settings.state.language,
89
62
  notices: () => this.notices,
@@ -91,6 +64,14 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
91
64
  views: () => this.current.views,
92
65
  refresh: () => this.refresh(),
93
66
  showView: id => this.showView(id),
67
+ openSpecific: async (url) => {
68
+ for (const opener of this.current.specificOpeners) {
69
+ if (await opener({ type: 'url', url })) {
70
+ return true;
71
+ }
72
+ }
73
+ return false;
74
+ },
94
75
  });
95
76
  /** The pages change with the extensions and with the navigation of the settings. */
96
77
  this.subscribePages = (listener) => {
@@ -101,27 +82,6 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
101
82
  settings();
102
83
  };
103
84
  };
104
- /** The API of one extension: what it registers is its own and goes when it stops. */
105
- /** Monaco in the theme and language of the settings, the same component for every extension. */
106
- this.codeEditor = (props) => React.createElement(CodeEditor, { ...props, settings: this.settings });
107
- this.diffEditor = (props) => React.createElement(DiffEditor, { ...props, settings: this.settings });
108
- this.listDirectory = (directory) => this.workbench.workspace.listDirectory('.', directory);
109
- /** The message box, whose button of the directory lists those of the server. */
110
- this.composer = (props) => { var _a; return React.createElement(WebComposer, {
111
- ...props,
112
- notices: this.notices,
113
- listDirectory: this.listDirectory,
114
- serverCwd: (_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd,
115
- remote: this.workbench,
116
- }); };
117
- this.modelPicker = (props) => React.createElement(SettingsModelPicker, { ...props, settings: this.workbench.settings });
118
- this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(FolderPicker, {
119
- list: this.listDirectory,
120
- initial: initial || ((_a = this.workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd) || '.',
121
- remote: this.workbench,
122
- onPick: async (path) => onPick(path),
123
- onClose,
124
- }); };
125
85
  }
126
86
  get state() {
127
87
  return this.current;
@@ -154,6 +114,9 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
154
114
  refresh() {
155
115
  const next = this.refreshing.then(() => this.reconcile(), () => this.reconcile());
156
116
  this.refreshing = next;
117
+ if (!this.current.loaded) {
118
+ void next.finally(() => this.current.loaded || this.update({ loaded: true })).catch(() => undefined);
119
+ }
157
120
  return next;
158
121
  }
159
122
  /**
@@ -165,22 +128,14 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
165
128
  await this.refresh();
166
129
  await ((_b = (_a = this.conversation) === null || _a === void 0 ? void 0 : _a.reload) === null || _b === void 0 ? void 0 : _b.call(_a));
167
130
  }
168
- async remove(id) {
169
- await this.workbench.packages.removeWebExtension(id);
170
- await this.reloadPackages();
171
- }
172
131
  showEditor(id) {
173
- if (this.current.editors.some(editor => editor.id === id)) {
174
- this.pendingActive = undefined;
175
- this.update({ activeEditor: id, focus: this.current.focus + 1 });
176
- this.keepTabs();
177
- }
132
+ this.tabs.show(id);
178
133
  }
179
134
  openView(id, preserveFocus = false) {
180
135
  const view = this.current.views.find(candidate => candidate.id === id && candidate.location === 'panel');
181
136
  const run = view && this.running.get(view.extension);
182
137
  if (view && run) {
183
- this.openEditor(run, { id: WebViewUtil.editorId(view.id), title: view.title, icon: view.icon, render: view.component }, preserveFocus);
138
+ this.open({ id: WebViewUtil.editorId(view.id), extension: run.loaded.id, title: view.title, icon: view.icon, render: view.component }, preserveFocus);
184
139
  }
185
140
  }
186
141
  showPage(id) {
@@ -207,6 +162,11 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
207
162
  this.showPage('');
208
163
  return true;
209
164
  }
165
+ // Of an extension this page has not heard of yet (one an agent just made, installed from another device):
166
+ // the list is read again once, not the page of extensions shown in its place.
167
+ if (!this.knows(id)) {
168
+ await this.refresh().catch(() => undefined);
169
+ }
210
170
  const info = this.onDemand.find(id);
211
171
  if (info) {
212
172
  await this.onDemand.ensure(info);
@@ -231,6 +191,10 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
231
191
  }
232
192
  return !!view && (view.location === 'page' || view.location === 'panel');
233
193
  }
194
+ /** Whether `ui.showView` has something for an id: an extension started on open, or a view. */
195
+ knows(id) {
196
+ return !!this.onDemand.find(id) || this.current.views.some(view => view.id === id || (view.location === 'page' && view.id.startsWith(`${id}/`)));
197
+ }
234
198
  pages() {
235
199
  const { language, settings } = this.settings.state;
236
200
  const handheld = Device.state.handheld;
@@ -247,13 +211,25 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
247
211
  listed.handheld === handheld) {
248
212
  return listed.pages;
249
213
  }
250
- const arranged = places(views, settings.navigation, handheld);
251
- const placeOf = (view) => view === arranged.home || arranged.nav.includes(view) ? 'navigation' : arranged.discover.includes(view) ? 'discover' : 'list';
252
214
  const infoOf = (id) => { var _a; return (_a = this.running.get(id)) === null || _a === void 0 ? void 0 : _a.loaded.info; };
253
- const pages = WebPagesUtil.pages({ views, onOpen, shown: page, usage, language, placeOf, infoOf });
215
+ const kinds = this.listedKinds();
216
+ const pages = WebPagesUtil.pages({
217
+ views,
218
+ onOpen,
219
+ shown: page,
220
+ usage,
221
+ language,
222
+ placeOf: arrangeViews(views, onOpen, settings.navigation, handheld, infoOf, kinds),
223
+ infoOf,
224
+ kinds,
225
+ });
254
226
  this.listedPages = { state: this.current, language, navigation: settings.navigation, handheld, pages };
255
227
  return pages;
256
228
  }
229
+ /** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
230
+ listedKinds() {
231
+ return WebPagesUtil.listedKinds([...this.current.onOpen.map(entry => entry.info), ...[...this.running.values()].map(run => run.loaded.info)]);
232
+ }
257
233
  stopExtension(name) {
258
234
  const info = this.onDemand.find(name);
259
235
  if (info && this.running.has(info.id)) {
@@ -272,6 +248,16 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
272
248
  share(target) {
273
249
  this.update({ sharing: target });
274
250
  }
251
+ showCustom(extension, component) {
252
+ const id = ++this.nextCustom;
253
+ this.update({ customs: [...this.current.customs, { id, extension, component }] });
254
+ return () => this.closeCustom(id);
255
+ }
256
+ closeCustom(id) {
257
+ if (this.current.customs.some(entry => entry.id === id)) {
258
+ this.update({ customs: this.current.customs.filter(entry => entry.id !== id) });
259
+ }
260
+ }
275
261
  /** Loads and starts an extension started on open, as reconcile starts the others. */
276
262
  async launch(info) {
277
263
  var _a;
@@ -302,53 +288,13 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
302
288
  return this.current.page === id || this.current.activeEditor === WebViewUtil.editorId(id);
303
289
  }
304
290
  closeEditor(id) {
305
- return this.closeEditors([id]);
306
- }
307
- async closeEditors(ids) {
308
- const editors = this.current.editors.filter(candidate => ids.includes(candidate.id));
309
- const dirty = editors.filter(editor => editor.dirty);
310
- if (dirty.length > 0) {
311
- const language = this.settings.state.language;
312
- const title = dirty.length === 1
313
- ? messageOf(language, 'ta.editor.unsavedTitle').replace('{title}', WebLabelUtil.text(dirty[0].title))
314
- : messageOf(language, 'ta.editor.unsavedManyTitle').replace('{count}', String(dirty.length));
315
- const confirmed = await this.notices.confirm({
316
- title,
317
- message: messageOf(language, 'ta.editor.unsavedMessage'),
318
- confirmLabel: messageOf(language, 'ta.editor.discardClose'),
319
- danger: true,
320
- });
321
- if (!confirmed) {
322
- return;
323
- }
324
- }
325
- // Those closed meanwhile are not closed twice.
326
- for (const editor of editors) {
327
- if (this.current.editors.includes(editor)) {
328
- this.dropEditor(editor);
329
- }
330
- }
331
- }
332
- pinEditor(id) {
333
- if (this.current.editors.some(editor => editor.id === id && editor.preview)) {
334
- this.update({ editors: this.current.editors.map(editor => (editor.id === id ? { ...editor, preview: false } : editor)) });
335
- }
291
+ return this.tabs.close([id]);
336
292
  }
337
- /** Removes a tab and tells the extension that opened it. */
338
- dropEditor(editor) {
339
- this.removeEditors(candidate => candidate === editor);
340
- const run = this.running.get(editor.extension);
341
- if (editor.onClose && run) {
342
- this.guard(run, editor.onClose);
343
- }
293
+ closeEditors(ids) {
294
+ return this.tabs.close(ids);
344
295
  }
345
- setDirty(run, id, dirty) {
346
- const found = this.current.editors.find(editor => editor.id === id && editor.extension === run.loaded.id);
347
- if (found && !!found.dirty !== dirty) {
348
- this.update({
349
- editors: this.current.editors.map(editor => (editor === found ? { ...editor, dirty, preview: dirty ? false : editor.preview } : editor)),
350
- });
351
- }
296
+ pinEditor(id) {
297
+ this.tabs.pin(id);
352
298
  }
353
299
  connect(conversation) {
354
300
  this.conversation = conversation;
@@ -364,6 +310,9 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
364
310
  setSessionSwitcher(switcher) {
365
311
  this.switcher = switcher;
366
312
  }
313
+ sessionSwitcher() {
314
+ return this.switcher;
315
+ }
367
316
  emit(event) {
368
317
  for (const run of this.running.values()) {
369
318
  for (const { type, handler } of run.handlers) {
@@ -430,9 +379,7 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
430
379
  // The list of those started on open may have changed too.
431
380
  this.publish();
432
381
  changed = changed || stopped || starting.length > 0;
433
- if (!this.restored) {
434
- await this.restoreTabs();
435
- }
382
+ await this.tabs.restore();
436
383
  return changed;
437
384
  }
438
385
  /**
@@ -464,25 +411,6 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
464
411
  }
465
412
  return started;
466
413
  }
467
- /** The tools open before, behind what is shown; the tab shown before, once it is open again. */
468
- async restoreTabs() {
469
- const kept = await this.persisted.load(WebViewUtil.TABS);
470
- this.restored = true;
471
- this.pendingActive = this.current.editors.some(editor => editor.id === kept.active) ? undefined : kept.active;
472
- for (const id of kept.views) {
473
- this.openView(id, true);
474
- }
475
- if (kept.active && this.current.editors.some(editor => editor.id === kept.active)) {
476
- this.update({ activeEditor: kept.active });
477
- }
478
- this.keepTabs();
479
- }
480
- keepTabs() {
481
- var _a;
482
- if (this.restored) {
483
- this.persisted.set(WebViewUtil.TABS, WebViewUtil.tabs(this.current.editors, (_a = this.pendingActive) !== null && _a !== void 0 ? _a : this.current.activeEditor));
484
- }
485
- }
486
414
  /** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
487
415
  stopUnless(keep) {
488
416
  let stopped = false;
@@ -512,17 +440,17 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
512
440
  startPackage(info, load) {
513
441
  const loaded = { id: info.id, name: info.name, info };
514
442
  if ('error' in load) {
515
- this.running.set(info.id, { ...this.record(loaded, info.hash), loaded: { ...loaded, error: load.error } });
443
+ this.running.set(info.id, WebExtensionRunUtil.create({ ...loaded, error: load.error }, info.hash));
516
444
  }
517
445
  else {
518
446
  this.start(loaded, load.factory, load.hash);
519
447
  }
520
448
  }
521
449
  start(loaded, factory, hash) {
522
- const run = this.record(loaded, hash);
450
+ const run = WebExtensionRunUtil.create(loaded, hash);
523
451
  this.running.set(loaded.id, run);
524
452
  try {
525
- const dispose = factory(this.api(run));
453
+ const dispose = factory(this.context.create(run));
526
454
  run.dispose = typeof dispose === 'function' ? dispose : undefined;
527
455
  run.started = true;
528
456
  }
@@ -536,322 +464,39 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
536
464
  if (run.dispose) {
537
465
  this.guard(run, run.dispose);
538
466
  }
539
- run.views.clear();
540
- run.widgets.clear();
541
- run.renderers.clear();
542
- run.avatar = undefined;
543
- run.tools = [];
544
- run.openers = [];
545
- run.taskSources = [];
546
- run.searches = [];
547
- run.handlers = [];
548
- for (const unsubscribe of run.unsubscribes.splice(0)) {
549
- unsubscribe();
550
- }
551
- this.removeEditors(editor => editor.extension === run.loaded.id);
552
- }
553
- openEditor(run, editor, preserveFocus = false, preview = false) {
554
- if (!run.stopped) {
555
- this.open({ ...editor, extension: run.loaded.id, preview }, preserveFocus);
556
- }
467
+ WebExtensionRunUtil.clear(run);
468
+ this.tabs.remove(editor => editor.extension === run.loaded.id);
557
469
  }
558
470
  open(editor, preserveFocus = false) {
559
- let editors = [...this.current.editors];
560
- const index = editors.findIndex(candidate => candidate.id === editor.id);
561
- if (index >= 0) {
562
- const open = editors[index];
563
- // A tab kept stays kept; one dirty stays dirty.
564
- editors[index] = { ...editor, preview: !!editor.preview && !!open.preview && !open.dirty, dirty: open.dirty };
565
- }
566
- else {
567
- // A preview takes the place of the preview open, as a single click does in an IDE.
568
- const replaced = editor.preview ? editors.find(candidate => candidate.preview && !candidate.dirty) : undefined;
569
- if (replaced) {
570
- editors[editors.indexOf(replaced)] = editor;
571
- const run = this.running.get(replaced.extension);
572
- if (replaced.onClose && run) {
573
- this.guard(run, replaced.onClose);
574
- }
575
- }
576
- else {
577
- editors = [...editors, editor];
578
- }
579
- }
580
- if (!preserveFocus) {
581
- this.pendingActive = undefined;
582
- this.update({ editors, activeEditor: editor.id, focus: this.current.focus + 1 });
583
- }
584
- else if (editor.id === this.pendingActive || this.current.activeEditor === undefined) {
585
- if (editor.id === this.pendingActive) {
586
- this.pendingActive = undefined;
587
- }
588
- this.update({ editors, activeEditor: editor.id });
589
- }
590
- else {
591
- this.update({ editors });
592
- }
593
- this.keepTabs();
471
+ this.tabs.open(editor, preserveFocus);
594
472
  }
595
- removeEditors(match) {
473
+ /** What the API of each extension asks of the page; made when the first starts, once the fields are injected. */
474
+ get context() {
596
475
  var _a;
597
- const editors = this.current.editors.filter(editor => !match(editor));
598
- if (editors.length === this.current.editors.length) {
599
- return;
600
- }
601
- const active = editors.some(editor => editor.id === this.current.activeEditor) ? this.current.activeEditor : (_a = editors[editors.length - 1]) === null || _a === void 0 ? void 0 : _a.id;
602
- this.update({ editors, activeEditor: active });
603
- this.keepTabs();
604
- }
605
- record(loaded, hash) {
606
- return {
607
- loaded,
608
- hash,
609
- started: false,
610
- stopped: false,
611
- views: new Map(),
612
- widgets: new Map(),
613
- renderers: new Map(),
614
- tools: [],
615
- openers: [],
616
- taskSources: [],
617
- searches: [],
618
- composerAddons: [],
619
- settingsSections: [],
620
- handlers: [],
621
- unsubscribes: [],
622
- };
623
- }
624
- api(run) {
625
- const { workbench, settings, taFiles } = this;
626
- const subscribe = (listener) => this.subscribe(listener);
627
- const register = (change) => {
628
- if (!run.stopped) {
629
- change();
630
- if (run.started) {
631
- this.publish();
632
- }
633
- }
634
- };
635
- return {
636
- React,
637
- get server() {
638
- return workbench.server;
639
- },
640
- get workspace() {
641
- return workbench.workspace;
642
- },
643
- get terminals() {
644
- return workbench.terminals;
645
- },
646
- get packages() {
647
- return workbench.packages;
648
- },
649
- get files() {
650
- return taFiles;
651
- },
652
- get remote() {
653
- return workbench.remote;
654
- },
655
- get settings() {
656
- return workbench.settings;
657
- },
658
- ui: {
659
- setWidget: (key, component, options = {}) => register(() => (component ? run.widgets.set(key, { component, options }) : run.widgets.delete(key))),
660
- notify: (message, type = 'info') => {
661
- if (!run.stopped) {
662
- this.notices.notify(message, { level: type });
663
- }
664
- },
665
- confirm: (title, message, options) => (run.stopped ? Promise.resolve(false) : this.notices.confirm({ title, message, ...options })),
666
- input: (title, placeholder, options) => run.stopped ? Promise.resolve(undefined) : this.notices.input({ title, placeholder, value: options === null || options === void 0 ? void 0 : options.value }),
667
- editor: (title, prefill) => (run.stopped ? Promise.resolve(undefined) : this.notices.input({ title, value: prefill, multiline: true })),
668
- get theme() {
669
- return settings.state.theme;
670
- },
671
- get language() {
672
- return settings.state.language;
673
- },
674
- supportsWebview: DesktopUtil.has('webview'),
675
- desktop: DesktopUtil.fileManager(),
676
- fileDrag: FILE_DRAG,
677
- debugWebview: DesktopUtil.debugWebview(),
678
- openEditor: (editor, options) => this.openEditor(run, editor, (options === null || options === void 0 ? void 0 : options.preserveFocus) === true, (options === null || options === void 0 ? void 0 : options.preview) === true),
679
- closeEditor: id => this.removeEditors(editor => editor.id === id && editor.extension === run.loaded.id),
680
- pinEditor: id => {
681
- if (this.current.editors.some(editor => editor.id === id && editor.extension === run.loaded.id)) {
682
- this.pinEditor(id);
683
- }
684
- },
685
- setEditorDirty: (id, dirty) => this.setDirty(run, id, dirty),
686
- useActiveEditor: () => {
687
- const active = () => this.current.activeEditor;
688
- return React.useSyncExternalStore(subscribe, active, active);
689
- },
690
- useCwd: () => {
691
- var _a;
692
- // The conversation's while it is in front; with a page, the settings or nothing in front, the default directory.
693
- const shown = () => WebCwdUtil.shown(this.current);
694
- const cwd = React.useSyncExternalStore(subscribe, shown, shown);
695
- const server = () => { var _a; return (_a = workbench.state.server) === null || _a === void 0 ? void 0 : _a.cwd; };
696
- const fallback = React.useSyncExternalStore(listener => workbench.subscribe(listener), server, server);
697
- return (_a = cwd !== null && cwd !== void 0 ? cwd : fallback) !== null && _a !== void 0 ? _a : '.';
698
- },
699
- useSessionId: () => React.useSyncExternalStore(subscribe, () => this.current.sessionId),
700
- useSessions: () => {
701
- const sessions = () => workbench.state.sessions;
702
- return React.useSyncExternalStore(listener => workbench.subscribe(listener), sessions, sessions);
703
- },
704
- useDevice,
705
- showView: id => (run.stopped ? Promise.resolve(false) : this.showView(id)),
706
- usePages: () => {
707
- // Read again when the device or the navigation changes where a page is.
708
- useDevice(device => device.handheld);
709
- return React.useSyncExternalStore(this.subscribePages, () => this.pages());
710
- },
711
- useContextMenu: () => {
712
- const [menu, open] = useContextMenu();
713
- const openSections = React.useCallback((event, sections) => open(event, sections
714
- .filter(section => section.length > 0)
715
- .flatMap((section, index) => [...(index > 0 ? ['-'] : []), ...section])), [open]);
716
- return [menu, openSections];
717
- },
718
- attachMenu: ContextMenuUtil.attach,
719
- scanCode: Scanner.available() ? instructions => Scanner.scan(instructions, messageOf(settings.state.language, 'ta.cancel')) : undefined,
720
- stopExtension: name => !run.stopped && this.stopExtension(name),
721
- shareExtension: target => !run.stopped && this.share(target),
722
- openShared: text => (run.stopped ? Promise.resolve(false) : this.openShared(text)),
723
- forgetPage: id => !run.stopped && this.forgetPage(id),
724
- useTasks: () => React.useSyncExternalStore(this.tasks.subscribe, this.tasks.tasks, this.tasks.tasks),
725
- removeTasks: tasks => (run.stopped ? Promise.resolve(false) : WebTaskUtil.remove(tasks, this.notices, translator(settings.state.language))),
726
- useView: id => {
727
- const find = () => this.current.views.find(candidate => candidate.id === id);
728
- const isShown = () => this.isShown(id);
729
- const view = React.useSyncExternalStore(subscribe, find, find);
730
- const shown = React.useSyncExternalStore(subscribe, isShown, isShown);
731
- // The title is read again in another language: a string, so that the same words stay the same value.
732
- const title = view ? WebLabelUtil.text(view.title) : undefined;
733
- // The preview as one string, so that the same line stays the same value.
734
- const watch = React.useCallback((listener) => { var _a; var _b; return (_b = (_a = view === null || view === void 0 ? void 0 : view.subscribePreview) === null || _a === void 0 ? void 0 : _a.call(view, listener)) !== null && _b !== void 0 ? _b : (() => undefined); }, [view]);
735
- const read = () => {
736
- var _a;
737
- const preview = (_a = view === null || view === void 0 ? void 0 : view.preview) === null || _a === void 0 ? void 0 : _a.call(view);
738
- return preview ? `${preview.at}\n${preview.text}` : '';
739
- };
740
- const line = React.useSyncExternalStore(watch, read, read);
741
- const isBusy = () => { var _a; return !!((_a = view === null || view === void 0 ? void 0 : view.busy) === null || _a === void 0 ? void 0 : _a.call(view)); };
742
- const busy = React.useSyncExternalStore(watch, isBusy, isBusy);
743
- return React.useMemo(() => {
744
- if (!view || title === undefined) {
745
- return undefined;
746
- }
747
- const cut = line.indexOf('\n');
748
- const preview = line ? { at: Number(line.slice(0, cut)), text: line.slice(cut + 1) } : undefined;
749
- return { title, location: view.location, shown, menu: view.menu, preview, busy };
750
- }, [view, title, shown, line, busy]);
751
- },
752
- Avatar: TaAvatar,
753
- icons: WEB_ICONS,
754
- CodeEditor: this.codeEditor,
755
- DiffEditor: this.diffEditor,
756
- // Ends with the extension.
757
- createTerminal: (options) => {
758
- const terminal = new DefaultWebTerminal(settings, (target, open) => void this.links.open(target, open), options);
759
- run.unsubscribes.push(() => terminal.dispose());
760
- return terminal;
761
- },
762
- Composer: this.composer,
763
- Markdown,
764
- useChatScroll: (sent, key) => useConversationScroll(sent, { sentTo: 'bottom', key }),
765
- Empty: EmptyState,
766
- Skeleton: ListSkeleton,
767
- HostTag,
768
- SwipeRow,
769
- SelectCheck,
770
- SelectBar,
771
- Picture,
772
- PictureCards,
773
- ImageViewer,
774
- QrCode: QrView,
775
- Dialog: WebDialog,
776
- FolderPicker: this.folderPicker,
777
- ModelPicker: this.modelPicker,
778
- },
779
- onTerminalData: listener => {
780
- if (run.stopped) {
781
- return () => undefined;
782
- }
783
- const unsubscribe = workbench.onTerminalData((terminalId, data, exitCode) => this.guard(run, () => listener(terminalId, data, exitCode)));
784
- run.unsubscribes.push(unsubscribe);
785
- return () => {
786
- unsubscribe();
787
- run.unsubscribes = run.unsubscribes.filter(other => other !== unsubscribe);
788
- };
789
- },
790
- storage: { ...this.storage(run), directory: cwd => this.storage(run, cwd) },
791
- registerView: (name, view) => register(() => run.views.set(name, view)),
792
- registerMessageRenderer: (customType, renderer) => register(() => run.renderers.set(customType, renderer)),
793
- registerAvatar: avatar => register(() => {
794
- run.avatar = avatar;
795
- }),
796
- registerTool: tool => register(() => run.tools.push(tool)),
797
- registerTasks: source => register(() => run.taskSources.push(source)),
798
- registerSearch: source => register(() => run.searches.push(source)),
799
- registerComposerAddon: addon => register(() => run.composerAddons.push(addon)),
800
- registerSettings: section => register(() => run.settingsSections.push(section)),
801
- registerOpener: opener => register(() => run.openers.push(async (link) => {
802
- // An opener that fails, or of an extension that stopped, leaves the link to the next one.
803
- try {
804
- return !run.stopped && (await opener(link)) === true;
805
- }
806
- catch (error) {
807
- console.error(`The web extension ${run.loaded.name} failed:`, error);
808
- return false;
809
- }
810
- })),
811
- on: (type, handler) => register(() => run.handlers.push({ type, handler: handler })),
812
- sendUserMessage: async (text) => {
813
- var _a;
814
- if (!((_a = this.conversation) === null || _a === void 0 ? void 0 : _a.send)) {
815
- throw new Error('No conversation is shown yet.');
816
- }
817
- await this.conversation.send(text);
818
- },
819
- switchSession: async (session, opening) => {
820
- if (!this.switcher) {
821
- throw new Error('The page cannot show another conversation yet.');
822
- }
823
- const shown = this.switcher(session, opening);
824
- this.showPage('');
825
- await shown;
826
- },
827
- openTemporary: (source, from) => this.openTemporary(source, from),
828
- callHost: (method, ...params) => workbench.packages.callPackageHost(run.loaded.name, method, params),
829
- reloadExtensions: () => this.reloadPackages(),
830
- };
476
+ (_a = this.wired) !== null && _a !== void 0 ? _a : (this.wired = new WebExtensionContext(this.contextHost()));
477
+ return this.wired;
831
478
  }
832
- /** The data of the package of an extension on the server; of a directory with `cwd`. */
833
- storage(run, cwd) {
834
- const { workbench } = this;
835
- const { name } = run.loaded;
479
+ contextHost() {
480
+ const self = this;
836
481
  return {
837
- // JSON has no undefined: none comes as null.
838
- get: async (key) => { var _a; return ((_a = (await workbench.packages.getExtensionData(name, key, cwd))) !== null && _a !== void 0 ? _a : undefined); },
839
- set: (key, value) => workbench.packages.setExtensionData(name, key, value, cwd),
840
- onChange: listener => {
841
- if (run.stopped) {
842
- return () => undefined;
843
- }
844
- const unsubscribe = workbench.onExtensionData((changed, keys, directory) => {
845
- if (changed === name && directory === cwd) {
846
- this.guard(run, () => listener(keys));
847
- }
848
- });
849
- run.unsubscribes.push(unsubscribe);
850
- return () => {
851
- unsubscribe();
852
- run.unsubscribes = run.unsubscribes.filter(other => other !== unsubscribe);
853
- };
482
+ extensions: this,
483
+ workbench: this.workbench,
484
+ settings: this.settings,
485
+ files: this.taFiles,
486
+ notices: this.notices,
487
+ // Detached: asked for when a terminal opens a link, not before.
488
+ get links() {
489
+ return self.links;
854
490
  },
491
+ tabs: this.tabs,
492
+ publish: () => this.publish(),
493
+ guard: (run, action) => this.guard(run, action),
494
+ isShown: id => this.isShown(id),
495
+ subscribePages: listener => this.subscribePages(listener),
496
+ conversation: () => this.conversation,
497
+ switcher: () => this.switcher,
498
+ sessionNotices: this.sessionNotices,
499
+ persisted: this.persisted,
855
500
  };
856
501
  }
857
502
  guard(run, action) {
@@ -863,68 +508,24 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl {
863
508
  }
864
509
  }
865
510
  publish() {
866
- var _a;
867
511
  const runs = [...this.running.values()];
868
- const renderers = {};
869
- const avatars = {};
870
- const tools = [];
871
- for (const run of runs) {
872
- if (run.avatar) {
873
- avatars[run.loaded.name] = run.avatar;
874
- }
875
- for (const [type, renderer] of run.renderers) {
876
- (_a = renderers[type]) !== null && _a !== void 0 ? _a : (renderers[type] = renderer);
877
- }
878
- for (const tool of run.tools) {
879
- if (!tools.some(other => other.name === tool.name)) {
880
- tools.push(tool);
881
- }
882
- }
883
- }
884
512
  this.tasks.setSources(runs.flatMap(run => run.taskSources.map(source => ({ extension: run.loaded.name, source }))));
885
- const views = runs.flatMap(run => [...run.views].map(([name, view]) => { var _a, _b, _c, _d; var _e, _f; return ({
886
- id: `${run.loaded.name}/${name}`,
887
- extension: run.loaded.id,
888
- title: view.title,
889
- component: view.render,
890
- icon: view.icon,
891
- location: (_e = view.location) !== null && _e !== void 0 ? _e : 'page',
892
- order: (_f = view.order) !== null && _f !== void 0 ? _f : DEFAULT_ORDER,
893
- head: view.head,
894
- pages: view.pages,
895
- discover: view.discover,
896
- menu: (_a = view.menu) === null || _a === void 0 ? void 0 : _a.bind(view),
897
- preview: (_b = view.preview) === null || _b === void 0 ? void 0 : _b.bind(view),
898
- busy: (_c = view.busy) === null || _c === void 0 ? void 0 : _c.bind(view),
899
- subscribePreview: (_d = view.subscribe) === null || _d === void 0 ? void 0 : _d.bind(view),
900
- ...(this.onDemand.has(run.loaded.id) ? { onOpen: true } : {}),
901
- }); }));
513
+ this.home.setSources(runs.flatMap(run => run.homeSources.map(source => ({ extension: run.loaded.name, source }))));
514
+ const { views, ...registered } = WebExtensionRunUtil.collect(runs, id => this.onDemand.has(id));
902
515
  if (this.placeholders) {
903
516
  views.push(...this.placeholders.filter(placeholder => !views.some(view => view.id === placeholder.id)));
904
517
  }
905
518
  else {
906
- this.persisted.set(WebViewUtil.KEPT, WebViewUtil.keep(views));
519
+ const kinds = this.listedKinds();
520
+ // Those of a kind a page lists never take a place of the navigation: none to keep for its first frame.
521
+ this.persisted.set(WebViewUtil.KEPT, WebViewUtil.keep(views.filter(view => { var _a; return !WebPagesUtil.listed((_a = this.running.get(view.extension)) === null || _a === void 0 ? void 0 : _a.loaded.info, kinds); })));
907
522
  }
908
523
  this.update({
909
- openers: runs.flatMap(run => run.openers),
910
- extensions: runs.map(run => run.loaded),
524
+ ...registered,
911
525
  views: views.sort((a, b) => a.order - b.order),
912
- widgets: runs.flatMap(run => [...run.widgets].map(([key, { component, options }]) => { var _a; return ({
913
- id: `${run.loaded.id}/${key}`,
914
- extension: run.loaded.id,
915
- placement: (_a = options.placement) !== null && _a !== void 0 ? _a : 'aboveEditor',
916
- title: options.title,
917
- component,
918
- }); })),
919
- composerAddons: runs.flatMap(run => run.composerAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
920
- settingsSections: runs.flatMap(run => run.settingsSections.map((section, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, section }))),
921
- renderers,
922
- avatars,
923
- tools,
924
526
  onOpen: this.onDemand.list(),
925
527
  kept: this.onDemand.kept(),
926
528
  usage: this.onDemand.used,
927
- searches: runs.flatMap(run => run.searches).sort((a, b) => { var _a, _b; return ((_a = a.order) !== null && _a !== void 0 ? _a : DEFAULT_ORDER) - ((_b = b.order) !== null && _b !== void 0 ? _b : DEFAULT_ORDER); }),
928
529
  });
929
530
  }
930
531
  update(change) {
@@ -958,6 +559,10 @@ __decorate([
958
559
  Autowired(TaState),
959
560
  __metadata("design:type", Object)
960
561
  ], TaWebExtensionsImpl.prototype, "persisted", void 0);
562
+ __decorate([
563
+ Autowired(TaSessionNotices),
564
+ __metadata("design:type", Object)
565
+ ], TaWebExtensionsImpl.prototype, "sessionNotices", void 0);
961
566
  __decorate([
962
567
  Autowired(BuiltinWebExtension),
963
568
  Optional(),