diffing 0.10.5 → 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 (177) hide show
  1. package/README.md +77 -32
  2. package/dist/{cli-agent-BJiATn11.mjs → cli-agent-DkwGxuy2.mjs} +40 -11
  3. package/dist/{cli-gh-_bkDCxhh.mjs → cli-gh-D0NfKpOp.mjs} +4 -4
  4. package/dist/cli.mjs +150 -221
  5. package/dist/client/assets/{angular-html-CBcwKYDC.js → angular-html-Dl53kkiy.js} +1 -1
  6. package/dist/client/assets/{angular-ts-DRBYUaJA.js → angular-ts-wNJFFkey.js} +1 -1
  7. package/dist/client/assets/{apl-BM0X8jeL.js → apl-BxtQST-h.js} +1 -1
  8. package/dist/client/assets/{arc-DTkmmKl3.js → arc-CBmZuzPB.js} +1 -1
  9. package/dist/client/assets/{architectureDiagram-3BPJPVTR-Cw75ay7q.js → architectureDiagram-3BPJPVTR-CEci_K9f.js} +1 -1
  10. package/dist/client/assets/{astro-DKTNkoRZ.js → astro-BpADD5rh.js} +1 -1
  11. package/dist/client/assets/{blade-DaM7a9Zp.js → blade-B4I5SQmP.js} +1 -1
  12. package/dist/client/assets/{blockDiagram-GPEHLZMM-DAzINMr_.js → blockDiagram-GPEHLZMM-DcKhDtnE.js} +1 -1
  13. package/dist/client/assets/{c-B3C0Or4o.js → c-C3VtOgg8.js} +1 -1
  14. package/dist/client/assets/{c4Diagram-AAUBKEIU-C7SsS28g.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-DHOUGWx8.js → chunk-2J33WTMH-tvuzKhdK.js} +1 -1
  17. package/dist/client/assets/{chunk-3OPIFGDE-D8d2scLX.js → chunk-3OPIFGDE-D_nBoD9w.js} +1 -1
  18. package/dist/client/assets/{chunk-4BX2VUAB-BSC-E5yg.js → chunk-4BX2VUAB-yHPdy1G8.js} +1 -1
  19. package/dist/client/assets/{chunk-55IACEB6-27pC5pKn.js → chunk-55IACEB6-yXpL8wjV.js} +1 -1
  20. package/dist/client/assets/{chunk-5ZQYHXKU-BM60x82y.js → chunk-5ZQYHXKU-DZ5cvCDV.js} +1 -1
  21. package/dist/client/assets/{chunk-727SXJPM-CHCF96vE.js → chunk-727SXJPM-CJjgOWmY.js} +1 -1
  22. package/dist/client/assets/{chunk-AQP2D5EJ-BoVsvmTa.js → chunk-AQP2D5EJ-CQYQKXSE.js} +1 -1
  23. package/dist/client/assets/{chunk-BSJP7CBP-Iip4uSio.js → chunk-BSJP7CBP-CP_f908b.js} +1 -1
  24. package/dist/client/assets/{chunk-CSCIHK7Q-DuIWPyay.js → chunk-CSCIHK7Q-tcgA8jR0.js} +1 -1
  25. package/dist/client/assets/{chunk-FMBD7UC4-Du6rtd2k.js → chunk-FMBD7UC4-DlpmhBYg.js} +1 -1
  26. package/dist/client/assets/{chunk-KSCS5N6A-BBq105vI.js → chunk-KSCS5N6A-BkfieXpV.js} +1 -1
  27. package/dist/client/assets/{chunk-L5ZTLDWV-0DmB5Qp8.js → chunk-L5ZTLDWV-BjVXSZnt.js} +1 -1
  28. package/dist/client/assets/{chunk-LZXEDZCA-CoRsjUfr.js → chunk-LZXEDZCA-CaAWmy4Q.js} +2 -2
  29. package/dist/client/assets/{chunk-ND2GUHAM-tX8cKEls.js → chunk-ND2GUHAM-kWh41zUn.js} +1 -1
  30. package/dist/client/assets/{chunk-NZK2D7GU-BoJGgPic.js → chunk-NZK2D7GU-CDrIi44_.js} +1 -1
  31. package/dist/client/assets/{chunk-O5CBEL6O-mlwCWs97.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-B5efww8M.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-De9QR_Td.js → cobol-j-6eG2UQ.js} +1 -1
  38. package/dist/client/assets/{coffee-Ct_GvuHP.js → coffee-CZLH0dtt.js} +1 -1
  39. package/dist/client/assets/{cose-bilkent-S5V4N54A-ATaJZGF7.js → cose-bilkent-S5V4N54A-DlxESVex.js} +1 -1
  40. package/dist/client/assets/{cpp-Dw52w9cj.js → cpp-j6Bp24RI.js} +1 -1
  41. package/dist/client/assets/{crystal-Dx8ADdsd.js → crystal-DW7wcFUs.js} +1 -1
  42. package/dist/client/assets/{css-CZ13XvDU.js → css-C43BDU2i.js} +1 -1
  43. package/dist/client/assets/{dagre-BM42HDAG-aDltuYut.js → dagre-BM42HDAG-BaemEJFh.js} +1 -1
  44. package/dist/client/assets/{diagram-2AECGRRQ-DGWnHVMJ.js → diagram-2AECGRRQ-BaM-bkJ3.js} +1 -1
  45. package/dist/client/assets/{diagram-5GNKFQAL-Dd7eZBKe.js → diagram-5GNKFQAL-BOH04DJO.js} +1 -1
  46. package/dist/client/assets/{diagram-KO2AKTUF-DWThXREf.js → diagram-KO2AKTUF-BP5MyqDZ.js} +1 -1
  47. package/dist/client/assets/{diagram-LMA3HP47-CXR4Bjtc.js → diagram-LMA3HP47-Dt4gKMYF.js} +1 -1
  48. package/dist/client/assets/{diagram-OG6HWLK6-D4Cbf0nW.js → diagram-OG6HWLK6-DoT1VshN.js} +1 -1
  49. package/dist/client/assets/{dist-CUDhrHNw.js → dist-DEAxvC4F.js} +1 -1
  50. package/dist/client/assets/{edge-CQCjdJKj.js → edge-D9ySFlnD.js} +1 -1
  51. package/dist/client/assets/{elixir-bkjwPazA.js → elixir-CoJz_LQ5.js} +1 -1
  52. package/dist/client/assets/{elm-CCweX5Cq.js → elm-CvedWh_e.js} +1 -1
  53. package/dist/client/assets/{erDiagram-TEJ5UH35-BmAyt7SU.js → erDiagram-TEJ5UH35-CMP78FsQ.js} +1 -1
  54. package/dist/client/assets/{erb-D-Z-KBLp.js → erb-lD_yYZsm.js} +1 -1
  55. package/dist/client/assets/{flowDiagram-I6XJVG4X-C6nIFUVc.js → flowDiagram-I6XJVG4X-Dp0s5BFj.js} +1 -1
  56. package/dist/client/assets/{ganttDiagram-6RSMTGT7-DMlxThBf.js → ganttDiagram-6RSMTGT7-GmSG31U-.js} +1 -1
  57. package/dist/client/assets/{git-rebase-BdoFdenB.js → git-rebase-DwZABzof.js} +1 -1
  58. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-JaIFkAIT.js → gitGraphDiagram-PVQCEYII-C1SXShag.js} +1 -1
  59. package/dist/client/assets/{glimmer-js-CZQrBJKq.js → glimmer-js-CWcs3w1Z.js} +1 -1
  60. package/dist/client/assets/{glimmer-ts-CBYW46D4.js → glimmer-ts-CrzGN4lJ.js} +1 -1
  61. package/dist/client/assets/{glsl-wxixKkY_.js → glsl-DRCtwX7h.js} +1 -1
  62. package/dist/client/assets/{graphql-CqZ0Lo5a.js → graphql-rpmrismS.js} +1 -1
  63. package/dist/client/assets/{hack-rqWymQRV.js → hack-Ba02RnuQ.js} +1 -1
  64. package/dist/client/assets/{haml-DFw_IoGM.js → haml-BHBACStm.js} +1 -1
  65. package/dist/client/assets/{handlebars-3VmTVMYt.js → handlebars-BtlQ1SCa.js} +1 -1
  66. package/dist/client/assets/{html-C0Li76jB.js → html-BkVU3Dge.js} +1 -1
  67. package/dist/client/assets/{html-derivative-CO-RQW8y.js → html-derivative-DoK92vwi.js} +1 -1
  68. package/dist/client/assets/{http-sPrZOeBY.js → http-CJAwKSPH.js} +1 -1
  69. package/dist/client/assets/{hurl-DUoPe4Lc.js → hurl-kaX5jwuN.js} +1 -1
  70. package/dist/client/assets/{index-BN_-di_r.js → index-BHeNiC07.js} +261 -199
  71. package/dist/client/assets/index-D8hOoJCg.css +1 -0
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-B6AZ5SCV.js → infoDiagram-5YYISTIA-B0i3BlNR.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-CytMrpo8.js → ishikawaDiagram-YF4QCWOH-BN8sEei4.js} +1 -1
  74. package/dist/client/assets/{java-Cj0G6QRg.js → java-BvrigIoq.js} +1 -1
  75. package/dist/client/assets/{javascript-d5SUuyWD.js → javascript-DZkPTYAi.js} +1 -1
  76. package/dist/client/assets/{jinja-BTw9k0vO.js → jinja-Ceg7ui1S.js} +1 -1
  77. package/dist/client/assets/{jison-9xSVvR1q.js → jison-iE1GaOyN.js} +1 -1
  78. package/dist/client/assets/{journeyDiagram-JHISSGLW-Bd4jZUYI.js → journeyDiagram-JHISSGLW-CE6O3NhU.js} +1 -1
  79. package/dist/client/assets/{json-DjAt53ka.js → json-C0j8rEcg.js} +1 -1
  80. package/dist/client/assets/{jsx-BX5KmQ7d.js → jsx-B7eXljgz.js} +1 -1
  81. package/dist/client/assets/{julia-CLLx1dHC.js → julia-DMDw0aMP.js} +1 -1
  82. package/dist/client/assets/{just-C0v80bKe.js → just-BryMKRJ_.js} +1 -1
  83. package/dist/client/assets/{kanban-definition-UN3LZRKU-Ds4pXHJa.js → kanban-definition-UN3LZRKU-j-aU6Yzp.js} +1 -1
  84. package/dist/client/assets/{latex-DY-oQfwO.js → latex-BNC9-sjr.js} +1 -1
  85. package/dist/client/assets/{line-BbSLfOl6.js → line-CyEqpEDp.js} +1 -1
  86. package/dist/client/assets/{linear-BMIZJAAR.js → linear-CXeaA9km.js} +1 -1
  87. package/dist/client/assets/{liquid-DDHDgbZx.js → liquid-D-fQw-oJ.js} +1 -1
  88. package/dist/client/assets/{lua-CXymerKS.js → lua-CD2aJ_rS.js} +1 -1
  89. package/dist/client/assets/{marko-DoPFsptl.js → marko-BQ37hu6z.js} +1 -1
  90. package/dist/client/assets/{mdc-BxSmTphd.js → mdc-B5NUi3zZ.js} +1 -1
  91. package/dist/client/assets/{mermaid-parser.core-CcYSvN4q.js → mermaid-parser.core-BxHF_XbX.js} +1 -1
  92. package/dist/client/assets/{mermaid.core-COTNtqgQ.js → mermaid.core-BUtaf4P1.js} +3 -3
  93. package/dist/client/assets/{mindmap-definition-RKZ34NQL-BTxraRzn.js → mindmap-definition-RKZ34NQL-D13tPu2o.js} +1 -1
  94. package/dist/client/assets/{nginx-Bma0jNOT.js → nginx-1W1E03Rg.js} +1 -1
  95. package/dist/client/assets/{nim-DMBpjygU.js → nim-C5A88bFP.js} +1 -1
  96. package/dist/client/assets/{perl-CrnrV-AJ.js → perl-BYoP0wNt.js} +1 -1
  97. package/dist/client/assets/{php-CDYxzX6t.js → php-CFxna09e.js} +1 -1
  98. package/dist/client/assets/{pieDiagram-4H26LBE5-DglRmzer.js → pieDiagram-4H26LBE5-CHL7Ml5w.js} +1 -1
  99. package/dist/client/assets/{pug-DNewy3GU.js → pug-BR4JgWAk.js} +1 -1
  100. package/dist/client/assets/{qml-COjcnZ-W.js → qml-D1U1EFEe.js} +1 -1
  101. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BjSmyES7.js → quadrantDiagram-W4KKPZXB-BnYtv-HY.js} +1 -1
  102. package/dist/client/assets/{r-CrCaMxLS.js → r-ChE6X060.js} +1 -1
  103. package/dist/client/assets/{razor-jeuOZIar.js → razor-B5iVfQMe.js} +1 -1
  104. package/dist/client/assets/{regexp-DSHVUX08.js → regexp-Dz2drUIf.js} +1 -1
  105. package/dist/client/assets/{requirementDiagram-4Y6WPE33-B4f430jS.js → requirementDiagram-4Y6WPE33-D8QEGLKB.js} +1 -1
  106. package/dist/client/assets/{review-export-Cen1WEcX.js → review-export-CvFFbCAB.js} +1 -1
  107. package/dist/client/assets/{rst-CIDgytzc.js → rst-DZM3RGRs.js} +1 -1
  108. package/dist/client/assets/{ruby-DtuseoNq.js → ruby-DkXnm-J8.js} +1 -1
  109. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-TQPPlxc6.js → sankeyDiagram-5OEKKPKP-wVaks6lB.js} +1 -1
  110. package/dist/client/assets/{sas-C72Theia.js → sas-DMbpc71c.js} +1 -1
  111. package/dist/client/assets/{scss-ClECtwRk.js → scss-IwVMMp22.js} +1 -1
  112. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-D1tx07Wg.js → sequenceDiagram-3UESZ5HK-Cg31TB-R.js} +1 -1
  113. package/dist/client/assets/{shellscript-BCwBsi2k.js → shellscript-CIStAKx3.js} +1 -1
  114. package/dist/client/assets/{shellsession-BrOddEl5.js → shellsession-uLtzHhlo.js} +1 -1
  115. package/dist/client/assets/{soy-Dcs0GWFW.js → soy-BkxBYigm.js} +1 -1
  116. package/dist/client/assets/{sql-BAjA7Gv7.js → sql-Ba9y9EvJ.js} +1 -1
  117. package/dist/client/assets/{src-CYYhkqTK.js → src-9MKexpFu.js} +1 -1
  118. package/dist/client/assets/{stata-19ngQtzR.js → stata-CrPCbiIZ.js} +1 -1
  119. package/dist/client/assets/{stateDiagram-AJRCARHV-BZRCEzb5.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-Ce2TBRjE.js → surrealql-Dvip5u_o.js} +1 -1
  122. package/dist/client/assets/{svelte-DQ_1eGZz.js → svelte-xBLD60Zd.js} +1 -1
  123. package/dist/client/assets/{templ-Cw2DDxWF.js → templ-CWv68xbP.js} +1 -1
  124. package/dist/client/assets/{tex-myDSO2eP.js → tex-CHqz-fYs.js} +1 -1
  125. package/dist/client/assets/{timeline-definition-PNZ67QCA-CP0OZhBT.js → timeline-definition-PNZ67QCA-CWKkJ3QZ.js} +1 -1
  126. package/dist/client/assets/{ts-tags-rh39ZwVs.js → ts-tags-DS82EDuE.js} +1 -1
  127. package/dist/client/assets/{tsx-B0-26jrU.js → tsx-B2GBjp2F.js} +1 -1
  128. package/dist/client/assets/{twig-CgasHzPb.js → twig-CC8x9pG0.js} +1 -1
  129. package/dist/client/assets/{typescript-Dq3T0c-m.js → typescript-g7i13lnC.js} +1 -1
  130. package/dist/client/assets/{vennDiagram-CIIHVFJN-DHaKHj0j.js → vennDiagram-CIIHVFJN-OLItKWeg.js} +1 -1
  131. package/dist/client/assets/{vue-html-Bv2uFkTH.js → vue-html-D9GQtYub.js} +1 -1
  132. package/dist/client/assets/{vue-CzFVh92-.js → vue-rFbe7luB.js} +1 -1
  133. package/dist/client/assets/{vue-vine-DzieBk9Y.js → vue-vine-mrNtQtY5.js} +1 -1
  134. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Dky7jxlZ.js → wardleyDiagram-YWT4CUSO-Dy1yfeb4.js} +1 -1
  135. package/dist/client/assets/{xml-wcdHRHN8.js → xml-CHfMjyAM.js} +1 -1
  136. package/dist/client/assets/{xsl-CXrwsLG9.js → xsl-BFkNSogJ.js} +1 -1
  137. package/dist/client/assets/{xychartDiagram-2RQKCTM6-BQ2hG60h.js → xychartDiagram-2RQKCTM6-DfSnfjVL.js} +1 -1
  138. package/dist/client/assets/{yaml-lO6lK6Xe.js → yaml-BfSgHc04.js} +1 -1
  139. package/dist/client/index.html +2 -2
  140. package/dist/{completions-3UF8uzhx.mjs → completions-BO2DUM-8.mjs} +21 -1
  141. package/dist/{doctor-BGYZNIYP.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-DKT0lJXv.mjs → github-CErBub2y.mjs} +1 -1
  144. package/dist/{github-CEjtGd41.mjs → github-DBsZ0h_l.mjs} +3 -3
  145. package/dist/{github-attachments-Cf17YWp4.mjs → github-attachments-plDeB0iE.mjs} +1 -1
  146. package/dist/{mcp-Dq7J5QOP.mjs → mcp-DtVrMR2S.mjs} +13 -7
  147. package/dist/native/tui-darwin-arm64/diffing-tui +0 -0
  148. package/dist/native/tui-darwin-x64/diffing-tui +0 -0
  149. package/dist/native/tui-linux-arm64-gnu/diffing-tui +0 -0
  150. package/dist/native/tui-linux-arm64-musl/diffing-tui +0 -0
  151. package/dist/native/tui-linux-x64-gnu/diffing-tui +0 -0
  152. package/dist/native/tui-linux-x64-musl/diffing-tui +0 -0
  153. package/dist/native/tui-win32-x64-msvc/diffing-tui.exe +0 -0
  154. package/dist/{review-export-BBDWvftT.mjs → review-export-B63eRAVa.mjs} +1 -1
  155. package/dist/{settings-bwe7yQ8U.mjs → search-BMPY_ZW8.mjs} +117 -97
  156. package/dist/search-BO9Im7eu.mjs +2 -0
  157. package/dist/{server-C9i4V36o.mjs → server-j0PnTVX1.mjs} +146 -75
  158. package/dist/server-lock-CY0_1mcS.mjs +275 -0
  159. package/dist/session-conflict-C6V9ZKo7.mjs +96 -0
  160. package/dist/session-manager-CYNchhVA.mjs +159 -0
  161. package/dist/settings-yK0GYpbn.mjs +60 -0
  162. package/dist/tui-search-bridge-Bfb2ktdA.mjs +133 -0
  163. package/package.json +6 -4
  164. package/dist/client/assets/channel-lsVHTuYR.js +0 -1
  165. package/dist/client/assets/chunk-QZHKN3VN-AHUiTM0z.js +0 -1
  166. package/dist/client/assets/chunk-WU5MYG2G-D41j4yxb.js +0 -1
  167. package/dist/client/assets/classDiagram-4FO5ZUOK-D1Eo3kly.js +0 -1
  168. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-bAMsbsfB.js +0 -1
  169. package/dist/client/assets/index-B42c0TyV.css +0 -1
  170. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Da-mGMA2.js +0 -1
  171. package/dist/server-lock-Dd_ss_Il.mjs +0 -153
  172. /package/dist/{apply-suggestion-DNNsC5gx.mjs → apply-suggestion-CHYnw68I.mjs} +0 -0
  173. /package/dist/{comment-format-B5AcGcR-.mjs → comment-format-B85NHZnG.mjs} +0 -0
  174. /package/dist/{diff-fingerprint-C8YO3TTE.mjs → diff-fingerprint-BgR0tu1o.mjs} +0 -0
  175. /package/dist/{handoff-DPoIyeWn.mjs → handoff-LAFtmnHf.mjs} +0 -0
  176. /package/dist/{plan-format-BQyx--mp.mjs → plan-format-BwJh5JSE.mjs} +0 -0
  177. /package/dist/{update-check-DUuHmPeZ.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-CEjtGd41.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,
@@ -58,6 +60,7 @@ const DEFAULTS = {
58
60
  includeUnstaged: true,
59
61
  includeUntracked: true,
60
62
  tui: false,
63
+ viewOnly: false,
61
64
  gpu: false,
62
65
  showMode: false,
63
66
  showRevspecs: []
@@ -201,6 +204,10 @@ const DIFFING_OPTIONS = {
201
204
  type: "boolean",
202
205
  default: false
203
206
  },
207
+ view: {
208
+ type: "boolean",
209
+ default: false
210
+ },
204
211
  gpu: {
205
212
  type: "boolean",
206
213
  default: false
@@ -226,6 +233,7 @@ function printHelp() {
226
233
 
227
234
  Usage: diffing [<git diff options>] [<revision>...] [-- <path>...]
228
235
  diffing --web [<git diff options>] [<revision>...] [-- <path>...]
236
+ diffing view [<git diff options>] [<revision>...] [-- <path>...]
229
237
  diffing [server options]
230
238
 
231
239
  Git Diff Options (drop-in replacement for git diff):`);
@@ -236,23 +244,26 @@ Diffing Server Options:
236
244
  --host <host> Host address to bind to (default: 127.0.0.1). Pass
237
245
  0.0.0.0 to expose the server to the local network.
238
246
  --no-open Don't open the browser automatically
239
- --reuse-session If a review is already running, open it instead of prompting
240
- --replace-session If a review is already running, stop it and start a new one
247
+ --reuse-session Open the active review instead of starting another
248
+ --replace-session Stop the active review and start a replacement
241
249
  --gh-pr <ref> Open a GitHub PR review session (number, owner/repo#N, or URL)
242
250
  Same as: diffing "gh pr <ref>"
243
251
 
244
252
  Output Modes:
245
253
  By default diffing auto-selects the best output mode:
246
254
  - Terminal mode: when output is a pipe, redirect, or non-TTY
247
- - Web mode: when output is a TTY (interactive terminal)
255
+ - Web or TUI: saved preference for an interactive terminal (web by default)
248
256
 
249
- 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.
250
260
  --tui is experimental and opt-in. It opens a native-Rust terminal
251
261
  interface that mirrors the web dashboard. Falls back to git diff
252
262
  output if the environment cannot support a TUI (piped stdin, CI,
253
263
  missing binary).
254
264
 
255
265
  Subcommands:
266
+ view [diff options] Browse diffs in the focused read-only native TUI
256
267
  show <revspec>... Drop-in for 'git show'. Renders commit metadata
257
268
  above the diff. Accepts commits, ranges, tags.
258
269
  await-review Block until human clicks Send to agent; print XML
@@ -262,11 +273,13 @@ Subcommands:
262
273
  comment edit|delete <id>
263
274
  progress --message … Live agent progress toast
264
275
  url Print the active review base URL
276
+ sessions List, select, open, and stop running review sessions
265
277
  plan <submit|await|list|show|versions|reply|resolve>
266
278
  gh <status|overview|threads|reviews|pr-fetch|pr-list-comments|pr-review>
267
279
  mcp [--repo PATH] Stdio MCP server for agents
268
280
  inspect <summary|files|hunks|slice|search>
269
281
  Bounded reads from a running web, TUI, or PR session
282
+ mode [web|tui] Get or set the default interactive review mode
270
283
  doctor Environment self-check
271
284
  completion <bash|zsh|fish>
272
285
  update Check for a newer npm release
@@ -275,7 +288,7 @@ Custom ranges (e.g. main..feature) and 'gh pr' sessions also display a
275
288
  "what is this diff" banner in the web UI summarising the diff source.
276
289
 
277
290
  Examples:
278
- diffing Review uncommitted changes (web UI)
291
+ diffing Review uncommitted changes (preferred UI)
279
292
  diffing --staged Review staged changes
280
293
  diffing HEAD~3 Review last 3 commits
281
294
  diffing main..feature Compare branches
@@ -288,7 +301,11 @@ Examples:
288
301
  diffing --word-diff=color Word-level diff in color
289
302
  diffing -b -w Ignore whitespace changes
290
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
291
307
  diffing --tui Open the experimental TUI (native Rust)
308
+ diffing mode tui Use the TUI by default in interactive terminals
292
309
  diffing await-review Agent: wait for human handoff
293
310
  diffing plan submit PLAN.md Agent: submit a plan for approval
294
311
  diffing mcp --repo /abs/path MCP server bound to one repository
@@ -479,7 +496,7 @@ function preprocessOptionalValueArgs(rawArgs) {
479
496
  * 3. Parse known flags via node:util.parseArgs
480
497
  * 4. Anything unknown / positional becomes a revision or pathspec
481
498
  */
482
- function parseDiffOptions(rawArgs) {
499
+ function parseDiffOptions(rawArgs, defaultInteractiveMode = "web") {
483
500
  const { values, positionals } = parseArgs({
484
501
  options: {
485
502
  ...GIT_DIFF_OPTIONS,
@@ -503,6 +520,7 @@ function parseDiffOptions(rawArgs) {
503
520
  if (values["reuse-session"]) opts.reuseSession = true;
504
521
  if (values["replace-session"]) opts.replaceSession = true;
505
522
  if (values["gh-pr"]) opts.ghPr = String(values["gh-pr"]);
523
+ if (values.view) opts.viewOnly = true;
506
524
  if (values.staged || values.cached) opts.staged = true;
507
525
  if (values.merge) opts.merge = true;
508
526
  const algo = values["diff-algorithm"];
@@ -586,8 +604,14 @@ function parseDiffOptions(rawArgs) {
586
604
  if (values.dirstat) opts.dirstat = values.dirstat;
587
605
  if (values["dirstat-by-file"]) opts.dirstatByFile = values["dirstat-by-file"];
588
606
  if (values.cumulative) opts.cumulative = true;
589
- if (values["no-patch"]) opts.outputFormat = void 0;
590
- 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
+ }
591
615
  if (values["diff-filter"]) opts.diffFilter = values["diff-filter"];
592
616
  if (values.S) opts.pickaxeString = values.S;
593
617
  if (values.G) opts.pickaxeRegex = values.G;
@@ -636,12 +660,13 @@ function parseDiffOptions(rawArgs) {
636
660
  }
637
661
  for (let i = dashDashIdx + 1; i < rawArgs.length; i++) opts.pathspecs.push(rawArgs[i]);
638
662
  } else for (const p of positionals) opts.revisions.push(p);
639
- if (values.tui) opts.outputMode = "tui";
663
+ if (values.view) opts.outputMode = "tui";
664
+ else if (values.tui) opts.outputMode = "tui";
640
665
  else if (values.web) opts.outputMode = "web";
641
666
  else if (values.terminal) opts.outputMode = "terminal";
642
- 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;
643
668
  else if (!process.stdout.isTTY && opts.outputMode === "auto") opts.outputMode = "terminal";
644
- 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";
645
670
  return opts;
646
671
  }
647
672
  /**
@@ -693,6 +718,7 @@ function buildGitDiffArgs(opts) {
693
718
  if (opts.dirstatByFile) args.push(`--dirstat-by-file=${opts.dirstatByFile}`);
694
719
  if (opts.cumulative) args.push("--cumulative");
695
720
  if (opts.check) args.push("--check");
721
+ if (opts.suppressPatch) args.push("--no-patch");
696
722
  if (opts.diffFilter) args.push(`--diff-filter=${opts.diffFilter}`);
697
723
  if (opts.pickaxeString) args.push(`-S${opts.pickaxeString}`);
698
724
  if (opts.pickaxeRegex) args.push(`-G${opts.pickaxeRegex}`);
@@ -723,6 +749,23 @@ function buildGitDiffArgs(opts) {
723
749
  return args;
724
750
  }
725
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
+ /**
726
769
  * Transform a `parseDiffOptions(...)` result into a "show mode" variant:
727
770
  * moves any parsed revisions into `showRevspecs`, clears `revisions` (so the
728
771
  * existing diff-engine path does not try to `git diff` them), and sets the
@@ -1155,6 +1198,7 @@ function validateEnvironment() {
1155
1198
  var FileCommentStore = class {
1156
1199
  dirPath;
1157
1200
  filePath;
1201
+ mutationQueue = Promise.resolve();
1158
1202
  /**
1159
1203
  * @param storageDir Absolute directory to persist `comments.json` in.
1160
1204
  * Defaults to the per-repo storage dir under `~/.diffing` — comments are
@@ -1186,74 +1230,100 @@ var FileCommentStore = class {
1186
1230
  console.error("Failed to save comments to file:", err);
1187
1231
  }
1188
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
+ }
1189
1239
  async add(comment) {
1190
- const comments = await this.getAll();
1191
- comments.push(comment);
1192
- await this.save(comments);
1193
- 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
+ });
1194
1246
  }
1195
1247
  async update(id, fields) {
1196
- const comments = await this.getAll();
1197
- const index = comments.findIndex((c) => c.id === id);
1198
- if (index === -1) return null;
1199
- const comment = comments[index];
1200
- if (fields.body !== void 0) comment.body = fields.body;
1201
- if (fields.status !== void 0) comment.status = fields.status;
1202
- await this.save(comments);
1203
- 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
+ });
1204
1258
  }
1205
1259
  async resolveAllOpen() {
1206
- const comments = await this.getAll();
1207
- let n = 0;
1208
- for (const c of comments) if (c.status === "open") {
1209
- c.status = "resolved";
1210
- n++;
1211
- }
1212
- if (n > 0) await this.save(comments);
1213
- 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
+ });
1214
1270
  }
1215
1271
  async remove(id) {
1216
- const comments = await this.getAll();
1217
- const index = comments.findIndex((c) => c.id === id);
1218
- if (index === -1) return false;
1219
- comments.splice(index, 1);
1220
- await this.save(comments);
1221
- 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
+ });
1222
1280
  }
1223
1281
  async addReply(commentId, reply) {
1224
- const comments = await this.getAll();
1225
- const index = comments.findIndex((c) => c.id === commentId);
1226
- if (index === -1) return null;
1227
- const comment = comments[index];
1228
- if (!comment.replies) comment.replies = [];
1229
- comment.replies.push(reply);
1230
- await this.save(comments);
1231
- 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
+ });
1232
1292
  }
1233
1293
  async removeReply(commentId, replyId) {
1234
- const comments = await this.getAll();
1235
- const index = comments.findIndex((c) => c.id === commentId);
1236
- if (index === -1) return null;
1237
- const comment = comments[index];
1238
- const replyIndex = comment.replies.findIndex((r) => r.id === replyId);
1239
- if (replyIndex === -1) return null;
1240
- comment.replies.splice(replyIndex, 1);
1241
- await this.save(comments);
1242
- 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
+ });
1243
1305
  }
1244
1306
  async updateReply(commentId, replyId, body) {
1245
- const comments = await this.getAll();
1246
- const index = comments.findIndex((c) => c.id === commentId);
1247
- if (index === -1) return null;
1248
- const comment = comments[index];
1249
- const reply = comment.replies.find((r) => r.id === replyId);
1250
- if (!reply) return null;
1251
- reply.body = body;
1252
- await this.save(comments);
1253
- 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
+ });
1254
1318
  }
1255
1319
  };
1256
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
1257
1327
  //#region src/lib/plans.ts
1258
1328
  /** Absolute path of the persisted markdown mirror for a plan id. */
1259
1329
  function planSourceFilePath(storageDir, planId) {
@@ -3347,6 +3417,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3347
3417
  });
3348
3418
  app.post("/api/comments", async (c) => {
3349
3419
  const body = await c.req.json();
3420
+ if (!isReviewCommentSide(body.side)) return c.json({ error: "side must be additions or deletions" }, 400);
3350
3421
  const severityRaw = body.severity;
3351
3422
  const severity = severityRaw === "blocking" || severityRaw === "nit" || severityRaw === "question" || severityRaw === "praise" || severityRaw === "none" ? severityRaw : void 0;
3352
3423
  const comment = {
@@ -3415,7 +3486,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3415
3486
  if (!relPath) return c.json({ error: "Forbidden file path" }, 403);
3416
3487
  const absolutePath = resolve(root, relPath);
3417
3488
  const content = await readFile(absolutePath, "utf-8");
3418
- const { applySuggestionToContent } = await import("./apply-suggestion-DNNsC5gx.mjs");
3489
+ const { applySuggestionToContent } = await import("./apply-suggestion-CHYnw68I.mjs");
3419
3490
  const result = applySuggestionToContent({
3420
3491
  content,
3421
3492
  lineNumber: comment.lineNumber,
@@ -3662,7 +3733,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3662
3733
  const session = await prStore.get();
3663
3734
  if (!session) return notInPrMode(c);
3664
3735
  try {
3665
- const { fetchPrChecks } = await import("./github-DKT0lJXv.mjs");
3736
+ const { fetchPrChecks } = await import("./github-CErBub2y.mjs");
3666
3737
  const checks = await fetchPrChecks(resolvedFromSession(session), session.headSha);
3667
3738
  const summary = {
3668
3739
  total: checks.length,
@@ -3694,7 +3765,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3694
3765
  const text = typeof body.body === "string" ? body.body.trim() : "";
3695
3766
  if (!text) return c.json({ error: "body is required" }, 400);
3696
3767
  try {
3697
- const { replyToPrComment } = await import("./github-DKT0lJXv.mjs");
3768
+ const { replyToPrComment } = await import("./github-CErBub2y.mjs");
3698
3769
  const result = await replyToPrComment({
3699
3770
  resolved: resolvedFromSession(session),
3700
3771
  inReplyTo: id,
@@ -3908,8 +3979,8 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
3908
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);
3909
3980
  const generalBody = typeof body.body === "string" ? body.body : "";
3910
3981
  if (body.dryRun === true) {
3911
- const { buildReviewPayload, resolvedFromSession } = await import("./github-DKT0lJXv.mjs");
3912
- const { rewriteLocalAttachmentsInBodies } = await import("./github-attachments-Cf17YWp4.mjs");
3982
+ const { buildReviewPayload, resolvedFromSession } = await import("./github-CErBub2y.mjs");
3983
+ const { rewriteLocalAttachmentsInBodies } = await import("./github-attachments-plDeB0iE.mjs");
3913
3984
  const resolved = resolvedFromSession(session);
3914
3985
  const comments = session.comments ?? [];
3915
3986
  const rewritten = await rewriteLocalAttachmentsInBodies(resolved, [generalBody, ...comments.map((c) => c.body ?? "")], { dryRun: true });
@@ -4006,7 +4077,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
4006
4077
  const openCount = all.filter((x) => x.status === "open").length;
4007
4078
  let diffFingerprints;
4008
4079
  try {
4009
- const { fingerprintDiffFiles } = await import("./diff-fingerprint-C8YO3TTE.mjs");
4080
+ const { fingerprintDiffFiles } = await import("./diff-fingerprint-BgR0tu1o.mjs");
4010
4081
  if (prMode) {
4011
4082
  const prSession = await prStore.get();
4012
4083
  if (prSession?.diff) diffFingerprints = fingerprintDiffFiles(prSession.diff);
@@ -4074,7 +4145,7 @@ function createApp(clientDir, diffOptsInput = DEFAULTS, commentStore, planStore,
4074
4145
  } catch (err) {
4075
4146
  return c.json({ error: err?.message ?? "Failed to compute current diff" }, 500);
4076
4147
  }
4077
- const { fingerprintDiffFiles, diffSinceLast, filesToReviewSinceLast } = await import("./diff-fingerprint-C8YO3TTE.mjs");
4148
+ const { fingerprintDiffFiles, diffSinceLast, filesToReviewSinceLast } = await import("./diff-fingerprint-BgR0tu1o.mjs");
4078
4149
  const delta = diffSinceLast(previous, fingerprintDiffFiles(currentPatch));
4079
4150
  return c.json({
4080
4151
  hasBaseline: true,
@@ -4408,4 +4479,4 @@ async function startServer(options) {
4408
4479
  });
4409
4480
  }
4410
4481
  //#endregion
4411
- 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 };