jj-plus 0.10.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +102 -0
  3. package/assets/jj-plus-icon.png +0 -0
  4. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  5. package/dist/bin.cjs +112 -0
  6. package/dist/bin.cjs.map +1 -0
  7. package/dist/cli/options.cjs +376 -0
  8. package/dist/cli/options.cjs.map +1 -0
  9. package/dist/cli/timeline-json.cjs +29 -0
  10. package/dist/cli/timeline-json.cjs.map +1 -0
  11. package/dist/extension/blame-codelens.cjs +228 -0
  12. package/dist/extension/blame-codelens.cjs.map +1 -0
  13. package/dist/extension/command-runner.cjs +99 -0
  14. package/dist/extension/command-runner.cjs.map +1 -0
  15. package/dist/extension/constants.cjs +56 -0
  16. package/dist/extension/constants.cjs.map +1 -0
  17. package/dist/extension/editor-extra-features.cjs +464 -0
  18. package/dist/extension/editor-extra-features.cjs.map +1 -0
  19. package/dist/extension/history-adapters.cjs +702 -0
  20. package/dist/extension/history-adapters.cjs.map +1 -0
  21. package/dist/extension/index.cjs +657 -0
  22. package/dist/extension/index.cjs.map +1 -0
  23. package/dist/extension/repo-timeline-panel.cjs +402 -0
  24. package/dist/extension/repo-timeline-panel.cjs.map +1 -0
  25. package/dist/extension/resolve-file-path.cjs +16 -0
  26. package/dist/extension/resolve-file-path.cjs.map +1 -0
  27. package/dist/extension/revision-diff-nav.cjs +169 -0
  28. package/dist/extension/revision-diff-nav.cjs.map +1 -0
  29. package/dist/extension/settings.cjs +41 -0
  30. package/dist/extension/settings.cjs.map +1 -0
  31. package/dist/extension/timeline-at-line.cjs +72 -0
  32. package/dist/extension/timeline-at-line.cjs.map +1 -0
  33. package/dist/extension/timeline-panel.cjs +1113 -0
  34. package/dist/extension/timeline-panel.cjs.map +1 -0
  35. package/dist/extension/timeline-service.cjs +1154 -0
  36. package/dist/extension/timeline-service.cjs.map +1 -0
  37. package/dist/extension/uri-utils.cjs +75 -0
  38. package/dist/extension/uri-utils.cjs.map +1 -0
  39. package/dist/package.cjs +11 -0
  40. package/dist/package.cjs.map +1 -0
  41. package/dist/shared/blame.cjs +211 -0
  42. package/dist/shared/blame.cjs.map +1 -0
  43. package/dist/shared/diff-content-search.cjs +23 -0
  44. package/dist/shared/diff-content-search.cjs.map +1 -0
  45. package/dist/shared/diff-helpers.cjs +12 -0
  46. package/dist/shared/diff-helpers.cjs.map +1 -0
  47. package/dist/shared/diff-stats.cjs +129 -0
  48. package/dist/shared/diff-stats.cjs.map +1 -0
  49. package/dist/shared/file-oplog.cjs +82 -0
  50. package/dist/shared/file-oplog.cjs.map +1 -0
  51. package/dist/shared/history-helpers.cjs +257 -0
  52. package/dist/shared/history-helpers.cjs.map +1 -0
  53. package/dist/shared/history-search.cjs +85 -0
  54. package/dist/shared/history-search.cjs.map +1 -0
  55. package/dist/shared/jj-revset-suggestions.cjs +41 -0
  56. package/dist/shared/jj-revset-suggestions.cjs.map +1 -0
  57. package/dist/shared/line-history.cjs +181 -0
  58. package/dist/shared/line-history.cjs.map +1 -0
  59. package/dist/shared/list-file-revisions.cjs +36 -0
  60. package/dist/shared/list-file-revisions.cjs.map +1 -0
  61. package/dist/shared/non-textual-details.cjs +43 -0
  62. package/dist/shared/non-textual-details.cjs.map +1 -0
  63. package/dist/shared/resolve-file-path.cjs +14 -0
  64. package/dist/shared/resolve-file-path.cjs.map +1 -0
  65. package/dist/shared/revision-diff-availability.cjs +18 -0
  66. package/dist/shared/revision-diff-availability.cjs.map +1 -0
  67. package/dist/shared/revision-diff-pair.cjs +42 -0
  68. package/dist/shared/revision-diff-pair.cjs.map +1 -0
  69. package/dist/shared/revset.cjs +16 -0
  70. package/dist/shared/revset.cjs.map +1 -0
  71. package/dist/shared/timeline-model.cjs +29 -0
  72. package/dist/shared/timeline-model.cjs.map +1 -0
  73. package/dist/standalone/server.cjs +1733 -0
  74. package/dist/standalone/server.cjs.map +1 -0
  75. package/dist/webview/timeline-template.cjs +214 -0
  76. package/dist/webview/timeline-template.cjs.map +1 -0
  77. package/package.json +320 -0
  78. package/webview-dist/assets/worker-DuV13XDT.js +161 -0
  79. package/webview-dist/chunks/abap-CLvhMVsD.js +1 -0
  80. package/webview-dist/chunks/actionscript-3-Cs6JJXT5.js +1 -0
  81. package/webview-dist/chunks/ada-C5qYipkI.js +1 -0
  82. package/webview-dist/chunks/ahk-CA9gdOdF.js +1 -0
  83. package/webview-dist/chunks/ahk2-_6rzW9BS.js +1 -0
  84. package/webview-dist/chunks/andromeeda-vGVdxbeo.js +1 -0
  85. package/webview-dist/chunks/angular-html-DTpR04n4.js +1 -0
  86. package/webview-dist/chunks/angular-ts-BCtbMvbl.js +1 -0
  87. package/webview-dist/chunks/apache-U0d_L8uA.js +1 -0
  88. package/webview-dist/chunks/apex-KFGFyKwG.js +1 -0
  89. package/webview-dist/chunks/apl-BMZuN1Ql.js +1 -0
  90. package/webview-dist/chunks/applescript-CCn79oCD.js +1 -0
  91. package/webview-dist/chunks/ara-4CJ0cIlV.js +1 -0
  92. package/webview-dist/chunks/asciidoc-SCjQUq34.js +1 -0
  93. package/webview-dist/chunks/asm-Cmm7eHzH.js +1 -0
  94. package/webview-dist/chunks/astro-DrbV4Z7r.js +1 -0
  95. package/webview-dist/chunks/aurora-x-CDeNXAV0.js +1 -0
  96. package/webview-dist/chunks/awk-BWXHIvNe.js +1 -0
  97. package/webview-dist/chunks/ayu-dark-DluEY0Gj.js +1 -0
  98. package/webview-dist/chunks/ayu-light-C3h-C4tm.js +1 -0
  99. package/webview-dist/chunks/ayu-mirage-Bqwy1Gya.js +1 -0
  100. package/webview-dist/chunks/ballerina-B7ZEbQpA.js +1 -0
  101. package/webview-dist/chunks/bat-qdxAdBWQ.js +1 -0
  102. package/webview-dist/chunks/beancount-D-usSTwE.js +1 -0
  103. package/webview-dist/chunks/berry-DKpUyyne.js +1 -0
  104. package/webview-dist/chunks/bibtex-Ci_nEsc7.js +1 -0
  105. package/webview-dist/chunks/bicep-CUHmPFLl.js +1 -0
  106. package/webview-dist/chunks/bird2-CYIUgYqB.js +1 -0
  107. package/webview-dist/chunks/blade-oPV8S6rR.js +1 -0
  108. package/webview-dist/chunks/bsl-_VjlB9mv.js +1 -0
  109. package/webview-dist/chunks/c-DYf-3tob.js +1 -0
  110. package/webview-dist/chunks/c3-D0apG41V.js +1 -0
  111. package/webview-dist/chunks/cadence-CQ2zXKGN.js +1 -0
  112. package/webview-dist/chunks/cairo-DLTphjLi.js +1 -0
  113. package/webview-dist/chunks/catppuccin-frappe-C9Q5zVZY.js +1 -0
  114. package/webview-dist/chunks/catppuccin-latte-CtsyrtPq.js +1 -0
  115. package/webview-dist/chunks/catppuccin-macchiato-R8nAf1vR.js +1 -0
  116. package/webview-dist/chunks/catppuccin-mocha-DjuaAJKi.js +1 -0
  117. package/webview-dist/chunks/chapel-DY-WYB1D.js +1 -0
  118. package/webview-dist/chunks/clarity-CtfBBspg.js +1 -0
  119. package/webview-dist/chunks/clojure-DqKBuwfJ.js +1 -0
  120. package/webview-dist/chunks/cmake-Bj61d0ZC.js +1 -0
  121. package/webview-dist/chunks/cobol-DvdX_6CO.js +1 -0
  122. package/webview-dist/chunks/codeowners-C8r90Shi.js +1 -0
  123. package/webview-dist/chunks/codeql-oeQT6MSM.js +1 -0
  124. package/webview-dist/chunks/coffee-C1kO7jr_.js +1 -0
  125. package/webview-dist/chunks/common-lisp-Cv5bFMCO.js +1 -0
  126. package/webview-dist/chunks/coq-DuBRPxYg.js +1 -0
  127. package/webview-dist/chunks/cpp-CoSarUrI.js +1 -0
  128. package/webview-dist/chunks/crystal-SLJeZ5EP.js +1 -0
  129. package/webview-dist/chunks/csharp-oqKa8noW.js +1 -0
  130. package/webview-dist/chunks/css-cfScyrSP.js +1 -0
  131. package/webview-dist/chunks/csv-Dx-8-gkx.js +1 -0
  132. package/webview-dist/chunks/cue-CE9AQfxI.js +1 -0
  133. package/webview-dist/chunks/cypher-ClKdZ_lG.js +1 -0
  134. package/webview-dist/chunks/d-qD-0Kul2.js +1 -0
  135. package/webview-dist/chunks/dark-plus-Cs2F2srj.js +1 -0
  136. package/webview-dist/chunks/dart-CnvKMtbv.js +1 -0
  137. package/webview-dist/chunks/dax-BkyTk9wS.js +1 -0
  138. package/webview-dist/chunks/desktop-Dlh5hvp9.js +1 -0
  139. package/webview-dist/chunks/diff-woXpYk--.js +1 -0
  140. package/webview-dist/chunks/docker-IyjqRm3v.js +1 -0
  141. package/webview-dist/chunks/dotenv-_5a1GRtc.js +1 -0
  142. package/webview-dist/chunks/dracula-BHWKrbxM.js +1 -0
  143. package/webview-dist/chunks/dracula-soft-5eyTD99u.js +1 -0
  144. package/webview-dist/chunks/dream-maker-DW3nJb8Q.js +1 -0
  145. package/webview-dist/chunks/edge-lvBr3t3s.js +1 -0
  146. package/webview-dist/chunks/elixir-BLoPe0KG.js +1 -0
  147. package/webview-dist/chunks/elm-BveBINBn.js +1 -0
  148. package/webview-dist/chunks/emacs-lisp-c_oH4hRZ.js +1 -0
  149. package/webview-dist/chunks/erb-Bmf8z4ph.js +1 -0
  150. package/webview-dist/chunks/erlang-Cphh6RMH.js +1 -0
  151. package/webview-dist/chunks/everforest-dark-sB-x3p7T.js +1 -0
  152. package/webview-dist/chunks/everforest-light-Df2xbC6M.js +1 -0
  153. package/webview-dist/chunks/fennel-DQxkIbk2.js +1 -0
  154. package/webview-dist/chunks/fish-BJitypiv.js +1 -0
  155. package/webview-dist/chunks/fluent-C03EYrpw.js +1 -0
  156. package/webview-dist/chunks/fortran-fixed-form-DEKoE2YW.js +1 -0
  157. package/webview-dist/chunks/fortran-free-form-CYNrtFtB.js +1 -0
  158. package/webview-dist/chunks/fsharp-D13ZGOAj.js +1 -0
  159. package/webview-dist/chunks/gdresource-xMC7jr7x.js +1 -0
  160. package/webview-dist/chunks/gdscript-DYvRD3hg.js +1 -0
  161. package/webview-dist/chunks/gdshader-CBce3t8t.js +1 -0
  162. package/webview-dist/chunks/genie-CV2tkWYe.js +1 -0
  163. package/webview-dist/chunks/gherkin-DExj1W_8.js +1 -0
  164. package/webview-dist/chunks/git-commit-BSykSTBG.js +1 -0
  165. package/webview-dist/chunks/git-rebase-BBii7GBM.js +1 -0
  166. package/webview-dist/chunks/github-dark-C-LZuMrd.js +1 -0
  167. package/webview-dist/chunks/github-dark-default-DXG-b-1a.js +1 -0
  168. package/webview-dist/chunks/github-dark-dimmed-Bx1FflLF.js +1 -0
  169. package/webview-dist/chunks/github-dark-high-contrast-B_tTalzw.js +1 -0
  170. package/webview-dist/chunks/github-light-EUqPIrTm.js +1 -0
  171. package/webview-dist/chunks/github-light-default-BXViO-2h.js +1 -0
  172. package/webview-dist/chunks/github-light-high-contrast-B68TUdTA.js +1 -0
  173. package/webview-dist/chunks/gleam-CSRkHgEL.js +1 -0
  174. package/webview-dist/chunks/glimmer-js-CuCPna-X.js +1 -0
  175. package/webview-dist/chunks/glimmer-ts-DNAjZNDK.js +1 -0
  176. package/webview-dist/chunks/glsl-COQvRxdz.js +1 -0
  177. package/webview-dist/chunks/gn-ilITqXS6.js +1 -0
  178. package/webview-dist/chunks/gnuplot-7GGW24-e.js +1 -0
  179. package/webview-dist/chunks/go-rLFTqkRN.js +1 -0
  180. package/webview-dist/chunks/graphql-1cKCVreZ.js +1 -0
  181. package/webview-dist/chunks/groovy-CacY0gHj.js +1 -0
  182. package/webview-dist/chunks/gruvbox-dark-hard-C820rvS2.js +1 -0
  183. package/webview-dist/chunks/gruvbox-dark-medium-BPjhmG05.js +1 -0
  184. package/webview-dist/chunks/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  185. package/webview-dist/chunks/gruvbox-light-hard-BC_s9l72.js +1 -0
  186. package/webview-dist/chunks/gruvbox-light-medium-BAWPOn9u.js +1 -0
  187. package/webview-dist/chunks/gruvbox-light-soft-BSMLrYjP.js +1 -0
  188. package/webview-dist/chunks/hack-7CXYxWGO.js +1 -0
  189. package/webview-dist/chunks/haml-CeE16iG9.js +1 -0
  190. package/webview-dist/chunks/handlebars-CLm7Miue.js +1 -0
  191. package/webview-dist/chunks/haskell-D8IpX4py.js +1 -0
  192. package/webview-dist/chunks/haxe-C8oCnwJJ.js +1 -0
  193. package/webview-dist/chunks/hcl-Dh228itO.js +1 -0
  194. package/webview-dist/chunks/hjson-CxZEssPk.js +1 -0
  195. package/webview-dist/chunks/hlsl-Cvrh5tZx.js +1 -0
  196. package/webview-dist/chunks/horizon-CE9ld1lL.js +1 -0
  197. package/webview-dist/chunks/horizon-bright-DSNQnXHK.js +1 -0
  198. package/webview-dist/chunks/houston-CsvMBhTu.js +1 -0
  199. package/webview-dist/chunks/html-EbCri-_j.js +1 -0
  200. package/webview-dist/chunks/html-derivative-DGcE2kQi.js +1 -0
  201. package/webview-dist/chunks/http-DpnqgCg2.js +1 -0
  202. package/webview-dist/chunks/hurl-B6NGpamo.js +1 -0
  203. package/webview-dist/chunks/hxml-Dcm88srW.js +1 -0
  204. package/webview-dist/chunks/hy-CZbG8q4J.js +1 -0
  205. package/webview-dist/chunks/imba-DsUTQ-LC.js +1 -0
  206. package/webview-dist/chunks/ini-B5eOa1yu.js +1 -0
  207. package/webview-dist/chunks/java-ZkUoUSJy.js +1 -0
  208. package/webview-dist/chunks/javascript-DLd0EIw7.js +1 -0
  209. package/webview-dist/chunks/jinja-WhIqNp3q.js +1 -0
  210. package/webview-dist/chunks/jison-CIn1t7S8.js +1 -0
  211. package/webview-dist/chunks/json-AHG_JuKN.js +1 -0
  212. package/webview-dist/chunks/json5-BR5RXkoi.js +1 -0
  213. package/webview-dist/chunks/jsonc-CYpm1nAK.js +1 -0
  214. package/webview-dist/chunks/jsonl-CmCQp5Yx.js +1 -0
  215. package/webview-dist/chunks/jsonnet-CJTPZ8u_.js +1 -0
  216. package/webview-dist/chunks/jssm-DXw9l8Rf.js +1 -0
  217. package/webview-dist/chunks/jsx-BLy2KGb2.js +1 -0
  218. package/webview-dist/chunks/julia-XrhdGMY0.js +1 -0
  219. package/webview-dist/chunks/just-CiO9rOBq.js +1 -0
  220. package/webview-dist/chunks/kanagawa-dragon-Bozd7klA.js +1 -0
  221. package/webview-dist/chunks/kanagawa-lotus-BmuOG9ZW.js +1 -0
  222. package/webview-dist/chunks/kanagawa-wave-BML5mF2J.js +1 -0
  223. package/webview-dist/chunks/kdl-CsD5j6eV.js +1 -0
  224. package/webview-dist/chunks/kotlin-DhhofPvG.js +1 -0
  225. package/webview-dist/chunks/kusto-C7mF5XQf.js +1 -0
  226. package/webview-dist/chunks/laserwave-C_8bwKvT.js +1 -0
  227. package/webview-dist/chunks/latex-4tqdYtbu.js +1 -0
  228. package/webview-dist/chunks/lean-CewbzKMR.js +1 -0
  229. package/webview-dist/chunks/less-DVTAwKKz.js +1 -0
  230. package/webview-dist/chunks/light-plus-DVQuIRkW.js +1 -0
  231. package/webview-dist/chunks/liquid-BiiWRCLG.js +1 -0
  232. package/webview-dist/chunks/llvm-DqHOMS-s.js +1 -0
  233. package/webview-dist/chunks/log-BNLmms1o.js +1 -0
  234. package/webview-dist/chunks/logo-Cluzi2Zq.js +1 -0
  235. package/webview-dist/chunks/lua-BPFdS2Mc.js +1 -0
  236. package/webview-dist/chunks/luau-C2pBCSgt.js +1 -0
  237. package/webview-dist/chunks/make-Dixweg8N.js +1 -0
  238. package/webview-dist/chunks/markdown-BYOwaDjH.js +1 -0
  239. package/webview-dist/chunks/marko-BLi1Yy1V.js +1 -0
  240. package/webview-dist/chunks/material-theme-Bm3Qr25_.js +1 -0
  241. package/webview-dist/chunks/material-theme-darker-2IIEA8gg.js +1 -0
  242. package/webview-dist/chunks/material-theme-lighter-uhdI0v04.js +1 -0
  243. package/webview-dist/chunks/material-theme-ocean-CHQ94UKr.js +1 -0
  244. package/webview-dist/chunks/material-theme-palenight-B5W6OYN7.js +1 -0
  245. package/webview-dist/chunks/matlab-D7qyCx1q.js +1 -0
  246. package/webview-dist/chunks/mdc-Dx-qyM1x.js +1 -0
  247. package/webview-dist/chunks/mdx-DQZ5AkYe.js +1 -0
  248. package/webview-dist/chunks/mermaid-BxpfTIzt.js +1 -0
  249. package/webview-dist/chunks/min-dark-BSWPekZh.js +1 -0
  250. package/webview-dist/chunks/min-light-DDpmG2fV.js +1 -0
  251. package/webview-dist/chunks/mipsasm-BMqwQI7S.js +1 -0
  252. package/webview-dist/chunks/mojo-fg40_ntQ.js +1 -0
  253. package/webview-dist/chunks/monokai-B_bV9PQ9.js +1 -0
  254. package/webview-dist/chunks/moonbit-DgjMoLWr.js +1 -0
  255. package/webview-dist/chunks/move-BYnGhZoM.js +1 -0
  256. package/webview-dist/chunks/narrat-_X_XdTYD.js +1 -0
  257. package/webview-dist/chunks/nextflow-BJtWHP5T.js +1 -0
  258. package/webview-dist/chunks/nextflow-groovy-DJMQeKeT.js +1 -0
  259. package/webview-dist/chunks/nginx-rnpjAIVq.js +1 -0
  260. package/webview-dist/chunks/night-owl-DhmEMT88.js +1 -0
  261. package/webview-dist/chunks/night-owl-light-eJ-hLW7d.js +1 -0
  262. package/webview-dist/chunks/nim-kKTJ2fIs.js +1 -0
  263. package/webview-dist/chunks/nix-IvuFDN5E.js +1 -0
  264. package/webview-dist/chunks/nord-Cb4Vim4T.js +1 -0
  265. package/webview-dist/chunks/nsis-CjNLYCLg.js +1 -0
  266. package/webview-dist/chunks/nushell-DHYfO66s.js +1 -0
  267. package/webview-dist/chunks/objective-c-D1A_Heim.js +1 -0
  268. package/webview-dist/chunks/objective-cpp-BsSzOQcm.js +1 -0
  269. package/webview-dist/chunks/ocaml-O90oeIOV.js +1 -0
  270. package/webview-dist/chunks/odin-B1RWQWA5.js +1 -0
  271. package/webview-dist/chunks/one-dark-pro-CLwyXe_n.js +1 -0
  272. package/webview-dist/chunks/one-light-D7Lr4KcI.js +1 -0
  273. package/webview-dist/chunks/openscad-BUDT5pXO.js +1 -0
  274. package/webview-dist/chunks/org-BGWCjkJX.js +1 -0
  275. package/webview-dist/chunks/pascal-4ZHwLPI5.js +1 -0
  276. package/webview-dist/chunks/perl-DEimDILQ.js +1 -0
  277. package/webview-dist/chunks/php-QnaNN--1.js +1 -0
  278. package/webview-dist/chunks/pierre-dark-CpLgRqie.js +1 -0
  279. package/webview-dist/chunks/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
  280. package/webview-dist/chunks/pierre-dark-soft-kZQmAZld.js +1 -0
  281. package/webview-dist/chunks/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
  282. package/webview-dist/chunks/pierre-dark-vibrant-CpQYzh95.js +1 -0
  283. package/webview-dist/chunks/pierre-light-CoaEpmwp.js +1 -0
  284. package/webview-dist/chunks/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
  285. package/webview-dist/chunks/pierre-light-soft-lWLdNTOI.js +1 -0
  286. package/webview-dist/chunks/pierre-light-tritanopia-CEbqgOJL.js +1 -0
  287. package/webview-dist/chunks/pierre-light-vibrant-D80Fkn33.js +1 -0
  288. package/webview-dist/chunks/pkl-ot-7Btpt.js +1 -0
  289. package/webview-dist/chunks/plastic-DQwYfKfQ.js +1 -0
  290. package/webview-dist/chunks/plsql-DGHpHOYJ.js +1 -0
  291. package/webview-dist/chunks/po-BiJDBrnU.js +1 -0
  292. package/webview-dist/chunks/poimandres-DRFjx7u4.js +1 -0
  293. package/webview-dist/chunks/polar-C7UOKdEL.js +1 -0
  294. package/webview-dist/chunks/postcss-BXeXVLqQ.js +1 -0
  295. package/webview-dist/chunks/powerquery-DNMTfnFr.js +1 -0
  296. package/webview-dist/chunks/powershell-CCSX75yM.js +1 -0
  297. package/webview-dist/chunks/prisma-DMgNhnYS.js +1 -0
  298. package/webview-dist/chunks/prolog-iXnhIJG7.js +1 -0
  299. package/webview-dist/chunks/proto-DB4EqR-F.js +1 -0
  300. package/webview-dist/chunks/pug-D5rsKmMX.js +1 -0
  301. package/webview-dist/chunks/puppet-CDv2pdJW.js +1 -0
  302. package/webview-dist/chunks/purescript-9MfHhQsQ.js +1 -0
  303. package/webview-dist/chunks/python-gzcpVVnB.js +1 -0
  304. package/webview-dist/chunks/qml-wvbZb8UE.js +1 -0
  305. package/webview-dist/chunks/qmldir-DCQb3MpD.js +1 -0
  306. package/webview-dist/chunks/qss-Fe1Jh2GI.js +1 -0
  307. package/webview-dist/chunks/r-BNyBFaU1.js +1 -0
  308. package/webview-dist/chunks/racket-DcIDlBhZ.js +1 -0
  309. package/webview-dist/chunks/raku-B3gFvitq.js +1 -0
  310. package/webview-dist/chunks/razor-bKaHS6Kz.js +1 -0
  311. package/webview-dist/chunks/rbs-C0MpOrj4.js +1 -0
  312. package/webview-dist/chunks/red-DX1BQOs8.js +1 -0
  313. package/webview-dist/chunks/reg-CRGYupPL.js +1 -0
  314. package/webview-dist/chunks/regexp-B-mZuWUh.js +1 -0
  315. package/webview-dist/chunks/rel-BtDbiS_P.js +1 -0
  316. package/webview-dist/chunks/riscv-Ckw8ddFX.js +1 -0
  317. package/webview-dist/chunks/ron-VUp2lXgN.js +1 -0
  318. package/webview-dist/chunks/rose-pine-aMsaMD1D.js +1 -0
  319. package/webview-dist/chunks/rose-pine-dawn-8PwUyIlP.js +1 -0
  320. package/webview-dist/chunks/rose-pine-moon-DO-qXg-I.js +1 -0
  321. package/webview-dist/chunks/rosmsg-CAekHB0j.js +1 -0
  322. package/webview-dist/chunks/rst-Qq8ybXHe.js +1 -0
  323. package/webview-dist/chunks/ruby-U659LEwU.js +1 -0
  324. package/webview-dist/chunks/rust-Cfkwpbl8.js +1 -0
  325. package/webview-dist/chunks/sas-C4NtLApe.js +1 -0
  326. package/webview-dist/chunks/sass-DXrisJhu.js +1 -0
  327. package/webview-dist/chunks/scala-BiFt_7mu.js +1 -0
  328. package/webview-dist/chunks/scheme-DQCgrYNe.js +1 -0
  329. package/webview-dist/chunks/scss-KAaA4sHk.js +1 -0
  330. package/webview-dist/chunks/sdbl-bTVj8UrX.js +1 -0
  331. package/webview-dist/chunks/shaderlab-TOUzSsQk.js +1 -0
  332. package/webview-dist/chunks/shellscript-_7bOVsRC.js +1 -0
  333. package/webview-dist/chunks/shellsession-Bs_5k0qk.js +1 -0
  334. package/webview-dist/chunks/slack-dark-DnToyrRv.js +1 -0
  335. package/webview-dist/chunks/slack-ochin-B2OO5cIa.js +1 -0
  336. package/webview-dist/chunks/smalltalk-BHpQb5nM.js +1 -0
  337. package/webview-dist/chunks/smithy-Dgaz7aur.js +1 -0
  338. package/webview-dist/chunks/snazzy-light-4G7pJPwS.js +1 -0
  339. package/webview-dist/chunks/solarized-dark-UdsmMDCL.js +1 -0
  340. package/webview-dist/chunks/solarized-light-C1IUL_tW.js +1 -0
  341. package/webview-dist/chunks/solidity-Bj7E1mRn.js +1 -0
  342. package/webview-dist/chunks/soy-C5iuoFCh.js +1 -0
  343. package/webview-dist/chunks/sparql-D_iOobhT.js +1 -0
  344. package/webview-dist/chunks/splunk-BC2Px7Mm.js +1 -0
  345. package/webview-dist/chunks/sql-JX305rZh.js +1 -0
  346. package/webview-dist/chunks/ssh-config-BgfXC-Er.js +1 -0
  347. package/webview-dist/chunks/stata-2Rtik3TV.js +1 -0
  348. package/webview-dist/chunks/stylus-B6D30XZt.js +1 -0
  349. package/webview-dist/chunks/surrealql-IvpiLAIH.js +1 -0
  350. package/webview-dist/chunks/svelte-DeZcV_1u.js +1 -0
  351. package/webview-dist/chunks/swift-CyEgAFGc.js +1 -0
  352. package/webview-dist/chunks/synthwave-84-nFMaYfgc.js +1 -0
  353. package/webview-dist/chunks/system-verilog-Dh5ihWbf.js +1 -0
  354. package/webview-dist/chunks/systemd-BxMlprV5.js +1 -0
  355. package/webview-dist/chunks/talonscript-CohzipZa.js +1 -0
  356. package/webview-dist/chunks/tasl-DMoTqEGO.js +1 -0
  357. package/webview-dist/chunks/tcl-CZd0xW_V.js +1 -0
  358. package/webview-dist/chunks/templ-CcwjPXJr.js +1 -0
  359. package/webview-dist/chunks/terraform-DswuEJGm.js +1 -0
  360. package/webview-dist/chunks/tex-CZYHgHl8.js +1 -0
  361. package/webview-dist/chunks/tokyo-night-oM2G3aXe.js +1 -0
  362. package/webview-dist/chunks/toml-CcmNWLt0.js +1 -0
  363. package/webview-dist/chunks/ts-tags-DPINfEO_.js +1 -0
  364. package/webview-dist/chunks/tsv-sltzmVWM.js +1 -0
  365. package/webview-dist/chunks/tsx-Dq7pSIyE.js +1 -0
  366. package/webview-dist/chunks/turtle-ByJddavk.js +1 -0
  367. package/webview-dist/chunks/twig-DFpC8yDL.js +1 -0
  368. package/webview-dist/chunks/typescript-CN-guYmK.js +1 -0
  369. package/webview-dist/chunks/typespec-BRdr0IET.js +1 -0
  370. package/webview-dist/chunks/typst-hgW4q6mN.js +1 -0
  371. package/webview-dist/chunks/v-DBj4K9d_.js +1 -0
  372. package/webview-dist/chunks/vala-zf12oZj6.js +1 -0
  373. package/webview-dist/chunks/vb-DOwzaHZ0.js +1 -0
  374. package/webview-dist/chunks/verilog-B2gwz-sJ.js +1 -0
  375. package/webview-dist/chunks/vesper-DdrHHSXu.js +1 -0
  376. package/webview-dist/chunks/vhdl-BroJfC0k.js +1 -0
  377. package/webview-dist/chunks/viml-DvXPmvsu.js +1 -0
  378. package/webview-dist/chunks/vitesse-black-fwtXNY1n.js +1 -0
  379. package/webview-dist/chunks/vitesse-dark-BZCL-v6S.js +1 -0
  380. package/webview-dist/chunks/vitesse-light-VbXTXTou.js +1 -0
  381. package/webview-dist/chunks/vue-Dkz9ntel.js +1 -0
  382. package/webview-dist/chunks/vue-html-Dg8LQ5v3.js +1 -0
  383. package/webview-dist/chunks/vue-vine-CIEXICEN.js +1 -0
  384. package/webview-dist/chunks/vyper-CgoNMtux.js +1 -0
  385. package/webview-dist/chunks/wasm-BnjxR4X6.js +1 -0
  386. package/webview-dist/chunks/wasm-ByWQv1Qj.js +1 -0
  387. package/webview-dist/chunks/wenyan-C8pVoKbM.js +1 -0
  388. package/webview-dist/chunks/wgsl-BsKzXJz4.js +1 -0
  389. package/webview-dist/chunks/wikitext-ClFFjSW2.js +1 -0
  390. package/webview-dist/chunks/wit-DdvCle-K.js +1 -0
  391. package/webview-dist/chunks/wolfram-DLL8P-h_.js +1 -0
  392. package/webview-dist/chunks/worker-D52zl71O.js +1 -0
  393. package/webview-dist/chunks/worker-pool-lOjh8Q2A.js +1543 -0
  394. package/webview-dist/chunks/xml-X7YOen_c.js +1 -0
  395. package/webview-dist/chunks/xsl-h4d_Px-X.js +1 -0
  396. package/webview-dist/chunks/yaml-BRDpsfaj.js +1 -0
  397. package/webview-dist/chunks/zenscript-BnlCZFoB.js +1 -0
  398. package/webview-dist/chunks/zig-CMLA9XwU.js +1 -0
  399. package/webview-dist/index.html +18 -0
  400. package/webview-dist/pierre-worker-portable.js +13633 -0
  401. package/webview-dist/repo-timeline-app.js +7 -0
  402. package/webview-dist/repo-timeline.html +14 -0
  403. package/webview-dist/timeline-app.css +2 -0
  404. package/webview-dist/timeline-app.js +85 -0
@@ -0,0 +1,657 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_constants = require("./constants.cjs");
4
+ const require_package = require("../package.cjs");
5
+ const require_command_runner = require("./command-runner.cjs");
6
+ const require_blame_codelens = require("./blame-codelens.cjs");
7
+ const require_resolve_file_path = require("./resolve-file-path.cjs");
8
+ const require_editor_extra_features = require("./editor-extra-features.cjs");
9
+ const require_history_adapters = require("./history-adapters.cjs");
10
+ const require_list_file_revisions = require("../shared/list-file-revisions.cjs");
11
+ const require_revision_diff_nav = require("./revision-diff-nav.cjs");
12
+ const require_uri_utils = require("./uri-utils.cjs");
13
+ const require_timeline_panel = require("./timeline-panel.cjs");
14
+ const require_repo_timeline_panel = require("./repo-timeline-panel.cjs");
15
+ const require_timeline_service = require("./timeline-service.cjs");
16
+ let node_path = require("node:path");
17
+ node_path = require_runtime.__toESM(node_path, 1);
18
+ let vscode = require("vscode");
19
+ vscode = require_runtime.__toESM(vscode, 1);
20
+ //#region src/extension/index.ts
21
+ function activate(context) {
22
+ const outputChannel = vscode.window.createOutputChannel("JJ Plus");
23
+ const runner = require_command_runner.createCommandRunner({ outputChannel });
24
+ const service = require_timeline_service.createTimelineService({ runner });
25
+ const panelController = require_timeline_panel.createTimelinePanelController({
26
+ context,
27
+ service,
28
+ getPreferences: () => getTimelinePreferences(context),
29
+ savePreferences: (nextPreferences) => saveTimelinePreferences(context, nextPreferences),
30
+ version: require_package.version
31
+ });
32
+ const repoTimelineController = require_repo_timeline_panel.createRepoTimelinePanelController({
33
+ context,
34
+ runner,
35
+ version: require_package.version
36
+ });
37
+ const provider = new SnapshotContentProvider({ runner });
38
+ const openRangeMultiDiff = async (rawArgs) => {
39
+ if (rawArgs?.verbose) outputChannel.show(true);
40
+ const workspaceUri = await resolveWorkspaceUri({
41
+ context,
42
+ args: rawArgs
43
+ });
44
+ if (workspaceUri === "redirected") return;
45
+ if (!workspaceUri) {
46
+ vscode.window.showErrorMessage("No workspace folder available");
47
+ return;
48
+ }
49
+ const base = shouldPromptForInputs(rawArgs) ? await resolveInput({
50
+ value: getFromValue(rawArgs),
51
+ prompt: "From change id or revset",
52
+ placeHolder: require_constants.DEFAULT_FROM_REVSET
53
+ }) : getFromValue(rawArgs);
54
+ if (!base) return;
55
+ const target = shouldPromptForInputs(rawArgs) ? await resolveInput({
56
+ value: getToValue(rawArgs),
57
+ prompt: "To change id or revset",
58
+ placeHolder: "@"
59
+ }) : getToValue(rawArgs);
60
+ if (!target) return;
61
+ const title = rawArgs?.title?.trim() || `${base}..${target}`;
62
+ try {
63
+ const { resolvedTitle, resources } = await buildWorkspaceMultiDiffResources({
64
+ runner,
65
+ workspacePath: workspaceUri.fsPath,
66
+ base,
67
+ target,
68
+ title
69
+ });
70
+ if (!resources.length) {
71
+ vscode.window.showInformationMessage(`No changes found for ${title}`);
72
+ return;
73
+ }
74
+ await vscode.commands.executeCommand(require_constants.OPEN_MULTI_DIFF_COMMAND, {
75
+ title: resolvedTitle,
76
+ resources
77
+ });
78
+ } catch (error) {
79
+ const message = error instanceof Error ? error.message : String(error);
80
+ vscode.window.showErrorMessage(`Failed to open JJ Plus range diff: ${message}`);
81
+ }
82
+ };
83
+ const openFileRangeDiff = async (rawArgs) => {
84
+ if (rawArgs?.verbose) outputChannel.show(true);
85
+ const workspaceUri = await resolveWorkspaceUri({
86
+ context,
87
+ args: rawArgs
88
+ });
89
+ if (workspaceUri === "redirected") return;
90
+ if (!workspaceUri) {
91
+ vscode.window.showErrorMessage("No workspace folder available");
92
+ return;
93
+ }
94
+ const fileTarget = await resolveFileDiffTarget({
95
+ workspaceUri,
96
+ absolutePath: rawArgs?.absolutePath
97
+ });
98
+ if (!fileTarget) {
99
+ vscode.window.showErrorMessage("No workspace file available from the active editor or open tabs");
100
+ return;
101
+ }
102
+ const base = shouldPromptForInputs(rawArgs) ? await resolveInput({
103
+ value: getFromValue(rawArgs),
104
+ prompt: "From change id or revset",
105
+ placeHolder: require_constants.DEFAULT_FROM_REVSET
106
+ }) : getFromValue(rawArgs);
107
+ if (!base) return;
108
+ const target = shouldPromptForInputs(rawArgs) ? await resolveInput({
109
+ value: getToValue(rawArgs),
110
+ prompt: "To change id or revset",
111
+ placeHolder: "@"
112
+ }) : getToValue(rawArgs);
113
+ if (!target) return;
114
+ const title = rawArgs?.title?.trim() || `${fileTarget.fileName}: ${base} -> ${target}`;
115
+ try {
116
+ const preferredWorkspacePath = node_path.default.dirname(fileTarget.absolutePath);
117
+ const historyWorkspacePath = await require_history_adapters.resolveHistoryWorkspacePath({
118
+ workspacePath: preferredWorkspacePath,
119
+ runner
120
+ });
121
+ const relativePath = toHistoryRelativePath({
122
+ historyWorkspacePath,
123
+ absolutePath: fileTarget.absolutePath
124
+ });
125
+ if (!relativePath) throw new Error("The selected file is outside the resolved repository root");
126
+ let adapter = await require_history_adapters.resolveHistoryAdapter({
127
+ workspacePath: historyWorkspacePath,
128
+ runner
129
+ });
130
+ let resolvedWorkspacePath = historyWorkspacePath;
131
+ let resolvedRelativePath = relativePath;
132
+ let originalContent = "";
133
+ let modifiedContent = "";
134
+ try {
135
+ [originalContent, modifiedContent] = await Promise.all([adapter.showFileAtRevision({
136
+ workspacePath: resolvedWorkspacePath,
137
+ revset: base,
138
+ filePath: resolvedRelativePath
139
+ }), adapter.showFileAtRevision({
140
+ workspacePath: resolvedWorkspacePath,
141
+ revset: target,
142
+ filePath: resolvedRelativePath
143
+ })]);
144
+ } catch (error) {
145
+ const fallback = await resolveJjFileFallback({
146
+ error,
147
+ adapter,
148
+ runner,
149
+ absolutePath: fileTarget.absolutePath,
150
+ base,
151
+ target
152
+ });
153
+ if (!fallback) throw error;
154
+ adapter = fallback.adapter;
155
+ resolvedWorkspacePath = fallback.workspacePath;
156
+ resolvedRelativePath = fallback.relativePath;
157
+ [originalContent, modifiedContent] = await Promise.all([adapter.showFileAtRevision({
158
+ workspacePath: resolvedWorkspacePath,
159
+ revset: base,
160
+ filePath: resolvedRelativePath
161
+ }), adapter.showFileAtRevision({
162
+ workspacePath: resolvedWorkspacePath,
163
+ revset: target,
164
+ filePath: resolvedRelativePath
165
+ })]);
166
+ }
167
+ const originalUri = provider.createInlineContentUri({
168
+ workspacePath: resolvedWorkspacePath,
169
+ revset: base,
170
+ relativePath: resolvedRelativePath,
171
+ content: originalContent
172
+ });
173
+ const modifiedUri = provider.createInlineContentUri({
174
+ workspacePath: resolvedWorkspacePath,
175
+ revset: target,
176
+ relativePath: resolvedRelativePath,
177
+ content: modifiedContent
178
+ });
179
+ await vscode.commands.executeCommand("vscode.diff", originalUri, modifiedUri, title, { preview: true });
180
+ } catch (error) {
181
+ const message = error instanceof Error ? error.message : String(error);
182
+ vscode.window.showErrorMessage(`Failed to open file diff: ${message}`);
183
+ }
184
+ };
185
+ const revisionDiffNav = require_revision_diff_nav.createRevisionDiffNavigator({
186
+ showFile: async ({ workspacePath, revset, filePath }) => {
187
+ return (await require_history_adapters.resolveHistoryAdapter({
188
+ workspacePath,
189
+ runner
190
+ })).showFileAtRevision({
191
+ workspacePath,
192
+ revset,
193
+ filePath
194
+ });
195
+ },
196
+ createUri: (uriArgs) => provider.createInlineContentUri(uriArgs),
197
+ listRevisions: async ({ workspacePath, relativePath, backend }) => require_list_file_revisions.listFileRevisionIds({
198
+ runner,
199
+ workspacePath,
200
+ relativePath,
201
+ backend
202
+ }),
203
+ resolveBackend: async ({ workspacePath }) => require_history_adapters.resolveHistoryAdapter({
204
+ workspacePath,
205
+ runner
206
+ }),
207
+ resolveHistoryWorkspacePath: async ({ workspacePath }) => require_history_adapters.resolveHistoryWorkspacePath({
208
+ workspacePath,
209
+ runner
210
+ }),
211
+ toRelativePath: toHistoryRelativePath
212
+ });
213
+ context.subscriptions.push(outputChannel, vscode.workspace.registerTextDocumentContentProvider("jj-plus", provider), vscode.commands.registerCommand(require_constants.HELPER_COMMAND, openRangeMultiDiff), vscode.commands.registerCommand(require_constants.OPEN_FILE_RANGE_DIFF_COMMAND, openFileRangeDiff), vscode.commands.registerCommand(require_constants.OPEN_CHANGES_WITH_PREVIOUS_COMMAND, (arg) => revisionDiffNav.openWithPrevious(arg)), vscode.commands.registerCommand(require_constants.OPEN_REVISION_DIFF_PREVIOUS_COMMAND, () => revisionDiffNav.openPrevious()), vscode.commands.registerCommand(require_constants.OPEN_REVISION_DIFF_NEXT_COMMAND, () => revisionDiffNav.openNext()), vscode.commands.registerCommand(require_constants.OPEN_REVISION_DIFF_TIMELINE_COMMAND, () => revisionDiffNav.openTimelineHere()), vscode.commands.registerCommand(require_constants.OPEN_FILE_TIMELINE_COMMAND, (arg) => panelController.openFileRevisionTimeline({
214
+ context,
215
+ absolutePath: require_resolve_file_path.resolveCommandFilePath(arg)
216
+ })), vscode.commands.registerCommand(require_constants.OPEN_REPO_TIMELINE_COMMAND, () => repoTimelineController.open()), vscode.commands.registerCommand(require_constants.OPEN_FILE_LINE_TIMELINE_COMMAND, async () => {
217
+ const editor = vscode.window.activeTextEditor;
218
+ if (!editor || editor.document.uri.scheme !== "file") {
219
+ vscode.window.showErrorMessage("Open a workspace file and select lines to browse line history");
220
+ return;
221
+ }
222
+ const startLine = Math.min(editor.selection.start.line, editor.selection.end.line) + 1;
223
+ const endLine = Math.max(editor.selection.start.line, editor.selection.end.line) + 1;
224
+ await panelController.openFileRevisionTimeline({
225
+ context,
226
+ absolutePath: editor.document.uri.fsPath,
227
+ lineHistory: {
228
+ startLine,
229
+ endLine
230
+ }
231
+ });
232
+ }), vscode.commands.registerCommand(require_constants.CLEAR_LINE_HISTORY_COMMAND, () => panelController.clearLineHistoryFilter()), vscode.commands.registerCommand(require_constants.OPEN_TIMELINE_AT_LINE_COMMAND, async (args) => {
233
+ const parsed = typeof args === "string" ? JSON.parse(args) : args || {};
234
+ const editor = vscode.window.activeTextEditor;
235
+ const absolutePath = parsed.absolutePath || editor?.document.uri.fsPath;
236
+ const line = typeof parsed.line === "number" ? parsed.line : editor ? editor.selection.active.line + 1 : void 0;
237
+ if (!absolutePath || !line) {
238
+ vscode.window.showErrorMessage("Place the cursor on a workspace file line to open timeline");
239
+ return;
240
+ }
241
+ const workspaceFolder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(absolutePath));
242
+ if (!workspaceFolder) {
243
+ vscode.window.showErrorMessage("The file must belong to a workspace folder");
244
+ return;
245
+ }
246
+ const relativePath = node_path.default.relative(workspaceFolder.uri.fsPath, absolutePath).replace(/\\/g, "/");
247
+ const adapter = await require_history_adapters.resolveHistoryAdapter({
248
+ workspacePath: workspaceFolder.uri.fsPath,
249
+ runner
250
+ });
251
+ const focusRevision = await service.resolveBlameRevisionForLine({
252
+ workspacePath: workspaceFolder.uri.fsPath,
253
+ relativePath,
254
+ line,
255
+ backend: adapter.backend
256
+ });
257
+ await panelController.openFileRevisionTimeline({
258
+ context,
259
+ absolutePath,
260
+ lineHistory: {
261
+ startLine: line,
262
+ endLine: line
263
+ },
264
+ focusRevision
265
+ });
266
+ }), require_blame_codelens.createEditorBlameDecorations({
267
+ runner,
268
+ resolveBackend: async ({ workspacePath }) => require_history_adapters.resolveHistoryAdapter({
269
+ workspacePath,
270
+ runner
271
+ })
272
+ }), require_editor_extra_features.registerEditorExtraFeatures({
273
+ context,
274
+ runner,
275
+ resolveBackend: async ({ workspacePath }) => require_history_adapters.resolveHistoryAdapter({
276
+ workspacePath,
277
+ runner
278
+ }),
279
+ createInlineContentUri: (uriArgs) => provider.createInlineContentUri(uriArgs),
280
+ getRemoteBaseUrl: async ({ workspacePath }) => {
281
+ return (await require_history_adapters.resolveHistoryAdapter({
282
+ workspacePath,
283
+ runner
284
+ })).getRemoteBaseUrl({ workspacePath });
285
+ },
286
+ showFileAtRevision: async ({ workspacePath, revset, filePath }) => {
287
+ return (await require_history_adapters.resolveHistoryAdapter({
288
+ workspacePath,
289
+ runner
290
+ })).showFileAtRevision({
291
+ workspacePath,
292
+ revset,
293
+ filePath
294
+ });
295
+ },
296
+ openRevisionMultiDiff: async ({ workspacePath, revision }) => {
297
+ await openRevisionMultiDiff({
298
+ workspacePath,
299
+ revision,
300
+ runner
301
+ });
302
+ }
303
+ }), revisionDiffNav, vscode.commands.registerCommand(require_constants.GET_TIMELINE_DEBUG_STATE_COMMAND, () => panelController.getDebugState()), vscode.commands.registerCommand(require_constants.GET_DIFF_LAYOUT_METRICS_COMMAND, () => panelController.getDiffLayoutMetrics()), vscode.commands.registerCommand(require_constants.DEBUG_SELECT_TIMELINE_RANGE_COMMAND, (args) => panelController.selectTimelineRange(args)), vscode.commands.registerCommand(require_constants.DEBUG_SET_LAYOUT_MODE_COMMAND, (layoutMode) => panelController.setLayoutMode(layoutMode)), vscode.window.registerUriHandler({ async handleUri(uri) {
304
+ if (!require_uri_utils.isRangeDiffUriTarget({
305
+ uri,
306
+ extensionId: "astahmer.jj-plus"
307
+ })) return;
308
+ await openRangeMultiDiff(require_uri_utils.parseRangeDiffUri(uri));
309
+ } }), { dispose: () => panelController.dispose() }, { dispose: () => repoTimelineController.dispose() });
310
+ resumePendingRangeDiff({
311
+ context,
312
+ openRangeMultiDiff
313
+ });
314
+ }
315
+ function deactivate() {}
316
+ var SnapshotContentProvider = class {
317
+ runner;
318
+ inlineContent = /* @__PURE__ */ new Map();
319
+ constructor(args) {
320
+ this.runner = args.runner;
321
+ }
322
+ createInlineContentUri(args) {
323
+ const contentId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
324
+ this.inlineContent.set(contentId, args.content);
325
+ return vscode.Uri.from({
326
+ scheme: require_constants.SNAPSHOT_SCHEME,
327
+ path: `/${args.relativePath}`,
328
+ query: JSON.stringify({
329
+ workspacePath: args.workspacePath,
330
+ filePath: args.relativePath,
331
+ revset: args.revset,
332
+ contentId
333
+ })
334
+ });
335
+ }
336
+ async provideTextDocumentContent(uri) {
337
+ const query = require_uri_utils.parseSnapshotUri(uri);
338
+ if (query.contentId) return this.inlineContent.get(query.contentId) || "";
339
+ if (!query.workspacePath || !query.revset || !query.filePath) return "";
340
+ try {
341
+ return await (await require_history_adapters.resolveHistoryAdapter({
342
+ workspacePath: query.workspacePath,
343
+ runner: this.runner
344
+ })).showFileAtRevision({
345
+ workspacePath: query.workspacePath,
346
+ revset: query.revset,
347
+ filePath: query.filePath
348
+ });
349
+ } catch {
350
+ return "";
351
+ }
352
+ }
353
+ };
354
+ function getTimelinePreferences(context) {
355
+ const rawValue = context.globalState.get(require_constants.TIMELINE_PREFERENCES_KEY);
356
+ return require_timeline_service.normalizeTimelinePreferences(rawValue);
357
+ }
358
+ async function saveTimelinePreferences(context, nextPreferences) {
359
+ const currentPreferences = getTimelinePreferences(context);
360
+ await context.globalState.update(require_constants.TIMELINE_PREFERENCES_KEY, {
361
+ ...currentPreferences,
362
+ ...nextPreferences
363
+ });
364
+ }
365
+ async function buildWorkspaceMultiDiffResources(args) {
366
+ let changedFiles = await listChangedFiles(args);
367
+ let originalRevset = args.base;
368
+ let modifiedRevset = args.target;
369
+ let resolvedTitle = args.title;
370
+ if (!changedFiles.length && args.target === "@" && args.base !== args.target) {
371
+ const revisionFiles = await listRevisionFiles({
372
+ runner: args.runner,
373
+ workspacePath: args.workspacePath,
374
+ revision: args.base
375
+ });
376
+ if (revisionFiles.length) {
377
+ changedFiles = revisionFiles;
378
+ originalRevset = `${args.base}-`;
379
+ modifiedRevset = args.base;
380
+ if (args.title === `${args.base}..${args.target}`) resolvedTitle = args.base;
381
+ }
382
+ }
383
+ return {
384
+ resolvedTitle,
385
+ resources: await Promise.all(changedFiles.map(async (relativePath) => ({
386
+ originalUri: require_uri_utils.createSnapshotUri({
387
+ workspacePath: args.workspacePath,
388
+ revset: originalRevset,
389
+ relativePath
390
+ }),
391
+ modifiedUri: await createTargetUri({
392
+ workspacePath: args.workspacePath,
393
+ revset: modifiedRevset,
394
+ relativePath
395
+ })
396
+ })))
397
+ };
398
+ }
399
+ async function listChangedFiles(args) {
400
+ const { stdout } = await args.runner.runJj({
401
+ workspacePath: args.workspacePath,
402
+ args: [
403
+ "diff",
404
+ "--name-only",
405
+ "--from",
406
+ args.base,
407
+ "--to",
408
+ args.target
409
+ ]
410
+ });
411
+ return stdout.split(/\r?\n/u).map((line) => line.trim()).filter(Boolean);
412
+ }
413
+ async function listRevisionFiles(args) {
414
+ const { stdout } = await args.runner.runJj({
415
+ workspacePath: args.workspacePath,
416
+ args: [
417
+ "diff",
418
+ "--name-only",
419
+ "-r",
420
+ args.revision
421
+ ]
422
+ });
423
+ return stdout.split(/\r?\n/u).map((line) => line.trim()).filter(Boolean);
424
+ }
425
+ async function openRevisionMultiDiff(args) {
426
+ const adapter = await require_history_adapters.resolveHistoryAdapter({
427
+ workspacePath: args.workspacePath,
428
+ runner: args.runner
429
+ });
430
+ const files = await adapter.listRevisionFiles({
431
+ workspacePath: args.workspacePath,
432
+ revision: args.revision
433
+ });
434
+ if (!files.length) {
435
+ vscode.window.showInformationMessage(`No files changed in ${args.revision.slice(0, 12)}`);
436
+ return;
437
+ }
438
+ let parentRevision = `${args.revision}-`;
439
+ if (adapter.backend === "git") try {
440
+ const { stdout } = await args.runner.runGit({
441
+ workspacePath: args.workspacePath,
442
+ args: ["rev-parse", `${args.revision}^`]
443
+ });
444
+ parentRevision = stdout.trim() || "EMPTY";
445
+ } catch {
446
+ parentRevision = "EMPTY";
447
+ }
448
+ await vscode.commands.executeCommand(require_constants.OPEN_MULTI_DIFF_COMMAND, {
449
+ title: `JJ Plus: ${args.revision.slice(0, 12)} · revision diff`,
450
+ resources: files.map((relativePath) => ({
451
+ originalUri: require_uri_utils.createSnapshotUri({
452
+ workspacePath: args.workspacePath,
453
+ revset: parentRevision,
454
+ relativePath,
455
+ backend: adapter.backend
456
+ }),
457
+ modifiedUri: require_uri_utils.createSnapshotUri({
458
+ workspacePath: args.workspacePath,
459
+ revset: args.revision,
460
+ relativePath,
461
+ backend: adapter.backend
462
+ })
463
+ }))
464
+ });
465
+ }
466
+ async function createTargetUri(args) {
467
+ if (args.revset === "@") {
468
+ const fileUri = vscode.Uri.file(node_path.default.join(args.workspacePath, args.relativePath));
469
+ if (await vscode.workspace.fs.stat(fileUri).then(() => true, () => false)) return fileUri;
470
+ }
471
+ return require_uri_utils.createSnapshotUri({
472
+ workspacePath: args.workspacePath,
473
+ revset: args.revset,
474
+ relativePath: args.relativePath
475
+ });
476
+ }
477
+ function toHistoryRelativePath(args) {
478
+ const relativePath = node_path.default.relative(args.historyWorkspacePath, args.absolutePath).replace(/\\/g, "/");
479
+ if (!relativePath || relativePath.startsWith("..")) return;
480
+ return relativePath;
481
+ }
482
+ async function resolveJjFileFallback(args) {
483
+ if (args.adapter.backend !== "git") return;
484
+ if (!looksLikeGitRejectedJjRevset({
485
+ error: args.error,
486
+ base: args.base,
487
+ target: args.target
488
+ })) return;
489
+ const preferredWorkspacePath = node_path.default.dirname(args.absolutePath);
490
+ const { stdout } = await args.runner.runJj({
491
+ workspacePath: preferredWorkspacePath,
492
+ args: ["root"]
493
+ });
494
+ const jjRoot = stdout.trim();
495
+ if (!jjRoot) return;
496
+ const relativePath = toHistoryRelativePath({
497
+ historyWorkspacePath: jjRoot,
498
+ absolutePath: args.absolutePath
499
+ });
500
+ if (!relativePath) return;
501
+ const adapter = await require_history_adapters.resolveHistoryAdapter({
502
+ workspacePath: jjRoot,
503
+ runner: args.runner
504
+ });
505
+ if (adapter.backend !== "jj") return;
506
+ return {
507
+ adapter,
508
+ workspacePath: jjRoot,
509
+ relativePath
510
+ };
511
+ }
512
+ function looksLikeGitRejectedJjRevset(args) {
513
+ const errorMessage = args.error instanceof Error ? args.error.message : String(args.error || "");
514
+ if (!/invalid\s+object\s+name|unknown\s+revision|ambiguous\s+argument/iu.test(errorMessage)) return false;
515
+ return [args.base, args.target].some((candidate) => isLikelyJjRevset(candidate));
516
+ }
517
+ function isLikelyJjRevset(value) {
518
+ const revset = value.trim();
519
+ if (!revset) return false;
520
+ if (revset.includes("closest_bookmark(") || revset.includes("latest(") || revset.includes("::")) return true;
521
+ if (revset === "@" || revset.startsWith("@-") || revset.startsWith("@+")) return true;
522
+ return /^@[0-9]+$/u.test(revset);
523
+ }
524
+ async function resolveFileDiffTarget(args) {
525
+ const explicitTarget = getWorkspaceFileTargetFromAbsolutePath(args);
526
+ if (explicitTarget) return explicitTarget;
527
+ const activeEditorTarget = getActiveWorkspaceFileTarget(args.workspaceUri);
528
+ if (activeEditorTarget) return activeEditorTarget;
529
+ return pickOpenWorkspaceFileTarget(args.workspaceUri);
530
+ }
531
+ function getWorkspaceFileTargetFromAbsolutePath(args) {
532
+ const trimmedPath = args.absolutePath?.trim();
533
+ if (!trimmedPath) return;
534
+ return toWorkspaceFileTarget({
535
+ workspaceUri: args.workspaceUri,
536
+ fileUri: vscode.Uri.file(trimmedPath)
537
+ });
538
+ }
539
+ function getActiveWorkspaceFileTarget(workspaceUri) {
540
+ const activeEditor = vscode.window.activeTextEditor;
541
+ if (!activeEditor) return;
542
+ return toWorkspaceFileTarget({
543
+ workspaceUri,
544
+ fileUri: activeEditor.document.uri
545
+ });
546
+ }
547
+ async function pickOpenWorkspaceFileTarget(workspaceUri) {
548
+ const candidates = getOpenWorkspaceFileTargets(workspaceUri);
549
+ if (!candidates.length) return;
550
+ return (await vscode.window.showQuickPick(candidates.map((candidate) => ({
551
+ label: candidate.fileName,
552
+ description: candidate.relativePath,
553
+ detail: node_path.default.dirname(candidate.relativePath) === "." ? void 0 : node_path.default.dirname(candidate.relativePath),
554
+ target: candidate
555
+ })), { placeHolder: "Select a workspace file to diff between revisions" }))?.target;
556
+ }
557
+ function getOpenWorkspaceFileTargets(workspaceUri) {
558
+ const candidates = [];
559
+ const seenPaths = /* @__PURE__ */ new Set();
560
+ for (const group of vscode.window.tabGroups?.all || []) for (const tab of group.tabs) {
561
+ const uri = getTabUri(tab);
562
+ if (!uri || uri.scheme !== "file") continue;
563
+ const absolutePath = uri.fsPath;
564
+ if (seenPaths.has(absolutePath)) continue;
565
+ const target = toWorkspaceFileTarget({
566
+ workspaceUri,
567
+ fileUri: uri
568
+ });
569
+ if (!target) continue;
570
+ seenPaths.add(absolutePath);
571
+ candidates.push(target);
572
+ }
573
+ return candidates;
574
+ }
575
+ function toWorkspaceFileTarget(args) {
576
+ if (args.fileUri.scheme !== "file") return;
577
+ const workspaceFolder = vscode.workspace.getWorkspaceFolder(args.fileUri);
578
+ if (!workspaceFolder || !require_uri_utils.areSamePath({
579
+ left: workspaceFolder.uri.fsPath,
580
+ right: args.workspaceUri.fsPath
581
+ })) return;
582
+ const relativePath = node_path.default.relative(args.workspaceUri.fsPath, args.fileUri.fsPath).replace(/\\/g, "/");
583
+ if (!relativePath || relativePath.startsWith("..")) return;
584
+ return {
585
+ absolutePath: args.fileUri.fsPath,
586
+ relativePath,
587
+ fileName: node_path.default.basename(args.fileUri.fsPath)
588
+ };
589
+ }
590
+ function getTabUri(tab) {
591
+ return tab.input?.uri;
592
+ }
593
+ async function resolveWorkspaceUri(args) {
594
+ const explicitUri = getExplicitWorkspaceUri(args.args?.workspacePath);
595
+ if (explicitUri) {
596
+ const openWorkspaceUri = getOpenWorkspaceUri(explicitUri);
597
+ if (openWorkspaceUri) return openWorkspaceUri;
598
+ await args.context.globalState.update(require_constants.PENDING_RANGE_DIFF_KEY, require_uri_utils.sanitizeRangeDiffArgs(args.args));
599
+ await vscode.commands.executeCommand("vscode.openFolder", explicitUri, {
600
+ forceReuseWindow: true,
601
+ noRecentEntry: true
602
+ });
603
+ return "redirected";
604
+ }
605
+ const activeEditorFolder = vscode.window.activeTextEditor ? vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri) : void 0;
606
+ if (activeEditorFolder) return activeEditorFolder.uri;
607
+ if (vscode.workspace.workspaceFolders?.length === 1) return vscode.workspace.workspaceFolders[0].uri;
608
+ if (!vscode.workspace.workspaceFolders?.length) return;
609
+ return (await vscode.window.showWorkspaceFolderPick({ placeHolder: "Select the workspace to open the JJ Plus range diff in" }))?.uri;
610
+ }
611
+ async function resumePendingRangeDiff(args) {
612
+ const pendingArgs = args.context.globalState.get(require_constants.PENDING_RANGE_DIFF_KEY);
613
+ if (!pendingArgs) return;
614
+ const explicitUri = getExplicitWorkspaceUri(pendingArgs.workspacePath);
615
+ if (!explicitUri) {
616
+ await args.context.globalState.update(require_constants.PENDING_RANGE_DIFF_KEY, void 0);
617
+ return;
618
+ }
619
+ if (!getOpenWorkspaceUri(explicitUri)) return;
620
+ await args.context.globalState.update(require_constants.PENDING_RANGE_DIFF_KEY, void 0);
621
+ await args.openRangeMultiDiff(pendingArgs);
622
+ }
623
+ function getExplicitWorkspaceUri(workspacePath) {
624
+ const trimmed = workspacePath?.trim();
625
+ return trimmed ? vscode.Uri.file(trimmed) : void 0;
626
+ }
627
+ function getOpenWorkspaceUri(explicitUri) {
628
+ return (vscode.workspace.workspaceFolders?.find((folder) => require_uri_utils.areSamePath({
629
+ left: folder.uri.fsPath,
630
+ right: explicitUri.fsPath
631
+ })))?.uri;
632
+ }
633
+ function getFromValue(args) {
634
+ return args?.from?.trim() || args?.base?.trim() || "closest_bookmark(@)";
635
+ }
636
+ function getToValue(args) {
637
+ return args?.to?.trim() || args?.target?.trim() || "@";
638
+ }
639
+ function shouldPromptForInputs(args) {
640
+ return args?.source !== "cli" || args?.confirm === true;
641
+ }
642
+ async function resolveInput(args) {
643
+ return (await vscode.window.showInputBox({
644
+ prompt: args.prompt,
645
+ placeHolder: args.placeHolder,
646
+ value: args.value?.trim() || args.placeHolder,
647
+ ignoreFocusOut: true,
648
+ validateInput(value) {
649
+ return value.trim() ? void 0 : "Value is required";
650
+ }
651
+ }))?.trim() || void 0;
652
+ }
653
+ //#endregion
654
+ exports.activate = activate;
655
+ exports.deactivate = deactivate;
656
+
657
+ //# sourceMappingURL=index.cjs.map