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.
Files changed (478) hide show
  1. package/dist/index.js +1081 -0
  2. package/dist/ui/assets/abap-BdImnpbu.js +1 -0
  3. package/dist/ui/assets/actionscript-3-CoDkCxhg.js +1 -0
  4. package/dist/ui/assets/ada-bCR0ucgS.js +1 -0
  5. package/dist/ui/assets/andromeeda-C4gqWexZ.js +1 -0
  6. package/dist/ui/assets/angular-html-DA-rfuFy.js +1 -0
  7. package/dist/ui/assets/angular-ts-BrjP3tb8.js +1 -0
  8. package/dist/ui/assets/apache-Pmp26Uib.js +1 -0
  9. package/dist/ui/assets/apex-D8_7TLub.js +1 -0
  10. package/dist/ui/assets/apl-CORt7UWP.js +1 -0
  11. package/dist/ui/assets/applescript-Co6uUVPk.js +1 -0
  12. package/dist/ui/assets/ara-BRHolxvo.js +1 -0
  13. package/dist/ui/assets/asciidoc-Ve4PFQV2.js +1 -0
  14. package/dist/ui/assets/asm-D_Q5rh1f.js +1 -0
  15. package/dist/ui/assets/astro-HNnZUWAn.js +1 -0
  16. package/dist/ui/assets/aurora-x-D-2ljcwZ.js +1 -0
  17. package/dist/ui/assets/awk-DMzUqQB5.js +1 -0
  18. package/dist/ui/assets/ayu-dark-DYE7WIF3.js +1 -0
  19. package/dist/ui/assets/ayu-light-BA47KaF1.js +1 -0
  20. package/dist/ui/assets/ayu-mirage-32ctXXKs.js +1 -0
  21. package/dist/ui/assets/ballerina-BFfxhgS-.js +1 -0
  22. package/dist/ui/assets/bat-BkioyH1T.js +1 -0
  23. package/dist/ui/assets/beancount-k_qm7-4y.js +1 -0
  24. package/dist/ui/assets/berry-uYugtg8r.js +1 -0
  25. package/dist/ui/assets/bibtex-CHM0blh-.js +1 -0
  26. package/dist/ui/assets/bicep-Bmn6On1c.js +1 -0
  27. package/dist/ui/assets/bird2-BIv1doCn.js +1 -0
  28. package/dist/ui/assets/blade-BjGOyj-B.js +1 -0
  29. package/dist/ui/assets/bsl-BO_Y6i37.js +1 -0
  30. package/dist/ui/assets/c-BIGW1oBm.js +1 -0
  31. package/dist/ui/assets/c3-eo99z4R2.js +1 -0
  32. package/dist/ui/assets/cadence-Bv_4Rxtq.js +1 -0
  33. package/dist/ui/assets/cairo-KRGpt6FW.js +1 -0
  34. package/dist/ui/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  35. package/dist/ui/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  36. package/dist/ui/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  37. package/dist/ui/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  38. package/dist/ui/assets/clarity-D53aC0YG.js +1 -0
  39. package/dist/ui/assets/clojure-P80f7IUj.js +1 -0
  40. package/dist/ui/assets/cmake-D1j8_8rp.js +1 -0
  41. package/dist/ui/assets/cobol-nBiQ_Alo.js +1 -0
  42. package/dist/ui/assets/codeowners-Bp6g37R7.js +1 -0
  43. package/dist/ui/assets/codeql-DsOJ9woJ.js +1 -0
  44. package/dist/ui/assets/coffee-Ch7k5sss.js +1 -0
  45. package/dist/ui/assets/common-lisp-Cg-RD9OK.js +1 -0
  46. package/dist/ui/assets/coq-DkFqJrB1.js +1 -0
  47. package/dist/ui/assets/cpp-CofmeUqb.js +1 -0
  48. package/dist/ui/assets/crystal-DNxU26gB.js +1 -0
  49. package/dist/ui/assets/csharp-COcwbKMJ.js +1 -0
  50. package/dist/ui/assets/css-CLj8gQPS.js +1 -0
  51. package/dist/ui/assets/csv-fuZLfV_i.js +1 -0
  52. package/dist/ui/assets/cue-D82EKSYY.js +1 -0
  53. package/dist/ui/assets/cypher-COkxafJQ.js +1 -0
  54. package/dist/ui/assets/d-85-TOEBH.js +1 -0
  55. package/dist/ui/assets/dark-plus-C3mMm8J8.js +1 -0
  56. package/dist/ui/assets/dart-bE4Kk8sk.js +1 -0
  57. package/dist/ui/assets/dax-CEL-wOlO.js +1 -0
  58. package/dist/ui/assets/desktop-BmXAJ9_W.js +1 -0
  59. package/dist/ui/assets/diff-D97Zzqfu.js +1 -0
  60. package/dist/ui/assets/docker-BcOcwvcX.js +1 -0
  61. package/dist/ui/assets/dotenv-Da5cRb03.js +1 -0
  62. package/dist/ui/assets/dracula-BzJJZx-M.js +1 -0
  63. package/dist/ui/assets/dracula-soft-BXkSAIEj.js +1 -0
  64. package/dist/ui/assets/dream-maker-BtqSS_iP.js +1 -0
  65. package/dist/ui/assets/edge-FbVlp4U3.js +1 -0
  66. package/dist/ui/assets/elixir-CkH2-t6x.js +1 -0
  67. package/dist/ui/assets/elm-DbKCFpqz.js +1 -0
  68. package/dist/ui/assets/emacs-lisp-CXvaQtF9.js +1 -0
  69. package/dist/ui/assets/erb-BYCe7drp.js +1 -0
  70. package/dist/ui/assets/erlang-DsQrWhSR.js +1 -0
  71. package/dist/ui/assets/everforest-dark-BgDCqdQA.js +1 -0
  72. package/dist/ui/assets/everforest-light-C8M2exoo.js +1 -0
  73. package/dist/ui/assets/fennel-BYunw83y.js +1 -0
  74. package/dist/ui/assets/fish-BvzEVeQv.js +1 -0
  75. package/dist/ui/assets/fluent-C4IJs8-o.js +1 -0
  76. package/dist/ui/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  77. package/dist/ui/assets/fortran-free-form-BxgE0vQu.js +1 -0
  78. package/dist/ui/assets/fsharp-CXgrBDvD.js +1 -0
  79. package/dist/ui/assets/gdresource-BOOCDP_w.js +1 -0
  80. package/dist/ui/assets/gdscript-C5YyOfLZ.js +1 -0
  81. package/dist/ui/assets/gdshader-DkwncUOv.js +1 -0
  82. package/dist/ui/assets/genie-D0YGMca9.js +1 -0
  83. package/dist/ui/assets/gherkin-DyxjwDmM.js +1 -0
  84. package/dist/ui/assets/git-commit-F4YmCXRG.js +1 -0
  85. package/dist/ui/assets/git-rebase-r7XF79zn.js +1 -0
  86. package/dist/ui/assets/github-dark-DHJKELXO.js +1 -0
  87. package/dist/ui/assets/github-dark-default-Cuk6v7N8.js +1 -0
  88. package/dist/ui/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  89. package/dist/ui/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  90. package/dist/ui/assets/github-light-DAi9KRSo.js +1 -0
  91. package/dist/ui/assets/github-light-default-D7oLnXFd.js +1 -0
  92. package/dist/ui/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  93. package/dist/ui/assets/gleam-BspZqrRM.js +1 -0
  94. package/dist/ui/assets/glimmer-js-ByusRIyA.js +1 -0
  95. package/dist/ui/assets/glimmer-ts-BfAWNZQY.js +1 -0
  96. package/dist/ui/assets/glsl-DplSGwfg.js +1 -0
  97. package/dist/ui/assets/gn-n2N0HUVH.js +1 -0
  98. package/dist/ui/assets/gnuplot-DdkO51Og.js +1 -0
  99. package/dist/ui/assets/go-C27-OAKa.js +1 -0
  100. package/dist/ui/assets/graphql-ChdNCCLP.js +1 -0
  101. package/dist/ui/assets/groovy-gcz8RCvz.js +1 -0
  102. package/dist/ui/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  103. package/dist/ui/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  104. package/dist/ui/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  105. package/dist/ui/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  106. package/dist/ui/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  107. package/dist/ui/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  108. package/dist/ui/assets/hack-i7_Ulhet.js +1 -0
  109. package/dist/ui/assets/haml-D5jkg6IW.js +1 -0
  110. package/dist/ui/assets/handlebars-BpdQsYii.js +1 -0
  111. package/dist/ui/assets/haskell-Df6bDoY_.js +1 -0
  112. package/dist/ui/assets/haxe-CzTSHFRz.js +1 -0
  113. package/dist/ui/assets/hcl-BWvSN4gD.js +1 -0
  114. package/dist/ui/assets/hjson-D5-asLiD.js +1 -0
  115. package/dist/ui/assets/hlsl-D3lLCCz7.js +1 -0
  116. package/dist/ui/assets/horizon-BUw7H-hv.js +1 -0
  117. package/dist/ui/assets/horizon-bright-CUuTKBJd.js +1 -0
  118. package/dist/ui/assets/houston-DnULxvSX.js +1 -0
  119. package/dist/ui/assets/html-derivative-DlHx6ybY.js +1 -0
  120. package/dist/ui/assets/html-pp8916En.js +1 -0
  121. package/dist/ui/assets/http-jrhK8wxY.js +1 -0
  122. package/dist/ui/assets/hurl-irOxFIW8.js +1 -0
  123. package/dist/ui/assets/hxml-Bvhsp5Yf.js +1 -0
  124. package/dist/ui/assets/hy-DFXneXwc.js +1 -0
  125. package/dist/ui/assets/imba-DGztddWO.js +1 -0
  126. package/dist/ui/assets/index-B2RHRT_g.css +1 -0
  127. package/dist/ui/assets/index-BUq0B-nJ.js +198 -0
  128. package/dist/ui/assets/ini-BEwlwnbL.js +1 -0
  129. package/dist/ui/assets/java-CylS5w8V.js +1 -0
  130. package/dist/ui/assets/javascript-wDzz0qaB.js +1 -0
  131. package/dist/ui/assets/jinja-f2NsQr07.js +1 -0
  132. package/dist/ui/assets/jison-wvAkD_A8.js +1 -0
  133. package/dist/ui/assets/json-Cp-IABpG.js +1 -0
  134. package/dist/ui/assets/json5-C9tS-k6U.js +1 -0
  135. package/dist/ui/assets/jsonc-Des-eS-w.js +1 -0
  136. package/dist/ui/assets/jsonl-DcaNXYhu.js +1 -0
  137. package/dist/ui/assets/jsonnet-DFQXde-d.js +1 -0
  138. package/dist/ui/assets/jssm-C2t-YnRu.js +1 -0
  139. package/dist/ui/assets/jsx-g9-lgVsj.js +1 -0
  140. package/dist/ui/assets/julia-CxzCAyBv.js +1 -0
  141. package/dist/ui/assets/just-VxiPbLrw.js +1 -0
  142. package/dist/ui/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  143. package/dist/ui/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  144. package/dist/ui/assets/kanagawa-wave-DWedfzmr.js +1 -0
  145. package/dist/ui/assets/kdl-DV7GczEv.js +1 -0
  146. package/dist/ui/assets/kotlin-BdnUsdx6.js +1 -0
  147. package/dist/ui/assets/kusto-wEQ09or8.js +1 -0
  148. package/dist/ui/assets/laserwave-DUszq2jm.js +1 -0
  149. package/dist/ui/assets/latex-CWtU0Tv5.js +1 -0
  150. package/dist/ui/assets/lean-BZvkOJ9d.js +1 -0
  151. package/dist/ui/assets/less-B1dDrJ26.js +1 -0
  152. package/dist/ui/assets/light-plus-B7mTdjB0.js +1 -0
  153. package/dist/ui/assets/liquid-C0sCDyMI.js +1 -0
  154. package/dist/ui/assets/llvm-DjAJT7YJ.js +1 -0
  155. package/dist/ui/assets/log-2UxHyX5q.js +1 -0
  156. package/dist/ui/assets/logo-BtOb2qkB.js +1 -0
  157. package/dist/ui/assets/lua-BaeVxFsk.js +1 -0
  158. package/dist/ui/assets/luau-C-HG3fhB.js +1 -0
  159. package/dist/ui/assets/make-CHLpvVh8.js +1 -0
  160. package/dist/ui/assets/markdown-Cvjx9yec.js +1 -0
  161. package/dist/ui/assets/marko-DjSrsDqO.js +1 -0
  162. package/dist/ui/assets/material-theme-D5KoaKCx.js +1 -0
  163. package/dist/ui/assets/material-theme-darker-BfHTSMKl.js +1 -0
  164. package/dist/ui/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  165. package/dist/ui/assets/material-theme-ocean-CyktbL80.js +1 -0
  166. package/dist/ui/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  167. package/dist/ui/assets/matlab-D7o27uSR.js +1 -0
  168. package/dist/ui/assets/mdc-DTYItulj.js +1 -0
  169. package/dist/ui/assets/mdx-Cmh6b_Ma.js +1 -0
  170. package/dist/ui/assets/mermaid-mWjccvbQ.js +1 -0
  171. package/dist/ui/assets/min-dark-CafNBF8u.js +1 -0
  172. package/dist/ui/assets/min-light-CTRr51gU.js +1 -0
  173. package/dist/ui/assets/mipsasm-CKIfxQSi.js +1 -0
  174. package/dist/ui/assets/mojo-rZm6bMo-.js +1 -0
  175. package/dist/ui/assets/monokai-D4h5O-jR.js +1 -0
  176. package/dist/ui/assets/moonbit-_H4v1dQx.js +1 -0
  177. package/dist/ui/assets/move-IF9eRakj.js +1 -0
  178. package/dist/ui/assets/narrat-DRg8JJMk.js +1 -0
  179. package/dist/ui/assets/nextflow-C-mBbutL.js +1 -0
  180. package/dist/ui/assets/nextflow-groovy-vE_lwT2v.js +1 -0
  181. package/dist/ui/assets/nginx-BpAMiNFr.js +1 -0
  182. package/dist/ui/assets/night-owl-C39BiMTA.js +1 -0
  183. package/dist/ui/assets/night-owl-light-CMTm3GFP.js +1 -0
  184. package/dist/ui/assets/nim-BIad80T-.js +1 -0
  185. package/dist/ui/assets/nix-CwoSXNpI.js +1 -0
  186. package/dist/ui/assets/nord-Ddv68eIx.js +1 -0
  187. package/dist/ui/assets/nushell-Cz2AlsmD.js +1 -0
  188. package/dist/ui/assets/objective-c-DXmwc3jG.js +1 -0
  189. package/dist/ui/assets/objective-cpp-CLxacb5B.js +1 -0
  190. package/dist/ui/assets/ocaml-C0hk2d4L.js +1 -0
  191. package/dist/ui/assets/odin-BBf5iR-q.js +1 -0
  192. package/dist/ui/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  193. package/dist/ui/assets/one-light-C3Wv6jpd.js +1 -0
  194. package/dist/ui/assets/openscad-C4EeE6gA.js +1 -0
  195. package/dist/ui/assets/pascal-D93ZcfNL.js +1 -0
  196. package/dist/ui/assets/perl-NvoQZIq0.js +1 -0
  197. package/dist/ui/assets/php-R6g_5hLQ.js +1 -0
  198. package/dist/ui/assets/pkl-u5AG7uiY.js +1 -0
  199. package/dist/ui/assets/plastic-3e1v2bzS.js +1 -0
  200. package/dist/ui/assets/plsql-ChMvpjG-.js +1 -0
  201. package/dist/ui/assets/po-BTJTHyun.js +1 -0
  202. package/dist/ui/assets/poimandres-CS3Unz2-.js +1 -0
  203. package/dist/ui/assets/polar-C0HS_06l.js +1 -0
  204. package/dist/ui/assets/postcss-CXtECtnM.js +1 -0
  205. package/dist/ui/assets/powerquery-CEu0bR-o.js +1 -0
  206. package/dist/ui/assets/powershell-Dpen1YoG.js +1 -0
  207. package/dist/ui/assets/prisma-Dd19v3D-.js +1 -0
  208. package/dist/ui/assets/prolog-CbFg5uaA.js +1 -0
  209. package/dist/ui/assets/proto-C7zT0LnQ.js +1 -0
  210. package/dist/ui/assets/pug-DKIMFp6K.js +1 -0
  211. package/dist/ui/assets/puppet-BMWR74SV.js +1 -0
  212. package/dist/ui/assets/purescript-CklMAg4u.js +1 -0
  213. package/dist/ui/assets/python-B6aJPvgy.js +1 -0
  214. package/dist/ui/assets/qml-3beO22l8.js +1 -0
  215. package/dist/ui/assets/qmldir-C8lEn-DE.js +1 -0
  216. package/dist/ui/assets/qss-IeuSbFQv.js +1 -0
  217. package/dist/ui/assets/r-Dspwwk_N.js +1 -0
  218. package/dist/ui/assets/racket-BqYA7rlc.js +1 -0
  219. package/dist/ui/assets/raku-DXvB9xmW.js +1 -0
  220. package/dist/ui/assets/razor-BDqjjVU7.js +1 -0
  221. package/dist/ui/assets/red-bN70gL4F.js +1 -0
  222. package/dist/ui/assets/reg-C-SQnVFl.js +1 -0
  223. package/dist/ui/assets/regexp-CDVJQ6XC.js +1 -0
  224. package/dist/ui/assets/rel-C3B-1QV4.js +1 -0
  225. package/dist/ui/assets/riscv-BM1_JUlF.js +1 -0
  226. package/dist/ui/assets/ron-D8l8udqQ.js +1 -0
  227. package/dist/ui/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  228. package/dist/ui/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  229. package/dist/ui/assets/rose-pine-qdsjHGoJ.js +1 -0
  230. package/dist/ui/assets/rosmsg-BJDFO7_C.js +1 -0
  231. package/dist/ui/assets/rst-CRjBmOyv.js +1 -0
  232. package/dist/ui/assets/ruby-Wjq7vjNf.js +1 -0
  233. package/dist/ui/assets/rust-B1yitclQ.js +1 -0
  234. package/dist/ui/assets/sas-cz2c8ADy.js +1 -0
  235. package/dist/ui/assets/sass-Cj5Yp3dK.js +1 -0
  236. package/dist/ui/assets/scala-C151Ov-r.js +1 -0
  237. package/dist/ui/assets/scheme-C98Dy4si.js +1 -0
  238. package/dist/ui/assets/scss-D5BDwBP9.js +1 -0
  239. package/dist/ui/assets/sdbl-DVxCFoDh.js +1 -0
  240. package/dist/ui/assets/shaderlab-Dg9Lc6iA.js +1 -0
  241. package/dist/ui/assets/shellscript-Yzrsuije.js +1 -0
  242. package/dist/ui/assets/shellsession-BADoaaVG.js +1 -0
  243. package/dist/ui/assets/slack-dark-BthQWCQV.js +1 -0
  244. package/dist/ui/assets/slack-ochin-DqwNpetd.js +1 -0
  245. package/dist/ui/assets/smalltalk-BERRCDM3.js +1 -0
  246. package/dist/ui/assets/snazzy-light-Bw305WKR.js +1 -0
  247. package/dist/ui/assets/solarized-dark-DXbdFlpD.js +1 -0
  248. package/dist/ui/assets/solarized-light-L9t79GZl.js +1 -0
  249. package/dist/ui/assets/solidity-rGO070M0.js +1 -0
  250. package/dist/ui/assets/soy-8wufbnw4.js +1 -0
  251. package/dist/ui/assets/sparql-rVzFXLq3.js +1 -0
  252. package/dist/ui/assets/splunk-BtCnVYZw.js +1 -0
  253. package/dist/ui/assets/sql-BLtJtn59.js +1 -0
  254. package/dist/ui/assets/ssh-config-_ykCGR6B.js +1 -0
  255. package/dist/ui/assets/stata-BH5u7GGu.js +1 -0
  256. package/dist/ui/assets/stylus-BEDo0Tqx.js +1 -0
  257. package/dist/ui/assets/surrealql-Bq5Q-fJD.js +1 -0
  258. package/dist/ui/assets/svelte-Cy7k_4gC.js +1 -0
  259. package/dist/ui/assets/swift-D82vCrfD.js +1 -0
  260. package/dist/ui/assets/synthwave-84-CbfX1IO0.js +1 -0
  261. package/dist/ui/assets/system-verilog-CnnmHF94.js +1 -0
  262. package/dist/ui/assets/systemd-4A_iFExJ.js +1 -0
  263. package/dist/ui/assets/talonscript-CkByrt1z.js +1 -0
  264. package/dist/ui/assets/tasl-QIJgUcNo.js +1 -0
  265. package/dist/ui/assets/tcl-dwOrl1Do.js +1 -0
  266. package/dist/ui/assets/templ-DhtptRzy.js +1 -0
  267. package/dist/ui/assets/terraform-BETggiCN.js +1 -0
  268. package/dist/ui/assets/tex-idrVyKtj.js +1 -0
  269. package/dist/ui/assets/tokyo-night-hegEt444.js +1 -0
  270. package/dist/ui/assets/toml-vGWfd6FD.js +1 -0
  271. package/dist/ui/assets/ts-tags-DQrlYJgV.js +1 -0
  272. package/dist/ui/assets/tsv-B_m7g4N7.js +1 -0
  273. package/dist/ui/assets/tsx-COt5Ahok.js +1 -0
  274. package/dist/ui/assets/turtle-BsS91CYL.js +1 -0
  275. package/dist/ui/assets/twig-xg9kU7Mw.js +1 -0
  276. package/dist/ui/assets/typescript-BPQ3VLAy.js +1 -0
  277. package/dist/ui/assets/typespec-CAFt9gP4.js +1 -0
  278. package/dist/ui/assets/typst-DHCkPAjA.js +1 -0
  279. package/dist/ui/assets/v-BcVCzyr7.js +1 -0
  280. package/dist/ui/assets/vala-CsfeWuGM.js +1 -0
  281. package/dist/ui/assets/vb-D17OF-Vu.js +1 -0
  282. package/dist/ui/assets/verilog-BQ8w6xss.js +1 -0
  283. package/dist/ui/assets/vesper-DU1UobuO.js +1 -0
  284. package/dist/ui/assets/vhdl-CeAyd5Ju.js +1 -0
  285. package/dist/ui/assets/viml-CJc9bBzg.js +1 -0
  286. package/dist/ui/assets/vitesse-black-Bkuqu6BP.js +1 -0
  287. package/dist/ui/assets/vitesse-dark-D0r3Knsf.js +1 -0
  288. package/dist/ui/assets/vitesse-light-CVO1_9PV.js +1 -0
  289. package/dist/ui/assets/vue-D2xRrEX4.js +1 -0
  290. package/dist/ui/assets/vue-html-AaS7Mt5G.js +1 -0
  291. package/dist/ui/assets/vue-vine-BoDAl6tE.js +1 -0
  292. package/dist/ui/assets/vyper-CDx5xZoG.js +1 -0
  293. package/dist/ui/assets/wasm-CG6Dc4jp.js +1 -0
  294. package/dist/ui/assets/wasm-MzD3tlZU.js +1 -0
  295. package/dist/ui/assets/wenyan-BV7otONQ.js +1 -0
  296. package/dist/ui/assets/wgsl-Dx-B1_4e.js +1 -0
  297. package/dist/ui/assets/wikitext-BhOHFoWU.js +1 -0
  298. package/dist/ui/assets/wit-5i3qLPDT.js +1 -0
  299. package/dist/ui/assets/wolfram-lXgVvXCa.js +1 -0
  300. package/dist/ui/assets/xml-sdJ4AIDG.js +1 -0
  301. package/dist/ui/assets/xsl-CtQFsRM5.js +1 -0
  302. package/dist/ui/assets/yaml-Buea-lGh.js +1 -0
  303. package/dist/ui/assets/zenscript-DVFEvuxE.js +1 -0
  304. package/dist/ui/assets/zig-VOosw3JB.js +1 -0
  305. package/{packages → dist}/ui/index.html +2 -1
  306. package/package.json +37 -18
  307. package/.claude/settings.local.json +0 -11
  308. package/LICENSE +0 -21
  309. package/README.md +0 -71
  310. package/development.md +0 -156
  311. package/packages/cli/build.js +0 -38
  312. package/packages/cli/package.json +0 -51
  313. package/packages/cli/src/agent.ts +0 -187
  314. package/packages/cli/src/db.ts +0 -58
  315. package/packages/cli/src/index.ts +0 -196
  316. package/packages/cli/src/review-routes.ts +0 -150
  317. package/packages/cli/src/server.ts +0 -370
  318. package/packages/cli/src/session.ts +0 -48
  319. package/packages/cli/src/threads.ts +0 -238
  320. package/packages/cli/tsconfig.json +0 -13
  321. package/packages/git/package.json +0 -24
  322. package/packages/git/src/commits.ts +0 -28
  323. package/packages/git/src/diff.ts +0 -97
  324. package/packages/git/src/exec.ts +0 -35
  325. package/packages/git/src/index.ts +0 -5
  326. package/packages/git/src/repo.ts +0 -63
  327. package/packages/git/src/status.ts +0 -9
  328. package/packages/git/src/types.ts +0 -12
  329. package/packages/git/tsconfig.json +0 -9
  330. package/packages/parser/package.json +0 -26
  331. package/packages/parser/src/index.ts +0 -12
  332. package/packages/parser/src/parse.ts +0 -299
  333. package/packages/parser/src/types.ts +0 -52
  334. package/packages/parser/src/word-diff.ts +0 -155
  335. package/packages/parser/tests/fixtures/binary-deleted.diff +0 -4
  336. package/packages/parser/tests/fixtures/binary-file.diff +0 -4
  337. package/packages/parser/tests/fixtures/binary-modified.diff +0 -3
  338. package/packages/parser/tests/fixtures/copied-file.diff +0 -12
  339. package/packages/parser/tests/fixtures/deleted-file.diff +0 -9
  340. package/packages/parser/tests/fixtures/empty.diff +0 -0
  341. package/packages/parser/tests/fixtures/hunk-with-context.diff +0 -12
  342. package/packages/parser/tests/fixtures/mode-change-with-content.diff +0 -10
  343. package/packages/parser/tests/fixtures/mode-change.diff +0 -3
  344. package/packages/parser/tests/fixtures/multi-file.diff +0 -22
  345. package/packages/parser/tests/fixtures/new-file.diff +0 -9
  346. package/packages/parser/tests/fixtures/no-newline.diff +0 -10
  347. package/packages/parser/tests/fixtures/renamed-file.diff +0 -12
  348. package/packages/parser/tests/fixtures/single-file-additions.diff +0 -11
  349. package/packages/parser/tests/fixtures/single-file-deletions.diff +0 -11
  350. package/packages/parser/tests/fixtures/single-file-mixed.diff +0 -15
  351. package/packages/parser/tests/fixtures/single-file-multi-hunk.diff +0 -22
  352. package/packages/parser/tests/fixtures/spaces-in-path.diff +0 -9
  353. package/packages/parser/tests/fixtures/submodule.diff +0 -7
  354. package/packages/parser/tests/fixtures/unicode-content.diff +0 -11
  355. package/packages/parser/tests/parse.test.ts +0 -312
  356. package/packages/parser/tests/word-diff-integration.test.ts +0 -52
  357. package/packages/parser/tests/word-diff.test.ts +0 -121
  358. package/packages/parser/tsconfig.json +0 -10
  359. package/packages/skills/diffity-resolve/SKILL.md +0 -55
  360. package/packages/skills/diffity-review/SKILL.md +0 -74
  361. package/packages/skills/diffity-start/SKILL.md +0 -25
  362. package/packages/ui/package.json +0 -35
  363. package/packages/ui/src/app.tsx +0 -14
  364. package/packages/ui/src/components/comment-bubble.tsx +0 -78
  365. package/packages/ui/src/components/comment-form-row.tsx +0 -58
  366. package/packages/ui/src/components/comment-form.tsx +0 -78
  367. package/packages/ui/src/components/comment-line-number.tsx +0 -60
  368. package/packages/ui/src/components/comment-thread.tsx +0 -209
  369. package/packages/ui/src/components/commit-list.tsx +0 -100
  370. package/packages/ui/src/components/dashboard.tsx +0 -84
  371. package/packages/ui/src/components/diff-line.tsx +0 -90
  372. package/packages/ui/src/components/diff-page.tsx +0 -332
  373. package/packages/ui/src/components/diff-stats.tsx +0 -20
  374. package/packages/ui/src/components/diff-view.tsx +0 -278
  375. package/packages/ui/src/components/expand-row.tsx +0 -45
  376. package/packages/ui/src/components/file-block.tsx +0 -536
  377. package/packages/ui/src/components/file-tree-item.tsx +0 -84
  378. package/packages/ui/src/components/file-tree.tsx +0 -72
  379. package/packages/ui/src/components/general-comments.tsx +0 -174
  380. package/packages/ui/src/components/hunk-block-split.tsx +0 -357
  381. package/packages/ui/src/components/hunk-block.tsx +0 -161
  382. package/packages/ui/src/components/hunk-header.tsx +0 -144
  383. package/packages/ui/src/components/hunk-with-gap.tsx +0 -113
  384. package/packages/ui/src/components/icons/arrow-down-icon.tsx +0 -7
  385. package/packages/ui/src/components/icons/arrow-up-icon.tsx +0 -7
  386. package/packages/ui/src/components/icons/check-circle-icon.tsx +0 -8
  387. package/packages/ui/src/components/icons/check-icon.tsx +0 -9
  388. package/packages/ui/src/components/icons/chevron-down-icon.tsx +0 -11
  389. package/packages/ui/src/components/icons/chevron-icon.tsx +0 -20
  390. package/packages/ui/src/components/icons/chevron-up-down-icon.tsx +0 -7
  391. package/packages/ui/src/components/icons/chevron-up-icon.tsx +0 -11
  392. package/packages/ui/src/components/icons/comment-icon.tsx +0 -9
  393. package/packages/ui/src/components/icons/copy-icon.tsx +0 -10
  394. package/packages/ui/src/components/icons/eye-icon.tsx +0 -10
  395. package/packages/ui/src/components/icons/eye-off-icon.tsx +0 -12
  396. package/packages/ui/src/components/icons/file-icon.tsx +0 -7
  397. package/packages/ui/src/components/icons/folder-icon.tsx +0 -19
  398. package/packages/ui/src/components/icons/git-branch-icon.tsx +0 -13
  399. package/packages/ui/src/components/icons/keyboard-icon.tsx +0 -13
  400. package/packages/ui/src/components/icons/moon-icon.tsx +0 -9
  401. package/packages/ui/src/components/icons/plus-icon.tsx +0 -9
  402. package/packages/ui/src/components/icons/search-icon.tsx +0 -10
  403. package/packages/ui/src/components/icons/sidebar-icon.tsx +0 -10
  404. package/packages/ui/src/components/icons/spinner.tsx +0 -7
  405. package/packages/ui/src/components/icons/split-view-icon.tsx +0 -10
  406. package/packages/ui/src/components/icons/sun-icon.tsx +0 -17
  407. package/packages/ui/src/components/icons/trash-icon.tsx +0 -11
  408. package/packages/ui/src/components/icons/undo-icon.tsx +0 -9
  409. package/packages/ui/src/components/icons/unified-view-icon.tsx +0 -12
  410. package/packages/ui/src/components/icons/x-icon.tsx +0 -10
  411. package/packages/ui/src/components/line-number-cell.tsx +0 -18
  412. package/packages/ui/src/components/markdown-content.tsx +0 -139
  413. package/packages/ui/src/components/orphaned-threads.tsx +0 -80
  414. package/packages/ui/src/components/overview-file-list.tsx +0 -57
  415. package/packages/ui/src/components/render-expansion-rows.tsx +0 -47
  416. package/packages/ui/src/components/shortcut-modal.tsx +0 -93
  417. package/packages/ui/src/components/sidebar.tsx +0 -80
  418. package/packages/ui/src/components/skeleton.tsx +0 -9
  419. package/packages/ui/src/components/stale-diff-banner.tsx +0 -21
  420. package/packages/ui/src/components/summary-bar.tsx +0 -39
  421. package/packages/ui/src/components/toolbar.tsx +0 -246
  422. package/packages/ui/src/components/ui/badge.tsx +0 -17
  423. package/packages/ui/src/components/ui/confirm-dialog.tsx +0 -52
  424. package/packages/ui/src/components/ui/icon-button.tsx +0 -23
  425. package/packages/ui/src/components/ui/status-badge.tsx +0 -57
  426. package/packages/ui/src/components/ui/thread-badge.tsx +0 -35
  427. package/packages/ui/src/components/word-diff.tsx +0 -126
  428. package/packages/ui/src/hooks/use-comment-actions.ts +0 -97
  429. package/packages/ui/src/hooks/use-commits.ts +0 -12
  430. package/packages/ui/src/hooks/use-copy.ts +0 -18
  431. package/packages/ui/src/hooks/use-diff-staleness.ts +0 -58
  432. package/packages/ui/src/hooks/use-diff.ts +0 -12
  433. package/packages/ui/src/hooks/use-highlighter.ts +0 -190
  434. package/packages/ui/src/hooks/use-info.ts +0 -12
  435. package/packages/ui/src/hooks/use-keyboard.ts +0 -55
  436. package/packages/ui/src/hooks/use-line-selection.ts +0 -157
  437. package/packages/ui/src/hooks/use-overview.ts +0 -12
  438. package/packages/ui/src/hooks/use-review-threads.ts +0 -12
  439. package/packages/ui/src/hooks/use-search-params.ts +0 -26
  440. package/packages/ui/src/hooks/use-theme.ts +0 -34
  441. package/packages/ui/src/hooks/use-thread-navigation.ts +0 -43
  442. package/packages/ui/src/lib/api.ts +0 -232
  443. package/packages/ui/src/lib/cn.ts +0 -6
  444. package/packages/ui/src/lib/context-expansion.ts +0 -122
  445. package/packages/ui/src/lib/diff-utils.ts +0 -268
  446. package/packages/ui/src/lib/dom-utils.ts +0 -13
  447. package/packages/ui/src/lib/file-tree.ts +0 -122
  448. package/packages/ui/src/lib/query-client.ts +0 -10
  449. package/packages/ui/src/lib/render-content.tsx +0 -23
  450. package/packages/ui/src/lib/syntax-token.ts +0 -4
  451. package/packages/ui/src/main.tsx +0 -14
  452. package/packages/ui/src/queries/commits.ts +0 -9
  453. package/packages/ui/src/queries/diff.ts +0 -9
  454. package/packages/ui/src/queries/file.ts +0 -10
  455. package/packages/ui/src/queries/info.ts +0 -9
  456. package/packages/ui/src/queries/overview.ts +0 -9
  457. package/packages/ui/src/styles/app.css +0 -178
  458. package/packages/ui/src/types/comment.ts +0 -61
  459. package/packages/ui/src/vite-env.d.ts +0 -1
  460. package/packages/ui/tests/context-expansion.test.ts +0 -279
  461. package/packages/ui/tests/diff-utils.test.ts +0 -409
  462. package/packages/ui/tsconfig.json +0 -14
  463. package/packages/ui/vite.config.ts +0 -23
  464. package/scripts/build-skills.ts +0 -26
  465. package/scripts/build.ts +0 -15
  466. package/scripts/dev.ts +0 -32
  467. package/scripts/lib/transformers/claude-code.ts +0 -11
  468. package/scripts/lib/transformers/codex.ts +0 -17
  469. package/scripts/lib/transformers/cursor.ts +0 -17
  470. package/scripts/lib/transformers/index.ts +0 -3
  471. package/scripts/lib/utils.ts +0 -70
  472. package/scripts/link-dev.ts +0 -54
  473. package/skills/diffity-resolve/SKILL.md +0 -55
  474. package/skills/diffity-review/SKILL.md +0 -74
  475. package/skills/diffity-start/SKILL.md +0 -27
  476. package/tsconfig.json +0 -22
  477. /package/{packages/ui/public → dist/ui}/brand.svg +0 -0
  478. /package/{packages/ui/public → dist/ui}/favicon.svg +0 -0
@@ -1,187 +0,0 @@
1
- import type { Command } from 'commander';
2
- import pc from 'picocolors';
3
- import { isGitRepo } from '@diffity/git';
4
- import { getCurrentSession } from './session.js';
5
- import {
6
- createThread,
7
- getThreadsForSession,
8
- getThread,
9
- addReply,
10
- updateThreadStatus,
11
- type ThreadStatus,
12
- type Thread,
13
- } from './threads.js';
14
-
15
- function requireSession() {
16
- if (!isGitRepo()) {
17
- console.error(pc.red('Error: Not a git repository'));
18
- process.exit(1);
19
- }
20
-
21
- const session = getCurrentSession();
22
- if (!session) {
23
- console.error(pc.red('Error: No active review session.'));
24
- console.error(pc.dim('Start diffity first to create a session.'));
25
- process.exit(1);
26
- }
27
- return session;
28
- }
29
-
30
- function resolveThreadId(shortId: string, sessionId: string): Thread {
31
- const thread = getThread(shortId);
32
- if (!thread) {
33
- console.error(pc.red(`Error: Thread not found: ${shortId}`));
34
- process.exit(1);
35
- }
36
- if (thread.sessionId !== sessionId) {
37
- console.error(pc.red(`Error: Thread ${shortId} does not belong to current session`));
38
- process.exit(1);
39
- }
40
- return thread;
41
- }
42
-
43
- function formatThreadLine(thread: Thread): string {
44
- const shortId = thread.id.slice(0, 8);
45
- const isGeneral = thread.filePath === '__general__';
46
- const statusColor = thread.status === 'open' ? pc.yellow : thread.status === 'resolved' ? pc.green : thread.status === 'dismissed' ? pc.dim : pc.cyan;
47
- const statusLabel = statusColor(`[${thread.status}]`);
48
- const firstComment = thread.comments[0]?.body || '';
49
- const truncated = firstComment.length > 80 ? firstComment.slice(0, 77) + '...' : firstComment;
50
-
51
- if (isGeneral) {
52
- return `${statusLabel.padEnd(22)} ${pc.dim(shortId)} ${pc.bold('General comment')}\n${''.padEnd(15)}${pc.dim('"')}${truncated}${pc.dim('"')}`;
53
- }
54
-
55
- const lineRange = thread.startLine === thread.endLine
56
- ? `${thread.startLine}`
57
- : `${thread.startLine}-${thread.endLine}`;
58
- const location = `${thread.filePath}:${lineRange}`;
59
- const sideLabel = thread.side === 'old' ? '(old)' : '(new)';
60
-
61
- return `${statusLabel.padEnd(22)} ${pc.dim(shortId)} ${location} ${pc.dim(sideLabel)}\n${''.padEnd(15)}${pc.dim('"')}${truncated}${pc.dim('"')}`;
62
- }
63
-
64
- export function registerAgentCommands(program: Command): void {
65
- const agent = program
66
- .command('agent')
67
- .description('Agent commands for interacting with review comments')
68
- .addHelpText('after', `
69
- Examples:
70
- $ diffity agent list --status open --json
71
- $ diffity agent comment --file src/app.ts --line 42 --body "Missing null check"
72
- $ diffity agent resolve abc123 --summary "Added null check"
73
- $ diffity agent reply abc123 --body "Good catch, fixed"
74
- $ diffity agent general-comment --body "Overall this looks good, just a few nits"`);
75
-
76
- agent
77
- .command('list')
78
- .description('List comment threads in the current session (use --json for full details)')
79
- .option('--status <status>', 'Filter by status (open, resolved, dismissed)')
80
- .option('--json', 'Output as JSON')
81
- .action((opts) => {
82
- const validStatuses = ['open', 'resolved', 'dismissed'];
83
- if (opts.status && !validStatuses.includes(opts.status)) {
84
- console.error(pc.red(`Error: Invalid status "${opts.status}". Must be one of: ${validStatuses.join(', ')}`));
85
- process.exit(1);
86
- }
87
- const session = requireSession();
88
- const threads = getThreadsForSession(session.id, opts.status as ThreadStatus | undefined);
89
-
90
- if (opts.json) {
91
- console.log(JSON.stringify(threads, null, 2));
92
- return;
93
- }
94
-
95
- if (threads.length === 0) {
96
- console.log(pc.dim('No threads found.'));
97
- return;
98
- }
99
-
100
- for (const thread of threads) {
101
- console.log(formatThreadLine(thread));
102
- }
103
- });
104
-
105
- agent
106
- .command('comment')
107
- .description('Create a new comment thread')
108
- .requiredOption('--file <path>', 'File path (relative to repo root)')
109
- .requiredOption('--line <n>', 'Line number (1-indexed)', parseInt)
110
- .option('--end-line <n>', 'End line for multi-line comments (1-indexed)', parseInt)
111
- .option('--side <side>', 'Which side of the diff (new or old)', 'new')
112
- .requiredOption('--body <text>', 'Comment body')
113
- .action((opts) => {
114
- if (opts.side !== 'new' && opts.side !== 'old') {
115
- console.error(pc.red(`Error: Invalid side "${opts.side}". Must be "new" or "old"`));
116
- process.exit(1);
117
- }
118
- const session = requireSession();
119
- const endLine = opts.endLine ?? opts.line;
120
- const thread = createThread(
121
- session.id,
122
- opts.file,
123
- opts.side,
124
- opts.line,
125
- endLine,
126
- opts.body,
127
- { name: 'Agent', type: 'agent' },
128
- );
129
- console.log(pc.green(`Created thread ${thread.id.slice(0, 8)}`));
130
- });
131
-
132
- agent
133
- .command('resolve')
134
- .description('Resolve a thread (marks as fixed)')
135
- .argument('<thread-id>', 'Thread ID (or 8-char prefix)')
136
- .option('--summary <text>', 'What was done to resolve it')
137
- .action((id: string, opts) => {
138
- const session = requireSession();
139
- const thread = resolveThreadId(id, session.id);
140
- const author = opts.summary ? { name: 'Agent', type: 'agent' as const } : undefined;
141
- updateThreadStatus(thread.id, 'resolved', opts.summary, author);
142
- console.log(pc.green(`Resolved thread ${thread.id.slice(0, 8)}`));
143
- });
144
-
145
- agent
146
- .command('dismiss')
147
- .description('Dismiss a thread (marks as won\'t fix)')
148
- .argument('<thread-id>', 'Thread ID (or 8-char prefix)')
149
- .option('--reason <text>', 'Why the thread is being dismissed')
150
- .action((id: string, opts) => {
151
- const session = requireSession();
152
- const thread = resolveThreadId(id, session.id);
153
- const author = opts.reason ? { name: 'Agent', type: 'agent' as const } : undefined;
154
- updateThreadStatus(thread.id, 'dismissed', opts.reason, author);
155
- console.log(pc.green(`Dismissed thread ${thread.id.slice(0, 8)}`));
156
- });
157
-
158
- agent
159
- .command('reply')
160
- .description('Reply to a comment thread')
161
- .argument('<thread-id>', 'Thread ID (or 8-char prefix)')
162
- .requiredOption('--body <text>', 'Reply body')
163
- .action((id: string, opts) => {
164
- const session = requireSession();
165
- const thread = resolveThreadId(id, session.id);
166
- addReply(thread.id, opts.body, { name: 'Agent', type: 'agent' });
167
- console.log(pc.green(`Replied to thread ${thread.id.slice(0, 8)}`));
168
- });
169
-
170
- agent
171
- .command('general-comment')
172
- .description('Create a general comment on the entire diff (not tied to a specific file or line)')
173
- .requiredOption('--body <text>', 'Comment body')
174
- .action((opts) => {
175
- const session = requireSession();
176
- const thread = createThread(
177
- session.id,
178
- '__general__',
179
- 'new',
180
- 0,
181
- 0,
182
- opts.body,
183
- { name: 'Agent', type: 'agent' },
184
- );
185
- console.log(pc.green(`Created general comment ${thread.id.slice(0, 8)}`));
186
- });
187
- }
@@ -1,58 +0,0 @@
1
- import Database from 'better-sqlite3';
2
- import { join } from 'node:path';
3
- import { getDiffityDir } from '@diffity/git';
4
-
5
- let db: Database.Database | null = null;
6
-
7
- export function getDb(): Database.Database {
8
- if (db) {
9
- return db;
10
- }
11
-
12
- const dbPath = join(getDiffityDir(), 'reviews.db');
13
- db = new Database(dbPath);
14
- db.pragma('journal_mode = WAL');
15
- db.pragma('foreign_keys = ON');
16
- migrateDb(db);
17
- return db;
18
- }
19
-
20
- function migrateDb(db: Database.Database): void {
21
- db.exec(`
22
- CREATE TABLE IF NOT EXISTS review_sessions (
23
- id TEXT PRIMARY KEY,
24
- ref TEXT NOT NULL,
25
- head_hash TEXT NOT NULL,
26
- created_at TEXT NOT NULL DEFAULT (datetime('now'))
27
- );
28
-
29
- CREATE TABLE IF NOT EXISTS comment_threads (
30
- id TEXT PRIMARY KEY,
31
- session_id TEXT NOT NULL REFERENCES review_sessions(id),
32
- file_path TEXT NOT NULL,
33
- side TEXT NOT NULL,
34
- start_line INTEGER NOT NULL,
35
- end_line INTEGER NOT NULL,
36
- status TEXT NOT NULL DEFAULT 'open',
37
- anchor_content TEXT,
38
- created_at TEXT NOT NULL DEFAULT (datetime('now')),
39
- updated_at TEXT NOT NULL DEFAULT (datetime('now'))
40
- );
41
-
42
- CREATE TABLE IF NOT EXISTS comments (
43
- id TEXT PRIMARY KEY,
44
- thread_id TEXT NOT NULL REFERENCES comment_threads(id) ON DELETE CASCADE,
45
- author_name TEXT NOT NULL,
46
- author_type TEXT NOT NULL,
47
- body TEXT NOT NULL,
48
- created_at TEXT NOT NULL DEFAULT (datetime('now'))
49
- );
50
- `);
51
- }
52
-
53
- export function closeDb(): void {
54
- if (db) {
55
- db.close();
56
- db = null;
57
- }
58
- }
@@ -1,196 +0,0 @@
1
- import { Command } from 'commander';
2
- import { execSync } from 'node:child_process';
3
- import { rmSync, existsSync } from 'node:fs';
4
- import { join } from 'node:path';
5
- import { homedir } from 'node:os';
6
- import { createRequire } from 'node:module';
7
- import open from 'open';
8
- import pc from 'picocolors';
9
- import { isGitRepo } from '@diffity/git';
10
- import { startServer } from './server.js';
11
- import { registerAgentCommands } from './agent.js';
12
-
13
- const require = createRequire(import.meta.url);
14
- const pkg = require('../package.json');
15
-
16
- const program = new Command();
17
-
18
- program
19
- .name('diffity')
20
- .description('GitHub-style git diff viewer in the browser')
21
- .version(pkg.version)
22
- .argument('[refs...]', 'Git refs to diff (e.g. HEAD~3, main, main..feature)')
23
- .option('--port <port>', 'Port to use', '5391')
24
- .option('--no-open', 'Do not open browser automatically')
25
- .option('--quiet', 'Minimal terminal output')
26
- .option('--dark', 'Open in dark mode (default: light)')
27
- .option('--unified', 'Open in unified view (default: split)')
28
- .addHelpText('after', `
29
- Examples:
30
- $ diffity Working tree changes
31
- $ diffity HEAD~1 Last commit vs working tree
32
- $ diffity HEAD~3 Last 3 commits vs working tree
33
- $ diffity abc1234 Changes since a specific commit
34
- $ diffity main..feature Compare branches
35
- $ diffity main feature Same as main..feature
36
- $ diffity v1.0.0..v2.0.0 Compare tags`)
37
- .action(async (refs: string[], opts) => {
38
- if (!isGitRepo()) {
39
- console.error(pc.red('Error: Not a git repository'));
40
- process.exit(1);
41
- }
42
-
43
- const diffArgs: string[] = [];
44
- let description = '';
45
-
46
- if (refs.length === 1) {
47
- const ref = refs[0];
48
- if (ref.includes('..')) {
49
- diffArgs.push(ref);
50
- description = ref;
51
- } else {
52
- diffArgs.push(ref);
53
- description = `Changes from ${ref}`;
54
- }
55
- } else if (refs.length === 2) {
56
- diffArgs.push(`${refs[0]}..${refs[1]}`);
57
- description = `${refs[0]}..${refs[1]}`;
58
- } else {
59
- description = 'Unstaged changes';
60
- }
61
-
62
- const port = parseInt(opts.port, 10);
63
-
64
- let effectiveRef: string;
65
- if (refs.length > 0) {
66
- effectiveRef = refs.length === 2 ? `${refs[0]}..${refs[1]}` : refs[0];
67
- } else {
68
- effectiveRef = 'work';
69
- }
70
-
71
- try {
72
- const { port: actualPort, close } = await startServer({ port, diffArgs, description, effectiveRef });
73
- const urlParams = new URLSearchParams({ ref: effectiveRef });
74
- if (opts.dark) {
75
- urlParams.set('theme', 'dark');
76
- }
77
- if (opts.unified) {
78
- urlParams.set('view', 'unified');
79
- }
80
- const url = `http://localhost:${actualPort}/?${urlParams.toString()}`;
81
-
82
- if (!opts.quiet) {
83
- console.log('');
84
- console.log(pc.bold(' diffity'));
85
- console.log(` ${pc.dim(description)}`);
86
- console.log('');
87
- console.log(` ${pc.green('→')} ${pc.cyan(url)}`);
88
- console.log(` ${pc.dim('Press Ctrl+C to stop')}`);
89
- console.log('');
90
- }
91
-
92
- process.on('SIGINT', () => {
93
- if (!opts.quiet) {
94
- console.log(pc.dim('\n Shutting down...'));
95
- }
96
- close();
97
- process.exit(0);
98
- });
99
-
100
- process.on('SIGTERM', () => {
101
- close();
102
- process.exit(0);
103
- });
104
-
105
- if (opts.open !== false) {
106
- await open(url);
107
- }
108
- } catch (err) {
109
- console.error(pc.red(`Failed to start server: ${err}`));
110
- process.exit(1);
111
- }
112
- });
113
-
114
- program
115
- .command('prune')
116
- .description('Remove all diffity data (database, sessions) for all repos')
117
- .action(() => {
118
- const dir = join(homedir(), '.diffity');
119
- if (!existsSync(dir)) {
120
- console.log(pc.dim('Nothing to prune.'));
121
- return;
122
- }
123
-
124
- rmSync(dir, { recursive: true, force: true });
125
- console.log(pc.green('Pruned all diffity data (~/.diffity).'));
126
- });
127
-
128
- program
129
- .command('update')
130
- .description('Update diffity to the latest version')
131
- .action(() => {
132
- try {
133
- const registry = execSync('npm view diffity version', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
134
- if (registry === pkg.version) {
135
- console.log(pc.green(`Already on the latest version (${pkg.version}).`));
136
- return;
137
- }
138
- console.log(`${pc.dim(`Current: ${pkg.version}`)} → ${pc.bold(registry)}`);
139
- console.log(pc.dim('Updating...'));
140
- execSync('npm install -g diffity@latest', { stdio: 'inherit' });
141
- console.log(pc.green(`Updated to ${registry}.`));
142
- } catch {
143
- console.error(pc.red('Failed to update. Try running: npm install -g diffity@latest'));
144
- process.exit(1);
145
- }
146
- });
147
-
148
- program
149
- .command('doctor')
150
- .description('Check that diffity can run correctly')
151
- .action(() => {
152
- let ok = true;
153
-
154
- process.stdout.write(' git ');
155
- try {
156
- const gitVersion = execSync('git --version', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
157
- console.log(pc.green(`✓ ${gitVersion}`));
158
- } catch {
159
- console.log(pc.red('✗ git not found'));
160
- ok = false;
161
- }
162
-
163
- process.stdout.write(' git repo ');
164
- if (isGitRepo()) {
165
- console.log(pc.green('✓ inside a git repository'));
166
- } else {
167
- console.log(pc.yellow('- not inside a git repository'));
168
- }
169
-
170
- process.stdout.write(' node ');
171
- console.log(pc.green(`✓ ${process.version}`));
172
-
173
- process.stdout.write(' sqlite ');
174
- try {
175
- require('better-sqlite3');
176
- console.log(pc.green('✓ better-sqlite3 loaded'));
177
- } catch {
178
- console.log(pc.red('✗ better-sqlite3 failed to load (native module issue)'));
179
- ok = false;
180
- }
181
-
182
- process.stdout.write(' version ');
183
- console.log(pc.green(`✓ diffity ${pkg.version}`));
184
-
185
- console.log('');
186
- if (ok) {
187
- console.log(pc.green(' All checks passed.'));
188
- } else {
189
- console.log(pc.red(' Some checks failed. Fix the issues above and try again.'));
190
- process.exit(1);
191
- }
192
- });
193
-
194
- registerAgentCommands(program);
195
-
196
- program.parse();
@@ -1,150 +0,0 @@
1
- import type { IncomingMessage, ServerResponse } from 'node:http';
2
- import {
3
- createThread,
4
- getThreadsForSession,
5
- addReply,
6
- updateThreadStatus,
7
- deleteThread,
8
- deleteAllThreadsForSession,
9
- deleteComment,
10
- type ThreadStatus,
11
- } from './threads.js';
12
- import { getCurrentSession } from './session.js';
13
-
14
- function sendJson(res: ServerResponse, data: unknown) {
15
- res.writeHead(200, { 'Content-Type': 'application/json' });
16
- res.end(JSON.stringify(data));
17
- }
18
-
19
- function sendError(res: ServerResponse, status: number, message: string) {
20
- res.writeHead(status, { 'Content-Type': 'application/json' });
21
- res.end(JSON.stringify({ error: message }));
22
- }
23
-
24
- function readBody(req: IncomingMessage): Promise<string> {
25
- return new Promise((resolve, reject) => {
26
- const chunks: Buffer[] = [];
27
- req.on('data', (chunk: Buffer) => chunks.push(chunk));
28
- req.on('end', () => resolve(Buffer.concat(chunks).toString()));
29
- req.on('error', reject);
30
- });
31
- }
32
-
33
- export function handleReviewRoute(req: IncomingMessage, res: ServerResponse, pathname: string, url: URL): boolean {
34
- if (pathname === '/api/sessions/current' && req.method === 'GET') {
35
- const session = getCurrentSession();
36
- sendJson(res, session);
37
- return true;
38
- }
39
-
40
- if (pathname === '/api/threads' && req.method === 'GET') {
41
- const sid = url.searchParams.get('session');
42
- if (!sid) {
43
- sendError(res, 400, 'Missing session parameter');
44
- return true;
45
- }
46
- const status = url.searchParams.get('status') as ThreadStatus | null;
47
- const threads = getThreadsForSession(sid, status || undefined);
48
- sendJson(res, threads);
49
- return true;
50
- }
51
-
52
- if (pathname === '/api/threads' && req.method === 'DELETE') {
53
- readBody(req).then((raw) => {
54
- try {
55
- const body = JSON.parse(raw);
56
- const { sessionId: sid } = body;
57
- if (!sid) {
58
- sendError(res, 400, 'Missing sessionId');
59
- return;
60
- }
61
- deleteAllThreadsForSession(sid);
62
- sendJson(res, { ok: true });
63
- } catch (err) {
64
- sendError(res, 500, `Failed to delete all threads: ${err}`);
65
- }
66
- });
67
- return true;
68
- }
69
-
70
- if (pathname === '/api/threads' && req.method === 'POST') {
71
- readBody(req).then((raw) => {
72
- try {
73
- const body = JSON.parse(raw);
74
- const { sessionId: sid, filePath, side, startLine, endLine, body: commentBody, author, anchorContent } = body;
75
- if (!sid || !filePath || !side || typeof startLine !== 'number' || typeof endLine !== 'number' || !commentBody || !author) {
76
- sendError(res, 400, 'Missing required fields');
77
- return;
78
- }
79
- const thread = createThread(sid, filePath, side, startLine, endLine, commentBody, author, anchorContent);
80
- sendJson(res, thread);
81
- } catch (err) {
82
- sendError(res, 500, `Failed to create thread: ${err}`);
83
- }
84
- });
85
- return true;
86
- }
87
-
88
- const threadReplyMatch = pathname.match(/^\/api\/threads\/([^/]+)\/reply$/);
89
- if (threadReplyMatch && req.method === 'POST') {
90
- readBody(req).then((raw) => {
91
- try {
92
- const body = JSON.parse(raw);
93
- const { body: commentBody, author } = body;
94
- if (!commentBody || !author) {
95
- sendError(res, 400, 'Missing body or author');
96
- return;
97
- }
98
- const comment = addReply(threadReplyMatch[1], commentBody, author);
99
- sendJson(res, comment);
100
- } catch (err) {
101
- sendError(res, 500, `Failed to add reply: ${err}`);
102
- }
103
- });
104
- return true;
105
- }
106
-
107
- const threadStatusMatch = pathname.match(/^\/api\/threads\/([^/]+)\/status$/);
108
- if (threadStatusMatch && req.method === 'PATCH') {
109
- readBody(req).then((raw) => {
110
- try {
111
- const body = JSON.parse(raw);
112
- const { status, summary } = body;
113
- if (!status) {
114
- sendError(res, 400, 'Missing status');
115
- return;
116
- }
117
- const summaryAuthor = summary ? { name: 'System', type: 'user' as const } : undefined;
118
- updateThreadStatus(threadStatusMatch[1], status, summary, summaryAuthor);
119
- sendJson(res, { ok: true });
120
- } catch (err) {
121
- sendError(res, 500, `Failed to update thread status: ${err}`);
122
- }
123
- });
124
- return true;
125
- }
126
-
127
- const threadDeleteMatch = pathname.match(/^\/api\/threads\/([^/]+)$/);
128
- if (threadDeleteMatch && req.method === 'DELETE') {
129
- try {
130
- deleteThread(threadDeleteMatch[1]);
131
- sendJson(res, { ok: true });
132
- } catch (err) {
133
- sendError(res, 500, `Failed to delete thread: ${err}`);
134
- }
135
- return true;
136
- }
137
-
138
- const commentDeleteMatch = pathname.match(/^\/api\/comments\/([^/]+)$/);
139
- if (commentDeleteMatch && req.method === 'DELETE') {
140
- try {
141
- deleteComment(commentDeleteMatch[1]);
142
- sendJson(res, { ok: true });
143
- } catch (err) {
144
- sendError(res, 500, `Failed to delete comment: ${err}`);
145
- }
146
- return true;
147
- }
148
-
149
- return false;
150
- }