diffing 0.10.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +77 -32
  2. package/dist/{cli-agent-BBHx1lLJ.mjs → cli-agent-DkwGxuy2.mjs} +43 -12
  3. package/dist/{cli-gh-B8HybRWZ.mjs → cli-gh-D0NfKpOp.mjs} +4 -4
  4. package/dist/cli.mjs +165 -35
  5. package/dist/client/assets/{angular-html-Bn7xcK-X.js → angular-html-Dl53kkiy.js} +1 -1
  6. package/dist/client/assets/{angular-ts-qK80FnOc.js → angular-ts-wNJFFkey.js} +1 -1
  7. package/dist/client/assets/{apl-BhBHq9NH.js → apl-BxtQST-h.js} +1 -1
  8. package/dist/client/assets/{arc-BbRWqKdi.js → arc-CBmZuzPB.js} +1 -1
  9. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DkAZjTe2.js → architectureDiagram-3BPJPVTR-CEci_K9f.js} +1 -1
  10. package/dist/client/assets/{astro--A8NjYkS.js → astro-BpADD5rh.js} +1 -1
  11. package/dist/client/assets/{blade-DUJ_WZzW.js → blade-B4I5SQmP.js} +1 -1
  12. package/dist/client/assets/{blockDiagram-GPEHLZMM-BJnX6alY.js → blockDiagram-GPEHLZMM-DcKhDtnE.js} +1 -1
  13. package/dist/client/assets/{c-Ddzn0JTQ.js → c-C3VtOgg8.js} +1 -1
  14. package/dist/client/assets/{c4Diagram-AAUBKEIU-B_JFq-Tk.js → c4Diagram-AAUBKEIU-CaHozoxF.js} +1 -1
  15. package/dist/client/assets/channel-Ct4-oSQN.js +1 -0
  16. package/dist/client/assets/{chunk-2J33WTMH-CCnCUy9H.js → chunk-2J33WTMH-tvuzKhdK.js} +1 -1
  17. package/dist/client/assets/{chunk-3OPIFGDE-CJvhnVzd.js → chunk-3OPIFGDE-D_nBoD9w.js} +1 -1
  18. package/dist/client/assets/{chunk-4BX2VUAB-7gGFn4DW.js → chunk-4BX2VUAB-yHPdy1G8.js} +1 -1
  19. package/dist/client/assets/{chunk-55IACEB6-CRirC3B0.js → chunk-55IACEB6-yXpL8wjV.js} +1 -1
  20. package/dist/client/assets/{chunk-5ZQYHXKU-DSagYOhc.js → chunk-5ZQYHXKU-DZ5cvCDV.js} +1 -1
  21. package/dist/client/assets/{chunk-727SXJPM-2fqFvPdL.js → chunk-727SXJPM-CJjgOWmY.js} +1 -1
  22. package/dist/client/assets/{chunk-AQP2D5EJ-8l-kDb0Q.js → chunk-AQP2D5EJ-CQYQKXSE.js} +1 -1
  23. package/dist/client/assets/{chunk-BSJP7CBP-BjTEoy7R.js → chunk-BSJP7CBP-CP_f908b.js} +1 -1
  24. package/dist/client/assets/{chunk-CSCIHK7Q-CeHxe0Uf.js → chunk-CSCIHK7Q-tcgA8jR0.js} +1 -1
  25. package/dist/client/assets/{chunk-FMBD7UC4-X-OwPNTB.js → chunk-FMBD7UC4-DlpmhBYg.js} +1 -1
  26. package/dist/client/assets/{chunk-KSCS5N6A-rYccR2Ju.js → chunk-KSCS5N6A-BkfieXpV.js} +1 -1
  27. package/dist/client/assets/{chunk-L5ZTLDWV-8JMoad-S.js → chunk-L5ZTLDWV-BjVXSZnt.js} +1 -1
  28. package/dist/client/assets/{chunk-LZXEDZCA-DOvCLema.js → chunk-LZXEDZCA-CaAWmy4Q.js} +2 -2
  29. package/dist/client/assets/{chunk-ND2GUHAM-CQQJmqC8.js → chunk-ND2GUHAM-kWh41zUn.js} +1 -1
  30. package/dist/client/assets/{chunk-NZK2D7GU-DPwHQE2m.js → chunk-NZK2D7GU-CDrIi44_.js} +1 -1
  31. package/dist/client/assets/{chunk-O5CBEL6O-Bvzv6QAN.js → chunk-O5CBEL6O-CbNGK3Te.js} +1 -1
  32. package/dist/client/assets/chunk-QZHKN3VN-BXhKFVX7.js +1 -0
  33. package/dist/client/assets/chunk-WU5MYG2G-_EwuC51_.js +1 -0
  34. package/dist/client/assets/{chunk-XPW4576I-DY1teoyy.js → chunk-XPW4576I-Cca0fTtG.js} +1 -1
  35. package/dist/client/assets/classDiagram-4FO5ZUOK-C8bdx9R4.js +1 -0
  36. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B26wrQuH.js +1 -0
  37. package/dist/client/assets/{cobol-EaVCzYAO.js → cobol-j-6eG2UQ.js} +1 -1
  38. package/dist/client/assets/{coffee-CbmPxJhz.js → coffee-CZLH0dtt.js} +1 -1
  39. package/dist/client/assets/{cose-bilkent-S5V4N54A-zMLfkB6c.js → cose-bilkent-S5V4N54A-DlxESVex.js} +1 -1
  40. package/dist/client/assets/{cpp-1v8ov4EG.js → cpp-j6Bp24RI.js} +1 -1
  41. package/dist/client/assets/{crystal-B88NqWAb.js → crystal-DW7wcFUs.js} +1 -1
  42. package/dist/client/assets/{css-QFeW3BCZ.js → css-C43BDU2i.js} +1 -1
  43. package/dist/client/assets/{dagre-BM42HDAG-DxGKZBBq.js → dagre-BM42HDAG-BaemEJFh.js} +1 -1
  44. package/dist/client/assets/{diagram-2AECGRRQ-CiUL7Dov.js → diagram-2AECGRRQ-BaM-bkJ3.js} +1 -1
  45. package/dist/client/assets/{diagram-5GNKFQAL-DCs97wXn.js → diagram-5GNKFQAL-BOH04DJO.js} +1 -1
  46. package/dist/client/assets/{diagram-KO2AKTUF-BsSJWXqr.js → diagram-KO2AKTUF-BP5MyqDZ.js} +1 -1
  47. package/dist/client/assets/{diagram-LMA3HP47-LDuP4WAy.js → diagram-LMA3HP47-Dt4gKMYF.js} +1 -1
  48. package/dist/client/assets/{diagram-OG6HWLK6-CKjIVoHx.js → diagram-OG6HWLK6-DoT1VshN.js} +1 -1
  49. package/dist/client/assets/{dist-BvtPW002.js → dist-DEAxvC4F.js} +1 -1
  50. package/dist/client/assets/{edge-5UREsVXQ.js → edge-D9ySFlnD.js} +1 -1
  51. package/dist/client/assets/{elixir-B_Yali6w.js → elixir-CoJz_LQ5.js} +1 -1
  52. package/dist/client/assets/{elm-STYz8ayI.js → elm-CvedWh_e.js} +1 -1
  53. package/dist/client/assets/{erDiagram-TEJ5UH35-D7iBLlYp.js → erDiagram-TEJ5UH35-CMP78FsQ.js} +1 -1
  54. package/dist/client/assets/{erb-CHRx3Beu.js → erb-lD_yYZsm.js} +1 -1
  55. package/dist/client/assets/{flowDiagram-I6XJVG4X-Dr2J9T5z.js → flowDiagram-I6XJVG4X-Dp0s5BFj.js} +1 -1
  56. package/dist/client/assets/{ganttDiagram-6RSMTGT7-Bb1v2M1H.js → ganttDiagram-6RSMTGT7-GmSG31U-.js} +1 -1
  57. package/dist/client/assets/{git-rebase-CFmRpmLK.js → git-rebase-DwZABzof.js} +1 -1
  58. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-DP9xmnTA.js → gitGraphDiagram-PVQCEYII-C1SXShag.js} +1 -1
  59. package/dist/client/assets/{glimmer-js-CdrEdtzi.js → glimmer-js-CWcs3w1Z.js} +1 -1
  60. package/dist/client/assets/{glimmer-ts-CzrwZqCl.js → glimmer-ts-CrzGN4lJ.js} +1 -1
  61. package/dist/client/assets/{glsl-Cb4XetAc.js → glsl-DRCtwX7h.js} +1 -1
  62. package/dist/client/assets/{graphql-mqi9K2_l.js → graphql-rpmrismS.js} +1 -1
  63. package/dist/client/assets/{hack-DaFJ7htO.js → hack-Ba02RnuQ.js} +1 -1
  64. package/dist/client/assets/{haml-Bw7q4nKg.js → haml-BHBACStm.js} +1 -1
  65. package/dist/client/assets/{handlebars-mj81MoXX.js → handlebars-BtlQ1SCa.js} +1 -1
  66. package/dist/client/assets/{html-LHrj0-2t.js → html-BkVU3Dge.js} +1 -1
  67. package/dist/client/assets/{html-derivative-L3_OYrFu.js → html-derivative-DoK92vwi.js} +1 -1
  68. package/dist/client/assets/{http-DE0OFe2c.js → http-CJAwKSPH.js} +1 -1
  69. package/dist/client/assets/{hurl-CNbk7fqf.js → hurl-kaX5jwuN.js} +1 -1
  70. package/dist/client/assets/{index-DHt5Hu--.js → index-BHeNiC07.js} +261 -199
  71. package/dist/client/assets/index-D8hOoJCg.css +1 -0
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-wxqSmRV0.js → infoDiagram-5YYISTIA-B0i3BlNR.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-CJa0qhXu.js → ishikawaDiagram-YF4QCWOH-BN8sEei4.js} +1 -1
  74. package/dist/client/assets/{java-DAwMoXxA.js → java-BvrigIoq.js} +1 -1
  75. package/dist/client/assets/{javascript-_a2prAz7.js → javascript-DZkPTYAi.js} +1 -1
  76. package/dist/client/assets/{jinja-JKFA3bu8.js → jinja-Ceg7ui1S.js} +1 -1
  77. package/dist/client/assets/{jison-UbTjhW7k.js → jison-iE1GaOyN.js} +1 -1
  78. package/dist/client/assets/{journeyDiagram-JHISSGLW-Bh5L3OBN.js → journeyDiagram-JHISSGLW-CE6O3NhU.js} +1 -1
  79. package/dist/client/assets/{json-D74F0BDU.js → json-C0j8rEcg.js} +1 -1
  80. package/dist/client/assets/{jsx-BsH2-gDN.js → jsx-B7eXljgz.js} +1 -1
  81. package/dist/client/assets/{julia-DyIO_Gy0.js → julia-DMDw0aMP.js} +1 -1
  82. package/dist/client/assets/{just-VQTFAZJr.js → just-BryMKRJ_.js} +1 -1
  83. package/dist/client/assets/{kanban-definition-UN3LZRKU-BB2voi9I.js → kanban-definition-UN3LZRKU-j-aU6Yzp.js} +1 -1
  84. package/dist/client/assets/{latex-D0ONGfIo.js → latex-BNC9-sjr.js} +1 -1
  85. package/dist/client/assets/{line-BkbHeSM4.js → line-CyEqpEDp.js} +1 -1
  86. package/dist/client/assets/{linear-BYUYqOy1.js → linear-CXeaA9km.js} +1 -1
  87. package/dist/client/assets/{liquid-BnYpmfMl.js → liquid-D-fQw-oJ.js} +1 -1
  88. package/dist/client/assets/{lua-WlA-m2lC.js → lua-CD2aJ_rS.js} +1 -1
  89. package/dist/client/assets/{marko-Bd44681W.js → marko-BQ37hu6z.js} +1 -1
  90. package/dist/client/assets/{mdc-DhosSoGv.js → mdc-B5NUi3zZ.js} +1 -1
  91. package/dist/client/assets/{mermaid-parser.core-Dq0EOOjQ.js → mermaid-parser.core-BxHF_XbX.js} +1 -1
  92. package/dist/client/assets/{mermaid.core-qcl7ght-.js → mermaid.core-BUtaf4P1.js} +3 -3
  93. package/dist/client/assets/{mindmap-definition-RKZ34NQL-DrZ9di3F.js → mindmap-definition-RKZ34NQL-D13tPu2o.js} +1 -1
  94. package/dist/client/assets/{nginx-sYwNRk-F.js → nginx-1W1E03Rg.js} +1 -1
  95. package/dist/client/assets/{nim-DrXU2tn9.js → nim-C5A88bFP.js} +1 -1
  96. package/dist/client/assets/{perl-TEELuyd-.js → perl-BYoP0wNt.js} +1 -1
  97. package/dist/client/assets/{php-Dy_Y1r8j.js → php-CFxna09e.js} +1 -1
  98. package/dist/client/assets/{pieDiagram-4H26LBE5-Aev8QdJC.js → pieDiagram-4H26LBE5-CHL7Ml5w.js} +1 -1
  99. package/dist/client/assets/{pug-vancrY0a.js → pug-BR4JgWAk.js} +1 -1
  100. package/dist/client/assets/{qml-BA5z-zbf.js → qml-D1U1EFEe.js} +1 -1
  101. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-DhEDvxx7.js → quadrantDiagram-W4KKPZXB-BnYtv-HY.js} +1 -1
  102. package/dist/client/assets/{r-BR0O4N-s.js → r-ChE6X060.js} +1 -1
  103. package/dist/client/assets/{razor-DXiNCb-5.js → razor-B5iVfQMe.js} +1 -1
  104. package/dist/client/assets/{regexp-BhjJa9MI.js → regexp-Dz2drUIf.js} +1 -1
  105. package/dist/client/assets/{requirementDiagram-4Y6WPE33-DPS5siTy.js → requirementDiagram-4Y6WPE33-D8QEGLKB.js} +1 -1
  106. package/dist/client/assets/{review-export-DABY3y7y.js → review-export-CvFFbCAB.js} +1 -1
  107. package/dist/client/assets/{rst-Bi3zId1d.js → rst-DZM3RGRs.js} +1 -1
  108. package/dist/client/assets/{ruby-BURiJKuD.js → ruby-DkXnm-J8.js} +1 -1
  109. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-CjZF2AQd.js → sankeyDiagram-5OEKKPKP-wVaks6lB.js} +1 -1
  110. package/dist/client/assets/{sas-BO_W1LuL.js → sas-DMbpc71c.js} +1 -1
  111. package/dist/client/assets/{scss-BPUTinXb.js → scss-IwVMMp22.js} +1 -1
  112. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-0rsTmBLB.js → sequenceDiagram-3UESZ5HK-Cg31TB-R.js} +1 -1
  113. package/dist/client/assets/{shellscript-B4rfo4qg.js → shellscript-CIStAKx3.js} +1 -1
  114. package/dist/client/assets/{shellsession-DLX-O8m7.js → shellsession-uLtzHhlo.js} +1 -1
  115. package/dist/client/assets/{soy-BEUiwSVD.js → soy-BkxBYigm.js} +1 -1
  116. package/dist/client/assets/{sql-CwSA8v_H.js → sql-Ba9y9EvJ.js} +1 -1
  117. package/dist/client/assets/{src-Cn22-GjE.js → src-9MKexpFu.js} +1 -1
  118. package/dist/client/assets/{stata-XfdBiAnW.js → stata-CrPCbiIZ.js} +1 -1
  119. package/dist/client/assets/{stateDiagram-AJRCARHV-BVvCsgjA.js → stateDiagram-AJRCARHV-BbvNjVF6.js} +1 -1
  120. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-B5BbZkU5.js +1 -0
  121. package/dist/client/assets/{surrealql-COaehKkS.js → surrealql-Dvip5u_o.js} +1 -1
  122. package/dist/client/assets/{svelte-B0kTIq0J.js → svelte-xBLD60Zd.js} +1 -1
  123. package/dist/client/assets/{templ-DGxWfDf-.js → templ-CWv68xbP.js} +1 -1
  124. package/dist/client/assets/{tex-C9X3gjZ2.js → tex-CHqz-fYs.js} +1 -1
  125. package/dist/client/assets/{timeline-definition-PNZ67QCA-B535P7_e.js → timeline-definition-PNZ67QCA-CWKkJ3QZ.js} +1 -1
  126. package/dist/client/assets/{ts-tags-By9ETsTC.js → ts-tags-DS82EDuE.js} +1 -1
  127. package/dist/client/assets/{tsx-CvVX506n.js → tsx-B2GBjp2F.js} +1 -1
  128. package/dist/client/assets/{twig-CjLWv7eu.js → twig-CC8x9pG0.js} +1 -1
  129. package/dist/client/assets/{typescript-BEq3u3Bc.js → typescript-g7i13lnC.js} +1 -1
  130. package/dist/client/assets/{vennDiagram-CIIHVFJN-CTV9H1N2.js → vennDiagram-CIIHVFJN-OLItKWeg.js} +1 -1
  131. package/dist/client/assets/{vue-html-92z_Aqn0.js → vue-html-D9GQtYub.js} +1 -1
  132. package/dist/client/assets/{vue-DYazforU.js → vue-rFbe7luB.js} +1 -1
  133. package/dist/client/assets/{vue-vine-VY7raYSI.js → vue-vine-mrNtQtY5.js} +1 -1
  134. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-BzJaykc6.js → wardleyDiagram-YWT4CUSO-Dy1yfeb4.js} +1 -1
  135. package/dist/client/assets/{xml-hd7OQ798.js → xml-CHfMjyAM.js} +1 -1
  136. package/dist/client/assets/{xsl-MkuT76g1.js → xsl-BFkNSogJ.js} +1 -1
  137. package/dist/client/assets/{xychartDiagram-2RQKCTM6-D36D8smx.js → xychartDiagram-2RQKCTM6-DfSnfjVL.js} +1 -1
  138. package/dist/client/assets/{yaml-D6zRzOR2.js → yaml-BfSgHc04.js} +1 -1
  139. package/dist/client/index.html +2 -2
  140. package/dist/{completions-Csvfqctx.mjs → completions-BO2DUM-8.mjs} +23 -1
  141. package/dist/{doctor-B3Nrydc0.mjs → doctor-D0Y3kOY7.mjs} +5 -4
  142. package/dist/{find-tui-binary-CRpbYXLC.mjs → find-tui-binary-B71xiwWu.mjs} +33 -15
  143. package/dist/github-CErBub2y.mjs +2 -0
  144. package/dist/{github-Cf5blBty.mjs → github-DBsZ0h_l.mjs} +47 -5
  145. package/dist/github-attachments-plDeB0iE.mjs +351 -0
  146. package/dist/handoff-LAFtmnHf.mjs +11 -0
  147. package/dist/{mcp-DwnYjFS0.mjs → mcp-DtVrMR2S.mjs} +41 -22
  148. package/dist/native/tui-darwin-arm64/diffing-tui +0 -0
  149. package/dist/native/tui-darwin-x64/diffing-tui +0 -0
  150. package/dist/native/tui-linux-arm64-gnu/diffing-tui +0 -0
  151. package/dist/native/tui-linux-arm64-musl/diffing-tui +0 -0
  152. package/dist/native/tui-linux-x64-gnu/diffing-tui +0 -0
  153. package/dist/native/tui-linux-x64-musl/diffing-tui +0 -0
  154. package/dist/native/tui-win32-x64-msvc/diffing-tui.exe +0 -0
  155. package/dist/{review-export-DjxKBeIZ.mjs → review-export-B63eRAVa.mjs} +1 -1
  156. package/dist/{settings-bwe7yQ8U.mjs → search-BMPY_ZW8.mjs} +117 -97
  157. package/dist/search-BO9Im7eu.mjs +2 -0
  158. package/dist/{server-CZeMCHEa.mjs → server-j0PnTVX1.mjs} +174 -75
  159. package/dist/server-lock-CY0_1mcS.mjs +275 -0
  160. package/dist/session-conflict-C6V9ZKo7.mjs +96 -0
  161. package/dist/session-manager-CYNchhVA.mjs +159 -0
  162. package/dist/settings-yK0GYpbn.mjs +60 -0
  163. package/dist/tui-search-bridge-Bfb2ktdA.mjs +133 -0
  164. package/package.json +6 -4
  165. package/dist/client/assets/channel-BcJKoISM.js +0 -1
  166. package/dist/client/assets/chunk-QZHKN3VN-90aaHYyK.js +0 -1
  167. package/dist/client/assets/chunk-WU5MYG2G-CfaWSqjJ.js +0 -1
  168. package/dist/client/assets/classDiagram-4FO5ZUOK-CsDELGUF.js +0 -1
  169. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-R5SygY4h.js +0 -1
  170. package/dist/client/assets/index-B42c0TyV.css +0 -1
  171. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Bo6SeNmU.js +0 -1
  172. package/dist/github-DWgPIcKC.mjs +0 -2
  173. package/dist/server-lock-uqSdDYeR.mjs +0 -153
  174. /package/dist/{apply-suggestion-BAuyCYk6.mjs → apply-suggestion-CHYnw68I.mjs} +0 -0
  175. /package/dist/{comment-format-B5AcGcR-.mjs → comment-format-B85NHZnG.mjs} +0 -0
  176. /package/dist/{diff-fingerprint-CWa-soYD.mjs → diff-fingerprint-BgR0tu1o.mjs} +0 -0
  177. /package/dist/{plan-format-BQyx--mp.mjs → plan-format-BwJh5JSE.mjs} +0 -0
  178. /package/dist/{update-check-fe0tR8tx.mjs → update-check-Copcz9eb.mjs} +0 -0
@@ -1,8 +1,9 @@
1
1
  import { C as isSafePath, S as revertHunk, _ as getUntrackedFilePathsAsync, a as getCustomGitDiffAsync, b as listRepoFiles, c as getGitDiffAsync, d as getProjectStorageDir, f as getRepoName, g as getTabSizeForFiles, h as getShowDiff, i as getCommitSeriesSummary, l as getHunkHistory, o as getFileContent, p as getRepoRoot, r as getBranchName, u as getMergeStatus, v as gitAddFile, w as toSafeRelativePath, y as isGitRepo } from "./git-Czo96ymM.mjs";
2
- import { a as searchContent, c as trackSelection, i as searchAll, n as saveSettings, o as searchFiles, r as getSearchStatus, s as searchSymbols, t as loadSettings } from "./settings-bwe7yQ8U.mjs";
3
- import { t as formatComments } from "./comment-format-B5AcGcR-.mjs";
4
- import { n as formatPlanReview, r as sectionTitleForLine, t as extractPlanLines } from "./plan-format-BQyx--mp.mjs";
5
- import { D as updatePrReviewComment, E as submitReview, S as refreshPrSession, T as setPrReviewThreadResolved, a as detectCwdRepo, b as parsePrRef, f as fetchPrFileContentViaGh, i as deletePrReviewComment, l as fetchExistingCommentsViaGh, t as buildPrSession, u as fetchExistingReviewsViaGh, w as resolvedFromSession } from "./github-Cf5blBty.mjs";
2
+ import { a as searchFiles, i as searchContent, o as searchSymbols, r as searchAll, s as trackSelection, t as getSearchStatus } from "./search-BMPY_ZW8.mjs";
3
+ import { n as saveSettings, t as loadSettings } from "./settings-yK0GYpbn.mjs";
4
+ import { t as formatComments } from "./comment-format-B85NHZnG.mjs";
5
+ import { n as formatPlanReview, r as sectionTitleForLine, t as extractPlanLines } from "./plan-format-BwJh5JSE.mjs";
6
+ import { D as updatePrReviewComment, E as submitReview, S as refreshPrSession, T as setPrReviewThreadResolved, a as detectCwdRepo, b as parsePrRef, f as fetchPrFileContentViaGh, i as deletePrReviewComment, l as fetchExistingCommentsViaGh, t as buildPrSession, u as fetchExistingReviewsViaGh, w as resolvedFromSession } from "./github-DBsZ0h_l.mjs";
6
7
  import { execFileSync } from "node:child_process";
7
8
  import { createHash } from "node:crypto";
8
9
  import { fileURLToPath } from "node:url";
@@ -34,6 +35,7 @@ const DEFAULTS = {
34
35
  pickaxeAll: false,
35
36
  exitCode: false,
36
37
  quiet: false,
38
+ suppressPatch: false,
37
39
  noPrefix: false,
38
40
  binary: false,
39
41
  fullIndex: false,
@@ -51,11 +53,14 @@ const DEFAULTS = {
51
53
  outputMode: "auto",
52
54
  host: "127.0.0.1",
53
55
  noOpen: false,
56
+ reuseSession: false,
57
+ replaceSession: false,
54
58
  help: false,
55
59
  version: false,
56
60
  includeUnstaged: true,
57
61
  includeUntracked: true,
58
62
  tui: false,
63
+ viewOnly: false,
59
64
  gpu: false,
60
65
  showMode: false,
61
66
  showRevspecs: []
@@ -179,6 +184,14 @@ const DIFFING_OPTIONS = {
179
184
  type: "boolean",
180
185
  default: false
181
186
  },
187
+ "reuse-session": {
188
+ type: "boolean",
189
+ default: false
190
+ },
191
+ "replace-session": {
192
+ type: "boolean",
193
+ default: false
194
+ },
182
195
  web: {
183
196
  type: "boolean",
184
197
  default: false
@@ -191,6 +204,10 @@ const DIFFING_OPTIONS = {
191
204
  type: "boolean",
192
205
  default: false
193
206
  },
207
+ view: {
208
+ type: "boolean",
209
+ default: false
210
+ },
194
211
  gpu: {
195
212
  type: "boolean",
196
213
  default: false
@@ -216,6 +233,7 @@ function printHelp() {
216
233
 
217
234
  Usage: diffing [<git diff options>] [<revision>...] [-- <path>...]
218
235
  diffing --web [<git diff options>] [<revision>...] [-- <path>...]
236
+ diffing view [<git diff options>] [<revision>...] [-- <path>...]
219
237
  diffing [server options]
220
238
 
221
239
  Git Diff Options (drop-in replacement for git diff):`);
@@ -226,21 +244,26 @@ Diffing Server Options:
226
244
  --host <host> Host address to bind to (default: 127.0.0.1). Pass
227
245
  0.0.0.0 to expose the server to the local network.
228
246
  --no-open Don't open the browser automatically
247
+ --reuse-session Open the active review instead of starting another
248
+ --replace-session Stop the active review and start a replacement
229
249
  --gh-pr <ref> Open a GitHub PR review session (number, owner/repo#N, or URL)
230
250
  Same as: diffing "gh pr <ref>"
231
251
 
232
252
  Output Modes:
233
253
  By default diffing auto-selects the best output mode:
234
254
  - Terminal mode: when output is a pipe, redirect, or non-TTY
235
- - Web mode: when output is a TTY (interactive terminal)
255
+ - Web or TUI: saved preference for an interactive terminal (web by default)
236
256
 
237
- Force a mode with --web, --terminal, or --tui flags.
257
+ Force a mode with --web, --terminal, --tui, or --view flags.
258
+ Change the interactive default with: diffing mode <web|tui>
259
+ --view opens a focused, read-only diff browser with fff-powered search.
238
260
  --tui is experimental and opt-in. It opens a native-Rust terminal
239
261
  interface that mirrors the web dashboard. Falls back to git diff
240
262
  output if the environment cannot support a TUI (piped stdin, CI,
241
263
  missing binary).
242
264
 
243
265
  Subcommands:
266
+ view [diff options] Browse diffs in the focused read-only native TUI
244
267
  show <revspec>... Drop-in for 'git show'. Renders commit metadata
245
268
  above the diff. Accepts commits, ranges, tags.
246
269
  await-review Block until human clicks Send to agent; print XML
@@ -250,11 +273,13 @@ Subcommands:
250
273
  comment edit|delete <id>
251
274
  progress --message … Live agent progress toast
252
275
  url Print the active review base URL
276
+ sessions List, select, open, and stop running review sessions
253
277
  plan <submit|await|list|show|versions|reply|resolve>
254
278
  gh <status|overview|threads|reviews|pr-fetch|pr-list-comments|pr-review>
255
279
  mcp [--repo PATH] Stdio MCP server for agents
256
280
  inspect <summary|files|hunks|slice|search>
257
281
  Bounded reads from a running web, TUI, or PR session
282
+ mode [web|tui] Get or set the default interactive review mode
258
283
  doctor Environment self-check
259
284
  completion <bash|zsh|fish>
260
285
  update Check for a newer npm release
@@ -263,7 +288,7 @@ Custom ranges (e.g. main..feature) and 'gh pr' sessions also display a
263
288
  "what is this diff" banner in the web UI summarising the diff source.
264
289
 
265
290
  Examples:
266
- diffing Review uncommitted changes (web UI)
291
+ diffing Review uncommitted changes (preferred UI)
267
292
  diffing --staged Review staged changes
268
293
  diffing HEAD~3 Review last 3 commits
269
294
  diffing main..feature Compare branches
@@ -276,7 +301,11 @@ Examples:
276
301
  diffing --word-diff=color Word-level diff in color
277
302
  diffing -b -w Ignore whitespace changes
278
303
  diffing --host 0.0.0.0 Allow other machines on the LAN to review
304
+ diffing view Browse the working-tree diff in the TUI
305
+ diffing view --staged Browse staged changes
306
+ diffing --view main..feature Browse a branch comparison
279
307
  diffing --tui Open the experimental TUI (native Rust)
308
+ diffing mode tui Use the TUI by default in interactive terminals
280
309
  diffing await-review Agent: wait for human handoff
281
310
  diffing plan submit PLAN.md Agent: submit a plan for approval
282
311
  diffing mcp --repo /abs/path MCP server bound to one repository
@@ -467,7 +496,7 @@ function preprocessOptionalValueArgs(rawArgs) {
467
496
  * 3. Parse known flags via node:util.parseArgs
468
497
  * 4. Anything unknown / positional becomes a revision or pathspec
469
498
  */
470
- function parseDiffOptions(rawArgs) {
499
+ function parseDiffOptions(rawArgs, defaultInteractiveMode = "web") {
471
500
  const { values, positionals } = parseArgs({
472
501
  options: {
473
502
  ...GIT_DIFF_OPTIONS,
@@ -488,7 +517,10 @@ function parseDiffOptions(rawArgs) {
488
517
  if (values.port) opts.port = parseInt(values.port, 10);
489
518
  if (values.host) opts.host = values.host;
490
519
  if (values["no-open"]) opts.noOpen = true;
520
+ if (values["reuse-session"]) opts.reuseSession = true;
521
+ if (values["replace-session"]) opts.replaceSession = true;
491
522
  if (values["gh-pr"]) opts.ghPr = String(values["gh-pr"]);
523
+ if (values.view) opts.viewOnly = true;
492
524
  if (values.staged || values.cached) opts.staged = true;
493
525
  if (values.merge) opts.merge = true;
494
526
  const algo = values["diff-algorithm"];
@@ -572,8 +604,14 @@ function parseDiffOptions(rawArgs) {
572
604
  if (values.dirstat) opts.dirstat = values.dirstat;
573
605
  if (values["dirstat-by-file"]) opts.dirstatByFile = values["dirstat-by-file"];
574
606
  if (values.cumulative) opts.cumulative = true;
575
- if (values["no-patch"]) opts.outputFormat = void 0;
576
- if (values.check) opts.outputFormat = void 0;
607
+ if (values["no-patch"]) {
608
+ opts.outputFormat = void 0;
609
+ opts.suppressPatch = true;
610
+ }
611
+ if (values.check) {
612
+ opts.outputFormat = void 0;
613
+ opts.check = true;
614
+ }
577
615
  if (values["diff-filter"]) opts.diffFilter = values["diff-filter"];
578
616
  if (values.S) opts.pickaxeString = values.S;
579
617
  if (values.G) opts.pickaxeRegex = values.G;
@@ -622,12 +660,13 @@ function parseDiffOptions(rawArgs) {
622
660
  }
623
661
  for (let i = dashDashIdx + 1; i < rawArgs.length; i++) opts.pathspecs.push(rawArgs[i]);
624
662
  } else for (const p of positionals) opts.revisions.push(p);
625
- if (values.tui) opts.outputMode = "tui";
663
+ if (values.view) opts.outputMode = "tui";
664
+ else if (values.tui) opts.outputMode = "tui";
626
665
  else if (values.web) opts.outputMode = "web";
627
666
  else if (values.terminal) opts.outputMode = "terminal";
628
- if (process.stdout.isTTY && opts.outputMode === "auto") opts.outputMode = "web";
667
+ if (process.stdout.isTTY && opts.outputMode === "auto") opts.outputMode = values["gh-pr"] ? "web" : defaultInteractiveMode;
629
668
  else if (!process.stdout.isTTY && opts.outputMode === "auto") opts.outputMode = "terminal";
630
- if (opts.outputFormat || opts.patchWithRaw || opts.patchWithStat || opts.exitCode || opts.quiet || opts.outputFile) opts.outputMode = "terminal";
669
+ if (opts.outputFormat || opts.patchWithRaw || opts.patchWithStat || opts.compactSummary || opts.dirstat || opts.dirstatByFile || opts.cumulative || opts.suppressPatch || opts.check || opts.exitCode || opts.quiet || opts.outputFile || opts.colorMoved || opts.colorMovedWs || opts.srcPrefix || opts.dstPrefix || opts.noPrefix || opts.linePrefix || opts.submodule !== void 0 && opts.submodule !== "diff" || opts.extDiff) opts.outputMode = "terminal";
631
670
  return opts;
632
671
  }
633
672
  /**
@@ -679,6 +718,7 @@ function buildGitDiffArgs(opts) {
679
718
  if (opts.dirstatByFile) args.push(`--dirstat-by-file=${opts.dirstatByFile}`);
680
719
  if (opts.cumulative) args.push("--cumulative");
681
720
  if (opts.check) args.push("--check");
721
+ if (opts.suppressPatch) args.push("--no-patch");
682
722
  if (opts.diffFilter) args.push(`--diff-filter=${opts.diffFilter}`);
683
723
  if (opts.pickaxeString) args.push(`-S${opts.pickaxeString}`);
684
724
  if (opts.pickaxeRegex) args.push(`-G${opts.pickaxeRegex}`);
@@ -709,6 +749,23 @@ function buildGitDiffArgs(opts) {
709
749
  return args;
710
750
  }
711
751
  /**
752
+ * Build the machine-stable patch arguments consumed by the native index.
753
+ * Presentation-only word/color modes are implemented by the renderer and
754
+ * must not rewrite the unified patch stream that Rust parses.
755
+ */
756
+ function buildTuiGitDiffArgs(opts) {
757
+ return buildGitDiffArgs({
758
+ ...opts,
759
+ revisions: opts.showMode ? [...opts.showRevspecs] : [...opts.revisions],
760
+ pathspecs: [...opts.pathspecs],
761
+ wordDiff: void 0,
762
+ wordDiffRegex: void 0,
763
+ colorWords: void 0,
764
+ colorMoved: void 0,
765
+ colorMovedWs: void 0
766
+ });
767
+ }
768
+ /**
712
769
  * Transform a `parseDiffOptions(...)` result into a "show mode" variant:
713
770
  * moves any parsed revisions into `showRevspecs`, clears `revisions` (so the
714
771
  * existing diff-engine path does not try to `git diff` them), and sets the
@@ -1141,6 +1198,7 @@ function validateEnvironment() {
1141
1198
  var FileCommentStore = class {
1142
1199
  dirPath;
1143
1200
  filePath;
1201
+ mutationQueue = Promise.resolve();
1144
1202
  /**
1145
1203
  * @param storageDir Absolute directory to persist `comments.json` in.
1146
1204
  * Defaults to the per-repo storage dir under `~/.diffing` — comments are
@@ -1172,74 +1230,100 @@ var FileCommentStore = class {
1172
1230
  console.error("Failed to save comments to file:", err);
1173
1231
  }
1174
1232
  }
1233
+ /** Serialize each read-modify-write cycle so concurrent API calls cannot overwrite one another. */
1234
+ enqueueMutation(operation) {
1235
+ const result = this.mutationQueue.then(operation, operation);
1236
+ this.mutationQueue = result.then(() => void 0, () => void 0);
1237
+ return result;
1238
+ }
1175
1239
  async add(comment) {
1176
- const comments = await this.getAll();
1177
- comments.push(comment);
1178
- await this.save(comments);
1179
- return comment;
1240
+ return this.enqueueMutation(async () => {
1241
+ const comments = await this.getAll();
1242
+ comments.push(comment);
1243
+ await this.save(comments);
1244
+ return comment;
1245
+ });
1180
1246
  }
1181
1247
  async update(id, fields) {
1182
- const comments = await this.getAll();
1183
- const index = comments.findIndex((c) => c.id === id);
1184
- if (index === -1) return null;
1185
- const comment = comments[index];
1186
- if (fields.body !== void 0) comment.body = fields.body;
1187
- if (fields.status !== void 0) comment.status = fields.status;
1188
- await this.save(comments);
1189
- return comment;
1248
+ return this.enqueueMutation(async () => {
1249
+ const comments = await this.getAll();
1250
+ const index = comments.findIndex((c) => c.id === id);
1251
+ if (index === -1) return null;
1252
+ const comment = comments[index];
1253
+ if (fields.body !== void 0) comment.body = fields.body;
1254
+ if (fields.status !== void 0) comment.status = fields.status;
1255
+ await this.save(comments);
1256
+ return comment;
1257
+ });
1190
1258
  }
1191
1259
  async resolveAllOpen() {
1192
- const comments = await this.getAll();
1193
- let n = 0;
1194
- for (const c of comments) if (c.status === "open") {
1195
- c.status = "resolved";
1196
- n++;
1197
- }
1198
- if (n > 0) await this.save(comments);
1199
- return n;
1260
+ return this.enqueueMutation(async () => {
1261
+ const comments = await this.getAll();
1262
+ let n = 0;
1263
+ for (const c of comments) if (c.status === "open") {
1264
+ c.status = "resolved";
1265
+ n++;
1266
+ }
1267
+ if (n > 0) await this.save(comments);
1268
+ return n;
1269
+ });
1200
1270
  }
1201
1271
  async remove(id) {
1202
- const comments = await this.getAll();
1203
- const index = comments.findIndex((c) => c.id === id);
1204
- if (index === -1) return false;
1205
- comments.splice(index, 1);
1206
- await this.save(comments);
1207
- return true;
1272
+ return this.enqueueMutation(async () => {
1273
+ const comments = await this.getAll();
1274
+ const index = comments.findIndex((c) => c.id === id);
1275
+ if (index === -1) return false;
1276
+ comments.splice(index, 1);
1277
+ await this.save(comments);
1278
+ return true;
1279
+ });
1208
1280
  }
1209
1281
  async addReply(commentId, reply) {
1210
- const comments = await this.getAll();
1211
- const index = comments.findIndex((c) => c.id === commentId);
1212
- if (index === -1) return null;
1213
- const comment = comments[index];
1214
- if (!comment.replies) comment.replies = [];
1215
- comment.replies.push(reply);
1216
- await this.save(comments);
1217
- return comment;
1282
+ return this.enqueueMutation(async () => {
1283
+ const comments = await this.getAll();
1284
+ const index = comments.findIndex((c) => c.id === commentId);
1285
+ if (index === -1) return null;
1286
+ const comment = comments[index];
1287
+ if (!comment.replies) comment.replies = [];
1288
+ comment.replies.push(reply);
1289
+ await this.save(comments);
1290
+ return comment;
1291
+ });
1218
1292
  }
1219
1293
  async removeReply(commentId, replyId) {
1220
- const comments = await this.getAll();
1221
- const index = comments.findIndex((c) => c.id === commentId);
1222
- if (index === -1) return null;
1223
- const comment = comments[index];
1224
- const replyIndex = comment.replies.findIndex((r) => r.id === replyId);
1225
- if (replyIndex === -1) return null;
1226
- comment.replies.splice(replyIndex, 1);
1227
- await this.save(comments);
1228
- return comment;
1294
+ return this.enqueueMutation(async () => {
1295
+ const comments = await this.getAll();
1296
+ const index = comments.findIndex((c) => c.id === commentId);
1297
+ if (index === -1) return null;
1298
+ const comment = comments[index];
1299
+ const replyIndex = comment.replies.findIndex((r) => r.id === replyId);
1300
+ if (replyIndex === -1) return null;
1301
+ comment.replies.splice(replyIndex, 1);
1302
+ await this.save(comments);
1303
+ return comment;
1304
+ });
1229
1305
  }
1230
1306
  async updateReply(commentId, replyId, body) {
1231
- const comments = await this.getAll();
1232
- const index = comments.findIndex((c) => c.id === commentId);
1233
- if (index === -1) return null;
1234
- const comment = comments[index];
1235
- const reply = comment.replies.find((r) => r.id === replyId);
1236
- if (!reply) return null;
1237
- reply.body = body;
1238
- await this.save(comments);
1239
- return comment;
1307
+ return this.enqueueMutation(async () => {
1308
+ const comments = await this.getAll();
1309
+ const index = comments.findIndex((c) => c.id === commentId);
1310
+ if (index === -1) return null;
1311
+ const comment = comments[index];
1312
+ const reply = comment.replies.find((r) => r.id === replyId);
1313
+ if (!reply) return null;
1314
+ reply.body = body;
1315
+ await this.save(comments);
1316
+ return comment;
1317
+ });
1240
1318
  }
1241
1319
  };
1242
1320
  //#endregion
1321
+ //#region src/lib/types.ts
1322
+ /** Runtime guard for comment data crossing HTTP or persisted-storage boundaries. */
1323
+ function isReviewCommentSide(value) {
1324
+ return value === "deletions" || value === "additions";
1325
+ }
1326
+ //#endregion
1243
1327
  //#region src/lib/plans.ts
1244
1328
  /** Absolute path of the persisted markdown mirror for a plan id. */
1245
1329
  function planSourceFilePath(storageDir, planId) {
@@ -3333,6 +3417,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3333
3417
  });
3334
3418
  app.post("/api/comments", async (c) => {
3335
3419
  const body = await c.req.json();
3420
+ if (!isReviewCommentSide(body.side)) return c.json({ error: "side must be additions or deletions" }, 400);
3336
3421
  const severityRaw = body.severity;
3337
3422
  const severity = severityRaw === "blocking" || severityRaw === "nit" || severityRaw === "question" || severityRaw === "praise" || severityRaw === "none" ? severityRaw : void 0;
3338
3423
  const comment = {
@@ -3401,7 +3486,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3401
3486
  if (!relPath) return c.json({ error: "Forbidden file path" }, 403);
3402
3487
  const absolutePath = resolve(root, relPath);
3403
3488
  const content = await readFile(absolutePath, "utf-8");
3404
- const { applySuggestionToContent } = await import("./apply-suggestion-BAuyCYk6.mjs");
3489
+ const { applySuggestionToContent } = await import("./apply-suggestion-CHYnw68I.mjs");
3405
3490
  const result = applySuggestionToContent({
3406
3491
  content,
3407
3492
  lineNumber: comment.lineNumber,
@@ -3648,7 +3733,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3648
3733
  const session = await prStore.get();
3649
3734
  if (!session) return notInPrMode(c);
3650
3735
  try {
3651
- const { fetchPrChecks } = await import("./github-DWgPIcKC.mjs");
3736
+ const { fetchPrChecks } = await import("./github-CErBub2y.mjs");
3652
3737
  const checks = await fetchPrChecks(resolvedFromSession(session), session.headSha);
3653
3738
  const summary = {
3654
3739
  total: checks.length,
@@ -3680,7 +3765,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3680
3765
  const text = typeof body.body === "string" ? body.body.trim() : "";
3681
3766
  if (!text) return c.json({ error: "body is required" }, 400);
3682
3767
  try {
3683
- const { replyToPrComment } = await import("./github-DWgPIcKC.mjs");
3768
+ const { replyToPrComment } = await import("./github-CErBub2y.mjs");
3684
3769
  const result = await replyToPrComment({
3685
3770
  resolved: resolvedFromSession(session),
3686
3771
  inReplyTo: id,
@@ -3894,18 +3979,32 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3894
3979
  if (decision !== "approve" && decision !== "comment" && decision !== "request-changes" && decision !== "draft") return c.json({ error: "decision must be one of: approve, comment, request-changes, draft" }, 400);
3895
3980
  const generalBody = typeof body.body === "string" ? body.body : "";
3896
3981
  if (body.dryRun === true) {
3897
- const { buildReviewPayload } = await import("./github-DWgPIcKC.mjs");
3982
+ const { buildReviewPayload, resolvedFromSession } = await import("./github-CErBub2y.mjs");
3983
+ const { rewriteLocalAttachmentsInBodies } = await import("./github-attachments-plDeB0iE.mjs");
3984
+ const resolved = resolvedFromSession(session);
3985
+ const comments = session.comments ?? [];
3986
+ const rewritten = await rewriteLocalAttachmentsInBodies(resolved, [generalBody, ...comments.map((c) => c.body ?? "")], { dryRun: true });
3987
+ if (rewritten.error) return c.json({
3988
+ ok: false,
3989
+ dryRun: true,
3990
+ error: rewritten.error
3991
+ }, 400);
3992
+ const [body, ...commentBodies] = rewritten.bodies;
3898
3993
  const payload = buildReviewPayload({
3899
3994
  decision,
3900
- body: generalBody,
3901
- comments: session.comments ?? []
3995
+ body: body ?? generalBody,
3996
+ comments: comments.map((c, i) => ({
3997
+ ...c,
3998
+ body: commentBodies[i] ?? c.body
3999
+ }))
3902
4000
  });
3903
4001
  return c.json({
3904
4002
  ok: true,
3905
4003
  dryRun: true,
3906
4004
  authSource: session.authSource ?? "none",
3907
4005
  failedComments: 0,
3908
- payload
4006
+ payload,
4007
+ attachmentRewrites: rewritten.urlMap
3909
4008
  });
3910
4009
  }
3911
4010
  const result = await submitReview({
@@ -3978,7 +4077,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3978
4077
  const openCount = all.filter((x) => x.status === "open").length;
3979
4078
  let diffFingerprints;
3980
4079
  try {
3981
- const { fingerprintDiffFiles } = await import("./diff-fingerprint-CWa-soYD.mjs");
4080
+ const { fingerprintDiffFiles } = await import("./diff-fingerprint-BgR0tu1o.mjs");
3982
4081
  if (prMode) {
3983
4082
  const prSession = await prStore.get();
3984
4083
  if (prSession?.diff) diffFingerprints = fingerprintDiffFiles(prSession.diff);
@@ -4046,7 +4145,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
4046
4145
  } catch (err) {
4047
4146
  return c.json({ error: err?.message ?? "Failed to compute current diff" }, 500);
4048
4147
  }
4049
- const { fingerprintDiffFiles, diffSinceLast, filesToReviewSinceLast } = await import("./diff-fingerprint-CWa-soYD.mjs");
4148
+ const { fingerprintDiffFiles, diffSinceLast, filesToReviewSinceLast } = await import("./diff-fingerprint-BgR0tu1o.mjs");
4050
4149
  const delta = diffSinceLast(previous, fingerprintDiffFiles(currentPatch));
4051
4150
  return c.json({
4052
4151
  hasBaseline: true,
@@ -4380,4 +4479,4 @@ async function startServer(options) {
4380
4479
  });
4381
4480
  }
4382
4481
  //#endregion
4383
- export { intoShowMode as a, buildGitDiffArgs as i, runTerminalDiff as n, parseDiffOptions as o, validateEnvironment as r, printHelp as s, startServer as t };
4482
+ export { buildTuiGitDiffArgs as a, printHelp as c, buildGitDiffArgs as i, runTerminalDiff as n, intoShowMode as o, validateEnvironment as r, parseDiffOptions as s, startServer as t };