@celljs/ta 4.9.0 → 4.10.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 (300) hide show
  1. package/dist/cli.mjs +69 -15
  2. package/dist/gateway.mjs +170 -28
  3. package/dist/pi/CHANGELOG.md +11 -0
  4. package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
  5. package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
  6. package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
  7. package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
  8. package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
  9. package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
  10. package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
  11. package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
  12. package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
  13. package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
  14. package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  15. package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
  16. package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
  17. package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
  18. package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
  19. package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
  20. package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
  21. package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
  22. package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
  23. package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
  24. package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
  25. package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
  26. package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  27. package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
  28. package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
  29. package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
  30. package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
  31. package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
  32. package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
  33. package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
  34. package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
  35. package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
  36. package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
  37. package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
  38. package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
  39. package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
  40. package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
  41. package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
  42. package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
  43. package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
  44. package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
  45. package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
  46. package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
  47. package/dist/pi/dist/bundle/cli-runtime.js +1 -1
  48. package/dist/pi/dist/bundle/index.js +1 -1
  49. package/dist/pi/dist/bundle/rpc-entry.js +1 -1
  50. package/dist/pi/docs/cli.md +14 -1
  51. package/dist/pi/docs/extensions.md +27 -7
  52. package/dist/pi/docs/keybindings.md +1 -1
  53. package/dist/pi/docs/llama-cpp.md +5 -8
  54. package/dist/pi/docs/models-configuration.md +6 -1
  55. package/dist/pi/docs/models.md +2 -1
  56. package/dist/pi/docs/prompt-templates.md +1 -1
  57. package/dist/pi/docs/providers.md +1 -1
  58. package/dist/pi/docs/rpc.md +4 -2
  59. package/dist/pi/docs/sessions.md +7 -1
  60. package/dist/pi/docs/settings.md +1 -1
  61. package/dist/pi/docs/tui.md +1 -1
  62. package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  63. package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
  64. package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  65. package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
  66. package/dist/pi/examples/extensions/gondolin/package.json +1 -1
  67. package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
  68. package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
  69. package/dist/pi/examples/extensions/subagent/README.md +14 -11
  70. package/dist/pi/examples/extensions/subagent/index.ts +392 -171
  71. package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
  72. package/dist/pi/examples/extensions/with-deps/package.json +1 -1
  73. package/dist/pi/examples/tsconfig.json +63 -35
  74. package/dist/pi/package.json +1 -1
  75. package/dist/pi/packages/ta-agents/README.en.md +2 -2
  76. package/dist/pi/packages/ta-agents/README.md +2 -2
  77. package/dist/pi/packages/ta-agents/extension/index.mjs +69 -13
  78. package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +19 -4
  79. package/dist/pi/packages/ta-agents/lib/agent-bindings.js +43 -9
  80. package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -0
  81. package/dist/pi/packages/ta-agents/lib/agent-catalog.js +3 -0
  82. package/dist/pi/packages/ta-agents/lib/extension.d.ts +2 -1
  83. package/dist/pi/packages/ta-agents/lib/extension.js +26 -4
  84. package/dist/pi/packages/ta-agents/lib/json-rpc.js +7 -1
  85. package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
  86. package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
  87. package/dist/pi/packages/ta-agents/package.json +3 -3
  88. package/dist/pi/packages/ta-bots/extension/index.mjs +46 -0
  89. package/dist/pi/packages/ta-bots/host/index.mjs +46 -0
  90. package/dist/pi/packages/ta-bots/package.json +1 -1
  91. package/dist/pi/packages/ta-changes/package.json +1 -1
  92. package/dist/pi/packages/ta-channels/README.en.md +2 -2
  93. package/dist/pi/packages/ta-channels/README.md +2 -2
  94. package/dist/pi/packages/ta-channels/host/index.mjs +50 -0
  95. package/dist/pi/packages/ta-channels/lib/create.js +11 -3
  96. package/dist/pi/packages/ta-channels/lib/faces.js +1 -1
  97. package/dist/pi/packages/ta-channels/lib/i18n.d.ts +6 -9
  98. package/dist/pi/packages/ta-channels/lib/i18n.js +12 -18
  99. package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
  100. package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
  101. package/dist/pi/packages/ta-channels/lib/room.js +13 -8
  102. package/dist/pi/packages/ta-channels/lib/sidebar.js +241 -79
  103. package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
  104. package/dist/pi/packages/ta-channels/lib/style.js +83 -37
  105. package/dist/pi/packages/ta-channels/lib/tasks.d.ts +2 -0
  106. package/dist/pi/packages/ta-channels/lib/tasks.js +22 -12
  107. package/dist/pi/packages/ta-channels/lib/views.d.ts +49 -1
  108. package/dist/pi/packages/ta-channels/lib/views.js +100 -1
  109. package/dist/pi/packages/ta-channels/package.json +1 -1
  110. package/dist/pi/packages/ta-channels/web/index.js +482 -259
  111. package/dist/pi/packages/ta-computer-use/package.json +2 -2
  112. package/dist/pi/packages/ta-cron/README.en.md +2 -2
  113. package/dist/pi/packages/ta-cron/README.md +2 -2
  114. package/dist/pi/packages/ta-cron/host/index.mjs +6 -0
  115. package/dist/pi/packages/ta-cron/lib/editor.js +60 -27
  116. package/dist/pi/packages/ta-cron/lib/i18n.d.ts +12 -1
  117. package/dist/pi/packages/ta-cron/lib/i18n.js +24 -2
  118. package/dist/pi/packages/ta-cron/lib/page.d.ts +33 -3
  119. package/dist/pi/packages/ta-cron/lib/page.js +119 -4
  120. package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
  121. package/dist/pi/packages/ta-cron/lib/style.js +166 -46
  122. package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
  123. package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
  124. package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
  125. package/dist/pi/packages/ta-cron/lib/task-util.js +11 -0
  126. package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
  127. package/dist/pi/packages/ta-cron/lib/tasks-view.js +102 -66
  128. package/dist/pi/packages/ta-cron/package.json +1 -1
  129. package/dist/pi/packages/ta-cron/web/index.js +928 -404
  130. package/dist/pi/packages/ta-extensions/README.en.md +3 -1
  131. package/dist/pi/packages/ta-extensions/README.md +3 -1
  132. package/dist/pi/packages/ta-extensions/lib/actions.js +3 -1
  133. package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
  134. package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
  135. package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
  136. package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
  137. package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
  138. package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
  139. package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
  140. package/dist/pi/packages/ta-extensions/lib/page.js +42 -18
  141. package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
  142. package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
  143. package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
  144. package/dist/pi/packages/ta-extensions/lib/style.js +10 -4
  145. package/dist/pi/packages/ta-extensions/package.json +1 -1
  146. package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +7 -3
  147. package/dist/pi/packages/ta-extensions/web/index.js +269 -26
  148. package/dist/pi/packages/ta-launcher/package.json +1 -1
  149. package/dist/pi/packages/ta-workspace/README.md +1 -1
  150. package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
  151. package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
  152. package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
  153. package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
  154. package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
  155. package/dist/pi/packages/ta-workspace/lib/editors.js +12 -3
  156. package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +1 -2
  157. package/dist/pi/packages/ta-workspace/lib/i18n.js +2 -4
  158. package/dist/pi/packages/ta-workspace/lib/index.js +17 -1
  159. package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
  160. package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
  161. package/dist/pi/packages/ta-workspace/lib/preview.d.ts +13 -3
  162. package/dist/pi/packages/ta-workspace/lib/preview.js +17 -14
  163. package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
  164. package/dist/pi/packages/ta-workspace/lib/style.js +20 -7
  165. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +51 -0
  166. package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +226 -0
  167. package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +0 -39
  168. package/dist/pi/packages/ta-workspace/lib/terminal.js +28 -240
  169. package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
  170. package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
  171. package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +19 -0
  172. package/dist/pi/packages/ta-workspace/lib/util/preview.js +32 -1
  173. package/dist/pi/packages/ta-workspace/package.json +1 -1
  174. package/dist/pi/packages/ta-workspace/web/index.js +238 -68
  175. package/dist/public/assets/{abnfDiagram-S7VZAUFO-C1tb6dM5.js → abnfDiagram-S7VZAUFO-BmIko5tV.js} +1 -1
  176. package/dist/public/assets/{architecture-WOLXFQ4H-DN1Va8BF.js → architecture-WOLXFQ4H-XgsdQ7ul.js} +1 -1
  177. package/dist/public/assets/{architectureDiagram-YGSQEFNW-BmK2SYtQ.js → architectureDiagram-YGSQEFNW--sVhMS03.js} +1 -1
  178. package/dist/public/assets/{blockDiagram-APKKGZFW-DvLrLzTm.js → blockDiagram-APKKGZFW-8f9b-9k2.js} +1 -1
  179. package/dist/public/assets/browser-DOHZ0JCf.js +12 -0
  180. package/dist/public/assets/{c4Diagram-KJ2TOQU5-CrQlWwrG.js → c4Diagram-KJ2TOQU5-CwYQ0Jfy.js} +1 -1
  181. package/dist/public/assets/{chunk-6MUBBAK2-CHKMsuY_.js → chunk-6MUBBAK2-7Y9ezehi.js} +1 -1
  182. package/dist/public/assets/{chunk-AXFCVDMN-CWJ7Np6s.js → chunk-AXFCVDMN-CZIH4pWz.js} +1 -1
  183. package/dist/public/assets/{chunk-BG4553SI-3v5XbQGM.js → chunk-BG4553SI-DsNATY2m.js} +1 -1
  184. package/dist/public/assets/{chunk-DQASFODM-2CC-yiCz.js → chunk-DQASFODM-CoXkfYE-.js} +1 -1
  185. package/dist/public/assets/{chunk-HFQBQIA3-D2hzQPAy.js → chunk-HFQBQIA3-C5OLqki8.js} +1 -1
  186. package/dist/public/assets/{chunk-KQLB2F66-SifAZs2r.js → chunk-KQLB2F66-DMHuYGEF.js} +1 -1
  187. package/dist/public/assets/{chunk-KS47KZWR-BP0C0VCC.js → chunk-KS47KZWR-BKeOttO1.js} +1 -1
  188. package/dist/public/assets/{chunk-LEVMRMFU-B1f5vw5b.js → chunk-LEVMRMFU-D6zCwkk7.js} +1 -1
  189. package/dist/public/assets/{chunk-M57EVK23-B2MCJt7Y.js → chunk-M57EVK23-B5-QqcZg.js} +1 -1
  190. package/dist/public/assets/{chunk-OY52VR5R-cDpZJMk4.js → chunk-OY52VR5R-DQrq3n0T.js} +1 -1
  191. package/dist/public/assets/{chunk-QB3YPZ4I-BE0we2xc.js → chunk-QB3YPZ4I-j6ZT7EDR.js} +1 -1
  192. package/dist/public/assets/{chunk-R3KSYZAL-D9wOfqqH.js → chunk-R3KSYZAL-D5MXUO36.js} +1 -1
  193. package/dist/public/assets/{chunk-STOXU5M4-BIaVsc0K.js → chunk-STOXU5M4-DaBkw4dD.js} +1 -1
  194. package/dist/public/assets/{chunk-TU62E6Q5-BZc0OZEM.js → chunk-TU62E6Q5-vXcRfGci.js} +1 -1
  195. package/dist/public/assets/{chunk-X4PVCEUW-Bngfwwzm.js → chunk-X4PVCEUW-CIh6H4Y2.js} +1 -1
  196. package/dist/public/assets/{chunk-XXDRQBXY-C5FQ6XHK.js → chunk-XXDRQBXY-C_Vwv1FM.js} +1 -1
  197. package/dist/public/assets/{classDiagram-v2-L25IHNXF-_om54nmt.js → classDiagram-v2-L25IHNXF-DccDWEJn.js} +1 -1
  198. package/dist/public/assets/{cose-bilkent-JH36ORCC-Dwpeee_6.js → cose-bilkent-JH36ORCC-BX47lumZ.js} +1 -1
  199. package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +1 -0
  200. package/dist/public/assets/{cynefinDiagram-L36ESFBY-DP5_y9Dq.js → cynefinDiagram-L36ESFBY-BE6WOGxW.js} +1 -1
  201. package/dist/public/assets/{d3-selection-DFiMlEmn.js → d3-selection-ZcE6yRN5.js} +1 -1
  202. package/dist/public/assets/{dagre-SPEB5RXH-DYwsk6gk.js → dagre-SPEB5RXH-CE6SOOcN.js} +1 -1
  203. package/dist/public/assets/{diagram-3B7GL73J-Dq_nT3AZ.js → diagram-3B7GL73J-xC8VtiYL.js} +1 -1
  204. package/dist/public/assets/{diagram-DNEMPZML-ChURW6y9.js → diagram-DNEMPZML-4dmcBbjL.js} +1 -1
  205. package/dist/public/assets/{diagram-L3MUGCDN-CgVp4Rto.js → diagram-L3MUGCDN-D14Yn3sQ.js} +1 -1
  206. package/dist/public/assets/{diagram-LA4NIPWU-vrqLMDby.js → diagram-LA4NIPWU-GxSXIhsK.js} +1 -1
  207. package/dist/public/assets/{diagram-MHCOC4E2-lvfOr5ij.js → diagram-MHCOC4E2-Cm7Prlpc.js} +1 -1
  208. package/dist/public/assets/{diagram-XPFHEONP-oQ18TeVp.js → diagram-XPFHEONP-mkUnnKFu.js} +1 -1
  209. package/dist/public/assets/{dist-BOxxmveI.js → dist-acJS-BlA.js} +1 -1
  210. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-C7_tlZCS.js → ebnfDiagram-UZSYDL2S-m77ua3UQ.js} +1 -1
  211. package/dist/public/assets/{editor.api-CoZ8MEuz.js → editor.api-CljTm-EQ.js} +1 -1
  212. package/dist/public/assets/{elk-XV6XMXQE-Dkt5-ikg.js → elk-XV6XMXQE-DsQY1hw9.js} +1 -1
  213. package/dist/public/assets/{erDiagram-EYBAPDEH-27kh3zlx.js → erDiagram-EYBAPDEH-CV8gJM0P.js} +1 -1
  214. package/dist/public/assets/{eventmodeling-K75KTNOO-CxVEejjN.js → eventmodeling-K75KTNOO-C1pymbUr.js} +1 -1
  215. package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +1 -0
  216. package/dist/public/assets/{freemarker2-D6CwPIXh.js → freemarker2-DYJXaMHN.js} +1 -1
  217. package/dist/public/assets/{ganttDiagram-23REXITY-C-amlwpX.js → ganttDiagram-23REXITY-CppxOWRh.js} +1 -1
  218. package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +1 -0
  219. package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DKhzI0Xz.js → gitGraphDiagram-STJD7YCW-CrQrZhcP.js} +1 -1
  220. package/dist/public/assets/{handlebars-mxNr68Gm.js → handlebars-DZCnH9e2.js} +1 -1
  221. package/dist/public/assets/{html-Bze6s9R9.js → html-DuzouNES.js} +1 -1
  222. package/dist/public/assets/{index-BhQUc9PU.js → index-B7OYKvCE.js} +2 -2
  223. package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +1 -0
  224. package/dist/public/assets/{infoDiagram-KBXO4MBG-WHuWjEDO.js → infoDiagram-KBXO4MBG-6pby19tQ.js} +1 -1
  225. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DFHUwD0J.js → ishikawaDiagram-M35NCXHK-Duf8c8rQ.js} +1 -1
  226. package/dist/public/assets/{javascript-4NMPu7y1.js → javascript-2d_L6cVd.js} +1 -1
  227. package/dist/public/assets/{journeyDiagram-OPLOXDXO-C7gV6zEr.js → journeyDiagram-OPLOXDXO-Dvv-xzNo.js} +1 -1
  228. package/dist/public/assets/{jsonMode-B1JEHPMp.js → jsonMode-CFadYXyI.js} +1 -1
  229. package/dist/public/assets/{kanban-definition-BZKZHSQY-DlRu_d2Q.js → kanban-definition-BZKZHSQY-Dsk6F-TT.js} +1 -1
  230. package/dist/public/assets/{liquid-B7sIf4NX.js → liquid-Din4CF34.js} +1 -1
  231. package/dist/public/assets/{mdx-CAN0qez6.js → mdx-DivDuCWI.js} +1 -1
  232. package/dist/public/assets/{mermaid-parser.core-BGmotBhf.js → mermaid-parser.core-BfCv4CYZ.js} +3 -3
  233. package/dist/public/assets/{mermaid.core-Cl6SS3cM.js → mermaid.core-DC20ZwJj.js} +4 -4
  234. package/dist/public/assets/{mindmap-definition-I2QAS2VK-DiQ8Feqr.js → mindmap-definition-I2QAS2VK-DRZRrJU_.js} +1 -1
  235. package/dist/public/assets/module-BAQaY56j.js +1 -0
  236. package/dist/public/assets/module-DxRGg3ED.js +1947 -0
  237. package/dist/public/assets/{monaco-CwCjTWAO.js → monaco-D1d6MOPe.js} +3 -3
  238. package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +1 -0
  239. package/dist/public/assets/{pegDiagram-FD4XPPHP-XhCpv6BX.js → pegDiagram-FD4XPPHP-DcGr3Tbk.js} +1 -1
  240. package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +1 -0
  241. package/dist/public/assets/{pieDiagram-J4AKIIQI-DUVzuXUd.js → pieDiagram-J4AKIIQI-GF7pu6ch.js} +1 -1
  242. package/dist/public/assets/{python-DsoF66Sp.js → python-BQbTTTT5.js} +1 -1
  243. package/dist/public/assets/{quadrantDiagram-XTYBLID2-Ddobf0z0.js → quadrantDiagram-XTYBLID2-D-bcu7Ey.js} +1 -1
  244. package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +1 -0
  245. package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +1 -0
  246. package/dist/public/assets/{railroad-abnf-LNEFI6M7-DkrNo-Gf.js → railroad-abnf-LNEFI6M7-BiBHsI-K.js} +1 -1
  247. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DaB7gY8P.js → railroad-ebnf-DWYD2UWJ-zKjrfkHs.js} +1 -1
  248. package/dist/public/assets/{railroad-peg-JR7BVNR7-D_QG87QV.js → railroad-peg-JR7BVNR7-DKuVn0GT.js} +1 -1
  249. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-x-nUoBjv.js → railroadDiagram-MRQ6NCDL-Cyn-16mJ.js} +1 -1
  250. package/dist/public/assets/{razor-DSrcJyQe.js → razor-DiLk54O0.js} +1 -1
  251. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-kNNcbsty.js → requirementDiagram-Y7LWUY3S-CwU2EBkW.js} +1 -1
  252. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ClC12Odk.js → sankeyDiagram-WGJFYUXA-ajf00HyW.js} +1 -1
  253. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DDQITP2g.js → sequenceDiagram-5NDRBG5M-DiX_OIAw.js} +1 -1
  254. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-N1t_36oh.js → stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js} +1 -1
  255. package/dist/public/assets/{swimlanes-UMQ2AFYF-DSt9fFYE.js → swimlanes-UMQ2AFYF-BGQKSlj7.js} +1 -1
  256. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +8 -0
  257. package/dist/public/assets/{timeline-definition-SEUHKTQE-CfymOw_s.js → timeline-definition-SEUHKTQE-DhQoApff.js} +1 -1
  258. package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +1 -0
  259. package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +1 -0
  260. package/dist/public/assets/{typescript-J7rF-zX8.js → typescript-COQ1g-up.js} +1 -1
  261. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CK_mRc2_.js → usecaseDiagram-AFA6YXN4-CmLFzjie.js} +1 -1
  262. package/dist/public/assets/{vennDiagram-NNMJR3RB-DW8xR6IJ.js → vennDiagram-NNMJR3RB-DOa6JR5K.js} +1 -1
  263. package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +1 -0
  264. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-Css55Zq5.js → wardleyDiagram-S7YFUSEH-BV7EEShp.js} +1 -1
  265. package/dist/public/assets/{xml-CJeviG_a.js → xml-BbvtjuaG.js} +1 -1
  266. package/dist/public/assets/{xychartDiagram-GGNKY7IX-BnhK9cFS.js → xychartDiagram-GGNKY7IX-DtMpPbsq.js} +1 -1
  267. package/dist/public/assets/{yaml-Gw3uo6rF.js → yaml-Bw8NFga9.js} +1 -1
  268. package/dist/public/index.html +1 -1
  269. package/dist/public/launch.svg +46 -42
  270. package/dist/serve/index.mjs +1367 -560
  271. package/package.json +25 -25
  272. package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
  273. package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
  274. package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
  275. package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
  276. package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
  277. package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
  278. package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
  279. package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
  280. package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  281. package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  282. package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
  283. package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
  284. package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
  285. package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
  286. package/dist/public/assets/browser-DAv3ly6M.js +0 -12
  287. package/dist/public/assets/cynefin-EF2NZ3EQ-CW_93VVD.js +0 -1
  288. package/dist/public/assets/flowDiagram-MALGAFMO-BRowRdve.js +0 -1
  289. package/dist/public/assets/gitGraph-VSP46ZUC-BGmojXlx.js +0 -1
  290. package/dist/public/assets/info-OHQRW6UA-CRRVgGj2.js +0 -1
  291. package/dist/public/assets/module-1nDbf1AK.js +0 -1761
  292. package/dist/public/assets/module-BkKfSTDV.js +0 -1
  293. package/dist/public/assets/packet-JDAUHWVQ-DUlqTCWQ.js +0 -1
  294. package/dist/public/assets/pie-XZMESJXO-2RgP4ScO.js +0 -1
  295. package/dist/public/assets/radar-ABXABTNO-Dap8k-yH.js +0 -1
  296. package/dist/public/assets/railroad-I3PHUGI6-Ds10NBze.js +0 -1
  297. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BHAN4SQO.js +0 -8
  298. package/dist/public/assets/treeView-D4JQ5SDB-f1hLUBjI.js +0 -1
  299. package/dist/public/assets/treemap-SAJKECNS-_NPRpuUC.js +0 -1
  300. package/dist/public/assets/wardley-7MLQ67FV-CLBqtefx.js +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-computer-use",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "A pi package for Ta: the desktop apps of this computer, used in the background through Cua Driver, which starts only when the agent first needs it",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -26,7 +26,7 @@
26
26
  "watch": "tsc -b -w --preserveWatchOutput"
27
27
  },
28
28
  "devDependencies": {
29
- "@earendil-works/pi-coding-agent": "^1.5.0"
29
+ "@earendil-works/pi-coding-agent": "^1.5.2"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
@@ -18,7 +18,7 @@ A pi package that comes with Ta (on by default; turn it off in Settings → Exte
18
18
  /schedule help
19
19
  ```
20
20
 
21
- Or just say "sum up yesterday's commits every day at 9": Ta makes the task with the tool `schedule_task`. The Scheduled page of the web client (under Discover by default; pin it there or under Settings > Navigation) lists every task with its rule, its next run and a switch; opened, its prompt and the summary of each run, and "Open conversation" goes to the conversation of that run. Tasks are made, edited, run and deleted there too; the dialog picks a task's model from a list with a search box (type part of its name, id or provider; arrows and Enter pick; the models with credentials in the settings of its directory, pi packages' such as other agents included) and its thinking level, or leaves the defaults of the settings.
21
+ Or just say "sum up yesterday's commits every day at 9": Ta makes the task with the tool `schedule_task`. The Scheduled page of the web client (under Discover by default; pin it there or under Settings > Navigation) lists every task with its rule, its next run and a switch, two lines a task on a phone; the switch moves as it is tapped, before the service answers. Opened, its prompt and the summary of each run, and "Open conversation" goes to the conversation of that run. The … of a task opens its menu (a right click or a hold does too): run it now, edit it, delete it. Tasks are made, edited, run and deleted there too; the dialog picks a task's model from a list with a search box (type part of its name, id or provider; arrows and Enter pick; the models with credentials in the settings of its directory, pi packages' such as other agents included) and its thinking level, or leaves the defaults of the settings. An opened task starts with Run now, Edit and Make an extension, its prompt shows four lines until "Show all", and the page scrolls in its own box, however long the summary of a run that is open. Make an extension opens a new conversation that asks Ta, with the ta-package skill, for an extension of the task: a page of its own that shows its results in a form that suits them (and a card of the board when that helps), where the user goes through past runs, runs it now and turns it on or off. The task keeps running here; the extension reads and drives it with `pi.packages.callPackageHost('@celljs/ta-cron', …)` (`list`, `get`, `runs`, `run`, `setEnabled`, `update`). The conversation shows one line; the task, its prompt and its last result are in a `<context>` block for the model (`web-src/task-extension.ts`), so that another coding agent without the tool `schedule_task` can make it too. The conversation is on the model of Settings → Making extensions (`makeModel` in the data of `@celljs/ta-extensions`), else the default.
22
22
 
23
23
  ## Time rules
24
24
 
@@ -45,4 +45,4 @@ Times are local to the machine of the Ta service. A command may end with `--name
45
45
 
46
46
  - Tasks run only while the Ta service runs (`ta serve`; Ta Desktop starts it); in `ta` in a terminal the commands and the tool say they need it.
47
47
  - A run's tools cannot be limited: it is a conversation like any other, with your settings and the project's extensions and skills.
48
- - No outside channels such as email or webhooks, and no export or import.
48
+ - No outside channels such as email or webhooks, and no export or import.
@@ -18,7 +18,7 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
18
18
  /schedule help
19
19
  ```
20
20
 
21
- 也可以直接说"每天 9 点帮我汇总昨天的提交":Ta 用工具 `schedule_task` 建任务。Web 客户端的"定时任务"页(默认收在"发现"里,可以在那里或 设置 → 导航 固定到导航栏)列出所有任务:时间规则、下次运行、开关,展开看提示词和每次运行的总结,点"打开对话"进入那次运行的对话;也能在这里新建、编辑、立即运行和删除;新建和编辑时从可搜索的列表里选这个任务用的模型(输入名字、模型 id 或提供方即可筛选,方向键和回车选择;任务所在目录的设置里有凭据的模型,包括 pi 包提供的,如外部 Agent)和思考级别,不选就用设置里的默认值。
21
+ 也可以直接说"每天 9 点帮我汇总昨天的提交":Ta 用工具 `schedule_task` 建任务。Web 客户端的"定时任务"页(默认收在"发现"里,可以在那里或 设置 → 导航 固定到导航栏)列出所有任务:时间规则、下次运行、开关(手机上每个任务两行),开关一点就动,不用等服务回答;展开看提示词和每次运行的总结,点"打开对话"进入那次运行的对话,任务右边的 … 是它的菜单(右键或长按也一样):立即运行、编辑、删除;也能在这里新建、编辑、立即运行和删除;新建和编辑时从可搜索的列表里选这个任务用的模型(输入名字、模型 id 或提供方即可筛选,方向键和回车选择;任务所在目录的设置里有凭据的模型,包括 pi 包提供的,如外部 Agent)和思考级别,不选就用设置里的默认值。展开的任务顶部是"立即运行""编辑"和"做成扩展",提示词先显示四行,"展开全文"看全部;页面在自己的区域里滚动,展开再长的运行总结也能滚到底。"做成扩展"开一个新对话,请 Ta 用 ta-package 技能为这个任务做一个扩展:按结果的特点做专属页面(需要时加一张小组件卡片),在里面看历史运行、立即运行、开关任务。任务仍由这里按时运行,扩展经 `pi.packages.callPackageHost('@celljs/ta-cron', …)` 读写它(`list`、`get`、`runs`、`run`、`setEnabled`、`update`);对话里只显示一句话,任务、提示词和最近一次结果放在给模型的 `<context>` 块里(`web-src/task-extension.ts`),没有 `schedule_task` 工具的外部 Agent 也能做。这个对话用 设置 → 做扩展 选的模型(`@celljs/ta-extensions` 的包数据 `makeModel`),不选就跟随默认模型。
22
22
 
23
23
  ## 时间规则
24
24
 
@@ -45,4 +45,4 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
45
45
 
46
46
  - 只在 Ta 服务(`ta serve`,Ta 桌面版会自动启动它)运行时调度;单独运行 `ta`(终端)时命令和工具会提示需要 Ta 服务。
47
47
  - 不能限定一次运行可用的工具:运行和普通对话一样,用你的设置和项目里的扩展、技能。
48
- - 没有邮件、Webhook 之类的外部通知渠道,也没有导入导出。
48
+ - 没有邮件、Webhook 之类的外部通知渠道,也没有导入导出。
@@ -556,6 +556,12 @@ var TaskUtil;
556
556
  }
557
557
  return value;
558
558
  }
559
+ function firstLine(text) {
560
+ const line = text.split(`
561
+ `).find((candidate) => candidate.trim()) ?? "";
562
+ return line.replace(/^\s*(?:#{1,6}\s+|[-*+]\s+|>\s*|\d+[.)]\s+)/, "").replace(/\*\*|__|`/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").trim();
563
+ }
564
+ TaskUtil.firstLine = firstLine;
559
565
  function missed(task, now) {
560
566
  return task.schedule.kind === "once" && !!task.nextRunAt && now.getTime() - new Date(task.nextRunAt).getTime() > Limits.GRACE_MS;
561
567
  }
@@ -17,10 +17,27 @@ const NOTIFY = [
17
17
  ['error', 'notifyError'],
18
18
  ['never', 'notifyNever'],
19
19
  ];
20
+ /** The names of the days of the week in the language of the page, made once: a letter typed in the dialog renders it again. */
21
+ const DAY_NAMES = new Map();
20
22
  function weekdayNames() {
21
- const format = new Intl.DateTimeFormat(page_1.pi.ui.language === 'zh-CN' ? 'zh-CN' : 'en', { weekday: 'short' });
22
- // 2023-01-01 was a Sunday.
23
- return Array.from({ length: 7 }, (_, day) => format.format(new Date(2023, 0, 1 + day)));
23
+ const language = page_1.pi.ui.language;
24
+ let names = DAY_NAMES.get(language);
25
+ if (!names) {
26
+ const format = new Intl.DateTimeFormat(language === 'zh-CN' ? 'zh-CN' : 'en', { weekday: 'short' });
27
+ // 2023-01-01 was a Sunday.
28
+ names = Array.from({ length: 7 }, (_, day) => format.format(new Date(2023, 0, 1 + day)));
29
+ DAY_NAMES.set(language, names);
30
+ }
31
+ return names;
32
+ }
33
+ /** The parts of the form the rule reads: what its next run, and whether it has one, depend on. */
34
+ function ruleKey(form) {
35
+ return [form.mode, form.repeat, form.amount, form.unit, form.time, form.weekday, form.cron, form.at].join('|');
36
+ }
37
+ /** The next run of the form, worked out again when its rule changes, not at every letter typed in its prompt. */
38
+ function usePreview(form) {
39
+ const key = ruleKey(form);
40
+ return react_1.React.useMemo(() => form_util_1.FormUtil.preview(form, new Date()), [key]);
24
41
  }
25
42
  function Segments({ value, options, onChange }) {
26
43
  return (react_1.React.createElement("div", { className: "tcr-segments" }, options.map(([key, label]) => (react_1.React.createElement("button", { key: key, type: "button", "aria-pressed": value === key, className: "tcr-segment", onClick: () => onChange(key) }, label)))));
@@ -39,7 +56,7 @@ function ModelFields({ form, set, cwd }) {
39
56
  }
40
57
  /** The controls of when a task runs, with the next time it would. */
41
58
  function When({ form, set }) {
42
- const preview = form_util_1.FormUtil.preview(form, new Date());
59
+ const preview = usePreview(form);
43
60
  const days = weekdayNames();
44
61
  let rule = null;
45
62
  if (form.mode === 'once') {
@@ -58,15 +75,17 @@ function When({ form, set }) {
58
75
  form.repeat === 'weekly' && (react_1.React.createElement("select", { className: "tcr-input", value: form.weekday, onChange: event => set({ weekday: Number(event.target.value) }) }, days.map((day, index) => (react_1.React.createElement("option", { key: day, value: index }, day))))),
59
76
  react_1.React.createElement("input", { className: "tcr-input", type: "time", value: form.time, onChange: event => set({ time: event.target.value }) })));
60
77
  }
78
+ const kind = form.mode === 'once' ? 'once' : form.repeat;
79
+ const kinds = [...REPEATS.map((repeat) => [repeat, (0, page_1.t)(repeat)]), ['once', (0, page_1.t)('once')]];
80
+ const Clock = (0, page_1.icon)('Clock');
81
+ const bad = !preview.next;
61
82
  return (react_1.React.createElement("div", { className: "tcr-field" },
62
83
  react_1.React.createElement("div", { className: "tcr-label" }, (0, page_1.t)('when')),
63
- react_1.React.createElement(Segments, { value: form.mode, options: [
64
- ['repeat', (0, page_1.t)('repeat')],
65
- ['once', (0, page_1.t)('once')],
66
- ], onChange: mode => set({ mode }) }),
67
- form.mode === 'repeat' && react_1.React.createElement(Segments, { value: form.repeat, options: REPEATS.map(kind => [kind, (0, page_1.t)(kind)]), onChange: repeat => set({ repeat }) }),
84
+ react_1.React.createElement(Segments, { value: kind, options: kinds, onChange: next => set(next === 'once' ? { mode: 'once' } : { mode: 'repeat', repeat: next }) }),
68
85
  rule,
69
- react_1.React.createElement("div", { className: `tcr-preview${preview.error === undefined ? '' : ' tcr-bad'}` }, preview.next ? (0, page_1.t)('preview', { time: schedule_util_1.ScheduleUtil.clock(preview.next) }) : preview.error || (0, page_1.t)('noNext'))));
86
+ react_1.React.createElement("div", { className: `tcr-preview${bad ? ' tcr-bad' : ''}`, role: "status" },
87
+ react_1.React.createElement(Clock, { size: 13 }),
88
+ preview.next ? (0, page_1.t)('preview', { time: schedule_util_1.ScheduleUtil.clock(preview.next) }) : preview.error || (0, page_1.t)('noNext'))));
70
89
  }
71
90
  /** The dialog of a task: what Ta does, when, where, and when it tells the user. */
72
91
  function TaskEditor({ client, editing, onClose }) {
@@ -85,8 +104,11 @@ function TaskEditor({ client, editing, onClose }) {
85
104
  const [picking, setPicking] = react_1.React.useState(false);
86
105
  const [more, setMore] = react_1.React.useState(!!(form.name && editing.task) || !!form.notify);
87
106
  const [saving, setSaving] = react_1.React.useState(false);
107
+ // A phone raises its keyboard over the dialog as it opens: the field waits, and the dialog stays whole.
108
+ const touch = page_1.pi.ui.useDevice().touch;
88
109
  const set = (change) => setForm(current => ({ ...current, ...change }));
89
- const valid = form.prompt.trim().length > 0 && !!form_util_1.FormUtil.preview(form, new Date()).next;
110
+ const preview = usePreview(form);
111
+ const valid = form.prompt.trim().length > 0 && !!preview.next;
90
112
  const save = async () => {
91
113
  if (!valid || saving) {
92
114
  return;
@@ -113,26 +135,37 @@ function TaskEditor({ client, editing, onClose }) {
113
135
  setSaving(false);
114
136
  }
115
137
  };
138
+ const Folder = (0, page_1.icon)('Folder');
139
+ const Chevron = (0, page_1.icon)('ChevronDown');
140
+ const key = /Mac|iPhone|iPad/.test(navigator.platform) ? '⌘' : 'Ctrl';
116
141
  return (react_1.React.createElement(Dialog, { title: editing.task ? (0, page_1.t)('editTask') : (0, page_1.t)('newTask'), onClose: onClose },
117
142
  react_1.React.createElement("div", { className: "tcr-form" },
118
- react_1.React.createElement("label", { className: "tcr-field" },
119
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('prompt')),
120
- react_1.React.createElement("textarea", { className: "tcr-input tcr-prompt", rows: 4, value: form.prompt, placeholder: (0, page_1.t)('promptPlaceholder'), autoFocus: true, onChange: event => set({ prompt: event.target.value }), onKeyDown: event => (event.metaKey || event.ctrlKey) && event.key === 'Enter' && void save() })),
121
- react_1.React.createElement(When, { form: form, set: set }),
122
- react_1.React.createElement("div", { className: "tcr-field" },
123
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('directory')),
124
- react_1.React.createElement("button", { type: "button", className: "tcr-input tcr-folder", title: form.cwd, onClick: () => setPicking(true) },
125
- (0, page_1.basename)(form.cwd || cwd),
126
- react_1.React.createElement("span", { className: "tcr-folder-path" }, form.cwd || cwd))),
127
- react_1.React.createElement(ModelFields, { form: form, set: set, cwd: form.cwd || cwd }),
128
- more ? (react_1.React.createElement("div", { className: "tcr-grid" },
129
- react_1.React.createElement("label", { className: "tcr-field" },
130
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('name')),
131
- react_1.React.createElement("input", { className: "tcr-input", value: form.name, placeholder: (0, page_1.t)('namePlaceholder'), onChange: event => set({ name: event.target.value }) })),
143
+ react_1.React.createElement("div", { className: "tcr-form-body" },
132
144
  react_1.React.createElement("label", { className: "tcr-field" },
133
- react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('notify')),
134
- react_1.React.createElement("select", { className: "tcr-input", value: form.notify, onChange: event => set({ notify: event.target.value }) }, NOTIFY.map(([level, word]) => (react_1.React.createElement("option", { key: level, value: level }, (0, page_1.t)(word)))))))) : (react_1.React.createElement("button", { type: "button", className: "tcr-link", onClick: () => setMore(true) }, (0, page_1.t)('more'))),
145
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('prompt')),
146
+ react_1.React.createElement("textarea", { className: "tcr-input tcr-prompt", rows: 5, value: form.prompt, placeholder: (0, page_1.t)('promptPlaceholder'), autoFocus: !touch, onChange: event => set({ prompt: event.target.value }), onKeyDown: event => (event.metaKey || event.ctrlKey) && event.key === 'Enter' && void save() })),
147
+ react_1.React.createElement(When, { form: form, set: set }),
148
+ react_1.React.createElement("div", { className: "tcr-field" },
149
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('directory')),
150
+ react_1.React.createElement("button", { type: "button", className: "tcr-input tcr-folder", title: form.cwd || cwd, onClick: () => setPicking(true) },
151
+ react_1.React.createElement(Folder, { size: 15 }),
152
+ react_1.React.createElement("span", { className: "tcr-folder-name" }, (0, page_1.basename)(form.cwd || cwd)),
153
+ react_1.React.createElement("span", { className: "tcr-folder-path" }, `\u200e${form.cwd || cwd}\u200e`))),
154
+ react_1.React.createElement(ModelFields, { form: form, set: set, cwd: form.cwd || cwd }),
155
+ react_1.React.createElement("div", { className: `tcr-options${more ? ' tcr-open' : ''}` },
156
+ react_1.React.createElement("button", { type: "button", className: "tcr-more-toggle", "aria-expanded": more, onClick: () => setMore(!more) },
157
+ react_1.React.createElement("span", { className: "tcr-chevron", "aria-hidden": "true" },
158
+ react_1.React.createElement(Chevron, { size: 14 })),
159
+ (0, page_1.t)('moreOptions')),
160
+ more && (react_1.React.createElement("div", { className: "tcr-grid" },
161
+ react_1.React.createElement("label", { className: "tcr-field" },
162
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('name')),
163
+ react_1.React.createElement("input", { className: "tcr-input", value: form.name, placeholder: (0, page_1.t)('namePlaceholder'), onChange: event => set({ name: event.target.value }) })),
164
+ react_1.React.createElement("label", { className: "tcr-field" },
165
+ react_1.React.createElement("span", { className: "tcr-label" }, (0, page_1.t)('notify')),
166
+ react_1.React.createElement("select", { className: "tcr-input", value: form.notify, onChange: event => set({ notify: event.target.value }) }, NOTIFY.map(([level, word]) => (react_1.React.createElement("option", { key: level, value: level }, (0, page_1.t)(word)))))))))),
135
167
  react_1.React.createElement("div", { className: "tcr-actions" },
168
+ !touch && react_1.React.createElement("span", { className: "tcr-shortcut" }, (0, page_1.t)('shortcut', { key, action: editing.task ? (0, page_1.t)('save') : (0, page_1.t)('create') })),
136
169
  react_1.React.createElement("button", { type: "button", className: "tcr-button", onClick: onClose }, (0, page_1.t)('cancel')),
137
170
  react_1.React.createElement("button", { type: "button", className: "tcr-button tcr-primary", disabled: !valid || saving, onClick: () => void save() }, editing.task ? (0, page_1.t)('save') : (0, page_1.t)('create')))),
138
171
  picking && (react_1.React.createElement(FolderPicker, { initial: form.cwd || cwd, onPick: path => {
@@ -27,7 +27,6 @@ declare const EN: {
27
27
  name: string;
28
28
  namePlaceholder: string;
29
29
  when: string;
30
- repeat: string;
31
30
  once: string;
32
31
  every: string;
33
32
  daily: string;
@@ -76,6 +75,18 @@ declare const EN: {
76
75
  failedAction: string;
77
76
  help: string;
78
77
  serviceNeeded: string;
78
+ makeExtension: string;
79
+ makeExtensionHint: string;
80
+ extensionAsk: string;
81
+ promptLabel: string;
82
+ showAll: string;
83
+ showLess: string;
84
+ stats: string;
85
+ statsFailed: string;
86
+ lastRun: string;
87
+ moreOptions: string;
88
+ shortcut: string;
89
+ modelFailed: string;
79
90
  };
80
91
  export type Words = {
81
92
  readonly [K in keyof typeof EN]: string;
@@ -30,7 +30,6 @@ const EN = {
30
30
  name: 'Name',
31
31
  namePlaceholder: 'Optional',
32
32
  when: 'When',
33
- repeat: 'Repeat',
34
33
  once: 'Once',
35
34
  every: 'Every',
36
35
  daily: 'Daily',
@@ -79,6 +78,18 @@ const EN = {
79
78
  failedAction: 'Could not do it: {message}',
80
79
  help: 'Scheduled tasks',
81
80
  serviceNeeded: 'Scheduled tasks run in the Ta service.',
81
+ makeExtension: 'Make an extension',
82
+ makeExtensionHint: 'Ta makes a page of its own for what this task finds',
83
+ extensionAsk: 'Make the scheduled task "{name}" an extension that shows its results',
84
+ promptLabel: 'What Ta does',
85
+ showAll: 'Show all',
86
+ showLess: 'Show less',
87
+ stats: 'Ran {runs} times',
88
+ statsFailed: 'Ran {runs} times · {fails} failed',
89
+ lastRun: 'Last {time}',
90
+ moreOptions: 'More options',
91
+ shortcut: '{key} + Enter to {action}',
92
+ modelFailed: 'The model for making extensions ({model}) cannot be used, so the default one is: {message}',
82
93
  };
83
94
  const ZH = {
84
95
  title: '定时任务',
@@ -109,7 +120,6 @@ const ZH = {
109
120
  name: '名字',
110
121
  namePlaceholder: '可不填',
111
122
  when: '时间',
112
- repeat: '重复',
113
123
  once: '一次',
114
124
  every: '每隔',
115
125
  daily: '每天',
@@ -158,6 +168,18 @@ const ZH = {
158
168
  failedAction: '操作失败:{message}',
159
169
  help: '定时任务',
160
170
  serviceNeeded: '定时任务在 Ta 服务里运行。',
171
+ makeExtension: '做成扩展',
172
+ makeExtensionHint: '让 Ta 为这个任务的结果做一个专属页面',
173
+ extensionAsk: '把定时任务“{name}”做成扩展,用专属页面呈现它的运行结果',
174
+ promptLabel: 'Ta 要做的事',
175
+ showAll: '展开全文',
176
+ showLess: '收起',
177
+ stats: '已运行 {runs} 次',
178
+ statsFailed: '已运行 {runs} 次 · 失败 {fails} 次',
179
+ lastRun: '上次 {time}',
180
+ moreOptions: '更多选项',
181
+ shortcut: '{key} + 回车{action}',
182
+ modelFailed: '做扩展的模型({model})现在用不了,已改用默认模型:{message}',
161
183
  };
162
184
  var CronWords;
163
185
  (function (CronWords) {
@@ -17,26 +17,56 @@ interface State {
17
17
  loaded: boolean;
18
18
  /** By task id, its runs once asked for. */
19
19
  runs: Record<string, Run[]>;
20
- /** Counts the asks for a new task from the head of the page, which opens the editor of the page. */
21
- asks: number;
22
20
  }
23
- /** The tasks of the scheduler, read again when the data of the package changes. */
21
+ /**
22
+ * The tasks of the scheduler, read again when the data of the package changes. A change the user makes shows
23
+ * at once, before the Ta service answers (the switch of a task, a run started, a task taken away): a finger
24
+ * waits for no round trip, and one read follows the answer rather than every write.
25
+ */
24
26
  export declare class CronClient {
25
27
  protected readonly api: WebExtensionAPI;
26
28
  state: State;
27
29
  protected readonly listeners: Set<() => void>;
30
+ /** The page showing now, which opens its editor of a new task when the head of the page asks it to. */
31
+ protected readonly newAsks: Set<() => void>;
32
+ /** The tasks whose change is on its way to the Ta service: what the page shows of them is newer than its list. */
33
+ protected readonly writing: Set<string>;
34
+ /** The read on its way; another wanted once it ended (answers that would arrive together are one). */
35
+ protected reading?: Promise<void>;
36
+ protected again: boolean;
28
37
  protected stop?: () => void;
29
38
  constructor(api: WebExtensionAPI);
30
39
  start(): void;
31
40
  dispose(): void;
32
41
  subscribe(listener: () => void): () => void;
42
+ /** A new task asked for at the head of the page: the page showing opens its editor; one opened later does not. */
33
43
  askNew(): void;
44
+ /** Hears the asks for a new task while it listens: the page, from the moment it shows to the moment it goes. */
45
+ onAskNew(listener: () => void): () => void;
34
46
  load(): Promise<void>;
47
+ protected read(): Promise<void>;
35
48
  loadRuns(taskId: string): Promise<void>;
36
49
  call<T>(method: string, ...params: unknown[]): Promise<T>;
50
+ /** On or off, the switch taking it at once. */
51
+ setEnabled(id: string, enabled: boolean): Promise<void>;
52
+ /** Runs it now: the row says so at once, as its run starts. */
53
+ runNow(id: string): Promise<void>;
54
+ /** Takes it away at once, with its runs; the conversations its runs had stay. */
55
+ remove(id: string): Promise<void>;
56
+ /**
57
+ * A change shown at once and carried to the Ta service: `patch` gives the task as the page shows it
58
+ * meanwhile, none to take it away. A failure puts back what was there, and the next read is the truth.
59
+ */
60
+ protected change(id: string, patch: (task: Task) => Task | undefined, send: () => Promise<unknown>): Promise<void>;
37
61
  protected set(change: Partial<State>): void;
38
62
  }
39
63
  /** Shows the conversation of a run, opened on the server when it is not open. */
40
64
  export declare function openRun(run: Run): Promise<void>;
65
+ /**
66
+ * A new conversation, shown at once, in which Ta makes an extension of a task: a page of its own for what
67
+ * its runs find (task-extension.ts). In the directory of the Ta service, where extensions are kept, whatever
68
+ * machine the task works on.
69
+ */
70
+ export declare function makeExtension(task: Task, runs?: readonly Run[]): Promise<void>;
41
71
  export {};
42
72
  //# sourceMappingURL=page.d.ts.map
@@ -8,9 +8,13 @@ exports.message = message;
8
8
  exports.until = until;
9
9
  exports.basename = basename;
10
10
  exports.openRun = openRun;
11
+ exports.makeExtension = makeExtension;
11
12
  const cron_protocol_1 = require("./cron-protocol");
12
13
  const i18n_1 = require("./i18n");
14
+ const task_extension_1 = require("./task-extension");
13
15
  exports.PAGE = `${cron_protocol_1.NAME}/tasks`;
16
+ /** The package that makes extensions, whose settings say on which model. */
17
+ const EXTENSIONS = '@celljs/ta-extensions';
14
18
  function bindPage(api) {
15
19
  exports.pi = api;
16
20
  }
@@ -41,12 +45,21 @@ function basename(path) {
41
45
  .split(/[\\/]/)
42
46
  .pop() || path);
43
47
  }
44
- /** The tasks of the scheduler, read again when the data of the package changes. */
48
+ /**
49
+ * The tasks of the scheduler, read again when the data of the package changes. A change the user makes shows
50
+ * at once, before the Ta service answers (the switch of a task, a run started, a task taken away): a finger
51
+ * waits for no round trip, and one read follows the answer rather than every write.
52
+ */
45
53
  class CronClient {
46
54
  constructor(api) {
47
55
  this.api = api;
48
- this.state = { tasks: [], loaded: false, runs: {}, asks: 0 };
56
+ this.state = { tasks: [], loaded: false, runs: {} };
49
57
  this.listeners = new Set();
58
+ /** The page showing now, which opens its editor of a new task when the head of the page asks it to. */
59
+ this.newAsks = new Set();
60
+ /** The tasks whose change is on its way to the Ta service: what the page shows of them is newer than its list. */
61
+ this.writing = new Set();
62
+ this.again = false;
50
63
  }
51
64
  start() {
52
65
  this.stop = this.api.storage.onChange(keys => {
@@ -66,19 +79,50 @@ class CronClient {
66
79
  var _a;
67
80
  (_a = this.stop) === null || _a === void 0 ? void 0 : _a.call(this);
68
81
  this.listeners.clear();
82
+ this.newAsks.clear();
69
83
  }
70
84
  subscribe(listener) {
71
85
  this.listeners.add(listener);
72
86
  return () => this.listeners.delete(listener);
73
87
  }
88
+ /** A new task asked for at the head of the page: the page showing opens its editor; one opened later does not. */
74
89
  askNew() {
75
- this.set({ asks: this.state.asks + 1 });
90
+ for (const listener of this.newAsks) {
91
+ listener();
92
+ }
93
+ }
94
+ /** Hears the asks for a new task while it listens: the page, from the moment it shows to the moment it goes. */
95
+ onAskNew(listener) {
96
+ this.newAsks.add(listener);
97
+ return () => {
98
+ this.newAsks.delete(listener);
99
+ };
76
100
  }
77
101
  async load() {
102
+ if (this.reading) {
103
+ this.again = true;
104
+ return this.reading;
105
+ }
106
+ this.reading = this.read();
107
+ try {
108
+ await this.reading;
109
+ }
110
+ finally {
111
+ this.reading = undefined;
112
+ if (this.again) {
113
+ this.again = false;
114
+ void this.load();
115
+ }
116
+ }
117
+ }
118
+ async read() {
78
119
  // Read through the storage too, so that its changes are heard.
79
120
  await this.api.storage.get(cron_protocol_1.Keys.TASKS).catch(() => undefined);
80
121
  const tasks = await this.api.callHost('list');
81
- this.set({ tasks, loaded: true });
122
+ // A change on its way is newer than this list: the answer to it is read after it lands.
123
+ if (this.writing.size === 0) {
124
+ this.set({ tasks, loaded: true });
125
+ }
82
126
  }
83
127
  async loadRuns(taskId) {
84
128
  await this.api.storage.get(cron_protocol_1.Keys.runs(taskId)).catch(() => undefined);
@@ -88,6 +132,42 @@ class CronClient {
88
132
  call(method, ...params) {
89
133
  return this.api.callHost(method, ...params);
90
134
  }
135
+ /** On or off, the switch taking it at once. */
136
+ setEnabled(id, enabled) {
137
+ return this.change(id, task => ({ ...task, enabled }), () => this.call('setEnabled', id, enabled));
138
+ }
139
+ /** Runs it now: the row says so at once, as its run starts. */
140
+ runNow(id) {
141
+ return this.change(id, task => ({ ...task, lastStatus: 'running' }), () => this.call('run', id));
142
+ }
143
+ /** Takes it away at once, with its runs; the conversations its runs had stay. */
144
+ remove(id) {
145
+ return this.change(id, () => undefined, async () => {
146
+ await this.call('remove', id);
147
+ const { [id]: _gone, ...runs } = this.state.runs;
148
+ this.set({ runs });
149
+ });
150
+ }
151
+ /**
152
+ * A change shown at once and carried to the Ta service: `patch` gives the task as the page shows it
153
+ * meanwhile, none to take it away. A failure puts back what was there, and the next read is the truth.
154
+ */
155
+ async change(id, patch, send) {
156
+ const before = this.state.tasks;
157
+ this.writing.add(id);
158
+ this.set({ tasks: before.map(task => (task.id === id ? patch(task) : task)).filter((task) => task !== undefined) });
159
+ try {
160
+ await send();
161
+ }
162
+ catch (error) {
163
+ this.set({ tasks: before });
164
+ throw error;
165
+ }
166
+ finally {
167
+ this.writing.delete(id);
168
+ }
169
+ await this.load();
170
+ }
91
171
  set(change) {
92
172
  this.state = { ...this.state, ...change };
93
173
  for (const listener of this.listeners) {
@@ -113,4 +193,39 @@ async function openRun(run) {
113
193
  exports.pi.ui.notify(t('failedAction', { message: message(error) }), 'error');
114
194
  }
115
195
  }
196
+ /**
197
+ * The model set for the conversations that make extensions (in the settings, by @celljs/ta-extensions, whose
198
+ * data holds it), else the default; the default too, the user told, when that one cannot be used now.
199
+ */
200
+ async function openMaking(cwd) {
201
+ const model = await exports.pi.packages.getExtensionData(EXTENSIONS, 'makeModel').catch(() => undefined);
202
+ if (typeof model === 'string' && model) {
203
+ try {
204
+ return (await exports.pi.server.openSession({ cwd, model })).sessionId;
205
+ }
206
+ catch (error) {
207
+ exports.pi.ui.notify(t('modelFailed', { model, message: message(error) }), 'warning');
208
+ }
209
+ }
210
+ return (await exports.pi.server.openSession({ cwd })).sessionId;
211
+ }
212
+ /**
213
+ * A new conversation, shown at once, in which Ta makes an extension of a task: a page of its own for what
214
+ * its runs find (task-extension.ts). In the directory of the Ta service, where extensions are kept, whatever
215
+ * machine the task works on.
216
+ */
217
+ async function makeExtension(task, runs) {
218
+ try {
219
+ const { cwd } = await exports.pi.server.getServerInfo();
220
+ const sessionId = openMaking(cwd);
221
+ await exports.pi.switchSession(sessionId, { title: t('makeExtension'), cwd });
222
+ await exports.pi.server.prompt(await sessionId, {
223
+ clientMessageId: `ta-cron-extension:${task.id}:${Date.now()}`,
224
+ message: task_extension_1.TaskExtension.message(task, runs, exports.pi.ui.language),
225
+ });
226
+ }
227
+ catch (error) {
228
+ exports.pi.ui.notify(t('failedAction', { message: message(error) }), 'error');
229
+ }
230
+ }
116
231
  //# sourceMappingURL=page.js.map
@@ -1,4 +1,4 @@
1
1
  /** The styles of the package; only the --ta-* variables of the page, so they follow its theme. */
2
- export declare const STYLE = "\n.tcr-card { display: flex; flex-direction: column; margin: -4px -6px; }\n.tcr-card-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; }\n.tcr-card-row:hover { background: var(--ta-hover); }\n.tcr-card-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(14px * var(--ta-font-scale)); }\n.tcr-card-when { flex: none; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.tcr-page { box-sizing: border-box; width: 100%; max-width: 860px; margin: 0 auto; padding: 20px 24px 48px; }\n.tcr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 32px; }\n.tcr-stat { color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n/* The head: the title in the middle, the + at the right, a box of the same width on the left to keep it there. */\n.tcr-title-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding-left: 36px; }\n.tcr-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--ta-border); border-radius: 8px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; cursor: pointer; transition: background 120ms, opacity 120ms, transform 120ms var(--ta-ease); }\n.tcr-button:hover:not(:disabled) { background: var(--ta-hover); }\n.tcr-button:active:not(:disabled) { transform: scale(.98); }\n.tcr-button:disabled { opacity: .45; cursor: default; }\n.tcr-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.tcr-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: .88; }\n.tcr-link { align-self: flex-start; border: 0; padding: 0; background: none; color: var(--ta-link); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.tcr-link:hover { text-decoration: underline; }\n.tcr-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--ta-muted); cursor: pointer; }\n.tcr-icon:hover { background: var(--ta-hover); color: var(--ta-text); }\n.tcr-muted { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.tcr-pad { padding: 6px 2px; }\n.tcr-chip { flex: none; padding: 0 7px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11.5px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); white-space: nowrap; }\n.tcr-list { display: flex; flex-direction: column; gap: 8px; }\n.tcr-task { border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-card); transition: border-color 120ms, box-shadow 160ms; animation: tcr-in 200ms var(--ta-ease) both; }\n.tcr-task:hover, .tcr-task.tcr-open { border-color: var(--ta-border); }\n.tcr-task.tcr-menu-open { position: relative; z-index: 5; }\n.tcr-task.tcr-open { box-shadow: var(--ta-shadow-pop); }\n.tcr-disabled .tcr-task-name, .tcr-disabled .tcr-chip { opacity: .55; }\n@keyframes tcr-in { from { opacity: 0; transform: translateY(4px); } }\n.tcr-task-row { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; }\n.tcr-task-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 52px; padding: 0 6px 0 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.tcr-task-name { min-width: 0; overflow: hidden; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.tcr-task-dir { flex: 1; min-width: 0; overflow: hidden; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); text-overflow: ellipsis; white-space: nowrap; }\n.tcr-task-state { flex: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.tcr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-border); }\n.tcr-success { background: var(--ta-green); }\n.tcr-error, .tcr-missed { background: var(--ta-red); }\n.tcr-running { background: var(--ta-blue); animation: tcr-pulse 1.2s ease-in-out infinite; }\n.tcr-off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ta-border); }\n.tcr-pulse { animation: tcr-fade 1.6s ease-in-out infinite; }\n@keyframes tcr-pulse { 50% { transform: scale(1.5); opacity: .5; } }\n@keyframes tcr-fade { 50% { opacity: .45; } }\n.tcr-switch { position: relative; flex: none; width: 30px; height: 18px; cursor: pointer; }\n.tcr-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }\n.tcr-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ta-border); transition: background 160ms; pointer-events: none; }\n.tcr-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 180ms var(--ta-ease); }\n.tcr-switch input:checked + span { background: var(--ta-green); }\n.tcr-switch input:checked + span::after { transform: translateX(12px); }\n.tcr-switch input:focus-visible + span { outline: 2px solid var(--ta-border-focus); outline-offset: 2px; }\n.tcr-more { position: relative; }\n.tcr-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; min-width: 150px; padding: 4px; border: 1px solid var(--ta-border-muted); border-radius: 10px; background: var(--ta-raised); box-shadow: var(--ta-shadow-pop); animation: tcr-in 120ms var(--ta-ease); }\n.tcr-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.tcr-menu-item:hover { background: var(--ta-hover); }\n.tcr-danger { color: var(--ta-red); }\n.tcr-detail { padding: 2px 16px 14px 34px; animation: tcr-in 160ms var(--ta-ease); }\n.tcr-prompt-text { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; max-height: 160px; overflow: auto; }\n.tcr-label { margin: 0 0 6px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; }\n.tcr-run { border-radius: 8px; }\n.tcr-run.tcr-open { background: var(--ta-hover); }\n.tcr-run-head { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.tcr-run-head:hover { background: var(--ta-hover); }\n.tcr-run-time { flex: none; font-variant-numeric: tabular-nums; }\n.tcr-run-status { flex: none; color: var(--ta-secondary); }\n.tcr-run-line { flex: 1; min-width: 0; overflow: hidden; color: var(--ta-muted); text-overflow: ellipsis; white-space: nowrap; }\n.tcr-run-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 10px 12px 26px; font-size: calc(13.5px * var(--ta-font-scale)); }\n.tcr-run-body > :first-child { align-self: stretch; }\n.tcr-run-error { color: var(--ta-red); white-space: pre-wrap; }\n.tcr-empty { display: flex; flex-direction: column; align-items: center; padding: 48px 0 24px; text-align: center; }\n.tcr-empty-title { margin-top: 14px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; }\n.tcr-empty-hint { margin-top: 6px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.tcr-clock { width: 112px; height: 112px; }\n.tcr-clock-face { fill: var(--ta-card); stroke: var(--ta-border); stroke-width: 2; }\n.tcr-clock-tick { stroke: var(--ta-muted); stroke-width: 2; stroke-linecap: round; }\n.tcr-clock-hour { stroke: var(--ta-text); stroke-width: 4; stroke-linecap: round; transform-origin: 60px 60px; transform: rotate(-60deg); }\n.tcr-clock-hand { stroke: var(--ta-green); stroke-width: 2.5; stroke-linecap: round; transform-origin: 60px 60px; animation: tcr-spin 6s steps(60) infinite; }\n.tcr-clock-pin { fill: var(--ta-green); }\n@keyframes tcr-spin { to { transform: rotate(360deg); } }\n.tcr-examples { width: 100%; max-width: 560px; margin-top: 26px; }\n@media (max-width: 640px) { .tcr-task-dir { display: none; } .tcr-page { padding: 16px 12px 40px; } }\n.tcr-form { box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; width: 100%; min-height: 0; overflow-y: auto; padding: 4px 2px 2px; }\n.tcr-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.tcr-field .tcr-label { margin: 0; }\n.tcr-input { box-sizing: border-box; width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); color: var(--ta-text); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); outline: none; transition: border-color 120ms; }\n.tcr-input:focus { border-color: var(--ta-border-focus); }\n.tcr-prompt { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }\n.tcr-mono { font-family: var(--ta-mono); }\n.tcr-amount { width: 90px; flex: none; }\n.tcr-row { display: flex; gap: 8px; }\n.tcr-segments { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--ta-chip); align-self: flex-start; max-width: 100%; overflow-x: auto; }\n.tcr-segment { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); white-space: nowrap; cursor: pointer; transition: background 140ms, color 140ms; }\n.tcr-segment[aria-pressed='true'] { background: var(--ta-raised); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }\n.tcr-preview { color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); }\n.tcr-preview.tcr-bad { color: var(--ta-red); }\n.tcr-folder { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }\n.tcr-folder-path { flex: 1; min-width: 0; overflow: hidden; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: right; }\n.tcr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }\n.tcr-wide { grid-column: 1 / -1; }\n.tcr-actions { display: flex; justify-content: flex-end; gap: 8px; }\n.tcr-reply { margin: 4px 0; padding: 10px 12px; border: 1px solid var(--ta-border-muted); border-radius: 10px; background: var(--ta-card); font-size: calc(13px * var(--ta-font-scale)); }\n.tcr-reply-head { display: flex; align-items: center; gap: 8px; color: var(--ta-secondary); }\n.tcr-reply-head svg { color: var(--ta-green); }\n.tcr-reply-head .tcr-link { margin-left: auto; }\n.tcr-reply-task { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }\n.tcr-reply .tcr-prompt-text { margin: 8px 0 0; }\n.tcr-reply-error { color: var(--ta-red); }\n.tcr-help { margin: 8px 0 0; font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.6; white-space: pre-wrap; color: var(--ta-secondary); }\n@media (prefers-reduced-motion: reduce) { .tcr-clock-hand, .tcr-running, .tcr-pulse { animation: none; } }\n";
2
+ export declare const STYLE = "\n/* The card of the board: the tasks to run next */\n.tcr-card { display: flex; flex-direction: column; margin: -4px -6px; }\n.tcr-card-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; }\n.tcr-card-row:hover { background: var(--ta-hover); }\n.tcr-card-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(14px * var(--ta-font-scale)); }\n.tcr-card-when { flex: none; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n\n/* The page: it scrolls in its own box, which takes what the main area has left under its head. */\n.tcr-scroll { flex: 1; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }\n.tcr-page { box-sizing: border-box; width: 100%; max-width: 860px; margin: 0 auto; padding: 20px 24px 64px; }\n.tcr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 28px; }\n.tcr-stat { color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n/* The head: the title in the middle, the + at the right, a box of the same width on the left to keep it there. */\n.tcr-title-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding-left: 36px; }\n\n/* Buttons and what is written quietly */\n.tcr-button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--ta-border); border-radius: 8px; background: var(--ta-card); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background 120ms, border-color 120ms, opacity 120ms, transform 120ms var(--ta-ease); }\n.tcr-button:hover:not(:disabled) { background: var(--ta-hover); }\n.tcr-button:active:not(:disabled) { transform: scale(.97); }\n.tcr-button:disabled { opacity: .45; cursor: default; }\n.tcr-button > svg { flex: none; color: var(--ta-secondary); }\n.tcr-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.tcr-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: .88; }\n/* What hands the task to Ta to make more of: green, as what Ta makes. */\n.tcr-accent { border-color: color-mix(in srgb, var(--ta-green) 45%, var(--ta-border)); background: color-mix(in srgb, var(--ta-green) 9%, var(--ta-card)); }\n.tcr-accent > svg { color: var(--ta-green); }\n.tcr-accent:hover:not(:disabled) { background: color-mix(in srgb, var(--ta-green) 16%, var(--ta-card)); }\n.tcr-link { align-self: flex-start; border: 0; padding: 0; background: none; color: var(--ta-link); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.tcr-link:hover { text-decoration: underline; }\n.tcr-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--ta-muted); cursor: pointer; transition: background 120ms, color 120ms; }\n.tcr-icon:hover { background: var(--ta-hover); color: var(--ta-text); }\n.tcr-muted { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.tcr-pad { padding: 6px 2px; }\n.tcr-chip { flex: none; padding: 0 7px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11.5px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); white-space: nowrap; }\n.tcr-count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); }\n.tcr-chevron { display: inline-flex; flex: none; color: var(--ta-muted); transition: transform 180ms var(--ta-ease); }\n\n/* The tasks */\n.tcr-list { display: flex; flex-direction: column; gap: 10px; }\n.tcr-task { border: 1px solid var(--ta-border-muted); border-radius: 14px; background: var(--ta-card); transition: border-color 140ms, box-shadow 180ms; animation: tcr-in 160ms var(--ta-ease) both; }\n.tcr-task:hover, .tcr-task.tcr-open { border-color: var(--ta-border); }\n.tcr-task.tcr-open { box-shadow: var(--ta-shadow-pop); }\n.tcr-disabled .tcr-task-name, .tcr-disabled .tcr-task-meta, .tcr-disabled .tcr-task-state, .tcr-disabled .tcr-mark { opacity: .55; }\n.tcr-task-row { display: flex; align-items: center; gap: 6px; padding-right: 10px; }\n/* What opens the task: the mark of its state, its name over its rule, directory and last run, then its next run. */\n.tcr-task-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 64px; padding: 10px 6px 10px 14px; border: 0; border-radius: 14px 0 0 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none; }\n.tcr-task-main:focus-visible { box-shadow: inset 0 0 0 2px var(--ta-border-focus); }\n/* A tile of the color of the task's state, its last run a dot at its corner. */\n.tcr-mark { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ta-chip); color: var(--ta-secondary); }\n.tcr-mark .tcr-dot { position: absolute; right: -2px; bottom: -2px; box-shadow: 0 0 0 2.5px var(--ta-card); }\n.tcr-tone-success { background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); }\n.tcr-tone-error, .tcr-tone-missed { background: color-mix(in srgb, var(--ta-red) 13%, transparent); color: var(--ta-red); }\n.tcr-tone-running { background: color-mix(in srgb, var(--ta-blue) 15%, transparent); color: var(--ta-blue); }\n.tcr-task-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }\n.tcr-task-meta { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.tcr-task-name { min-width: 0; overflow: hidden; font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.tcr-task-dir { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tcr-task-last { flex: none; white-space: nowrap; }\n.tcr-task-next { display: none; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.tcr-task-last::before { content: '\u00B7'; margin-right: 8px; }\n.tcr-task-state { flex: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.tcr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-border); }\n.tcr-success { background: var(--ta-green); }\n.tcr-error, .tcr-missed { background: var(--ta-red); }\n.tcr-running { background: var(--ta-blue); animation: tcr-pulse 1.2s ease-in-out infinite; }\n.tcr-off { background: var(--ta-card); box-shadow: inset 0 0 0 1.5px var(--ta-border); }\n.tcr-pulse { animation: tcr-fade 1.6s ease-in-out infinite; }\n@keyframes tcr-in { from { opacity: 0; transform: translateY(3px); } }\n@keyframes tcr-pulse { 50% { transform: scale(1.4); opacity: .55; } }\n@keyframes tcr-fade { 50% { opacity: .45; } }\n\n/* The switch of a task: as the switches of the page */\n.tcr-switch { position: relative; flex: none; width: 36px; height: 20px; cursor: pointer; }\n.tcr-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }\n.tcr-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ta-hover-strong, var(--ta-border)); transition: background 160ms; pointer-events: none; }\n.tcr-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 180ms var(--ta-ease); }\n.tcr-switch input:checked + span { background: var(--ta-green); }\n.tcr-switch input:checked + span::after { transform: translateX(16px); }\n.tcr-switch input:focus-visible + span { outline: 2px solid var(--ta-border-focus); outline-offset: 2px; }\n\n/* What a task holds, opened: what can be done with it, its prompt and its runs */\n.tcr-detail { display: flex; flex-direction: column; margin: 0 16px; padding: 14px 0 16px; border-top: 1px solid var(--ta-border-muted); animation: tcr-in 160ms var(--ta-ease); }\n.tcr-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }\n.tcr-stats { margin-left: auto; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.tcr-label { display: flex; align-items: center; margin: 0 0 8px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; }\n.tcr-prompt-block { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }\n.tcr-prompt-text { padding: 10px 12px; border-radius: 10px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }\n/* A long prompt: four lines (of 13px at 1.6), fading into the box, until the user shows the rest. */\n.tcr-clamped { max-height: calc(83px * var(--ta-font-scale)); overflow: hidden; }\n.tcr-fade { -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }\n/* The runs: a line of time down their dots, the newest at the top. */\n.tcr-runs { position: relative; display: flex; flex-direction: column; gap: 2px; }\n.tcr-run { position: relative; border-radius: 10px; transition: background 140ms; }\n.tcr-run::before { content: ''; position: absolute; left: 13px; top: 22px; bottom: -6px; width: 1.5px; background: var(--ta-border-muted); }\n.tcr-run.tcr-last::before { display: none; }\n.tcr-run.tcr-open { background: var(--ta-hover); }\n.tcr-run-head { position: relative; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: left; cursor: pointer; outline: none; }\n.tcr-run-head:hover { background: var(--ta-hover); }\n.tcr-run-head:focus-visible { box-shadow: inset 0 0 0 2px var(--ta-border-focus); }\n.tcr-run-head .tcr-dot { position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--ta-card); }\n.tcr-run.tcr-open .tcr-run-head .tcr-dot, .tcr-run-head:hover .tcr-dot { box-shadow: none; }\n.tcr-run-time { flex: none; font-variant-numeric: tabular-nums; }\n.tcr-run-status { flex: none; color: var(--ta-secondary); }\n.tcr-is-error, .tcr-is-missed { color: var(--ta-red); }\n.tcr-run-line { flex: 1; min-width: 0; overflow: hidden; color: var(--ta-muted); text-overflow: ellipsis; white-space: nowrap; }\n.tcr-open > .tcr-run-head .tcr-chevron { transform: rotate(90deg); }\n.tcr-run-head:not(:hover) .tcr-chevron { opacity: .6; }\n.tcr-run-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 14px 14px 30px; font-size: calc(13.5px * var(--ta-font-scale)); animation: tcr-in 140ms var(--ta-ease); }\n.tcr-run-body > :first-child { align-self: stretch; min-width: 0; overflow-wrap: anywhere; }\n.tcr-run-error { color: var(--ta-red); white-space: pre-wrap; }\n\n/* The page without tasks */\n.tcr-empty { display: flex; flex-direction: column; align-items: center; padding: 48px 0 24px; text-align: center; }\n.tcr-empty-title { margin-top: 14px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; }\n.tcr-empty-hint { margin-top: 6px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.tcr-clock { width: 112px; height: 112px; }\n.tcr-clock-face { fill: var(--ta-card); stroke: var(--ta-border); stroke-width: 2; }\n.tcr-clock-tick { stroke: var(--ta-muted); stroke-width: 2; stroke-linecap: round; }\n.tcr-clock-hour { stroke: var(--ta-text); stroke-width: 4; stroke-linecap: round; transform-origin: 60px 60px; transform: rotate(-60deg); }\n.tcr-clock-hand { stroke: var(--ta-green); stroke-width: 2.5; stroke-linecap: round; transform-origin: 60px 60px; animation: tcr-spin 6s steps(60) infinite; }\n.tcr-clock-pin { fill: var(--ta-green); }\n@keyframes tcr-spin { to { transform: rotate(360deg); } }\n.tcr-examples { width: 100%; max-width: 560px; margin-top: 26px; }\n\n/*\n * The dialog of a task: wider than the page's dialogs, for the row of rules; its fields scroll under the\n * title while its buttons stay at its foot.\n */\n.ta-web-dialog:has(> .tcr-form) { width: min(560px, 100%); max-height: min(84vh, 780px); padding-bottom: 0; }\n.tcr-form { box-sizing: border-box; display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0 -18px; }\n.tcr-form-body { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; }\n.tcr-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.tcr-field .tcr-label { margin: 0; }\n.tcr-input { box-sizing: border-box; width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); color: var(--ta-text); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); outline: none; transition: border-color 120ms, box-shadow 120ms; }\n.tcr-input:focus { border-color: var(--ta-border-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ta-border-focus) 18%, transparent); }\n.tcr-prompt { height: auto; min-height: 104px; padding: 9px 11px; line-height: 1.55; resize: vertical; }\n.tcr-mono { font-family: var(--ta-mono); }\n.tcr-amount { width: 90px; flex: none; }\n.tcr-row { display: flex; gap: 8px; }\n.tcr-segments { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-chip); align-self: stretch; max-width: 100%; overflow-x: auto; scrollbar-width: none; }\n.tcr-segment { flex: 1 0 auto; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font: inherit; font-size: calc(13px * var(--ta-font-scale)); white-space: nowrap; cursor: pointer; transition: background 140ms, color 140ms, box-shadow 140ms; }\n.tcr-segment:hover:not([aria-pressed='true']) { color: var(--ta-text); }\n.tcr-segment[aria-pressed='true'] { background: var(--ta-raised); color: var(--ta-text); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 0 0 .5px var(--ta-border-muted); }\n.tcr-preview { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ta-green) 11%, transparent); color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.tcr-preview.tcr-bad { background: color-mix(in srgb, var(--ta-red) 11%, transparent); color: var(--ta-red); }\n.tcr-folder { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }\n.tcr-folder:hover { border-color: var(--ta-border); background: var(--ta-hover); }\n.tcr-folder > svg { flex: none; color: var(--ta-muted); }\n.tcr-folder-name { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tcr-folder-path { flex: 1; min-width: 0; overflow: hidden; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: right; }\n.tcr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }\n.tcr-wide { grid-column: 1 / -1; }\n.tcr-options { display: flex; flex-direction: column; gap: 12px; }\n.tcr-more-toggle { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-left: -4px; padding: 2px 6px 2px 4px; border: 0; border-radius: 6px; background: none; color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.tcr-more-toggle:hover { background: var(--ta-hover); color: var(--ta-text); }\n.tcr-more-toggle .tcr-chevron { transform: rotate(-90deg); }\n.tcr-options.tcr-open .tcr-more-toggle .tcr-chevron { transform: none; }\n.tcr-options .tcr-grid { animation: tcr-in 140ms var(--ta-ease); }\n.tcr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--ta-border-muted); }\n.tcr-actions .tcr-button { height: 32px; padding: 0 14px; font-size: calc(13px * var(--ta-font-scale)); }\n.tcr-shortcut { margin-right: auto; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n\n/* A task in a conversation, as a command or the tool answers */\n.tcr-reply { margin: 4px 0; padding: 10px 12px; border: 1px solid var(--ta-border-muted); border-radius: 10px; background: var(--ta-card); font-size: calc(13px * var(--ta-font-scale)); }\n.tcr-reply-head { display: flex; align-items: center; gap: 8px; color: var(--ta-secondary); }\n.tcr-reply-head svg { color: var(--ta-green); }\n.tcr-reply-head .tcr-link { margin-left: auto; }\n.tcr-reply-task { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }\n.tcr-reply .tcr-prompt-text { margin: 8px 0 0; max-height: 160px; overflow: auto; }\n.tcr-reply-error { color: var(--ta-red); }\n.tcr-help { margin: 8px 0 0; font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.6; white-space: pre-wrap; color: var(--ta-secondary); }\n\n/*\n * A phone (device/device-protocol.ts: data-layout): the name of a task over its rule and its next run,\n * so that the name is not cut to nothing by the rest; everything a finger taps is a finger's size.\n */\n[data-layout='compact'] .tcr-page { padding: 12px 10px 48px; }\n[data-layout='compact'] .tcr-head { margin-bottom: 8px; min-height: 24px; }\n[data-layout='compact'] .tcr-list { gap: 8px; }\n[data-layout='compact'] .tcr-task-row { gap: 2px; padding-right: 6px; }\n[data-layout='compact'] .tcr-task-main { gap: 10px; min-height: 68px; padding: 12px 2px 12px 12px; }\n[data-layout='compact'] .tcr-mark { width: 34px; height: 34px; }\n[data-layout='compact'] .tcr-task-name { font-size: calc(15px * var(--ta-font-scale)); }\n[data-layout='compact'] .tcr-task-dir, [data-layout='compact'] .tcr-task-last { display: none; }\n[data-layout='compact'] .tcr-task-state { display: none; }\n[data-layout='compact'] .tcr-task-next { display: inline; }\n[data-layout='compact'] .tcr-chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n[data-layout='compact'] .tcr-detail { margin: 0 12px; padding: 12px 0 14px; }\n[data-layout='compact'] .tcr-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 14px; padding: 0 12px; }\n[data-layout='compact'] .tcr-stats { display: none; }\n[data-layout='compact'] .tcr-run-head { flex-wrap: wrap; row-gap: 2px; padding: 8px; }\n/* What a run answered goes under its time rather than past it, where a phone has no room. */\n[data-layout='compact'] .tcr-run-line { box-sizing: border-box; flex: 1 1 100%; order: 9; padding-left: 18px; }\n[data-layout='compact'] .tcr-run::before { left: 11px; }\n[data-layout='compact'] .tcr-run-body { padding: 2px 10px 12px 14px; }\n[data-layout='compact'] .tcr-empty { padding: 32px 0 16px; }\n[data-layout='compact'] .tcr-clock { width: 92px; height: 92px; }\n[data-layout='compact'] .tcr-examples { margin-top: 20px; }\n[data-layout='compact'] .tcr-grid { grid-template-columns: 1fr; }\n[data-layout='compact'] .tcr-form-body { gap: 16px; }\n[data-layout='compact'] .ta-web-dialog:has(> .tcr-form) { max-height: min(92dvh, calc(100% - 8px - env(safe-area-inset-top))); }\n[data-layout='compact'] .tcr-actions { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }\n[data-layout='compact'] .tcr-actions .tcr-button { flex: 1; justify-content: center; }\n\n/* A finger: a target of its own size around what is drawn (44px), and the press showing at once. */\n[data-touch] .tcr-icon { width: 36px; height: 36px; border-radius: 10px; }\n[data-touch] .tcr-icon::after { content: ''; position: absolute; inset: -4px; }\n[data-touch] .tcr-icon:hover { background: none; }\n[data-touch] .tcr-icon:active { background: var(--ta-hover); color: var(--ta-text); }\n[data-touch] .tcr-switch::after { content: ''; position: absolute; inset: -12px -6px; }\n[data-touch] .tcr-task-main:active { background: var(--ta-hover); }\n[data-touch] .tcr-run-head { min-height: 44px; }\n[data-touch] .tcr-run-head:hover { background: none; }\n[data-touch] .tcr-run-head:active { background: var(--ta-hover); }\n[data-touch] .tcr-button { height: 36px; padding: 0 14px; }\n[data-touch] .tcr-segment { height: 32px; }\n[data-touch] .tcr-more-toggle { padding: 8px 6px 8px 4px; font-size: max(15px, calc(13.5px * var(--ta-font-scale))); }\n/* A link of the dialog, which a finger taps too: a line of its own height. */\n[data-touch] .tcr-link { padding: 8px 0; font-size: max(16px, calc(13.5px * var(--ta-font-scale))); }\n/* Under 16px iOS zooms into the field it focuses, which loses the dialog around it: never smaller. */\n[data-touch] .tcr-input { font-size: max(16px, calc(13.5px * var(--ta-font-scale))); }\n[data-touch] .tcr-folder { height: auto; min-height: 40px; padding: 6px 10px; }\n[data-touch] .tcr-folder-path { font-size: max(16px, calc(12px * var(--ta-font-scale))); }\n\n@media (prefers-reduced-motion: reduce) {\n .tcr-task, .tcr-detail, .tcr-run-body, .tcr-clock-hand, .tcr-running, .tcr-pulse, .tcr-options .tcr-grid { animation: none; }\n .tcr-chevron { transition: none; }\n}\n";
3
3
  export declare function injectStyle(): () => void;
4
4
  //# sourceMappingURL=style.d.ts.map