@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.
- package/dist/cli.mjs +69 -15
- package/dist/gateway.mjs +170 -28
- package/dist/pi/CHANGELOG.md +11 -0
- package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
- package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
- package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
- package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
- package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
- package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
- package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
- package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
- package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
- package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
- package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
- package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
- package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
- package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
- package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
- package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
- package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
- package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
- package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
- package/dist/pi/dist/bundle/cli-runtime.js +1 -1
- package/dist/pi/dist/bundle/index.js +1 -1
- package/dist/pi/dist/bundle/rpc-entry.js +1 -1
- package/dist/pi/docs/cli.md +14 -1
- package/dist/pi/docs/extensions.md +27 -7
- package/dist/pi/docs/keybindings.md +1 -1
- package/dist/pi/docs/llama-cpp.md +5 -8
- package/dist/pi/docs/models-configuration.md +6 -1
- package/dist/pi/docs/models.md +2 -1
- package/dist/pi/docs/prompt-templates.md +1 -1
- package/dist/pi/docs/providers.md +1 -1
- package/dist/pi/docs/rpc.md +4 -2
- package/dist/pi/docs/sessions.md +7 -1
- package/dist/pi/docs/settings.md +1 -1
- package/dist/pi/docs/tui.md +1 -1
- package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
- package/dist/pi/examples/extensions/gondolin/package.json +1 -1
- package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
- package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
- package/dist/pi/examples/extensions/subagent/README.md +14 -11
- package/dist/pi/examples/extensions/subagent/index.ts +392 -171
- package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
- package/dist/pi/examples/extensions/with-deps/package.json +1 -1
- package/dist/pi/examples/tsconfig.json +63 -35
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/README.en.md +2 -2
- package/dist/pi/packages/ta-agents/README.md +2 -2
- package/dist/pi/packages/ta-agents/extension/index.mjs +69 -13
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +19 -4
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +43 -9
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +3 -0
- package/dist/pi/packages/ta-agents/lib/extension.d.ts +2 -1
- package/dist/pi/packages/ta-agents/lib/extension.js +26 -4
- package/dist/pi/packages/ta-agents/lib/json-rpc.js +7 -1
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
- package/dist/pi/packages/ta-agents/package.json +3 -3
- package/dist/pi/packages/ta-bots/extension/index.mjs +46 -0
- package/dist/pi/packages/ta-bots/host/index.mjs +46 -0
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-channels/README.en.md +2 -2
- package/dist/pi/packages/ta-channels/README.md +2 -2
- package/dist/pi/packages/ta-channels/host/index.mjs +50 -0
- package/dist/pi/packages/ta-channels/lib/create.js +11 -3
- package/dist/pi/packages/ta-channels/lib/faces.js +1 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +6 -9
- package/dist/pi/packages/ta-channels/lib/i18n.js +12 -18
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
- package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
- package/dist/pi/packages/ta-channels/lib/room.js +13 -8
- package/dist/pi/packages/ta-channels/lib/sidebar.js +241 -79
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +83 -37
- package/dist/pi/packages/ta-channels/lib/tasks.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/tasks.js +22 -12
- package/dist/pi/packages/ta-channels/lib/views.d.ts +49 -1
- package/dist/pi/packages/ta-channels/lib/views.js +100 -1
- package/dist/pi/packages/ta-channels/package.json +1 -1
- package/dist/pi/packages/ta-channels/web/index.js +482 -259
- package/dist/pi/packages/ta-computer-use/package.json +2 -2
- package/dist/pi/packages/ta-cron/README.en.md +2 -2
- package/dist/pi/packages/ta-cron/README.md +2 -2
- package/dist/pi/packages/ta-cron/host/index.mjs +6 -0
- package/dist/pi/packages/ta-cron/lib/editor.js +60 -27
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +12 -1
- package/dist/pi/packages/ta-cron/lib/i18n.js +24 -2
- package/dist/pi/packages/ta-cron/lib/page.d.ts +33 -3
- package/dist/pi/packages/ta-cron/lib/page.js +119 -4
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +166 -46
- package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +11 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +102 -66
- package/dist/pi/packages/ta-cron/package.json +1 -1
- package/dist/pi/packages/ta-cron/web/index.js +928 -404
- package/dist/pi/packages/ta-extensions/README.en.md +3 -1
- package/dist/pi/packages/ta-extensions/README.md +3 -1
- package/dist/pi/packages/ta-extensions/lib/actions.js +3 -1
- package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
- package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
- package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
- package/dist/pi/packages/ta-extensions/lib/page.js +42 -18
- package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +10 -4
- package/dist/pi/packages/ta-extensions/package.json +1 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +7 -3
- package/dist/pi/packages/ta-extensions/web/index.js +269 -26
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-workspace/README.md +1 -1
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
- package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
- package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
- package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
- package/dist/pi/packages/ta-workspace/lib/editors.js +12 -3
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +1 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.js +2 -4
- package/dist/pi/packages/ta-workspace/lib/index.js +17 -1
- package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +13 -3
- package/dist/pi/packages/ta-workspace/lib/preview.js +17 -14
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +20 -7
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +51 -0
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +226 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +0 -39
- package/dist/pi/packages/ta-workspace/lib/terminal.js +28 -240
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +19 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +32 -1
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +238 -68
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-C1tb6dM5.js → abnfDiagram-S7VZAUFO-BmIko5tV.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-DN1Va8BF.js → architecture-WOLXFQ4H-XgsdQ7ul.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-BmK2SYtQ.js → architectureDiagram-YGSQEFNW--sVhMS03.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-DvLrLzTm.js → blockDiagram-APKKGZFW-8f9b-9k2.js} +1 -1
- package/dist/public/assets/browser-DOHZ0JCf.js +12 -0
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CrQlWwrG.js → c4Diagram-KJ2TOQU5-CwYQ0Jfy.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-CHKMsuY_.js → chunk-6MUBBAK2-7Y9ezehi.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CWJ7Np6s.js → chunk-AXFCVDMN-CZIH4pWz.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-3v5XbQGM.js → chunk-BG4553SI-DsNATY2m.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-2CC-yiCz.js → chunk-DQASFODM-CoXkfYE-.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-D2hzQPAy.js → chunk-HFQBQIA3-C5OLqki8.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-SifAZs2r.js → chunk-KQLB2F66-DMHuYGEF.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BP0C0VCC.js → chunk-KS47KZWR-BKeOttO1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-B1f5vw5b.js → chunk-LEVMRMFU-D6zCwkk7.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B2MCJt7Y.js → chunk-M57EVK23-B5-QqcZg.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-cDpZJMk4.js → chunk-OY52VR5R-DQrq3n0T.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BE0we2xc.js → chunk-QB3YPZ4I-j6ZT7EDR.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D9wOfqqH.js → chunk-R3KSYZAL-D5MXUO36.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-BIaVsc0K.js → chunk-STOXU5M4-DaBkw4dD.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-BZc0OZEM.js → chunk-TU62E6Q5-vXcRfGci.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Bngfwwzm.js → chunk-X4PVCEUW-CIh6H4Y2.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C5FQ6XHK.js → chunk-XXDRQBXY-C_Vwv1FM.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-_om54nmt.js → classDiagram-v2-L25IHNXF-DccDWEJn.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-Dwpeee_6.js → cose-bilkent-JH36ORCC-BX47lumZ.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-DP5_y9Dq.js → cynefinDiagram-L36ESFBY-BE6WOGxW.js} +1 -1
- package/dist/public/assets/{d3-selection-DFiMlEmn.js → d3-selection-ZcE6yRN5.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-DYwsk6gk.js → dagre-SPEB5RXH-CE6SOOcN.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-Dq_nT3AZ.js → diagram-3B7GL73J-xC8VtiYL.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-ChURW6y9.js → diagram-DNEMPZML-4dmcBbjL.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-CgVp4Rto.js → diagram-L3MUGCDN-D14Yn3sQ.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-vrqLMDby.js → diagram-LA4NIPWU-GxSXIhsK.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-lvfOr5ij.js → diagram-MHCOC4E2-Cm7Prlpc.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-oQ18TeVp.js → diagram-XPFHEONP-mkUnnKFu.js} +1 -1
- package/dist/public/assets/{dist-BOxxmveI.js → dist-acJS-BlA.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-C7_tlZCS.js → ebnfDiagram-UZSYDL2S-m77ua3UQ.js} +1 -1
- package/dist/public/assets/{editor.api-CoZ8MEuz.js → editor.api-CljTm-EQ.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-Dkt5-ikg.js → elk-XV6XMXQE-DsQY1hw9.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-27kh3zlx.js → erDiagram-EYBAPDEH-CV8gJM0P.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-CxVEejjN.js → eventmodeling-K75KTNOO-C1pymbUr.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +1 -0
- package/dist/public/assets/{freemarker2-D6CwPIXh.js → freemarker2-DYJXaMHN.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-C-amlwpX.js → ganttDiagram-23REXITY-CppxOWRh.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DKhzI0Xz.js → gitGraphDiagram-STJD7YCW-CrQrZhcP.js} +1 -1
- package/dist/public/assets/{handlebars-mxNr68Gm.js → handlebars-DZCnH9e2.js} +1 -1
- package/dist/public/assets/{html-Bze6s9R9.js → html-DuzouNES.js} +1 -1
- package/dist/public/assets/{index-BhQUc9PU.js → index-B7OYKvCE.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-WHuWjEDO.js → infoDiagram-KBXO4MBG-6pby19tQ.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DFHUwD0J.js → ishikawaDiagram-M35NCXHK-Duf8c8rQ.js} +1 -1
- package/dist/public/assets/{javascript-4NMPu7y1.js → javascript-2d_L6cVd.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-C7gV6zEr.js → journeyDiagram-OPLOXDXO-Dvv-xzNo.js} +1 -1
- package/dist/public/assets/{jsonMode-B1JEHPMp.js → jsonMode-CFadYXyI.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-DlRu_d2Q.js → kanban-definition-BZKZHSQY-Dsk6F-TT.js} +1 -1
- package/dist/public/assets/{liquid-B7sIf4NX.js → liquid-Din4CF34.js} +1 -1
- package/dist/public/assets/{mdx-CAN0qez6.js → mdx-DivDuCWI.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BGmotBhf.js → mermaid-parser.core-BfCv4CYZ.js} +3 -3
- package/dist/public/assets/{mermaid.core-Cl6SS3cM.js → mermaid.core-DC20ZwJj.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DiQ8Feqr.js → mindmap-definition-I2QAS2VK-DRZRrJU_.js} +1 -1
- package/dist/public/assets/module-BAQaY56j.js +1 -0
- package/dist/public/assets/module-DxRGg3ED.js +1947 -0
- package/dist/public/assets/{monaco-CwCjTWAO.js → monaco-D1d6MOPe.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-XhCpv6BX.js → pegDiagram-FD4XPPHP-DcGr3Tbk.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DUVzuXUd.js → pieDiagram-J4AKIIQI-GF7pu6ch.js} +1 -1
- package/dist/public/assets/{python-DsoF66Sp.js → python-BQbTTTT5.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-Ddobf0z0.js → quadrantDiagram-XTYBLID2-D-bcu7Ey.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-DkrNo-Gf.js → railroad-abnf-LNEFI6M7-BiBHsI-K.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DaB7gY8P.js → railroad-ebnf-DWYD2UWJ-zKjrfkHs.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-D_QG87QV.js → railroad-peg-JR7BVNR7-DKuVn0GT.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-x-nUoBjv.js → railroadDiagram-MRQ6NCDL-Cyn-16mJ.js} +1 -1
- package/dist/public/assets/{razor-DSrcJyQe.js → razor-DiLk54O0.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-kNNcbsty.js → requirementDiagram-Y7LWUY3S-CwU2EBkW.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ClC12Odk.js → sankeyDiagram-WGJFYUXA-ajf00HyW.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DDQITP2g.js → sequenceDiagram-5NDRBG5M-DiX_OIAw.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-N1t_36oh.js → stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-DSt9fFYE.js → swimlanes-UMQ2AFYF-BGQKSlj7.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-CfymOw_s.js → timeline-definition-SEUHKTQE-DhQoApff.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +1 -0
- package/dist/public/assets/{typescript-J7rF-zX8.js → typescript-COQ1g-up.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CK_mRc2_.js → usecaseDiagram-AFA6YXN4-CmLFzjie.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DW8xR6IJ.js → vennDiagram-NNMJR3RB-DOa6JR5K.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-Css55Zq5.js → wardleyDiagram-S7YFUSEH-BV7EEShp.js} +1 -1
- package/dist/public/assets/{xml-CJeviG_a.js → xml-BbvtjuaG.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BnhK9cFS.js → xychartDiagram-GGNKY7IX-DtMpPbsq.js} +1 -1
- package/dist/public/assets/{yaml-Gw3uo6rF.js → yaml-Bw8NFga9.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/launch.svg +46 -42
- package/dist/serve/index.mjs +1367 -560
- package/package.json +25 -25
- package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
- package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
- package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
- package/dist/public/assets/browser-DAv3ly6M.js +0 -12
- package/dist/public/assets/cynefin-EF2NZ3EQ-CW_93VVD.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-BRowRdve.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BGmojXlx.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CRRVgGj2.js +0 -1
- package/dist/public/assets/module-1nDbf1AK.js +0 -1761
- package/dist/public/assets/module-BkKfSTDV.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-DUlqTCWQ.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-2RgP4ScO.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Dap8k-yH.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-Ds10NBze.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BHAN4SQO.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-f1hLUBjI.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-_NPRpuUC.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-CLBqtefx.js +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A tool of the workbench a key opens from anywhere, as in VS Code. */
|
|
2
|
+
export type WorkspaceTool = 'explorer' | 'search' | 'scm' | 'terminal';
|
|
3
|
+
export interface ToolKey {
|
|
4
|
+
key: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
metaKey: boolean;
|
|
7
|
+
ctrlKey: boolean;
|
|
8
|
+
shiftKey: boolean;
|
|
9
|
+
altKey: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace WorkspaceKeys {
|
|
12
|
+
/**
|
|
13
|
+
* The tool of a key: Cmd/Ctrl+Shift+E the explorer, +F the search, +G source control; Ctrl+` a terminal
|
|
14
|
+
* (Ctrl on a Mac too). None for any other.
|
|
15
|
+
*/
|
|
16
|
+
function tool(event: ToolKey, mac: boolean): WorkspaceTool | undefined;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkspaceKeys = void 0;
|
|
4
|
+
var WorkspaceKeys;
|
|
5
|
+
(function (WorkspaceKeys) {
|
|
6
|
+
const LETTERS = { e: 'explorer', f: 'search', g: 'scm' };
|
|
7
|
+
/**
|
|
8
|
+
* The tool of a key: Cmd/Ctrl+Shift+E the explorer, +F the search, +G source control; Ctrl+` a terminal
|
|
9
|
+
* (Ctrl on a Mac too). None for any other.
|
|
10
|
+
*/
|
|
11
|
+
function tool(event, mac) {
|
|
12
|
+
if (event.altKey) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
if (event.ctrlKey && !event.metaKey && !event.shiftKey && (event.code === 'Backquote' || event.key === '`')) {
|
|
16
|
+
return 'terminal';
|
|
17
|
+
}
|
|
18
|
+
const mod = mac ? event.metaKey && !event.ctrlKey : event.ctrlKey && !event.metaKey;
|
|
19
|
+
return mod && event.shiftKey ? LETTERS[event.key.toLowerCase()] : undefined;
|
|
20
|
+
}
|
|
21
|
+
WorkspaceKeys.tool = tool;
|
|
22
|
+
})(WorkspaceKeys || (exports.WorkspaceKeys = WorkspaceKeys = {}));
|
|
23
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
/** How a file is shown as it is, rather than as text. */
|
|
2
2
|
export type PreviewKind = 'markdown' | 'html' | 'image' | 'video' | 'audio' | 'pdf';
|
|
3
|
+
/**
|
|
4
|
+
* What a page of the workspace may do in its frame: run its own scripts, send its forms, and open a link in a
|
|
5
|
+
* window of its own (one that inherits these rules, so it is no closer to Ta for it). Nothing that would make
|
|
6
|
+
* it the page of Ta: no `allow-same-origin` — a page shown from its text (`srcDoc`, over a relay) would be
|
|
7
|
+
* of the origin of the page of Ta then, and the device key of the app is kept there — and no
|
|
8
|
+
* `allow-downloads`, so that a page of a repository cannot write a file of its choosing into Downloads.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PAGE_SANDBOX = "allow-scripts allow-forms allow-popups";
|
|
11
|
+
/**
|
|
12
|
+
* What a page shown from its own text may reach: nothing over the network, nothing of the page that frames
|
|
13
|
+
* it. Such a page has no origin of its own (a `srcDoc` frame takes the parent's), so a relative `src` would
|
|
14
|
+
* otherwise ask the page of Ta for it — this is what keeps a page of a workspace away from it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PAGE_CSP = "default-src 'none'; script-src 'unsafe-inline' blob:; style-src 'unsafe-inline' blob:; img-src data: blob:; media-src data: blob:; font-src data:; form-action 'none'; connect-src 'none'";
|
|
3
17
|
export declare namespace PreviewUtil {
|
|
4
18
|
function kind(path: string): PreviewKind | undefined;
|
|
5
19
|
/** The preview has a text to edit, as Markdown, HTML and SVG; the others are only shown. */
|
|
@@ -12,6 +26,11 @@ export declare namespace PreviewUtil {
|
|
|
12
26
|
function resolve(url: string, base: string): string;
|
|
13
27
|
/** The id GitHub gives a heading, for links to `#it`; `taken` makes repeated ones unique. */
|
|
14
28
|
function slug(text: string, taken: Map<string, number>): string;
|
|
29
|
+
/**
|
|
30
|
+
* A page of the workspace as the document of a frame that loads it from its text (`srcDoc`): with the
|
|
31
|
+
* policy of {@link PAGE_CSP} at its head, so that it reaches nothing but what it carries.
|
|
32
|
+
*/
|
|
33
|
+
function pageDocument(html: string): string;
|
|
15
34
|
/** A document of rendered Markdown, with `style` for the look of the page; it is shown in a frame that runs no scripts. */
|
|
16
35
|
function markdownDocument(body: string, style: string): string;
|
|
17
36
|
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreviewUtil = void 0;
|
|
3
|
+
exports.PreviewUtil = exports.PAGE_CSP = exports.PAGE_SANDBOX = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* What a page of the workspace may do in its frame: run its own scripts, send its forms, and open a link in a
|
|
6
|
+
* window of its own (one that inherits these rules, so it is no closer to Ta for it). Nothing that would make
|
|
7
|
+
* it the page of Ta: no `allow-same-origin` — a page shown from its text (`srcDoc`, over a relay) would be
|
|
8
|
+
* of the origin of the page of Ta then, and the device key of the app is kept there — and no
|
|
9
|
+
* `allow-downloads`, so that a page of a repository cannot write a file of its choosing into Downloads.
|
|
10
|
+
*/
|
|
11
|
+
exports.PAGE_SANDBOX = 'allow-scripts allow-forms allow-popups';
|
|
12
|
+
/**
|
|
13
|
+
* What a page shown from its own text may reach: nothing over the network, nothing of the page that frames
|
|
14
|
+
* it. Such a page has no origin of its own (a `srcDoc` frame takes the parent's), so a relative `src` would
|
|
15
|
+
* otherwise ask the page of Ta for it — this is what keeps a page of a workspace away from it.
|
|
16
|
+
*/
|
|
17
|
+
exports.PAGE_CSP = "default-src 'none'; script-src 'unsafe-inline' blob:; style-src 'unsafe-inline' blob:; img-src data: blob:; media-src data: blob:; font-src data:; form-action 'none'; connect-src 'none'";
|
|
4
18
|
const KINDS = {
|
|
5
19
|
md: 'markdown',
|
|
6
20
|
markdown: 'markdown',
|
|
@@ -83,6 +97,23 @@ var PreviewUtil;
|
|
|
83
97
|
return count ? `${base}-${count}` : base;
|
|
84
98
|
}
|
|
85
99
|
PreviewUtil.slug = slug;
|
|
100
|
+
/**
|
|
101
|
+
* A page of the workspace as the document of a frame that loads it from its text (`srcDoc`): with the
|
|
102
|
+
* policy of {@link PAGE_CSP} at its head, so that it reaches nothing but what it carries.
|
|
103
|
+
*/
|
|
104
|
+
function pageDocument(html) {
|
|
105
|
+
const meta = `<meta http-equiv="Content-Security-Policy" content="${exports.PAGE_CSP}">`;
|
|
106
|
+
const head = /<head[^>]*>/i.exec(html);
|
|
107
|
+
if (head) {
|
|
108
|
+
const at = head.index + head[0].length;
|
|
109
|
+
return html.slice(0, at) + meta + html.slice(at);
|
|
110
|
+
}
|
|
111
|
+
// After the doctype, or there is none: a meta before it would leave the page in quirks mode.
|
|
112
|
+
const doctype = /<!doctype[^>]*>/i.exec(html);
|
|
113
|
+
const at = doctype ? doctype.index + doctype[0].length : 0;
|
|
114
|
+
return html.slice(0, at) + meta + html.slice(at);
|
|
115
|
+
}
|
|
116
|
+
PreviewUtil.pageDocument = pageDocument;
|
|
86
117
|
/** A document of rendered Markdown, with `style` for the look of the page; it is shown in a frame that runs no scripts. */
|
|
87
118
|
function markdownDocument(body, style) {
|
|
88
119
|
return `<!doctype html><html><head><meta charset="utf-8"><style>${style}</style></head><body><article class="markdown">${body}</article></body></html>`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-workspace",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "A pi package for Ta: the workspace beside the conversation, with an explorer, open files, search, source control, terminals and a browser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -185,39 +185,26 @@ function useContextMenu() {
|
|
|
185
185
|
const target = event.currentTarget;
|
|
186
186
|
const box = target.getBoundingClientRect();
|
|
187
187
|
const pointer = "clientX" in event && (event.clientX || event.clientY);
|
|
188
|
-
setMenu({ x:
|
|
188
|
+
setMenu(pointer ? { x: event.clientX, y: event.clientY, around: { top: box.top, bottom: box.bottom }, items } : { x: box.left + 16, y: box.bottom, items });
|
|
189
189
|
}, []);
|
|
190
|
+
const close = React.useCallback(() => setMenu(undefined), []);
|
|
190
191
|
const element = menu ? /* @__PURE__ */ React.createElement(ContextMenu, {
|
|
191
192
|
...menu,
|
|
192
|
-
onClose:
|
|
193
|
+
onClose: close
|
|
193
194
|
}) : null;
|
|
194
195
|
return [element, open];
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
-
const probe = document.createElement("div");
|
|
198
|
-
probe.style.cssText = "position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top)";
|
|
199
|
-
element.appendChild(probe);
|
|
200
|
-
const top = Number.parseFloat(getComputedStyle(probe).paddingTop) || 0;
|
|
201
|
-
probe.remove();
|
|
202
|
-
return top;
|
|
203
|
-
}
|
|
204
|
-
function ContextMenu({ x, y, items, onClose }) {
|
|
197
|
+
function ContextMenu({ x, y, around, items, onClose }) {
|
|
205
198
|
const root = React.useRef(null);
|
|
206
|
-
const [place, setPlace] = React.useState({ left: 0, top: 0, ready: false });
|
|
207
199
|
React.useLayoutEffect(() => {
|
|
208
200
|
const element = root.current;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const top = touch ? above >= safeTop + 4 ? above : clamp(y + 14, window.innerHeight - box.height) : y + box.height > window.innerHeight - 4 ? Math.max(4, y - box.height) : y;
|
|
217
|
-
setPlace({ left, top, ready: true });
|
|
218
|
-
}
|
|
219
|
-
root.current?.querySelector("button:not(:disabled)")?.focus();
|
|
220
|
-
}, [x, y]);
|
|
201
|
+
if (!element) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const stop = pi.ui.attachMenu(element, { x, y, around }, onClose);
|
|
205
|
+
element.querySelector("button:not(:disabled)")?.focus();
|
|
206
|
+
return stop;
|
|
207
|
+
}, [x, y, around, onClose]);
|
|
221
208
|
React.useEffect(() => {
|
|
222
209
|
const close = (event) => {
|
|
223
210
|
if (!root.current?.contains(event.target)) {
|
|
@@ -249,7 +236,6 @@ function ContextMenu({ x, y, items, onClose }) {
|
|
|
249
236
|
ref: root,
|
|
250
237
|
className: "taw-menu",
|
|
251
238
|
role: "menu",
|
|
252
|
-
style: { left: place.left, top: place.top, visibility: place.ready ? "visible" : "hidden" },
|
|
253
239
|
onKeyDown,
|
|
254
240
|
onContextMenu: (event) => event.preventDefault()
|
|
255
241
|
}, items.map((item, index) => item === "-" ? /* @__PURE__ */ React.createElement("hr", {
|
|
@@ -462,6 +448,7 @@ var ZH = {
|
|
|
462
448
|
closeTabsToTheRight: "关闭右侧",
|
|
463
449
|
closeEnded: "关闭已退出的",
|
|
464
450
|
openCount: "{count} 个已打开",
|
|
451
|
+
workbench: "工作台",
|
|
465
452
|
explorer: "资源管理器",
|
|
466
453
|
openFiles: "打开的文件",
|
|
467
454
|
search: "搜索",
|
|
@@ -547,9 +534,7 @@ var ZH = {
|
|
|
547
534
|
save: "保存",
|
|
548
535
|
saveFailed: "保存失败:{message}",
|
|
549
536
|
changedOnDisk: "文件已在磁盘上更改。",
|
|
550
|
-
reload: "放弃我的更改"
|
|
551
|
-
fit: "适应窗口",
|
|
552
|
-
actualSize: "实际大小"
|
|
537
|
+
reload: "放弃我的更改"
|
|
553
538
|
};
|
|
554
539
|
var EN = {
|
|
555
540
|
newFile: "New File…",
|
|
@@ -658,6 +643,7 @@ var EN = {
|
|
|
658
643
|
closeTabsToTheRight: "Close to the Right",
|
|
659
644
|
closeEnded: "Close Exited",
|
|
660
645
|
openCount: "{count} open",
|
|
646
|
+
workbench: "Workbench",
|
|
661
647
|
explorer: "Explorer",
|
|
662
648
|
openFiles: "Open files",
|
|
663
649
|
search: "Search",
|
|
@@ -743,9 +729,7 @@ var EN = {
|
|
|
743
729
|
save: "Save",
|
|
744
730
|
saveFailed: "Could not save: {message}",
|
|
745
731
|
changedOnDisk: "The file changed on disk.",
|
|
746
|
-
reload: "Discard my changes"
|
|
747
|
-
fit: "Fit to window",
|
|
748
|
-
actualSize: "Actual size"
|
|
732
|
+
reload: "Discard my changes"
|
|
749
733
|
};
|
|
750
734
|
function t(key, vars = {}) {
|
|
751
735
|
const words = pi.ui.language === "zh-CN" ? ZH : EN;
|
|
@@ -2417,6 +2401,37 @@ function BrowserView() {
|
|
|
2417
2401
|
return pi.ui.supportsWebview ? /* @__PURE__ */ React.createElement(WebviewBrowser, null) : /* @__PURE__ */ React.createElement(FrameBrowser, null);
|
|
2418
2402
|
}
|
|
2419
2403
|
|
|
2404
|
+
// web-src/bytes.ts
|
|
2405
|
+
function useFileBytesUrl(url, version) {
|
|
2406
|
+
const [state, setState] = React.useState({});
|
|
2407
|
+
React.useEffect(() => {
|
|
2408
|
+
if (!url) {
|
|
2409
|
+
setState({});
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
let live = true;
|
|
2413
|
+
let made;
|
|
2414
|
+
pi.files.read(url).then((file) => {
|
|
2415
|
+
if (!live) {
|
|
2416
|
+
return;
|
|
2417
|
+
}
|
|
2418
|
+
made = URL.createObjectURL(new Blob([file.data], { type: file.type }));
|
|
2419
|
+
setState({ url: made, size: file.size });
|
|
2420
|
+
}, (error) => {
|
|
2421
|
+
if (live) {
|
|
2422
|
+
setState({ error: Host.message(error) });
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
return () => {
|
|
2426
|
+
live = false;
|
|
2427
|
+
if (made) {
|
|
2428
|
+
URL.revokeObjectURL(made);
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
}, [url, version]);
|
|
2432
|
+
return state;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2420
2435
|
// web-src/util/seti.ts
|
|
2421
2436
|
var SETI_ICONS = [
|
|
2422
2437
|
[57379, "#d4d7d6", "#bfc2c1"],
|
|
@@ -5261,6 +5276,8 @@ var parser = _Parser.parse;
|
|
|
5261
5276
|
var lexer = _Lexer.lex;
|
|
5262
5277
|
|
|
5263
5278
|
// web-src/util/preview.ts
|
|
5279
|
+
var PAGE_SANDBOX = "allow-scripts allow-forms allow-popups";
|
|
5280
|
+
var PAGE_CSP = "default-src 'none'; script-src 'unsafe-inline' blob:; style-src 'unsafe-inline' blob:; img-src data: blob:; media-src data: blob:; font-src data:; form-action 'none'; connect-src 'none'";
|
|
5264
5281
|
var KINDS = {
|
|
5265
5282
|
md: "markdown",
|
|
5266
5283
|
markdown: "markdown",
|
|
@@ -5331,6 +5348,18 @@ var PreviewUtil;
|
|
|
5331
5348
|
return count ? `${base}-${count}` : base;
|
|
5332
5349
|
}
|
|
5333
5350
|
PreviewUtil.slug = slug;
|
|
5351
|
+
function pageDocument(html2) {
|
|
5352
|
+
const meta = `<meta http-equiv="Content-Security-Policy" content="${PAGE_CSP}">`;
|
|
5353
|
+
const head = /<head[^>]*>/i.exec(html2);
|
|
5354
|
+
if (head) {
|
|
5355
|
+
const at2 = head.index + head[0].length;
|
|
5356
|
+
return html2.slice(0, at2) + meta + html2.slice(at2);
|
|
5357
|
+
}
|
|
5358
|
+
const doctype = /<!doctype[^>]*>/i.exec(html2);
|
|
5359
|
+
const at = doctype ? doctype.index + doctype[0].length : 0;
|
|
5360
|
+
return html2.slice(0, at) + meta + html2.slice(at);
|
|
5361
|
+
}
|
|
5362
|
+
PreviewUtil.pageDocument = pageDocument;
|
|
5334
5363
|
function markdownDocument(body, style) {
|
|
5335
5364
|
return `<!doctype html><html><head><meta charset="utf-8"><style>${style}</style></head><body><article class="markdown">${body}</article></body></html>`;
|
|
5336
5365
|
}
|
|
@@ -5338,7 +5367,6 @@ var PreviewUtil;
|
|
|
5338
5367
|
})(PreviewUtil ||= {});
|
|
5339
5368
|
|
|
5340
5369
|
// web-src/preview.tsx
|
|
5341
|
-
var PAGE_SANDBOX = "allow-scripts allow-forms allow-popups allow-modals allow-downloads";
|
|
5342
5370
|
var MARKDOWN_SANDBOX = "allow-same-origin allow-popups allow-popups-to-escape-sandbox";
|
|
5343
5371
|
var LINKED = [
|
|
5344
5372
|
["img", "src"],
|
|
@@ -5410,32 +5438,35 @@ function MarkdownPreview({ text, url }) {
|
|
|
5410
5438
|
});
|
|
5411
5439
|
}
|
|
5412
5440
|
function ImagePreview({ url, size, onInfo }) {
|
|
5413
|
-
|
|
5414
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
5415
|
-
className: `taw-preview-media taw-preview-image ${actual ? "taw-actual" : ""}`
|
|
5416
|
-
}, /* @__PURE__ */ React.createElement("button", {
|
|
5417
|
-
type: "button",
|
|
5418
|
-
className: "taw-image-toggle",
|
|
5419
|
-
title: t(actual ? "fit" : "actualSize"),
|
|
5420
|
-
onClick: () => setActual((value) => !value)
|
|
5421
|
-
}, /* @__PURE__ */ React.createElement("img", {
|
|
5441
|
+
return /* @__PURE__ */ React.createElement(pi.ui.ImageViewer, {
|
|
5422
5442
|
src: url,
|
|
5423
|
-
|
|
5424
|
-
onLoad: (
|
|
5425
|
-
|
|
5426
|
-
onInfo(`${image.naturalWidth} × ${image.naturalHeight} · ${WorkspaceUtil.size(size)}`);
|
|
5427
|
-
}
|
|
5428
|
-
})));
|
|
5443
|
+
className: "taw-preview-image",
|
|
5444
|
+
onLoad: (image) => onInfo(`${image.width} × ${image.height} · ${WorkspaceUtil.size(size)}`)
|
|
5445
|
+
});
|
|
5429
5446
|
}
|
|
5430
|
-
function
|
|
5447
|
+
function PagePreview({ url, text }) {
|
|
5448
|
+
if (url) {
|
|
5449
|
+
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5450
|
+
className: "taw-preview-frame taw-preview-page",
|
|
5451
|
+
title: "HTML",
|
|
5452
|
+
sandbox: PAGE_SANDBOX,
|
|
5453
|
+
src: url
|
|
5454
|
+
});
|
|
5455
|
+
}
|
|
5456
|
+
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5457
|
+
className: "taw-preview-frame taw-preview-page",
|
|
5458
|
+
title: "HTML",
|
|
5459
|
+
sandbox: PAGE_SANDBOX,
|
|
5460
|
+
srcDoc: PreviewUtil.pageDocument(text)
|
|
5461
|
+
});
|
|
5462
|
+
}
|
|
5463
|
+
function MediaPreview({
|
|
5464
|
+
kind,
|
|
5465
|
+
url,
|
|
5466
|
+
size,
|
|
5467
|
+
onInfo
|
|
5468
|
+
}) {
|
|
5431
5469
|
switch (kind) {
|
|
5432
|
-
case "html":
|
|
5433
|
-
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5434
|
-
className: "taw-preview-frame taw-preview-page",
|
|
5435
|
-
title: "HTML",
|
|
5436
|
-
sandbox: PAGE_SANDBOX,
|
|
5437
|
-
src: url
|
|
5438
|
-
});
|
|
5439
5470
|
case "pdf":
|
|
5440
5471
|
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5441
5472
|
className: "taw-preview-frame",
|
|
@@ -5604,6 +5635,21 @@ var TaLocation;
|
|
|
5604
5635
|
return name || (remote === null || remote === undefined ? undefined : remote.host) || location2;
|
|
5605
5636
|
}
|
|
5606
5637
|
TaLocation2.basename = basename;
|
|
5638
|
+
function homeRelative(location2) {
|
|
5639
|
+
var _a;
|
|
5640
|
+
const remote = parse(location2);
|
|
5641
|
+
const path2 = remote ? remote.path ? remote.path.slice(1) : "~" : location2;
|
|
5642
|
+
const match = /^~(?:[\\/]+(.*))?$/.exec(path2);
|
|
5643
|
+
return match ? ((_a = match[1]) !== null && _a !== undefined ? _a : "").replace(/[\\/]+$/, "") : undefined;
|
|
5644
|
+
}
|
|
5645
|
+
TaLocation2.homeRelative = homeRelative;
|
|
5646
|
+
function isAbsolute(location2) {
|
|
5647
|
+
if (homeRelative(location2) !== undefined) {
|
|
5648
|
+
return false;
|
|
5649
|
+
}
|
|
5650
|
+
return isRemote(location2) || /^([\\/]|[A-Za-z]:)/.test(location2);
|
|
5651
|
+
}
|
|
5652
|
+
TaLocation2.isAbsolute = isAbsolute;
|
|
5607
5653
|
function parentPath(path2) {
|
|
5608
5654
|
const trimmed = path2.replace(/[\\/]+$/, "");
|
|
5609
5655
|
const at = Math.max(trimmed.lastIndexOf("/"), trimmed.lastIndexOf("\\"));
|
|
@@ -5670,6 +5716,37 @@ ${message}`;
|
|
|
5670
5716
|
}
|
|
5671
5717
|
TaMessageContext2.strip = strip;
|
|
5672
5718
|
})(TaMessageContext || (TaMessageContext = {}));
|
|
5719
|
+
var TaImageNote;
|
|
5720
|
+
(function(TaImageNote2) {
|
|
5721
|
+
const NOTE = /^\[Image: original \d+x\d+, displayed at \d+x\d+\. Multiply coordinates by [\d.]+ to map to original image\.\]$|^\[Image converted from [^\]]+ to [^\]]+\.\]$/;
|
|
5722
|
+
function strip(text) {
|
|
5723
|
+
const lines = text.split(`
|
|
5724
|
+
`);
|
|
5725
|
+
const kept = lines.filter((line) => !NOTE.test(line.trim()));
|
|
5726
|
+
if (kept.length === lines.length) {
|
|
5727
|
+
return text;
|
|
5728
|
+
}
|
|
5729
|
+
return kept.join(`
|
|
5730
|
+
`).replace(/\n+$/, "").replace(/^\n+/, "");
|
|
5731
|
+
}
|
|
5732
|
+
TaImageNote2.strip = strip;
|
|
5733
|
+
})(TaImageNote || (TaImageNote = {}));
|
|
5734
|
+
var TaAgentSummary;
|
|
5735
|
+
(function(TaAgentSummary2) {
|
|
5736
|
+
const START = /^\s*<conversation_history_summary>/;
|
|
5737
|
+
const BLOCK = /^\s*<conversation_history_summary>[\s\S]*?(?:<\/conversation_history_summary>\s*|$)/;
|
|
5738
|
+
function read(text) {
|
|
5739
|
+
if (!START.test(text)) {
|
|
5740
|
+
return;
|
|
5741
|
+
}
|
|
5742
|
+
return text.replace(/<\/?(?:conversation_history_summary|summary)>/g, "").replace(/<\/?\w*$/, "").trim();
|
|
5743
|
+
}
|
|
5744
|
+
TaAgentSummary2.read = read;
|
|
5745
|
+
function strip(text) {
|
|
5746
|
+
return text.replace(BLOCK, "");
|
|
5747
|
+
}
|
|
5748
|
+
TaAgentSummary2.strip = strip;
|
|
5749
|
+
})(TaAgentSummary || (TaAgentSummary = {}));
|
|
5673
5750
|
var TaSkillUse;
|
|
5674
5751
|
(function(TaSkillUse2) {
|
|
5675
5752
|
const BLOCK = /^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/;
|
|
@@ -6520,6 +6597,9 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6520
6597
|
const file = useLoad(async () => textual ? pi.workspace.readFile(path, cwd) : undefined, [cwd, path, changed]);
|
|
6521
6598
|
const url = useLoad(() => kind ? pi.workspace.fileUrl(path, cwd) : Promise.resolve(undefined), [cwd, path]);
|
|
6522
6599
|
const { version, size } = useVersion(kind && kind !== "markdown" ? url.value : undefined);
|
|
6600
|
+
const byUrl = pi.files.byUrl;
|
|
6601
|
+
const media = !byUrl && !!kind && kind !== "markdown" && kind !== "html";
|
|
6602
|
+
const bytes = useFileBytesUrl(media ? url.value : undefined, changed);
|
|
6523
6603
|
const [info, setInfo] = React.useState();
|
|
6524
6604
|
const [draft, setDraft] = React.useState();
|
|
6525
6605
|
const [base, setBase] = React.useState();
|
|
@@ -6595,6 +6675,7 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6595
6675
|
onChange: setMode
|
|
6596
6676
|
}));
|
|
6597
6677
|
const fileUrl = url.value && PreviewUtil.versioned(url.value, version);
|
|
6678
|
+
const shownUrl = byUrl ? fileUrl : bytes.url;
|
|
6598
6679
|
return /* @__PURE__ */ React.createElement("div", {
|
|
6599
6680
|
className: "taw-editor"
|
|
6600
6681
|
}, /* @__PURE__ */ React.createElement(Header, {
|
|
@@ -6603,13 +6684,18 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6603
6684
|
}), showPreview && fileUrl && kind === "markdown" && /* @__PURE__ */ React.createElement(MarkdownPreview, {
|
|
6604
6685
|
text: draft ?? text ?? "",
|
|
6605
6686
|
url: fileUrl
|
|
6606
|
-
}), showPreview &&
|
|
6607
|
-
|
|
6687
|
+
}), showPreview && kind === "html" && /* @__PURE__ */ React.createElement(PagePreview, {
|
|
6688
|
+
url: byUrl ? fileUrl : undefined,
|
|
6689
|
+
text: draft ?? text ?? ""
|
|
6690
|
+
}), showPreview && kind && kind !== "markdown" && kind !== "html" && shownUrl && /* @__PURE__ */ React.createElement(MediaPreview, {
|
|
6691
|
+
key: shownUrl,
|
|
6608
6692
|
kind,
|
|
6609
|
-
url:
|
|
6610
|
-
size: file.value?.size ?? size ?? 0,
|
|
6693
|
+
url: shownUrl,
|
|
6694
|
+
size: file.value?.size ?? bytes.size ?? size ?? 0,
|
|
6611
6695
|
onInfo: setInfo
|
|
6612
|
-
}),
|
|
6696
|
+
}), showPreview && kind && kind !== "markdown" && kind !== "html" && !shownUrl && /* @__PURE__ */ React.createElement(Message, {
|
|
6697
|
+
tone: bytes.error ? "error" : undefined
|
|
6698
|
+
}, bytes.error ?? t("loading")), !showPreview && /* @__PURE__ */ React.createElement(pi.ui.CodeEditor, {
|
|
6613
6699
|
path,
|
|
6614
6700
|
value: draft ?? text ?? "",
|
|
6615
6701
|
readOnly,
|
|
@@ -7835,6 +7921,47 @@ function Guides({ depth }) {
|
|
|
7835
7921
|
})));
|
|
7836
7922
|
}
|
|
7837
7923
|
|
|
7924
|
+
// web-src/launcher.tsx
|
|
7925
|
+
var TOOLS = [
|
|
7926
|
+
{ name: "explorer", icon: "Files" },
|
|
7927
|
+
{ name: "search", icon: "Search" },
|
|
7928
|
+
{ name: "scm", icon: "GitBranch" },
|
|
7929
|
+
{ name: "terminal", icon: "SquareTerminal" }
|
|
7930
|
+
];
|
|
7931
|
+
function showTool(name) {
|
|
7932
|
+
pi.ui.showView(`${PACKAGE}/${name}`);
|
|
7933
|
+
}
|
|
7934
|
+
function LauncherTools() {
|
|
7935
|
+
const cwd = pi.ui.useCwd();
|
|
7936
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
7937
|
+
className: "taw-launch"
|
|
7938
|
+
}, /* @__PURE__ */ React.createElement("header", {
|
|
7939
|
+
className: "taw-launch-head"
|
|
7940
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
7941
|
+
className: "taw-launch-label"
|
|
7942
|
+
}, t("workbench")), /* @__PURE__ */ React.createElement("span", {
|
|
7943
|
+
className: "taw-launch-cwd",
|
|
7944
|
+
title: cwd
|
|
7945
|
+
}, /* @__PURE__ */ React.createElement(Glyph, {
|
|
7946
|
+
name: "Folder",
|
|
7947
|
+
size: 13
|
|
7948
|
+
}), /* @__PURE__ */ React.createElement("span", null, WorkspaceUtil.basename(cwd)))), /* @__PURE__ */ React.createElement("div", {
|
|
7949
|
+
className: "taw-launch-row"
|
|
7950
|
+
}, TOOLS.map((tool) => /* @__PURE__ */ React.createElement("button", {
|
|
7951
|
+
key: tool.name,
|
|
7952
|
+
type: "button",
|
|
7953
|
+
className: `taw-launch-tile taw-launch-${tool.name}`,
|
|
7954
|
+
onClick: () => showTool(tool.name)
|
|
7955
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
7956
|
+
className: "taw-launch-icon"
|
|
7957
|
+
}, /* @__PURE__ */ React.createElement(Glyph, {
|
|
7958
|
+
name: tool.icon,
|
|
7959
|
+
size: 24
|
|
7960
|
+
})), /* @__PURE__ */ React.createElement("span", {
|
|
7961
|
+
className: "taw-launch-name"
|
|
7962
|
+
}, t(tool.name))))));
|
|
7963
|
+
}
|
|
7964
|
+
|
|
7838
7965
|
// web-src/open-files.tsx
|
|
7839
7966
|
function close(files) {
|
|
7840
7967
|
for (const file of files) {
|
|
@@ -8297,7 +8424,7 @@ var STYLE = `
|
|
|
8297
8424
|
.taw-name-input .taw-input-message { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin-top: 1px; box-shadow: var(--ta-shadow-pop); }
|
|
8298
8425
|
.taw-input-message.taw-error { background: color-mix(in srgb, var(--ta-red) 16%, var(--ta-card)); border: 1px solid var(--ta-red); color: var(--ta-text); }
|
|
8299
8426
|
.taw-input-message.taw-warning { background: color-mix(in srgb, var(--ta-yellow) 16%, var(--ta-card)); border: 1px solid var(--ta-yellow); color: var(--ta-text); }
|
|
8300
|
-
.taw-menu { position: fixed; z-index: 80; min-width: 210px; max-width: 320px; display: flex; flex-direction: column; gap: 1px; padding: 6px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); animation: taw-fade 100ms ease-out; }
|
|
8427
|
+
.taw-menu { position: fixed; left: 0; top: 0; z-index: 80; min-width: 210px; max-width: 320px; display: flex; flex-direction: column; gap: 1px; padding: 6px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); animation: taw-fade 100ms ease-out; }
|
|
8301
8428
|
.taw-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: none; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: left; cursor: pointer; outline: none; }
|
|
8302
8429
|
.taw-menu-item:hover:not(:disabled), .taw-menu-item:focus-visible { background: var(--ta-hover); }
|
|
8303
8430
|
.taw-menu-item:disabled { opacity: 0.45; cursor: default; }
|
|
@@ -8425,12 +8552,6 @@ var STYLE = `
|
|
|
8425
8552
|
.taw-preview-media video { max-width: 100%; max-height: 100%; border-radius: 8px; background: #000; outline: none; }
|
|
8426
8553
|
.taw-preview-media audio { width: min(480px, 100%); }
|
|
8427
8554
|
.taw-preview-image { background-color: var(--ta-code); background-image: linear-gradient(45deg, var(--ta-chip) 25%, transparent 25%, transparent 75%, var(--ta-chip) 75%), linear-gradient(45deg, var(--ta-chip) 25%, transparent 25%, transparent 75%, var(--ta-chip) 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
|
|
8428
|
-
.taw-image-toggle { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
|
|
8429
|
-
.taw-image-toggle:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: 2px; }
|
|
8430
|
-
.taw-preview-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
|
|
8431
|
-
.taw-preview-image.taw-actual { align-items: flex-start; justify-content: flex-start; }
|
|
8432
|
-
.taw-preview-image.taw-actual .taw-image-toggle { max-width: none; max-height: none; margin: auto; cursor: zoom-out; }
|
|
8433
|
-
.taw-preview-image.taw-actual img { max-width: none; max-height: none; }
|
|
8434
8555
|
.taw-message { padding: 16px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
|
|
8435
8556
|
.taw-code { flex: 1; min-height: 0; overflow: auto; padding: 6px 0; background: var(--ta-code); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }
|
|
8436
8557
|
.taw-code-block { content-visibility: auto; }
|
|
@@ -8532,6 +8653,25 @@ var STYLE = `
|
|
|
8532
8653
|
:root[data-touch] .taw-terminal-tab-main { font-size: calc(13px * var(--ta-font-scale)); }
|
|
8533
8654
|
:root[data-touch] .taw-terminal-tab > .taw-action { width: 30px; height: 30px; }
|
|
8534
8655
|
:root[data-touch] .taw-terminal-tab:not(.taw-on) > .taw-action { display: none; }
|
|
8656
|
+
/* The tools of the workbench in the launcher, as the tiles of the launcher's own sections */
|
|
8657
|
+
.taw-launch { display: flex; flex-direction: column; }
|
|
8658
|
+
.taw-launch-head { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0 2px 10px; }
|
|
8659
|
+
.taw-launch-label { flex: 1; min-width: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); font-weight: 500; }
|
|
8660
|
+
.taw-launch-cwd { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 55%; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
8661
|
+
.taw-launch-cwd > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8662
|
+
.taw-launch-cwd > svg { flex: none; }
|
|
8663
|
+
.taw-launch-explorer { --taw-hue: 212; }
|
|
8664
|
+
.taw-launch-search { --taw-hue: 32; }
|
|
8665
|
+
.taw-launch-scm { --taw-hue: 152; }
|
|
8666
|
+
.taw-launch-terminal { --taw-hue: 262; }
|
|
8667
|
+
.taw-launch-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 -2px; }
|
|
8668
|
+
.taw-launch-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 4px 2px; border: 0; border-radius: 14px; background: none; color: var(--ta-text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
|
|
8669
|
+
.taw-launch-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: hsl(var(--taw-hue) 70% 94%); color: hsl(var(--taw-hue) 52% 36%); box-shadow: inset 0 0 0 1px hsl(var(--taw-hue) 40% 50% / 0.08); transition: transform 160ms var(--ta-ease), filter 160ms; }
|
|
8670
|
+
:root[data-theme='dark'] .taw-launch-icon { background: hsl(var(--taw-hue) 26% 21%); color: hsl(var(--taw-hue) 72% 76%); box-shadow: inset 0 0 0 1px hsl(var(--taw-hue) 40% 70% / 0.1); }
|
|
8671
|
+
.taw-launch-tile:hover .taw-launch-icon { filter: brightness(0.97); }
|
|
8672
|
+
.taw-launch-tile:active .taw-launch-icon { transform: scale(0.92); }
|
|
8673
|
+
.taw-launch-tile:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }
|
|
8674
|
+
.taw-launch-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-body); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }
|
|
8535
8675
|
`;
|
|
8536
8676
|
function injectStyle() {
|
|
8537
8677
|
const element = document.createElement("style");
|
|
@@ -8589,7 +8729,7 @@ var TerminalUtil;
|
|
|
8589
8729
|
TerminalUtil.ctrl = ctrl;
|
|
8590
8730
|
})(TerminalUtil ||= {});
|
|
8591
8731
|
|
|
8592
|
-
// web-src/terminal.
|
|
8732
|
+
// web-src/terminal-sessions.ts
|
|
8593
8733
|
var RESIZE_MS = 120;
|
|
8594
8734
|
var OPEN_COLS = 100;
|
|
8595
8735
|
var OPEN_ROWS = 30;
|
|
@@ -8797,6 +8937,8 @@ function pasteClipboard(session) {
|
|
|
8797
8937
|
return;
|
|
8798
8938
|
});
|
|
8799
8939
|
}
|
|
8940
|
+
|
|
8941
|
+
// web-src/terminal.tsx
|
|
8800
8942
|
function TerminalBadge({ session, index }) {
|
|
8801
8943
|
const progress = session.progress;
|
|
8802
8944
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -9179,6 +9321,23 @@ function TerminalEditor({
|
|
|
9179
9321
|
}));
|
|
9180
9322
|
}
|
|
9181
9323
|
|
|
9324
|
+
// web-src/util/keys.ts
|
|
9325
|
+
var WorkspaceKeys;
|
|
9326
|
+
((WorkspaceKeys) => {
|
|
9327
|
+
const LETTERS = { e: "explorer", f: "search", g: "scm" };
|
|
9328
|
+
function tool(event, mac) {
|
|
9329
|
+
if (event.altKey) {
|
|
9330
|
+
return;
|
|
9331
|
+
}
|
|
9332
|
+
if (event.ctrlKey && !event.metaKey && !event.shiftKey && (event.code === "Backquote" || event.key === "`")) {
|
|
9333
|
+
return "terminal";
|
|
9334
|
+
}
|
|
9335
|
+
const mod = mac ? event.metaKey && !event.ctrlKey : event.ctrlKey && !event.metaKey;
|
|
9336
|
+
return mod && event.shiftKey ? LETTERS[event.key.toLowerCase()] : undefined;
|
|
9337
|
+
}
|
|
9338
|
+
WorkspaceKeys.tool = tool;
|
|
9339
|
+
})(WorkspaceKeys ||= {});
|
|
9340
|
+
|
|
9182
9341
|
// web-src/index.tsx
|
|
9183
9342
|
function openLink(pi2, link2) {
|
|
9184
9343
|
if (link2.type === "file") {
|
|
@@ -9214,9 +9373,20 @@ function activate(pi2) {
|
|
|
9214
9373
|
if (pi2.ui.debugWebview) {
|
|
9215
9374
|
pi2.registerTool(AgentBrowser.TOOL);
|
|
9216
9375
|
}
|
|
9376
|
+
pi2.registerView("launcher", { title: label("workbench"), icon: Host.icon("SquareTerminal"), render: LauncherTools, location: "launcher", order: -10 });
|
|
9377
|
+
const onKey = (event) => {
|
|
9378
|
+
const tool = WorkspaceKeys.tool(event, MAC);
|
|
9379
|
+
if (tool) {
|
|
9380
|
+
event.preventDefault();
|
|
9381
|
+
event.stopPropagation();
|
|
9382
|
+
showTool(tool);
|
|
9383
|
+
}
|
|
9384
|
+
};
|
|
9385
|
+
window.addEventListener("keydown", onKey, true);
|
|
9217
9386
|
const stopTerminals = pi2.onTerminalData((terminalId, data, exitCode) => Terminals.receive(terminalId, data, exitCode));
|
|
9218
9387
|
OpenFiles.restore();
|
|
9219
9388
|
return () => {
|
|
9389
|
+
window.removeEventListener("keydown", onKey, true);
|
|
9220
9390
|
stopTerminals();
|
|
9221
9391
|
removeStyle();
|
|
9222
9392
|
};
|
package/dist/public/assets/{abnfDiagram-S7VZAUFO-C1tb6dM5.js → abnfDiagram-S7VZAUFO-BmIko5tV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./chunk-OY52VR5R-
|
|
1
|
+
import{n as e,r as t,t as n}from"./chunk-OY52VR5R-DQrq3n0T.js";import{t as r}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-DC20ZwJj.js";import"./chunk-BG4553SI-DsNATY2m.js";import{n as i}from"./d3-selection-ZcE6yRN5.js";import{n as a}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as o,t as s}from"./mermaid-parser.core-BfCv4CYZ.js";var c=o().RailroadAbnf.parser.LangiumParser,l=a(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=a(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=a(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=a(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=a(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=a(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=a(e=>{r(e,n),e.title&&n.setTitle(e.title),e.rules.map(e=>n.addRule(m(e)))},`populateDb`),g={parser:{parse:a(e=>{n.clear(),i.debug(`[ABNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;i.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),i.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:n}},db:n,renderer:t,styles:e};export{g as diagram};
|
package/dist/public/assets/{architecture-WOLXFQ4H-DN1Va8BF.js → architecture-WOLXFQ4H-XgsdQ7ul.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{M as createArchitectureServices}from"./mermaid-parser.core-
|
|
1
|
+
export{M as createArchitectureServices}from"./mermaid-parser.core-BfCv4CYZ.js";import"./chunk-NGNAAXSQ-Bxuf9Ivc.js";
|