diffity 0.1.0 → 0.1.2
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/index.js +1081 -0
- package/dist/ui/assets/abap-BdImnpbu.js +1 -0
- package/dist/ui/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/ui/assets/ada-bCR0ucgS.js +1 -0
- package/dist/ui/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/ui/assets/angular-html-DA-rfuFy.js +1 -0
- package/dist/ui/assets/angular-ts-BrjP3tb8.js +1 -0
- package/dist/ui/assets/apache-Pmp26Uib.js +1 -0
- package/dist/ui/assets/apex-D8_7TLub.js +1 -0
- package/dist/ui/assets/apl-CORt7UWP.js +1 -0
- package/dist/ui/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/ui/assets/ara-BRHolxvo.js +1 -0
- package/dist/ui/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/ui/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/ui/assets/astro-HNnZUWAn.js +1 -0
- package/dist/ui/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/ui/assets/awk-DMzUqQB5.js +1 -0
- package/dist/ui/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/ui/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/ui/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/ui/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/ui/assets/bat-BkioyH1T.js +1 -0
- package/dist/ui/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/ui/assets/berry-uYugtg8r.js +1 -0
- package/dist/ui/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/ui/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/ui/assets/bird2-BIv1doCn.js +1 -0
- package/dist/ui/assets/blade-BjGOyj-B.js +1 -0
- package/dist/ui/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/ui/assets/c-BIGW1oBm.js +1 -0
- package/dist/ui/assets/c3-eo99z4R2.js +1 -0
- package/dist/ui/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/ui/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/ui/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/ui/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/ui/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/ui/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/ui/assets/clarity-D53aC0YG.js +1 -0
- package/dist/ui/assets/clojure-P80f7IUj.js +1 -0
- package/dist/ui/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/ui/assets/cobol-nBiQ_Alo.js +1 -0
- package/dist/ui/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/ui/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/ui/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/ui/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/ui/assets/coq-DkFqJrB1.js +1 -0
- package/dist/ui/assets/cpp-CofmeUqb.js +1 -0
- package/dist/ui/assets/crystal-DNxU26gB.js +1 -0
- package/dist/ui/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/ui/assets/css-CLj8gQPS.js +1 -0
- package/dist/ui/assets/csv-fuZLfV_i.js +1 -0
- package/dist/ui/assets/cue-D82EKSYY.js +1 -0
- package/dist/ui/assets/cypher-COkxafJQ.js +1 -0
- package/dist/ui/assets/d-85-TOEBH.js +1 -0
- package/dist/ui/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/ui/assets/dart-bE4Kk8sk.js +1 -0
- package/dist/ui/assets/dax-CEL-wOlO.js +1 -0
- package/dist/ui/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/ui/assets/diff-D97Zzqfu.js +1 -0
- package/dist/ui/assets/docker-BcOcwvcX.js +1 -0
- package/dist/ui/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/ui/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/ui/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/ui/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/ui/assets/edge-FbVlp4U3.js +1 -0
- package/dist/ui/assets/elixir-CkH2-t6x.js +1 -0
- package/dist/ui/assets/elm-DbKCFpqz.js +1 -0
- package/dist/ui/assets/emacs-lisp-CXvaQtF9.js +1 -0
- package/dist/ui/assets/erb-BYCe7drp.js +1 -0
- package/dist/ui/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/ui/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/ui/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/ui/assets/fennel-BYunw83y.js +1 -0
- package/dist/ui/assets/fish-BvzEVeQv.js +1 -0
- package/dist/ui/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/ui/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/ui/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/ui/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/ui/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/ui/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/ui/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/ui/assets/genie-D0YGMca9.js +1 -0
- package/dist/ui/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/ui/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/ui/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/ui/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/ui/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/ui/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/ui/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/ui/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/ui/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/ui/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/ui/assets/gleam-BspZqrRM.js +1 -0
- package/dist/ui/assets/glimmer-js-ByusRIyA.js +1 -0
- package/dist/ui/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/dist/ui/assets/glsl-DplSGwfg.js +1 -0
- package/dist/ui/assets/gn-n2N0HUVH.js +1 -0
- package/dist/ui/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/ui/assets/go-C27-OAKa.js +1 -0
- package/dist/ui/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/ui/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/ui/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/ui/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/ui/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/ui/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/ui/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/ui/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/ui/assets/hack-i7_Ulhet.js +1 -0
- package/dist/ui/assets/haml-D5jkg6IW.js +1 -0
- package/dist/ui/assets/handlebars-BpdQsYii.js +1 -0
- package/dist/ui/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/ui/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/ui/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/ui/assets/hjson-D5-asLiD.js +1 -0
- package/dist/ui/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/ui/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/ui/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/dist/ui/assets/houston-DnULxvSX.js +1 -0
- package/dist/ui/assets/html-derivative-DlHx6ybY.js +1 -0
- package/dist/ui/assets/html-pp8916En.js +1 -0
- package/dist/ui/assets/http-jrhK8wxY.js +1 -0
- package/dist/ui/assets/hurl-irOxFIW8.js +1 -0
- package/dist/ui/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/ui/assets/hy-DFXneXwc.js +1 -0
- package/dist/ui/assets/imba-DGztddWO.js +1 -0
- package/dist/ui/assets/index-B2RHRT_g.css +1 -0
- package/dist/ui/assets/index-BUq0B-nJ.js +198 -0
- package/dist/ui/assets/ini-BEwlwnbL.js +1 -0
- package/dist/ui/assets/java-CylS5w8V.js +1 -0
- package/dist/ui/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/ui/assets/jinja-f2NsQr07.js +1 -0
- package/dist/ui/assets/jison-wvAkD_A8.js +1 -0
- package/dist/ui/assets/json-Cp-IABpG.js +1 -0
- package/dist/ui/assets/json5-C9tS-k6U.js +1 -0
- package/dist/ui/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/ui/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/ui/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/ui/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/ui/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/ui/assets/julia-CxzCAyBv.js +1 -0
- package/dist/ui/assets/just-VxiPbLrw.js +1 -0
- package/dist/ui/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/ui/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/ui/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/ui/assets/kdl-DV7GczEv.js +1 -0
- package/dist/ui/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/ui/assets/kusto-wEQ09or8.js +1 -0
- package/dist/ui/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/ui/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/ui/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/ui/assets/less-B1dDrJ26.js +1 -0
- package/dist/ui/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/ui/assets/liquid-C0sCDyMI.js +1 -0
- package/dist/ui/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/ui/assets/log-2UxHyX5q.js +1 -0
- package/dist/ui/assets/logo-BtOb2qkB.js +1 -0
- package/dist/ui/assets/lua-BaeVxFsk.js +1 -0
- package/dist/ui/assets/luau-C-HG3fhB.js +1 -0
- package/dist/ui/assets/make-CHLpvVh8.js +1 -0
- package/dist/ui/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/ui/assets/marko-DjSrsDqO.js +1 -0
- package/dist/ui/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/ui/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/ui/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/ui/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/ui/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/ui/assets/matlab-D7o27uSR.js +1 -0
- package/dist/ui/assets/mdc-DTYItulj.js +1 -0
- package/dist/ui/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/ui/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/ui/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/ui/assets/min-light-CTRr51gU.js +1 -0
- package/dist/ui/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/ui/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/ui/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/ui/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/ui/assets/move-IF9eRakj.js +1 -0
- package/dist/ui/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/ui/assets/nextflow-C-mBbutL.js +1 -0
- package/dist/ui/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/dist/ui/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/ui/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/ui/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/ui/assets/nim-BIad80T-.js +1 -0
- package/dist/ui/assets/nix-CwoSXNpI.js +1 -0
- package/dist/ui/assets/nord-Ddv68eIx.js +1 -0
- package/dist/ui/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/ui/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/ui/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/ui/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/ui/assets/odin-BBf5iR-q.js +1 -0
- package/dist/ui/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/ui/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/ui/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/ui/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/ui/assets/perl-NvoQZIq0.js +1 -0
- package/dist/ui/assets/php-R6g_5hLQ.js +1 -0
- package/dist/ui/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/ui/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/ui/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/ui/assets/po-BTJTHyun.js +1 -0
- package/dist/ui/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/ui/assets/polar-C0HS_06l.js +1 -0
- package/dist/ui/assets/postcss-CXtECtnM.js +1 -0
- package/dist/ui/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/ui/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/ui/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/ui/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/ui/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/ui/assets/pug-DKIMFp6K.js +1 -0
- package/dist/ui/assets/puppet-BMWR74SV.js +1 -0
- package/dist/ui/assets/purescript-CklMAg4u.js +1 -0
- package/dist/ui/assets/python-B6aJPvgy.js +1 -0
- package/dist/ui/assets/qml-3beO22l8.js +1 -0
- package/dist/ui/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/ui/assets/qss-IeuSbFQv.js +1 -0
- package/dist/ui/assets/r-Dspwwk_N.js +1 -0
- package/dist/ui/assets/racket-BqYA7rlc.js +1 -0
- package/dist/ui/assets/raku-DXvB9xmW.js +1 -0
- package/dist/ui/assets/razor-BDqjjVU7.js +1 -0
- package/dist/ui/assets/red-bN70gL4F.js +1 -0
- package/dist/ui/assets/reg-C-SQnVFl.js +1 -0
- package/dist/ui/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/ui/assets/rel-C3B-1QV4.js +1 -0
- package/dist/ui/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/ui/assets/ron-D8l8udqQ.js +1 -0
- package/dist/ui/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/ui/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/ui/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/ui/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/ui/assets/rst-CRjBmOyv.js +1 -0
- package/dist/ui/assets/ruby-Wjq7vjNf.js +1 -0
- package/dist/ui/assets/rust-B1yitclQ.js +1 -0
- package/dist/ui/assets/sas-cz2c8ADy.js +1 -0
- package/dist/ui/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/ui/assets/scala-C151Ov-r.js +1 -0
- package/dist/ui/assets/scheme-C98Dy4si.js +1 -0
- package/dist/ui/assets/scss-D5BDwBP9.js +1 -0
- package/dist/ui/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/ui/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/ui/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/ui/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/ui/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/ui/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/ui/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/ui/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/ui/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/ui/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/ui/assets/solidity-rGO070M0.js +1 -0
- package/dist/ui/assets/soy-8wufbnw4.js +1 -0
- package/dist/ui/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/ui/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/ui/assets/sql-BLtJtn59.js +1 -0
- package/dist/ui/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/ui/assets/stata-BH5u7GGu.js +1 -0
- package/dist/ui/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/ui/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/ui/assets/svelte-Cy7k_4gC.js +1 -0
- package/dist/ui/assets/swift-D82vCrfD.js +1 -0
- package/dist/ui/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/ui/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/ui/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/ui/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/ui/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/ui/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/ui/assets/templ-DhtptRzy.js +1 -0
- package/dist/ui/assets/terraform-BETggiCN.js +1 -0
- package/dist/ui/assets/tex-idrVyKtj.js +1 -0
- package/dist/ui/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/ui/assets/toml-vGWfd6FD.js +1 -0
- package/dist/ui/assets/ts-tags-DQrlYJgV.js +1 -0
- package/dist/ui/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/ui/assets/tsx-COt5Ahok.js +1 -0
- package/dist/ui/assets/turtle-BsS91CYL.js +1 -0
- package/dist/ui/assets/twig-xg9kU7Mw.js +1 -0
- package/dist/ui/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/ui/assets/typespec-CAFt9gP4.js +1 -0
- package/dist/ui/assets/typst-DHCkPAjA.js +1 -0
- package/dist/ui/assets/v-BcVCzyr7.js +1 -0
- package/dist/ui/assets/vala-CsfeWuGM.js +1 -0
- package/dist/ui/assets/vb-D17OF-Vu.js +1 -0
- package/dist/ui/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/ui/assets/vesper-DU1UobuO.js +1 -0
- package/dist/ui/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/ui/assets/viml-CJc9bBzg.js +1 -0
- package/dist/ui/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/ui/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/ui/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/ui/assets/vue-D2xRrEX4.js +1 -0
- package/dist/ui/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/ui/assets/vue-vine-BoDAl6tE.js +1 -0
- package/dist/ui/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/ui/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/ui/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/ui/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/ui/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/ui/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/ui/assets/wit-5i3qLPDT.js +1 -0
- package/dist/ui/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/ui/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/ui/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/ui/assets/yaml-Buea-lGh.js +1 -0
- package/dist/ui/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/ui/assets/zig-VOosw3JB.js +1 -0
- package/{packages → dist}/ui/index.html +2 -1
- package/package.json +37 -18
- package/.claude/settings.local.json +0 -11
- package/LICENSE +0 -21
- package/README.md +0 -71
- package/development.md +0 -156
- package/packages/cli/build.js +0 -38
- package/packages/cli/package.json +0 -51
- package/packages/cli/src/agent.ts +0 -187
- package/packages/cli/src/db.ts +0 -58
- package/packages/cli/src/index.ts +0 -196
- package/packages/cli/src/review-routes.ts +0 -150
- package/packages/cli/src/server.ts +0 -370
- package/packages/cli/src/session.ts +0 -48
- package/packages/cli/src/threads.ts +0 -238
- package/packages/cli/tsconfig.json +0 -13
- package/packages/git/package.json +0 -24
- package/packages/git/src/commits.ts +0 -28
- package/packages/git/src/diff.ts +0 -97
- package/packages/git/src/exec.ts +0 -35
- package/packages/git/src/index.ts +0 -5
- package/packages/git/src/repo.ts +0 -63
- package/packages/git/src/status.ts +0 -9
- package/packages/git/src/types.ts +0 -12
- package/packages/git/tsconfig.json +0 -9
- package/packages/parser/package.json +0 -26
- package/packages/parser/src/index.ts +0 -12
- package/packages/parser/src/parse.ts +0 -299
- package/packages/parser/src/types.ts +0 -52
- package/packages/parser/src/word-diff.ts +0 -155
- package/packages/parser/tests/fixtures/binary-deleted.diff +0 -4
- package/packages/parser/tests/fixtures/binary-file.diff +0 -4
- package/packages/parser/tests/fixtures/binary-modified.diff +0 -3
- package/packages/parser/tests/fixtures/copied-file.diff +0 -12
- package/packages/parser/tests/fixtures/deleted-file.diff +0 -9
- package/packages/parser/tests/fixtures/empty.diff +0 -0
- package/packages/parser/tests/fixtures/hunk-with-context.diff +0 -12
- package/packages/parser/tests/fixtures/mode-change-with-content.diff +0 -10
- package/packages/parser/tests/fixtures/mode-change.diff +0 -3
- package/packages/parser/tests/fixtures/multi-file.diff +0 -22
- package/packages/parser/tests/fixtures/new-file.diff +0 -9
- package/packages/parser/tests/fixtures/no-newline.diff +0 -10
- package/packages/parser/tests/fixtures/renamed-file.diff +0 -12
- package/packages/parser/tests/fixtures/single-file-additions.diff +0 -11
- package/packages/parser/tests/fixtures/single-file-deletions.diff +0 -11
- package/packages/parser/tests/fixtures/single-file-mixed.diff +0 -15
- package/packages/parser/tests/fixtures/single-file-multi-hunk.diff +0 -22
- package/packages/parser/tests/fixtures/spaces-in-path.diff +0 -9
- package/packages/parser/tests/fixtures/submodule.diff +0 -7
- package/packages/parser/tests/fixtures/unicode-content.diff +0 -11
- package/packages/parser/tests/parse.test.ts +0 -312
- package/packages/parser/tests/word-diff-integration.test.ts +0 -52
- package/packages/parser/tests/word-diff.test.ts +0 -121
- package/packages/parser/tsconfig.json +0 -10
- package/packages/skills/diffity-resolve/SKILL.md +0 -55
- package/packages/skills/diffity-review/SKILL.md +0 -74
- package/packages/skills/diffity-start/SKILL.md +0 -25
- package/packages/ui/package.json +0 -35
- package/packages/ui/src/app.tsx +0 -14
- package/packages/ui/src/components/comment-bubble.tsx +0 -78
- package/packages/ui/src/components/comment-form-row.tsx +0 -58
- package/packages/ui/src/components/comment-form.tsx +0 -78
- package/packages/ui/src/components/comment-line-number.tsx +0 -60
- package/packages/ui/src/components/comment-thread.tsx +0 -209
- package/packages/ui/src/components/commit-list.tsx +0 -100
- package/packages/ui/src/components/dashboard.tsx +0 -84
- package/packages/ui/src/components/diff-line.tsx +0 -90
- package/packages/ui/src/components/diff-page.tsx +0 -332
- package/packages/ui/src/components/diff-stats.tsx +0 -20
- package/packages/ui/src/components/diff-view.tsx +0 -278
- package/packages/ui/src/components/expand-row.tsx +0 -45
- package/packages/ui/src/components/file-block.tsx +0 -536
- package/packages/ui/src/components/file-tree-item.tsx +0 -84
- package/packages/ui/src/components/file-tree.tsx +0 -72
- package/packages/ui/src/components/general-comments.tsx +0 -174
- package/packages/ui/src/components/hunk-block-split.tsx +0 -357
- package/packages/ui/src/components/hunk-block.tsx +0 -161
- package/packages/ui/src/components/hunk-header.tsx +0 -144
- package/packages/ui/src/components/hunk-with-gap.tsx +0 -113
- package/packages/ui/src/components/icons/arrow-down-icon.tsx +0 -7
- package/packages/ui/src/components/icons/arrow-up-icon.tsx +0 -7
- package/packages/ui/src/components/icons/check-circle-icon.tsx +0 -8
- package/packages/ui/src/components/icons/check-icon.tsx +0 -9
- package/packages/ui/src/components/icons/chevron-down-icon.tsx +0 -11
- package/packages/ui/src/components/icons/chevron-icon.tsx +0 -20
- package/packages/ui/src/components/icons/chevron-up-down-icon.tsx +0 -7
- package/packages/ui/src/components/icons/chevron-up-icon.tsx +0 -11
- package/packages/ui/src/components/icons/comment-icon.tsx +0 -9
- package/packages/ui/src/components/icons/copy-icon.tsx +0 -10
- package/packages/ui/src/components/icons/eye-icon.tsx +0 -10
- package/packages/ui/src/components/icons/eye-off-icon.tsx +0 -12
- package/packages/ui/src/components/icons/file-icon.tsx +0 -7
- package/packages/ui/src/components/icons/folder-icon.tsx +0 -19
- package/packages/ui/src/components/icons/git-branch-icon.tsx +0 -13
- package/packages/ui/src/components/icons/keyboard-icon.tsx +0 -13
- package/packages/ui/src/components/icons/moon-icon.tsx +0 -9
- package/packages/ui/src/components/icons/plus-icon.tsx +0 -9
- package/packages/ui/src/components/icons/search-icon.tsx +0 -10
- package/packages/ui/src/components/icons/sidebar-icon.tsx +0 -10
- package/packages/ui/src/components/icons/spinner.tsx +0 -7
- package/packages/ui/src/components/icons/split-view-icon.tsx +0 -10
- package/packages/ui/src/components/icons/sun-icon.tsx +0 -17
- package/packages/ui/src/components/icons/trash-icon.tsx +0 -11
- package/packages/ui/src/components/icons/undo-icon.tsx +0 -9
- package/packages/ui/src/components/icons/unified-view-icon.tsx +0 -12
- package/packages/ui/src/components/icons/x-icon.tsx +0 -10
- package/packages/ui/src/components/line-number-cell.tsx +0 -18
- package/packages/ui/src/components/markdown-content.tsx +0 -139
- package/packages/ui/src/components/orphaned-threads.tsx +0 -80
- package/packages/ui/src/components/overview-file-list.tsx +0 -57
- package/packages/ui/src/components/render-expansion-rows.tsx +0 -47
- package/packages/ui/src/components/shortcut-modal.tsx +0 -93
- package/packages/ui/src/components/sidebar.tsx +0 -80
- package/packages/ui/src/components/skeleton.tsx +0 -9
- package/packages/ui/src/components/stale-diff-banner.tsx +0 -21
- package/packages/ui/src/components/summary-bar.tsx +0 -39
- package/packages/ui/src/components/toolbar.tsx +0 -246
- package/packages/ui/src/components/ui/badge.tsx +0 -17
- package/packages/ui/src/components/ui/confirm-dialog.tsx +0 -52
- package/packages/ui/src/components/ui/icon-button.tsx +0 -23
- package/packages/ui/src/components/ui/status-badge.tsx +0 -57
- package/packages/ui/src/components/ui/thread-badge.tsx +0 -35
- package/packages/ui/src/components/word-diff.tsx +0 -126
- package/packages/ui/src/hooks/use-comment-actions.ts +0 -97
- package/packages/ui/src/hooks/use-commits.ts +0 -12
- package/packages/ui/src/hooks/use-copy.ts +0 -18
- package/packages/ui/src/hooks/use-diff-staleness.ts +0 -58
- package/packages/ui/src/hooks/use-diff.ts +0 -12
- package/packages/ui/src/hooks/use-highlighter.ts +0 -190
- package/packages/ui/src/hooks/use-info.ts +0 -12
- package/packages/ui/src/hooks/use-keyboard.ts +0 -55
- package/packages/ui/src/hooks/use-line-selection.ts +0 -157
- package/packages/ui/src/hooks/use-overview.ts +0 -12
- package/packages/ui/src/hooks/use-review-threads.ts +0 -12
- package/packages/ui/src/hooks/use-search-params.ts +0 -26
- package/packages/ui/src/hooks/use-theme.ts +0 -34
- package/packages/ui/src/hooks/use-thread-navigation.ts +0 -43
- package/packages/ui/src/lib/api.ts +0 -232
- package/packages/ui/src/lib/cn.ts +0 -6
- package/packages/ui/src/lib/context-expansion.ts +0 -122
- package/packages/ui/src/lib/diff-utils.ts +0 -268
- package/packages/ui/src/lib/dom-utils.ts +0 -13
- package/packages/ui/src/lib/file-tree.ts +0 -122
- package/packages/ui/src/lib/query-client.ts +0 -10
- package/packages/ui/src/lib/render-content.tsx +0 -23
- package/packages/ui/src/lib/syntax-token.ts +0 -4
- package/packages/ui/src/main.tsx +0 -14
- package/packages/ui/src/queries/commits.ts +0 -9
- package/packages/ui/src/queries/diff.ts +0 -9
- package/packages/ui/src/queries/file.ts +0 -10
- package/packages/ui/src/queries/info.ts +0 -9
- package/packages/ui/src/queries/overview.ts +0 -9
- package/packages/ui/src/styles/app.css +0 -178
- package/packages/ui/src/types/comment.ts +0 -61
- package/packages/ui/src/vite-env.d.ts +0 -1
- package/packages/ui/tests/context-expansion.test.ts +0 -279
- package/packages/ui/tests/diff-utils.test.ts +0 -409
- package/packages/ui/tsconfig.json +0 -14
- package/packages/ui/vite.config.ts +0 -23
- package/scripts/build-skills.ts +0 -26
- package/scripts/build.ts +0 -15
- package/scripts/dev.ts +0 -32
- package/scripts/lib/transformers/claude-code.ts +0 -11
- package/scripts/lib/transformers/codex.ts +0 -17
- package/scripts/lib/transformers/cursor.ts +0 -17
- package/scripts/lib/transformers/index.ts +0 -3
- package/scripts/lib/utils.ts +0 -70
- package/scripts/link-dev.ts +0 -54
- package/skills/diffity-resolve/SKILL.md +0 -55
- package/skills/diffity-review/SKILL.md +0 -74
- package/skills/diffity-start/SKILL.md +0 -27
- package/tsconfig.json +0 -22
- /package/{packages/ui/public → dist/ui}/brand.svg +0 -0
- /package/{packages/ui/public → dist/ui}/favicon.svg +0 -0
package/packages/ui/package.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@diffity/ui",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"private": true,
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "tsc -b && vite build",
|
|
9
|
-
"preview": "vite preview",
|
|
10
|
-
"test": "vitest run",
|
|
11
|
-
"test:watch": "vitest"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@tailwindcss/vite": "^4.2.1",
|
|
15
|
-
"@tanstack/react-query": "^5.90.21",
|
|
16
|
-
"@tanstack/react-virtual": "^3.13.22",
|
|
17
|
-
"clsx": "^2.1.1",
|
|
18
|
-
"react": "latest",
|
|
19
|
-
"react-dom": "latest",
|
|
20
|
-
"react-hotkeys-hook": "^5.2.4",
|
|
21
|
-
"react-markdown": "^10.1.0",
|
|
22
|
-
"remark-gfm": "^4.0.1",
|
|
23
|
-
"shiki": "^4.0.2",
|
|
24
|
-
"tailwind-merge": "^3.5.0",
|
|
25
|
-
"tailwindcss": "^4.2.1"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/react": "latest",
|
|
29
|
-
"@types/react-dom": "latest",
|
|
30
|
-
"@vitejs/plugin-react": "latest",
|
|
31
|
-
"typescript": "latest",
|
|
32
|
-
"vite": "latest",
|
|
33
|
-
"vitest": "^4.1.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
package/packages/ui/src/app.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useSearchParams } from './hooks/use-search-params';
|
|
2
|
-
import { DiffPage } from './components/diff-page';
|
|
3
|
-
|
|
4
|
-
export function App() {
|
|
5
|
-
const { ref, theme, view } = useSearchParams();
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<DiffPage
|
|
9
|
-
refParam={ref ?? 'work'}
|
|
10
|
-
initialTheme={theme}
|
|
11
|
-
initialViewMode={view}
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { Comment } from '../types/comment';
|
|
2
|
-
import { TrashIcon } from './icons/trash-icon';
|
|
3
|
-
import { MarkdownContent } from './markdown-content';
|
|
4
|
-
|
|
5
|
-
interface CommentBubbleProps {
|
|
6
|
-
comment: Comment;
|
|
7
|
-
onDelete: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function formatRelativeTime(dateStr: string): string {
|
|
11
|
-
const date = new Date(dateStr);
|
|
12
|
-
const now = new Date();
|
|
13
|
-
const diffMs = now.getTime() - date.getTime();
|
|
14
|
-
const diffSec = Math.floor(diffMs / 1000);
|
|
15
|
-
const diffMin = Math.floor(diffSec / 60);
|
|
16
|
-
const diffHr = Math.floor(diffMin / 60);
|
|
17
|
-
const diffDays = Math.floor(diffHr / 24);
|
|
18
|
-
|
|
19
|
-
if (diffSec < 60) {
|
|
20
|
-
return 'just now';
|
|
21
|
-
}
|
|
22
|
-
if (diffMin < 60) {
|
|
23
|
-
return `${diffMin}m ago`;
|
|
24
|
-
}
|
|
25
|
-
if (diffHr < 24) {
|
|
26
|
-
return `${diffHr}h ago`;
|
|
27
|
-
}
|
|
28
|
-
if (diffDays < 30) {
|
|
29
|
-
return `${diffDays}d ago`;
|
|
30
|
-
}
|
|
31
|
-
return date.toLocaleDateString();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function AuthorAvatar(props: { name: string; avatarUrl?: string; type: 'user' | 'agent' }) {
|
|
35
|
-
const { name, avatarUrl, type } = props;
|
|
36
|
-
|
|
37
|
-
if (avatarUrl) {
|
|
38
|
-
return (
|
|
39
|
-
<img src={avatarUrl} alt={name} className="w-5 h-5 rounded-full" />
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const bgColor = type === 'agent' ? 'bg-accent' : 'bg-text-muted';
|
|
44
|
-
const initial = name.charAt(0).toUpperCase();
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className={`w-5 h-5 rounded-full ${bgColor} flex items-center justify-center text-white text-[10px] font-medium`}>
|
|
48
|
-
{initial}
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function CommentBubble(props: CommentBubbleProps) {
|
|
54
|
-
const { comment, onDelete } = props;
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<div className="px-3 py-2 border-b border-border last:border-b-0 group">
|
|
58
|
-
<div className="flex items-center gap-2 mb-1">
|
|
59
|
-
<AuthorAvatar name={comment.author.name} avatarUrl={comment.author.avatarUrl} type={comment.author.type} />
|
|
60
|
-
<span className="text-xs font-semibold text-text">{comment.author.name}</span>
|
|
61
|
-
{comment.author.type === 'agent' && (
|
|
62
|
-
<span className="text-[10px] px-1.5 py-0.5 rounded-full bg-accent/15 text-accent font-medium">bot</span>
|
|
63
|
-
)}
|
|
64
|
-
<span className="text-[11px] text-text-muted">{formatRelativeTime(comment.createdAt)}</span>
|
|
65
|
-
<button
|
|
66
|
-
onClick={onDelete}
|
|
67
|
-
className="ml-auto text-text-muted hover:text-deleted opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"
|
|
68
|
-
title="Delete comment"
|
|
69
|
-
>
|
|
70
|
-
<TrashIcon className="w-3.5 h-3.5" />
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
<div className="text-sm text-text pl-7">
|
|
74
|
-
<MarkdownContent content={comment.body} />
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { CommentAuthor, CommentSide } from '../types/comment';
|
|
2
|
-
import { CommentForm } from './comment-form';
|
|
3
|
-
|
|
4
|
-
interface CommentFormRowProps {
|
|
5
|
-
colSpan: number;
|
|
6
|
-
filePath: string;
|
|
7
|
-
side: CommentSide;
|
|
8
|
-
startLine: number;
|
|
9
|
-
endLine: number;
|
|
10
|
-
currentAuthor: CommentAuthor;
|
|
11
|
-
onSubmit: (filePath: string, side: CommentSide, startLine: number, endLine: number, body: string, author: CommentAuthor) => void;
|
|
12
|
-
onCancel: () => void;
|
|
13
|
-
viewMode?: 'unified' | 'split';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function CommentFormRow(props: CommentFormRowProps) {
|
|
17
|
-
const { colSpan, filePath, side, startLine, endLine, currentAuthor, onSubmit, onCancel, viewMode } = props;
|
|
18
|
-
|
|
19
|
-
const lineLabel = startLine === endLine
|
|
20
|
-
? `${startLine}`
|
|
21
|
-
: `${startLine} to ${endLine}`;
|
|
22
|
-
|
|
23
|
-
const formContent = (
|
|
24
|
-
<div className="max-w-[700px]">
|
|
25
|
-
<CommentForm
|
|
26
|
-
onSubmit={(body) => onSubmit(filePath, side, startLine, endLine, body, currentAuthor)}
|
|
27
|
-
onCancel={onCancel}
|
|
28
|
-
lineLabel={`Add a comment on line${startLine !== endLine ? 's' : ''} ${lineLabel}`}
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
if (viewMode === 'split') {
|
|
34
|
-
return (
|
|
35
|
-
<tr>
|
|
36
|
-
{side === 'old' ? (
|
|
37
|
-
<>
|
|
38
|
-
<td colSpan={colSpan} className="px-4 py-3 bg-bg-secondary">{formContent}</td>
|
|
39
|
-
<td colSpan={colSpan} className="bg-bg-secondary"></td>
|
|
40
|
-
</>
|
|
41
|
-
) : (
|
|
42
|
-
<>
|
|
43
|
-
<td colSpan={colSpan} className="bg-bg-secondary"></td>
|
|
44
|
-
<td colSpan={colSpan} className="px-4 py-3 bg-bg-secondary border-l border-border">{formContent}</td>
|
|
45
|
-
</>
|
|
46
|
-
)}
|
|
47
|
-
</tr>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<tr>
|
|
53
|
-
<td colSpan={colSpan} className="px-4 py-3 bg-bg-secondary">
|
|
54
|
-
{formContent}
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
interface CommentFormProps {
|
|
4
|
-
onSubmit: (body: string) => void;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
submitLabel?: string;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
lineLabel?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function CommentForm(props: CommentFormProps) {
|
|
13
|
-
const { onSubmit, onCancel, placeholder = 'Leave a comment', submitLabel = 'Comment', autoFocus = true, lineLabel } = props;
|
|
14
|
-
const [body, setBody] = useState('');
|
|
15
|
-
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (autoFocus && textareaRef.current) {
|
|
19
|
-
textareaRef.current.focus();
|
|
20
|
-
}
|
|
21
|
-
}, [autoFocus]);
|
|
22
|
-
|
|
23
|
-
const handleSubmit = () => {
|
|
24
|
-
const trimmed = body.trim();
|
|
25
|
-
if (!trimmed) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
onSubmit(trimmed);
|
|
29
|
-
setBody('');
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
33
|
-
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
handleSubmit();
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (e.key === 'Escape') {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
onCancel();
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div className="border border-border rounded-lg overflow-hidden bg-bg">
|
|
46
|
-
{lineLabel && (
|
|
47
|
-
<div className="px-3 py-1.5 bg-bg-secondary border-b border-border">
|
|
48
|
-
<span className="text-xs text-text-secondary font-medium">{lineLabel}</span>
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
<textarea
|
|
52
|
-
ref={textareaRef}
|
|
53
|
-
value={body}
|
|
54
|
-
onChange={(e) => setBody(e.target.value)}
|
|
55
|
-
onKeyDown={handleKeyDown}
|
|
56
|
-
placeholder={placeholder}
|
|
57
|
-
rows={3}
|
|
58
|
-
className="w-full px-3 py-2 text-sm bg-bg text-text resize-y outline-none placeholder:text-text-muted min-h-[80px] font-mono"
|
|
59
|
-
/>
|
|
60
|
-
<div className="flex items-center gap-2 px-3 py-2 bg-bg-secondary border-t border-border">
|
|
61
|
-
<div className="flex-1" />
|
|
62
|
-
<button
|
|
63
|
-
onClick={onCancel}
|
|
64
|
-
className="px-3 py-1.5 text-xs font-medium rounded-md border border-border text-text-secondary hover:bg-hover transition-colors cursor-pointer"
|
|
65
|
-
>
|
|
66
|
-
Cancel
|
|
67
|
-
</button>
|
|
68
|
-
<button
|
|
69
|
-
onClick={handleSubmit}
|
|
70
|
-
disabled={!body.trim()}
|
|
71
|
-
className="px-3 py-1.5 text-xs font-medium rounded-md bg-accent text-white hover:bg-accent-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"
|
|
72
|
-
>
|
|
73
|
-
{submitLabel}
|
|
74
|
-
</button>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { cn } from '../lib/cn';
|
|
2
|
-
import { PlusIcon } from './icons/plus-icon';
|
|
3
|
-
|
|
4
|
-
interface CommentLineNumberProps {
|
|
5
|
-
lineNumber: number | null;
|
|
6
|
-
className?: string;
|
|
7
|
-
isSelected?: boolean;
|
|
8
|
-
onMouseDown?: () => void;
|
|
9
|
-
onMouseEnter?: () => void;
|
|
10
|
-
onCommentClick?: () => void;
|
|
11
|
-
showCommentButton?: boolean;
|
|
12
|
-
forceShowButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const baseClass = 'w-12.5 min-w-12.5 px-2 text-right text-text-muted select-none cursor-pointer align-top text-xs leading-6 relative group/line';
|
|
16
|
-
|
|
17
|
-
export function CommentLineNumber(props: CommentLineNumberProps) {
|
|
18
|
-
const { lineNumber, className, isSelected, onMouseDown, onMouseEnter, onCommentClick, showCommentButton, forceShowButton } = props;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<td
|
|
22
|
-
className={cn(
|
|
23
|
-
baseClass,
|
|
24
|
-
className,
|
|
25
|
-
isSelected && 'bg-diff-comment-gutter',
|
|
26
|
-
)}
|
|
27
|
-
onMouseDown={(e) => {
|
|
28
|
-
if (onMouseDown && lineNumber !== null) {
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
onMouseDown();
|
|
31
|
-
}
|
|
32
|
-
}}
|
|
33
|
-
onMouseEnter={() => {
|
|
34
|
-
if (onMouseEnter && lineNumber !== null) {
|
|
35
|
-
onMouseEnter();
|
|
36
|
-
}
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
{showCommentButton && lineNumber !== null && (
|
|
40
|
-
<button
|
|
41
|
-
className={cn(
|
|
42
|
-
'absolute right-[-2px] top-0.5 w-5 h-5 flex items-center justify-center rounded bg-accent text-white cursor-pointer z-10 hover:bg-accent-hover',
|
|
43
|
-
forceShowButton ? 'opacity-100' : 'opacity-0 group-hover/row:opacity-100 group-hover/line:opacity-100',
|
|
44
|
-
)}
|
|
45
|
-
onClick={(e) => {
|
|
46
|
-
e.stopPropagation();
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
if (onCommentClick) {
|
|
49
|
-
onCommentClick();
|
|
50
|
-
}
|
|
51
|
-
}}
|
|
52
|
-
title="Add comment"
|
|
53
|
-
>
|
|
54
|
-
<PlusIcon className="w-2.5 h-2.5" />
|
|
55
|
-
</button>
|
|
56
|
-
)}
|
|
57
|
-
{lineNumber ?? ''}
|
|
58
|
-
</td>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import type { CommentThread as CommentThreadType } from '../types/comment';
|
|
3
|
-
import type { CommentAuthor, CommentSide } from '../types/comment';
|
|
4
|
-
import { isThreadResolved } from '../types/comment';
|
|
5
|
-
import { CommentForm } from './comment-form';
|
|
6
|
-
import { CommentBubble } from './comment-bubble';
|
|
7
|
-
import { TrashIcon } from './icons/trash-icon';
|
|
8
|
-
import { CommentIcon } from './icons/comment-icon';
|
|
9
|
-
import { ThreadBadge } from './ui/thread-badge';
|
|
10
|
-
import { cn } from '../lib/cn';
|
|
11
|
-
|
|
12
|
-
interface CommentThreadProps {
|
|
13
|
-
thread: CommentThreadType;
|
|
14
|
-
onReply: (threadId: string, body: string, author: CommentAuthor) => void;
|
|
15
|
-
onResolve: (threadId: string) => void;
|
|
16
|
-
onUnresolve: (threadId: string) => void;
|
|
17
|
-
onDeleteComment: (threadId: string, commentId: string) => void;
|
|
18
|
-
onDeleteThread: (threadId: string) => void;
|
|
19
|
-
currentAuthor: CommentAuthor;
|
|
20
|
-
colSpan: number;
|
|
21
|
-
viewMode?: 'unified' | 'split';
|
|
22
|
-
side?: CommentSide;
|
|
23
|
-
currentCode?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function StatusBadge(props: { status: string }) {
|
|
27
|
-
const { status } = props;
|
|
28
|
-
|
|
29
|
-
switch (status) {
|
|
30
|
-
case 'resolved':
|
|
31
|
-
return <ThreadBadge variant='resolved' />;
|
|
32
|
-
case 'dismissed':
|
|
33
|
-
return <ThreadBadge variant='dismissed' />;
|
|
34
|
-
default:
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function CommentThread(props: CommentThreadProps) {
|
|
40
|
-
const {
|
|
41
|
-
thread,
|
|
42
|
-
onReply,
|
|
43
|
-
onResolve,
|
|
44
|
-
onUnresolve,
|
|
45
|
-
onDeleteComment,
|
|
46
|
-
onDeleteThread,
|
|
47
|
-
currentAuthor,
|
|
48
|
-
colSpan,
|
|
49
|
-
viewMode,
|
|
50
|
-
side,
|
|
51
|
-
currentCode,
|
|
52
|
-
} = props;
|
|
53
|
-
const [showReply, setShowReply] = useState(false);
|
|
54
|
-
const [isCollapsed, setIsCollapsed] = useState(isThreadResolved(thread));
|
|
55
|
-
|
|
56
|
-
const isOutdated =
|
|
57
|
-
thread.anchorContent && currentCode && thread.anchorContent !== currentCode;
|
|
58
|
-
|
|
59
|
-
if (isCollapsed) {
|
|
60
|
-
const collapsedContent = (
|
|
61
|
-
<td colSpan={colSpan} className='px-4 py-2 border-l border-border'>
|
|
62
|
-
<button
|
|
63
|
-
onClick={() => setIsCollapsed(false)}
|
|
64
|
-
className='thread-card flex items-center gap-2 text-xs text-text-muted hover:text-text-secondary transition-colors cursor-pointer rounded'
|
|
65
|
-
>
|
|
66
|
-
<CommentIcon className='w-4 h-4' />
|
|
67
|
-
<span>
|
|
68
|
-
{thread.comments.length} comment
|
|
69
|
-
{thread.comments.length !== 1 ? 's' : ''}
|
|
70
|
-
</span>
|
|
71
|
-
<StatusBadge status={thread.status} />
|
|
72
|
-
{isOutdated && <ThreadBadge variant='outdated' />}
|
|
73
|
-
</button>
|
|
74
|
-
</td>
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
if (viewMode === 'split') {
|
|
78
|
-
return (
|
|
79
|
-
<tr data-thread-id={thread.id}>
|
|
80
|
-
{side === 'old' ? (
|
|
81
|
-
<>
|
|
82
|
-
{collapsedContent}
|
|
83
|
-
<td colSpan={colSpan}></td>
|
|
84
|
-
</>
|
|
85
|
-
) : (
|
|
86
|
-
<>
|
|
87
|
-
<td colSpan={colSpan}></td>
|
|
88
|
-
{collapsedContent}
|
|
89
|
-
</>
|
|
90
|
-
)}
|
|
91
|
-
</tr>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return <tr data-thread-id={thread.id}>{collapsedContent}</tr>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const lineLabel =
|
|
99
|
-
thread.startLine === thread.endLine
|
|
100
|
-
? `Line ${thread.startLine}`
|
|
101
|
-
: `Lines ${thread.startLine}–${thread.endLine}`;
|
|
102
|
-
|
|
103
|
-
const resolved = isThreadResolved(thread);
|
|
104
|
-
|
|
105
|
-
const threadContent = (
|
|
106
|
-
<td
|
|
107
|
-
colSpan={colSpan}
|
|
108
|
-
className={cn('px-4 py-3', {
|
|
109
|
-
'border-l border-border': side === 'new' && viewMode === 'split',
|
|
110
|
-
})}
|
|
111
|
-
>
|
|
112
|
-
<div className='thread-card border border-border rounded-lg overflow-hidden max-w-[700px]'>
|
|
113
|
-
<div className='flex items-center justify-between px-3 py-1.5 bg-bg-secondary border-b border-border'>
|
|
114
|
-
<div className='flex items-center gap-2'>
|
|
115
|
-
<span className='text-[11px] text-text-muted font-mono'>
|
|
116
|
-
{lineLabel}
|
|
117
|
-
</span>
|
|
118
|
-
<StatusBadge status={thread.status} />
|
|
119
|
-
{isOutdated && <ThreadBadge variant='outdated' />}
|
|
120
|
-
</div>
|
|
121
|
-
<div className='flex items-center gap-1'>
|
|
122
|
-
{resolved ? (
|
|
123
|
-
<button
|
|
124
|
-
onClick={() => onUnresolve(thread.id)}
|
|
125
|
-
className='text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer'
|
|
126
|
-
>
|
|
127
|
-
Reopen
|
|
128
|
-
</button>
|
|
129
|
-
) : (
|
|
130
|
-
<button
|
|
131
|
-
onClick={() => {
|
|
132
|
-
onResolve(thread.id);
|
|
133
|
-
setIsCollapsed(true);
|
|
134
|
-
}}
|
|
135
|
-
className='text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer'
|
|
136
|
-
>
|
|
137
|
-
Resolve
|
|
138
|
-
</button>
|
|
139
|
-
)}
|
|
140
|
-
<button
|
|
141
|
-
onClick={() => setIsCollapsed(true)}
|
|
142
|
-
className='text-[11px] text-text-muted hover:text-text-secondary transition-colors cursor-pointer ml-2'
|
|
143
|
-
>
|
|
144
|
-
Collapse
|
|
145
|
-
</button>
|
|
146
|
-
<button
|
|
147
|
-
onClick={() => onDeleteThread(thread.id)}
|
|
148
|
-
className='text-text-muted hover:text-deleted transition-colors cursor-pointer ml-1'
|
|
149
|
-
title='Delete thread'
|
|
150
|
-
>
|
|
151
|
-
<TrashIcon className='w-3.5 h-3.5' />
|
|
152
|
-
</button>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
<div>
|
|
156
|
-
{thread.comments.map((comment) => (
|
|
157
|
-
<CommentBubble
|
|
158
|
-
key={comment.id}
|
|
159
|
-
comment={comment}
|
|
160
|
-
onDelete={() => onDeleteComment(thread.id, comment.id)}
|
|
161
|
-
/>
|
|
162
|
-
))}
|
|
163
|
-
</div>
|
|
164
|
-
{showReply ? (
|
|
165
|
-
<div className='px-3 py-2 border-t border-border'>
|
|
166
|
-
<CommentForm
|
|
167
|
-
onSubmit={(body) => {
|
|
168
|
-
onReply(thread.id, body, currentAuthor);
|
|
169
|
-
setShowReply(false);
|
|
170
|
-
}}
|
|
171
|
-
onCancel={() => setShowReply(false)}
|
|
172
|
-
placeholder='Reply...'
|
|
173
|
-
submitLabel='Reply'
|
|
174
|
-
/>
|
|
175
|
-
</div>
|
|
176
|
-
) : (
|
|
177
|
-
<div className='px-3 py-2 border-t border-border'>
|
|
178
|
-
<button
|
|
179
|
-
onClick={() => setShowReply(true)}
|
|
180
|
-
className='text-xs text-accent hover:text-accent-hover transition-colors cursor-pointer'
|
|
181
|
-
>
|
|
182
|
-
Reply
|
|
183
|
-
</button>
|
|
184
|
-
</div>
|
|
185
|
-
)}
|
|
186
|
-
</div>
|
|
187
|
-
</td>
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
if (viewMode === 'split') {
|
|
191
|
-
return (
|
|
192
|
-
<tr data-thread-id={thread.id}>
|
|
193
|
-
{side === 'old' ? (
|
|
194
|
-
<>
|
|
195
|
-
{threadContent}
|
|
196
|
-
<td colSpan={colSpan}></td>
|
|
197
|
-
</>
|
|
198
|
-
) : (
|
|
199
|
-
<>
|
|
200
|
-
<td colSpan={colSpan}></td>
|
|
201
|
-
{threadContent}
|
|
202
|
-
</>
|
|
203
|
-
)}
|
|
204
|
-
</tr>
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return <tr data-thread-id={thread.id}>{threadContent}</tr>;
|
|
209
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback, useRef } from 'react';
|
|
2
|
-
import { type Commit, fetchCommits } from '../lib/api';
|
|
3
|
-
|
|
4
|
-
interface CommitListProps {
|
|
5
|
-
initialCommits: Commit[];
|
|
6
|
-
initialHasMore: boolean;
|
|
7
|
-
onCommitClick: (hash: string) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function CommitList(props: CommitListProps) {
|
|
11
|
-
const { initialCommits, initialHasMore, onCommitClick } = props;
|
|
12
|
-
const [commits, setCommits] = useState(initialCommits);
|
|
13
|
-
const [hasMore, setHasMore] = useState(initialHasMore);
|
|
14
|
-
const [loading, setLoading] = useState(false);
|
|
15
|
-
const [search, setSearch] = useState('');
|
|
16
|
-
const searchTimeout = useRef<ReturnType<typeof setTimeout>>(null);
|
|
17
|
-
|
|
18
|
-
const handleSearch = useCallback((value: string) => {
|
|
19
|
-
setSearch(value);
|
|
20
|
-
|
|
21
|
-
if (searchTimeout.current) {
|
|
22
|
-
clearTimeout(searchTimeout.current);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
searchTimeout.current = setTimeout(async () => {
|
|
26
|
-
setLoading(true);
|
|
27
|
-
try {
|
|
28
|
-
const trimmed = value.trim();
|
|
29
|
-
const page = await fetchCommits(0, 10, trimmed || undefined);
|
|
30
|
-
setCommits(page.commits);
|
|
31
|
-
setHasMore(page.hasMore);
|
|
32
|
-
} finally {
|
|
33
|
-
setLoading(false);
|
|
34
|
-
}
|
|
35
|
-
}, 300);
|
|
36
|
-
}, []);
|
|
37
|
-
|
|
38
|
-
const loadMore = useCallback(async () => {
|
|
39
|
-
setLoading(true);
|
|
40
|
-
try {
|
|
41
|
-
const trimmed = search.trim();
|
|
42
|
-
const page = await fetchCommits(commits.length, 10, trimmed || undefined);
|
|
43
|
-
setCommits((prev) => [...prev, ...page.commits]);
|
|
44
|
-
setHasMore(page.hasMore);
|
|
45
|
-
} finally {
|
|
46
|
-
setLoading(false);
|
|
47
|
-
}
|
|
48
|
-
}, [commits.length, search]);
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div>
|
|
52
|
-
<div className="px-4 py-2 border-b border-border">
|
|
53
|
-
<input
|
|
54
|
-
type="text"
|
|
55
|
-
value={search}
|
|
56
|
-
onChange={(e) => handleSearch(e.target.value)}
|
|
57
|
-
placeholder="Search commits..."
|
|
58
|
-
className="w-full text-sm bg-bg border border-border rounded-md px-3 py-1.5 text-text placeholder:text-text-muted focus:outline-none focus:border-accent"
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
{commits.length === 0 ? (
|
|
62
|
-
<p className="text-sm text-text-muted px-4 py-3">
|
|
63
|
-
{search ? 'No matching commits' : 'No recent commits'}
|
|
64
|
-
</p>
|
|
65
|
-
) : (
|
|
66
|
-
<ul className="divide-y divide-border">
|
|
67
|
-
{commits.map((commit) => (
|
|
68
|
-
<li key={commit.hash}>
|
|
69
|
-
<button
|
|
70
|
-
onClick={() => onCommitClick(commit.hash)}
|
|
71
|
-
className="w-full text-left px-4 py-3 hover:bg-bg-tertiary transition-colors flex items-center gap-3"
|
|
72
|
-
>
|
|
73
|
-
<code className="text-xs font-mono text-accent shrink-0">
|
|
74
|
-
{commit.shortHash}
|
|
75
|
-
</code>
|
|
76
|
-
<span className="text-sm text-text truncate flex-1">
|
|
77
|
-
{commit.message}
|
|
78
|
-
</span>
|
|
79
|
-
<span className="text-xs text-text-muted shrink-0">
|
|
80
|
-
{commit.relativeDate}
|
|
81
|
-
</span>
|
|
82
|
-
</button>
|
|
83
|
-
</li>
|
|
84
|
-
))}
|
|
85
|
-
</ul>
|
|
86
|
-
)}
|
|
87
|
-
{hasMore && (
|
|
88
|
-
<div className="px-4 py-3 border-t border-border">
|
|
89
|
-
<button
|
|
90
|
-
onClick={loadMore}
|
|
91
|
-
disabled={loading}
|
|
92
|
-
className="text-sm text-accent hover:text-accent/80 transition-colors disabled:opacity-50"
|
|
93
|
-
>
|
|
94
|
-
{loading ? 'Loading...' : 'Load more'}
|
|
95
|
-
</button>
|
|
96
|
-
</div>
|
|
97
|
-
)}
|
|
98
|
-
</div>
|
|
99
|
-
);
|
|
100
|
-
}
|