code-squad-cli 1.2.7 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flip/constants/filters.d.ts +2 -0
- package/dist/flip/constants/filters.js +30 -0
- package/dist/flip/events/SSEManager.d.ts +10 -0
- package/dist/flip/events/SSEManager.js +28 -0
- package/dist/flip/events/types.d.ts +11 -0
- package/dist/flip/events/types.js +1 -0
- package/dist/flip/index.js +2 -2
- package/dist/flip/output/autopaste.js +15 -3
- package/dist/flip/output/clipboard.js +56 -2
- package/dist/flip/routes/events.d.ts +3 -0
- package/dist/flip/routes/events.js +25 -0
- package/dist/flip/routes/files.d.ts +6 -1
- package/dist/flip/routes/files.js +21 -33
- package/dist/flip/routes/static.js +8 -2
- package/dist/flip/routes/submit.js +14 -7
- package/dist/flip/server/Server.d.ts +1 -1
- package/dist/flip/server/Server.js +24 -2
- package/dist/flip/watcher/FileWatcher.d.ts +29 -0
- package/dist/flip/watcher/FileWatcher.js +128 -0
- package/dist/flip-ui/dist/assets/index-B2PjDe6F.js +217 -0
- package/dist/flip-ui/dist/assets/index-DYY1gRRa.css +1 -0
- package/dist/flip-ui/dist/index.html +2 -2
- package/dist/index.js +345 -80
- package/package.json +3 -2
- package/dist/flip-ui/dist/assets/abap-BdImnpbu.js +0 -1
- package/dist/flip-ui/dist/assets/actionscript-3-CfeIJUat.js +0 -1
- package/dist/flip-ui/dist/assets/ada-bCR0ucgS.js +0 -1
- package/dist/flip-ui/dist/assets/andromeeda-C-Jbm3Hp.js +0 -1
- package/dist/flip-ui/dist/assets/angular-html-CU67Zn6k.js +0 -1
- package/dist/flip-ui/dist/assets/angular-ts-BwZT4LLn.js +0 -1
- package/dist/flip-ui/dist/assets/apache-Pmp26Uib.js +0 -1
- package/dist/flip-ui/dist/assets/apex-D8_7TLub.js +0 -1
- package/dist/flip-ui/dist/assets/apl-dKokRX4l.js +0 -1
- package/dist/flip-ui/dist/assets/applescript-Co6uUVPk.js +0 -1
- package/dist/flip-ui/dist/assets/ara-BRHolxvo.js +0 -1
- package/dist/flip-ui/dist/assets/asciidoc-Dv7Oe6Be.js +0 -1
- package/dist/flip-ui/dist/assets/asm-D_Q5rh1f.js +0 -1
- package/dist/flip-ui/dist/assets/astro-CbQHKStN.js +0 -1
- package/dist/flip-ui/dist/assets/aurora-x-D-2ljcwZ.js +0 -1
- package/dist/flip-ui/dist/assets/awk-DMzUqQB5.js +0 -1
- package/dist/flip-ui/dist/assets/ayu-dark-CmMr59Fi.js +0 -1
- package/dist/flip-ui/dist/assets/ballerina-BFfxhgS-.js +0 -1
- package/dist/flip-ui/dist/assets/bat-BkioyH1T.js +0 -1
- package/dist/flip-ui/dist/assets/beancount-k_qm7-4y.js +0 -1
- package/dist/flip-ui/dist/assets/berry-uYugtg8r.js +0 -1
- package/dist/flip-ui/dist/assets/bibtex-CHM0blh-.js +0 -1
- package/dist/flip-ui/dist/assets/bicep-Bmn6On1c.js +0 -1
- package/dist/flip-ui/dist/assets/blade-D4QpJJKB.js +0 -1
- package/dist/flip-ui/dist/assets/bsl-BO_Y6i37.js +0 -1
- package/dist/flip-ui/dist/assets/c-BIGW1oBm.js +0 -1
- package/dist/flip-ui/dist/assets/c3-VCDPK7BO.js +0 -1
- package/dist/flip-ui/dist/assets/cadence-Bv_4Rxtq.js +0 -1
- package/dist/flip-ui/dist/assets/cairo-KRGpt6FW.js +0 -1
- package/dist/flip-ui/dist/assets/catppuccin-frappe-DFWUc33u.js +0 -1
- package/dist/flip-ui/dist/assets/catppuccin-latte-C9dUb6Cb.js +0 -1
- package/dist/flip-ui/dist/assets/catppuccin-macchiato-DQyhUUbL.js +0 -1
- package/dist/flip-ui/dist/assets/catppuccin-mocha-D87Tk5Gz.js +0 -1
- package/dist/flip-ui/dist/assets/clarity-D53aC0YG.js +0 -1
- package/dist/flip-ui/dist/assets/clojure-P80f7IUj.js +0 -1
- package/dist/flip-ui/dist/assets/cmake-D1j8_8rp.js +0 -1
- package/dist/flip-ui/dist/assets/cobol-nwyudZeR.js +0 -1
- package/dist/flip-ui/dist/assets/codeowners-Bp6g37R7.js +0 -1
- package/dist/flip-ui/dist/assets/codeql-DsOJ9woJ.js +0 -1
- package/dist/flip-ui/dist/assets/coffee-Ch7k5sss.js +0 -1
- package/dist/flip-ui/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
- package/dist/flip-ui/dist/assets/coq-DkFqJrB1.js +0 -1
- package/dist/flip-ui/dist/assets/cpp-CofmeUqb.js +0 -1
- package/dist/flip-ui/dist/assets/crystal-tKQVLTB8.js +0 -1
- package/dist/flip-ui/dist/assets/csharp-K5feNrxe.js +0 -1
- package/dist/flip-ui/dist/assets/css-DPfMkruS.js +0 -1
- package/dist/flip-ui/dist/assets/csv-fuZLfV_i.js +0 -1
- package/dist/flip-ui/dist/assets/cue-D82EKSYY.js +0 -1
- package/dist/flip-ui/dist/assets/cypher-COkxafJQ.js +0 -1
- package/dist/flip-ui/dist/assets/d-85-TOEBH.js +0 -1
- package/dist/flip-ui/dist/assets/dark-plus-C3mMm8J8.js +0 -1
- package/dist/flip-ui/dist/assets/dart-CF10PKvl.js +0 -1
- package/dist/flip-ui/dist/assets/dax-CEL-wOlO.js +0 -1
- package/dist/flip-ui/dist/assets/desktop-BmXAJ9_W.js +0 -1
- package/dist/flip-ui/dist/assets/diff-D97Zzqfu.js +0 -1
- package/dist/flip-ui/dist/assets/docker-BcOcwvcX.js +0 -1
- package/dist/flip-ui/dist/assets/dotenv-Da5cRb03.js +0 -1
- package/dist/flip-ui/dist/assets/dracula-BzJJZx-M.js +0 -1
- package/dist/flip-ui/dist/assets/dracula-soft-BXkSAIEj.js +0 -1
- package/dist/flip-ui/dist/assets/dream-maker-BtqSS_iP.js +0 -1
- package/dist/flip-ui/dist/assets/edge-BkV0erSs.js +0 -1
- package/dist/flip-ui/dist/assets/elixir-CDX3lj18.js +0 -1
- package/dist/flip-ui/dist/assets/elm-DbKCFpqz.js +0 -1
- package/dist/flip-ui/dist/assets/emacs-lisp-C9XAeP06.js +0 -1
- package/dist/flip-ui/dist/assets/erb-BOJIQeun.js +0 -1
- package/dist/flip-ui/dist/assets/erlang-DsQrWhSR.js +0 -1
- package/dist/flip-ui/dist/assets/everforest-dark-BgDCqdQA.js +0 -1
- package/dist/flip-ui/dist/assets/everforest-light-C8M2exoo.js +0 -1
- package/dist/flip-ui/dist/assets/fennel-BYunw83y.js +0 -1
- package/dist/flip-ui/dist/assets/fish-BvzEVeQv.js +0 -1
- package/dist/flip-ui/dist/assets/fluent-C4IJs8-o.js +0 -1
- package/dist/flip-ui/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
- package/dist/flip-ui/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
- package/dist/flip-ui/dist/assets/fsharp-CXgrBDvD.js +0 -1
- package/dist/flip-ui/dist/assets/gdresource-B7Tvp0Sc.js +0 -1
- package/dist/flip-ui/dist/assets/gdscript-DTMYz4Jt.js +0 -1
- package/dist/flip-ui/dist/assets/gdshader-DkwncUOv.js +0 -1
- package/dist/flip-ui/dist/assets/genie-D0YGMca9.js +0 -1
- package/dist/flip-ui/dist/assets/gherkin-DyxjwDmM.js +0 -1
- package/dist/flip-ui/dist/assets/git-commit-F4YmCXRG.js +0 -1
- package/dist/flip-ui/dist/assets/git-rebase-r7XF79zn.js +0 -1
- package/dist/flip-ui/dist/assets/github-dark-DHJKELXO.js +0 -1
- package/dist/flip-ui/dist/assets/github-dark-default-Cuk6v7N8.js +0 -1
- package/dist/flip-ui/dist/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
- package/dist/flip-ui/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
- package/dist/flip-ui/dist/assets/github-light-DAi9KRSo.js +0 -1
- package/dist/flip-ui/dist/assets/github-light-default-D7oLnXFd.js +0 -1
- package/dist/flip-ui/dist/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
- package/dist/flip-ui/dist/assets/gleam-BspZqrRM.js +0 -1
- package/dist/flip-ui/dist/assets/glimmer-js-Rg0-pVw9.js +0 -1
- package/dist/flip-ui/dist/assets/glimmer-ts-U6CK756n.js +0 -1
- package/dist/flip-ui/dist/assets/glsl-DplSGwfg.js +0 -1
- package/dist/flip-ui/dist/assets/gn-n2N0HUVH.js +0 -1
- package/dist/flip-ui/dist/assets/gnuplot-DdkO51Og.js +0 -1
- package/dist/flip-ui/dist/assets/go-Dn2_MT6a.js +0 -1
- package/dist/flip-ui/dist/assets/graphql-ChdNCCLP.js +0 -1
- package/dist/flip-ui/dist/assets/groovy-gcz8RCvz.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
- package/dist/flip-ui/dist/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
- package/dist/flip-ui/dist/assets/hack-CaT9iCJl.js +0 -1
- package/dist/flip-ui/dist/assets/haml-B8DHNrY2.js +0 -1
- package/dist/flip-ui/dist/assets/handlebars-BL8al0AC.js +0 -1
- package/dist/flip-ui/dist/assets/haskell-Df6bDoY_.js +0 -1
- package/dist/flip-ui/dist/assets/haxe-CzTSHFRz.js +0 -1
- package/dist/flip-ui/dist/assets/hcl-BWvSN4gD.js +0 -1
- package/dist/flip-ui/dist/assets/hjson-D5-asLiD.js +0 -1
- package/dist/flip-ui/dist/assets/hlsl-D3lLCCz7.js +0 -1
- package/dist/flip-ui/dist/assets/houston-DnULxvSX.js +0 -1
- package/dist/flip-ui/dist/assets/html-GMplVEZG.js +0 -1
- package/dist/flip-ui/dist/assets/html-derivative-BFtXZ54Q.js +0 -1
- package/dist/flip-ui/dist/assets/http-jrhK8wxY.js +0 -1
- package/dist/flip-ui/dist/assets/hurl-irOxFIW8.js +0 -1
- package/dist/flip-ui/dist/assets/hxml-Bvhsp5Yf.js +0 -1
- package/dist/flip-ui/dist/assets/hy-DFXneXwc.js +0 -1
- package/dist/flip-ui/dist/assets/imba-DGztddWO.js +0 -1
- package/dist/flip-ui/dist/assets/index-BYcwO1DZ.js +0 -154
- package/dist/flip-ui/dist/assets/index-iFjjtGMT.css +0 -1
- package/dist/flip-ui/dist/assets/ini-BEwlwnbL.js +0 -1
- package/dist/flip-ui/dist/assets/java-CylS5w8V.js +0 -1
- package/dist/flip-ui/dist/assets/javascript-wDzz0qaB.js +0 -1
- package/dist/flip-ui/dist/assets/jinja-4LBKfQ-Z.js +0 -1
- package/dist/flip-ui/dist/assets/jison-wvAkD_A8.js +0 -1
- package/dist/flip-ui/dist/assets/json-Cp-IABpG.js +0 -1
- package/dist/flip-ui/dist/assets/json5-C9tS-k6U.js +0 -1
- package/dist/flip-ui/dist/assets/jsonc-Des-eS-w.js +0 -1
- package/dist/flip-ui/dist/assets/jsonl-DcaNXYhu.js +0 -1
- package/dist/flip-ui/dist/assets/jsonnet-DFQXde-d.js +0 -1
- package/dist/flip-ui/dist/assets/jssm-C2t-YnRu.js +0 -1
- package/dist/flip-ui/dist/assets/jsx-g9-lgVsj.js +0 -1
- package/dist/flip-ui/dist/assets/julia-CxzCAyBv.js +0 -1
- package/dist/flip-ui/dist/assets/kanagawa-dragon-CkXjmgJE.js +0 -1
- package/dist/flip-ui/dist/assets/kanagawa-lotus-CfQXZHmo.js +0 -1
- package/dist/flip-ui/dist/assets/kanagawa-wave-DWedfzmr.js +0 -1
- package/dist/flip-ui/dist/assets/kdl-DV7GczEv.js +0 -1
- package/dist/flip-ui/dist/assets/kotlin-BdnUsdx6.js +0 -1
- package/dist/flip-ui/dist/assets/kusto-DZf3V79B.js +0 -1
- package/dist/flip-ui/dist/assets/laserwave-DUszq2jm.js +0 -1
- package/dist/flip-ui/dist/assets/latex-B4uzh10-.js +0 -1
- package/dist/flip-ui/dist/assets/lean-BZvkOJ9d.js +0 -1
- package/dist/flip-ui/dist/assets/less-B1dDrJ26.js +0 -1
- package/dist/flip-ui/dist/assets/light-plus-B7mTdjB0.js +0 -1
- package/dist/flip-ui/dist/assets/liquid-DYVedYrR.js +0 -1
- package/dist/flip-ui/dist/assets/llvm-BtvRca6l.js +0 -1
- package/dist/flip-ui/dist/assets/log-2UxHyX5q.js +0 -1
- package/dist/flip-ui/dist/assets/logo-BtOb2qkB.js +0 -1
- package/dist/flip-ui/dist/assets/lua-BbnMAYS6.js +0 -1
- package/dist/flip-ui/dist/assets/luau-C-HG3fhB.js +0 -1
- package/dist/flip-ui/dist/assets/make-CHLpvVh8.js +0 -1
- package/dist/flip-ui/dist/assets/markdown-Cvjx9yec.js +0 -1
- package/dist/flip-ui/dist/assets/marko-DZsq8hO1.js +0 -1
- package/dist/flip-ui/dist/assets/material-theme-D5KoaKCx.js +0 -1
- package/dist/flip-ui/dist/assets/material-theme-darker-BfHTSMKl.js +0 -1
- package/dist/flip-ui/dist/assets/material-theme-lighter-B0m2ddpp.js +0 -1
- package/dist/flip-ui/dist/assets/material-theme-ocean-CyktbL80.js +0 -1
- package/dist/flip-ui/dist/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
- package/dist/flip-ui/dist/assets/matlab-D7o27uSR.js +0 -1
- package/dist/flip-ui/dist/assets/mdc-DUICxH0z.js +0 -1
- package/dist/flip-ui/dist/assets/mdx-Cmh6b_Ma.js +0 -1
- package/dist/flip-ui/dist/assets/mermaid-mWjccvbQ.js +0 -1
- package/dist/flip-ui/dist/assets/min-dark-CafNBF8u.js +0 -1
- package/dist/flip-ui/dist/assets/min-light-CTRr51gU.js +0 -1
- package/dist/flip-ui/dist/assets/mipsasm-CKIfxQSi.js +0 -1
- package/dist/flip-ui/dist/assets/mojo-B93PlW-d.js +0 -1
- package/dist/flip-ui/dist/assets/monokai-D4h5O-jR.js +0 -1
- package/dist/flip-ui/dist/assets/moonbit-Ba13S78F.js +0 -1
- package/dist/flip-ui/dist/assets/move-Bu9oaDYs.js +0 -1
- package/dist/flip-ui/dist/assets/narrat-DRg8JJMk.js +0 -1
- package/dist/flip-ui/dist/assets/nextflow-BrzmwbiE.js +0 -1
- package/dist/flip-ui/dist/assets/nginx-DknmC5AR.js +0 -1
- package/dist/flip-ui/dist/assets/night-owl-C39BiMTA.js +0 -1
- package/dist/flip-ui/dist/assets/nim-CVrawwO9.js +0 -1
- package/dist/flip-ui/dist/assets/nix-CwoSXNpI.js +0 -1
- package/dist/flip-ui/dist/assets/nord-Ddv68eIx.js +0 -1
- package/dist/flip-ui/dist/assets/nushell-C-sUppwS.js +0 -1
- package/dist/flip-ui/dist/assets/objective-c-DXmwc3jG.js +0 -1
- package/dist/flip-ui/dist/assets/objective-cpp-CLxacb5B.js +0 -1
- package/dist/flip-ui/dist/assets/ocaml-C0hk2d4L.js +0 -1
- package/dist/flip-ui/dist/assets/one-dark-pro-DVMEJ2y_.js +0 -1
- package/dist/flip-ui/dist/assets/one-light-PoHY5YXO.js +0 -1
- package/dist/flip-ui/dist/assets/openscad-C4EeE6gA.js +0 -1
- package/dist/flip-ui/dist/assets/pascal-D93ZcfNL.js +0 -1
- package/dist/flip-ui/dist/assets/perl-C0TMdlhV.js +0 -1
- package/dist/flip-ui/dist/assets/php-CDn_0X-4.js +0 -1
- package/dist/flip-ui/dist/assets/pkl-u5AG7uiY.js +0 -1
- package/dist/flip-ui/dist/assets/plastic-3e1v2bzS.js +0 -1
- package/dist/flip-ui/dist/assets/plsql-ChMvpjG-.js +0 -1
- package/dist/flip-ui/dist/assets/po-BTJTHyun.js +0 -1
- package/dist/flip-ui/dist/assets/poimandres-CS3Unz2-.js +0 -1
- package/dist/flip-ui/dist/assets/polar-C0HS_06l.js +0 -1
- package/dist/flip-ui/dist/assets/postcss-CXtECtnM.js +0 -1
- package/dist/flip-ui/dist/assets/powerquery-CEu0bR-o.js +0 -1
- package/dist/flip-ui/dist/assets/powershell-Dpen1YoG.js +0 -1
- package/dist/flip-ui/dist/assets/prisma-Dd19v3D-.js +0 -1
- package/dist/flip-ui/dist/assets/prolog-CbFg5uaA.js +0 -1
- package/dist/flip-ui/dist/assets/proto-C7zT0LnQ.js +0 -1
- package/dist/flip-ui/dist/assets/pug-CGlum2m_.js +0 -1
- package/dist/flip-ui/dist/assets/puppet-BMWR74SV.js +0 -1
- package/dist/flip-ui/dist/assets/purescript-CklMAg4u.js +0 -1
- package/dist/flip-ui/dist/assets/python-B6aJPvgy.js +0 -1
- package/dist/flip-ui/dist/assets/qml-3beO22l8.js +0 -1
- package/dist/flip-ui/dist/assets/qmldir-C8lEn-DE.js +0 -1
- package/dist/flip-ui/dist/assets/qss-IeuSbFQv.js +0 -1
- package/dist/flip-ui/dist/assets/r-Dspwwk_N.js +0 -1
- package/dist/flip-ui/dist/assets/racket-BqYA7rlc.js +0 -1
- package/dist/flip-ui/dist/assets/raku-DXvB9xmW.js +0 -1
- package/dist/flip-ui/dist/assets/razor-C1TweQQi.js +0 -1
- package/dist/flip-ui/dist/assets/red-bN70gL4F.js +0 -1
- package/dist/flip-ui/dist/assets/reg-C-SQnVFl.js +0 -1
- package/dist/flip-ui/dist/assets/regexp-CDVJQ6XC.js +0 -1
- package/dist/flip-ui/dist/assets/rel-C3B-1QV4.js +0 -1
- package/dist/flip-ui/dist/assets/riscv-BM1_JUlF.js +0 -1
- package/dist/flip-ui/dist/assets/rose-pine-dawn-DHQR4-dF.js +0 -1
- package/dist/flip-ui/dist/assets/rose-pine-moon-D4_iv3hh.js +0 -1
- package/dist/flip-ui/dist/assets/rose-pine-qdsjHGoJ.js +0 -1
- package/dist/flip-ui/dist/assets/rosmsg-BJDFO7_C.js +0 -1
- package/dist/flip-ui/dist/assets/rst-B0xPkSld.js +0 -1
- package/dist/flip-ui/dist/assets/ruby-BvKwtOVI.js +0 -1
- package/dist/flip-ui/dist/assets/rust-B1yitclQ.js +0 -1
- package/dist/flip-ui/dist/assets/sas-cz2c8ADy.js +0 -1
- package/dist/flip-ui/dist/assets/sass-Cj5Yp3dK.js +0 -1
- package/dist/flip-ui/dist/assets/scala-C151Ov-r.js +0 -1
- package/dist/flip-ui/dist/assets/scheme-C98Dy4si.js +0 -1
- package/dist/flip-ui/dist/assets/scss-OYdSNvt2.js +0 -1
- package/dist/flip-ui/dist/assets/sdbl-DVxCFoDh.js +0 -1
- package/dist/flip-ui/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
- package/dist/flip-ui/dist/assets/shellscript-Yzrsuije.js +0 -1
- package/dist/flip-ui/dist/assets/shellsession-BADoaaVG.js +0 -1
- package/dist/flip-ui/dist/assets/slack-dark-BthQWCQV.js +0 -1
- package/dist/flip-ui/dist/assets/slack-ochin-DqwNpetd.js +0 -1
- package/dist/flip-ui/dist/assets/smalltalk-BERRCDM3.js +0 -1
- package/dist/flip-ui/dist/assets/snazzy-light-Bw305WKR.js +0 -1
- package/dist/flip-ui/dist/assets/solarized-dark-DXbdFlpD.js +0 -1
- package/dist/flip-ui/dist/assets/solarized-light-L9t79GZl.js +0 -1
- package/dist/flip-ui/dist/assets/solidity-rGO070M0.js +0 -1
- package/dist/flip-ui/dist/assets/soy-Brmx7dQM.js +0 -1
- package/dist/flip-ui/dist/assets/sparql-rVzFXLq3.js +0 -1
- package/dist/flip-ui/dist/assets/splunk-BtCnVYZw.js +0 -1
- package/dist/flip-ui/dist/assets/sql-BLtJtn59.js +0 -1
- package/dist/flip-ui/dist/assets/ssh-config-_ykCGR6B.js +0 -1
- package/dist/flip-ui/dist/assets/stata-BH5u7GGu.js +0 -1
- package/dist/flip-ui/dist/assets/stylus-BEDo0Tqx.js +0 -1
- package/dist/flip-ui/dist/assets/svelte-zxCyuUbr.js +0 -1
- package/dist/flip-ui/dist/assets/swift-Dg5xB15N.js +0 -1
- package/dist/flip-ui/dist/assets/synthwave-84-CbfX1IO0.js +0 -1
- package/dist/flip-ui/dist/assets/system-verilog-CnnmHF94.js +0 -1
- package/dist/flip-ui/dist/assets/systemd-4A_iFExJ.js +0 -1
- package/dist/flip-ui/dist/assets/talonscript-CkByrt1z.js +0 -1
- package/dist/flip-ui/dist/assets/tasl-QIJgUcNo.js +0 -1
- package/dist/flip-ui/dist/assets/tcl-dwOrl1Do.js +0 -1
- package/dist/flip-ui/dist/assets/templ-W15q3VgB.js +0 -1
- package/dist/flip-ui/dist/assets/terraform-BETggiCN.js +0 -1
- package/dist/flip-ui/dist/assets/tex-CvyZ59Mk.js +0 -1
- package/dist/flip-ui/dist/assets/tokyo-night-hegEt444.js +0 -1
- package/dist/flip-ui/dist/assets/toml-vGWfd6FD.js +0 -1
- package/dist/flip-ui/dist/assets/ts-tags-zn1MmPIZ.js +0 -1
- package/dist/flip-ui/dist/assets/tsv-B_m7g4N7.js +0 -1
- package/dist/flip-ui/dist/assets/tsx-COt5Ahok.js +0 -1
- package/dist/flip-ui/dist/assets/turtle-BsS91CYL.js +0 -1
- package/dist/flip-ui/dist/assets/twig-CO9l9SDP.js +0 -1
- package/dist/flip-ui/dist/assets/typescript-BPQ3VLAy.js +0 -1
- package/dist/flip-ui/dist/assets/typespec-BGHnOYBU.js +0 -1
- package/dist/flip-ui/dist/assets/typst-DHCkPAjA.js +0 -1
- package/dist/flip-ui/dist/assets/v-BcVCzyr7.js +0 -1
- package/dist/flip-ui/dist/assets/vala-CsfeWuGM.js +0 -1
- package/dist/flip-ui/dist/assets/vb-D17OF-Vu.js +0 -1
- package/dist/flip-ui/dist/assets/verilog-BQ8w6xss.js +0 -1
- package/dist/flip-ui/dist/assets/vesper-DU1UobuO.js +0 -1
- package/dist/flip-ui/dist/assets/vhdl-CeAyd5Ju.js +0 -1
- package/dist/flip-ui/dist/assets/viml-CJc9bBzg.js +0 -1
- package/dist/flip-ui/dist/assets/vitesse-black-Bkuqu6BP.js +0 -1
- package/dist/flip-ui/dist/assets/vitesse-dark-D0r3Knsf.js +0 -1
- package/dist/flip-ui/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
- package/dist/flip-ui/dist/assets/vue-DN_0RTcg.js +0 -1
- package/dist/flip-ui/dist/assets/vue-html-AaS7Mt5G.js +0 -1
- package/dist/flip-ui/dist/assets/vue-vine-CQOfvN7w.js +0 -1
- package/dist/flip-ui/dist/assets/vyper-CDx5xZoG.js +0 -1
- package/dist/flip-ui/dist/assets/wasm-CG6Dc4jp.js +0 -1
- package/dist/flip-ui/dist/assets/wasm-MzD3tlZU.js +0 -1
- package/dist/flip-ui/dist/assets/wenyan-BV7otONQ.js +0 -1
- package/dist/flip-ui/dist/assets/wgsl-Dx-B1_4e.js +0 -1
- package/dist/flip-ui/dist/assets/wikitext-BhOHFoWU.js +0 -1
- package/dist/flip-ui/dist/assets/wit-5i3qLPDT.js +0 -1
- package/dist/flip-ui/dist/assets/wolfram-lXgVvXCa.js +0 -1
- package/dist/flip-ui/dist/assets/xml-sdJ4AIDG.js +0 -1
- package/dist/flip-ui/dist/assets/xsl-CtQFsRM5.js +0 -1
- package/dist/flip-ui/dist/assets/yaml-Buea-lGh.js +0 -1
- package/dist/flip-ui/dist/assets/zenscript-DVFEvuxE.js +0 -1
- package/dist/flip-ui/dist/assets/zig-VOosw3JB.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// dist/index.js
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
4
|
+
import * as path12 from "path";
|
|
5
|
+
import * as fs11 from "fs";
|
|
6
|
+
import * as os5 from "os";
|
|
7
7
|
import * as crypto from "crypto";
|
|
8
8
|
import chalk2 from "chalk";
|
|
9
9
|
|
|
@@ -44,11 +44,11 @@ var GitAdapter = class {
|
|
|
44
44
|
const headMatch = headLine.match(/^HEAD (.+)$/);
|
|
45
45
|
const branchMatch = branchLine?.match(/^branch refs\/heads\/(.+)$/);
|
|
46
46
|
if (pathMatch && headMatch) {
|
|
47
|
-
const
|
|
47
|
+
const path13 = pathMatch[1];
|
|
48
48
|
const head = headMatch[1];
|
|
49
49
|
const branch = branchMatch ? branchMatch[1] : "HEAD";
|
|
50
|
-
if (
|
|
51
|
-
worktrees.push({ path:
|
|
50
|
+
if (path13 !== workspaceRoot) {
|
|
51
|
+
worktrees.push({ path: path13, branch, head });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
i += 3;
|
|
@@ -79,19 +79,19 @@ var GitAdapter = class {
|
|
|
79
79
|
throw new Error(`Failed to delete branch: ${error.message}`);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
async isValidWorktree(
|
|
82
|
+
async isValidWorktree(path13, workspaceRoot) {
|
|
83
83
|
try {
|
|
84
|
-
await fs.promises.access(
|
|
84
|
+
await fs.promises.access(path13, fs.constants.R_OK);
|
|
85
85
|
} catch {
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
try {
|
|
89
|
-
await exec(`cd "${
|
|
89
|
+
await exec(`cd "${path13}" && git rev-parse --git-dir`, execOptions);
|
|
90
90
|
} catch {
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
93
93
|
const worktrees = await this.listWorktrees(workspaceRoot);
|
|
94
|
-
return worktrees.some((wt) => wt.path ===
|
|
94
|
+
return worktrees.some((wt) => wt.path === path13);
|
|
95
95
|
}
|
|
96
96
|
async getWorktreeBranch(worktreePath) {
|
|
97
97
|
try {
|
|
@@ -423,6 +423,8 @@ import net from "net";
|
|
|
423
423
|
import { Router } from "express";
|
|
424
424
|
import fs2 from "fs";
|
|
425
425
|
import path2 from "path";
|
|
426
|
+
|
|
427
|
+
// dist/flip/constants/filters.js
|
|
426
428
|
var FILTERED_PATTERNS = /* @__PURE__ */ new Set([
|
|
427
429
|
// Package managers
|
|
428
430
|
"node_modules",
|
|
@@ -451,6 +453,8 @@ var FILTERED_PATTERNS = /* @__PURE__ */ new Set([
|
|
|
451
453
|
function isFiltered(name) {
|
|
452
454
|
return FILTERED_PATTERNS.has(name);
|
|
453
455
|
}
|
|
456
|
+
|
|
457
|
+
// dist/flip/routes/files.js
|
|
454
458
|
var router = Router();
|
|
455
459
|
function buildFileTree(rootPath, currentPath, maxDepth, depth = 0) {
|
|
456
460
|
if (depth > maxDepth)
|
|
@@ -495,7 +499,14 @@ function collectFlatFiles(rootPath, currentPath, maxDepth, depth = 0, result = {
|
|
|
495
499
|
continue;
|
|
496
500
|
}
|
|
497
501
|
if (entry.isFile()) {
|
|
498
|
-
|
|
502
|
+
try {
|
|
503
|
+
const stat = fs2.statSync(fullPath);
|
|
504
|
+
result.files.push({
|
|
505
|
+
path: relativePath,
|
|
506
|
+
mtime: stat.mtimeMs
|
|
507
|
+
});
|
|
508
|
+
} catch {
|
|
509
|
+
}
|
|
499
510
|
} else if (entry.isDirectory()) {
|
|
500
511
|
collectFlatFiles(rootPath, fullPath, maxDepth, depth + 1, result);
|
|
501
512
|
}
|
|
@@ -514,11 +525,17 @@ router.get("/", (req, res) => {
|
|
|
514
525
|
router.get("/flat", (req, res) => {
|
|
515
526
|
const state = req.app.locals.state;
|
|
516
527
|
const result = collectFlatFiles(state.cwd, state.cwd, 10);
|
|
517
|
-
result.files.sort();
|
|
528
|
+
result.files.sort((a, b) => a.path.localeCompare(b.path));
|
|
518
529
|
result.filteredDirs.sort();
|
|
530
|
+
let recentFile = null;
|
|
531
|
+
if (result.files.length > 0) {
|
|
532
|
+
const mostRecent = result.files.reduce((prev, curr) => curr.mtime > prev.mtime ? curr : prev);
|
|
533
|
+
recentFile = mostRecent.path;
|
|
534
|
+
}
|
|
519
535
|
const response = {
|
|
520
536
|
files: result.files,
|
|
521
|
-
filteredDirs: result.filteredDirs
|
|
537
|
+
filteredDirs: result.filteredDirs,
|
|
538
|
+
recentFile
|
|
522
539
|
};
|
|
523
540
|
res.json(response);
|
|
524
541
|
});
|
|
@@ -901,16 +918,61 @@ function formatComments(comments) {
|
|
|
901
918
|
}
|
|
902
919
|
|
|
903
920
|
// dist/flip/output/clipboard.js
|
|
904
|
-
import
|
|
921
|
+
import { spawn } from "child_process";
|
|
922
|
+
import fs5 from "fs";
|
|
923
|
+
import path5 from "path";
|
|
924
|
+
import os from "os";
|
|
905
925
|
async function copyToClipboard(text) {
|
|
906
|
-
|
|
926
|
+
if (process.platform === "darwin") {
|
|
927
|
+
const tmpFile = path5.join(os.tmpdir(), `flip-clipboard-${Date.now()}.txt`);
|
|
928
|
+
try {
|
|
929
|
+
fs5.writeFileSync(tmpFile, text);
|
|
930
|
+
const child = spawn("sh", ["-c", `cat "${tmpFile}" | pbcopy && rm "${tmpFile}"`], {
|
|
931
|
+
detached: true,
|
|
932
|
+
stdio: "ignore"
|
|
933
|
+
});
|
|
934
|
+
child.unref();
|
|
935
|
+
} catch (e) {
|
|
936
|
+
console.log(`Output saved to: ${tmpFile}`);
|
|
937
|
+
throw e;
|
|
938
|
+
}
|
|
939
|
+
} else if (process.platform === "linux") {
|
|
940
|
+
const tmpFile = path5.join(os.tmpdir(), `flip-clipboard-${Date.now()}.txt`);
|
|
941
|
+
fs5.writeFileSync(tmpFile, text);
|
|
942
|
+
try {
|
|
943
|
+
const child = spawn("sh", ["-c", `cat "${tmpFile}" | xclip -selection clipboard && rm "${tmpFile}"`], {
|
|
944
|
+
detached: true,
|
|
945
|
+
stdio: "ignore"
|
|
946
|
+
});
|
|
947
|
+
child.unref();
|
|
948
|
+
} catch {
|
|
949
|
+
try {
|
|
950
|
+
const child = spawn("sh", ["-c", `cat "${tmpFile}" | xsel --clipboard --input && rm "${tmpFile}"`], {
|
|
951
|
+
detached: true,
|
|
952
|
+
stdio: "ignore"
|
|
953
|
+
});
|
|
954
|
+
child.unref();
|
|
955
|
+
} catch (e) {
|
|
956
|
+
console.log(`Output saved to: ${tmpFile}`);
|
|
957
|
+
throw e;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
} else if (process.platform === "win32") {
|
|
961
|
+
const tmpFile = path5.join(os.tmpdir(), `flip-clipboard-${Date.now()}.txt`);
|
|
962
|
+
fs5.writeFileSync(tmpFile, text);
|
|
963
|
+
const child = spawn("cmd", ["/c", `type "${tmpFile}" | clip && del "${tmpFile}"`], {
|
|
964
|
+
detached: true,
|
|
965
|
+
stdio: "ignore"
|
|
966
|
+
});
|
|
967
|
+
child.unref();
|
|
968
|
+
}
|
|
907
969
|
}
|
|
908
970
|
|
|
909
971
|
// dist/flip/output/autopaste.js
|
|
910
|
-
import {
|
|
911
|
-
import
|
|
912
|
-
import
|
|
913
|
-
import
|
|
972
|
+
import { spawn as spawn2 } from "child_process";
|
|
973
|
+
import fs6 from "fs";
|
|
974
|
+
import path6 from "path";
|
|
975
|
+
import os2 from "os";
|
|
914
976
|
async function schedulePaste(sessionId) {
|
|
915
977
|
if (process.platform !== "darwin") {
|
|
916
978
|
console.error("Auto-paste not supported on this platform. Please paste manually (Ctrl+V).");
|
|
@@ -919,10 +981,10 @@ async function schedulePaste(sessionId) {
|
|
|
919
981
|
await pasteToOriginalSession(sessionId);
|
|
920
982
|
}
|
|
921
983
|
async function pasteToOriginalSession(sessionId) {
|
|
922
|
-
const sessionFile =
|
|
984
|
+
const sessionFile = path6.join(os2.tmpdir(), `flip-view-session-${sessionId}`);
|
|
923
985
|
let itermSessionId;
|
|
924
986
|
try {
|
|
925
|
-
itermSessionId =
|
|
987
|
+
itermSessionId = fs6.readFileSync(sessionFile, "utf-8").trim();
|
|
926
988
|
} catch {
|
|
927
989
|
}
|
|
928
990
|
let script;
|
|
@@ -950,7 +1012,7 @@ async function pasteToOriginalSession(sessionId) {
|
|
|
950
1012
|
end tell
|
|
951
1013
|
`;
|
|
952
1014
|
try {
|
|
953
|
-
|
|
1015
|
+
fs6.unlinkSync(sessionFile);
|
|
954
1016
|
} catch {
|
|
955
1017
|
}
|
|
956
1018
|
} else {
|
|
@@ -966,9 +1028,19 @@ async function pasteToOriginalSession(sessionId) {
|
|
|
966
1028
|
`;
|
|
967
1029
|
}
|
|
968
1030
|
try {
|
|
969
|
-
|
|
970
|
-
|
|
1031
|
+
const tmpScript = path6.join(os2.tmpdir(), `flip-paste-${Date.now()}.scpt`);
|
|
1032
|
+
fs6.writeFileSync(tmpScript, script);
|
|
1033
|
+
const child = spawn2("osascript", [tmpScript], {
|
|
1034
|
+
detached: true,
|
|
1035
|
+
stdio: "ignore"
|
|
971
1036
|
});
|
|
1037
|
+
child.unref();
|
|
1038
|
+
setTimeout(() => {
|
|
1039
|
+
try {
|
|
1040
|
+
fs6.unlinkSync(tmpScript);
|
|
1041
|
+
} catch {
|
|
1042
|
+
}
|
|
1043
|
+
}, 5e3);
|
|
972
1044
|
} catch (e) {
|
|
973
1045
|
console.error("Failed to paste to iTerm:", e);
|
|
974
1046
|
}
|
|
@@ -990,15 +1062,22 @@ router4.post("/", async (req, res) => {
|
|
|
990
1062
|
text: item.comment
|
|
991
1063
|
}));
|
|
992
1064
|
const formatted = formatComments(comments);
|
|
1065
|
+
let clipboardSuccess = false;
|
|
993
1066
|
try {
|
|
994
1067
|
await copyToClipboard(formatted);
|
|
1068
|
+
clipboardSuccess = true;
|
|
995
1069
|
} catch (e) {
|
|
996
1070
|
console.error("Failed to copy to clipboard:", e);
|
|
1071
|
+
console.log("\n--- Output (copy manually) ---");
|
|
1072
|
+
console.log(formatted);
|
|
1073
|
+
console.log("--- End of output ---\n");
|
|
997
1074
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1075
|
+
if (clipboardSuccess) {
|
|
1076
|
+
try {
|
|
1077
|
+
await schedulePaste(body.session_id);
|
|
1078
|
+
} catch (e) {
|
|
1079
|
+
console.error("Failed to schedule paste:", e);
|
|
1080
|
+
}
|
|
1002
1081
|
}
|
|
1003
1082
|
res.json({ status: "ok" });
|
|
1004
1083
|
if (state.resolve) {
|
|
@@ -1020,19 +1099,22 @@ router5.post("/", (req, res) => {
|
|
|
1020
1099
|
// dist/flip/routes/static.js
|
|
1021
1100
|
import { Router as Router6 } from "express";
|
|
1022
1101
|
import express from "express";
|
|
1023
|
-
import
|
|
1102
|
+
import path7 from "path";
|
|
1024
1103
|
import { fileURLToPath } from "url";
|
|
1025
|
-
import
|
|
1104
|
+
import fs7 from "fs";
|
|
1026
1105
|
function createStaticRouter() {
|
|
1027
1106
|
const router6 = Router6();
|
|
1028
1107
|
const __filename = fileURLToPath(import.meta.url);
|
|
1029
|
-
const __dirname =
|
|
1030
|
-
|
|
1031
|
-
if (
|
|
1108
|
+
const __dirname = path7.dirname(__filename);
|
|
1109
|
+
let distPath = path7.resolve(__dirname, "flip-ui/dist");
|
|
1110
|
+
if (!fs7.existsSync(distPath)) {
|
|
1111
|
+
distPath = path7.resolve(__dirname, "../../../flip-ui/dist");
|
|
1112
|
+
}
|
|
1113
|
+
if (fs7.existsSync(distPath)) {
|
|
1032
1114
|
router6.use(express.static(distPath));
|
|
1033
1115
|
router6.get("*", (req, res) => {
|
|
1034
|
-
const indexPath =
|
|
1035
|
-
if (
|
|
1116
|
+
const indexPath = path7.join(distPath, "index.html");
|
|
1117
|
+
if (fs7.existsSync(indexPath)) {
|
|
1036
1118
|
res.sendFile(indexPath);
|
|
1037
1119
|
} else {
|
|
1038
1120
|
res.status(404).send("Not Found");
|
|
@@ -1046,6 +1128,175 @@ function createStaticRouter() {
|
|
|
1046
1128
|
return router6;
|
|
1047
1129
|
}
|
|
1048
1130
|
|
|
1131
|
+
// dist/flip/routes/events.js
|
|
1132
|
+
import { Router as Router7 } from "express";
|
|
1133
|
+
function createEventsRouter(sseManager) {
|
|
1134
|
+
const router6 = Router7();
|
|
1135
|
+
router6.get("/", (req, res) => {
|
|
1136
|
+
res.setHeader("Content-Type", "text/event-stream");
|
|
1137
|
+
res.setHeader("Cache-Control", "no-cache");
|
|
1138
|
+
res.setHeader("Connection", "keep-alive");
|
|
1139
|
+
res.setHeader("X-Accel-Buffering", "no");
|
|
1140
|
+
res.write('data: {"type":"connected"}\n\n');
|
|
1141
|
+
sseManager.addClient(res);
|
|
1142
|
+
const heartbeat = setInterval(() => {
|
|
1143
|
+
res.write(":heartbeat\n\n");
|
|
1144
|
+
}, 3e4);
|
|
1145
|
+
req.on("close", () => {
|
|
1146
|
+
clearInterval(heartbeat);
|
|
1147
|
+
});
|
|
1148
|
+
});
|
|
1149
|
+
return router6;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// dist/flip/watcher/FileWatcher.js
|
|
1153
|
+
import chokidar from "chokidar";
|
|
1154
|
+
import * as path8 from "path";
|
|
1155
|
+
var FileWatcher = class {
|
|
1156
|
+
watcher = null;
|
|
1157
|
+
cwd;
|
|
1158
|
+
debounceMs;
|
|
1159
|
+
filesChangedCallbacks = [];
|
|
1160
|
+
fileChangedCallbacks = [];
|
|
1161
|
+
gitChangedCallbacks = [];
|
|
1162
|
+
filesDebounceTimer = null;
|
|
1163
|
+
gitDebounceTimer = null;
|
|
1164
|
+
fileDebounceTimers = /* @__PURE__ */ new Map();
|
|
1165
|
+
constructor(options) {
|
|
1166
|
+
this.cwd = options.cwd;
|
|
1167
|
+
this.debounceMs = options.debounceMs ?? 300;
|
|
1168
|
+
}
|
|
1169
|
+
start() {
|
|
1170
|
+
const ignoredPatterns = Array.from(FILTERED_PATTERNS).map((pattern) => {
|
|
1171
|
+
if (pattern === ".git") {
|
|
1172
|
+
return void 0;
|
|
1173
|
+
}
|
|
1174
|
+
return `**/${pattern}/**`;
|
|
1175
|
+
}).filter(Boolean);
|
|
1176
|
+
this.watcher = chokidar.watch(this.cwd, {
|
|
1177
|
+
ignored: ignoredPatterns,
|
|
1178
|
+
persistent: true,
|
|
1179
|
+
ignoreInitial: true,
|
|
1180
|
+
awaitWriteFinish: {
|
|
1181
|
+
stabilityThreshold: 100,
|
|
1182
|
+
pollInterval: 50
|
|
1183
|
+
}
|
|
1184
|
+
});
|
|
1185
|
+
this.watcher.on("add", (filePath) => this.handleFileEvent(filePath, "add")).on("unlink", (filePath) => this.handleFileEvent(filePath, "unlink")).on("change", (filePath) => this.handleFileEvent(filePath, "change")).on("addDir", (filePath) => this.handleDirEvent(filePath, "addDir")).on("unlinkDir", (filePath) => this.handleDirEvent(filePath, "unlinkDir")).on("error", (error) => console.error("Watcher error:", error));
|
|
1186
|
+
}
|
|
1187
|
+
async stop() {
|
|
1188
|
+
if (this.filesDebounceTimer) {
|
|
1189
|
+
clearTimeout(this.filesDebounceTimer);
|
|
1190
|
+
}
|
|
1191
|
+
if (this.gitDebounceTimer) {
|
|
1192
|
+
clearTimeout(this.gitDebounceTimer);
|
|
1193
|
+
}
|
|
1194
|
+
Array.from(this.fileDebounceTimers.values()).forEach((timer) => {
|
|
1195
|
+
clearTimeout(timer);
|
|
1196
|
+
});
|
|
1197
|
+
this.fileDebounceTimers.clear();
|
|
1198
|
+
if (this.watcher) {
|
|
1199
|
+
await this.watcher.close();
|
|
1200
|
+
this.watcher = null;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
onFilesChanged(callback) {
|
|
1204
|
+
this.filesChangedCallbacks.push(callback);
|
|
1205
|
+
}
|
|
1206
|
+
onFileChanged(callback) {
|
|
1207
|
+
this.fileChangedCallbacks.push(callback);
|
|
1208
|
+
}
|
|
1209
|
+
onGitChanged(callback) {
|
|
1210
|
+
this.gitChangedCallbacks.push(callback);
|
|
1211
|
+
}
|
|
1212
|
+
handleFileEvent(filePath, event) {
|
|
1213
|
+
const relativePath = path8.relative(this.cwd, filePath);
|
|
1214
|
+
if (relativePath.startsWith(".git")) {
|
|
1215
|
+
this.emitGitChanged();
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
if (event === "add" || event === "unlink") {
|
|
1219
|
+
this.emitFilesChanged();
|
|
1220
|
+
}
|
|
1221
|
+
if (event === "change" || event === "add") {
|
|
1222
|
+
this.emitFileChanged(relativePath);
|
|
1223
|
+
}
|
|
1224
|
+
this.emitGitChanged();
|
|
1225
|
+
}
|
|
1226
|
+
handleDirEvent(dirPath, event) {
|
|
1227
|
+
const relativePath = path8.relative(this.cwd, dirPath);
|
|
1228
|
+
if (relativePath.startsWith(".git")) {
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
this.emitFilesChanged();
|
|
1232
|
+
}
|
|
1233
|
+
emitFilesChanged() {
|
|
1234
|
+
if (this.filesDebounceTimer) {
|
|
1235
|
+
clearTimeout(this.filesDebounceTimer);
|
|
1236
|
+
}
|
|
1237
|
+
this.filesDebounceTimer = setTimeout(() => {
|
|
1238
|
+
for (const callback of this.filesChangedCallbacks) {
|
|
1239
|
+
callback();
|
|
1240
|
+
}
|
|
1241
|
+
}, this.debounceMs);
|
|
1242
|
+
}
|
|
1243
|
+
emitFileChanged(relativePath) {
|
|
1244
|
+
const existingTimer = this.fileDebounceTimers.get(relativePath);
|
|
1245
|
+
if (existingTimer) {
|
|
1246
|
+
clearTimeout(existingTimer);
|
|
1247
|
+
}
|
|
1248
|
+
const timer = setTimeout(() => {
|
|
1249
|
+
this.fileDebounceTimers.delete(relativePath);
|
|
1250
|
+
for (const callback of this.fileChangedCallbacks) {
|
|
1251
|
+
callback(relativePath);
|
|
1252
|
+
}
|
|
1253
|
+
}, this.debounceMs);
|
|
1254
|
+
this.fileDebounceTimers.set(relativePath, timer);
|
|
1255
|
+
}
|
|
1256
|
+
emitGitChanged() {
|
|
1257
|
+
if (this.gitDebounceTimer) {
|
|
1258
|
+
clearTimeout(this.gitDebounceTimer);
|
|
1259
|
+
}
|
|
1260
|
+
this.gitDebounceTimer = setTimeout(() => {
|
|
1261
|
+
for (const callback of this.gitChangedCallbacks) {
|
|
1262
|
+
callback();
|
|
1263
|
+
}
|
|
1264
|
+
}, this.debounceMs);
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1268
|
+
// dist/flip/events/SSEManager.js
|
|
1269
|
+
var SSEManager = class {
|
|
1270
|
+
clients = /* @__PURE__ */ new Set();
|
|
1271
|
+
addClient(res) {
|
|
1272
|
+
this.clients.add(res);
|
|
1273
|
+
res.on("close", () => {
|
|
1274
|
+
this.clients.delete(res);
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
removeClient(res) {
|
|
1278
|
+
this.clients.delete(res);
|
|
1279
|
+
}
|
|
1280
|
+
broadcast(event) {
|
|
1281
|
+
const data = JSON.stringify(event);
|
|
1282
|
+
const message = `data: ${data}
|
|
1283
|
+
|
|
1284
|
+
`;
|
|
1285
|
+
this.clients.forEach((client) => {
|
|
1286
|
+
client.write(message);
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
closeAll() {
|
|
1290
|
+
this.clients.forEach((client) => {
|
|
1291
|
+
client.end();
|
|
1292
|
+
});
|
|
1293
|
+
this.clients.clear();
|
|
1294
|
+
}
|
|
1295
|
+
get clientCount() {
|
|
1296
|
+
return this.clients.size;
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1049
1300
|
// dist/flip/server/Server.js
|
|
1050
1301
|
var Server = class {
|
|
1051
1302
|
cwd;
|
|
@@ -1064,15 +1315,30 @@ var Server = class {
|
|
|
1064
1315
|
app.use(cors());
|
|
1065
1316
|
app.use(express2.json());
|
|
1066
1317
|
app.locals.state = state;
|
|
1318
|
+
const sseManager = new SSEManager();
|
|
1319
|
+
const fileWatcher = new FileWatcher({ cwd: this.cwd });
|
|
1320
|
+
fileWatcher.onFilesChanged(() => {
|
|
1321
|
+
sseManager.broadcast({ type: "files-changed" });
|
|
1322
|
+
});
|
|
1323
|
+
fileWatcher.onFileChanged((path13) => {
|
|
1324
|
+
sseManager.broadcast({ type: "file-changed", path: path13 });
|
|
1325
|
+
});
|
|
1326
|
+
fileWatcher.onGitChanged(() => {
|
|
1327
|
+
sseManager.broadcast({ type: "git-changed" });
|
|
1328
|
+
});
|
|
1329
|
+
fileWatcher.start();
|
|
1067
1330
|
app.use("/api/files", router);
|
|
1068
1331
|
app.use("/api/file", router2);
|
|
1069
1332
|
app.use("/api/git", router3);
|
|
1070
1333
|
app.use("/api/submit", router4);
|
|
1071
1334
|
app.use("/api/cancel", router5);
|
|
1335
|
+
app.use("/api/events", createEventsRouter(sseManager));
|
|
1072
1336
|
app.use(createStaticRouter());
|
|
1073
1337
|
const server = http.createServer(app);
|
|
1074
|
-
state.resolve = (output) => {
|
|
1075
|
-
|
|
1338
|
+
state.resolve = async (output) => {
|
|
1339
|
+
await fileWatcher.stop();
|
|
1340
|
+
sseManager.closeAll();
|
|
1341
|
+
await new Promise((res) => server.close(() => res()));
|
|
1076
1342
|
resolve2(output);
|
|
1077
1343
|
};
|
|
1078
1344
|
server.listen(this.port, "127.0.0.1", () => {
|
|
@@ -1097,12 +1363,11 @@ async function findFreePort(preferred) {
|
|
|
1097
1363
|
|
|
1098
1364
|
// dist/flip/index.js
|
|
1099
1365
|
import open from "open";
|
|
1100
|
-
import
|
|
1101
|
-
import
|
|
1102
|
-
import
|
|
1103
|
-
import { execSync as
|
|
1366
|
+
import path9 from "path";
|
|
1367
|
+
import fs8 from "fs";
|
|
1368
|
+
import os3 from "os";
|
|
1369
|
+
import { execSync as execSync2 } from "child_process";
|
|
1104
1370
|
import { confirm as confirm2 } from "@inquirer/prompts";
|
|
1105
|
-
import clipboardy2 from "clipboardy";
|
|
1106
1371
|
var DEFAULT_PORT = 51234;
|
|
1107
1372
|
function formatTime() {
|
|
1108
1373
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -1150,7 +1415,7 @@ async function runFlip(args) {
|
|
|
1150
1415
|
} else {
|
|
1151
1416
|
command = "oneshot";
|
|
1152
1417
|
}
|
|
1153
|
-
const cwd = pathArg ?
|
|
1418
|
+
const cwd = pathArg ? path9.resolve(pathArg) : process.cwd();
|
|
1154
1419
|
switch (command) {
|
|
1155
1420
|
case "setup": {
|
|
1156
1421
|
await setupHotkey();
|
|
@@ -1222,17 +1487,17 @@ function printUsage() {
|
|
|
1222
1487
|
console.error(" --session <uuid> Session ID for paste-back tracking");
|
|
1223
1488
|
}
|
|
1224
1489
|
async function setupHotkey() {
|
|
1225
|
-
const configDir =
|
|
1226
|
-
const applescriptPath =
|
|
1227
|
-
const shPath =
|
|
1490
|
+
const configDir = path9.join(os3.homedir(), ".config", "flip");
|
|
1491
|
+
const applescriptPath = path9.join(configDir, "flip.applescript");
|
|
1492
|
+
const shPath = path9.join(configDir, "flip.sh");
|
|
1228
1493
|
let nodePath;
|
|
1229
1494
|
try {
|
|
1230
|
-
nodePath =
|
|
1495
|
+
nodePath = execSync2("which node", { encoding: "utf-8" }).trim();
|
|
1231
1496
|
} catch {
|
|
1232
1497
|
nodePath = "/usr/local/bin/node";
|
|
1233
1498
|
}
|
|
1234
1499
|
const csqPath = new URL(import.meta.url).pathname;
|
|
1235
|
-
|
|
1500
|
+
fs8.mkdirSync(configDir, { recursive: true });
|
|
1236
1501
|
const applescriptContent = `#!/usr/bin/osascript
|
|
1237
1502
|
|
|
1238
1503
|
-- flip hotkey script
|
|
@@ -1249,13 +1514,13 @@ tell application "iTerm2"
|
|
|
1249
1514
|
end tell
|
|
1250
1515
|
|
|
1251
1516
|
return ""`;
|
|
1252
|
-
|
|
1253
|
-
|
|
1517
|
+
fs8.writeFileSync(applescriptPath, applescriptContent);
|
|
1518
|
+
fs8.chmodSync(applescriptPath, "755");
|
|
1254
1519
|
const shContent = `#!/bin/bash
|
|
1255
1520
|
osascript ${applescriptPath} > /dev/null 2>&1
|
|
1256
1521
|
`;
|
|
1257
|
-
|
|
1258
|
-
|
|
1522
|
+
fs8.writeFileSync(shPath, shContent);
|
|
1523
|
+
fs8.chmodSync(shPath, "755");
|
|
1259
1524
|
console.log("");
|
|
1260
1525
|
console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
|
|
1261
1526
|
console.log("\u2502 Flip Hotkey Setup Wizard \u2502");
|
|
@@ -1270,7 +1535,7 @@ osascript ${applescriptPath} > /dev/null 2>&1
|
|
|
1270
1535
|
});
|
|
1271
1536
|
if (openSettings) {
|
|
1272
1537
|
try {
|
|
1273
|
-
|
|
1538
|
+
execSync2(`osascript -e 'tell application "iTerm2" to activate' -e 'tell application "System Events" to keystroke "," using command down'`);
|
|
1274
1539
|
console.log("");
|
|
1275
1540
|
console.log(" \u2192 iTerm2 Settings opened. Navigate to: Keys \u2192 Key Bindings");
|
|
1276
1541
|
} catch {
|
|
@@ -1299,7 +1564,7 @@ osascript ${applescriptPath} > /dev/null 2>&1
|
|
|
1299
1564
|
console.log("\u2502 3. Command: Paste the path (copied below) \u2502");
|
|
1300
1565
|
console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
|
|
1301
1566
|
console.log("");
|
|
1302
|
-
await
|
|
1567
|
+
await copyToClipboard(shPath);
|
|
1303
1568
|
console.log(`\u2713 Copied to clipboard: ${shPath}`);
|
|
1304
1569
|
console.log("");
|
|
1305
1570
|
await confirm2({
|
|
@@ -1320,13 +1585,13 @@ osascript ${applescriptPath} > /dev/null 2>&1
|
|
|
1320
1585
|
}
|
|
1321
1586
|
|
|
1322
1587
|
// dist/config.js
|
|
1323
|
-
import * as
|
|
1324
|
-
import * as
|
|
1325
|
-
import * as
|
|
1326
|
-
var GLOBAL_CONFIG_PATH =
|
|
1588
|
+
import * as fs9 from "fs";
|
|
1589
|
+
import * as os4 from "os";
|
|
1590
|
+
import * as path10 from "path";
|
|
1591
|
+
var GLOBAL_CONFIG_PATH = path10.join(os4.homedir(), ".code-squad", "config.json");
|
|
1327
1592
|
async function loadGlobalConfig() {
|
|
1328
1593
|
try {
|
|
1329
|
-
const content = await
|
|
1594
|
+
const content = await fs9.promises.readFile(GLOBAL_CONFIG_PATH, "utf-8");
|
|
1330
1595
|
return JSON.parse(content);
|
|
1331
1596
|
} catch (error) {
|
|
1332
1597
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
@@ -1338,7 +1603,7 @@ async function loadGlobalConfig() {
|
|
|
1338
1603
|
}
|
|
1339
1604
|
async function loadConfig(workspaceRoot) {
|
|
1340
1605
|
const globalConfig = await loadGlobalConfig();
|
|
1341
|
-
const normalizedPath =
|
|
1606
|
+
const normalizedPath = path10.resolve(workspaceRoot);
|
|
1342
1607
|
const projectConfig = globalConfig.projects?.[normalizedPath] ?? {};
|
|
1343
1608
|
const defaults = globalConfig.defaults ?? {};
|
|
1344
1609
|
return {
|
|
@@ -1357,8 +1622,8 @@ function getWorktreeCopyPatterns(config) {
|
|
|
1357
1622
|
}
|
|
1358
1623
|
|
|
1359
1624
|
// dist/fileUtils.js
|
|
1360
|
-
import * as
|
|
1361
|
-
import * as
|
|
1625
|
+
import * as fs10 from "fs";
|
|
1626
|
+
import * as path11 from "path";
|
|
1362
1627
|
import fg from "fast-glob";
|
|
1363
1628
|
async function copyFilesWithPatterns(sourceRoot, destRoot, patterns) {
|
|
1364
1629
|
const copied = [];
|
|
@@ -1378,10 +1643,10 @@ async function copyFilesWithPatterns(sourceRoot, destRoot, patterns) {
|
|
|
1378
1643
|
for (const absolutePath of files) {
|
|
1379
1644
|
try {
|
|
1380
1645
|
await copySingleFile(absolutePath, sourceRoot, destRoot);
|
|
1381
|
-
const relativePath =
|
|
1646
|
+
const relativePath = path11.relative(sourceRoot, absolutePath);
|
|
1382
1647
|
copied.push(relativePath);
|
|
1383
1648
|
} catch {
|
|
1384
|
-
const relativePath =
|
|
1649
|
+
const relativePath = path11.relative(sourceRoot, absolutePath);
|
|
1385
1650
|
failed.push(relativePath);
|
|
1386
1651
|
}
|
|
1387
1652
|
}
|
|
@@ -1391,11 +1656,11 @@ async function copyFilesWithPatterns(sourceRoot, destRoot, patterns) {
|
|
|
1391
1656
|
return { copied, failed };
|
|
1392
1657
|
}
|
|
1393
1658
|
async function copySingleFile(absolutePath, sourceRoot, destRoot) {
|
|
1394
|
-
const relativePath =
|
|
1395
|
-
const destPath =
|
|
1396
|
-
const destDir =
|
|
1397
|
-
await
|
|
1398
|
-
await
|
|
1659
|
+
const relativePath = path11.relative(sourceRoot, absolutePath);
|
|
1660
|
+
const destPath = path11.join(destRoot, relativePath);
|
|
1661
|
+
const destDir = path11.dirname(destPath);
|
|
1662
|
+
await fs10.promises.mkdir(destDir, { recursive: true });
|
|
1663
|
+
await fs10.promises.copyFile(absolutePath, destPath);
|
|
1399
1664
|
}
|
|
1400
1665
|
|
|
1401
1666
|
// dist/index.js
|
|
@@ -1450,13 +1715,13 @@ function getProjectHash(workspaceRoot) {
|
|
|
1450
1715
|
}
|
|
1451
1716
|
function getSessionsPath(workspaceRoot) {
|
|
1452
1717
|
const projectHash = getProjectHash(workspaceRoot);
|
|
1453
|
-
const projectName =
|
|
1454
|
-
return
|
|
1718
|
+
const projectName = path12.basename(workspaceRoot);
|
|
1719
|
+
return path12.join(os5.homedir(), ".code-squad", "sessions", `${projectName}-${projectHash}.json`);
|
|
1455
1720
|
}
|
|
1456
1721
|
async function loadLocalThreads(workspaceRoot) {
|
|
1457
1722
|
const sessionsPath = getSessionsPath(workspaceRoot);
|
|
1458
1723
|
try {
|
|
1459
|
-
const content = await
|
|
1724
|
+
const content = await fs11.promises.readFile(sessionsPath, "utf-8");
|
|
1460
1725
|
const data = JSON.parse(content);
|
|
1461
1726
|
return data.localThreads || [];
|
|
1462
1727
|
} catch {
|
|
@@ -1465,9 +1730,9 @@ async function loadLocalThreads(workspaceRoot) {
|
|
|
1465
1730
|
}
|
|
1466
1731
|
async function saveLocalThreads(workspaceRoot, threads) {
|
|
1467
1732
|
const sessionsPath = getSessionsPath(workspaceRoot);
|
|
1468
|
-
const dir =
|
|
1469
|
-
await
|
|
1470
|
-
await
|
|
1733
|
+
const dir = path12.dirname(sessionsPath);
|
|
1734
|
+
await fs11.promises.mkdir(dir, { recursive: true });
|
|
1735
|
+
await fs11.promises.writeFile(sessionsPath, JSON.stringify({ localThreads: threads }, null, 2));
|
|
1471
1736
|
}
|
|
1472
1737
|
async function addLocalThread(workspaceRoot, name) {
|
|
1473
1738
|
const threads = await loadLocalThreads(workspaceRoot);
|
|
@@ -1565,9 +1830,9 @@ async function createWorktreeCommand(workspaceRoot, args) {
|
|
|
1565
1830
|
console.error(chalk2.dim("Usage: csq new <name> [-s|--split]"));
|
|
1566
1831
|
process.exit(1);
|
|
1567
1832
|
}
|
|
1568
|
-
const repoName =
|
|
1569
|
-
const defaultBasePath =
|
|
1570
|
-
const worktreePath =
|
|
1833
|
+
const repoName = path12.basename(workspaceRoot);
|
|
1834
|
+
const defaultBasePath = path12.join(path12.dirname(workspaceRoot), `${repoName}.worktree`);
|
|
1835
|
+
const worktreePath = path12.join(defaultBasePath, name);
|
|
1571
1836
|
try {
|
|
1572
1837
|
await gitAdapter.createWorktree(worktreePath, name, workspaceRoot);
|
|
1573
1838
|
console.log(chalk2.green(`\u2713 Created worktree: ${name}`));
|
|
@@ -1746,7 +2011,7 @@ async function executeDelete(thread, workspaceRoot) {
|
|
|
1746
2011
|
}
|
|
1747
2012
|
async function runInteraction(workspaceRoot, _persistent = false) {
|
|
1748
2013
|
const threads = await getAllThreads(workspaceRoot);
|
|
1749
|
-
const repoName =
|
|
2014
|
+
const repoName = path12.basename(workspaceRoot);
|
|
1750
2015
|
const choice = await selectThread(threads, repoName);
|
|
1751
2016
|
if (choice.type === "exit") {
|
|
1752
2017
|
return { exit: true };
|
|
@@ -1777,7 +2042,7 @@ async function runInteraction(workspaceRoot, _persistent = false) {
|
|
|
1777
2042
|
return null;
|
|
1778
2043
|
}
|
|
1779
2044
|
if (newType === "worktree") {
|
|
1780
|
-
const defaultBasePath =
|
|
2045
|
+
const defaultBasePath = path12.join(path12.dirname(workspaceRoot), `${repoName}.worktree`);
|
|
1781
2046
|
const form = await newWorktreeForm(defaultBasePath);
|
|
1782
2047
|
if (!form) {
|
|
1783
2048
|
return null;
|