@celljs/ta 4.9.1 → 4.11.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 (673) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +3 -1
  3. package/dist/cli.mjs +1753 -75
  4. package/dist/gateway.mjs +311 -25
  5. package/dist/pi/CHANGELOG.md +30 -0
  6. package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
  7. package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
  8. package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
  9. package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
  10. package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
  11. package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
  12. package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
  13. package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
  14. package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
  15. package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
  16. package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  17. package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
  18. package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
  19. package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
  20. package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
  21. package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
  22. package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
  23. package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
  24. package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
  25. package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
  26. package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
  27. package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
  28. package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  29. package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
  30. package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
  31. package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
  32. package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
  33. package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
  34. package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
  35. package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
  36. package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
  37. package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
  38. package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
  39. package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
  40. package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
  41. package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
  42. package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
  43. package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
  44. package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
  45. package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
  46. package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
  47. package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
  48. package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
  49. package/dist/pi/dist/bundle/cli-runtime.js +1 -1
  50. package/dist/pi/dist/bundle/index.js +1 -1
  51. package/dist/pi/dist/bundle/rpc-entry.js +1 -1
  52. package/dist/pi/docs/cli.md +14 -1
  53. package/dist/pi/docs/extensions.md +27 -7
  54. package/dist/pi/docs/keybindings.md +1 -1
  55. package/dist/pi/docs/llama-cpp.md +5 -8
  56. package/dist/pi/docs/models-configuration.md +6 -1
  57. package/dist/pi/docs/models.md +2 -1
  58. package/dist/pi/docs/prompt-templates.md +1 -1
  59. package/dist/pi/docs/providers.md +1 -1
  60. package/dist/pi/docs/rpc.md +4 -2
  61. package/dist/pi/docs/sessions.md +7 -1
  62. package/dist/pi/docs/settings.md +1 -1
  63. package/dist/pi/docs/tui.md +1 -1
  64. package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  65. package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
  66. package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  67. package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
  68. package/dist/pi/examples/extensions/gondolin/package.json +1 -1
  69. package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
  70. package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
  71. package/dist/pi/examples/extensions/subagent/README.md +14 -11
  72. package/dist/pi/examples/extensions/subagent/index.ts +392 -171
  73. package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
  74. package/dist/pi/examples/extensions/with-deps/package.json +1 -1
  75. package/dist/pi/examples/tsconfig.json +63 -35
  76. package/dist/pi/package.json +1 -1
  77. package/dist/pi/packages/ta-agents/extension/index.mjs +185 -140
  78. package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
  79. package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +2 -0
  80. package/dist/pi/packages/ta-agents/lib/agent-bindings.js +4 -0
  81. package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
  82. package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
  83. package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
  84. package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
  85. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
  86. package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
  87. package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
  88. package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
  89. package/dist/pi/packages/ta-agents/lib/extension.js +15 -1
  90. package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
  91. package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
  92. package/dist/pi/packages/ta-agents/package.json +3 -3
  93. package/dist/pi/packages/ta-bots/extension/index.mjs +31 -253
  94. package/dist/pi/packages/ta-bots/host/index.mjs +189 -1
  95. package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
  96. package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
  97. package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
  98. package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
  99. package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
  100. package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
  101. package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
  102. package/dist/pi/packages/ta-bots/lib/index.js +2 -0
  103. package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
  104. package/dist/pi/packages/ta-bots/lib/style.js +1 -0
  105. package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
  106. package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
  107. package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
  108. package/dist/pi/packages/ta-bots/package.json +1 -1
  109. package/dist/pi/packages/ta-bots/web/index.js +47 -16
  110. package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
  111. package/dist/pi/packages/ta-changes/lib/card.js +18 -4
  112. package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
  113. package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
  114. package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
  115. package/dist/pi/packages/ta-changes/package.json +1 -1
  116. package/dist/pi/packages/ta-changes/web/index.js +16 -3
  117. package/dist/pi/packages/ta-channels/README.en.md +6 -5
  118. package/dist/pi/packages/ta-channels/README.md +6 -5
  119. package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
  120. package/dist/pi/packages/ta-channels/host/index.mjs +638 -43
  121. package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
  122. package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
  123. package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
  124. package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
  125. package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
  126. package/dist/pi/packages/ta-channels/lib/card.js +178 -0
  127. package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
  128. package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
  129. package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
  130. package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
  131. package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
  132. package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
  133. package/dist/pi/packages/ta-channels/lib/create.js +14 -4
  134. package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
  135. package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
  136. package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
  137. package/dist/pi/packages/ta-channels/lib/faces.js +7 -1
  138. package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
  139. package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
  140. package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
  141. package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
  142. package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
  143. package/dist/pi/packages/ta-channels/lib/host.js +1 -1
  144. package/dist/pi/packages/ta-channels/lib/i18n.d.ts +49 -8
  145. package/dist/pi/packages/ta-channels/lib/i18n.js +98 -16
  146. package/dist/pi/packages/ta-channels/lib/index.js +10 -1
  147. package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
  148. package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
  149. package/dist/pi/packages/ta-channels/lib/members.js +6 -2
  150. package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
  151. package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
  152. package/dist/pi/packages/ta-channels/lib/notice.d.ts +25 -0
  153. package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
  154. package/dist/pi/packages/ta-channels/lib/room.js +26 -10
  155. package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
  156. package/dist/pi/packages/ta-channels/lib/sidebar.js +257 -84
  157. package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
  158. package/dist/pi/packages/ta-channels/lib/style.js +151 -40
  159. package/dist/pi/packages/ta-channels/lib/tasks.js +3 -4
  160. package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
  161. package/dist/pi/packages/ta-channels/lib/team.js +159 -38
  162. package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
  163. package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
  164. package/dist/pi/packages/ta-channels/lib/views.d.ts +54 -1
  165. package/dist/pi/packages/ta-channels/lib/views.js +129 -1
  166. package/dist/pi/packages/ta-channels/package.json +2 -1
  167. package/dist/pi/packages/ta-channels/web/index.js +1792 -439
  168. package/dist/pi/packages/ta-computer-use/package.json +7 -2
  169. package/dist/pi/packages/ta-cron/README.en.md +6 -4
  170. package/dist/pi/packages/ta-cron/README.md +6 -4
  171. package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
  172. package/dist/pi/packages/ta-cron/host/index.mjs +30 -3
  173. package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
  174. package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
  175. package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
  176. package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
  177. package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
  178. package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
  179. package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
  180. package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
  181. package/dist/pi/packages/ta-cron/lib/editor.js +65 -30
  182. package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
  183. package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
  184. package/dist/pi/packages/ta-cron/lib/i18n.d.ts +30 -1
  185. package/dist/pi/packages/ta-cron/lib/i18n.js +60 -2
  186. package/dist/pi/packages/ta-cron/lib/index.js +4 -0
  187. package/dist/pi/packages/ta-cron/lib/page.d.ts +38 -4
  188. package/dist/pi/packages/ta-cron/lib/page.js +131 -4
  189. package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
  190. package/dist/pi/packages/ta-cron/lib/react.js +8 -0
  191. package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
  192. package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
  193. package/dist/pi/packages/ta-cron/lib/style.js +168 -50
  194. package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
  195. package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
  196. package/dist/pi/packages/ta-cron/lib/task-util.d.ts +4 -0
  197. package/dist/pi/packages/ta-cron/lib/task-util.js +31 -1
  198. package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
  199. package/dist/pi/packages/ta-cron/lib/tasks-view.js +107 -67
  200. package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
  201. package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
  202. package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
  203. package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
  204. package/dist/pi/packages/ta-cron/package.json +12 -1
  205. package/dist/pi/packages/ta-cron/web/index.js +1346 -415
  206. package/dist/pi/packages/ta-extensions/README.en.md +4 -2
  207. package/dist/pi/packages/ta-extensions/README.md +4 -2
  208. package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
  209. package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
  210. package/dist/pi/packages/ta-extensions/lib/actions.js +16 -5
  211. package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
  212. package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
  213. package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +5 -0
  214. package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -0
  215. package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
  216. package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
  217. package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
  218. package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
  219. package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
  220. package/dist/pi/packages/ta-extensions/lib/market-parts.js +8 -2
  221. package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
  222. package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
  223. package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
  224. package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
  225. package/dist/pi/packages/ta-extensions/lib/page.js +52 -23
  226. package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
  227. package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
  228. package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
  229. package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
  230. package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
  231. package/dist/pi/packages/ta-extensions/lib/style.js +13 -6
  232. package/dist/pi/packages/ta-extensions/package.json +6 -1
  233. package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +25 -10
  234. package/dist/pi/packages/ta-extensions/web/index.js +459 -47
  235. package/dist/pi/packages/ta-games/README.en.md +47 -0
  236. package/dist/pi/packages/ta-games/README.md +47 -0
  237. package/dist/pi/packages/ta-games/host/index.mjs +65 -0
  238. package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
  239. package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
  240. package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
  241. package/dist/pi/packages/ta-games/lib/host.js +83 -0
  242. package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
  243. package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
  244. package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
  245. package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
  246. package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
  247. package/dist/pi/packages/ta-games/lib/index.js +24 -0
  248. package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
  249. package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
  250. package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
  251. package/dist/pi/packages/ta-games/lib/react.js +16 -0
  252. package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
  253. package/dist/pi/packages/ta-games/lib/style.js +33 -0
  254. package/dist/pi/packages/ta-games/package.json +60 -0
  255. package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
  256. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
  257. package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
  258. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
  259. package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
  260. package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
  261. package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
  262. package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
  263. package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
  264. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
  265. package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
  266. package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
  267. package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
  268. package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
  269. package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
  270. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
  271. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
  272. package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
  273. package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
  274. package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
  275. package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
  276. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
  277. package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
  278. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
  279. package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
  280. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
  281. package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
  282. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
  283. package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
  284. package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
  285. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
  286. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
  287. package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
  288. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
  289. package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
  290. package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
  291. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
  292. package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
  293. package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
  294. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
  295. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
  296. package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
  297. package/dist/pi/packages/ta-games/web/index.js +431 -0
  298. package/dist/pi/packages/ta-glance/README.en.md +11 -0
  299. package/dist/pi/packages/ta-glance/README.md +11 -0
  300. package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
  301. package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
  302. package/dist/pi/packages/ta-glance/lib/card.js +268 -0
  303. package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
  304. package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
  305. package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
  306. package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
  307. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
  308. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
  309. package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
  310. package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
  311. package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +6 -0
  312. package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -0
  313. package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
  314. package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
  315. package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
  316. package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
  317. package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
  318. package/dist/pi/packages/ta-glance/lib/index.js +22 -0
  319. package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
  320. package/dist/pi/packages/ta-glance/lib/react.js +8 -0
  321. package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
  322. package/dist/pi/packages/ta-glance/lib/style.js +164 -0
  323. package/dist/pi/packages/ta-glance/package.json +53 -0
  324. package/dist/pi/packages/ta-glance/web/index.js +933 -0
  325. package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
  326. package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
  327. package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
  328. package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
  329. package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
  330. package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
  331. package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
  332. package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
  333. package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
  334. package/dist/pi/packages/ta-launcher/package.json +1 -1
  335. package/dist/pi/packages/ta-launcher/web/index.js +34 -17
  336. package/dist/pi/packages/ta-manual/README.en.md +10 -0
  337. package/dist/pi/packages/ta-manual/README.md +10 -0
  338. package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
  339. package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
  340. package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
  341. package/dist/pi/packages/ta-manual/lib/index.js +24 -0
  342. package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
  343. package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
  344. package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
  345. package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
  346. package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
  347. package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
  348. package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
  349. package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
  350. package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
  351. package/dist/pi/packages/ta-manual/lib/pictures.js +16 -0
  352. package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
  353. package/dist/pi/packages/ta-manual/lib/react.js +8 -0
  354. package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
  355. package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
  356. package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
  357. package/dist/pi/packages/ta-manual/lib/style.js +47 -0
  358. package/dist/pi/packages/ta-manual/lib/topics.d.ts +42 -0
  359. package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
  360. package/dist/pi/packages/ta-manual/package.json +54 -0
  361. package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
  362. package/dist/pi/packages/ta-manual/web/index.js +2223 -0
  363. package/dist/pi/packages/ta-notify/README.en.md +29 -0
  364. package/dist/pi/packages/ta-notify/README.md +29 -0
  365. package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
  366. package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
  367. package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
  368. package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
  369. package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
  370. package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
  371. package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
  372. package/dist/pi/packages/ta-notify/lib/host.js +9 -0
  373. package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
  374. package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
  375. package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
  376. package/dist/pi/packages/ta-notify/lib/index.js +29 -0
  377. package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
  378. package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
  379. package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
  380. package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
  381. package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
  382. package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
  383. package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
  384. package/dist/pi/packages/ta-notify/lib/react.js +8 -0
  385. package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
  386. package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
  387. package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
  388. package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
  389. package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
  390. package/dist/pi/packages/ta-notify/lib/style.js +29 -0
  391. package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
  392. package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
  393. package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
  394. package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
  395. package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
  396. package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
  397. package/dist/pi/packages/ta-notify/package.json +55 -0
  398. package/dist/pi/packages/ta-notify/web/index.js +436 -0
  399. package/dist/pi/packages/ta-recall/README.en.md +19 -0
  400. package/dist/pi/packages/ta-recall/README.md +19 -0
  401. package/dist/pi/packages/ta-recall/extension/index.mjs +614 -0
  402. package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
  403. package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
  404. package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
  405. package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
  406. package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
  407. package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
  408. package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
  409. package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
  410. package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
  411. package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
  412. package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
  413. package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
  414. package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
  415. package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
  416. package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
  417. package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
  418. package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
  419. package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
  420. package/dist/pi/packages/ta-recall/lib/conversations.js +46 -0
  421. package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
  422. package/dist/pi/packages/ta-recall/lib/extension.js +131 -0
  423. package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
  424. package/dist/pi/packages/ta-recall/lib/host.js +11 -0
  425. package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
  426. package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
  427. package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
  428. package/dist/pi/packages/ta-recall/lib/index.js +45 -0
  429. package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
  430. package/dist/pi/packages/ta-recall/lib/react.js +16 -0
  431. package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
  432. package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
  433. package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
  434. package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
  435. package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
  436. package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
  437. package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
  438. package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
  439. package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
  440. package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
  441. package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
  442. package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
  443. package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
  444. package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
  445. package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
  446. package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
  447. package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
  448. package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
  449. package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
  450. package/dist/pi/packages/ta-recall/lib/style.js +48 -0
  451. package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
  452. package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
  453. package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
  454. package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
  455. package/dist/pi/packages/ta-recall/package.json +55 -0
  456. package/dist/pi/packages/ta-recall/web/index.js +1038 -0
  457. package/dist/pi/packages/ta-rooms/README.en.md +23 -0
  458. package/dist/pi/packages/ta-rooms/README.md +23 -0
  459. package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
  460. package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
  461. package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +101 -0
  462. package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
  463. package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
  464. package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
  465. package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
  466. package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
  467. package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
  468. package/dist/pi/packages/ta-rooms/lib/page.js +306 -0
  469. package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
  470. package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
  471. package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +17 -0
  472. package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
  473. package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
  474. package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
  475. package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
  476. package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
  477. package/dist/pi/packages/ta-rooms/package.json +50 -0
  478. package/dist/pi/packages/ta-rooms/web/index.js +1932 -0
  479. package/dist/pi/packages/ta-share/README.en.md +27 -0
  480. package/dist/pi/packages/ta-share/README.md +27 -0
  481. package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
  482. package/dist/pi/packages/ta-share/host/index.mjs +364 -0
  483. package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
  484. package/dist/pi/packages/ta-share/lib/extension.js +115 -0
  485. package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
  486. package/dist/pi/packages/ta-share/lib/host.js +9 -0
  487. package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
  488. package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
  489. package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
  490. package/dist/pi/packages/ta-share/lib/index.js +77 -0
  491. package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
  492. package/dist/pi/packages/ta-share/lib/page.js +105 -0
  493. package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
  494. package/dist/pi/packages/ta-share/lib/react.js +8 -0
  495. package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
  496. package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
  497. package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
  498. package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
  499. package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
  500. package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
  501. package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
  502. package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
  503. package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
  504. package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
  505. package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
  506. package/dist/pi/packages/ta-share/lib/shares-page.js +54 -0
  507. package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
  508. package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
  509. package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
  510. package/dist/pi/packages/ta-share/lib/style.js +111 -0
  511. package/dist/pi/packages/ta-share/package.json +56 -0
  512. package/dist/pi/packages/ta-share/web/index.js +1197 -0
  513. package/dist/pi/packages/ta-workspace/README.md +2 -2
  514. package/dist/pi/packages/ta-workspace/README.zh-cn.md +2 -2
  515. package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
  516. package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
  517. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
  518. package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
  519. package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
  520. package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
  521. package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
  522. package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
  523. package/dist/pi/packages/ta-workspace/lib/editors.js +40 -4
  524. package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +14 -4
  525. package/dist/pi/packages/ta-workspace/lib/i18n.js +31 -11
  526. package/dist/pi/packages/ta-workspace/lib/index.js +17 -0
  527. package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
  528. package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
  529. package/dist/pi/packages/ta-workspace/lib/preview.d.ts +22 -3
  530. package/dist/pi/packages/ta-workspace/lib/preview.js +150 -22
  531. package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
  532. package/dist/pi/packages/ta-workspace/lib/style.js +70 -41
  533. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
  534. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
  535. package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
  536. package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
  537. package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
  538. package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
  539. package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +46 -0
  540. package/dist/pi/packages/ta-workspace/lib/util/preview.js +106 -1
  541. package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
  542. package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
  543. package/dist/pi/packages/ta-workspace/package.json +1 -1
  544. package/dist/pi/packages/ta-workspace/web/index.js +1032 -382
  545. package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
  546. package/dist/public/assets/{abnfDiagram-S7VZAUFO-EVMX_yOb.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
  547. package/dist/public/assets/{architecture-WOLXFQ4H-CDgbgZ_o.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
  548. package/dist/public/assets/{architectureDiagram-YGSQEFNW-dHreaCWz.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
  549. package/dist/public/assets/{blockDiagram-APKKGZFW-D6FhzBDq.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
  550. package/dist/public/assets/browser-WLpgVYno.js +12 -0
  551. package/dist/public/assets/{c4Diagram-KJ2TOQU5-BFpcr8Cs.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
  552. package/dist/public/assets/{chunk-6MUBBAK2-BczXkMV-.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
  553. package/dist/public/assets/{chunk-AXFCVDMN-CjJsv3jB.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
  554. package/dist/public/assets/{chunk-BG4553SI-FBaleaLz.js → chunk-BG4553SI-D592E55X.js} +1 -1
  555. package/dist/public/assets/{chunk-DQASFODM-BFdXY5sX.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
  556. package/dist/public/assets/{chunk-HFQBQIA3-C5cwK-Fg.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
  557. package/dist/public/assets/{chunk-KQLB2F66-BUek3IRk.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
  558. package/dist/public/assets/{chunk-KS47KZWR-BxsYBzt6.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
  559. package/dist/public/assets/{chunk-LEVMRMFU-Bdcwz9fS.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
  560. package/dist/public/assets/{chunk-M57EVK23-kkpP5oug.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
  561. package/dist/public/assets/{chunk-OY52VR5R-CFhQgxmD.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
  562. package/dist/public/assets/{chunk-QB3YPZ4I-BVXqu0eC.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
  563. package/dist/public/assets/{chunk-R3KSYZAL-B7SUqqLI.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
  564. package/dist/public/assets/{chunk-STOXU5M4-B3abfbnH.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
  565. package/dist/public/assets/{chunk-TU62E6Q5-C9NqnUav.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
  566. package/dist/public/assets/{chunk-X4PVCEUW-BeLfETDx.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
  567. package/dist/public/assets/{chunk-XXDRQBXY-DXai1i8p.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
  568. package/dist/public/assets/{classDiagram-v2-L25IHNXF-Zj6ne_tC.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
  569. package/dist/public/assets/{cose-bilkent-JH36ORCC-C0-TjqfJ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
  570. package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
  571. package/dist/public/assets/{cynefinDiagram-L36ESFBY-BnqxfzPa.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
  572. package/dist/public/assets/{d3-selection-DfFLTR9d.js → d3-selection-CN9k6_B9.js} +1 -1
  573. package/dist/public/assets/{dagre-SPEB5RXH-kI17e5cH.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
  574. package/dist/public/assets/{diagram-3B7GL73J-DgPjeLA5.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
  575. package/dist/public/assets/{diagram-DNEMPZML-CRhPfa0I.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
  576. package/dist/public/assets/{diagram-L3MUGCDN-ExuTg12b.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
  577. package/dist/public/assets/{diagram-LA4NIPWU-Dgx5xNiY.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
  578. package/dist/public/assets/{diagram-MHCOC4E2-BuifkUTl.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
  579. package/dist/public/assets/{diagram-XPFHEONP-CFEaBo7z.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
  580. package/dist/public/assets/{dist-C-iJHcSK.js → dist-DcBP8Cf6.js} +1 -1
  581. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D-hp5yNt.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
  582. package/dist/public/assets/{editor.api-BopUWpqY.js → editor.api-Bz4sjRz_.js} +1 -1
  583. package/dist/public/assets/{elk-XV6XMXQE-CBbk_IpU.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
  584. package/dist/public/assets/{erDiagram-EYBAPDEH-B02R_WWE.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
  585. package/dist/public/assets/{eventmodeling-K75KTNOO-aCZfYnCI.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
  586. package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
  587. package/dist/public/assets/{freemarker2-DMN60LeK.js → freemarker2-BLxfRHsw.js} +1 -1
  588. package/dist/public/assets/{ganttDiagram-23REXITY-DioU8TlD.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
  589. package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
  590. package/dist/public/assets/{gitGraphDiagram-STJD7YCW--q3ctg6y.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
  591. package/dist/public/assets/{handlebars-B_-qdvpB.js → handlebars-sNpu01kP.js} +1 -1
  592. package/dist/public/assets/{html-BN8Ah3Js.js → html-C_tKd-uP.js} +1 -1
  593. package/dist/public/assets/{index-B3A--ac8.js → index-Bn86rI4n.js} +2 -2
  594. package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
  595. package/dist/public/assets/{infoDiagram-KBXO4MBG-CGXteYo9.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
  596. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DM2LmOAc.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
  597. package/dist/public/assets/{javascript-BlizGb0q.js → javascript-l3qKw0L-.js} +1 -1
  598. package/dist/public/assets/{journeyDiagram-OPLOXDXO-CNITRtGl.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
  599. package/dist/public/assets/{jsonMode-CEUmT5sN.js → jsonMode-5SQQn1EX.js} +1 -1
  600. package/dist/public/assets/{kanban-definition-BZKZHSQY-BPUuS9um.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
  601. package/dist/public/assets/{liquid-BbyLjUbE.js → liquid-BGyTIIUt.js} +1 -1
  602. package/dist/public/assets/{mdx-DiQz7Q35.js → mdx-8tGjz4em.js} +1 -1
  603. package/dist/public/assets/{mermaid-parser.core-Dum100hC.js → mermaid-parser.core-CctN5b0z.js} +3 -3
  604. package/dist/public/assets/{mermaid.core-BWmWf6XO.js → mermaid.core-7ERSdZ4-.js} +4 -4
  605. package/dist/public/assets/{mindmap-definition-I2QAS2VK-L8HyYUDY.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
  606. package/dist/public/assets/module-DEqsdd00.js +1 -0
  607. package/dist/public/assets/module-TWc52XwT.js +2244 -0
  608. package/dist/public/assets/{monaco-zOOyBmxy.js → monaco-B_9hlk78.js} +3 -3
  609. package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
  610. package/dist/public/assets/{pegDiagram-FD4XPPHP-CTZKPo0Z.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
  611. package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
  612. package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
  613. package/dist/public/assets/{pieDiagram-J4AKIIQI-DAeT3dFi.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
  614. package/dist/public/assets/{python-C984gt98.js → python-e-JK0s5M.js} +1 -1
  615. package/dist/public/assets/{quadrantDiagram-XTYBLID2--PXxwV1Z.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
  616. package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
  617. package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
  618. package/dist/public/assets/{railroad-abnf-LNEFI6M7-BYcFfrCa.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
  619. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-Cd33qxAm.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
  620. package/dist/public/assets/{railroad-peg-JR7BVNR7-C5TpzaU8.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
  621. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DlWwjbhH.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
  622. package/dist/public/assets/{razor-BBqMR1Qn.js → razor-DtSPwumi.js} +1 -1
  623. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CsYBy9HS.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
  624. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Baxyb5p9.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
  625. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Cq6VeBT_.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
  626. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-O60WKaE7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
  627. package/dist/public/assets/{swimlanes-UMQ2AFYF-C2nf1-Cc.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
  628. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
  629. package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
  630. package/dist/public/assets/{timeline-definition-SEUHKTQE-DEfUG6YH.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
  631. package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
  632. package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
  633. package/dist/public/assets/{typescript-Gtq7f0aU.js → typescript-65jNyipU.js} +1 -1
  634. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-Gw9DyJcx.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
  635. package/dist/public/assets/{vennDiagram-NNMJR3RB-Clb3MLWF.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
  636. package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
  637. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BrTRpwu2.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
  638. package/dist/public/assets/{xml-Bx3nk7iG.js → xml-DWBejfu-.js} +1 -1
  639. package/dist/public/assets/{xychartDiagram-GGNKY7IX-BfjTcIsb.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
  640. package/dist/public/assets/{yaml-dFLE_rSl.js → yaml-CwRCT7q1.js} +1 -1
  641. package/dist/public/index.html +1 -1
  642. package/dist/public/launch.svg +46 -42
  643. package/dist/serve/index.mjs +8244 -3756
  644. package/package.json +33 -26
  645. package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
  646. package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
  647. package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
  648. package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
  649. package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
  650. package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
  651. package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
  652. package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
  653. package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  654. package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  655. package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
  656. package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
  657. package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
  658. package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
  659. package/dist/public/assets/browser-y6EDNUmc.js +0 -12
  660. package/dist/public/assets/cynefin-EF2NZ3EQ-CoY4CrZu.js +0 -1
  661. package/dist/public/assets/flowDiagram-MALGAFMO-CATkJShO.js +0 -1
  662. package/dist/public/assets/gitGraph-VSP46ZUC-g4yHXXxx.js +0 -1
  663. package/dist/public/assets/info-OHQRW6UA-CKADJjz4.js +0 -1
  664. package/dist/public/assets/module-CH7IXa5L.js +0 -1781
  665. package/dist/public/assets/module-DNAasuMC.js +0 -1
  666. package/dist/public/assets/packet-JDAUHWVQ-CpKMhX4K.js +0 -1
  667. package/dist/public/assets/pie-XZMESJXO-CW-zGDRd.js +0 -1
  668. package/dist/public/assets/radar-ABXABTNO-Cg8W433p.js +0 -1
  669. package/dist/public/assets/railroad-I3PHUGI6-DriMt2PQ.js +0 -1
  670. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-B46JxqS8.js +0 -8
  671. package/dist/public/assets/treeView-D4JQ5SDB-1LhEWwC9.js +0 -1
  672. package/dist/public/assets/treemap-SAJKECNS-D3t3N7nS.js +0 -1
  673. package/dist/public/assets/wardley-7MLQ67FV-D3sAsd8p.js +0 -1
@@ -4,7 +4,7 @@ A pi package that comes with Ta: the workspace of the conversation shown, in the
4
4
 
5
5
  | View | What it does |
6
6
  | --- | --- |
7
- | Explorer | The files of the conversation's directory, with the file icons of VS Code, the colors and letters of git (folders take the change inside them, ignored files are dimmed) and indent guides; it follows the tab shown. As VS Code's default `files.exclude`, it hides `.git`, `.svn`, `.hg`, `.DS_Store` and `Thumbs.db` (`TaExcludedFiles`); the eye of its header shows them, kept for the user in every browser. A click opens a file as a preview tab (the next preview takes its place), a double click keeps it: Markdown, HTML, images, videos, sounds and PDFs as a preview, the rest in Monaco (`pi.ui.CodeEditor`), saved with Ctrl+S or Cmd+S. New file and folder (`a/b.ts` makes the folders), rename and delete in place, with the checks of VS Code on names; a context menu with copy path and relative path, find in folder, upload files or a folder, and download (a folder as a zip made in the page); in Ta Desktop, reveal in Finder (File Explorer on Windows, the file manager on Linux) for directories of this machine (`pi.ui.desktop`). Drag an item onto a folder to move it there (a closed folder opens while it is held over it), files or folders of the system onto the tree to upload them, and an item onto the message box (an `@` reference) or a terminal (its path) (`pi.ui.fileDrag`); the keys of a tree (arrows, Home/End, F2 or Enter on a Mac, Delete) |
7
+ | Explorer | The files of the conversation's directory, with the file icons of VS Code, the colors and letters of git (folders take the change inside them, ignored files are dimmed) and indent guides; it follows the tab shown. As VS Code's default `files.exclude`, it hides `.git`, `.svn`, `.hg`, `.DS_Store` and `Thumbs.db` (`TaExcludedFiles`); the eye of its header shows them, kept for the user in every browser. A click opens a file as a preview tab (the next preview takes its place), a double click keeps it: Markdown, HTML, images, videos, sounds and PDFs as a preview (a picture zooms as in a viewer of pictures, and ← → or the buttons at its sides go through the pictures of its folder in the same preview tab, "2 / 5" above it), the rest in Monaco (`pi.ui.CodeEditor`), saved with Ctrl+S or Cmd+S. New file and folder (`a/b.ts` makes the folders), rename and delete in place, with the checks of VS Code on names; a context menu with copy path and relative path, find in folder, upload files or a folder, and download (a folder as a zip made in the page); in Ta Desktop, reveal in Finder (File Explorer on Windows, the file manager on Linux) for directories of this machine (`pi.ui.desktop`). Drag an item onto a folder to move it there (a closed folder opens while it is held over it), files or folders of the system onto the tree to upload them, and an item onto the message box (an `@` reference) or a terminal (its path) (`pi.ui.fileDrag`); the keys of a tree (arrows, Home/End, F2 or Enter on a Mac, Delete) |
8
8
  | Open files | The tabs of files and changes this package opened, the one shown marked; close, close others, close below, reveal in the explorer |
9
9
  | Search | Text in the files (ripgrep, git grep or grep, whichever the machine has): match case, whole word, a regular expression (its error shown), files to include and to exclude (globs separated by commas, a folder takes all inside it); each match of a line is a result, which opens the file selected on it. Replace one, in a file or all (with `$1` for a group), the change shown on each result; dismiss results (a file or a folder); collapse and expand all; the results as a list or a tree of folders |
10
10
  | Source control | The branch with what it is ahead and behind, a box for the commit message (Ctrl+Enter or Cmd+Enter; with nothing staged it offers to stage all), merge changes, staged changes and changes, as a list or a tree; stage, unstage and discard a file or a group (discarding asks; for an untracked file it deletes), pull, push and fetch. A change opens in Monaco's diff editor, side by side or inline, the unchanged lines folded; a change not staged can be edited there and saved |
@@ -13,7 +13,7 @@ A pi package that comes with Ta: the workspace of the conversation shown, in the
13
13
 
14
14
  Each view is a `panel` view of its web extension, opened from the `+` of the workbench or its empty state (`pi.web` of `package.json`); the work runs on the server through `pi.workspace` (`listDirectory`, `readFile`, `writeFile`, `uploadFile`, `fileUrl`, `runCommand`, …) and `pi.terminals`, in the execution environment of the directory, so a remote `ta exec-server` works the same. Search, source control and the changes to files are this package's: it runs `rg` (or `git grep`, or `grep`), `git`, `mkdir`, `mv -n` and `rm` with `runCommand` and reads their output; paths go to git as `:(literal)` pathspecs. Paths may not leave the directory. What the agent changes with its tools shows at once.
15
15
 
16
- Files open in Monaco, which the page brings (`pi.ui.CodeEditor`, bundled with Ta, no network); Markdown, HTML, SVG open as a preview first, with Edit beside Preview. Previews load the file from `TaWorkspaceServer.fileUrl`: a page runs sandboxed in an origin of its own, Markdown (rendered with marked, bundled in) runs no scripts, and both load the files beside them with relative URLs. Diffs open in Monaco's diff editor (`pi.ui.DiffEditor`), terminals are xterm.js, as in VS Code (`pi.ui.createTerminal`: drawn with WebGL, in the theme of the page; Cmd or Ctrl + click opens the URLs and the paths of files they print, at the line a compiler or grep names). The file icons are the Seti icons VS Code shows by default (font and map from `extensions/theme-seti` of microsoft/vscode, MIT; `bun scripts/seti.ts` writes them again into `web-src/util/seti*.ts`). With `script` on the server a shell gets a pseudo-terminal; without it, it runs on pipes and the server echoes and edits the line.
16
+ Files open in Monaco, which the page brings (`pi.ui.CodeEditor`, bundled with Ta, no network); Markdown, HTML, SVG open as a preview first, with Edit beside Preview. Previews load the file from `TaWorkspaceServer.fileUrl`: a page runs sandboxed in an origin of its own (`PAGE_SANDBOX`, never `allow-same-origin`), Markdown (rendered with marked, bundled in) runs no scripts, and both load the files beside them with relative URLs. Where the page is not served by ta serve — the app on a phone, a page through a relay — that URL is not there to load: pictures, videos, sounds and PDFs come as the bytes of `pi.files` in a `blob:` URL, and an HTML page is shown from the text of the file in a frame under a policy that reaches nothing (`PAGE_CSP`), so the css, js and pictures it loads by relative path do not come and a self-contained report shows as it is. Diffs open in Monaco's diff editor (`pi.ui.DiffEditor`), terminals are xterm.js, as in VS Code (`pi.ui.createTerminal`: drawn with WebGL, in the theme of the page; Cmd or Ctrl + click opens the URLs and the paths of files they print, at the line a compiler or grep names). The file icons are the Seti icons VS Code shows by default (font and map from `extensions/theme-seti` of microsoft/vscode, MIT; `bun scripts/seti.ts` writes them again into `web-src/util/seti*.ts`). With `script` on the server a shell gets a pseudo-terminal; without it, it runs on pipes and the server echoes and edits the line.
17
17
 
18
18
  Links of replies open here (`pi.registerOpener`): a file as its tab, with the lines the link names selected (`src/a.ts#L10-L20`, `src/a.ts:10:5`), even a file open with changes, which keeps them; a directory in the explorer, which switches to it; a page in the browser. Cmd or Ctrl + click opens a page in the browser of the system instead, which Ta does itself.
19
19
 
@@ -4,7 +4,7 @@ Ta 自带的 pi 包:`ta serve` 的 web 客户端中会话的工作区,以 ID
4
4
 
5
5
  | 视图 | 功能 |
6
6
  | --- | --- |
7
- | 资源管理器 | 会话目录的文件,带有 VS Code 的文件图标、git 的颜色和字母(文件夹显示其内部的更改,被忽略的文件变暗)并缩进指南;它遵循显示的标签页。和 VS Code 默认的 `files.exclude` 一样,它隐藏 `.git`、`.svn`、`.hg`、`.DS_Store` 和 `Thumbs.db`(`TaExcludedFiles`);顶栏的眼睛按钮可以显示它们,这个选择按用户保存,在每个浏览器里都一样。单击打开文件作为预览标签页(下一个预览替换它),双击保留它:Markdown、HTML、图像、视频、声音和 PDF 作为预览,其余的在 Monaco(`pi.ui.CodeEditor`)中,用 Ctrl+S 或 Cmd+S 保存。新建文件和文件夹(`a/b.ts` 创建文件夹)、就地重命名和删除,带有 VS Code 的名称检查;右键菜单有复制路径和相对路径、在文件夹中查找、上传文件或文件夹、下载(文件夹在页面里打包成 zip);在 Ta 桌面版里,本机目录还可以在 Finder 中显示(Windows 上是文件资源管理器,Linux 上是文件管理器,`pi.ui.desktop`)。把一项拖到文件夹上即移到那里(悬停在关着的文件夹上会展开),把系统里的文件或文件夹拖进树里即上传,拖到输入框成为 `@` 引用、拖到终端输入它的路径(`pi.ui.fileDrag`);树的按键(箭头、Home/End、F2 或 Mac 上的 Enter、Delete) |
7
+ | 资源管理器 | 会话目录的文件,带有 VS Code 的文件图标、git 的颜色和字母(文件夹显示其内部的更改,被忽略的文件变暗)并缩进指南;它遵循显示的标签页。和 VS Code 默认的 `files.exclude` 一样,它隐藏 `.git`、`.svn`、`.hg`、`.DS_Store` 和 `Thumbs.db`(`TaExcludedFiles`);顶栏的眼睛按钮可以显示它们,这个选择按用户保存,在每个浏览器里都一样。单击打开文件作为预览标签页(下一个预览替换它),双击保留它:Markdown、HTML、图像、视频、声音和 PDF 作为预览(图片可以像看图软件一样缩放,← → 或两侧按钮在同一个预览标签里切换同目录的图片,上方显示"2 / 5"),其余的在 Monaco(`pi.ui.CodeEditor`)中,用 Ctrl+S 或 Cmd+S 保存。新建文件和文件夹(`a/b.ts` 创建文件夹)、就地重命名和删除,带有 VS Code 的名称检查;右键菜单有复制路径和相对路径、在文件夹中查找、上传文件或文件夹、下载(文件夹在页面里打包成 zip);在 Ta 桌面版里,本机目录还可以在 Finder 中显示(Windows 上是文件资源管理器,Linux 上是文件管理器,`pi.ui.desktop`)。把一项拖到文件夹上即移到那里(悬停在关着的文件夹上会展开),把系统里的文件或文件夹拖进树里即上传,拖到输入框成为 `@` 引用、拖到终端输入它的路径(`pi.ui.fileDrag`);树的按键(箭头、Home/End、F2 或 Mac 上的 Enter、Delete) |
8
8
  | 打开的文件 | 此包打开的文件和更改的标签页,显示的被标记;关闭、关闭其他、关闭下方、在资源管理器中显示 |
9
9
  | 搜索 | 文件中的文本(ripgrep、git grep 或 grep,机器有哪个就用哪个):匹配大小写、全词、正则表达式(其错误显示)、要包含和排除的文件(逗号分隔的 glob,一个文件夹包含其内部所有文件);一行的每个匹配都是一个结果,在它上面打开选中的文件。替换一个、在一个文件中或全部(用 `$1` 表示组),变更显示在每个结果上;关闭结果(一个文件或文件夹);全部折叠和展开;结果作为列表或文件夹树 |
10
10
  | 源代码管理 | 分支及其领先和落后的情况,提交消息的框(Ctrl+Enter 或 Cmd+Enter;没有暂存任何东西时提供暂存全部),合并变更、暂存的变更和变更,作为列表或树;暂存、取消暂存和放弃一个文件或组(放弃询问;对于未跟踪的文件它删除)、拉取、推送和获取。不暂存的变更在 Monaco 的 diff 编辑器中打开,并排或内联,未更改的行折叠;不暂存的变更可以在那里编辑并保存 |
@@ -13,7 +13,7 @@ Ta 自带的 pi 包:`ta serve` 的 web 客户端中会话的工作区,以 ID
13
13
 
14
14
  每个视图是其 web 扩展的 `panel` 视图,从工作台的 `+` 或其空状态打开(`pi.web` 的 `package.json`);工作通过 `pi.workspace`(`listDirectory`、`readFile`、`writeFile`、`uploadFile`、`fileUrl`、`runCommand` 等)和 `pi.terminals` 在目录的执行环境上运行,所以远程 `ta exec-server` 一样工作。搜索、源代码管理和对文件的更改是此包的:它用 `runCommand` 运行 `rg`(或 `git grep`,或 `grep`)、`git`、`mkdir`、`mv -n` 和 `rm` 并读取其输出;路径作为 `:(literal)` pathspec 传递给 git。路径不能离开目录。agent 用其工具所做的更改立即显示。
15
15
 
16
- 文件在 Monaco 中打开,页面带来(`pi.ui.CodeEditor`,与 Ta 打包,无网络);Markdown、HTML、SVG 首先作为预览打开,旁边有编辑。预览从 `TaWorkspaceServer.fileUrl` 加载文件:页面在其自己的原始地点沙箱化,Markdown(用 marked 呈现,打包在)不运行脚本,两个都用相对 URL 加载其旁边的文件。Diff 在 Monaco 的 diff 编辑器中打开(`pi.ui.DiffEditor`),终端是 xterm.js,与 VS Code 相同(`pi.ui.createTerminal`:WebGL 绘制,跟随页面主题;输出里的 URL 和文件路径按 Cmd 或 Ctrl + 点击打开,定位到编译器或 grep 给出的行)。文件图标是 VS Code 默认显示的 Seti 图标(字体和地图来自 microsoft/vscode 的 `extensions/theme-seti`,MIT;`bun scripts/seti.ts` 将它们再次写入 `web-src/util/seti*.ts`)。在服务器上用 `script` 时,shell 获得伪终端;没有它,它在管道上运行,服务器回显并编辑线。
16
+ 文件在 Monaco 中打开,页面带来(`pi.ui.CodeEditor`,与 Ta 打包,无网络);Markdown、HTML、SVG 首先作为预览打开,旁边有编辑。预览从 `TaWorkspaceServer.fileUrl` 加载文件:页面在自己的源里沙箱化(`PAGE_SANDBOX`,绝不含 `allow-same-origin`),Markdown(用 marked 呈现,打包在)不运行脚本,两个都用相对 URL 加载其旁边的文件。页面不是由 ta serve 提供时——手机应用、经中继打开的页面——这个地址在页面里加载不到:图片、视频、声音和 PDF 用 `pi.files` 取字节做成 `blob:` 地址,HTML 页面按文件文本放进一个够不到任何东西的沙框里显示(`PAGE_CSP`),所以用相对路径加载的 css、js、图片不会来,自包含的报告页照原样显示。Diff 在 Monaco 的 diff 编辑器中打开(`pi.ui.DiffEditor`),终端是 xterm.js,与 VS Code 相同(`pi.ui.createTerminal`:WebGL 绘制,跟随页面主题;输出里的 URL 和文件路径按 Cmd 或 Ctrl + 点击打开,定位到编译器或 grep 给出的行)。文件图标是 VS Code 默认显示的 Seti 图标(字体和地图来自 microsoft/vscode 的 `extensions/theme-seti`,MIT;`bun scripts/seti.ts` 将它们再次写入 `web-src/util/seti*.ts`)。在服务器上用 `script` 时,shell 获得伪终端;没有它,它在管道上运行,服务器回显并编辑线。
17
17
 
18
18
  回复的链接在这里打开(`pi.registerOpener`):文件作为其标签页,链接名称选中的行(`src/a.ts#L10-L20`、`src/a.ts:10:5`),甚至文件打开有更改,这保留它们;资源管理器中的目录,切换到它;浏览器中的页面。Cmd 或 Ctrl + 单击在系统的浏览器中打开页面,Ta 自己做。
19
19
 
@@ -30,7 +30,7 @@ export interface BrowserBarProps {
30
30
  }
31
31
  /** The bar of the browser: back, forward, reload or stop, the address, the start page, out of Ta. */
32
32
  export declare function BrowserBar(props: BrowserBarProps): import("react").JSX.Element;
33
- /** The start page: what the browser is for, `extra` under it, then the addresses opened lately; `foot`, a line under them. */
33
+ /** The start page: the sites opened lately (the ports dev servers take, before any), `extra` and `foot` quiet at the bottom. */
34
34
  export declare function Home({ onOpen, foot, extra }: {
35
35
  onOpen(url: string): void;
36
36
  foot?: string;
@@ -61,15 +61,14 @@ var Recent;
61
61
  })(Recent || (exports.Recent = Recent = {}));
62
62
  /** Addresses to try on an empty start page: the ports dev servers take by default. */
63
63
  const SUGGESTIONS = ['localhost:5173', 'localhost:3000', 'localhost:8080'];
64
- /** The address without the scheme, split for show: the host stands out, the rest is quieter. */
65
- function parts(url) {
64
+ /** The host of an address, and where its icon would be. */
65
+ function siteOf(url) {
66
66
  try {
67
67
  const parsed = new URL(url);
68
- const rest = `${parsed.pathname === '/' ? '' : parsed.pathname}${parsed.search}${parsed.hash}`;
69
- return { host: parsed.host || url, rest };
68
+ return { host: parsed.host || url, icon: parsed.host ? `${parsed.origin}/favicon.ico` : undefined };
70
69
  }
71
70
  catch (_a) {
72
- return { host: url, rest: '' };
71
+ return { host: url };
73
72
  }
74
73
  }
75
74
  /** The icon of the address: the page loading, its own icon when it gave one, else a globe. */
@@ -120,33 +119,33 @@ function BrowserBar(props) {
120
119
  react_1.React.createElement(common_1.Action, { icon: "ExternalLink", label: props.outsideLabel, disabled: !props.onOpenOutside, onClick: () => { var _a; return (_a = props.onOpenOutside) === null || _a === void 0 ? void 0 : _a.call(props); } }),
121
120
  loading ? react_1.React.createElement("span", { className: "taw-browser-loading" }) : undefined));
122
121
  }
123
- /** The start page: what the browser is for, `extra` under it, then the addresses opened lately; `foot`, a line under them. */
122
+ /** A site of the start page: its icon, else a letter or, for a server on this machine, a server; its host under it. */
123
+ function Site({ address, onOpen, onRemove }) {
124
+ const { host, icon } = siteOf(address);
125
+ const name = host.replace(/^www\./, '');
126
+ const local = workspace_1.WorkspaceUtil.localPort(address) !== undefined;
127
+ const [broken, setBroken] = react_1.React.useState(local || !icon);
128
+ // One of the nine tints of the theme (--ta-tint-<n>), by its name.
129
+ let index = 0;
130
+ for (const char of name) {
131
+ index = (index * 31 + char.charCodeAt(0)) % 9;
132
+ }
133
+ return (react_1.React.createElement("div", { className: "taw-browser-site" },
134
+ react_1.React.createElement("button", { type: "button", className: "taw-browser-site-main", title: address, onClick: () => onOpen(address) },
135
+ react_1.React.createElement("span", { className: "taw-browser-tile", style: local ? undefined : { '--taw-tint': `var(--ta-tint-${index})`, '--taw-ink': `var(--ta-tint-ink-${index})` } }, broken ? (local ? (react_1.React.createElement(common_1.Glyph, { name: "Server", size: 18 })) : (name.charAt(0).toUpperCase())) : (react_1.React.createElement("img", { src: icon, alt: "", referrerPolicy: "no-referrer", onError: () => setBroken(true) }))),
136
+ react_1.React.createElement("span", { className: "taw-browser-host" }, name)),
137
+ onRemove ? (react_1.React.createElement("button", { type: "button", className: "taw-action taw-browser-remove", title: (0, i18n_1.t)('removeRecent'), "aria-label": (0, i18n_1.t)('removeRecent'), onClick: onRemove },
138
+ react_1.React.createElement(common_1.Glyph, { name: "X", size: 11 }))) : undefined));
139
+ }
140
+ /** The start page: the sites opened lately (the ports dev servers take, before any), `extra` and `foot` quiet at the bottom. */
124
141
  function Home({ onOpen, foot, extra }) {
125
142
  const recent = react_1.React.useSyncExternalStore(Recent.subscribe, Recent.all);
126
- return (react_1.React.createElement("div", { className: `taw-browser-home ${recent.length === 0 ? 'taw-browser-blank' : ''}` },
127
- react_1.React.createElement("div", { className: "taw-browser-hero" },
128
- react_1.React.createElement("span", { className: "taw-browser-mark" },
129
- react_1.React.createElement(common_1.Glyph, { name: "Globe", size: 22 })),
130
- react_1.React.createElement("p", { className: "taw-browser-title" }, (0, i18n_1.t)('browserTitle')),
131
- react_1.React.createElement("p", { className: "taw-browser-sub" }, (0, i18n_1.t)('browserHint')),
132
- recent.length === 0 ? (react_1.React.createElement("div", { className: "taw-browser-chips" }, SUGGESTIONS.map(address => (react_1.React.createElement("button", { type: "button", key: address, className: "taw-browser-chip", onClick: () => onOpen(`http://${address}`) }, address))))) : undefined,
133
- extra),
134
- recent.length > 0 ? (react_1.React.createElement("section", { className: "taw-browser-recent" },
135
- react_1.React.createElement("h3", { className: "taw-browser-heading" }, (0, i18n_1.t)('recent')),
136
- recent.map(address => {
137
- const { host, rest } = parts(address);
138
- return (react_1.React.createElement("div", { key: address, className: "taw-browser-site" },
139
- react_1.React.createElement("button", { type: "button", className: "taw-browser-site-main", title: address, onClick: () => onOpen(address) },
140
- react_1.React.createElement("span", { className: "taw-browser-letter" }, host
141
- .replace(/^www\./, '')
142
- .charAt(0)
143
- .toUpperCase()),
144
- react_1.React.createElement("span", { className: "taw-browser-host" }, host),
145
- react_1.React.createElement("span", { className: "taw-browser-path" }, rest)),
146
- react_1.React.createElement("button", { type: "button", className: "taw-action taw-browser-remove", title: (0, i18n_1.t)('removeRecent'), "aria-label": (0, i18n_1.t)('removeRecent'), onClick: () => Recent.remove(address) },
147
- react_1.React.createElement(common_1.Glyph, { name: "X", size: 13 }))));
148
- }))) : undefined,
149
- foot ? react_1.React.createElement("p", { className: "taw-browser-foot" }, foot) : undefined));
143
+ const sites = recent.length > 0 ? recent : SUGGESTIONS.map(address => `http://${address}`);
144
+ return (react_1.React.createElement("div", { className: "taw-browser-home" },
145
+ react_1.React.createElement("nav", { className: "taw-browser-sites", "aria-label": (0, i18n_1.t)('recent') }, sites.map(address => (react_1.React.createElement(Site, { key: address, address: address, onOpen: onOpen, onRemove: recent.length > 0 ? () => Recent.remove(address) : undefined })))),
146
+ extra || foot ? (react_1.React.createElement("footer", { className: "taw-browser-foot" },
147
+ extra,
148
+ foot ? react_1.React.createElement("span", null, foot) : undefined)) : undefined));
150
149
  }
151
150
  /** A page to show, from a link of a reply. */
152
151
  exports.ShowPage = new host_1.Channel();
@@ -0,0 +1,15 @@
1
+ import type { WebExtensionAPI, WebToolLine } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
+ import type { t } from './i18n';
3
+ type Key = Parameters<typeof t>[0];
4
+ /** How a call of the browser tool reads in a conversation: what it does in the page, and on what. */
5
+ export declare namespace BrowserToolLine {
6
+ function renderCall(args: Record<string, unknown>, words: (key: Key) => string): WebToolLine;
7
+ /**
8
+ * Wherever the page runs, not only where the tool does (Ta Desktop): a phone shows the calls of a
9
+ * conversation that worked the browser on the computer too. On a Ta app built before registerToolRenderer,
10
+ * they read as the tool's name.
11
+ */
12
+ function register(pi: WebExtensionAPI, words: (key: Key) => string): void;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=browser-tool-line.d.ts.map
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BrowserToolLine = void 0;
4
+ const browser_agent_1 = require("./browser-agent");
5
+ const VERBS = {
6
+ navigate: 'agentNavigate',
7
+ back: 'agentBack',
8
+ forward: 'agentForward',
9
+ reload: 'agentReload',
10
+ snapshot: 'agentSnapshot',
11
+ click: 'agentClick',
12
+ type: 'agentType',
13
+ press: 'agentPress',
14
+ scroll: 'agentScroll',
15
+ screenshot: 'agentScreenshot',
16
+ evaluate: 'agentEvaluate',
17
+ wait: 'agentWait',
18
+ cdp: 'agentCdp',
19
+ };
20
+ function text(value) {
21
+ return typeof value === 'string' ? value.trim() : '';
22
+ }
23
+ /** An element of the last snapshot, `[12]`, or a point of the screenshot. */
24
+ function at(args) {
25
+ if (typeof args.ref === 'number') {
26
+ return `[${args.ref}]`;
27
+ }
28
+ return typeof args.x === 'number' && typeof args.y === 'number' ? `${Math.round(args.x)}, ${Math.round(args.y)}` : '';
29
+ }
30
+ /** How a call of the browser tool reads in a conversation: what it does in the page, and on what. */
31
+ var BrowserToolLine;
32
+ (function (BrowserToolLine) {
33
+ function renderCall(args, words) {
34
+ var _a;
35
+ const action = text(args.action);
36
+ const verb = words((_a = VERBS[action]) !== null && _a !== void 0 ? _a : 'browser');
37
+ switch (action) {
38
+ case 'navigate':
39
+ return { verb, target: text(args.url) };
40
+ case 'click':
41
+ return { verb, target: at(args) };
42
+ case 'type':
43
+ return { verb, target: [at(args), text(args.text)].filter(Boolean).join(' ') };
44
+ case 'press':
45
+ return { verb, target: text(args.key), code: true };
46
+ case 'scroll':
47
+ return { verb, target: at(args) || (args.direction === 'up' ? '↑' : args.direction === 'down' ? '↓' : '') };
48
+ case 'evaluate':
49
+ return { verb, target: text(args.expression).split('\n')[0], code: true };
50
+ case 'wait':
51
+ return { verb, target: text(args.text) || (typeof args.ms === 'number' ? `${args.ms} ms` : '') };
52
+ case 'cdp':
53
+ return { verb, target: text(args.method), code: true };
54
+ default:
55
+ return { verb };
56
+ }
57
+ }
58
+ BrowserToolLine.renderCall = renderCall;
59
+ /**
60
+ * Wherever the page runs, not only where the tool does (Ta Desktop): a phone shows the calls of a
61
+ * conversation that worked the browser on the computer too. On a Ta app built before registerToolRenderer,
62
+ * they read as the tool's name.
63
+ */
64
+ function register(pi, words) {
65
+ var _a;
66
+ (_a = pi.registerToolRenderer) === null || _a === void 0 ? void 0 : _a.call(pi, (name, next) => (name === browser_agent_1.AgentBrowser.TOOL.name ? { renderCall: args => renderCall(args, words) } : next()));
67
+ }
68
+ BrowserToolLine.register = register;
69
+ })(BrowserToolLine || (exports.BrowserToolLine = BrowserToolLine = {}));
70
+ //# sourceMappingURL=browser-tool-line.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The bytes of a file of the workspace as a URL the page can load, for what a page cannot load by its own
3
+ * URL: over a relay, and in the app on a phone, only the calls on the WebSocket reach ta serve (pi.files).
4
+ * The URL is made again when the file may have changed, and let go of when it is not shown.
5
+ */
6
+ export declare function useFileBytesUrl(url: string | undefined, version: number): {
7
+ url?: string;
8
+ size?: number;
9
+ error?: string;
10
+ };
11
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useFileBytesUrl = useFileBytesUrl;
4
+ const host_1 = require("./host");
5
+ const react_1 = require("./react");
6
+ /**
7
+ * The bytes of a file of the workspace as a URL the page can load, for what a page cannot load by its own
8
+ * URL: over a relay, and in the app on a phone, only the calls on the WebSocket reach ta serve (pi.files).
9
+ * The URL is made again when the file may have changed, and let go of when it is not shown.
10
+ */
11
+ function useFileBytesUrl(url, version) {
12
+ const [state, setState] = react_1.React.useState({});
13
+ react_1.React.useEffect(() => {
14
+ if (!url) {
15
+ setState({});
16
+ return;
17
+ }
18
+ let live = true;
19
+ let made;
20
+ host_1.pi.files.read(url).then(file => {
21
+ if (!live) {
22
+ return;
23
+ }
24
+ made = URL.createObjectURL(new Blob([file.data], { type: file.type }));
25
+ setState({ url: made, size: file.size });
26
+ }, error => {
27
+ if (live) {
28
+ setState({ error: host_1.Host.message(error) });
29
+ }
30
+ });
31
+ return () => {
32
+ live = false;
33
+ if (made) {
34
+ URL.revokeObjectURL(made);
35
+ }
36
+ };
37
+ }, [url, version]);
38
+ return state;
39
+ }
40
+ //# sourceMappingURL=bytes.js.map
@@ -34,7 +34,8 @@ export type MenuItem = '-' | {
34
34
  };
35
35
  /**
36
36
  * A context menu at the pointer, as an IDE's: arrows move, Enter runs, Escape or a click elsewhere
37
- * closes. `open` takes the event of a right click (or of a button that opens it) and the entries.
37
+ * closes. `open` takes the event of a right click (or of a button that opens it) and the entries. Under a
38
+ * finger it goes and takes the finger as the menus of the page do (ui.attachMenu).
38
39
  */
39
40
  export declare function useContextMenu(): [React.ReactNode, (event: React.MouseEvent | React.KeyboardEvent, items: MenuItem[]) => void];
40
41
  /**
@@ -69,7 +69,8 @@ function useKept(store, key, initial) {
69
69
  }
70
70
  /**
71
71
  * A context menu at the pointer, as an IDE's: arrows move, Enter runs, Escape or a click elsewhere
72
- * closes. `open` takes the event of a right click (or of a button that opens it) and the entries.
72
+ * closes. `open` takes the event of a right click (or of a button that opens it) and the entries. Under a
73
+ * finger it goes and takes the finger as the menus of the page do (ui.attachMenu).
73
74
  */
74
75
  function useContextMenu() {
75
76
  const [menu, setMenu] = react_1.React.useState();
@@ -79,48 +80,25 @@ function useContextMenu() {
79
80
  const target = event.currentTarget;
80
81
  const box = target.getBoundingClientRect();
81
82
  const pointer = 'clientX' in event && (event.clientX || event.clientY);
82
- setMenu({ x: pointer ? event.clientX : box.left + 16, y: pointer ? event.clientY : box.bottom, items });
83
+ setMenu(pointer ? { x: event.clientX, y: event.clientY, around: { top: box.top, bottom: box.bottom }, items } : { x: box.left + 16, y: box.bottom, items });
83
84
  }, []);
84
- const element = menu ? react_1.React.createElement(ContextMenu, { ...menu, onClose: () => setMenu(undefined) }) : null;
85
+ const close = react_1.React.useCallback(() => setMenu(undefined), []);
86
+ const element = menu ? react_1.React.createElement(ContextMenu, { ...menu, onClose: close }) : null;
85
87
  return [element, open];
86
88
  }
87
- /** env(safe-area-inset-top) in pixels: CSS gives it to padding, not to script. */
88
- function safeAreaTop(element) {
89
- const probe = document.createElement('div');
90
- probe.style.cssText = 'position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top)';
91
- element.appendChild(probe);
92
- const top = Number.parseFloat(getComputedStyle(probe).paddingTop) || 0;
93
- probe.remove();
94
- return top;
95
- }
96
- function ContextMenu({ x, y, items, onClose }) {
89
+ function ContextMenu({ x, y, around, items, onClose }) {
97
90
  const root = react_1.React.useRef(null);
98
- // Measured where it has the whole width, not squeezed against the edge it may open by; then placed.
99
- const [place, setPlace] = react_1.React.useState({ left: 0, top: 0, ready: false });
100
91
  react_1.React.useLayoutEffect(() => {
101
- var _a, _b;
92
+ var _a;
102
93
  const element = root.current;
103
- // Its size without the scale it comes in with.
104
- const box = element && { width: element.offsetWidth, height: element.offsetHeight };
105
- if (box) {
106
- const clamp = (value, max) => Math.max(4, Math.min(value, max - 4));
107
- // A finger (the page's data-touch): above it and centred, so that it does not cover the menu it opened.
108
- const touch = document.documentElement.dataset.touch !== undefined;
109
- // Not under the status bar of a phone (env(safe-area-inset-top), read through the menu's own padding).
110
- const safeTop = touch ? safeAreaTop(element) : 0;
111
- const above = y - 14 - box.height;
112
- const left = touch ? clamp(x - box.width / 2, window.innerWidth - box.width) : clamp(x, window.innerWidth - box.width);
113
- const top = touch
114
- ? above >= safeTop + 4
115
- ? above
116
- : clamp(y + 14, window.innerHeight - box.height)
117
- : y + box.height > window.innerHeight - 4
118
- ? Math.max(4, y - box.height)
119
- : y;
120
- setPlace({ left, top, ready: true });
94
+ if (!element) {
95
+ return;
121
96
  }
122
- (_b = (_a = root.current) === null || _a === void 0 ? void 0 : _a.querySelector('button:not(:disabled)')) === null || _b === void 0 ? void 0 : _b.focus();
123
- }, [x, y]);
97
+ // Measured where it has the whole width (at 0, 0), not squeezed against the edge it may open by; then placed.
98
+ const stop = host_1.pi.ui.attachMenu(element, { x, y, around }, onClose);
99
+ (_a = element.querySelector('button:not(:disabled)')) === null || _a === void 0 ? void 0 : _a.focus();
100
+ return stop;
101
+ }, [x, y, around, onClose]);
124
102
  react_1.React.useEffect(() => {
125
103
  const close = (event) => {
126
104
  var _a;
@@ -151,7 +129,7 @@ function ContextMenu({ x, y, items, onClose }) {
151
129
  const at = buttons.indexOf(document.activeElement);
152
130
  (_b = buttons[(at + (event.key === 'ArrowDown' ? 1 : buttons.length - 1)) % buttons.length]) === null || _b === void 0 ? void 0 : _b.focus();
153
131
  };
154
- return (react_1.React.createElement("div", { ref: root, className: "taw-menu", role: "menu", style: { left: place.left, top: place.top, visibility: place.ready ? 'visible' : 'hidden' }, onKeyDown: onKeyDown, onContextMenu: event => event.preventDefault() }, items.map((item, index) => item === '-' ? (react_1.React.createElement("hr", { key: `-${index}`, className: "taw-menu-line" })) : (react_1.React.createElement("button", { key: item.label, type: "button", role: "menuitem", className: "taw-menu-item", disabled: item.disabled, onClick: () => {
132
+ return (react_1.React.createElement("div", { ref: root, className: "taw-menu", role: "menu", onKeyDown: onKeyDown, onContextMenu: event => event.preventDefault() }, items.map((item, index) => item === '-' ? (react_1.React.createElement("hr", { key: `-${index}`, className: "taw-menu-line" })) : (react_1.React.createElement("button", { key: item.label, type: "button", role: "menuitem", className: "taw-menu-item", disabled: item.disabled, onClick: () => {
155
133
  onClose();
156
134
  item.run();
157
135
  } },
@@ -7,6 +7,7 @@ exports.openFile = openFile;
7
7
  exports.openDiff = openDiff;
8
8
  exports.closeEditorsOf = closeEditorsOf;
9
9
  exports.closeEditor = closeEditor;
10
+ const bytes_1 = require("./bytes");
10
11
  const common_1 = require("./common");
11
12
  const file_icon_1 = require("./file-icon");
12
13
  const host_1 = require("./host");
@@ -159,9 +160,22 @@ function closeEditor(id) {
159
160
  function Message({ children, tone }) {
160
161
  return react_1.React.createElement("div", { className: `taw-message ${tone === 'error' ? 'taw-error' : ''}` }, children);
161
162
  }
163
+ /**
164
+ * Where the file is, as the breadcrumbs of an editor: its directories, then its icon and name. Short of room,
165
+ * the directories give way first; the whole path is the title.
166
+ */
162
167
  function Header({ path, extra }) {
168
+ var _a;
169
+ const parts = path.split(/[\\/]/).filter(Boolean);
170
+ const name = (_a = parts.pop()) !== null && _a !== void 0 ? _a : path;
163
171
  return (react_1.React.createElement("header", { className: "taw-editor-head" },
164
- react_1.React.createElement("span", { className: "taw-editor-path", title: path }, path),
172
+ react_1.React.createElement("span", { className: "taw-crumbs", title: path },
173
+ parts.map((part, index) => (react_1.React.createElement(react_1.React.Fragment, { key: index },
174
+ react_1.React.createElement("span", { className: "taw-crumb" }, part),
175
+ react_1.React.createElement(common_1.Glyph, { name: "ChevronRight", size: 12 })))),
176
+ react_1.React.createElement("span", { className: "taw-crumb taw-crumb-file" },
177
+ react_1.React.createElement(file_icon_1.FileIcon, { path: name, size: 14 }),
178
+ react_1.React.createElement("span", null, name))),
165
179
  extra));
166
180
  }
167
181
  /** The ETag and the size of the file at `url`, read again when the agent may have changed files. */
@@ -201,7 +215,7 @@ function ModeSwitch({ mode, onChange }) {
201
215
  */
202
216
  function FileEditor({ id, cwd, path }) {
203
217
  var _a, _b, _c, _d;
204
- var _e, _f, _g, _h, _j;
218
+ var _e, _f, _g, _h, _j, _k, _l, _m;
205
219
  const kind = preview_2.PreviewUtil.kind(path);
206
220
  const textual = !kind || preview_2.PreviewUtil.hasText(path);
207
221
  const goTo = useTarget(id);
@@ -217,7 +231,21 @@ function FileEditor({ id, cwd, path }) {
217
231
  const file = (0, host_1.useLoad)(async () => (textual ? host_1.pi.workspace.readFile(path, cwd) : undefined), [cwd, path, changed]);
218
232
  const url = (0, host_1.useLoad)(() => (kind ? host_1.pi.workspace.fileUrl(path, cwd) : Promise.resolve(undefined)), [cwd, path]);
219
233
  const { version, size } = useVersion(kind && kind !== 'markdown' ? url.value : undefined);
234
+ // Where the page cannot load the files by their URL (a phone, the app), their bytes come over the WebSocket.
235
+ const byUrl = host_1.pi.files.byUrl;
236
+ const media = !byUrl && !!kind && kind !== 'markdown' && kind !== 'html';
237
+ const bytes = (0, bytes_1.useFileBytesUrl)(media ? url.value : undefined, changed);
220
238
  const [info, setInfo] = react_1.React.useState();
239
+ // The pictures of its folder: ← → and the side buttons go through them, each in the preview tab.
240
+ const pictures = (0, host_1.useLoad)(async () => (kind === 'image' ? preview_2.PreviewUtil.siblings(await host_1.pi.workspace.listDirectory(workspace_1.WorkspaceUtil.dirname(path), cwd), path) : undefined), [cwd, path, changed]);
241
+ const siblings = pictures.value;
242
+ const browsedAt = (0, preview_1.useBrowsedTo)(id);
243
+ const showPicture = (to) => to === undefined
244
+ ? undefined
245
+ : () => {
246
+ (0, preview_1.browsePicture)(fileId(cwd, to));
247
+ openFile(cwd, to, undefined, { preview: true });
248
+ };
221
249
  /** The user's text while it differs from the file's; undefined when they are the same. */
222
250
  const [draft, setDraft] = react_1.React.useState();
223
251
  /** The file's text when the user started changing it: another one means the file changed meanwhile. */
@@ -268,6 +296,10 @@ function FileEditor({ id, cwd, path }) {
268
296
  const readOnly = !!((_c = file.value) === null || _c === void 0 ? void 0 : _c.truncated);
269
297
  const showPreview = !!kind && (mode === 'preview' || !textual);
270
298
  const extra = (react_1.React.createElement("div", { className: "taw-editor-tools" },
299
+ showPreview && siblings && (react_1.React.createElement("span", { className: "taw-note" },
300
+ siblings.index + 1,
301
+ " / ",
302
+ siblings.count)),
271
303
  showPreview && info && react_1.React.createElement("span", { className: "taw-note" }, info),
272
304
  !showPreview && readOnly && react_1.React.createElement("span", { className: "taw-note" }, (0, i18n_1.t)('truncated')),
273
305
  !showPreview && dirty && base !== undefined && base !== text && (react_1.React.createElement("span", { className: "taw-note taw-warning" },
@@ -279,11 +311,15 @@ function FileEditor({ id, cwd, path }) {
279
311
  (0, i18n_1.t)('save'))),
280
312
  kind && textual && react_1.React.createElement(ModeSwitch, { mode: mode, onChange: setMode })));
281
313
  const fileUrl = url.value && preview_2.PreviewUtil.versioned(url.value, version);
314
+ // The page itself, or the bytes of a picture, a video: whatever this page can load.
315
+ const shownUrl = byUrl ? fileUrl : bytes.url;
282
316
  return (react_1.React.createElement("div", { className: "taw-editor" },
283
317
  react_1.React.createElement(Header, { path: path, extra: extra }),
284
318
  showPreview && fileUrl && kind === 'markdown' && react_1.React.createElement(preview_1.MarkdownPreview, { text: (_f = draft !== null && draft !== void 0 ? draft : text) !== null && _f !== void 0 ? _f : '', url: fileUrl }),
285
- showPreview && fileUrl && kind && kind !== 'markdown' && (react_1.React.createElement(preview_1.MediaPreview, { key: fileUrl, kind: kind, url: fileUrl, size: (_h = (_g = (_d = file.value) === null || _d === void 0 ? void 0 : _d.size) !== null && _g !== void 0 ? _g : size) !== null && _h !== void 0 ? _h : 0, onInfo: setInfo })),
286
- !showPreview && (react_1.React.createElement(host_1.pi.ui.CodeEditor, { path: path, value: (_j = draft !== null && draft !== void 0 ? draft : text) !== null && _j !== void 0 ? _j : '', readOnly: readOnly, line: target === null || target === void 0 ? void 0 : target.line, column: target === null || target === void 0 ? void 0 : target.column, endColumn: target === null || target === void 0 ? void 0 : target.endColumn, selection: (target === null || target === void 0 ? void 0 : target.endLine)
319
+ showPreview && kind === 'html' && react_1.React.createElement(preview_1.PagePreview, { url: byUrl ? fileUrl : undefined, text: (_g = draft !== null && draft !== void 0 ? draft : text) !== null && _g !== void 0 ? _g : '' }),
320
+ showPreview && kind && kind !== 'markdown' && kind !== 'html' && shownUrl && (react_1.React.createElement(preview_1.MediaPreview, { key: shownUrl, kind: kind, url: shownUrl, size: (_k = (_j = (_h = (_d = file.value) === null || _d === void 0 ? void 0 : _d.size) !== null && _h !== void 0 ? _h : bytes.size) !== null && _j !== void 0 ? _j : size) !== null && _k !== void 0 ? _k : 0, onInfo: setInfo, previous: showPicture(siblings === null || siblings === void 0 ? void 0 : siblings.previous), next: showPicture(siblings === null || siblings === void 0 ? void 0 : siblings.next), browsedAt: browsedAt })),
321
+ showPreview && kind && kind !== 'markdown' && kind !== 'html' && !shownUrl && (react_1.React.createElement(Message, { tone: bytes.error ? 'error' : undefined }, (_l = bytes.error) !== null && _l !== void 0 ? _l : (0, i18n_1.t)('loading'))),
322
+ !showPreview && (react_1.React.createElement(host_1.pi.ui.CodeEditor, { path: path, value: (_m = draft !== null && draft !== void 0 ? draft : text) !== null && _m !== void 0 ? _m : '', readOnly: readOnly, line: target === null || target === void 0 ? void 0 : target.line, column: target === null || target === void 0 ? void 0 : target.column, endColumn: target === null || target === void 0 ? void 0 : target.endColumn, selection: (target === null || target === void 0 ? void 0 : target.endLine)
287
323
  ? { startLine: target.line, startColumn: target.column, endLine: target.endLine, endColumn: target.endColumn }
288
324
  : undefined, onChange: value => {
289
325
  setBase(previous => (previous === undefined ? text : previous));
@@ -105,12 +105,26 @@ declare const ZH: {
105
105
  closeTabsToTheRight: string;
106
106
  closeEnded: string;
107
107
  openCount: string;
108
+ workbench: string;
108
109
  explorer: string;
109
110
  openFiles: string;
110
111
  search: string;
111
112
  scm: string;
112
113
  terminal: string;
113
114
  browser: string;
115
+ agentNavigate: string;
116
+ agentBack: string;
117
+ agentForward: string;
118
+ agentReload: string;
119
+ agentSnapshot: string;
120
+ agentClick: string;
121
+ agentType: string;
122
+ agentPress: string;
123
+ agentScroll: string;
124
+ agentScreenshot: string;
125
+ agentEvaluate: string;
126
+ agentWait: string;
127
+ agentCdp: string;
114
128
  refresh: string;
115
129
  collapseAll: string;
116
130
  showExcluded: string;
@@ -151,8 +165,6 @@ declare const ZH: {
151
165
  forward: string;
152
166
  openExternal: string;
153
167
  recent: string;
154
- browserTitle: string;
155
- browserHint: string;
156
168
  home: string;
157
169
  removeRecent: string;
158
170
  frameHint: string;
@@ -191,8 +203,6 @@ declare const ZH: {
191
203
  saveFailed: string;
192
204
  changedOnDisk: string;
193
205
  reload: string;
194
- fit: string;
195
- actualSize: string;
196
206
  };
197
207
  type Key = keyof typeof ZH;
198
208
  /** Words in the language of the page; `{name}` takes `vars.name`. */