mycode-cli 0.1.0__py3-none-any.whl
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.
- mycode/__init__.py +1 -0
- mycode/cli/__init__.py +1 -0
- mycode/cli/chat.py +650 -0
- mycode/cli/main.py +245 -0
- mycode/cli/render.py +693 -0
- mycode/cli/runtime.py +271 -0
- mycode/cli/theme.py +109 -0
- mycode/core/__init__.py +30 -0
- mycode/core/agent.py +515 -0
- mycode/core/config.py +551 -0
- mycode/core/messages.py +166 -0
- mycode/core/models.py +144 -0
- mycode/core/models_catalog.json +2090 -0
- mycode/core/providers/__init__.py +86 -0
- mycode/core/providers/anthropic_like.py +366 -0
- mycode/core/providers/base.py +351 -0
- mycode/core/providers/gemini.py +321 -0
- mycode/core/providers/openai_chat.py +356 -0
- mycode/core/providers/openai_responses.py +326 -0
- mycode/core/session.py +537 -0
- mycode/core/system_prompt.md +10 -0
- mycode/core/system_prompt.py +319 -0
- mycode/core/tools.py +898 -0
- mycode/server/__init__.py +1 -0
- mycode/server/app.py +52 -0
- mycode/server/deps.py +29 -0
- mycode/server/routers/__init__.py +7 -0
- mycode/server/routers/chat.py +320 -0
- mycode/server/routers/sessions.py +77 -0
- mycode/server/routers/workspaces.py +92 -0
- mycode/server/run_manager.py +195 -0
- mycode/server/schemas.py +66 -0
- mycode/server/static/assets/EditDiff-C1ql7kft.js +12 -0
- mycode/server/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- mycode/server/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- mycode/server/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- mycode/server/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- mycode/server/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- mycode/server/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- mycode/server/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- mycode/server/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- mycode/server/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- mycode/server/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- mycode/server/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- mycode/server/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- mycode/server/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- mycode/server/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- mycode/server/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- mycode/server/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- mycode/server/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- mycode/server/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- mycode/server/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- mycode/server/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- mycode/server/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- mycode/server/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- mycode/server/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- mycode/server/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- mycode/server/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- mycode/server/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- mycode/server/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- mycode/server/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- mycode/server/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- mycode/server/static/assets/abap-BdImnpbu.js +1 -0
- mycode/server/static/assets/actionscript-3-CoDkCxhg.js +1 -0
- mycode/server/static/assets/ada-bCR0ucgS.js +1 -0
- mycode/server/static/assets/andromeeda-C4gqWexZ.js +1 -0
- mycode/server/static/assets/angular-html-DA-rfuFy.js +1 -0
- mycode/server/static/assets/angular-ts-BrjP3tb8.js +1 -0
- mycode/server/static/assets/apache-Pmp26Uib.js +1 -0
- mycode/server/static/assets/apex-D8_7TLub.js +1 -0
- mycode/server/static/assets/apl-CORt7UWP.js +1 -0
- mycode/server/static/assets/applescript-Co6uUVPk.js +1 -0
- mycode/server/static/assets/ara-BRHolxvo.js +1 -0
- mycode/server/static/assets/asciidoc-Ve4PFQV2.js +1 -0
- mycode/server/static/assets/asm-D_Q5rh1f.js +1 -0
- mycode/server/static/assets/astro-HNnZUWAn.js +1 -0
- mycode/server/static/assets/aurora-x-D-2ljcwZ.js +1 -0
- mycode/server/static/assets/auto-render-xntwXHOX.js +261 -0
- mycode/server/static/assets/awk-DMzUqQB5.js +1 -0
- mycode/server/static/assets/ayu-dark-DYE7WIF3.js +1 -0
- mycode/server/static/assets/ayu-light-BA47KaF1.js +1 -0
- mycode/server/static/assets/ayu-mirage-32ctXXKs.js +1 -0
- mycode/server/static/assets/ballerina-BFfxhgS-.js +1 -0
- mycode/server/static/assets/bat-BkioyH1T.js +1 -0
- mycode/server/static/assets/beancount-k_qm7-4y.js +1 -0
- mycode/server/static/assets/berry-uYugtg8r.js +1 -0
- mycode/server/static/assets/bibtex-CHM0blh-.js +1 -0
- mycode/server/static/assets/bicep-Bmn6On1c.js +1 -0
- mycode/server/static/assets/bird2-BIv1doCn.js +1 -0
- mycode/server/static/assets/blade-BjGOyj-B.js +1 -0
- mycode/server/static/assets/bsl-BO_Y6i37.js +1 -0
- mycode/server/static/assets/c-BIGW1oBm.js +1 -0
- mycode/server/static/assets/c3-eo99z4R2.js +1 -0
- mycode/server/static/assets/cadence-Bv_4Rxtq.js +1 -0
- mycode/server/static/assets/cairo-KRGpt6FW.js +1 -0
- mycode/server/static/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- mycode/server/static/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- mycode/server/static/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- mycode/server/static/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- mycode/server/static/assets/clarity-D53aC0YG.js +1 -0
- mycode/server/static/assets/clojure-P80f7IUj.js +1 -0
- mycode/server/static/assets/cmake-D1j8_8rp.js +1 -0
- mycode/server/static/assets/cobol-nBiQ_Alo.js +1 -0
- mycode/server/static/assets/codeowners-Bp6g37R7.js +1 -0
- mycode/server/static/assets/codeql-DsOJ9woJ.js +1 -0
- mycode/server/static/assets/coffee-Ch7k5sss.js +1 -0
- mycode/server/static/assets/common-lisp-Cg-RD9OK.js +1 -0
- mycode/server/static/assets/coq-DkFqJrB1.js +1 -0
- mycode/server/static/assets/cpp-CofmeUqb.js +1 -0
- mycode/server/static/assets/crystal-DNxU26gB.js +1 -0
- mycode/server/static/assets/csharp-COcwbKMJ.js +1 -0
- mycode/server/static/assets/css-CLj8gQPS.js +1 -0
- mycode/server/static/assets/csv-fuZLfV_i.js +1 -0
- mycode/server/static/assets/cue-D82EKSYY.js +1 -0
- mycode/server/static/assets/cypher-COkxafJQ.js +1 -0
- mycode/server/static/assets/d-85-TOEBH.js +1 -0
- mycode/server/static/assets/dark-plus-C3mMm8J8.js +1 -0
- mycode/server/static/assets/dart-bE4Kk8sk.js +1 -0
- mycode/server/static/assets/dax-CEL-wOlO.js +1 -0
- mycode/server/static/assets/desktop-BmXAJ9_W.js +1 -0
- mycode/server/static/assets/diff-D97Zzqfu.js +1 -0
- mycode/server/static/assets/docker-BcOcwvcX.js +1 -0
- mycode/server/static/assets/dotenv-Da5cRb03.js +1 -0
- mycode/server/static/assets/dracula-BzJJZx-M.js +1 -0
- mycode/server/static/assets/dracula-soft-BXkSAIEj.js +1 -0
- mycode/server/static/assets/dream-maker-BtqSS_iP.js +1 -0
- mycode/server/static/assets/edge-FbVlp4U3.js +1 -0
- mycode/server/static/assets/elixir-CkH2-t6x.js +1 -0
- mycode/server/static/assets/elm-DbKCFpqz.js +1 -0
- mycode/server/static/assets/emacs-lisp-CXvaQtF9.js +1 -0
- mycode/server/static/assets/erb-BYCe7drp.js +1 -0
- mycode/server/static/assets/erlang-DsQrWhSR.js +1 -0
- mycode/server/static/assets/everforest-dark-BgDCqdQA.js +1 -0
- mycode/server/static/assets/everforest-light-C8M2exoo.js +1 -0
- mycode/server/static/assets/fennel-BYunw83y.js +1 -0
- mycode/server/static/assets/fish-BvzEVeQv.js +1 -0
- mycode/server/static/assets/fluent-C4IJs8-o.js +1 -0
- mycode/server/static/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- mycode/server/static/assets/fortran-free-form-BxgE0vQu.js +1 -0
- mycode/server/static/assets/fsharp-CXgrBDvD.js +1 -0
- mycode/server/static/assets/gdresource-BOOCDP_w.js +1 -0
- mycode/server/static/assets/gdscript-C5YyOfLZ.js +1 -0
- mycode/server/static/assets/gdshader-DkwncUOv.js +1 -0
- mycode/server/static/assets/genie-D0YGMca9.js +1 -0
- mycode/server/static/assets/gherkin-DyxjwDmM.js +1 -0
- mycode/server/static/assets/git-commit-F4YmCXRG.js +1 -0
- mycode/server/static/assets/git-rebase-r7XF79zn.js +1 -0
- mycode/server/static/assets/github-dark-DHJKELXO.js +1 -0
- mycode/server/static/assets/github-dark-default-Cuk6v7N8.js +1 -0
- mycode/server/static/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- mycode/server/static/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- mycode/server/static/assets/github-light-DAi9KRSo.js +1 -0
- mycode/server/static/assets/github-light-default-D7oLnXFd.js +1 -0
- mycode/server/static/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- mycode/server/static/assets/gleam-BspZqrRM.js +1 -0
- mycode/server/static/assets/glimmer-js-ByusRIyA.js +1 -0
- mycode/server/static/assets/glimmer-ts-BfAWNZQY.js +1 -0
- mycode/server/static/assets/glsl-DplSGwfg.js +1 -0
- mycode/server/static/assets/gn-n2N0HUVH.js +1 -0
- mycode/server/static/assets/gnuplot-DdkO51Og.js +1 -0
- mycode/server/static/assets/go-C27-OAKa.js +1 -0
- mycode/server/static/assets/graphql-ChdNCCLP.js +1 -0
- mycode/server/static/assets/groovy-gcz8RCvz.js +1 -0
- mycode/server/static/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- mycode/server/static/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- mycode/server/static/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- mycode/server/static/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- mycode/server/static/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- mycode/server/static/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- mycode/server/static/assets/hack-i7_Ulhet.js +1 -0
- mycode/server/static/assets/haml-D5jkg6IW.js +1 -0
- mycode/server/static/assets/handlebars-BpdQsYii.js +1 -0
- mycode/server/static/assets/haskell-Df6bDoY_.js +1 -0
- mycode/server/static/assets/haxe-CzTSHFRz.js +1 -0
- mycode/server/static/assets/hcl-BWvSN4gD.js +1 -0
- mycode/server/static/assets/hjson-D5-asLiD.js +1 -0
- mycode/server/static/assets/hlsl-D3lLCCz7.js +1 -0
- mycode/server/static/assets/horizon-BUw7H-hv.js +1 -0
- mycode/server/static/assets/horizon-bright-CUuTKBJd.js +1 -0
- mycode/server/static/assets/houston-DnULxvSX.js +1 -0
- mycode/server/static/assets/html-derivative-DlHx6ybY.js +1 -0
- mycode/server/static/assets/html-pp8916En.js +1 -0
- mycode/server/static/assets/http-jrhK8wxY.js +1 -0
- mycode/server/static/assets/hurl-irOxFIW8.js +1 -0
- mycode/server/static/assets/hxml-Bvhsp5Yf.js +1 -0
- mycode/server/static/assets/hy-DFXneXwc.js +1 -0
- mycode/server/static/assets/imba-DGztddWO.js +1 -0
- mycode/server/static/assets/index-B4e4WQPq.css +1 -0
- mycode/server/static/assets/index-C2xTNJGd.js +203 -0
- mycode/server/static/assets/ini-BEwlwnbL.js +1 -0
- mycode/server/static/assets/java-CylS5w8V.js +1 -0
- mycode/server/static/assets/javascript-wDzz0qaB.js +1 -0
- mycode/server/static/assets/jinja-f2NsQr07.js +1 -0
- mycode/server/static/assets/jison-wvAkD_A8.js +1 -0
- mycode/server/static/assets/json-Cp-IABpG.js +1 -0
- mycode/server/static/assets/json5-C9tS-k6U.js +1 -0
- mycode/server/static/assets/jsonc-Des-eS-w.js +1 -0
- mycode/server/static/assets/jsonl-DcaNXYhu.js +1 -0
- mycode/server/static/assets/jsonnet-DFQXde-d.js +1 -0
- mycode/server/static/assets/jssm-C2t-YnRu.js +1 -0
- mycode/server/static/assets/jsx-g9-lgVsj.js +1 -0
- mycode/server/static/assets/julia-CxzCAyBv.js +1 -0
- mycode/server/static/assets/just-VxiPbLrw.js +1 -0
- mycode/server/static/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- mycode/server/static/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- mycode/server/static/assets/kanagawa-wave-DWedfzmr.js +1 -0
- mycode/server/static/assets/katex-DnJR2-55.css +1 -0
- mycode/server/static/assets/kdl-DV7GczEv.js +1 -0
- mycode/server/static/assets/kotlin-BdnUsdx6.js +1 -0
- mycode/server/static/assets/kusto-wEQ09or8.js +1 -0
- mycode/server/static/assets/laserwave-DUszq2jm.js +1 -0
- mycode/server/static/assets/latex-CWtU0Tv5.js +1 -0
- mycode/server/static/assets/lean-BZvkOJ9d.js +1 -0
- mycode/server/static/assets/less-B1dDrJ26.js +1 -0
- mycode/server/static/assets/light-plus-B7mTdjB0.js +1 -0
- mycode/server/static/assets/liquid-C0sCDyMI.js +1 -0
- mycode/server/static/assets/llvm-DjAJT7YJ.js +1 -0
- mycode/server/static/assets/log-2UxHyX5q.js +1 -0
- mycode/server/static/assets/logo-BtOb2qkB.js +1 -0
- mycode/server/static/assets/lua-BaeVxFsk.js +1 -0
- mycode/server/static/assets/luau-C-HG3fhB.js +1 -0
- mycode/server/static/assets/make-CHLpvVh8.js +1 -0
- mycode/server/static/assets/markdown-Cvjx9yec.js +1 -0
- mycode/server/static/assets/marko-DjSrsDqO.js +1 -0
- mycode/server/static/assets/material-theme-D5KoaKCx.js +1 -0
- mycode/server/static/assets/material-theme-darker-BfHTSMKl.js +1 -0
- mycode/server/static/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- mycode/server/static/assets/material-theme-ocean-CyktbL80.js +1 -0
- mycode/server/static/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- mycode/server/static/assets/matlab-D7o27uSR.js +1 -0
- mycode/server/static/assets/mdc-DTYItulj.js +1 -0
- mycode/server/static/assets/mdx-Cmh6b_Ma.js +1 -0
- mycode/server/static/assets/mermaid-mWjccvbQ.js +1 -0
- mycode/server/static/assets/min-dark-CafNBF8u.js +1 -0
- mycode/server/static/assets/min-light-CTRr51gU.js +1 -0
- mycode/server/static/assets/mipsasm-CKIfxQSi.js +1 -0
- mycode/server/static/assets/mojo-rZm6bMo-.js +1 -0
- mycode/server/static/assets/monokai-D4h5O-jR.js +1 -0
- mycode/server/static/assets/moonbit-_H4v1dQx.js +1 -0
- mycode/server/static/assets/move-IF9eRakj.js +1 -0
- mycode/server/static/assets/narrat-DRg8JJMk.js +1 -0
- mycode/server/static/assets/nextflow-C-mBbutL.js +1 -0
- mycode/server/static/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- mycode/server/static/assets/nginx-BpAMiNFr.js +1 -0
- mycode/server/static/assets/night-owl-C39BiMTA.js +1 -0
- mycode/server/static/assets/night-owl-light-CMTm3GFP.js +1 -0
- mycode/server/static/assets/nim-BIad80T-.js +1 -0
- mycode/server/static/assets/nix-CwoSXNpI.js +1 -0
- mycode/server/static/assets/nord-Ddv68eIx.js +1 -0
- mycode/server/static/assets/nushell-Cz2AlsmD.js +1 -0
- mycode/server/static/assets/objective-c-DXmwc3jG.js +1 -0
- mycode/server/static/assets/objective-cpp-CLxacb5B.js +1 -0
- mycode/server/static/assets/ocaml-C0hk2d4L.js +1 -0
- mycode/server/static/assets/odin-BBf5iR-q.js +1 -0
- mycode/server/static/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- mycode/server/static/assets/one-light-C3Wv6jpd.js +1 -0
- mycode/server/static/assets/openscad-C4EeE6gA.js +1 -0
- mycode/server/static/assets/pascal-D93ZcfNL.js +1 -0
- mycode/server/static/assets/perl-NvoQZIq0.js +1 -0
- mycode/server/static/assets/php-R6g_5hLQ.js +1 -0
- mycode/server/static/assets/pkl-u5AG7uiY.js +1 -0
- mycode/server/static/assets/plastic-3e1v2bzS.js +1 -0
- mycode/server/static/assets/plsql-ChMvpjG-.js +1 -0
- mycode/server/static/assets/po-BTJTHyun.js +1 -0
- mycode/server/static/assets/poimandres-CS3Unz2-.js +1 -0
- mycode/server/static/assets/polar-C0HS_06l.js +1 -0
- mycode/server/static/assets/postcss-CXtECtnM.js +1 -0
- mycode/server/static/assets/powerquery-CEu0bR-o.js +1 -0
- mycode/server/static/assets/powershell-Dpen1YoG.js +1 -0
- mycode/server/static/assets/prisma-Dd19v3D-.js +1 -0
- mycode/server/static/assets/prolog-CbFg5uaA.js +1 -0
- mycode/server/static/assets/proto-C7zT0LnQ.js +1 -0
- mycode/server/static/assets/pug-DKIMFp6K.js +1 -0
- mycode/server/static/assets/puppet-BMWR74SV.js +1 -0
- mycode/server/static/assets/purescript-CklMAg4u.js +1 -0
- mycode/server/static/assets/python-B6aJPvgy.js +1 -0
- mycode/server/static/assets/qml-3beO22l8.js +1 -0
- mycode/server/static/assets/qmldir-C8lEn-DE.js +1 -0
- mycode/server/static/assets/qss-IeuSbFQv.js +1 -0
- mycode/server/static/assets/r-Dspwwk_N.js +1 -0
- mycode/server/static/assets/racket-BqYA7rlc.js +1 -0
- mycode/server/static/assets/raku-DXvB9xmW.js +1 -0
- mycode/server/static/assets/razor-BDqjjVU7.js +1 -0
- mycode/server/static/assets/red-bN70gL4F.js +1 -0
- mycode/server/static/assets/reg-C-SQnVFl.js +1 -0
- mycode/server/static/assets/regexp-CDVJQ6XC.js +1 -0
- mycode/server/static/assets/rel-C3B-1QV4.js +1 -0
- mycode/server/static/assets/riscv-BM1_JUlF.js +1 -0
- mycode/server/static/assets/ron-D8l8udqQ.js +1 -0
- mycode/server/static/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- mycode/server/static/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- mycode/server/static/assets/rose-pine-qdsjHGoJ.js +1 -0
- mycode/server/static/assets/rosmsg-BJDFO7_C.js +1 -0
- mycode/server/static/assets/rst-CRjBmOyv.js +1 -0
- mycode/server/static/assets/ruby-Wjq7vjNf.js +1 -0
- mycode/server/static/assets/rust-B1yitclQ.js +1 -0
- mycode/server/static/assets/sas-cz2c8ADy.js +1 -0
- mycode/server/static/assets/sass-Cj5Yp3dK.js +1 -0
- mycode/server/static/assets/scala-C151Ov-r.js +1 -0
- mycode/server/static/assets/scheme-C98Dy4si.js +1 -0
- mycode/server/static/assets/scss-D5BDwBP9.js +1 -0
- mycode/server/static/assets/sdbl-DVxCFoDh.js +1 -0
- mycode/server/static/assets/shaderlab-Dg9Lc6iA.js +1 -0
- mycode/server/static/assets/shellscript-Yzrsuije.js +1 -0
- mycode/server/static/assets/shellsession-BADoaaVG.js +1 -0
- mycode/server/static/assets/slack-dark-BthQWCQV.js +1 -0
- mycode/server/static/assets/slack-ochin-DqwNpetd.js +1 -0
- mycode/server/static/assets/smalltalk-BERRCDM3.js +1 -0
- mycode/server/static/assets/snazzy-light-Bw305WKR.js +1 -0
- mycode/server/static/assets/solarized-dark-DXbdFlpD.js +1 -0
- mycode/server/static/assets/solarized-light-L9t79GZl.js +1 -0
- mycode/server/static/assets/solidity-rGO070M0.js +1 -0
- mycode/server/static/assets/soy-8wufbnw4.js +1 -0
- mycode/server/static/assets/sparql-rVzFXLq3.js +1 -0
- mycode/server/static/assets/splunk-BtCnVYZw.js +1 -0
- mycode/server/static/assets/sql-BLtJtn59.js +1 -0
- mycode/server/static/assets/ssh-config-_ykCGR6B.js +1 -0
- mycode/server/static/assets/stata-BH5u7GGu.js +1 -0
- mycode/server/static/assets/stylus-BEDo0Tqx.js +1 -0
- mycode/server/static/assets/surrealql-Bq5Q-fJD.js +1 -0
- mycode/server/static/assets/svelte-Cy7k_4gC.js +1 -0
- mycode/server/static/assets/swift-D82vCrfD.js +1 -0
- mycode/server/static/assets/synthwave-84-CbfX1IO0.js +1 -0
- mycode/server/static/assets/system-verilog-CnnmHF94.js +1 -0
- mycode/server/static/assets/systemd-4A_iFExJ.js +1 -0
- mycode/server/static/assets/talonscript-CkByrt1z.js +1 -0
- mycode/server/static/assets/tasl-QIJgUcNo.js +1 -0
- mycode/server/static/assets/tcl-dwOrl1Do.js +1 -0
- mycode/server/static/assets/templ-DhtptRzy.js +1 -0
- mycode/server/static/assets/terraform-BETggiCN.js +1 -0
- mycode/server/static/assets/tex-idrVyKtj.js +1 -0
- mycode/server/static/assets/tokyo-night-hegEt444.js +1 -0
- mycode/server/static/assets/toml-vGWfd6FD.js +1 -0
- mycode/server/static/assets/ts-tags-DQrlYJgV.js +1 -0
- mycode/server/static/assets/tsv-B_m7g4N7.js +1 -0
- mycode/server/static/assets/tsx-COt5Ahok.js +1 -0
- mycode/server/static/assets/turtle-BsS91CYL.js +1 -0
- mycode/server/static/assets/twig-xg9kU7Mw.js +1 -0
- mycode/server/static/assets/typescript-BPQ3VLAy.js +1 -0
- mycode/server/static/assets/typespec-CAFt9gP4.js +1 -0
- mycode/server/static/assets/typst-DHCkPAjA.js +1 -0
- mycode/server/static/assets/v-BcVCzyr7.js +1 -0
- mycode/server/static/assets/vala-CsfeWuGM.js +1 -0
- mycode/server/static/assets/vb-D17OF-Vu.js +1 -0
- mycode/server/static/assets/verilog-BQ8w6xss.js +1 -0
- mycode/server/static/assets/vesper-DU1UobuO.js +1 -0
- mycode/server/static/assets/vhdl-CeAyd5Ju.js +1 -0
- mycode/server/static/assets/viml-CJc9bBzg.js +1 -0
- mycode/server/static/assets/vitesse-black-Bkuqu6BP.js +1 -0
- mycode/server/static/assets/vitesse-dark-D0r3Knsf.js +1 -0
- mycode/server/static/assets/vitesse-light-CVO1_9PV.js +1 -0
- mycode/server/static/assets/vue-D2xRrEX4.js +1 -0
- mycode/server/static/assets/vue-html-AaS7Mt5G.js +1 -0
- mycode/server/static/assets/vue-vine-BoDAl6tE.js +1 -0
- mycode/server/static/assets/vyper-CDx5xZoG.js +1 -0
- mycode/server/static/assets/wasm-CG6Dc4jp.js +1 -0
- mycode/server/static/assets/wasm-MzD3tlZU.js +1 -0
- mycode/server/static/assets/wenyan-BV7otONQ.js +1 -0
- mycode/server/static/assets/wgsl-Dx-B1_4e.js +1 -0
- mycode/server/static/assets/wikitext-BhOHFoWU.js +1 -0
- mycode/server/static/assets/wit-5i3qLPDT.js +1 -0
- mycode/server/static/assets/wolfram-lXgVvXCa.js +1 -0
- mycode/server/static/assets/xml-sdJ4AIDG.js +1 -0
- mycode/server/static/assets/xsl-CtQFsRM5.js +1 -0
- mycode/server/static/assets/yaml-Buea-lGh.js +1 -0
- mycode/server/static/assets/zenscript-DVFEvuxE.js +1 -0
- mycode/server/static/assets/zig-VOosw3JB.js +1 -0
- mycode/server/static/favicon_slashes.svg +12 -0
- mycode/server/static/index.html +35 -0
- mycode_cli-0.1.0.dist-info/METADATA +186 -0
- mycode_cli-0.1.0.dist-info/RECORD +404 -0
- mycode_cli-0.1.0.dist-info/WHEEL +4 -0
- mycode_cli-0.1.0.dist-info/entry_points.txt +2 -0
- mycode_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"""In-process management for active web runs."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
import copy
|
|
7
|
+
import time
|
|
8
|
+
from collections.abc import AsyncIterator, Awaitable, Callable
|
|
9
|
+
from dataclasses import dataclass, field
|
|
10
|
+
from typing import Any, Literal, Protocol, cast
|
|
11
|
+
from uuid import uuid4
|
|
12
|
+
|
|
13
|
+
from mycode.core.agent import Event
|
|
14
|
+
from mycode.core.messages import ConversationMessage
|
|
15
|
+
|
|
16
|
+
RunStatus = Literal["running", "completed", "failed", "cancelled"]
|
|
17
|
+
FINISHED_RUN_TTL_SECONDS = 300
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ActiveRunError(RuntimeError):
|
|
21
|
+
"""Raised when a session already has a running task."""
|
|
22
|
+
|
|
23
|
+
def __init__(self, run_id: str):
|
|
24
|
+
super().__init__(run_id)
|
|
25
|
+
self.run_id = run_id
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class RunAgent(Protocol):
|
|
29
|
+
def cancel(self) -> None: ...
|
|
30
|
+
|
|
31
|
+
def achat(
|
|
32
|
+
self,
|
|
33
|
+
user_input: str | ConversationMessage,
|
|
34
|
+
*,
|
|
35
|
+
on_persist: Callable[[dict[str, Any]], Awaitable[None]] | None = None,
|
|
36
|
+
) -> AsyncIterator[Event]: ...
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass
|
|
40
|
+
class RunState:
|
|
41
|
+
"""State for one in-process web run."""
|
|
42
|
+
|
|
43
|
+
id: str
|
|
44
|
+
session_id: str
|
|
45
|
+
user_message: ConversationMessage
|
|
46
|
+
base_messages: list[ConversationMessage]
|
|
47
|
+
agent: RunAgent
|
|
48
|
+
status: RunStatus = "running"
|
|
49
|
+
error: str | None = None
|
|
50
|
+
events: list[dict[str, Any]] = field(default_factory=list)
|
|
51
|
+
next_seq: int = 1
|
|
52
|
+
task: asyncio.Task[None] | None = None
|
|
53
|
+
finished_at: float | None = None
|
|
54
|
+
condition: asyncio.Condition = field(default_factory=asyncio.Condition)
|
|
55
|
+
|
|
56
|
+
def info(self) -> dict[str, Any]:
|
|
57
|
+
"""Return the public run payload."""
|
|
58
|
+
|
|
59
|
+
payload = {
|
|
60
|
+
"id": self.id,
|
|
61
|
+
"session_id": self.session_id,
|
|
62
|
+
"status": self.status,
|
|
63
|
+
"last_seq": self.next_seq - 1,
|
|
64
|
+
}
|
|
65
|
+
if self.error:
|
|
66
|
+
payload["error"] = self.error
|
|
67
|
+
return payload
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class RunManager:
|
|
71
|
+
"""Track active session runs inside the current server process."""
|
|
72
|
+
|
|
73
|
+
def __init__(self) -> None:
|
|
74
|
+
self._lock = asyncio.Lock()
|
|
75
|
+
self._active_by_session: dict[str, RunState] = {}
|
|
76
|
+
self._runs_by_id: dict[str, RunState] = {}
|
|
77
|
+
|
|
78
|
+
async def start_run(
|
|
79
|
+
self,
|
|
80
|
+
*,
|
|
81
|
+
session_id: str,
|
|
82
|
+
user_message: ConversationMessage,
|
|
83
|
+
base_messages: list[ConversationMessage],
|
|
84
|
+
agent: RunAgent,
|
|
85
|
+
on_persist: Callable[[dict[str, Any]], Awaitable[None]],
|
|
86
|
+
) -> dict[str, Any]:
|
|
87
|
+
await self._prune_finished_runs()
|
|
88
|
+
|
|
89
|
+
async with self._lock:
|
|
90
|
+
existing = self._active_by_session.get(session_id)
|
|
91
|
+
if existing:
|
|
92
|
+
raise ActiveRunError(existing.id)
|
|
93
|
+
|
|
94
|
+
state = RunState(
|
|
95
|
+
id=uuid4().hex,
|
|
96
|
+
session_id=session_id,
|
|
97
|
+
user_message=copy.deepcopy(user_message),
|
|
98
|
+
base_messages=copy.deepcopy(base_messages),
|
|
99
|
+
agent=agent,
|
|
100
|
+
)
|
|
101
|
+
state.task = asyncio.create_task(self._run(state, on_persist), name=f"mycode-run-{state.id}")
|
|
102
|
+
self._active_by_session[session_id] = state
|
|
103
|
+
self._runs_by_id[state.id] = state
|
|
104
|
+
return state.info()
|
|
105
|
+
|
|
106
|
+
async def get_run(self, run_id: str) -> RunState | None:
|
|
107
|
+
await self._prune_finished_runs()
|
|
108
|
+
async with self._lock:
|
|
109
|
+
return self._runs_by_id.get(run_id)
|
|
110
|
+
|
|
111
|
+
async def snapshot_session(self, session_id: str) -> dict[str, Any] | None:
|
|
112
|
+
"""Return a reconnect snapshot for the active session."""
|
|
113
|
+
|
|
114
|
+
async with self._lock:
|
|
115
|
+
state = self._active_by_session.get(session_id)
|
|
116
|
+
|
|
117
|
+
if not state:
|
|
118
|
+
return None
|
|
119
|
+
|
|
120
|
+
async with state.condition:
|
|
121
|
+
messages = copy.deepcopy(state.base_messages)
|
|
122
|
+
messages.append(copy.deepcopy(state.user_message))
|
|
123
|
+
return {
|
|
124
|
+
"run": state.info(),
|
|
125
|
+
"messages": messages,
|
|
126
|
+
"pending_events": copy.deepcopy(state.events),
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async def cancel_run(self, run_id: str) -> dict[str, Any] | None:
|
|
130
|
+
state = await self.get_run(run_id)
|
|
131
|
+
if not state:
|
|
132
|
+
return None
|
|
133
|
+
state.agent.cancel()
|
|
134
|
+
return state.info()
|
|
135
|
+
|
|
136
|
+
async def has_active_run(self, session_id: str) -> bool:
|
|
137
|
+
async with self._lock:
|
|
138
|
+
return session_id in self._active_by_session
|
|
139
|
+
|
|
140
|
+
async def _run(self, state: RunState, on_persist: Callable[[dict[str, Any]], Awaitable[None]]) -> None:
|
|
141
|
+
"""Run the agent and store streamed events."""
|
|
142
|
+
|
|
143
|
+
last_error: str | None = None
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
stream = cast(AsyncIterator[Event], state.agent.achat(state.user_message, on_persist=on_persist))
|
|
147
|
+
async for event in stream:
|
|
148
|
+
if event.type == "error":
|
|
149
|
+
last_error = str(event.data.get("message") or "unknown error")
|
|
150
|
+
await self._append_event(state, event)
|
|
151
|
+
except Exception as exc: # pragma: no cover - defensive
|
|
152
|
+
last_error = str(exc)
|
|
153
|
+
await self._append_event(state, Event("error", {"message": last_error}))
|
|
154
|
+
|
|
155
|
+
if last_error == "cancelled":
|
|
156
|
+
await self._finish_run(state, status="cancelled", error=last_error)
|
|
157
|
+
return
|
|
158
|
+
|
|
159
|
+
if last_error:
|
|
160
|
+
await self._finish_run(state, status="failed", error=last_error)
|
|
161
|
+
return
|
|
162
|
+
|
|
163
|
+
await self._finish_run(state, status="completed")
|
|
164
|
+
|
|
165
|
+
async def _append_event(self, state: RunState, event: Event) -> None:
|
|
166
|
+
async with state.condition:
|
|
167
|
+
payload = {"seq": state.next_seq, "type": event.type, **event.data}
|
|
168
|
+
state.next_seq += 1
|
|
169
|
+
state.events.append(payload)
|
|
170
|
+
state.condition.notify_all()
|
|
171
|
+
|
|
172
|
+
async def _finish_run(self, state: RunState, *, status: RunStatus, error: str | None = None) -> None:
|
|
173
|
+
async with state.condition:
|
|
174
|
+
state.status = status
|
|
175
|
+
state.error = error
|
|
176
|
+
state.finished_at = time.monotonic()
|
|
177
|
+
state.condition.notify_all()
|
|
178
|
+
|
|
179
|
+
async with self._lock:
|
|
180
|
+
current = self._active_by_session.get(state.session_id)
|
|
181
|
+
if current is state:
|
|
182
|
+
self._active_by_session.pop(state.session_id, None)
|
|
183
|
+
|
|
184
|
+
async def _prune_finished_runs(self) -> None:
|
|
185
|
+
"""Drop finished runs after the reconnect window."""
|
|
186
|
+
|
|
187
|
+
now = time.monotonic()
|
|
188
|
+
async with self._lock:
|
|
189
|
+
stale_run_ids = [
|
|
190
|
+
run_id
|
|
191
|
+
for run_id, state in self._runs_by_id.items()
|
|
192
|
+
if state.finished_at is not None and (now - state.finished_at) >= FINISHED_RUN_TTL_SECONDS
|
|
193
|
+
]
|
|
194
|
+
for run_id in stale_run_ids:
|
|
195
|
+
self._runs_by_id.pop(run_id, None)
|
mycode/server/schemas.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""Pydantic models for API requests and responses."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, Field
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ChatInputBlock(BaseModel):
|
|
11
|
+
"""One user input block for /chat."""
|
|
12
|
+
|
|
13
|
+
type: Literal["text", "image"]
|
|
14
|
+
text: str | None = None
|
|
15
|
+
path: str | None = None
|
|
16
|
+
data: str | None = None # inline base64 (web upload)
|
|
17
|
+
mime_type: str | None = None
|
|
18
|
+
name: str | None = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ChatRequest(BaseModel):
|
|
22
|
+
"""Request body for /chat."""
|
|
23
|
+
|
|
24
|
+
session_id: str = "default"
|
|
25
|
+
message: str | None = None
|
|
26
|
+
input: list[ChatInputBlock] | None = None
|
|
27
|
+
provider: str | None = None # provider id, or a configured provider alias
|
|
28
|
+
model: str | None = None
|
|
29
|
+
cwd: str | None = None
|
|
30
|
+
api_key: str | None = None
|
|
31
|
+
api_base: str | None = None
|
|
32
|
+
reasoning_effort: str | None = None
|
|
33
|
+
rewind_to: int | None = Field(default=None, description="Visible message index for rewind.")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class SessionCreateRequest(BaseModel):
|
|
37
|
+
"""Request body for /sessions."""
|
|
38
|
+
|
|
39
|
+
title: str | None = None
|
|
40
|
+
provider: str | None = None
|
|
41
|
+
model: str | None = None
|
|
42
|
+
cwd: str | None = None
|
|
43
|
+
api_base: str | None = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ToolCallPayload(BaseModel):
|
|
47
|
+
"""Tool call data inside a stream event."""
|
|
48
|
+
|
|
49
|
+
id: str
|
|
50
|
+
name: str
|
|
51
|
+
input: dict[str, Any]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class StreamEvent(BaseModel):
|
|
55
|
+
"""SSE event payload for chat streaming."""
|
|
56
|
+
|
|
57
|
+
seq: int | None = None
|
|
58
|
+
type: str
|
|
59
|
+
delta: str | None = None # text/reasoning
|
|
60
|
+
tool_call: ToolCallPayload | None = None # tool_start
|
|
61
|
+
tool_use_id: str | None = None
|
|
62
|
+
output: str | None = None # tool_output
|
|
63
|
+
model_text: str | None = None # tool_done
|
|
64
|
+
display_text: str | None = None # tool_done
|
|
65
|
+
is_error: bool | None = None # tool_done
|
|
66
|
+
message: str | None = None # error
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{r as k,h as A,a as E,l as T,j as y,c as D,S as O}from"./index-C2xTNJGd.js";class q{diff(e,n,t={}){let o;typeof t=="function"?(o=t,t={}):"callback"in t&&(o=t.callback);const c=this.castInput(e,t),u=this.castInput(n,t),a=this.removeEmpty(this.tokenize(c,t)),s=this.removeEmpty(this.tokenize(u,t));return this.diffWithOptionsObj(a,s,t,o)}diffWithOptionsObj(e,n,t,o){var c;const u=f=>{if(f=this.postProcess(f,t),o){setTimeout(function(){o(f)},0);return}else return f},a=n.length,s=e.length;let r=1,l=a+s;t.maxEditLength!=null&&(l=Math.min(l,t.maxEditLength));const v=(c=t.timeout)!==null&&c!==void 0?c:1/0,h=Date.now()+v,d=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(d[0],n,e,0,t);if(d[0].oldPos+1>=s&&m+1>=a)return u(this.buildValues(d[0].lastComponent,n,e));let g=-1/0,x=1/0;const _=()=>{for(let f=Math.max(g,-r);f<=Math.min(x,r);f+=2){let j;const P=d[f-1],C=d[f+1];P&&(d[f-1]=void 0);let b=!1;if(C){const p=C.oldPos-f;b=C&&0<=p&&p<a}const I=P&&P.oldPos+1<s;if(!b&&!I){d[f]=void 0;continue}if(!I||b&&P.oldPos<C.oldPos?j=this.addToPath(C,!0,!1,0,t):j=this.addToPath(P,!1,!0,1,t),m=this.extractCommon(j,n,e,f,t),j.oldPos+1>=s&&m+1>=a)return u(this.buildValues(j.lastComponent,n,e))||!0;d[f]=j,j.oldPos+1>=s&&(x=Math.min(x,f-1)),m+1>=a&&(g=Math.max(g,f+1))}r++};if(o)(function f(){setTimeout(function(){if(r>l||Date.now()>h)return o(void 0);_()||f()},0)})();else for(;r<=l&&Date.now()<=h;){const f=_();if(f)return f}}addToPath(e,n,t,o,c){const u=e.lastComponent;return u&&!c.oneChangePerToken&&u.added===n&&u.removed===t?{oldPos:e.oldPos+o,lastComponent:{count:u.count+1,added:n,removed:t,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:n,removed:t,previousComponent:u}}}extractCommon(e,n,t,o,c){const u=n.length,a=t.length;let s=e.oldPos,r=s-o,l=0;for(;r+1<u&&s+1<a&&this.equals(t[s+1],n[r+1],c);)r++,s++,l++,c.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!c.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,r}equals(e,n,t){return t.comparator?t.comparator(e,n):e===n||!!t.ignoreCase&&e.toLowerCase()===n.toLowerCase()}removeEmpty(e){const n=[];for(let t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n}castInput(e,n){return e}tokenize(e,n){return Array.from(e)}join(e){return e.join("")}postProcess(e,n){return e}get useLongestToken(){return!1}buildValues(e,n,t){const o=[];let c;for(;e;)o.push(e),c=e.previousComponent,delete e.previousComponent,e=c;o.reverse();const u=o.length;let a=0,s=0,r=0;for(;a<u;a++){const l=o[a];if(l.removed)l.value=this.join(t.slice(r,r+l.count)),r+=l.count;else{if(!l.added&&this.useLongestToken){let v=n.slice(s,s+l.count);v=v.map(function(h,d){const m=t[r+d];return m.length>h.length?m:h}),l.value=this.join(v)}else l.value=this.join(n.slice(s,s+l.count));s+=l.count,l.added||(r+=l.count)}}return o}}class M extends q{constructor(){super(...arguments),this.tokenize=$}equals(e,n,t){return t.ignoreWhitespace?((!t.newlineIsToken||!e.includes(`
|
|
2
|
+
`))&&(e=e.trim()),(!t.newlineIsToken||!n.includes(`
|
|
3
|
+
`))&&(n=n.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(e.endsWith(`
|
|
4
|
+
`)&&(e=e.slice(0,-1)),n.endsWith(`
|
|
5
|
+
`)&&(n=n.slice(0,-1))),super.equals(e,n,t)}}const S=new M;function B(i,e,n){return S.diff(i,e,n)}function $(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,`
|
|
6
|
+
`));const n=[],t=i.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(let o=0;o<t.length;o++){const c=t[o];o%2&&!e.newlineIsToken?n[n.length-1]+=c:n.push(c)}return n}const z={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",html:"html",css:"css",scss:"scss",less:"less",json:"json",jsonc:"jsonc",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",mdx:"mdx",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",graphql:"graphql",gql:"graphql",xml:"xml",svg:"xml",vue:"vue",svelte:"svelte"};function H(i){const e=i?.split(".").pop()?.toLowerCase();return e?z[e]??"text":"text"}function L(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function R(i){const e=i.indexOf("<code>"),n=i.lastIndexOf("</code>");return e===-1||n===-1?[]:i.slice(e+6,n).split('<span class="line">').slice(1).map(u=>{const a=u.lastIndexOf("</span>");return a===-1?u:u.slice(0,a)})}function W(i){if(!i||typeof i!="string")return null;try{const e=JSON.parse(i);if(e.status==="ok"&&typeof e.start_line=="number"){const n=Array.isArray(e.context_before)?e.context_before.filter(o=>typeof o=="string"):void 0,t=Array.isArray(e.context_after)?e.context_after.filter(o=>typeof o=="string"):void 0;return{status:"ok",start_line:e.start_line,...n?{context_before:n}:{},...t?{context_after:t}:{}}}}catch{}return null}function N(i,e,n){const t=D(i,e,{lang:n,...O});return t?R(t):e.split(`
|
|
7
|
+
`).map(L)}function V(i,e,n,t,o){const c=B(i||"",e||""),u=o?.start_line??1,a=o?.context_before??[],s=o?.context_after??[];let r=u-a.length,l=0,v=0;const h=[];for(let d=0;d<a.length;d++){const m=a[d];m!==void 0&&h.push({key:`ctx-before-${r}`,type:"context",ln:r++,html:L(m)})}for(const d of c){const m=d.value.replace(/\n$/,"").split(`
|
|
8
|
+
`);if(d.removed)for(const g of m){const x=l;h.push({key:`removed-${x}`,type:"removed",ln:null,html:n[l++]??L(g)})}else if(d.added)for(const g of m){const x=v;h.push({key:`added-${x}`,type:"added",ln:r++,html:t[v++]??L(g)})}else for(const g of m){const x=l;h.push({key:`context-${r}-${x}`,type:"context",ln:r++,html:n[l++]??L(g)}),v++}}for(let d=0;d<s.length;d++){const m=s[d];m!==void 0&&h.push({key:`ctx-after-${r}`,type:"context",ln:r++,html:L(m)})}return h}function J({path:i,oldText:e,newText:n,result:t}){const o=k.use(A),c=E(H(i));let a=o.getLoadedLanguages().includes(c)?c:"text";if(a==="text"&&c!=="text"){const p=T(o,c),w=k.use(p);w&&(a=w)}const s=W(t),r=s?.context_before?.join(`
|
|
9
|
+
`)??"",l=s?.context_after?.join(`
|
|
10
|
+
`)??"",v=[r,e||"",l].filter(Boolean).join(`
|
|
11
|
+
`),h=N(o,v,a),d=[r,n||"",l].filter(Boolean).join(`
|
|
12
|
+
`),m=N(o,d,a),g=s?.context_before?.length??0,x=s?.context_after?.length??0,_=h.slice(g,h.length-x),f=m.slice(g,m.length-x),j=s?.context_before??[],P=s?.context_after??[],C=s?{...s,context_before:j.map((p,w)=>h[w]??L(p)),context_after:P.map((p,w)=>h[h.length-x+w]??L(p))}:null,b=V(e,n,_,f,C),I=s!==null;return y.jsxs("div",{className:"rounded-md bg-code overflow-hidden",children:[i&&y.jsx("div",{className:"px-3 pt-2",children:y.jsx("span",{className:"text-[11px] font-mono text-muted-foreground/30 tracking-wider select-none",children:i})}),y.jsx("div",{className:"overflow-x-auto scrollbar-subtle",children:y.jsx("table",{className:"w-full border-collapse",style:{fontFamily:'"DM Mono", "JetBrains Mono", monospace',fontSize:"13px",lineHeight:"1.5"},children:y.jsx("tbody",{children:b.map(p=>y.jsxs("tr",{className:p.type==="removed"?"diff-line-removed":p.type==="added"?"diff-line-added":"",children:[I&&y.jsx("td",{className:"diff-ln select-none w-8 min-w-8 text-right align-top pr-2 text-muted-foreground/20 tabular-nums",children:p.ln??""}),y.jsx("td",{className:`select-none w-5 min-w-5 text-center align-top ${p.type==="removed"?"diff-gutter-removed":p.type==="added"?"diff-gutter-added":"text-transparent"}`,children:p.type==="removed"?"−":p.type==="added"?"+":" "}),y.jsx("td",{className:"pr-3 whitespace-pre",children:y.jsx("span",{className:"shiki",dangerouslySetInnerHTML:{__html:p.html}})})]},p.key))})})})]})}export{J as default};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse('{"displayName":"ABAP","fileTypes":["abap","ABAP"],"foldingStartMarker":"/\\\\*\\\\*|\\\\{\\\\s*$","foldingStopMarker":"\\\\*\\\\*/|^\\\\s*}","name":"abap","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.abap"}},"match":"^\\\\*.*\\\\n?","name":"comment.line.full.abap"},{"captures":{"1":{"name":"punctuation.definition.comment.abap"}},"match":"\\".*\\\\n?","name":"comment.line.partial.abap"},{"match":"(?<!\\\\S)##.*?(?=([,.:\\\\s]))","name":"comment.line.pragma.abap"},{"match":"(?i)(?<=[-~\\\\s])(?<=[-=]>)([/_a-z][/-9_a-z]*)(?=\\\\s+(?:|[-*+/]|&&?)=\\\\s+)","name":"variable.other.abap"},{"match":"\\\\b[0-9]+(\\\\b|[,.])","name":"constant.numeric.abap"},{"match":"(?i)(^|\\\\s+)((P(?:UBLIC|RIVATE|ROTECTED))\\\\sSECTION)(?=\\\\s+|[.:])","name":"storage.modifier.class.abap"},{"begin":"(?<!\\\\\\\\)(\\\\|)(.*?)","beginCaptures":{"1":{"name":"constant.character.escape.abap"}},"end":"(?<!\\\\\\\\)(\\\\||(\\\\\\\\\\\\\\\\\\\\|))","endCaptures":{"1":{"name":"constant.character.escape.abap"}},"name":"string.interpolated.abap","patterns":[{"match":"(\\\\{ )|( })","name":"constant.character.escape"},{"match":"\\\\\\\\\\\\|","name":"constant.character.escape.abap"},{"match":"(?i)(?<=\\\\s)(align|alpha|case|country|currency|date|decimals|exponent|number|pad|sign|style|time|timestamp|timezone|width|xsd|zero)(?=\\\\s=)","name":"entity.name.property.stringtemplate.abap"},{"match":"(?i)(?<==\\\\s)(center|engineering|environment|in|iso|left|leftplus|leftspace|lower|no|out|raw|right|rightplus|rightspace|scale_preserving|scale_preserving_scientific|scientific|scientific_with_leading_zero|sign_as_postfix|simple|space|upper|user|yes)(?=\\\\s)","name":"entity.value.property.stringtemplate.abap"}]},{"begin":"\'","end":"\'","name":"string.quoted.single.abap","patterns":[{"match":"\'\'","name":"constant.character.escape.abap"}]},{"begin":"`","end":"`","name":"string.quoted.single.abap","patterns":[{"match":"``","name":"constant.character.escape.abap"}]},{"begin":"(?i)^\\\\s*(class)\\\\s([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.block.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","name":"meta.block.begin.implementation.abap","patterns":[{"match":"(?i)(^|\\\\s+)(definition|implementation|public|inheriting\\\\s+from|final|deferred|abstract|shared\\\\s+memory\\\\s+enabled|(global|local)*\\\\s*friends|(create\\\\s+(p(?:ublic|rotected|rivate)))|for\\\\s+behavior\\\\s+of|for\\\\s+testing|risk\\\\s+level\\\\s+(critical|dangerous|harmless))|duration\\\\s(short|medium|long)(?=\\\\s+|\\\\.)","name":"storage.modifier.class.abap"},{"begin":"(?=[A-Z_a-z][0-9A-Z_a-z]*)","contentName":"entity.name.type.block.abap","end":"(?![0-9A-Z_a-z])","patterns":[{"include":"#generic_names"}]}]},{"begin":"(?i)^\\\\s*(method)\\\\s(?:([/_a-z][/-9_a-z]*)~)?([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"},"3":{"name":"entity.name.function.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(BY(?:\\\\s+DATABASE(\\\\s+PROCEDURE|\\\\s+FUNCTION|\\\\s+GRAPH\\\\s+WORKSPACE)|\\\\s+KERNEL\\\\s+MODULE))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=^|\\\\s)(FOR\\\\s+(HDB|LLANG))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=\\\\s)(OPTIONS\\\\s+(READ-ONLY|DETERMINISTIC|SUPPRESS\\\\s+SYNTAX\\\\s+ERRORS))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=^|\\\\s)(LANGUAGE\\\\s+(SQLSCRIPT|SQL|GRAPH))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"captures":{"1":{"name":"storage.modifier.method.abap"}},"match":"(?i)(?<=\\\\s)(USING)\\\\s+([/_a-z][/-9=>_a-z]*)+(?=\\\\s+|\\\\.)"},{"begin":"(?=[A-Z_a-z][0-9A-Z_a-z]*)","end":"(?![0-9A-Z_a-z])","patterns":[{"include":"#generic_names"}]}]},{"begin":"(?i)^\\\\s*(INTERFACE)\\\\s([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(DEFERRED|PUBLIC)(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"}]},{"begin":"(?i)^\\\\s*(FORM)\\\\s([/_a-z][-/-9?_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(USING|TABLES|CHANGING|RAISING|IMPLEMENTATION|DEFINITION)(?=\\\\s+|\\\\.)","name":"storage.modifier.form.abap"},{"include":"#abaptypes"},{"include":"#keywords_followed_by_braces"}]},{"match":"(?i)(end(?:class|method|form|interface))","name":"storage.type.block.end.abap"},{"match":"(?i)(<[A-Z_a-z][0-9A-Z_a-z]*>)","name":"variable.other.field.symbol.abap"},{"include":"#keywords"},{"include":"#abap_constants"},{"include":"#reserved_names"},{"include":"#operators"},{"include":"#builtin_functions"},{"include":"#abaptypes"},{"include":"#system_fields"},{"include":"#sql_functions"},{"include":"#sql_types"}],"repository":{"abap_constants":{"match":"(?i)(?<=\\\\s)(initial|null|@?space|@?abap_true|@?abap_false|@?abap_undefined|table_line|%_final|%_hints|%_predefined|col_background|col_group|col_heading|col_key|col_negative|col_normal|col_positive|col_total|adabas|as400|db2|db6|hdb|oracle|sybase|mssqlnt|pos_low|pos_high)(?=[,.\\\\s])","name":"constant.language.abap"},"abaptypes":{"patterns":[{"match":"(?i)\\\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|decfloat|decfloat16|decfloat34|utclong|simple|int8|[cdfinptx])(?=[,.\\\\s])","name":"support.type.abap"},{"match":"(?i)\\\\s(TYPE|REF|TO|LIKE|LINE|OF|STRUCTURE|STANDARD|SORTED|HASHED|INDEX|TABLE|WITH|UNIQUE|NON-UNIQUE|SECONDARY|DEFAULT|KEY)(?=[,.\\\\s])","name":"keyword.control.simple.abap"}]},"arithmetic_operator":{"match":"(?i)(?<=\\\\s)([-*+]|\\\\*\\\\*|[%/]|DIV|MOD|BIT-AND|BIT-OR|BIT-XOR|BIT-NOT)(?=\\\\s)","name":"keyword.control.simple.abap"},"builtin_functions":{"match":"(?i)(?<=\\\\s)(abs|sign|ceil|floor|trunc|frac|acos|asin|atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt|strlen|xstrlen|charlen|lines|numofchar|dbmaxlen|round|rescale|nmax|nmin|cmax|cmin|boolc|boolx|xsdbool|contains|contains_any_of|contains_any_not_of|matches|line_exists|ipow|char_off|count|count_any_of|count_any_not_of|distance|condense|concat_lines_of|escape|find|find_end|find_any_of|find_any_not_of|insert|match|repeat|replace|reverse|segment|shift_left|shift_right|substring|substring_after|substring_from|substring_before|substring_to|to_upper|to_lower|to_mixed|from_mixed|translate|bit-set|line_index)(?=\\\\()","name":"entity.name.function.builtin.abap"},"comparison_operator":{"match":"(?i)(?<=\\\\s)([<>]|<=|>=|=|<>|eq|ne|lt|le|gt|ge|cs|cp|co|cn|ca|na|ns|np|byte-co|byte-cn|byte-ca|byte-na|byte-cs|byte-ns|[moz])(?=\\\\s)","name":"keyword.control.simple.abap"},"control_keywords":{"match":"(?i)(^|\\\\s)(at|case|catch|continue|do|elseif|else|endat|endcase|endcatch|enddo|endif|endloop|endon|endtry|endwhile|if|loop|on|raise|try|while)(?=[.:\\\\s])","name":"keyword.control.flow.abap"},"generic_names":{"match":"[A-Z_a-z][0-9A-Z_a-z]*"},"keywords":{"patterns":[{"include":"#main_keywords"},{"include":"#text_symbols"},{"include":"#control_keywords"},{"include":"#keywords_followed_by_braces"}]},"keywords_followed_by_braces":{"captures":{"1":{"name":"keyword.control.simple.abap"},"2":{"name":"variable.other.abap"}},"match":"(?i)\\\\b(data|value|field-symbol|final|reference|resumable)\\\\((<?[/_a-z][/-9_a-z]*>?)\\\\)"},"logical_operator":{"match":"(?i)(?<=\\\\s)(not|or|and)(?=\\\\s)","name":"keyword.control.simple.abap"},"main_keywords":{"match":"(?i)(?<=^|\\\\s)(abap-source|abstract|accept|accepting|access|according|action|activation|actual|add|add-corresponding|adjacent|after|alias|aliases|all|allocate|amdp|analysis|analyzer|append|appending|application|archive|area|arithmetic|as|ascending|assert|assign|assigned|assigning|association|asynchronous|at|attributes|authority|authority-check|authorization|auto|back|background|backward|badi|base|before|begin|behavior|between|binary|bit|blanks??|blocks??|bound|boundaries|bounds|boxed|break|break-point|buffer|by|bypassing|byte|byte-order|call|calling|cast|casting|cds|centered|change|changing|channels|char-to-hex|character|check|checkbox|cid|circular|class|class-data|class-events|class-methods??|class-pool|cleanup|clear|clients??|clock|clone|close|cnt|code|collect|color|column|comments??|commit|common|communication|comparing|components??|compression|compute|concatenate|cond|condense|condition|connection|constants??|contexts??|controls??|conv|conversion|convert|copy|corresponding|count|country|cover|create|currency|current|cursor|customer-function|data|database|datainfo|dataset|date|daylight|ddl|deallocate|decimals|declarations|deep|default|deferred|define|delete|deleting|demand|descending|describe|destination|detail|determine|dialog|did|directory|discarding|display|display-mode|distance|distinct|divide|divide-corresponding|dummy|duplicates??|duration|during|dynpro|edit|editor-call|empty|enabled|enabling|encoding|end|end-enhancement-section|end-of-definition|end-of-page|end-of-selection|end-test-injection|end-test-seam|endenhancement|endexec|endfunction|endian|ending|endmodule|endprovide|endselect|endwith|enhancement|enhancement-point|enhancement-section|enhancements|entities|entity|entries|entry|enum|equiv|errors|escape|escaping|events??|exact|except|exception|exception-table|exceptions|excluding|exec|execute|exists|exit|exit-command|expanding|explicit|exponent|export|exporting|extended|extension|extract|fail|failed|features|fetch|field|field-groups|field-symbols|fields|file|fill|filters??|final|find|first|first-line|fixed-point|flush|following|for|format|forward|found|frames??|free|from|full|function|function-pool|generate|get|giving|graph|groups??|handler??|hashed|having|headers??|heading|help-id|help-request|hide|hint|hold|hotspot|icon|id|identification|identifier|ignore|ignoring|immediately|implemented|implicit|import|importing|in|inactive|incl|includes??|including|increment|index|index-line|indicators|infotypes|inheriting|init|initial|initialization|inner|input|insert|instances??|intensified|interface|interface-pool|interfaces|internal|intervals|into|inverse|inverted-date|is|job|join|keep|keeping|kernel|keys??|keywords|kind|language|last|late|layout|leading|leave|left|left-justified|legacy|length|let|levels??|like|line|line-count|line-selection|line-size|linefeed|lines|link|list|list-processing|listbox|load|load-of-program|locale??|locks??|log-point|logical|lower|mapped|mapping|margin|mark|mask|match|matchcode|maximum|members|memory|mesh|message|message-id|messages|messaging|methods??|mode|modif|modifier|modify|module|move|move-corresponding|multiply|multiply-corresponding|name|nametab|native|nested|nesting|new|new-line|new-page|new-section|next|no-display|no-extension|no-gaps??|no-grouping|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unicode|non-unique|number|objects??|objmgr|obligatory|occurences??|occurrences??|occurs|of|offset|on|only|open|optional|options??|order|others|out|outer|output|output-length|overflow|overlay|pack|package|padding|page|parameter|parameter-table|parameters|part|partially|pcre|perform|performing|permissions|pf-status|places|pool|position|pragmas|preceding|precompiled|preferred|preserving|primary|print|print-control|private|privileged|procedure|process|program|property|protected|provide|push|pushbutton|put|query|queue-only|queueonly|quickinfo|radiobutton|raising|ranges??|read|read-only|received??|receiving|redefinition|reduce|ref|reference|refresh|regex|reject|renaming|replace|replacement|replacing|report|reported|request|requested|required|reserve|reset|resolution|respecting|response|restore|results??|resumable|resume|retry|return|returning|right|right-justified|rollback|rows|rp-provide-from-last|run|sap|sap-spool|save|saving|scan|screen|scroll|scroll-boundary|scrolling|search|seconds|section|select|select-options|selection|selection-screen|selection-sets??|selection-table|selections|send|separated??|session|set|shared|shift|shortdump|shortdump-id|sign|simple|simulation|single|size|skip|skipping|smart|some|sort|sortable|sorted|source|specified|split|spool|spots|sql|stable|stamp|standard|start-of-selection|starting|state|statements??|statics??|statusinfo|step|step-loop|stop|structures??|style|subkey|submatches|submit|subroutine|subscreen|substring|subtract|subtract-corresponding|suffix|sum|summary|supplied|supply|suppress|switch|symbol|syntax-check|syntax-trace|system-call|system-exceptions|tab|tabbed|tables??|tableview|tabstrip|target|tasks??|test|test-injection|test-seam|testing|text|textpool|then|throw|times??|title|titlebar|to|tokens|top-lines|top-of-page|trace-file|trace-table|trailing|transaction|transfer|transformation|translate|transporting|trmac|truncate|truncation|type|type-pools??|types|uline|unassign|unbounded|under|unicode|union|unique|unit|unix|unpack|until|unwind|up|update|upper|user|user-command|using|utf-8|uuid|valid|validate|value|value-request|values|vary|varying|version|via|visible|wait|when|where|windows??|with|with-heading|with-title|without|word|work|workspace|write|xml|zone)(?=[,.:\\\\s])","name":"keyword.control.simple.abap"},"operators":{"patterns":[{"include":"#other_operator"},{"include":"#arithmetic_operator"},{"include":"#comparison_operator"},{"include":"#logical_operator"}]},"other_operator":{"match":"(?<=\\\\s)(&&?|\\\\?=|\\\\+=|-=|/=|\\\\*=|&&=|&=)(?=\\\\s)","name":"keyword.control.simple.abap"},"reserved_names":{"match":"(?i)(?<=\\\\s)(me|super)(?=[,.\\\\s]|->)","name":"constant.language.abap"},"sql_functions":{"match":"(?i)(?<=\\\\s)(abap_system_timezone|abap_user_timezone|abs|add_days|add_months|allow_precision_loss|as_geo_json|avg|bintohex|cast|ceil|coalesce|concat_with_space|concat|corr_spearman|corr|count|currency_conversion|datn_add_days|datn_add_months|datn_days_between|dats_add_days|dats_add_months|dats_days_between|dats_from_datn|dats_is_valid|dats_tims_to_tstmp|dats_to_datn|dayname|days_between|dense_rank|division|div|extract_day|extract_hour|extract_minute|extract_month|extract_second|extract_year|first_value|floor|grouping|hextobin|initcap|instr|is_valid|lag|last_value|lead|left|length|like_regexpr|locate_regexpr_after|locate_regexpr|locate|lower|lpad|ltrim|max|median|min|mod|monthname|ntile|occurrences_regexpr|over|product|rank|replace_regexpr|replace|rigth|round|row_number|rpad|rtrim|stddev|string_agg|substring_regexpr|substring|sum|tims_from_timn|tims_is_valid|tims_to_timn|to_blob|to_clob|tstmp_add_seconds|tstmp_current_utctimestamp|tstmp_is_valid|tstmp_seconds_between|tstmp_to_dats|tstmp_to_dst|tstmp_to_tims|tstmpl_from_utcl|tstmpl_to_utcl|unit_conversion|upper|utcl_add_seconds|utcl_current|utcl_seconds_between|uuid|var|weekday)(?=\\\\()","name":"entity.name.function.sql.abap"},"sql_types":{"match":"(?i)(?<=\\\\s)(char|clnt|cuky|curr|datn|dats|dec|decfloat16|decfloat34|fltp|int1|int2|int4|int8|lang|numc|quan|raw|sstring|timn|tims|unit|utclong)(?=[()\\\\s])","name":"entity.name.type.sql.abap"},"system_fields":{"captures":{"1":{"name":"variable.language.abap"},"2":{"name":"variable.language.abap"}},"match":"(?i)\\\\b(sy)-(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgli|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=[.\\\\s])"},"text_symbols":{"captures":{"1":{"name":"keyword.control.simple.abap"},"2":{"name":"constant.numeric.abap"}},"match":"(?i)(?<=^|\\\\s)(text)-([0-9A-Z]{1,3})(?=[,.:\\\\s])"}},"scopeName":"source.abap"}')),a=[e];export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse(`{"displayName":"ActionScript","fileTypes":["as"],"name":"actionscript-3","patterns":[{"include":"#comments"},{"include":"#package"},{"include":"#class"},{"include":"#interface"},{"include":"#namespace_declaration"},{"include":"#import"},{"include":"#mxml"},{"include":"#strings"},{"include":"#regexp"},{"include":"#variable_declaration"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#logical_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#control_keywords"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#functions"}],"repository":{"arithmetic_operators":{"match":"([-%+/]|(?<!:)\\\\*)","name":"keyword.operator.actionscript.3"},"array_access_operators":{"match":"([]\\\\[])","name":"keyword.operator.actionscript.3"},"class":{"begin":"(^|\\\\s+|;)(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(\\\\b(internal|public)\\\\b\\\\s+)?(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(?=\\\\bclass\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"},"5":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"}},"end":"}","name":"meta.class.actionscript.3","patterns":[{"include":"#class_declaration"},{"include":"#declaration_code_block"},{"include":"#metadata"},{"include":"#method"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#other_operators"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#arithmetic_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#variable_declaration"},{"include":"#object_literal"},{"include":"#conditional_compilation"}]},"class_declaration":{"begin":"\\\\b(class)\\\\b\\\\s+([$.0-9A-Z_a-z]+|\\\\*)","beginCaptures":{"1":{"name":"storage.type.class.actionscript.3"},"2":{"name":"entity.name.class.actionscript.3"}},"end":"\\\\{","name":"meta.class_declaration.actionscript.3","patterns":[{"include":"#extends"},{"include":"#implements"},{"include":"#comments"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","end":"\\\\*/","name":"comment.block.documentation.actionscript.3","patterns":[{"match":"@(copy|default|eventType|example|exampleText|includeExample|inheritDoc|internal|param|private|return|see|since|throws)\\\\b","name":"keyword.other.documentation.actionscript.3.asdoc"}]},{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.actionscript.3"},{"match":"//.*","name":"comment.line.actionscript.3"}]},"conditional_compilation":{"captures":{"2":{"name":"constant.other.actionscript.3"},"3":{"name":"constant.other.actionscript.3"}},"match":"(^|\\\\s+|;)\\\\b(\\\\w+)\\\\b::\\\\b(\\\\w+)\\\\b","name":"meta.conditional.actionscript.3"},"control_keywords":{"match":"\\\\b(if|else|do|while|for|each|continue|return|switch|case|default|break|try|catch|finally|throw|with)\\\\b","name":"keyword.control.actionscript.3"},"declaration_code_block":{"begin":"\\\\{","end":"}","name":"meta.code_block.actionscript.3","patterns":[{"include":"#method"},{"include":"#variable_declaration"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#logical_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#control_keywords"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#functions"},{"include":"#import"}]},"dynamic_type":{"captures":{"1":{"name":"support.type.actionscript.3"}},"match":"(?<=:)\\\\s*(\\\\*)"},"escapes":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)","name":"constant.character.escape.actionscript.3"},"extends":{"captures":{"1":{"name":"keyword.other.actionscript.3"},"2":{"name":"entity.other.inherited-class.actionscript.3"},"3":{"name":"entity.other.inherited-class.actionscript.3"}},"match":"\\\\b(extends)\\\\b\\\\s+([$.0-9A-Z_a-z]+)\\\\s*(?:,\\\\s*([$.0-9A-Z_a-z]+))*\\\\s*","name":"meta.extends.actionscript.3"},"function_arguments":{"begin":"\\\\(","end":"\\\\)","name":"meta.function_arguments.actionscript.3","patterns":[{"include":"#parameters"},{"include":"#comments"}]},"functions":{"begin":"\\\\b(function)\\\\b(?:\\\\s+\\\\b([gs]et)\\\\b\\\\s+)?\\\\s*([$0-9A-Z_a-z]+\\\\b)?","beginCaptures":{"1":{"name":"storage.type.function.actionscript.3"},"2":{"name":"storage.modifier.actionscript.3"},"3":{"name":"entity.name.function.actionscript.3"}},"end":"($|;|(?=\\\\{))","name":"meta.function.actionscript.3","patterns":[{"include":"#function_arguments"},{"include":"#return_type"},{"include":"#comments"}]},"guess_constant":{"captures":{"1":{"name":"constant.other.actionscript.3"}},"match":"\\\\b([$A-Z][0-9A-Z_]+)\\\\b"},"guess_type":{"captures":{"1":{"name":"support.type.actionscript.3"}},"match":"\\\\b((?:[$0-9A-Z_a-z]+\\\\.)*[A-Z][0-9A-Z]*[a-z]+[$0-9A-Z_a-z]*)\\\\b"},"implements":{"captures":{"1":{"name":"keyword.other.actionscript.3"},"2":{"name":"entity.other.inherited-class.actionscript.3"},"3":{"name":"entity.other.inherited-class.actionscript.3"}},"match":"\\\\b(implements)\\\\b\\\\s+([$.0-9A-Z_a-z]+)\\\\s*(?:,\\\\s*([$.0-9A-Z_a-z]+))*\\\\s*","name":"meta.implements.actionscript.3"},"import":{"captures":{"2":{"name":"keyword.control.import.actionscript.3"},"3":{"name":"support.type.actionscript.3"}},"match":"(^|\\\\s+|;)\\\\b(import)\\\\b\\\\s+([$.0-9A-Z_a-z]+(?:\\\\.\\\\*)?)\\\\s*(?=;|$)","name":"meta.import.actionscript.3"},"interface":{"begin":"(^|\\\\s+|;)(\\\\b(internal|public)\\\\b\\\\s+)?(?=\\\\binterface\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"}},"end":"}","name":"meta.interface.actionscript.3","patterns":[{"include":"#interface_declaration"},{"include":"#metadata"},{"include":"#functions"},{"include":"#comments"}]},"interface_declaration":{"begin":"\\\\b(interface)\\\\b\\\\s+([$.0-9A-Z_a-z]+)","beginCaptures":{"1":{"name":"storage.type.interface.actionscript.3"},"2":{"name":"entity.name.class.actionscript.3"}},"end":"\\\\{","name":"meta.class_declaration.actionscript.3","patterns":[{"include":"#extends"},{"include":"#comments"}]},"language_constants":{"match":"\\\\b(true|false|null|Infinity|-Infinity|NaN|undefined)\\\\b","name":"constant.language.actionscript.3"},"language_variables":{"match":"\\\\b(super|this|arguments)\\\\b","name":"variable.language.actionscript.3"},"local_code_block":{"begin":"\\\\{","end":"}","name":"meta.code_block.actionscript.3","patterns":[{"include":"#local_code_block"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#variable_declaration"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#logical_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#control_keywords"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#functions"},{"include":"#import"}]},"logical_operators":{"match":"([!\\\\&<>?^|~])","name":"keyword.operator.actionscript.3"},"metadata":{"begin":"(?<=(?:^|[;{}]|\\\\*/)\\\\s*)\\\\[\\\\s*\\\\b([$A-Z_a-z][$0-9A-Z_a-z]+)\\\\b","beginCaptures":{"1":{"name":"keyword.other.actionscript.3"}},"end":"]","name":"meta.metadata_info.actionscript.3","patterns":[{"include":"#metadata_info"}]},"metadata_info":{"begin":"\\\\(","end":"\\\\)","patterns":[{"include":"#strings"},{"captures":{"1":{"name":"variable.parameter.actionscript.3"},"2":{"name":"keyword.operator.actionscript.3"}},"match":"(\\\\w+)\\\\s*(=)"}]},"method":{"begin":"(^|\\\\s+)((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?(?=\\\\bfunction\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"},"5":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"},"8":{"name":"storage.modifier.actionscript.3"}},"end":"(?<=([;}]))","name":"meta.method.actionscript.3","patterns":[{"include":"#functions"},{"include":"#local_code_block"}]},"mxml":{"begin":"<!\\\\[CDATA\\\\[","end":"]]>","name":"meta.cdata.actionscript.3","patterns":[{"include":"#comments"},{"include":"#import"},{"include":"#metadata"},{"include":"#class"},{"include":"#namespace_declaration"},{"include":"#use_namespace"},{"include":"#class_declaration"},{"include":"#method"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#other_keywords"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#variable_declaration"}]},"namespace_declaration":{"captures":{"2":{"name":"storage.modifier.actionscript.3"},"3":{"name":"storage.modifier.actionscript.3"}},"match":"((\\\\w+)\\\\s+)?(namespace)\\\\s+[$0-9A-Z_a-z]+","name":"meta.namespace_declaration.actionscript.3"},"numbers":{"match":"\\\\b((0([Xx])\\\\h*)|(([0-9]+\\\\.?[0-9]*)|(\\\\.[0-9]+))(([Ee])([-+])?[0-9]+)?)([Ll]|UL|ul|[FUfu])?\\\\b","name":"constant.numeric.actionscript.3"},"object_literal":{"begin":"\\\\{","end":"}","name":"meta.object_literal.actionscript.3","patterns":[{"include":"#object_literal"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#functions"}]},"other_keywords":{"match":"\\\\b(as|delete|in|instanceof|is|native|new|to|typeof)\\\\b","name":"keyword.other.actionscript.3"},"other_operators":{"match":"([.=])","name":"keyword.operator.actionscript.3"},"package":{"begin":"(^|\\\\s+)(package)\\\\b","beginCaptures":{"2":{"name":"keyword.other.actionscript.3"}},"end":"}","name":"meta.package.actionscript.3","patterns":[{"include":"#package_name"},{"include":"#variable_declaration"},{"include":"#method"},{"include":"#comments"},{"include":"#return_type"},{"include":"#import"},{"include":"#use_namespace"},{"include":"#strings"},{"include":"#numbers"},{"include":"#language_constants"},{"include":"#metadata"},{"include":"#class"},{"include":"#interface"},{"include":"#namespace_declaration"}]},"package_name":{"begin":"(?<=package)\\\\s+([._\\\\w]*)\\\\b","end":"\\\\{","name":"meta.package_name.actionscript.3"},"parameters":{"begin":"(\\\\.\\\\.\\\\.)?\\\\s*([$A-Z_a-z][$0-9A-Z_a-z]*)(?:\\\\s*(:)\\\\s*(?:([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)(?:\\\\.<([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)>)?|(\\\\*)))?(?:\\\\s*(=))?","beginCaptures":{"1":{"name":"keyword.operator.actionscript.3"},"2":{"name":"variable.parameter.actionscript.3"},"3":{"name":"keyword.operator.actionscript.3"},"4":{"name":"support.type.actionscript.3"},"5":{"name":"support.type.actionscript.3"},"6":{"name":"support.type.actionscript.3"},"7":{"name":"keyword.operator.actionscript.3"}},"end":",|(?=\\\\))","patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#language_constants"},{"include":"#comments"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#guess_type"},{"include":"#guess_constant"}]},"primitive_error_types":{"captures":{"1":{"name":"support.class.error.actionscript.3"}},"match":"\\\\b((Argument|Definition|Eval|Internal|Range|Reference|Security|Syntax|Type|URI|Verify)?Error)\\\\b"},"primitive_functions":{"captures":{"1":{"name":"support.function.actionscript.3"}},"match":"\\\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|isFinite|isNaN|isXMLName|parseFloat|parseInt|trace|unescape)(?=\\\\s*\\\\()"},"primitive_types":{"captures":{"1":{"name":"support.class.builtin.actionscript.3"}},"match":"\\\\b(Array|Boolean|Class|Date|Function|int|JSON|Math|Namespace|Number|Object|QName|RegExp|String|uint|Vector|XML|XMLList|\\\\*(?<=a))\\\\b"},"regexp":{"begin":"(?<=[(,:=\\\\[]|^|return|&&|\\\\|\\\\||!)\\\\s*(/)(?![*+/?{}])","end":"$|(/)[gim]*","name":"string.regex.actionscript.3","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.actionscript.3"},{"match":"\\\\[(\\\\\\\\]|[^]])*]","name":"constant.character.class.actionscript.3"}]},"return_type":{"captures":{"1":{"name":"keyword.operator.actionscript.3"},"2":{"name":"support.type.actionscript.3"},"3":{"name":"support.type.actionscript.3"},"4":{"name":"support.type.actionscript.3"}},"match":"(:)\\\\s*([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)(?:\\\\.<([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)>)?|(\\\\*)"},"strings":{"patterns":[{"begin":"@\\"","end":"\\"","name":"string.quoted.verbatim.actionscript.3"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.actionscript.3","patterns":[{"include":"#escapes"}]},{"begin":"'","end":"'","name":"string.quoted.single.actionscript.3","patterns":[{"include":"#escapes"}]}]},"use_namespace":{"captures":{"2":{"name":"keyword.other.actionscript.3"},"3":{"name":"keyword.other.actionscript.3"},"4":{"name":"storage.modifier.actionscript.3"}},"match":"(^|\\\\s+|;)(use\\\\s+)?(namespace)\\\\s+(\\\\w+)\\\\s*(;|$)"},"variable_declaration":{"captures":{"2":{"name":"storage.modifier.actionscript.3"},"4":{"name":"storage.modifier.actionscript.3"},"6":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"},"8":{"name":"keyword.operator.actionscript.3"}},"match":"((static)\\\\s+)?((\\\\w+)\\\\s+)?((static)\\\\s+)?(const|var)\\\\s+[$0-9A-Z_a-z]+(?:\\\\s*(:))?","name":"meta.variable_declaration.actionscript.3"},"vector_creation_operators":{"match":"([<>])","name":"keyword.operator.actionscript.3"}},"scopeName":"source.actionscript.3"}`)),t=[e];export{t as default};
|