@ironmussa/funny 0.1.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/README.md +214 -0
- package/bin/funny.js +80 -0
- package/package.json +59 -0
- package/packages/client/dist/assets/AddProjectView-CODm54MP.js +1 -0
- package/packages/client/dist/assets/AllThreadsView--Dd7YSK5.js +1 -0
- package/packages/client/dist/assets/AnalyticsView-eRhWGG3y.js +36 -0
- package/packages/client/dist/assets/AutomationInboxView-DwBaGJed.js +1 -0
- package/packages/client/dist/assets/CircuitBreakerDialog-C2iBwp5W.js +1 -0
- package/packages/client/dist/assets/CommandPalette-BXweSrdO.js +1 -0
- package/packages/client/dist/assets/ReviewPane-DxtlJNNu.js +10 -0
- package/packages/client/dist/assets/SettingsDetailView-BKh9OBM2.js +1 -0
- package/packages/client/dist/assets/SetupWizard-BekJX-tc.js +1 -0
- package/packages/client/dist/assets/TerminalPanel-DC4U0OTm.js +4 -0
- package/packages/client/dist/assets/ThreadListView-B6HvQ8NV.js +1 -0
- package/packages/client/dist/assets/abap-BdImnpbu.js +1 -0
- package/packages/client/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/packages/client/dist/assets/ada-bCR0ucgS.js +1 -0
- package/packages/client/dist/assets/addon-fit-DX4qG4td.js +1 -0
- package/packages/client/dist/assets/addon-web-links-DIbG5aQx.js +1 -0
- package/packages/client/dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/packages/client/dist/assets/angular-html-CU67Zn6k.js +1 -0
- package/packages/client/dist/assets/angular-ts-BwZT4LLn.js +1 -0
- package/packages/client/dist/assets/apache-Pmp26Uib.js +1 -0
- package/packages/client/dist/assets/apex-D8_7TLub.js +1 -0
- package/packages/client/dist/assets/apl-dKokRX4l.js +1 -0
- package/packages/client/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/packages/client/dist/assets/ara-BRHolxvo.js +1 -0
- package/packages/client/dist/assets/arrow-right-3Bby9NNK.js +1 -0
- package/packages/client/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
- package/packages/client/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/packages/client/dist/assets/astro-CbQHKStN.js +1 -0
- package/packages/client/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/packages/client/dist/assets/awk-DMzUqQB5.js +1 -0
- package/packages/client/dist/assets/ayu-dark-CMjwMIkn.js +1 -0
- package/packages/client/dist/assets/ayu-light-C47S-Tmv.js +1 -0
- package/packages/client/dist/assets/ayu-mirage-CjoLj4QM.js +1 -0
- package/packages/client/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/packages/client/dist/assets/bat-BkioyH1T.js +1 -0
- package/packages/client/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/packages/client/dist/assets/berry-uYugtg8r.js +1 -0
- package/packages/client/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/packages/client/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/packages/client/dist/assets/blade-D4QpJJKB.js +1 -0
- package/packages/client/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/packages/client/dist/assets/c-BIGW1oBm.js +1 -0
- package/packages/client/dist/assets/c3-VCDPK7BO.js +1 -0
- package/packages/client/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/packages/client/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/packages/client/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/packages/client/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/packages/client/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/packages/client/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/packages/client/dist/assets/clarity-D53aC0YG.js +1 -0
- package/packages/client/dist/assets/clojure-P80f7IUj.js +1 -0
- package/packages/client/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/packages/client/dist/assets/cobol-nwyudZeR.js +1 -0
- package/packages/client/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/packages/client/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/packages/client/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/packages/client/dist/assets/command-B76T8z-A.js +1 -0
- package/packages/client/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/packages/client/dist/assets/coq-DkFqJrB1.js +1 -0
- package/packages/client/dist/assets/core-BEOw45JP.js +1 -0
- package/packages/client/dist/assets/cpp-CofmeUqb.js +1 -0
- package/packages/client/dist/assets/crystal-tKQVLTB8.js +1 -0
- package/packages/client/dist/assets/csharp-COcwbKMJ.js +1 -0
- package/packages/client/dist/assets/css-DPfMkruS.js +1 -0
- package/packages/client/dist/assets/csv-fuZLfV_i.js +1 -0
- package/packages/client/dist/assets/cue-D82EKSYY.js +1 -0
- package/packages/client/dist/assets/cypher-COkxafJQ.js +1 -0
- package/packages/client/dist/assets/d-85-TOEBH.js +1 -0
- package/packages/client/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/packages/client/dist/assets/dart-CF10PKvl.js +1 -0
- package/packages/client/dist/assets/dax-CEL-wOlO.js +1 -0
- package/packages/client/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/packages/client/dist/assets/diff-D97Zzqfu.js +1 -0
- package/packages/client/dist/assets/docker-BcOcwvcX.js +1 -0
- package/packages/client/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/packages/client/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/packages/client/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/packages/client/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/packages/client/dist/assets/edge-BkV0erSs.js +1 -0
- package/packages/client/dist/assets/elixir-CDX3lj18.js +1 -0
- package/packages/client/dist/assets/elm-DbKCFpqz.js +1 -0
- package/packages/client/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/packages/client/dist/assets/erb-CgJxNhIT.js +1 -0
- package/packages/client/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/packages/client/dist/assets/event-DYHy0FJb.js +1 -0
- package/packages/client/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/packages/client/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/packages/client/dist/assets/fennel-BYunw83y.js +1 -0
- package/packages/client/dist/assets/fish-BvzEVeQv.js +1 -0
- package/packages/client/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/packages/client/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/packages/client/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/packages/client/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/packages/client/dist/assets/gdresource-BOOCDP_w.js +1 -0
- package/packages/client/dist/assets/gdscript-C5YyOfLZ.js +1 -0
- package/packages/client/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/packages/client/dist/assets/geist-mono-latin-100-normal-D3Rid1kg.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-100-normal-pdI6W8EE.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-200-normal-D9Q7ibyz.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-200-normal-DrTlUhvP.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-300-normal-63tOSYu7.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-300-normal-DofeytYw.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-400-normal-CoULgQGM.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-400-normal-LC9RFr9I.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-500-normal-D3o2eNa9.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-500-normal-DOxI7kZ4.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-600-normal-DQQBcVN0.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-600-normal-DsVeri3b.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-700-normal-D6izGJRP.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-700-normal-QGw08Lff.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-800-normal-DvMqam8Z.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-800-normal-yoa1kcZw.woff2 +0 -0
- package/packages/client/dist/assets/geist-mono-latin-900-normal-CmoKXrdK.woff +0 -0
- package/packages/client/dist/assets/geist-mono-latin-900-normal-Cu5MFKsu.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-100-normal-CafeGBe6.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-100-normal-CdXtokqn.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-200-normal-C4oXjfQB.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-200-normal-CEPp-wnL.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-300-normal-C3kkMBb6.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-300-normal-plFOEHCX.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-400-normal-BOaIZNA2.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-400-normal-gapTbOY8.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-500-normal-CN2lyvyL.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-500-normal-uokXdC-Q.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-600-normal-CA1yjETN.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-600-normal-DFOURf8L.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-700-normal-BmN9tIp5.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-700-normal-CjScfYeH.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-800-normal-EH2RlpXL.woff2 +0 -0
- package/packages/client/dist/assets/geist-sans-latin-800-normal-XNjooQKs.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-900-normal-Bo3O536z.woff +0 -0
- package/packages/client/dist/assets/geist-sans-latin-900-normal-yM37RqPD.woff2 +0 -0
- package/packages/client/dist/assets/genie-D0YGMca9.js +1 -0
- package/packages/client/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/packages/client/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/packages/client/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/packages/client/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/packages/client/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/packages/client/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/packages/client/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/packages/client/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/packages/client/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/packages/client/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/packages/client/dist/assets/gleam-BspZqrRM.js +1 -0
- package/packages/client/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/packages/client/dist/assets/glimmer-ts-U6CK756n.js +1 -0
- package/packages/client/dist/assets/glsl-DplSGwfg.js +1 -0
- package/packages/client/dist/assets/gn-n2N0HUVH.js +1 -0
- package/packages/client/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/packages/client/dist/assets/go-CxLEBnE3.js +1 -0
- package/packages/client/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/packages/client/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/packages/client/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/packages/client/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/packages/client/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/packages/client/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/packages/client/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/packages/client/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/packages/client/dist/assets/hack-CaT9iCJl.js +1 -0
- package/packages/client/dist/assets/haml-B8DHNrY2.js +1 -0
- package/packages/client/dist/assets/handlebars-BL8al0AC.js +1 -0
- package/packages/client/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/packages/client/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/packages/client/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/packages/client/dist/assets/hjson-D5-asLiD.js +1 -0
- package/packages/client/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/packages/client/dist/assets/horizon-BUw7H-hv.js +1 -0
- package/packages/client/dist/assets/houston-DnULxvSX.js +1 -0
- package/packages/client/dist/assets/html-GMplVEZG.js +1 -0
- package/packages/client/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/packages/client/dist/assets/http-jrhK8wxY.js +1 -0
- package/packages/client/dist/assets/hurl-irOxFIW8.js +1 -0
- package/packages/client/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/packages/client/dist/assets/hy-DFXneXwc.js +1 -0
- package/packages/client/dist/assets/imba-DGztddWO.js +1 -0
- package/packages/client/dist/assets/index-B0nLATLY.js +65 -0
- package/packages/client/dist/assets/index-BRi6al6L.js +99 -0
- package/packages/client/dist/assets/index-DXO1sSe9.css +1 -0
- package/packages/client/dist/assets/ini-BEwlwnbL.js +1 -0
- package/packages/client/dist/assets/java-CylS5w8V.js +1 -0
- package/packages/client/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/packages/client/dist/assets/jinja-4LBKfQ-Z.js +1 -0
- package/packages/client/dist/assets/jison-wvAkD_A8.js +1 -0
- package/packages/client/dist/assets/json-Cp-IABpG.js +1 -0
- package/packages/client/dist/assets/json5-C9tS-k6U.js +1 -0
- package/packages/client/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/packages/client/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/packages/client/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/packages/client/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/packages/client/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/packages/client/dist/assets/julia-CxzCAyBv.js +1 -0
- package/packages/client/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/packages/client/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/packages/client/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/packages/client/dist/assets/kdl-DV7GczEv.js +1 -0
- package/packages/client/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/packages/client/dist/assets/kusto-DZf3V79B.js +1 -0
- package/packages/client/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/packages/client/dist/assets/latex-DGMBWnxU.js +1 -0
- package/packages/client/dist/assets/lean-BZvkOJ9d.js +1 -0
- package/packages/client/dist/assets/less-B1dDrJ26.js +1 -0
- package/packages/client/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/packages/client/dist/assets/liquid-DYVedYrR.js +1 -0
- package/packages/client/dist/assets/llvm-BtvRca6l.js +1 -0
- package/packages/client/dist/assets/log-2UxHyX5q.js +1 -0
- package/packages/client/dist/assets/logo-BtOb2qkB.js +1 -0
- package/packages/client/dist/assets/lua-BaeVxFsk.js +1 -0
- package/packages/client/dist/assets/luau-C-HG3fhB.js +1 -0
- package/packages/client/dist/assets/make-CHLpvVh8.js +1 -0
- package/packages/client/dist/assets/markdown-B7CXSXYD.js +29 -0
- package/packages/client/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/packages/client/dist/assets/marko-DZsq8hO1.js +1 -0
- package/packages/client/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/packages/client/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/packages/client/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/packages/client/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/packages/client/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/packages/client/dist/assets/matlab-D7o27uSR.js +1 -0
- package/packages/client/dist/assets/mdc-DUICxH0z.js +1 -0
- package/packages/client/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/packages/client/dist/assets/mermaid-mWjccvbQ.js +1 -0
- package/packages/client/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/packages/client/dist/assets/min-light-CTRr51gU.js +1 -0
- package/packages/client/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/packages/client/dist/assets/mojo-B93PlW-d.js +1 -0
- package/packages/client/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/packages/client/dist/assets/moonbit-Ba13S78F.js +1 -0
- package/packages/client/dist/assets/motion-DRu4QWVj.js +1 -0
- package/packages/client/dist/assets/move-IF9eRakj.js +1 -0
- package/packages/client/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/packages/client/dist/assets/nextflow-BrzmwbiE.js +1 -0
- package/packages/client/dist/assets/nginx-BpAMiNFr.js +1 -0
- package/packages/client/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/packages/client/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/packages/client/dist/assets/nim-CVrawwO9.js +1 -0
- package/packages/client/dist/assets/nix-CwoSXNpI.js +1 -0
- package/packages/client/dist/assets/nord-Ddv68eIx.js +1 -0
- package/packages/client/dist/assets/nushell-C-sUppwS.js +1 -0
- package/packages/client/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/packages/client/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/packages/client/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/packages/client/dist/assets/odin-BBf5iR-q.js +1 -0
- package/packages/client/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/packages/client/dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/packages/client/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/packages/client/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/packages/client/dist/assets/perl-C0TMdlhV.js +1 -0
- package/packages/client/dist/assets/php-Dhbhpdrm.js +1 -0
- package/packages/client/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/packages/client/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/packages/client/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/packages/client/dist/assets/po-BTJTHyun.js +1 -0
- package/packages/client/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/packages/client/dist/assets/polar-C0HS_06l.js +1 -0
- package/packages/client/dist/assets/postcss-CXtECtnM.js +1 -0
- package/packages/client/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/packages/client/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/packages/client/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/packages/client/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/packages/client/dist/assets/proto-C7zT0LnQ.js +1 -0
- package/packages/client/dist/assets/pug-CGlum2m_.js +1 -0
- package/packages/client/dist/assets/puppet-BMWR74SV.js +1 -0
- package/packages/client/dist/assets/purescript-CklMAg4u.js +1 -0
- package/packages/client/dist/assets/python-B6aJPvgy.js +1 -0
- package/packages/client/dist/assets/qml-3beO22l8.js +1 -0
- package/packages/client/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/packages/client/dist/assets/qss-IeuSbFQv.js +1 -0
- package/packages/client/dist/assets/r-Dspwwk_N.js +1 -0
- package/packages/client/dist/assets/racket-BqYA7rlc.js +1 -0
- package/packages/client/dist/assets/raku-DXvB9xmW.js +1 -0
- package/packages/client/dist/assets/razor-Uh8Bk_45.js +1 -0
- package/packages/client/dist/assets/red-bN70gL4F.js +1 -0
- package/packages/client/dist/assets/reg-C-SQnVFl.js +1 -0
- package/packages/client/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/packages/client/dist/assets/rel-C3B-1QV4.js +1 -0
- package/packages/client/dist/assets/review-pane-store-BLhxZHRI.js +1 -0
- package/packages/client/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/packages/client/dist/assets/ron-BhRPY-oY.js +1 -0
- package/packages/client/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/packages/client/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/packages/client/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/packages/client/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/packages/client/dist/assets/rst-D5oM4XIm.js +1 -0
- package/packages/client/dist/assets/ruby-Cw6WdidG.js +1 -0
- package/packages/client/dist/assets/rust-B1yitclQ.js +1 -0
- package/packages/client/dist/assets/sas-cz2c8ADy.js +1 -0
- package/packages/client/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/packages/client/dist/assets/scala-C151Ov-r.js +1 -0
- package/packages/client/dist/assets/scheme-C98Dy4si.js +1 -0
- package/packages/client/dist/assets/scss-OYdSNvt2.js +1 -0
- package/packages/client/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/packages/client/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/packages/client/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/packages/client/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/packages/client/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/packages/client/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/packages/client/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/packages/client/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/packages/client/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/packages/client/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/packages/client/dist/assets/solidity-rGO070M0.js +1 -0
- package/packages/client/dist/assets/soy-Brmx7dQM.js +1 -0
- package/packages/client/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/packages/client/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/packages/client/dist/assets/sql-BLtJtn59.js +1 -0
- package/packages/client/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/packages/client/dist/assets/stata-BH5u7GGu.js +1 -0
- package/packages/client/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/packages/client/dist/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/packages/client/dist/assets/svelte-zxCyuUbr.js +1 -0
- package/packages/client/dist/assets/swift-Dg5xB15N.js +1 -0
- package/packages/client/dist/assets/syntax-qKqB8BhQ.js +153 -0
- package/packages/client/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/packages/client/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/packages/client/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/packages/client/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/packages/client/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/packages/client/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/packages/client/dist/assets/templ-P3uqSqPl.js +1 -0
- package/packages/client/dist/assets/terraform-BETggiCN.js +1 -0
- package/packages/client/dist/assets/tex-CvyZ59Mk.js +1 -0
- package/packages/client/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/packages/client/dist/assets/toml-vGWfd6FD.js +1 -0
- package/packages/client/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/packages/client/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/packages/client/dist/assets/tsx-COt5Ahok.js +1 -0
- package/packages/client/dist/assets/turtle-BsS91CYL.js +1 -0
- package/packages/client/dist/assets/twig-ChbOoGGc.js +1 -0
- package/packages/client/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/packages/client/dist/assets/typespec-BGHnOYBU.js +1 -0
- package/packages/client/dist/assets/typst-DHCkPAjA.js +1 -0
- package/packages/client/dist/assets/v-BcVCzyr7.js +1 -0
- package/packages/client/dist/assets/vala-CsfeWuGM.js +1 -0
- package/packages/client/dist/assets/vb-D17OF-Vu.js +1 -0
- package/packages/client/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/packages/client/dist/assets/vesper-DU1UobuO.js +1 -0
- package/packages/client/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/packages/client/dist/assets/viml-CJc9bBzg.js +1 -0
- package/packages/client/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/packages/client/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/packages/client/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/packages/client/dist/assets/vue-DN_0RTcg.js +1 -0
- package/packages/client/dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/packages/client/dist/assets/vue-vine-CQOfvN7w.js +1 -0
- package/packages/client/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/packages/client/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/packages/client/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/packages/client/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/packages/client/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/packages/client/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/packages/client/dist/assets/wit-5i3qLPDT.js +1 -0
- package/packages/client/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/packages/client/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/packages/client/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/packages/client/dist/assets/xterm-B-qIQCd3.js +16 -0
- package/packages/client/dist/assets/xterm-Dv47L9lv.css +1 -0
- package/packages/client/dist/assets/yaml-Buea-lGh.js +1 -0
- package/packages/client/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/packages/client/dist/assets/zig-VOosw3JB.js +1 -0
- package/packages/client/dist/index.html +24 -0
- package/packages/server/dist/index.js +81207 -0
- package/packages/server/dist/index.js.map +838 -0
- package/packages/server/dist/pty-helper.mjs +115 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o,j as s}from"./markdown-B7CXSXYD.js";import{$ as E,j as M,a2 as R,aH as p,a1 as $,k as S,aW as I,G as B,B as c,aX as D,c as l,S as G,I as U,r as H,v as Q,w as V,X as A}from"./index-BRi6al6L.js";import{C as W,a as X,b as _,c as q,d as J,e as k}from"./command-B76T8z-A.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";const K=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Y=E("chevrons-up-down",K);function re(){const u=M(),h=R(e=>e.projects),i=p(e=>e.inbox),f=p(e=>e.inboxCount),b=p(e=>e.loadInbox),N=p(e=>e.triageRun),v=$(e=>e.setAutomationInboxOpen),P=S(e=>e.selectThread),T=S(e=>e.selectedThreadId),[r,y]=o.useState(null),[w,j]=o.useState(!1),[d,F]=o.useState("pending"),[m,L]=o.useState("");o.useEffect(()=>{b()},[b]);const C=o.useMemo(()=>{let e=i;if(d!=="all"&&(e=e.filter(t=>t.run.triageStatus===d)),r&&(e=e.filter(t=>t.thread.projectId===r)),m.trim()){const t=m.toLowerCase();e=e.filter(a=>a.automation.name.toLowerCase().includes(t)||a.thread.title.toLowerCase().includes(t)||a.run.summary?.toLowerCase().includes(t))}return e},[i,d,r,m]),g=o.useMemo(()=>{const e=new Set(i.map(t=>t.thread.projectId));return h.filter(t=>e.has(t.id))},[i,h]),O=e=>{P(e)},z=()=>{v(!1),u(r?`/projects/${r}/settings/automations`:"/settings/automations")};return s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(I,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("h2",{className:"text-sm font-medium",children:"Automation Inbox"}),f>0&&s.jsx(B,{variant:"secondary",className:"h-5 min-w-5 px-1 leading-none",children:f})]}),s.jsxs(c,{variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:z,children:[s.jsx(D,{className:"h-3.5 w-3.5"}),"Manage Automations"]})]}),s.jsx("div",{className:"flex items-center gap-0 px-6 border-b border-border/40",children:["all","pending","reviewed","dismissed"].map(e=>{const t=d===e,a=e==="all"?i.length:i.filter(x=>x.run.triageStatus===e).length;return s.jsxs("button",{onClick:()=>F(e),className:l("px-4 py-2 text-xs font-medium transition-colors relative border-b-2",t?"text-foreground border-primary":"text-muted-foreground border-transparent hover:text-foreground/80"),children:[e==="all"?"All":e.charAt(0).toUpperCase()+e.slice(1),a>0&&s.jsx("span",{className:l("ml-1.5 text-xs px-1.5 py-0.5 rounded-full",t?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:a})]},e)})}),s.jsx("div",{className:"px-6 py-3 border-b border-border",children:s.jsxs("div",{className:"relative",children:[s.jsx(G,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),s.jsx(U,{type:"text",placeholder:"Search by automation name, thread title, or summary...",value:m,onChange:e=>L(e.target.value),className:"h-8 pl-9 pr-3 text-xs"})]})}),g.length>1&&s.jsx("div",{className:"flex items-center gap-2 px-6 py-2 border-b border-border",children:s.jsxs(H,{open:w,onOpenChange:j,children:[s.jsx(Q,{asChild:!0,children:s.jsxs(c,{variant:"outline",role:"combobox","aria-expanded":w,className:"h-7 w-[200px] justify-between text-xs font-normal",children:[r?g.find(e=>e.id===r)?.name:"All projects",s.jsx(Y,{className:"ml-2 h-3 w-3 shrink-0 opacity-50"})]})}),s.jsx(V,{className:"w-[200px] p-0",align:"start",children:s.jsxs(W,{children:[s.jsx(X,{placeholder:"Search project...",className:"h-8 text-xs"}),s.jsxs(_,{children:[s.jsx(q,{className:"py-3 text-xs",children:"No project found."}),s.jsxs(J,{children:[s.jsxs(k,{value:"all",onSelect:()=>{y(null),j(!1)},className:"text-xs",children:[s.jsx(A,{className:l("mr-2 h-3 w-3",r?"opacity-0":"opacity-100")}),"All projects"]}),g.map(e=>s.jsxs(k,{value:e.name,onSelect:()=>{y(e.id),j(!1)},className:"text-xs",children:[s.jsx(A,{className:l("mr-2 h-3 w-3",r===e.id?"opacity-100":"opacity-0")}),e.name]},e.id))]})]})]})})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:C.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[s.jsx(I,{className:"h-8 w-8 mb-3 opacity-50"}),s.jsx("p",{className:"text-sm",children:"No pending reviews."}),s.jsx("p",{className:"text-xs mt-1",children:"Automation results that need review will appear here."})]}):s.jsx("div",{className:"max-w-2xl mx-auto space-y-3",children:C.map(({run:e,automation:t,thread:a})=>{const x=h.find(n=>n.id===a.projectId);return s.jsxs("div",{className:l("rounded-lg border bg-card p-4 space-y-3 cursor-pointer transition-colors",T===a.id?"border-primary/50 bg-accent/30":"border-border/50 hover:border-border"),onClick:()=>O(a.id),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:t.name}),s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[x&&s.jsxs("span",{className:"font-medium",children:[x.name," · "]}),a.title]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:l("text-xs px-1.5 py-0.5 rounded-full",e.hasFindings?"bg-status-warning/10 text-status-warning/80":"bg-muted text-muted-foreground"),children:e.hasFindings?"Has findings":"No findings"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e.completedAt?new Date(e.completedAt).toLocaleString():""})]})]}),e.summary&&s.jsx("p",{className:"text-xs text-muted-foreground",children:e.summary}),s.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[s.jsx(c,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:n=>{n.stopPropagation(),v(!1),u(`/projects/${a.projectId}/threads/${a.id}`)},children:"View Thread"}),e.triageStatus==="pending"&&s.jsxs(s.Fragment,{children:[s.jsx(c,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:n=>{n.stopPropagation(),N(e.id,"dismissed")},children:"Dismiss"}),s.jsx(c,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:n=>{n.stopPropagation(),N(e.id,"reviewed")},children:"Mark Reviewed"})]})]})]},e.id)})})})]})}export{re as AutomationInboxView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./markdown-B7CXSXYD.js";import{$ as l,d as o,bb as i,L as c,B as d,a4 as m}from"./index-BRi6al6L.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";const x=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],u=l("wifi-off",x);function k(){const{t}=o(),a=i(r=>r.state),n=i(r=>r.retryNow);if(a==="closed")return null;const s=a==="half-open";return e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-background",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 max-w-md text-center px-6",children:[e.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10",children:e.jsx(u,{className:"h-8 w-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-xl font-semibold",children:t("circuitBreaker.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("circuitBreaker.description")})]}),s?e.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx(c,{className:"h-4 w-4 animate-spin"}),t("circuitBreaker.attemptingReconnect")]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:t("circuitBreaker.willRetryAutomatically")}),e.jsx(d,{onClick:n,disabled:s,size:"lg",children:s?e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"mr-2 h-4 w-4 animate-spin"}),t("circuitBreaker.reconnecting")]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"mr-2 h-4 w-4"}),t("circuitBreaker.retryNow")]})})]})})}export{k as CircuitBreakerDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./markdown-B7CXSXYD.js";import{d as j,j as p,a2 as g,a1 as r,aE as f,b1 as S,aL as P,x as N}from"./index-BRi6al6L.js";import{f as C,a as v,b,c as w,d as c,e as m,g as $}from"./command-B76T8z-A.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";function F({open:n,onOpenChange:a}){console.log("[CommandPalette] render, open=",n);const{t}=j(),o=p(),l=g(e=>e.projects),d=r(e=>e.startNewThread),i=r(e=>e.setSettingsOpen),x=e=>{a(!1),d(e),N.getState().fetchForProject(e),o(`/projects/${e}`)},h=e=>{a(!1),i(!0),o(`/settings/${e}`)};return s.jsxs(C,{open:n,onOpenChange:a,children:[s.jsx(v,{placeholder:t("commandPalette.searchPlaceholder")}),s.jsxs(b,{children:[s.jsx(w,{children:t("commandPalette.noResults")}),s.jsx(c,{heading:t("commandPalette.projects"),children:l.length===0?s.jsx("div",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:t("commandPalette.noProjects")}):l.map(e=>s.jsxs(m,{value:`${e.name} ${e.path}`,onSelect:()=>x(e.id),children:[s.jsx(f,{className:"h-4 w-4 flex-shrink-0"}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"truncate",children:e.name}),s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:e.path})]})]},e.id))}),s.jsx($,{}),s.jsx(c,{heading:t("commandPalette.settings"),children:S.map(e=>{const u=e.icon;return s.jsxs(m,{value:e.label,onSelect:()=>h(e.id),children:[s.jsx(u,{className:"h-4 w-4"}),s.jsx("span",{children:t(P[e.id]??e.label)})]},e.id)})})]})]})}export{F as CommandPalette};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{d as f,j as s}from"./markdown-B7CXSXYD.js";import{$ as E,a0 as tt,d as st,a1 as nt,a2 as it,k as V,a3 as je,x as Q,t as b,a as C,l as rt,m as ot,u as at,H as ee,J as te,B as R,a4 as lt,c as O,K as se,a5 as Ce,L as B,a6 as ct,a7 as Se,S as dt,I as ht,a8 as ut,X as ke,a9 as ft,aa as mt,ab as gt,ac as pt,ad as W,ae as Me,af as xt,ag as wt,ah as vt,ai as bt,aj as yt,ak as le,D as jt,e as Ct,al as de,f as St,g as kt,h as Mt,am as Nt,an as zt}from"./index-BRi6al6L.js";import{useReviewPaneStore as Ne}from"./review-pane-store-BLhxZHRI.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";const Et=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],Ft=E("clipboard-copy",Et);const It=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ze=E("eye-off",It);const Ot=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],Tt=E("file-plus",Ot);const Rt=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],Dt=E("file-x",Rt);const _t=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]],Ee=E("folder-x",_t);const At=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Pt=E("git-commit-horizontal",At);const Lt=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Wt=E("git-pull-request",Lt);const $t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],Vt=E("panel-right-close",$t);const Bt=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Ht=E("undo-2",Bt);const qt=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ce=E("upload",qt);function H(i,d,t){let e=t.initialDeps??[],n,o=!0;function c(){var l,m,w;let x;t.key&&((l=t.debug)!=null&&l.call(t))&&(x=Date.now());const j=i();if(!(j.length!==e.length||j.some((M,y)=>e[y]!==M)))return n;e=j;let v;if(t.key&&((m=t.debug)!=null&&m.call(t))&&(v=Date.now()),n=d(...j),t.key&&((w=t.debug)!=null&&w.call(t))){const M=Math.round((Date.now()-x)*100)/100,y=Math.round((Date.now()-v)*100)/100,F=y/16,S=(N,I)=>{for(N=String(N);N.length<I;)N=" "+N;return N};console.info(`%c⏱ ${S(y,5)} /${S(M,5)} ms`,`
|
|
2
|
+
font-size: .6rem;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*F,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(o&&t.skipInitialOnChange)&&t.onChange(n),o=!1,n}return c.updateDeps=l=>{e=l},c}function Fe(i,d){if(i===void 0)throw new Error("Unexpected undefined");return i}const Gt=(i,d)=>Math.abs(i-d)<1.01,Ut=(i,d,t)=>{let e;return function(...n){i.clearTimeout(e),e=i.setTimeout(()=>d.apply(this,n),t)}},Ie=i=>{const{offsetWidth:d,offsetHeight:t}=i;return{width:d,height:t}},Kt=i=>i,Xt=i=>{const d=Math.max(i.startIndex-i.overscan,0),t=Math.min(i.endIndex+i.overscan,i.count-1),e=[];for(let n=d;n<=t;n++)e.push(n);return e},Yt=(i,d)=>{const t=i.scrollElement;if(!t)return;const e=i.targetWindow;if(!e)return;const n=c=>{const{width:l,height:m}=c;d({width:Math.round(l),height:Math.round(m)})};if(n(Ie(t)),!e.ResizeObserver)return()=>{};const o=new e.ResizeObserver(c=>{const l=()=>{const m=c[0];if(m?.borderBoxSize){const w=m.borderBoxSize[0];if(w){n({width:w.inlineSize,height:w.blockSize});return}}n(Ie(t))};i.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(t,{box:"border-box"}),()=>{o.unobserve(t)}},Oe={passive:!0},Te=typeof window>"u"?!0:"onscrollend"in window,Jt=(i,d)=>{const t=i.scrollElement;if(!t)return;const e=i.targetWindow;if(!e)return;let n=0;const o=i.options.useScrollendEvent&&Te?()=>{}:Ut(e,()=>{d(n,!1)},i.options.isScrollingResetDelay),c=x=>()=>{const{horizontal:j,isRtl:g}=i.options;n=j?t.scrollLeft*(g&&-1||1):t.scrollTop,o(),d(n,x)},l=c(!0),m=c(!1);t.addEventListener("scroll",l,Oe);const w=i.options.useScrollendEvent&&Te;return w&&t.addEventListener("scrollend",m,Oe),()=>{t.removeEventListener("scroll",l),w&&t.removeEventListener("scrollend",m)}},Zt=(i,d,t)=>{if(d?.borderBoxSize){const e=d.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}return i[t.options.horizontal?"offsetWidth":"offsetHeight"]},Qt=(i,{adjustments:d=0,behavior:t},e)=>{var n,o;const c=i+d;(o=(n=e.scrollElement)==null?void 0:n.scrollTo)==null||o.call(n,{[e.options.horizontal?"left":"top"]:c,behavior:t})};class es{constructor(d){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(o=>{const c=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var n;(n=e())==null||n.disconnect(),t=null},observe:n=>{var o;return(o=e())==null?void 0:o.observe(n,{box:"border-box"})},unobserve:n=>{var o;return(o=e())==null?void 0:o.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([e,n])=>{typeof n>"u"&&delete t[e]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Kt,rangeExtractor:Xt,onChange:()=>{},measureElement:Zt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var e,n;(n=(e=this.options).onChange)==null||n.call(e,this,t)},this.maybeNotify=H(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,e)=>{const n=new Map,o=new Map;for(let c=e-1;c>=0;c--){const l=t[c];if(n.has(l.lane))continue;const m=o.get(l.lane);if(m==null||l.end>m.end?o.set(l.lane,l):l.end<m.end&&n.set(l.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((c,l)=>c.end===l.end?c.index-l.index:c.end-l.end)[0]:void 0},this.getMeasurementOptions=H(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(t,e,n,o,c,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:n,getItemKey:o,enabled:c,lanes:l}),{key:!1}),this.getMeasurements=H(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:e,scrollMargin:n,getItemKey:o,enabled:c,lanes:l},m)=>{if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const g of this.laneAssignments.keys())g>=t&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const w=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const x=this.measurementsCache.slice(0,w),j=new Array(l).fill(void 0);for(let g=0;g<w;g++){const v=x[g];v&&(j[v.lane]=g)}for(let g=w;g<t;g++){const v=o(g),M=this.laneAssignments.get(g);let y,F;if(M!==void 0&&this.options.lanes>1){y=M;const z=j[y],k=z!==void 0?x[z]:void 0;F=k?k.end+this.options.gap:e+n}else{const z=this.options.lanes===1?x[g-1]:this.getFurthestMeasurement(x,g);F=z?z.end+this.options.gap:e+n,y=z?z.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,y)}const S=m.get(v),N=typeof S=="number"?S:this.options.estimateSize(g),I=F+N;x[g]={index:g,start:F,size:N,end:I,key:v,lane:y},j[y]=g}return this.measurementsCache=x,x},{key:!1,debug:()=>this.options.debug}),this.calculateRange=H(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,e,n,o)=>this.range=t.length>0&&e>0?ts({measurements:t,outerSize:e,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=H(()=>{let t=null,e=null;const n=this.calculateRange();return n&&(t=n.startIndex,e=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,e]},(t,e,n,o,c)=>o===null||c===null?[]:t({startIndex:o,endIndex:c,overscan:e,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e);return n?parseInt(n,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const n=this.indexFromElement(t),o=this.measurementsCache[n];if(!o)return;const c=o.key,l=this.elementsCache.get(c);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(c,t)),t.isConnected&&this.resizeItem(n,this.options.measureElement(t,e,this))},this.resizeItem=(t,e)=>{const n=this.measurementsCache[t];if(!n)return;const o=this.itemSizeCache.get(n.key)??n.size,c=e-o;c!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,c,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,e)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((e,n)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(n))});return}this._measureElement(t,void 0)},this.getVirtualItems=H(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,e)=>{const n=[];for(let o=0,c=t.length;o<c;o++){const l=t[o],m=e[l];n.push(m)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length!==0)return Fe(e[_e(0,e.length-1,n=>Fe(e[n]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,e,n=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),c=this.getScrollOffset();e==="auto"&&(e=t>=c+o?"end":"start"),e==="center"?t+=(n-o)/2:e==="end"&&(t-=o);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.measurementsCache[t];if(!n)return;const o=this.getSize(),c=this.getScrollOffset();if(e==="auto")if(n.end>=c+o-this.options.scrollPaddingEnd)e="end";else if(n.start<=c+this.options.scrollPaddingStart)e="start";else return[c,e];if(e==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),e];const l=e==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,e,n.size),e]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(t,{align:e="start",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,e),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:e="auto",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t=Math.max(0,Math.min(t,this.options.count-1)),this.currentScrollToIndex=t;let o=0;const c=10,l=w=>{if(!this.targetWindow)return;const x=this.getOffsetForIndex(t,w);if(!x){console.warn("Failed to get offset for index:",t);return}const[j,g]=x;this._scrollToOffset(j,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const v=()=>{if(this.currentScrollToIndex!==t)return;const M=this.getScrollOffset(),y=this.getOffsetForIndex(t,g);if(!y){console.warn("Failed to get offset for index:",t);return}Gt(y[0],M)||m(g)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(v):v()})},m=w=>{this.targetWindow&&this.currentScrollToIndex===t&&(o++,o<c?this.targetWindow.requestAnimationFrame(()=>l(w)):console.warn(`Failed to scroll to index ${t} after ${c} attempts.`))};l(e)},this.scrollBy=(t,{behavior:e}={})=>{e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let n;if(e.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=e[e.length-1])==null?void 0:t.end)??0;else{const o=Array(this.options.lanes).fill(null);let c=e.length-1;for(;c>=0&&o.some(l=>l===null);){const l=e[c];o[l.lane]===null&&(o[l.lane]=l.end),c--}n=Math.max(...o.filter(l=>l!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:e,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:e},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(d)}}const _e=(i,d,t,e)=>{for(;i<=d;){const n=(i+d)/2|0,o=t(n);if(o<e)i=n+1;else if(o>e)d=n-1;else return n}return i>0?i-1:0};function ts({measurements:i,outerSize:d,scrollOffset:t,lanes:e}){const n=i.length-1,o=m=>i[m].start;if(i.length<=e)return{startIndex:0,endIndex:n};let c=_e(0,n,o,t),l=c;if(e===1)for(;l<n&&i[l].end<t+d;)l++;else if(e>1){const m=Array(e).fill(0);for(;l<n&&m.some(x=>x<t+d);){const x=i[l];m[x.lane]=x.end,l++}const w=Array(e).fill(t+d);for(;c>=0&&w.some(x=>x>=t);){const x=i[c];w[x.lane]=x.start,c--}c=Math.max(0,c-c%e),l=Math.min(n,l+(e-1-l%e))}return{startIndex:c,endIndex:l}}const Re=typeof document<"u"?f.useLayoutEffect:f.useEffect;function ss({useFlushSync:i=!0,...d}){const t=f.useReducer(()=>({}),{})[1],e={...d,onChange:(o,c)=>{var l;i&&c?tt.flushSync(t):t(),(l=d.onChange)==null||l.call(d,o,c)}},[n]=f.useState(()=>new es(e));return n.setOptions(e),Re(()=>n._didMount(),[]),Re(()=>n._willUpdate()),n}function ns(i){return ss({observeElementRect:Yt,observeElementOffset:Jt,scrollToFn:Qt,...i})}function is(i,d,t=2e3){const e=f.useRef(null),n=f.useRef(d);n.current=d;const o=Ne(l=>l.dirtySignal),c=Ne(l=>l.dirtyThreadId);f.useEffect(()=>{if(!(!i||c!==i||o===0))return e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,n.current()},t),()=>{e.current&&(clearTimeout(e.current),e.current=null)}},[o,c,i,t])}const rs={added:Tt,modified:de,deleted:Dt,renamed:de},os=28;function as(i){const d=i.split(`
|
|
5
|
+
`),t=[];for(const e of d)e.startsWith("---")||e.startsWith("+++")||e.startsWith("@@")||(e.startsWith("-")?t.push(e.substring(1)):e.startsWith("+")||t.push(e));return t.join(`
|
|
6
|
+
`)}function ls(i){const d=i.split(`
|
|
7
|
+
`),t=[];for(const e of d)e.startsWith("---")||e.startsWith("+++")||e.startsWith("@@")||(e.startsWith("+")?t.push(e.substring(1)):e.startsWith("-")||t.push(e));return t.join(`
|
|
8
|
+
`)}const De=f.memo(function({diff:d,splitView:t=!1}){const e=f.useMemo(()=>as(d),[d]),n=f.useMemo(()=>ls(d),[d]);return s.jsx(Nt,{oldValue:e,newValue:n,splitView:t,useDarkTheme:!0,hideLineNumbers:!1,showDiffOnly:!0,styles:zt})});function ms(){const{t:i}=st(),d=nt(r=>r.setReviewPaneOpen),t=it(r=>r.selectedProjectId),e=V(r=>{const a=r.activeThread?.id;return a||(t?r.threadsByProject[t]?.[0]?.id:void 0)}),n=V(r=>{const a=r.activeThread?.worktreePath;return a||(r.activeThread?.projectId??t??"")}),[o,c]=f.useState([]),[l,m]=f.useState(new Map),[w,x]=f.useState(null),[j,g]=f.useState({total:0,truncated:!1}),[v,M]=f.useState(null),[y,F]=f.useState(!1),[S,N]=f.useState(null),[I,z]=f.useState(""),[k,q]=f.useState(new Set),{setCommitDraft:U,clearCommitDraft:Ae}=je(),[D,K]=f.useState(""),[X,Y]=f.useState(""),he=f.useCallback(r=>{K(a=>{const h=typeof r=="function"?r(a):r;return e&&Y(u=>(U(e,h,u),u)),h})},[e,U]),ue=f.useCallback(r=>{Y(a=>{const h=typeof r=="function"?r(a):r;return e&&K(u=>(U(e,u,h),u)),h})},[e,U]),[J,fe]=f.useState(!1),[_,Pe]=f.useState("commit"),[A,G]=f.useState(null),ne=V(r=>r.activeThread?.mode==="worktree"),P=V(r=>r.activeThread?.baseBranch),$=Q(r=>e?r.statusByThread[e]:void 0),[ie,me]=f.useState(!1),[re,ge]=f.useState(!1),Le=ne&&o.length===0&&!y&&$&&!$.isMergedIntoBase,We=o.length===0&&!y&&$&&$.unpushedCommitCount>0,pe=f.useCallback((r,a)=>{const h=P||"main";if(!(r.toLowerCase().includes("conflict")||r.toLowerCase().includes("rebase failed"))){b.error(i("review.mergeFailed",{message:r}));return}const p=V.getState().activeThread?.worktreePath;b.error(i("review.mergeConflict",{target:h}),{duration:15e3,action:{label:i("review.askAgentResolve"),onClick:()=>{const L=i("review.agentResolvePrompt",{target:h});rt.getState().appendOptimisticMessage(a,L);const{allowedTools:ae,disallowedTools:et}=ot(at.getState().toolPermissions);C.sendMessage(a,L,{allowedTools:ae,disallowedTools:et}),b.success(i("review.agentResolveSent"))}},cancel:p?{label:i("review.openInVSCode"),onClick:()=>{C.openInEditor(p,"vscode")}}:void 0})},[i,P]),xe=f.useRef(null),T=async()=>{if(!e)return;F(!0);const r=await C.getDiffSummary(e);if(r.isOk()){const a=r.value;c(a.files),g({total:a.total,truncated:a.truncated}),m(new Map),q(h=>{const u=new Set(h);for(const p of a.files)(!h.has(p.path)&&h.size===0||!h.has(p.path)&&a.files.length>h.size)&&u.add(p.path);for(const p of h)a.files.find(L=>L.path===p)||u.delete(p);return u.size===0?new Set(a.files.map(p=>p.path)):u}),a.files.length>0&&!v&&M(a.files[0].path)}else console.error("Failed to load diff summary:",r.error);F(!1),e&&Q.getState().fetchForThread(e)},we=async r=>{if(!e||l.has(r))return;const a=o.find(u=>u.path===r);if(!a)return;x(r);const h=await C.getFileDiff(e,r,a.staged);h.isOk()&&m(u=>new Map(u).set(r,h.value.diff)),x(u=>u===r?null:u)};f.useEffect(()=>{v&&!l.has(v)&&we(v)},[v]),f.useEffect(()=>{S&&!l.has(S)&&we(S)},[S]),f.useEffect(()=>{c([]),m(new Map),M(null),q(new Set),z("");const r=e?je.getState().drafts[e]:void 0;K(r?.commitTitle??""),Y(r?.commitBody??""),T()},[n]),is(e,T,2e3);const oe=f.useMemo(()=>{if(!I)return o;const r=I.toLowerCase();return o.filter(a=>a.path.toLowerCase().includes(r))},[o,I]),ve=v?l.get(v):void 0,$e=k.size,Ve=o.length,be=ns({count:oe.length,getScrollElement:()=>xe.current,estimateSize:()=>os,overscan:15}),Be=r=>{q(a=>{const h=new Set(a);return h.has(r)?h.delete(r):h.add(r),h})},He=()=>{k.size===o.length?q(new Set):q(new Set(o.map(r=>r.path)))},qe=async()=>{if(!e||J)return;fe(!0);const r=await C.generateCommitMessage(e,!0);r.isOk()?(he(r.value.title),ue(r.value.body)):b.error(i("review.generateFailed",{message:r.error.message})),fe(!1)},Ge=async()=>{if(!e||!D.trim()||k.size===0)return!1;const r=X.trim()?`${D.trim()}
|
|
9
|
+
|
|
10
|
+
${X.trim()}`:D.trim(),a=o.filter(p=>p.staged&&!k.has(p.path)).map(p=>p.path);if(a.length>0){const p=await C.unstageFiles(e,a);if(p.isErr())return b.error(i("review.unstageFailed",{message:p.error.message})),!1}const h=Array.from(k).filter(p=>{const L=o.find(ae=>ae.path===p);return L&&!L.staged});if(h.length>0){const p=await C.stageFiles(e,h);if(p.isErr())return b.error(i("review.stageFailed",{message:p.error.message})),!1}const u=await C.commit(e,r);return u.isErr()?(b.error(i("review.commitFailed",{message:u.error.message})),!1):!0},Ue=async()=>{if(!e||!D.trim()||k.size===0||A)return;if(G(_),!await Ge()){G(null);return}if(_==="commit")b.success(i("review.commitSuccess"));else if(_==="commit-push"){const a=await C.push(e);a.isErr()?b.error(i("review.pushFailed",{message:a.error.message})):b.success(i("review.pushedSuccess"))}else if(_==="commit-pr"){const a=await C.push(e);if(a.isErr()){b.error(i("review.pushFailed",{message:a.error.message})),G(null),await T();return}const h=await C.createPR(e,D.trim(),X.trim());h.isErr()?b.error(i("review.prFailed",{message:h.error.message})):h.value.url?b.success(s.jsxs("div",{children:[i("review.prCreated"),s.jsx("a",{href:h.value.url,target:"_blank",rel:"noopener noreferrer",className:"underline ml-2",children:"View PR"})]})):b.success(i("review.prCreated"))}else if(_==="commit-merge"){const a=await C.merge(e,{cleanup:!0});if(a.isErr()){pe(a.error.message,e),G(null),await T();return}const h=V.getState().activeThread?.baseBranch||"base";b.success(i("review.commitAndMergeSuccess",{target:h}))}K(""),Y(""),e&&Ae(e),G(null),await T()},Ke=async r=>{if(!e||!window.confirm(i("review.revertConfirm",{paths:r})))return;const h=await C.revertFiles(e,[r]);h.isErr()?b.error(i("review.revertFailed",{message:h.error.message})):await T()},Z=async r=>{if(!e)return;const a=await C.addToGitignore(e,r);a.isErr()?b.error(i("review.ignoreFailed",{message:a.error.message})):(b.success(i("review.ignoreSuccess")),await T())},Xe=async()=>{if(!e||re)return;ge(!0);const r=await C.push(e);r.isErr()?b.error(i("review.pushFailed",{message:r.error.message})):b.success(i("review.pushedSuccess")),ge(!1),Q.getState().fetchForThread(e)},Ye=async()=>{if(!e||ie)return;me(!0);const r=await C.merge(e,{cleanup:!0});if(r.isErr())pe(r.error.message,e);else{const a=P||"base";b.success(i("review.mergeSuccess",{target:a,defaultValue:`Merged into ${a} successfully`}))}me(!1),Q.getState().fetchForThread(e)},Je=r=>{const a=r.split("/"),h=[];for(let u=a.length-1;u>0;u--)h.push("/"+a.slice(0,u).join("/"));return h},Ze=r=>{const a=r.lastIndexOf(".");return a===-1||a===r.length-1?null:r.substring(a)},ye=(r,a)=>{const h=a?r:`/${r}`;navigator.clipboard.writeText(h),b.success(i("review.pathCopied"))},Qe=k.size>0&&D.trim().length>0&&!A;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-sidebar-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"text-xs font-semibold text-sidebar-foreground uppercase tracking-wider",children:i("review.title")}),s.jsxs(ee,{children:[s.jsx(te,{asChild:!0,children:s.jsx(R,{variant:"ghost",size:"icon-xs",onClick:T,className:"text-muted-foreground",children:s.jsx(lt,{className:O("h-3.5 w-3.5",y&&"animate-spin")})})}),s.jsx(se,{side:"top",children:i("review.refresh")})]})]}),s.jsxs(ee,{children:[s.jsx(te,{asChild:!0,children:s.jsx(R,{variant:"ghost",size:"icon-xs",onClick:()=>d(!1),className:"text-muted-foreground",children:s.jsx(Vt,{className:"h-3.5 w-3.5"})})}),s.jsx(se,{side:"top",children:i("review.close","Close")})]})]}),s.jsxs("div",{className:"flex-1 flex min-h-0",children:[s.jsx("div",{className:"flex-1 min-w-0 flex flex-col",children:s.jsxs(Ce,{className:"flex-1 w-full",children:[v?w===v?s.jsxs("div",{className:"flex items-center gap-2 p-3 text-xs text-muted-foreground",children:[s.jsx(B,{className:"h-3.5 w-3.5 animate-spin"}),"Loading diff..."]}):ve?s.jsxs("div",{className:"relative text-xs [&_.diff-container]:font-mono [&_.diff-container]:text-sm [&_table]:w-max [&_td:last-child]:w-auto [&_td:last-child]:min-w-0",children:[s.jsxs(ee,{children:[s.jsx(te,{asChild:!0,children:s.jsx(R,{variant:"secondary",size:"icon-xs",onClick:()=>N(v),className:"sticky top-2 right-2 z-10 opacity-70 hover:opacity-100 shadow-md float-right mr-2 mt-2",children:s.jsx(ct,{className:"h-3.5 w-3.5"})})}),s.jsx(se,{side:"left",children:i("review.expand","Expand")})]}),s.jsx(f.Suspense,{fallback:s.jsx("div",{className:"p-2 text-xs text-muted-foreground",children:"Loading diff..."}),children:s.jsx(De,{diff:ve})})]}):s.jsx("p",{className:"text-xs text-muted-foreground p-2",children:i("review.binaryOrNoDiff")}):s.jsx("p",{className:"text-xs text-muted-foreground p-2",children:i("review.selectFile")}),s.jsx(Se,{orientation:"horizontal"})]})}),s.jsxs("div",{className:"w-[352px] flex-shrink-0 border-l border-sidebar-border flex flex-col",children:[j.truncated&&s.jsx("div",{className:"px-3 py-1.5 bg-yellow-500/10 border-b border-sidebar-border text-xs text-yellow-600 dark:text-yellow-400",children:i("review.truncatedWarning",{shown:o.length,total:j.total,defaultValue:`Showing ${o.length} of ${j.total} files. Some files were excluded.`})}),o.length>0&&s.jsx("div",{className:"px-2 py-2 border-b border-sidebar-border",children:s.jsxs("div",{className:"relative",children:[s.jsx(dt,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none"}),s.jsx(ht,{type:"text",placeholder:i("review.searchFiles","Filter files..."),value:I,onChange:r=>z(r.target.value),className:"h-7 pl-7 pr-7 text-xs md:text-xs"}),I&&s.jsx(R,{variant:"ghost",size:"icon-xs",onClick:()=>z(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground",children:s.jsx(ut,{className:"h-3 w-3"})})]})}),o.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-1.5 border-b border-sidebar-border",children:[s.jsx("button",{onClick:He,className:O("flex items-center justify-center h-3.5 w-3.5 rounded border transition-colors flex-shrink-0",k.size===o.length?"bg-primary border-primary text-primary-foreground":k.size>0?"bg-primary/50 border-primary text-primary-foreground":"border-muted-foreground/40"),children:k.size>0&&s.jsx(ke,{className:"h-2.5 w-2.5"})}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[$e,"/",Ve," ",i("review.selected","selected")]})]}),y?s.jsxs("div",{className:"flex items-center gap-2 p-3 text-xs text-muted-foreground",children:[s.jsx(B,{className:"h-3.5 w-3.5 animate-spin"}),i("review.loading","Loading changes...")]}):o.length===0?s.jsx("p",{className:"text-xs text-muted-foreground p-3",children:i("review.noChanges")}):oe.length===0?s.jsx("p",{className:"text-xs text-muted-foreground p-3",children:i("review.noMatchingFiles","No matching files")}):s.jsx("div",{ref:xe,className:"flex-1 overflow-auto",children:s.jsx("div",{style:{height:`${be.getTotalSize()}px`,width:"100%",position:"relative"},children:be.getVirtualItems().map(r=>{const a=oe[r.index],h=k.has(a.path);return s.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${r.size}px`,transform:`translateY(${r.start}px)`},className:O("group flex items-center gap-1.5 px-4 text-xs cursor-pointer transition-colors",v===a.path?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-muted-foreground"),onClick:()=>M(a.path),children:[s.jsx("button",{onClick:u=>{u.stopPropagation(),Be(a.path)},className:O("flex items-center justify-center h-3.5 w-3.5 rounded border transition-colors flex-shrink-0",h?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/40"),children:h&&s.jsx(ke,{className:"h-2.5 w-2.5"})}),s.jsx("span",{className:"flex-1 truncate font-mono text-[11px]",children:a.path}),s.jsxs(ft,{children:[s.jsx(mt,{asChild:!0,children:s.jsx("button",{onClick:u=>u.stopPropagation(),className:"flex items-center justify-center h-4 w-4 rounded text-muted-foreground hover:text-foreground transition-all flex-shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:s.jsx(gt,{className:"h-3 w-3"})})}),s.jsxs(pt,{align:"end",className:"min-w-[220px]",children:[s.jsxs(W,{onClick:()=>Ke(a.path),className:"text-destructive focus:text-destructive",children:[s.jsx(Ht,{}),i("review.discardChanges")]}),s.jsx(Me,{}),s.jsxs(W,{onClick:()=>Z(a.path),children:[s.jsx(ze,{}),i("review.ignoreFile")]}),(()=>{const u=Je(a.path);return u.length===0?null:u.length===1?s.jsxs(W,{onClick:()=>Z(u[0]),children:[s.jsx(Ee,{}),i("review.ignoreFolder")]}):s.jsxs(xt,{children:[s.jsxs(wt,{children:[s.jsx(Ee,{}),i("review.ignoreFolder")]}),s.jsx(vt,{children:u.map(p=>s.jsx(W,{onClick:()=>Z(p),children:p},p))})]})})(),(()=>{const u=Ze(a.path);return u?s.jsxs(W,{onClick:()=>Z(`*${u}`),children:[s.jsx(ze,{}),i("review.ignoreExtension",{ext:u})]}):null})(),s.jsx(Me,{}),s.jsxs(W,{onClick:()=>ye(a.path,!1),children:[s.jsx(bt,{}),i("review.copyFilePath")]}),s.jsxs(W,{onClick:()=>ye(a.path,!0),children:[s.jsx(Ft,{}),i("review.copyRelativePath")]})]})]}),s.jsx("span",{className:O("text-[10px] font-medium flex-shrink-0",a.status==="added"&&"text-status-success",a.status==="modified"&&"text-status-pending",a.status==="deleted"&&"text-destructive",a.status==="renamed"&&"text-status-info"),children:a.status==="added"?"A":a.status==="modified"?"M":a.status==="deleted"?"D":"R"})]},a.path)})})}),o.length>0&&s.jsxs("div",{className:"border-t border-sidebar-border p-2 space-y-1.5 flex-shrink-0",children:[s.jsx("input",{type:"text",placeholder:i("review.commitTitle"),value:D,onChange:r=>he(r.target.value),disabled:!!A,className:"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),s.jsxs("div",{className:"rounded-md border border-input bg-background focus-within:ring-1 focus-within:ring-ring",children:[s.jsx("textarea",{className:"w-full px-2 py-1.5 text-xs placeholder:text-muted-foreground focus:outline-none resize-none bg-transparent",rows:7,placeholder:i("review.commitBody"),value:X,onChange:r=>ue(r.target.value),disabled:!!A}),s.jsx("div",{className:"flex items-center px-1.5 py-1",children:s.jsxs(ee,{children:[s.jsx(te,{asChild:!0,children:s.jsx(R,{variant:"ghost",size:"icon-xs",onClick:qe,disabled:o.length===0||J||!!A,children:s.jsx(yt,{className:O("h-2.5 w-2.5",J&&"animate-pulse")})})}),s.jsx(se,{side:"top",children:i(J?"review.generatingCommitMsg":"review.generateCommitMsg")})]})})]}),s.jsx("div",{className:O("grid gap-1",ne?"grid-cols-4":"grid-cols-3"),children:[{value:"commit",icon:Pt,label:i("review.commit","Commit")},{value:"commit-push",icon:ce,label:i("review.commitAndPush","Commit & Push")},{value:"commit-pr",icon:Wt,label:i("review.commitAndCreatePR","Commit & Create PR")},...ne?[{value:"commit-merge",icon:le,label:i("review.commitAndMerge","Commit & Merge")}]:[]].map(({value:r,icon:a,label:h})=>s.jsxs("button",{type:"button",onClick:()=>Pe(r),disabled:!!A,className:O("flex flex-col items-center gap-1 rounded-md border p-2 text-center transition-all","hover:bg-accent/50 disabled:opacity-50 disabled:cursor-not-allowed",_===r?"border-primary bg-primary/5 text-foreground":"border-border text-muted-foreground"),children:[s.jsx(a,{className:O("h-4 w-4",_===r&&"text-primary")}),s.jsx("span",{className:"text-[10px] font-medium leading-tight",children:h})]},r))}),s.jsxs(R,{className:"w-full",size:"sm",onClick:Ue,disabled:!Qe,children:[A?s.jsx(B,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):null,i("review.continue","Continue")]})]}),We&&s.jsxs("div",{className:"border-t border-sidebar-border p-3 flex-shrink-0 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(ce,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:i("review.readyToPush",{count:$.unpushedCommitCount,defaultValue:`${$.unpushedCommitCount} commit(s) ready to push`})})]}),s.jsxs(R,{className:"w-full",size:"sm",onClick:Xe,disabled:re,children:[re?s.jsx(B,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(ce,{className:"h-3.5 w-3.5 mr-1.5"}),i("review.pushToOrigin","Push to origin")]})]}),Le&&s.jsxs("div",{className:"border-t border-sidebar-border p-3 flex-shrink-0 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(le,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:i("review.readyToMerge",{target:P||"base",defaultValue:`Ready to merge into ${P||"base"}`})})]}),s.jsxs(R,{className:"w-full",size:"sm",onClick:Ye,disabled:ie,children:[ie?s.jsx(B,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(le,{className:"h-3.5 w-3.5 mr-1.5"}),i("review.mergeIntoBranch",{target:P||"base",defaultValue:`Merge into ${P||"base"}`})]})]})]})]}),s.jsx(jt,{open:!!S,onOpenChange:r=>{r||N(null)},children:s.jsx(Ct,{className:"max-w-[90vw] w-[90vw] h-[85vh] flex flex-col p-0 gap-0",children:(()=>{if(!S)return null;const r=o.find(u=>u.path===S);if(!r)return null;const a=l.get(S),h=rs[r.status]||de;return s.jsxs(s.Fragment,{children:[s.jsxs(St,{className:"px-4 py-3 pr-10 border-b border-border flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(h,{className:"h-4 w-4 flex-shrink-0"}),s.jsx(kt,{className:"font-mono text-sm truncate",children:r.path})]}),s.jsx(Mt,{className:"sr-only",children:i("review.diffFor",{file:r.path,defaultValue:`Diff for ${r.path}`})})]}),s.jsxs(Ce,{className:"flex-1 min-h-0",children:[w===S?s.jsxs("div",{className:"flex items-center gap-2 p-4 text-sm text-muted-foreground",children:[s.jsx(B,{className:"h-4 w-4 animate-spin"}),"Loading diff..."]}):a?s.jsx("div",{className:"[&_.diff-container]:font-mono [&_table]:w-full [&_td]:overflow-hidden [&_td]:text-ellipsis",children:s.jsx(f.Suspense,{fallback:s.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading diff..."}),children:s.jsx(De,{diff:a,splitView:!0})})}):s.jsx("p",{className:"text-sm text-muted-foreground p-4",children:i("review.binaryOrNoDiff")}),s.jsx(Se,{orientation:"horizontal"})]})]})})()})})]})}export{ms as ReviewPane};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a,j as e}from"./markdown-B7CXSXYD.js";import{$ as J,d as $,a2 as de,a as E,as as Ee,B as p,at as ue,q as V,I,au as xe,av as he,aw as pe,ax as ge,ay as Z,L as B,F as Q,X as me,c as G,T as Ae,az as Xe,l as U,t as F,aj as Te,E as Ze,aA as Qe,aB as Ye,W as es,aC as ss,aD as De,M as Me,D as ze,e as Ie,f as Re,g as Le,h as ts,o as _e,aE as as,ao as we,a8 as ye,H,J as q,aq as ns,K,aF as ae,aG as Oe,j as rs,aH as X,aI as ls,aJ as is,aK as oe,aL as os,aM as cs,aN as ds,aO as ke,aP as ms,aQ as us,aR as xs,a5 as hs,u as ps,aS as gs,aT as fs,aU as js}from"./index-BRi6al6L.js";import{T as Ns}from"./ThreadListView-B6HvQ8NV.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";const vs=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],bs=J("archive-restore",vs);const ws=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],re=J("circle-alert",ws);const ys=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Fe=J("download",ys);const ks=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Cs=J("history",ks);const Ss=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ps=J("key-round",Ss);const Es=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],As=J("pause",Es);const Ts=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Ds=J("puzzle",Ts);const Ms=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],zs=J("rotate-ccw",Ms);const Is=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ce=J("shield-alert",Is);function Be({type:s}){return e.jsxs("span",{className:G("inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium uppercase tracking-wider",s==="http"?"bg-status-info/10 text-status-info/80":s==="sse"?"bg-status-warning/10 text-status-warning/80":"bg-status-success/10 text-status-success/80"),children:[s==="stdio"?e.jsx(Ae,{className:"h-2.5 w-2.5"}):e.jsx(Xe,{className:"h-2.5 w-2.5"}),s]})}function Rs({server:s,onRemove:n,removing:x,onAuthenticate:i,authenticating:m,onSetToken:v,settingToken:b}){const{t:y}=$(),[k,C]=a.useState(!1),[g,S]=a.useState("");return e.jsxs("div",{className:G("flex flex-col gap-1.5 px-3 py-2.5 rounded-md border bg-card",s.status==="needs_auth"?"border-status-warning/40":"border-border/50"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Ee,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),e.jsx(Be,{type:s.type}),s.status==="needs_auth"&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium bg-status-warning/10 text-status-warning/80",children:[e.jsx(Ce,{className:"h-2.5 w-2.5"}),y("mcp.needsAuth")]})]}),e.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:s.url||[s.command,...s.args||[]].join(" ")})]})]}),e.jsx(p,{variant:"ghost",size:"icon-xs",onClick:n,disabled:x,className:"text-muted-foreground hover:text-destructive flex-shrink-0",children:x?e.jsx(B,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Q,{className:"h-3.5 w-3.5"})})]}),s.status==="needs_auth"&&e.jsxs("div",{className:"pl-7 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"outline",size:"sm",onClick:i,disabled:m||b,className:"text-xs h-6 px-2 border-status-warning/30 text-status-warning/80 hover:bg-status-warning/10",children:[m?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):e.jsx(Ce,{className:"h-3 w-3 mr-1"}),m?y("mcp.authenticating"):"OAuth"]}),e.jsxs(p,{variant:k?"secondary":"outline",size:"sm",onClick:()=>C(!k),disabled:m||b,className:"text-xs h-6 px-2",children:[e.jsx(Ps,{className:"h-3 w-3 mr-1"}),y("mcp.manualToken")]})]}),k&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{type:"password",value:g,onChange:u=>S(u.target.value),placeholder:y("mcp.tokenPlaceholder"),className:"flex-1 h-7 px-2 text-xs"}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{g&&v&&(v(g),S(""),C(!1))},disabled:!g||b,className:"text-xs h-7 px-2",children:b?e.jsx(B,{className:"h-3 w-3 animate-spin"}):e.jsx(me,{className:"h-3 w-3"})})]})]})]})}function Ls({server:s,installed:n,onInstall:x,installing:i}){const{t:m}=$();return e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5 rounded-md border border-border/50 bg-card",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(Be,{type:s.type})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s.description})]}),e.jsxs(p,{variant:n?"ghost":"outline",size:"sm",onClick:x,disabled:n||i,className:"flex-shrink-0 text-xs h-7",children:[i?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):n?null:e.jsx(Fe,{className:"h-3 w-3 mr-1"}),m(n?"mcp.installed":i?"mcp.installing":"mcp.install")]})]})}function _s(){const{t:s}=$(),n=de(o=>o.projects),x=de(o=>o.selectedProjectId),[i,m]=a.useState([]),[v,b]=a.useState([]),[y,k]=a.useState(!1),[C,g]=a.useState(null),[S,u]=a.useState(null),[f,w]=a.useState(null),[N,h]=a.useState(null),[P,R]=a.useState(null),[D,M]=a.useState(!1),[z,O]=a.useState(""),[c,d]=a.useState("stdio"),[l,A]=a.useState(""),[T,t]=a.useState(""),[j,W]=a.useState(""),[Y,ee]=a.useState(!1),r=x?n.find(L=>L.id===x)?.path??null:n.length>0?n[0].path:null,_=a.useCallback(async()=>{if(!r)return;k(!0),g(null);const o=await E.listMcpServers(r);o.isOk()?m(o.value.servers):g(o.error.message),k(!1)},[r]),fe=a.useRef(null);a.useEffect(()=>{!r||r===fe.current||(fe.current=r,_())},[r,_]);const je=a.useRef(!1);a.useEffect(()=>{je.current||(je.current=!0,(async()=>{const o=await E.getRecommendedMcpServers();o.isOk()&&b(o.value.servers)})())},[]);const Ue=async o=>{if(!r)return;u(o);const L=await E.removeMcpServer(o,r);L.isErr()?g(L.error.message):await _(),u(null)},$e=async o=>{if(!r)return;w(o.name);const L=await E.addMcpServer({name:o.name,type:o.type,url:o.url,command:o.command,args:o.args,projectPath:r});L.isErr()?g(L.error.message):await _(),w(null)},We=async()=>{if(!r||!z)return;ee(!0),g(null);const o={name:z,type:c,projectPath:r};c==="http"||c==="sse"?o.url=l:(o.command=T,o.args=j.split(/\s+/).filter(Boolean));const L=await E.addMcpServer(o);L.isErr()?g(L.error.message):(await _(),O(""),A(""),t(""),W(""),M(!1)),ee(!1)},Ge=async o=>{if(!r)return;h(o.name),g(null);const L=await E.startMcpOAuth(o.name,r);if(L.isErr()){g(L.error.message),h(null);return}const{authUrl:se}=L.value,Ne=600,ve=700,qe=window.screenX+(window.innerWidth-Ne)/2,Ke=window.screenY+(window.innerHeight-ve)/2,be=window.open(se,"mcp-oauth",`width=${Ne},height=${ve},left=${qe},top=${Ke},popup=yes`),le=ie=>{ie.data?.type==="mcp-oauth-callback"&&(window.removeEventListener("message",le),h(null),ie.data.success?_():g(ie.data.error||s("mcp.authFailed")))};window.addEventListener("message",le);const Je=setInterval(()=>{be&&be.closed&&(clearInterval(Je),window.removeEventListener("message",le),h(null),_())},500)},Ve=async(o,L)=>{if(!r)return;R(o.name),g(null);const se=await E.setMcpToken(o.name,r,L);se.isErr()?g(se.error.message):await _(),R(null)},He=new Set(i.map(o=>o.name));return r?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(Ee,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s("mcp.showingFor")," ",e.jsx("span",{className:"font-medium text-foreground",children:n.find(o=>o.path===r)?.name||r})]})]}),C&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md bg-destructive/10 text-destructive text-xs",children:[e.jsx(re,{className:"h-3.5 w-3.5 flex-shrink-0"}),e.jsx("span",{children:C}),e.jsx("button",{onClick:()=>g(null),className:"ml-auto text-xs underline",children:s("mcp.dismiss")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:s("mcp.installedServers")}),e.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>M(!D),className:"text-xs h-6 px-2",children:[D?e.jsx(ue,{className:"h-3 w-3 mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s(D?"mcp.cancel":"mcp.addCustom")]})]}),D&&e.jsxs("div",{className:"rounded-lg border border-border/50 p-3 mb-3 space-y-3 bg-muted/30",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:s("mcp.name")}),e.jsx(I,{type:"text",value:z,onChange:o=>O(o.target.value),placeholder:"my-server",className:"h-8 px-2"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:s("mcp.type")}),e.jsxs(xe,{value:c,onValueChange:o=>d(o),children:[e.jsx(he,{className:"h-8",children:e.jsx(pe,{})}),e.jsxs(ge,{children:[e.jsx(Z,{value:"stdio",children:"stdio"}),e.jsx(Z,{value:"http",children:"http"}),e.jsx(Z,{value:"sse",children:"sse"})]})]})]})]}),c==="http"||c==="sse"?e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:s("mcp.url")}),e.jsx(I,{type:"text",value:l,onChange:o=>A(o.target.value),placeholder:"https://api.example.com/mcp",className:"h-8 px-2"})]}):e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:s("mcp.command")}),e.jsx(I,{type:"text",value:T,onChange:o=>t(o.target.value),placeholder:"npx",className:"h-8 px-2"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:s("mcp.arguments")}),e.jsx(I,{type:"text",value:j,onChange:o=>W(o.target.value),placeholder:"-y @package/name",className:"h-8 px-2"})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(p,{size:"sm",onClick:We,disabled:!z||Y,className:"text-xs h-7",children:[Y?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s("mcp.addServer")]})})]}),y?e.jsxs("div",{className:"flex items-center gap-2 py-6 justify-center text-sm text-muted-foreground",children:[e.jsx(B,{className:"h-4 w-4 animate-spin"}),s("mcp.loadingServers")]}):i.length===0?e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s("mcp.noServers")}):e.jsx("div",{className:"space-y-1.5",children:i.map(o=>e.jsx(Rs,{server:o,onRemove:()=>Ue(o.name),removing:S===o.name,onAuthenticate:()=>Ge(o),authenticating:N===o.name,onSetToken:L=>Ve(o,L),settingToken:P===o.name},o.name))})]}),v.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:s("mcp.recommendedServers")}),e.jsx("div",{className:"space-y-1.5",children:v.map(o=>e.jsx(Ls,{server:o,installed:He.has(o.name),onInstall:()=>$e(o),installing:f===o.name},o.name))})]})]}):e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(re,{className:"h-4 w-4"}),s("mcp.selectProject")]})}function Se({skill:s,onRemove:n,removing:x}){return e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5 rounded-md border border-border/50 bg-card",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Te,{className:"h-4 w-4 text-status-warning flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-sm font-medium truncate",children:s.name})}),s.description&&e.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:s.description}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground/70",children:s.source}),s.sourceUrl&&e.jsx("a",{href:s.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground/70 hover:text-foreground inline-flex items-center gap-0.5",children:e.jsx(Ze,{className:"h-2.5 w-2.5"})}),s.installedAt&&e.jsxs("span",{className:"text-xs text-muted-foreground/70",children:["installed ",new Date(s.installedAt).toLocaleDateString()]})]})]})]}),s.scope!=="project"&&e.jsx(p,{variant:"ghost",size:"icon-xs",onClick:n,disabled:x,className:"text-muted-foreground hover:text-destructive flex-shrink-0",children:x?e.jsx(B,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Q,{className:"h-3.5 w-3.5"})})]})}function Os({skill:s,installed:n,onInstall:x,installing:i}){const{t:m}=$();return e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5 rounded-md border border-border/50 bg-card",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-sm font-medium",children:s.name})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s.description}),e.jsx("p",{className:"text-xs text-muted-foreground/70 mt-0.5 font-mono",children:s.identifier})]}),e.jsxs(p,{variant:n?"ghost":"outline",size:"sm",onClick:x,disabled:n||i,className:"flex-shrink-0 text-xs h-7",children:[i?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):n?null:e.jsx(Fe,{className:"h-3 w-3 mr-1"}),m(n?"skills.installed":i?"skills.installing":"skills.install")]})]})}function Fs({command:s}){return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[e.jsxs("span",{className:"font-mono text-foreground/80",children:["/",s.name]}),s.description&&e.jsx("span",{className:"text-muted-foreground/70 truncate",children:s.description})]})}function Bs({plugin:s}){const{t:n}=$(),[x,i]=a.useState(!1),m=s.commands.length>0;return e.jsx(Qe,{open:x,onOpenChange:i,children:e.jsxs("div",{className:"rounded-md border border-border/50 bg-card",children:[e.jsx(Ye,{asChild:!0,children:e.jsxs("button",{className:"flex items-center justify-between gap-3 px-3 py-2.5 w-full text-left hover:bg-muted/30 transition-colors rounded-md",disabled:!m,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Ds,{className:"h-4 w-4 text-purple-500 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),m&&e.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-medium",children:[s.commands.length," ",s.commands.length===1?n("plugins.command"):n("plugins.commands")]})]}),s.description&&e.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:s.description}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.author&&e.jsxs("span",{className:"text-xs text-muted-foreground/70",children:[n("plugins.by")," ",s.author]}),s.installedAt&&e.jsxs("span",{className:"text-xs text-muted-foreground/70",children:["installed ",new Date(s.installedAt).toLocaleDateString()]})]})]})]}),m&&e.jsx(es,{className:G("h-3.5 w-3.5 text-muted-foreground transition-transform flex-shrink-0",x&&"rotate-180")})]})}),m&&e.jsx(ss,{children:e.jsx("div",{className:"border-t border-border/50 py-1",children:s.commands.map(v=>e.jsx(Fs,{command:v},v.name))})})]})})}function Us(){const{t:s}=$(),n=U(r=>r.projects),x=U(r=>r.selectedProjectId),[i,m]=a.useState([]),[v,b]=a.useState([]),[y,k]=a.useState([]),[C,g]=a.useState(!1),[S,u]=a.useState(!1),[f,w]=a.useState(null),[N,h]=a.useState(null),[P,R]=a.useState(!1),[D,M]=a.useState(""),[z,O]=a.useState(!1),c=x?n.find(r=>r.id===x)?.path??null:n[0]?.path??null,d=a.useCallback(async()=>{g(!0);const r=await E.listSkills(c||void 0);r.isOk()?m(r.value.skills):F.error(r.error.message),g(!1)},[c]),l=a.useCallback(async()=>{u(!0);const r=await E.listPlugins();r.isOk()&&b(r.value.plugins),u(!1)},[]),A=a.useCallback(async()=>{const r=await E.getRecommendedSkills();r.isOk()&&k(r.value.skills)},[]);a.useEffect(()=>{d()},[d]),a.useEffect(()=>{l()},[l]),a.useEffect(()=>{A()},[A]);const T=async r=>{w(r);const _=await E.removeSkill(r);_.isErr()?F.error(_.error.message):(await d(),F.success(`Skill "${r}" removed`)),w(null)},t=async r=>{h(r.identifier);const _=await E.addSkill(r.identifier);_.isErr()?F.error(_.error.message):(await d(),F.success(`Skill "${r.name}" installed successfully`)),h(null)},j=async()=>{const r=D.trim();if(!r)return;O(!0);const _=await E.addSkill(r);_.isErr()?F.error(_.error.message):(await d(),F.success(`Skill "${r}" installed successfully`),M(""),R(!1)),O(!1)},W=i.filter(r=>r.scope==="project"),Y=i.filter(r=>r.scope!=="project"),ee=new Set(i.map(r=>r.name));return e.jsxs("div",{className:"space-y-6",children:[c&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(Te,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s("skills.showingFor")," ",e.jsx("span",{className:"font-medium text-foreground",children:n.find(r=>r.path===c)?.name||c})]})]}),W.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:s("skills.projectSkills")}),e.jsx("div",{className:"space-y-1.5",children:W.map(r=>e.jsx(Se,{skill:r,onRemove:()=>{},removing:!1},`project-${r.name}`))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:s("skills.globalSkills")}),e.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>R(!P),className:"text-xs h-6 px-2",children:[P?e.jsx(ue,{className:"h-3 w-3 mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s(P?"skills.cancel":"skills.addCustom")]})]}),P&&e.jsxs("div",{className:"rounded-lg border border-border/50 p-3 mb-3 space-y-2 bg-muted/30",children:[e.jsxs("label",{className:"text-xs text-muted-foreground block",children:[s("skills.skillIdentifier")," (e.g. ",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"owner/repo@skill-name"}),")"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{type:"text",value:D,onChange:r=>M(r.target.value),placeholder:"vercel-labs/agent-skills@nextjs-best-practices",className:"flex-1 h-8 px-2 font-mono text-xs",onKeyDown:r=>r.key==="Enter"&&j()}),e.jsxs(p,{size:"sm",onClick:j,disabled:!D.trim()||z,className:"text-xs h-8",children:[z?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s("skills.install")]})]})]}),C?e.jsxs("div",{className:"flex items-center gap-2 py-6 justify-center text-sm text-muted-foreground",children:[e.jsx(B,{className:"h-4 w-4 animate-spin"}),s("skills.loadingSkills")]}):Y.length===0?e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s("skills.noGlobalSkills")}):e.jsx("div",{className:"space-y-1.5",children:Y.map(r=>e.jsx(Se,{skill:r,onRemove:()=>T(r.name),removing:f===r.name},r.name))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:s("plugins.installedPlugins")}),e.jsx("span",{className:"text-xs text-muted-foreground/60",children:s("plugins.managedByClaudeCode")})]}),S?e.jsxs("div",{className:"flex items-center gap-2 py-6 justify-center text-sm text-muted-foreground",children:[e.jsx(B,{className:"h-4 w-4 animate-spin"}),s("plugins.loadingPlugins")]}):v.length===0?e.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:s("plugins.noPlugins")}):e.jsx("div",{className:"space-y-1.5",children:v.map(r=>e.jsx(Bs,{plugin:r},r.name))})]}),y.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:s("skills.recommendedSkills")}),e.jsx("div",{className:"space-y-1.5",children:y.map(r=>e.jsx(Os,{skill:r,installed:ee.has(r.name),onInstall:()=>t(r),installing:N===r.identifier},r.identifier))})]})]})}function $s({worktree:s,onRemove:n,removing:x}){return e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5 rounded-md border border-border/50 bg-card",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(De,{className:"h-4 w-4 text-status-info flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-sm font-medium truncate",children:s.branch})}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx(as,{className:"h-3 w-3 text-muted-foreground/70 flex-shrink-0"}),e.jsx("span",{className:"text-xs text-muted-foreground/70 truncate font-mono",children:s.path})]}),s.commit&&e.jsx("span",{className:"text-xs text-muted-foreground/70 font-mono",children:s.commit.slice(0,8)})]})]}),!s.isMain&&e.jsx(p,{variant:"ghost",size:"icon-xs",onClick:n,disabled:x,className:"text-muted-foreground hover:text-destructive flex-shrink-0",children:x?e.jsx(B,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Q,{className:"h-3.5 w-3.5"})})]})}function Ws(){const{t:s}=$(),n=U(t=>t.projects),x=U(t=>t.selectedProjectId),[i,m]=a.useState([]),[v,b]=a.useState([]),[y,k]=a.useState(!1),[C,g]=a.useState(null),[S,u]=a.useState(null),[f,w]=a.useState(null),[N,h]=a.useState(!1),[P,R]=a.useState(""),[D,M]=a.useState(""),[z,O]=a.useState(!1),c=x?n.find(t=>t.id===x):n[0],d=a.useCallback(async()=>{if(!c)return;k(!0),g(null);const t=await E.listWorktrees(c.id);t.isOk()?m(t.value):g(t.error.message),k(!1)},[c?.id]),l=a.useCallback(async()=>{if(!c)return;const t=await E.listBranches(c.id);if(t.isOk()){const j=t.value;b(j.branches),j.branches.length>0&&M(W=>W||j.defaultBranch||j.branches[0])}else console.error("Failed to load branches:",t.error),g(t.error.message||"Failed to load branches")},[c?.id]);a.useEffect(()=>{d(),l()},[d,l]);const A=async()=>{const t=D||v[0];if(!P.trim()||!c)return;if(!t){g("No base branch available. Make sure the project has at least one commit.");return}O(!0),g(null);const j=await E.createWorktree({projectId:c.id,branchName:P.trim(),baseBranch:t});j.isErr()?g(j.error.message):(await d(),R(""),h(!1)),O(!1)},T=async()=>{if(!c||!f)return;const{path:t,branch:j}=f;w(null),u(t);const W=await E.removeWorktree(c.id,t);W.isOk()?(await d(),F.success(s("toast.worktreeDeleted",{branch:j}))):F.error(s("toast.worktreeDeleteFailed",{message:W.error.message})),u(null)};return c?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(De,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s("worktreeSettings.worktreesFor")," ",e.jsx("span",{className:"font-medium text-foreground",children:c.name})]})]}),C&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md bg-destructive/10 text-destructive text-xs",children:[e.jsx(re,{className:"h-3.5 w-3.5 flex-shrink-0"}),e.jsx("span",{children:C}),e.jsx("button",{onClick:()=>g(null),className:"ml-auto text-xs underline",children:s("worktreeSettings.dismiss")})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:s("worktreeSettings.worktrees")}),e.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>h(!N),className:"text-xs h-6 px-2",children:[N?e.jsx(ue,{className:"h-3 w-3 mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s(N?"worktreeSettings.cancel":"worktreeSettings.createWorktree")]})]}),N&&(v.length===0?e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 mb-3 rounded-md bg-status-pending/10 text-status-pending/80 text-xs",children:[e.jsx(re,{className:"h-3.5 w-3.5 flex-shrink-0"}),e.jsx("span",{children:"No branches found. Make sure the project has at least one commit."})]}):e.jsxs("div",{className:"rounded-lg border border-border/50 p-3 mb-3 space-y-3 bg-muted/30",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("worktreeSettings.branchName")}),e.jsx(I,{type:"text",value:P,onChange:t=>R(t.target.value),placeholder:"feature/my-new-branch",className:"h-8 px-2 font-mono text-xs",onKeyDown:t=>t.key==="Enter"&&A()})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("worktreeSettings.baseBranch")}),e.jsxs(xe,{value:D,onValueChange:M,children:[e.jsx(he,{className:"w-full h-8 text-xs",children:e.jsx(pe,{placeholder:"main (default)"})}),e.jsx(ge,{children:v.map(t=>e.jsx(Z,{value:t,children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Me,{className:"h-3 w-3"}),t]})},t))})]})]}),e.jsxs(p,{size:"sm",onClick:A,disabled:!P.trim()||z,className:"text-xs h-8 w-full",children:[z?e.jsx(B,{className:"h-3 w-3 animate-spin mr-1"}):e.jsx(V,{className:"h-3 w-3 mr-1"}),s(z?"worktreeSettings.creating":"worktreeSettings.createWorktree")]})]})),y?e.jsxs("div",{className:"flex items-center gap-2 py-6 justify-center text-sm text-muted-foreground",children:[e.jsx(B,{className:"h-4 w-4 animate-spin"}),s("worktreeSettings.loadingWorktrees")]}):i.length===0?e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s("worktreeSettings.noWorktrees")}):e.jsx("div",{className:"space-y-1.5",children:i.map(t=>e.jsx($s,{worktree:t,onRemove:()=>w(t),removing:S===t.path},t.path))})]}),e.jsx(ze,{open:!!f,onOpenChange:t=>{t||w(null)},children:e.jsxs(Ie,{className:"max-w-sm",children:[e.jsxs(Re,{children:[e.jsx(Le,{children:s("dialog.deleteWorktree")}),e.jsx(ts,{children:s("dialog.deleteWorktreeDesc",{branch:f?.branch})})]}),e.jsxs(_e,{children:[e.jsx(p,{variant:"outline",size:"sm",onClick:()=>w(null),children:s("common.cancel")}),e.jsx(p,{variant:"destructive",size:"sm",onClick:T,children:s("common.delete")})]})]})})]}):e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s("worktreeSettings.noProject")})}function Gs(){const{t:s}=$(),n=U(l=>l.selectedProjectId),x=U(l=>l.projects),[i,m]=a.useState([]),[v,b]=a.useState(!1),[y,k]=a.useState(null),[C,g]=a.useState(""),[S,u]=a.useState(""),f=x.find(l=>l.id===n),w=a.useCallback(async()=>{if(!n)return;const l=await E.listCommands(n);l.isOk()&&m(l.value)},[n]);a.useEffect(()=>{w()},[w]);const N=we(l=>l.tabs),h=new Set;for(const l of N)l.commandId&&l.alive&&h.add(l.commandId);const P=async()=>{if(!n||!C.trim()||!S.trim())return;(await E.addCommand(n,C.trim(),S.trim())).isOk()&&(c(),b(!1),w())},R=async l=>{if(!n||!C.trim()||!S.trim())return;(await E.updateCommand(n,l,C.trim(),S.trim())).isOk()&&(k(null),c(),w())},D=async l=>{if(!n)return;(await E.deleteCommand(n,l)).isOk()&&w()},M=async l=>{if(!n)return;we.getState().addTab({id:crypto.randomUUID(),label:l.label,cwd:"",alive:!0,commandId:l.id,projectId:n}),await E.runCommand(n,l.id)},z=async l=>{n&&await E.stopCommand(n,l.id)},O=l=>{k(l.id),g(l.label),u(l.command),b(!1)},c=()=>{g(""),u("")},d=()=>{k(null),b(!1),c()};return n?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(Ae,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:[s("startup.title")," ",f&&e.jsx("span",{className:"font-medium text-foreground",children:f.name})]})]}),e.jsxs(p,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>{d(),b(!0)},children:[e.jsx(V,{className:"h-3.5 w-3.5"}),s("startup.addCommand")]})]}),i.length===0&&!v&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:s("startup.noCommands")}),e.jsxs(p,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>b(!0),children:[e.jsx(V,{className:"h-3.5 w-3.5"}),s("startup.addFirst")]})]}),i.map(l=>{const A=h.has(l.id);return y===l.id?e.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("startup.label")}),e.jsx(I,{className:"h-auto py-1.5",placeholder:s("startup.label"),value:C,onChange:T=>g(T.target.value),autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("startup.command")}),e.jsx(I,{className:"h-auto py-1.5 font-mono",placeholder:s("startup.command"),value:S,onChange:T=>u(T.target.value),onKeyDown:T=>{T.key==="Enter"&&R(l.id),T.key==="Escape"&&d()}})]})]}),e.jsxs("div",{className:"flex items-center gap-2 justify-end pt-1",children:[e.jsxs(p,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:d,children:[e.jsx(ye,{className:"h-3.5 w-3.5 mr-1"}),s("common.cancel")]}),e.jsxs(p,{size:"sm",className:"h-7 text-xs",onClick:()=>R(l.id),children:[e.jsx(me,{className:"h-3.5 w-3.5 mr-1"}),s("common.save")]})]})]},l.id):e.jsxs("div",{className:"group flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg border border-border/50 bg-card hover:bg-accent/30 transition-colors",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[A&&e.jsx(B,{className:"h-3.5 w-3.5 animate-spin text-status-success flex-shrink-0"}),e.jsx("span",{className:"text-sm font-medium truncate",children:l.label})]}),e.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate block mt-0.5",children:l.command})]}),e.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:[A?e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>z(l),className:"text-status-error hover:text-status-error/80",children:e.jsx(ns,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:s("startup.stop")})]}):e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>M(l),className:"text-status-success hover:text-status-success/80",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:s("startup.run")})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>O(l),className:"text-muted-foreground",children:e.jsx(Oe,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:s("startup.edit")})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>D(l.id),className:"text-muted-foreground hover:text-status-error",children:e.jsx(Q,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:s("startup.delete")})]})]})]},l.id)}),v&&e.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("startup.label")}),e.jsx(I,{className:"h-auto py-1.5",placeholder:s("startup.label"),value:C,onChange:l=>g(l.target.value),autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:s("startup.command")}),e.jsx(I,{className:"h-auto py-1.5 font-mono",placeholder:s("startup.commandPlaceholder"),value:S,onChange:l=>u(l.target.value),onKeyDown:l=>{l.key==="Enter"&&P(),l.key==="Escape"&&d()}})]})]}),e.jsxs("div",{className:"flex items-center gap-2 justify-end pt-1",children:[e.jsxs(p,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:d,children:[e.jsx(ye,{className:"h-3.5 w-3.5 mr-1"}),s("common.cancel")]}),e.jsxs(p,{size:"sm",className:"h-7 text-xs",onClick:P,children:[e.jsx(me,{className:"h-3.5 w-3.5 mr-1"}),s("startup.addCommand")]})]})]})]}):e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s("startup.noCommands")})}const Vs="w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring",ne=[{value:"*/15 * * * *",label:"Every 15 min"},{value:"*/30 * * * *",label:"Every 30 min"},{value:"0 * * * *",label:"Every hour"},{value:"0 */2 * * *",label:"Every 2 hours"},{value:"0 */6 * * *",label:"Every 6 hours"},{value:"0 */12 * * *",label:"Every 12 hours"},{value:"0 9 * * *",label:"Daily at 9am"},{value:"0 9 * * 1",label:"Weekly (Mon 9am)"}];function Hs(s){return ne.find(x=>x.value===s)?.label??s}const qs=[{value:"haiku",label:"Haiku"},{value:"sonnet",label:"Sonnet"},{value:"opus",label:"Opus"}];function Ks({options:s,value:n,onChange:x}){return e.jsx("div",{className:"flex rounded-md border border-border bg-muted/30 p-0.5",children:s.map(i=>e.jsxs("button",{onClick:()=>x(i.value),className:G("flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-sm transition-colors",n===i.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[i.icon,i.label]},i.value))})}const Pe={name:"",prompt:"",schedule:"0 * * * *",model:"sonnet",permissionMode:"autoEdit"};function Js(){const s=rs(),n=U(t=>t.selectedProjectId),i=U(t=>t.projects).find(t=>t.id===n),m=X(t=>t.automationsByProject),v=X(t=>t.loadAutomations),b=X(t=>t.createAutomation),y=X(t=>t.updateAutomation),k=X(t=>t.deleteAutomation),C=X(t=>t.triggerAutomation),g=X(t=>t.selectedAutomationRuns),S=X(t=>t.loadRuns),[u,f]=a.useState(!1),[w,N]=a.useState(null),[h,P]=a.useState(Pe),[R,D]=a.useState(null),M=n?m[n]||[]:[];a.useEffect(()=>{n&&v(n)},[n,v]);const z=()=>{N(null),P(Pe),f(!0)},O=t=>{N(t.id),P({name:t.name,prompt:t.prompt,schedule:t.schedule,model:t.model,permissionMode:t.permissionMode}),f(!0)},c=async(t=!1)=>{if(!n||!h.name.trim()||!h.prompt.trim())return;let j=null;w?(await y(w,{name:h.name.trim(),prompt:h.prompt.trim(),schedule:h.schedule,model:h.model,permissionMode:h.permissionMode}),j=w):j=(await b({projectId:n,name:h.name.trim(),prompt:h.prompt.trim(),schedule:h.schedule,model:h.model,permissionMode:h.permissionMode}))?.id??null,f(!1),t&&j&&await C(j)},d=async t=>{await y(t.id,{enabled:!t.enabled})},l=async t=>{n&&await k(t.id,n)},A=async t=>{await C(t.id)},T=t=>{D(t),S(t)};return n?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(ls,{className:"h-3.5 w-3.5"}),e.jsxs("span",{children:["Automations"," ",i&&e.jsx("span",{className:"font-medium text-foreground",children:i.name})]})]}),e.jsxs(p,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:z,children:[e.jsx(V,{className:"h-3.5 w-3.5"}),"Create"]})]}),M.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"No automations yet."}),e.jsxs(p,{variant:"outline",size:"sm",className:"gap-1.5",onClick:z,children:[e.jsx(V,{className:"h-3.5 w-3.5"}),"Create your first automation"]})]}):M.map(t=>e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"group flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg border border-border/50 bg-card hover:bg-accent/30 transition-colors",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:G("h-2 w-2 rounded-full flex-shrink-0",t.enabled?"bg-status-success/80":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-sm font-medium truncate",children:t.name}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground flex-shrink-0",children:Hs(t.schedule)}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground flex-shrink-0",children:t.model})]}),e.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5 pl-4",children:t.prompt}),t.lastRunAt&&e.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-0.5 pl-4",children:["Last run: ",new Date(t.lastRunAt).toLocaleString()]})]}),e.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:[e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>A(t),className:"text-status-success/80 hover:text-status-success",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:"Run Now"})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>d(t),className:"text-muted-foreground",children:t.enabled?e.jsx(As,{className:"h-3.5 w-3.5"}):e.jsx(ae,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:t.enabled?"Pause":"Enable"})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>T(t.id),className:"text-muted-foreground",children:e.jsx(Cs,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:"Run History"})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>O(t),className:"text-muted-foreground",children:e.jsx(Oe,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:"Edit"})]}),e.jsxs(H,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon-sm",onClick:()=>l(t),className:"text-muted-foreground hover:text-status-error",children:e.jsx(Q,{className:"h-3.5 w-3.5"})})}),e.jsx(K,{children:"Delete"})]})]})]}),R===t.id&&e.jsxs("div",{className:"ml-4 space-y-1",children:[g.length===0?e.jsx("p",{className:"text-xs text-muted-foreground py-2 pl-2",children:"No runs yet."}):g.slice(0,10).map(j=>e.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 py-1.5 rounded border border-border/30 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:G("h-1.5 w-1.5 rounded-full flex-shrink-0",j.status==="running"?"bg-status-info animate-pulse":j.status==="completed"?"bg-status-success/80":j.status==="failed"?"bg-status-error":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-muted-foreground truncate",children:new Date(j.startedAt).toLocaleString()}),e.jsx("span",{className:"text-muted-foreground/70",children:j.status})]}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-5 text-xs px-1.5",onClick:()=>{s(`/projects/${n}/threads/${j.threadId}`)},children:"View"})]},j.id)),e.jsx(p,{variant:"ghost",size:"sm",className:"h-5 text-xs w-full",onClick:()=>D(null),children:"Close"})]})]},t.id)),e.jsx(ze,{open:u,onOpenChange:f,children:e.jsxs(Ie,{className:"max-w-lg",children:[e.jsx(Re,{children:e.jsx(Le,{children:w?"Edit Automation":"Create Automation"})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:"Name"}),e.jsx(I,{className:"h-auto py-1.5",placeholder:"e.g. Daily Issue Triage",value:h.name,onChange:t=>P(j=>({...j,name:t.target.value})),autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:"Prompt"}),e.jsx("textarea",{className:`${Vs} min-h-[100px] resize-y`,placeholder:"What should the agent do?",value:h.prompt,onChange:t=>P(j=>({...j,prompt:t.target.value}))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:"Schedule"}),e.jsxs(xe,{value:ne.some(t=>t.value===h.schedule)?h.schedule:"__custom__",onValueChange:t=>{t!=="__custom__"&&P(j=>({...j,schedule:t}))},children:[e.jsx(he,{className:"w-full",children:e.jsx(pe,{})}),e.jsxs(ge,{children:[ne.map(t=>e.jsx(Z,{value:t.value,children:t.label},t.value)),e.jsx(Z,{value:"__custom__",children:"Custom cron..."})]})]}),!ne.some(t=>t.value===h.schedule)&&e.jsx(I,{className:"h-auto py-1.5 mt-1.5 font-mono text-xs",placeholder:"*/30 * * * *",value:h.schedule,onChange:t=>P(j=>({...j,schedule:t.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Cron: min hour day month weekday"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground block mb-1",children:"Model"}),e.jsx(Ks,{options:qs,value:h.model,onChange:t=>P(j=>({...j,model:t}))})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Automations run locally in read-only mode (no file writes)."})]}),e.jsxs(_e,{children:[e.jsx(p,{variant:"outline",size:"sm",onClick:()=>f(!1),children:"Cancel"}),e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>c(!0),disabled:!h.name.trim()||!h.prompt.trim(),className:"gap-1.5",children:[e.jsx(ae,{className:"h-3 w-3"}),w?"Save & Test":"Create & Test"]}),e.jsx(p,{size:"sm",onClick:()=>c(!1),disabled:!h.name.trim()||!h.prompt.trim(),children:w?"Save":"Create"})]})]})})]}):e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Select a project to manage automations."})}const Xs=[100,250,500,1e3],Zs=100;function Qs(){const{t:s}=$(),n=U(d=>d.projects),x=U(d=>d.loadThreadsForProject),[i,m]=a.useState([]),[v,b]=a.useState(0),[y,k]=a.useState(!0),[C,g]=a.useState(""),[S,u]=a.useState(""),[f,w]=a.useState(1),[N,h]=a.useState(Zs),P=a.useRef(void 0),R=a.useMemo(()=>Object.fromEntries(n.map(d=>[d.id,d])),[n]),D=a.useCallback(async(d,l,A)=>{k(!0);const T=await E.listArchivedThreads({page:d,limit:l,search:A||void 0});T.isOk()&&(m(T.value.threads),b(T.value.total)),k(!1)},[]);a.useEffect(()=>{D(f,N,S)},[D,f,N,S]);const M=d=>{g(d),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{u(d),w(1)},300)},z=d=>{h(d),w(1)},O=async d=>{(await E.archiveThread(d.id,!1)).isOk()?(m(A=>A.filter(T=>T.id!==d.id)),b(A=>A-1),x(d.projectId),F.success(s("archived.restored",{title:d.title}))):F.error(s("archived.restoreFailed"))},c=async d=>{if(!confirm(s("dialog.deleteThreadDesc",{title:d.title})))return;(await E.deleteThread(d.id)).isOk()&&(m(A=>A.filter(T=>T.id!==d.id)),b(A=>A-1),F.success(s("toast.threadDeleted",{title:d.title})))};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:[v," ",s("archived.archivedCount"),S&&` ${s("allThreads.found")}`]}),e.jsx(Ns,{threads:i,totalCount:v,loading:y,search:C,onSearchChange:M,searchPlaceholder:s("archived.searchPlaceholder"),page:f,onPageChange:w,pageSize:N,pageSizeOptions:Xs,onPageSizeChange:z,emptyMessage:s("archived.noArchived"),searchEmptyMessage:s("allThreads.noMatch"),renderExtraBadges:d=>e.jsx("span",{className:"text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded truncate max-w-[150px]",children:R[d.projectId]?.name??"—"}),renderActions:d=>e.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(p,{variant:"ghost",size:"icon-xs",onClick:()=>O(d),title:s("archived.restore"),className:"text-muted-foreground hover:text-foreground",children:e.jsx(bs,{className:"h-3.5 w-3.5"})}),e.jsx(p,{variant:"ghost",size:"icon-xs",onClick:()=>c(d),title:s("common.delete"),className:"text-muted-foreground hover:text-destructive",children:e.jsx(Q,{className:"h-3.5 w-3.5"})})]}),paginationLabel:({from:d,to:l,total:A})=>s("archived.showingRange",{from:d,to:l,total:A,defaultValue:"{{from}}-{{to}} of {{total}}"})})]})}function Ys(){const{t:s}=$(),n=is(c=>c.user),[x,i]=a.useState([]),[m,v]=a.useState(!0),[b,y]=a.useState(!1),[k,C]=a.useState(""),[g,S]=a.useState(""),[u,f]=a.useState(""),[w,N]=a.useState("user"),[h,P]=a.useState(!1),[R,D]=a.useState(""),M=a.useCallback(async()=>{try{v(!0);const c=await oe.admin.listUsers({query:{limit:100}});c.data?.users&&i(c.data.users.map(d=>({id:d.id,name:d.name||"",username:d.username||"",email:d.email||"",role:d.role||"user",createdAt:d.createdAt||""})))}catch(c){console.error("[UserManagement] Failed to list users:",c)}finally{v(!1)}},[]);a.useEffect(()=>{M()},[M]);const z=async()=>{if(!(!k.trim()||!u.trim())){D(""),P(!0);try{await oe.admin.createUser({email:`${k.trim()}@local.host`,password:u,name:g.trim()||k.trim(),role:w,data:{username:k.trim()}}),y(!1),C(""),S(""),f(""),N("user"),await M()}catch(c){D(c.message||s("users.createFailed"))}finally{P(!1)}}},O=async c=>{if(c!==n?.id)try{await oe.admin.removeUser({userId:c}),await M()}catch(d){console.error("[UserManagement] Failed to remove user:",d)}};return m?e.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:s("common.loading")}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 pt-2",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground",children:s("users.title")}),e.jsx(p,{size:"sm",variant:"outline",onClick:()=>y(!b),children:s(b?"common.cancel":"users.addUser")})]}),b&&e.jsxs("div",{className:"mx-4 p-3 rounded-md border border-border space-y-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:s("users.username")}),e.jsx(I,{value:k,onChange:c=>C(c.target.value),placeholder:s("users.usernamePlaceholder"),autoFocus:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:s("users.displayName")}),e.jsx(I,{value:g,onChange:c=>S(c.target.value),placeholder:s("users.displayNamePlaceholder")})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:s("users.password")}),e.jsx(I,{type:"password",value:u,onChange:c=>f(c.target.value),placeholder:s("users.passwordPlaceholder")})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:s("users.role")}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{size:"sm",variant:w==="user"?"default":"outline",onClick:()=>N("user"),children:s("users.roleUser")}),e.jsx(p,{size:"sm",variant:w==="admin"?"default":"outline",onClick:()=>N("admin"),children:s("users.roleAdmin")})]})]}),R&&e.jsx("p",{className:"text-xs text-destructive",children:R}),e.jsx(p,{size:"sm",onClick:z,disabled:h||!k.trim()||!u.trim(),children:s(h?"users.creating":"users.create")})]}),e.jsx("div",{className:"space-y-1 px-4",children:x.map(c=>e.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md hover:bg-accent/50",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"text-sm font-medium text-foreground truncate",children:[c.name||c.username,c.role==="admin"&&e.jsx("span",{className:"ml-2 text-xs text-primary font-normal",children:s("users.roleAdmin")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["@",c.username]})]}),c.id!==n?.id&&e.jsx(p,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>O(c.id),children:s("common.delete")})]},c.id))})]})}function et(){const{t:s}=$(),[n,x]=a.useState(!0),[i,m]=a.useState(!1),[v,b]=a.useState(""),[y,k]=a.useState(""),[C,g]=a.useState(""),[S,u]=a.useState(!1);a.useEffect(()=>{(async()=>{const N=await E.getProfile();if(N.isOk()&&N.value){const h=N.value;b(h.gitName??""),k(h.gitEmail??""),u(h.hasGithubToken)}x(!1)})()},[]);const f=async()=>{m(!0);const N={};N.gitName=v||void 0,N.gitEmail=y||void 0,C&&(N.githubToken=C);const h=await E.updateProfile(N);if(h.isOk()){const P=h.value;u(P.hasGithubToken),g(""),F.success(s("profile.saved"))}else F.error(s("profile.saveFailed"));m(!1)},w=async()=>{m(!0),(await E.updateProfile({githubToken:null})).isOk()&&(u(!1),g(""),F.success(s("profile.tokenCleared"))),m(!1)};return n?e.jsx("p",{className:"text-sm text-muted-foreground",children:s("common.loading")}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1 pb-2",children:s("profile.gitIdentity")}),e.jsxs("div",{className:"rounded-lg border border-border/50 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3.5 border-b border-border/50",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:s("profile.gitName")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-2",children:s("profile.gitNameDesc")}),e.jsx(I,{value:v,onChange:N=>b(N.target.value),placeholder:"John Doe"})]}),e.jsxs("div",{className:"px-4 py-3.5",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:s("profile.gitEmail")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-2",children:s("profile.gitEmailDesc")}),e.jsx(I,{type:"email",value:y,onChange:N=>k(N.target.value),placeholder:"john@example.com"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1 pb-2",children:s("profile.githubToken")}),e.jsx("div",{className:"rounded-lg border border-border/50 overflow-hidden",children:e.jsxs("div",{className:"px-4 py-3.5",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:s("profile.githubTokenLabel")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-2",children:s("profile.githubTokenDesc")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{type:"password",value:C,onChange:N=>g(N.target.value),placeholder:s(S?"profile.tokenSaved":"profile.tokenPlaceholder")}),S&&e.jsx(p,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive shrink-0",onClick:w,disabled:i,children:s("profile.clearToken")})]})]})})]}),e.jsx(p,{onClick:f,disabled:i,children:s(i?"profile.saving":"common.save")})]})}function ce({title:s,description:n,children:x}){return e.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3.5 border-b border-border/50 last:border-b-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:s}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n})]}),e.jsx("div",{className:"flex-shrink-0",children:x})]})}function te({options:s,value:n,onChange:x}){return e.jsx("div",{className:"flex rounded-md border border-border bg-muted/30 p-0.5",children:s.map(i=>e.jsxs("button",{onClick:()=>x(i.value),className:G("flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-sm transition-colors",n===i.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[i.icon,i.label]},i.value))})}const st=["#7CB9E8","#F4A4A4","#A8D5A2","#F9D98C","#C3A6E0","#F2A6C8","#89D4CF","#F9B97C"];function tt({projectId:s,currentColor:n}){const x=de(i=>i.updateProject);return e.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3.5 border-b border-border/50 last:border-b-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Project Color"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Pick any color for this project"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("button",{onClick:()=>x(s,{color:null}),className:G("h-7 w-7 rounded-md border-2 transition-all flex items-center justify-center",n?"border-border hover:border-muted-foreground":"border-primary shadow-sm"),title:"No color",children:e.jsx("div",{className:"h-4 w-4 rounded-sm bg-gradient-to-br from-muted-foreground/20 to-muted-foreground/40"})}),st.map(i=>e.jsx("button",{onClick:()=>x(s,{color:i}),className:G("h-7 w-7 rounded-md border-2 transition-all",n===i?"border-primary shadow-sm scale-110":"border-transparent hover:border-muted-foreground"),style:{backgroundColor:i},title:i},i))]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"color",value:n||"#7CB9E8",onChange:i=>x(s,{color:i.target.value}),className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),e.jsx("div",{className:G("h-8 w-8 rounded-lg border-2 shadow-sm cursor-pointer transition-all hover:scale-105",n?"border-primary/50":"border-border"),style:{backgroundColor:n||"transparent"},children:!n&&e.jsx("div",{className:"h-full w-full rounded-md bg-gradient-to-br from-muted-foreground/10 to-muted-foreground/30 flex items-center justify-center",children:e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})})})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Custom color"}),n&&e.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:n})]})]})}function at(){const{defaultThreadMode:s,defaultModel:n,defaultPermissionMode:x,toolPermissions:i,setDefaultThreadMode:m,setDefaultModel:v,setDefaultPermissionMode:b,setToolPermission:y,resetToolPermissions:k}=ps(),C=U(f=>f.selectedProjectId),S=U(f=>f.projects).find(f=>f.id===C),{t:u}=$();return e.jsxs(e.Fragment,{children:[S&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1 pb-2",children:"Project"}),e.jsx("div",{className:"rounded-lg border border-border/50 overflow-hidden mb-6",children:e.jsx(tt,{projectId:S.id,currentColor:S.color})})]}),e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1 pb-2 mt-6",children:u("settings.threads")}),e.jsxs("div",{className:"rounded-lg border border-border/50 overflow-hidden",children:[e.jsx(ce,{title:u("settings.defaultThreadMode"),description:u("settings.defaultThreadModeDesc"),children:e.jsx(te,{value:s,onChange:m,options:[{value:"local",label:u("thread.mode.local"),icon:e.jsx(gs,{className:"h-3 w-3"})},{value:"worktree",label:u("thread.mode.worktree"),icon:e.jsx(Me,{className:"h-3 w-3"})}]})}),e.jsx(ce,{title:u("settings.defaultModel"),description:u("settings.defaultModelDesc"),children:e.jsx(te,{value:n,onChange:v,options:[{value:"haiku",label:u("thread.model.haiku")},{value:"sonnet",label:u("thread.model.sonnet")},{value:"opus",label:u("thread.model.opus")}]})}),e.jsx(ce,{title:u("settings.defaultPermissionMode"),description:u("settings.defaultPermissionModeDesc"),children:e.jsx(te,{value:x,onChange:b,options:[{value:"plan",label:u("prompt.plan")},{value:"autoEdit",label:u("prompt.autoEdit")},{value:"confirmEdit",label:u("prompt.askBeforeEdits")}]})})]}),e.jsx("h3",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1 pb-2 mt-6",children:u("settings.permissions")}),e.jsx("div",{className:"rounded-lg border border-border/50 overflow-hidden",children:e.jsxs("div",{className:"px-4 py-3.5",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:u("settings.toolPermissions")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-3",children:u("settings.toolPermissionsDesc")}),e.jsx("div",{className:"space-y-1",children:fs.map(f=>e.jsxs("div",{className:"flex items-center justify-between gap-3 px-2 py-1.5 rounded-md hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-sm text-foreground font-mono",children:f}),e.jsx("span",{className:"text-xs text-muted-foreground",children:u(js[f]??f)})]}),e.jsx(te,{value:i[f]??"allow",onChange:w=>y(f,w),options:[{value:"allow",label:u("settings.allow")},{value:"ask",label:u("settings.ask")},{value:"deny",label:u("settings.deny")}]})]},f))}),e.jsx("div",{className:"mt-3 flex justify-end",children:e.jsxs("button",{onClick:()=>k(),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[e.jsx(zs,{className:"h-3 w-3"}),u("settings.resetDefaults")]})})]})})]})}function ct(){const{t:s}=$(),n=U(y=>y.activeSettingsPage),x=U(y=>y.selectedProjectId),i=U(y=>y.projects),m=n,v=m?s(os[m]??m):null,b=i.find(y=>y.id===x);return m?e.jsxs("div",{className:"flex-1 flex flex-col h-full min-h-0",children:[e.jsx("div",{className:"px-4 py-2 border-b border-border",children:e.jsx(cs,{children:e.jsxs(ds,{children:[b&&e.jsx(ke,{children:e.jsx(ms,{className:"text-sm truncate cursor-default",children:b.name})}),b&&e.jsx(us,{}),e.jsx(ke,{children:e.jsx(xs,{className:"text-sm truncate",children:v})})]})})}),e.jsx(hs,{className:"flex-1 min-h-0",children:e.jsx("div",{className:"px-8 py-8 max-w-2xl",children:m==="general"?e.jsx(at,{}):m==="mcp-server"?e.jsx(_s,{}):m==="skills"?e.jsx(Us,{}):m==="worktrees"?e.jsx(Ws,{}):m==="startup-commands"?e.jsx(Gs,{}):m==="automations"?e.jsx(Js,{}):m==="archived-threads"?e.jsx(Qs,{}):m==="profile"?e.jsx(et,{}):m==="users"?e.jsx(Ys,{}):e.jsx("p",{className:"text-sm text-muted-foreground",children:s("settings.comingSoon",{label:v})})})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground text-sm",children:s("settings.selectSetting")})}export{ct as SettingsDetailView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r,j as e}from"./markdown-B7CXSXYD.js";import{u as m,c as u,T as h,B as c,a as f,L as p,C as x,b as j,E as g}from"./index-BRi6al6L.js";import{A as o}from"./arrow-right-3Bby9NNK.js";import"./syntax-qKqB8BhQ.js";import"./motion-DRu4QWVj.js";function N({current:s,total:t}){return e.jsx("div",{className:"flex items-center justify-center gap-2",children:Array.from({length:t},(n,a)=>e.jsx("div",{className:u("h-1.5 rounded-full transition-all duration-300",a===s?"w-6 bg-primary":a<s?"w-1.5 bg-primary/60":"w-1.5 bg-muted-foreground/25")},a))})}function C({onNext:s}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(h,{className:"h-8 w-8 text-primary"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Welcome to funny"}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Orchestrate multiple Claude Code agents in parallel. Each agent works on its own git branch, so they never conflict."})]}),e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-primary font-mono text-xs mt-0.5",children:"1."}),e.jsx("span",{children:"Create a project by pointing to any git repository"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-primary font-mono text-xs mt-0.5",children:"2."}),e.jsx("span",{children:"Spin up threads — each runs a Claude Code agent"})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-primary font-mono text-xs mt-0.5",children:"3."}),e.jsx("span",{children:"Review changes, commit, and merge when ready"})]})]}),e.jsxs(c,{className:"w-full",onClick:s,children:["Get Started",e.jsx(o,{className:"h-4 w-4 ml-1"})]})]})}function v({onNext:s}){const[t,n]=r.useState(null),[a,l]=r.useState(!0),i=r.useCallback(async()=>{l(!0);const d=await f.setupStatus();d.isOk()?n(d.value.claudeCli):n({available:!1,path:null,error:"Could not reach the server",version:null}),l(!1)},[]);return r.useEffect(()=>{i()},[i]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Claude Code CLI"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"funny needs the Claude Code CLI to run agents."})]}),e.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-4 space-y-3",children:a?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[e.jsx(p,{className:"h-5 w-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Checking..."})]}):t?.available?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"h-5 w-5 text-status-success"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Claude CLI found"})]}),t.version&&e.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:t.version}),t.path&&e.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.path})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{className:"h-5 w-5 text-status-error"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Claude CLI not found"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Install the Claude Code CLI to continue. Visit the official documentation for installation instructions."}),e.jsxs("a",{href:"https://docs.anthropic.com/en/docs/claude-code/overview",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline",children:["Installation Guide",e.jsx(g,{className:"h-3 w-3"})]})]})}),e.jsxs("div",{className:"flex gap-2",children:[!a&&!t?.available&&e.jsx(c,{variant:"outline",className:"flex-1",onClick:i,children:"Check Again"}),e.jsxs(c,{className:"flex-1",disabled:a||!t?.available,onClick:s,children:["Continue",e.jsx(o,{className:"h-4 w-4 ml-1"})]})]})]})}function y({onFinish:s}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx(x,{className:"h-10 w-10 text-status-success mx-auto"}),e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"You're all set!"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Everything is configured. Add your first project to get started."})]}),e.jsxs(c,{className:"w-full",onClick:s,children:["Enter funny",e.jsx(o,{className:"h-4 w-4 ml-1"})]})]})}function I(){const[s,t]=r.useState(0),n=m(l=>l.completeSetup),a=()=>{n()};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:e.jsxs("div",{className:"w-full max-w-md space-y-6 rounded-lg border border-border bg-card p-8 shadow-lg",children:[e.jsx(N,{current:s,total:3}),s===0&&e.jsx(C,{onNext:()=>t(1)}),s===1&&e.jsx(v,{onNext:()=>t(2)}),s===2&&e.jsx(y,{onFinish:a})]})})}export{I as SetupWizard};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xterm-Dv47L9lv.css","assets/event-DYHy0FJb.js","assets/core-BEOw45JP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as g}from"./syntax-qKqB8BhQ.js";import{d as i,j as t}from"./markdown-B7CXSXYD.js";import{$ as H,d as L,ao as A,l as S,c as N,H as R,J as D,B as I,W as V,K as O,T as F,a8 as W,q as B,ap as q,aq as J,a as U,ar as P}from"./index-BRi6al6L.js";import"./motion-DRu4QWVj.js";const $=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],Y=H("grip-horizontal",$),C=!!window.__TAURI_INTERNALS__;function G({id:n,cwd:u,active:l}){const s=i.useRef(null);return i.useEffect(()=>{if(!s.current||!C)return;let m=null;return(async()=>{const[{Terminal:p},{FitAddon:x},{WebLinksAddon:r}]=await Promise.all([g(()=>import("./xterm-B-qIQCd3.js"),[]),g(()=>import("./addon-fit-DX4qG4td.js"),[]),g(()=>import("./addon-web-links-DIbG5aQx.js"),[])]);if(await g(()=>Promise.resolve({}),__vite__mapDeps([0])),!s.current)return;const o=new p({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, Consolas, "Courier New", monospace',theme:{background:"#09090b",foreground:"#fafafa",cursor:"#fafafa",selectionBackground:"#264f78"},scrollback:5e3}),c=new x,k=new r;o.loadAddon(c),o.loadAddon(k),o.open(s.current),requestAnimationFrame(()=>c.fit());const{invoke:_}=await g(async()=>{const{invoke:e}=await import("./core-BEOw45JP.js");return{invoke:e}},[]),{listen:a}=await g(async()=>{const{listen:e}=await import("./event-DYHy0FJb.js");return{listen:e}},__vite__mapDeps([1,2])),y=await a(`pty:data:${n}`,e=>{o.write(e.payload.data)}),f=await a(`pty:exit:${n}`,()=>{o.write(`\r
|
|
3
|
+
\x1B[90m[Process exited]\x1B[0m\r
|
|
4
|
+
`),A.getState().markExited(n)}),v=o.onData(e=>{_("pty_write",{id:n,data:e}).catch(console.error)}),E=o.onResize(({rows:e,cols:h})=>{_("pty_resize",{id:n,rows:e,cols:h}).catch(console.error)}),T=c.proposeDimensions();await _("pty_spawn",{id:n,cwd:u,rows:T?.rows??24,cols:T?.cols??80});const j=new ResizeObserver(()=>c.fit());j.observe(s.current),m=()=>{j.disconnect(),y(),f(),v.dispose(),E.dispose(),o.dispose(),_("pty_kill",{id:n}).catch(console.error)}})(),()=>{m?.()}},[n,u]),t.jsx("div",{ref:s,className:N("w-full h-full",!l&&"hidden")})}function X({id:n,cwd:u,active:l}){const s=i.useRef(null),m=i.useRef(null),p=A(r=>r.registerPtyCallback),x=A(r=>r.unregisterPtyCallback);return i.useEffect(()=>{if(!s.current)return;let r=!1,o=null;return(async()=>{const[{Terminal:c},{FitAddon:k},{WebLinksAddon:_}]=await Promise.all([g(()=>import("./xterm-B-qIQCd3.js"),[]),g(()=>import("./addon-fit-DX4qG4td.js"),[]),g(()=>import("./addon-web-links-DIbG5aQx.js"),[])]);if(await g(()=>Promise.resolve({}),__vite__mapDeps([0])),r||!s.current)return;const a=new c({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, Consolas, "Courier New", monospace',theme:{background:"#09090b",foreground:"#fafafa",cursor:"#fafafa",selectionBackground:"#264f78"},scrollback:5e3}),y=new k,f=new _;a.loadAddon(y),a.loadAddon(f),a.open(s.current),m.current={terminal:a,fitAddon:y},requestAnimationFrame(()=>{y.fit(),a.focus()}),p(n,d=>{a.write(d)});const v=a.onData(d=>{const w=P();w&&w.readyState===WebSocket.OPEN&&w.send(JSON.stringify({type:"pty:write",data:{id:n,data:d}}))}),E=a.onResize(({rows:d,cols:w})=>{const b=P();b&&b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"pty:resize",data:{id:n,cols:w,rows:d}}))}),T=y.proposeDimensions(),j=P();j&&j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"pty:spawn",data:{id:n,cwd:u,rows:T?.rows??24,cols:T?.cols??80}}));let e=null;const h=new ResizeObserver(()=>{s.current?.offsetParent!==null&&(e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{e=null,y.fit()}))});h.observe(s.current),o=()=>{e&&cancelAnimationFrame(e),h.disconnect(),x(n),v.dispose(),E.dispose(),m.current=null,a.dispose();const d=P();d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"pty:kill",data:{id:n}}))}})(),()=>{r=!0,o?.()}},[n,u,p,x]),i.useEffect(()=>{if(l&&m.current){const{terminal:r,fitAddon:o}=m.current;requestAnimationFrame(()=>{o.fit(),r.refresh(0,r.rows-1),r.focus()})}},[l]),t.jsx("div",{ref:s,className:N("w-full h-full",!l&&"hidden")})}function K({commandId:n,projectId:u,active:l,alive:s}){const{t:m}=L(),p=A(k=>k.commandOutput[n]??""),x=i.useRef(null),r=i.useMemo(()=>new q({fg:"#fafafa",bg:"#09090b",newline:!0,escapeXML:!0}),[]),o=i.useMemo(()=>r.toHtml(p||"Waiting for output..."),[r,p]);i.useEffect(()=>{l&&x.current&&(x.current.scrollTop=x.current.scrollHeight)},[p,l]);const c=async()=>{u&&await U.stopCommand(u,n)};return t.jsxs("div",{className:N("w-full h-full flex flex-col",!l&&"hidden"),children:[s&&t.jsx("div",{className:"flex items-center justify-end px-2 py-0.5 flex-shrink-0",children:t.jsxs(R,{children:[t.jsx(D,{asChild:!0,children:t.jsx(I,{variant:"ghost",size:"icon-xs",onClick:c,className:"text-status-error hover:text-status-error/80",children:t.jsx(J,{className:"h-3 w-3"})})}),t.jsx(O,{children:m("terminal.stop")})]})}),t.jsx("div",{ref:x,className:"flex-1 overflow-auto px-3 py-1",children:t.jsx("pre",{className:"text-xs font-mono text-[#fafafa] whitespace-pre-wrap break-words leading-relaxed",dangerouslySetInnerHTML:{__html:o}})})]})}const Q=300;function se(){const{t:n}=L(),{tabs:u,activeTabId:l,panelVisible:s,addTab:m,removeTab:p,setActiveTab:x,togglePanel:r}=A(),o=S(e=>e.projects),c=S(e=>e.selectedProjectId),[k,_]=i.useState(!1),[a,y]=i.useState(Q),f=i.useMemo(()=>u.filter(e=>e.projectId===c),[u,c]),v=i.useMemo(()=>l&&f.some(e=>e.id===l)?l:f[f.length-1]?.id??null,[l,f]),E=i.useCallback(e=>{e.preventDefault(),_(!0);const h=e.clientY,d=a,w=z=>{const M=h-z.clientY;y(Math.max(150,Math.min(d+M,600)))},b=()=>{_(!1),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",b)},[a]),T=i.useCallback(()=>{if(!c)return;const h=o.find(b=>b.id===c)?.path??"C:\\",d=crypto.randomUUID(),w=`Terminal ${f.length+1}`;m({id:d,label:w,cwd:h,alive:!0,projectId:c,type:C?void 0:"pty"})},[o,c,f.length,m]),j=i.useCallback(e=>{p(e)},[p]);return!s&&!C?null:t.jsxs("div",{className:"flex flex-col border-t border-border bg-background flex-shrink-0 overflow-hidden",style:{height:s?a:0},children:[t.jsx("div",{className:N("flex items-center justify-center h-2 cursor-row-resize hover:bg-primary/20 transition-colors flex-shrink-0 group",k&&"bg-primary/30"),onMouseDown:E,children:t.jsx(Y,{className:"h-3 w-3 text-muted-foreground/40 group-hover:text-muted-foreground/70 transition-colors"})}),t.jsxs("div",{className:"flex items-center gap-0.5 px-2 h-8 bg-secondary/50 border-b border-border flex-shrink-0",children:[t.jsxs(R,{children:[t.jsx(D,{asChild:!0,children:t.jsx(I,{variant:"ghost",size:"icon-xs",onClick:r,children:t.jsx(V,{className:"h-3.5 w-3.5"})})}),t.jsx(O,{children:n("terminal.hideTerminal")})]}),t.jsx(F,{className:"h-3.5 w-3.5 text-muted-foreground ml-1"}),t.jsx("span",{className:"text-xs text-muted-foreground font-medium ml-1",children:n("terminal.title")}),t.jsx("div",{className:"flex-1 flex items-center gap-0.5 ml-2 overflow-x-auto",children:f.map(e=>t.jsxs("button",{onClick:()=>{x(e.id),s||r()},className:N("flex items-center gap-1 px-2 py-0.5 rounded text-xs transition-colors whitespace-nowrap",v===e.id?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50"),children:[t.jsx("span",{children:e.label}),!e.alive&&t.jsx("span",{className:"text-xs text-status-pending",children:n("terminal.exited")}),t.jsx(W,{className:"h-3 w-3 ml-1 opacity-60 hover:opacity-100",onClick:h=>{h.stopPropagation(),j(e.id)}})]},e.id))}),t.jsxs(R,{children:[t.jsx(D,{asChild:!0,children:t.jsx(I,{variant:"ghost",size:"icon-xs",onClick:T,children:t.jsx(B,{className:"h-3.5 w-3.5"})})}),t.jsx(O,{children:n("terminal.newTerminal")})]})]}),t.jsx("div",{className:"flex-1 bg-[#09090b] overflow-hidden min-h-0",children:f.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-xs",children:n("terminal.noProcesses")}):u.map(e=>e.commandId?t.jsx(K,{commandId:e.commandId,projectId:e.projectId,active:e.id===v,alive:e.alive},e.id):e.type==="pty"?t.jsx(X,{id:e.id,cwd:e.cwd,active:e.id===v},e.id):C?t.jsx(G,{id:e.id,cwd:e.cwd,active:e.id===v},e.id):null)})]})}export{se as TerminalPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as f,j as s}from"./markdown-B7CXSXYD.js";import{d as S,i as X,Q as Y,S as Z,I as _,L as $,z as M,c as w,N as q,B as R,R as z,aV as T}from"./index-BRi6al6L.js";function A(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function ee({text:t,query:u,className:p}){const h=f.useMemo(()=>{if(!u.trim())return[{text:t,highlight:!1}];const l=A(u),a=[],g=A(t);let o=0,r=g.indexOf(l,o);for(;r!==-1;)r>o&&a.push({text:t.slice(o,r),highlight:!1}),a.push({text:t.slice(r,r+l.length),highlight:!0}),o=r+l.length,r=g.indexOf(l,o);return o<t.length&&a.push({text:t.slice(o),highlight:!1}),a},[t,u]);return u.trim()?s.jsx("span",{className:p,children:h.map((l,a)=>l.highlight?s.jsx("mark",{style:{backgroundColor:"#FFE500",color:"black"},className:"rounded-sm px-px font-semibold",children:l.text},a):s.jsx("span",{children:l.text},a))}):s.jsx("span",{className:p,children:t})}function ne({threads:t,totalCount:u,loading:p,search:h,onSearchChange:l,searchPlaceholder:a,page:g,onPageChange:o,pageSize:r,pageSizeOptions:y,onPageSizeChange:k,emptyMessage:L,searchEmptyMessage:V,onThreadClick:c,renderExtraBadges:E,renderActions:F,paginationLabel:K,className:H,autoFocusSearch:B,hideSearch:U=!1}){const{t:b}=S();X();const O=Y(b),[i,x]=f.useState(-1),m=f.useRef([]),D=f.useRef(null);f.useEffect(()=>{x(-1)},[h,t]);const j=f.useRef(!1),Q=f.useCallback(e=>{if(!(!c||t.length===0))if(e.key==="ArrowDown"){e.preventDefault(),j.current=!0;const n=i<t.length-1?i+1:0;x(n),m.current[n]?.scrollIntoView({block:"nearest"})}else if(e.key==="ArrowUp"){e.preventDefault(),j.current=!0;const n=i>0?i-1:t.length-1;x(n),m.current[n]?.scrollIntoView({block:"nearest"})}else e.key==="Enter"&&i>=0&&i<t.length&&(e.preventDefault(),c(t[i]))},[t,c,i]),W=f.useCallback((e,n)=>{c&&(j.current=!0,e.key==="ArrowDown"?(e.preventDefault(),n<t.length-1&&(x(n+1),m.current[n+1]?.focus(),m.current[n+1]?.scrollIntoView({block:"nearest"}))):e.key==="ArrowUp"?(e.preventDefault(),n>0?(x(n-1),m.current[n-1]?.focus(),m.current[n-1]?.scrollIntoView({block:"nearest"})):(x(-1),D.current?.focus())):e.key==="Enter"&&(e.preventDefault(),c(t[n])))},[t,c]),v=Math.max(1,Math.ceil(u/r)),d=Math.min(g,v),C=(d-1)*r+1,G=Math.min(d*r,u);return s.jsxs("div",{className:w("flex flex-col gap-4",H),children:[!U&&s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Z,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),s.jsx(_,{ref:D,type:"text",placeholder:a,value:h,onChange:e=>l(e.target.value),onKeyDown:Q,autoFocus:B,className:"w-full h-auto pl-8 pr-3 py-1.5 text-xs"})]}),y&&k&&s.jsx("select",{value:r,onChange:e=>k(Number(e.target.value)),className:"rounded-md border border-input bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring cursor-pointer",children:y.map(e=>s.jsxs("option",{value:e,children:[e," / ",b("archived.page",{defaultValue:"page"})]},e))})]}),p?s.jsxs("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-xs flex-shrink-0",children:[s.jsx($,{className:"h-4 w-4 animate-spin mr-2"}),b("common.loading")]}):t.length===0?s.jsx("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-xs flex-shrink-0",children:h?V:L}):s.jsx("div",{className:"rounded-lg border border-border/50 overflow-y-auto min-h-0 flex-1",children:t.map((e,n)=>{const I=M[e.status]??M.pending,J=I.icon,P=c?"button":"div";return s.jsxs(P,{ref:N=>{m.current[n]=N},...c?{onClick:()=>c(e)}:{},onKeyDown:N=>W(N,n),onFocus:()=>x(n),onMouseMove:()=>{j.current=!1,x(n)},className:w("w-full flex items-center gap-3 px-3 py-2.5 border-b border-border/50 last:border-b-0 group outline-none",c&&"text-left hover:bg-accent/50 transition-colors",n===i&&"bg-accent/50"),children:[s.jsx(J,{className:w("h-4 w-4 flex-shrink-0",I.className)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(ee,{text:e.title,query:h,className:"text-xs font-medium truncate block"}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[E?.(e),e.branch&&s.jsx("span",{className:"text-xs text-muted-foreground bg-secondary px-1.5 py-0.5 rounded truncate max-w-[150px]",children:e.branch}),s.jsx("span",{className:"text-xs text-muted-foreground",children:O[e.status]})]})]}),s.jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0 hidden sm:inline",children:q(e.completedAt??e.createdAt,b)}),F?.(e)]},e.id)})}),v>1&&s.jsxs("div",{className:"flex items-center justify-between flex-shrink-0",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:K({from:C,to:G,total:u})}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(R,{variant:"outline",size:"icon-xs",disabled:d<=1,onClick:()=>o(d-1),children:s.jsx(z,{className:"h-3.5 w-3.5"})}),s.jsxs("span",{className:"text-sm text-muted-foreground px-2",children:[d," / ",v]}),s.jsx(R,{variant:"outline",size:"icon-xs",disabled:d>=v,onClick:()=>o(d+1),children:s.jsx(T,{className:"h-3.5 w-3.5"})})]})]})]})}export{ee as H,ne as T,A as n};
|
|
@@ -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};
|