@gitkraken/core-gitlens 0.1.0 → 0.3.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 (451) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/dist/git/cache.d.ts +49 -9
  3. package/dist/git/cache.d.ts.map +1 -1
  4. package/dist/git/cache.js +174 -14
  5. package/dist/git/cache.js.map +1 -1
  6. package/dist/git/context.d.ts +11 -2
  7. package/dist/git/context.d.ts.map +1 -1
  8. package/dist/git/context.js.map +1 -1
  9. package/dist/git/models/branch.d.ts +1 -0
  10. package/dist/git/models/branch.d.ts.map +1 -1
  11. package/dist/git/models/branch.js.map +1 -1
  12. package/dist/git/models/commit.d.ts +1 -9
  13. package/dist/git/models/commit.d.ts.map +1 -1
  14. package/dist/git/models/commit.js +4 -9
  15. package/dist/git/models/commit.js.map +1 -1
  16. package/dist/git/models/graph.d.ts +2 -4
  17. package/dist/git/models/graph.d.ts.map +1 -1
  18. package/dist/git/models/reference.d.ts +31 -0
  19. package/dist/git/models/reference.d.ts.map +1 -1
  20. package/dist/git/models/remote.d.ts.map +1 -1
  21. package/dist/git/models/remote.js.map +1 -1
  22. package/dist/git/models/repository.d.ts +20 -3
  23. package/dist/git/models/repository.d.ts.map +1 -1
  24. package/dist/git/models/repository.js +42 -5
  25. package/dist/git/models/repository.js.map +1 -1
  26. package/dist/git/models/search.d.ts +2 -2
  27. package/dist/git/models/search.d.ts.map +1 -1
  28. package/dist/git/models/worktree.d.ts +4 -1
  29. package/dist/git/models/worktree.d.ts.map +1 -1
  30. package/dist/git/models/worktree.js +2 -2
  31. package/dist/git/models/worktree.js.map +1 -1
  32. package/dist/git/parsers/diffParser.d.ts +0 -1
  33. package/dist/git/parsers/diffParser.d.ts.map +1 -1
  34. package/dist/git/parsers/diffParser.js +22 -61
  35. package/dist/git/parsers/diffParser.js.map +1 -1
  36. package/dist/git/providers/branches.d.ts +18 -4
  37. package/dist/git/providers/branches.d.ts.map +1 -1
  38. package/dist/git/providers/commits.d.ts +6 -0
  39. package/dist/git/providers/commits.d.ts.map +1 -1
  40. package/dist/git/providers/config.d.ts +6 -1
  41. package/dist/git/providers/config.d.ts.map +1 -1
  42. package/dist/git/providers/diff.d.ts +2 -0
  43. package/dist/git/providers/diff.d.ts.map +1 -1
  44. package/dist/git/providers/operations.d.ts +39 -10
  45. package/dist/git/providers/operations.d.ts.map +1 -1
  46. package/dist/git/providers/pausedOperations.d.ts +3 -1
  47. package/dist/git/providers/pausedOperations.d.ts.map +1 -1
  48. package/dist/git/providers/refs.d.ts +23 -2
  49. package/dist/git/providers/refs.d.ts.map +1 -1
  50. package/dist/git/providers/revision.d.ts +1 -1
  51. package/dist/git/providers/revision.d.ts.map +1 -1
  52. package/dist/git/providers/staging.d.ts +18 -0
  53. package/dist/git/providers/staging.d.ts.map +1 -1
  54. package/dist/git/providers/status.d.ts +4 -1
  55. package/dist/git/providers/status.d.ts.map +1 -1
  56. package/dist/git/remotes/azure-devops.d.ts.map +1 -1
  57. package/dist/git/remotes/azure-devops.js.map +1 -1
  58. package/dist/git/{exec.types.d.ts → run.types.d.ts} +22 -3
  59. package/dist/git/run.types.d.ts.map +1 -0
  60. package/dist/git/run.types.js +2 -0
  61. package/dist/git/run.types.js.map +1 -0
  62. package/dist/git/service.d.ts.map +1 -1
  63. package/dist/git/service.js.map +1 -1
  64. package/dist/git/utils/autolink.utils.d.ts.map +1 -1
  65. package/dist/git/utils/autolink.utils.js.map +1 -1
  66. package/dist/git/utils/blame.utils.d.ts.map +1 -1
  67. package/dist/git/utils/blame.utils.js.map +1 -1
  68. package/dist/git/utils/conflictResolution.utils.d.ts +6 -0
  69. package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -0
  70. package/dist/git/utils/conflictResolution.utils.js +25 -0
  71. package/dist/git/utils/conflictResolution.utils.js.map +1 -0
  72. package/dist/git/utils/fileStatus.utils.d.ts +2 -1
  73. package/dist/git/utils/fileStatus.utils.d.ts.map +1 -1
  74. package/dist/git/utils/fileStatus.utils.js +4 -0
  75. package/dist/git/utils/fileStatus.utils.js.map +1 -1
  76. package/dist/git/utils/search.utils.d.ts.map +1 -1
  77. package/dist/git/utils/search.utils.js +3 -0
  78. package/dist/git/utils/search.utils.js.map +1 -1
  79. package/dist/git/utils/sorting.d.ts +14 -0
  80. package/dist/git/utils/sorting.d.ts.map +1 -1
  81. package/dist/git/utils/sorting.js +34 -0
  82. package/dist/git/utils/sorting.js.map +1 -1
  83. package/dist/git/utils/status.utils.d.ts.map +1 -1
  84. package/dist/git/utils/status.utils.js.map +1 -1
  85. package/dist/git/watching/classifyChange.d.ts.map +1 -1
  86. package/dist/git/watching/classifyChange.js +8 -0
  87. package/dist/git/watching/classifyChange.js.map +1 -1
  88. package/dist/git/watching/gitIgnoreFilter.js +1 -1
  89. package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
  90. package/dist/git/watching/initWatcher.d.ts.map +1 -1
  91. package/dist/git/watching/initWatcher.js.map +1 -1
  92. package/dist/git/watching/watchGroup.d.ts.map +1 -1
  93. package/dist/git/watching/watchGroup.js.map +1 -1
  94. package/dist/git/watching/watchService.d.ts.map +1 -1
  95. package/dist/git/watching/watchService.js +24 -4
  96. package/dist/git/watching/watchService.js.map +1 -1
  97. package/dist/git/watching/watchSession.d.ts.map +1 -1
  98. package/dist/git/watching/watchSession.js.map +1 -1
  99. package/dist/git-cli/cliGitProvider.js +1 -1
  100. package/dist/git-cli/cliGitProvider.js.map +1 -1
  101. package/dist/git-cli/exec/exec.types.d.ts +1 -1
  102. package/dist/git-cli/exec/exec.types.d.ts.map +1 -1
  103. package/dist/git-cli/exec/git.d.ts +31 -6
  104. package/dist/git-cli/exec/git.d.ts.map +1 -1
  105. package/dist/git-cli/exec/git.js +70 -9
  106. package/dist/git-cli/exec/git.js.map +1 -1
  107. package/dist/git-cli/exec/gitQueue.d.ts +22 -6
  108. package/dist/git-cli/exec/gitQueue.d.ts.map +1 -1
  109. package/dist/git-cli/exec/gitQueue.js +88 -24
  110. package/dist/git-cli/exec/gitQueue.js.map +1 -1
  111. package/dist/git-cli/parsers/blameParser.d.ts.map +1 -1
  112. package/dist/git-cli/parsers/blameParser.js.map +1 -1
  113. package/dist/git-cli/parsers/logParser.d.ts +1 -0
  114. package/dist/git-cli/parsers/logParser.d.ts.map +1 -1
  115. package/dist/git-cli/parsers/logParser.js +4 -0
  116. package/dist/git-cli/parsers/logParser.js.map +1 -1
  117. package/dist/git-cli/parsers/refParser.d.ts +3 -30
  118. package/dist/git-cli/parsers/refParser.d.ts.map +1 -1
  119. package/dist/git-cli/parsers/refParser.js +30 -30
  120. package/dist/git-cli/parsers/refParser.js.map +1 -1
  121. package/dist/git-cli/providers/blame.d.ts.map +1 -1
  122. package/dist/git-cli/providers/blame.js +1 -1
  123. package/dist/git-cli/providers/blame.js.map +1 -1
  124. package/dist/git-cli/providers/branches.d.ts +17 -5
  125. package/dist/git-cli/providers/branches.d.ts.map +1 -1
  126. package/dist/git-cli/providers/branches.js +245 -162
  127. package/dist/git-cli/providers/branches.js.map +1 -1
  128. package/dist/git-cli/providers/commits.d.ts +4 -0
  129. package/dist/git-cli/providers/commits.d.ts.map +1 -1
  130. package/dist/git-cli/providers/commits.js +120 -35
  131. package/dist/git-cli/providers/commits.js.map +1 -1
  132. package/dist/git-cli/providers/config.d.ts +11 -2
  133. package/dist/git-cli/providers/config.d.ts.map +1 -1
  134. package/dist/git-cli/providers/config.js +36 -11
  135. package/dist/git-cli/providers/config.js.map +1 -1
  136. package/dist/git-cli/providers/contributors.d.ts.map +1 -1
  137. package/dist/git-cli/providers/contributors.js +7 -4
  138. package/dist/git-cli/providers/contributors.js.map +1 -1
  139. package/dist/git-cli/providers/diff.d.ts +2 -0
  140. package/dist/git-cli/providers/diff.d.ts.map +1 -1
  141. package/dist/git-cli/providers/diff.js +92 -20
  142. package/dist/git-cli/providers/diff.js.map +1 -1
  143. package/dist/git-cli/providers/graph.d.ts.map +1 -1
  144. package/dist/git-cli/providers/graph.js +49 -28
  145. package/dist/git-cli/providers/graph.js.map +1 -1
  146. package/dist/git-cli/providers/operations.d.ts +30 -11
  147. package/dist/git-cli/providers/operations.d.ts.map +1 -1
  148. package/dist/git-cli/providers/operations.js +146 -43
  149. package/dist/git-cli/providers/operations.js.map +1 -1
  150. package/dist/git-cli/providers/patch.d.ts.map +1 -1
  151. package/dist/git-cli/providers/patch.js +15 -30
  152. package/dist/git-cli/providers/patch.js.map +1 -1
  153. package/dist/git-cli/providers/pausedOperations.d.ts +3 -1
  154. package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
  155. package/dist/git-cli/providers/pausedOperations.js +13 -7
  156. package/dist/git-cli/providers/pausedOperations.js.map +1 -1
  157. package/dist/git-cli/providers/refs.d.ts +19 -2
  158. package/dist/git-cli/providers/refs.d.ts.map +1 -1
  159. package/dist/git-cli/providers/refs.js +312 -9
  160. package/dist/git-cli/providers/refs.js.map +1 -1
  161. package/dist/git-cli/providers/remotes.js +4 -4
  162. package/dist/git-cli/providers/remotes.js.map +1 -1
  163. package/dist/git-cli/providers/revision.d.ts +1 -1
  164. package/dist/git-cli/providers/revision.d.ts.map +1 -1
  165. package/dist/git-cli/providers/revision.js +15 -11
  166. package/dist/git-cli/providers/revision.js.map +1 -1
  167. package/dist/git-cli/providers/staging.d.ts +8 -0
  168. package/dist/git-cli/providers/staging.d.ts.map +1 -1
  169. package/dist/git-cli/providers/staging.js +52 -8
  170. package/dist/git-cli/providers/staging.js.map +1 -1
  171. package/dist/git-cli/providers/stash.d.ts +0 -8
  172. package/dist/git-cli/providers/stash.d.ts.map +1 -1
  173. package/dist/git-cli/providers/stash.js +63 -119
  174. package/dist/git-cli/providers/stash.js.map +1 -1
  175. package/dist/git-cli/providers/status.d.ts +4 -1
  176. package/dist/git-cli/providers/status.d.ts.map +1 -1
  177. package/dist/git-cli/providers/status.js +10 -9
  178. package/dist/git-cli/providers/status.js.map +1 -1
  179. package/dist/git-cli/providers/tags.d.ts.map +1 -1
  180. package/dist/git-cli/providers/tags.js +13 -9
  181. package/dist/git-cli/providers/tags.js.map +1 -1
  182. package/dist/git-cli/providers/worktrees.js +3 -3
  183. package/dist/git-cli/providers/worktrees.js.map +1 -1
  184. package/dist/ipc/discovery.d.ts +27 -0
  185. package/dist/ipc/discovery.d.ts.map +1 -0
  186. package/dist/ipc/discovery.js +38 -0
  187. package/dist/ipc/discovery.js.map +1 -0
  188. package/dist/ipc/ipcServer.d.ts +20 -0
  189. package/dist/ipc/ipcServer.d.ts.map +1 -0
  190. package/dist/ipc/ipcServer.js +162 -0
  191. package/dist/ipc/ipcServer.js.map +1 -0
  192. package/dist/plus/agents/providers/claudeCodeProvider.d.ts +114 -0
  193. package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -0
  194. package/dist/plus/agents/providers/claudeCodeProvider.js +1480 -0
  195. package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -0
  196. package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +36 -0
  197. package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -0
  198. package/dist/plus/agents/providers/claudeCodeTranscript.js +171 -0
  199. package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -0
  200. package/dist/plus/agents/sanitizePrompt.d.ts +15 -0
  201. package/dist/plus/agents/sanitizePrompt.d.ts.map +1 -0
  202. package/dist/plus/agents/sanitizePrompt.js +103 -0
  203. package/dist/plus/agents/sanitizePrompt.js.map +1 -0
  204. package/dist/plus/agents/stateMachine.d.ts +32 -0
  205. package/dist/plus/agents/stateMachine.d.ts.map +1 -0
  206. package/dist/plus/agents/stateMachine.js +180 -0
  207. package/dist/plus/agents/stateMachine.js.map +1 -0
  208. package/dist/plus/agents/types.d.ts +203 -0
  209. package/dist/plus/agents/types.d.ts.map +1 -0
  210. package/dist/plus/agents/types.js +49 -0
  211. package/dist/plus/agents/types.js.map +1 -0
  212. package/dist/plus/ai/constants.d.ts +2 -1
  213. package/dist/plus/ai/constants.d.ts.map +1 -1
  214. package/dist/plus/ai/constants.js +7 -0
  215. package/dist/plus/ai/constants.js.map +1 -1
  216. package/dist/plus/ai/errors.d.ts +4 -1
  217. package/dist/plus/ai/errors.d.ts.map +1 -1
  218. package/dist/plus/ai/errors.js +38 -0
  219. package/dist/plus/ai/errors.js.map +1 -1
  220. package/dist/plus/ai/models/model.d.ts +1 -1
  221. package/dist/plus/ai/models/model.d.ts.map +1 -1
  222. package/dist/plus/ai/models/model.js.map +1 -1
  223. package/dist/plus/ai/models/promptTemplates.d.ts +28 -2
  224. package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
  225. package/dist/plus/ai/models/results.d.ts +28 -0
  226. package/dist/plus/ai/models/results.d.ts.map +1 -1
  227. package/dist/plus/ai/prompts.d.ts +4 -0
  228. package/dist/plus/ai/prompts.d.ts.map +1 -1
  229. package/dist/plus/ai/prompts.js +167 -1
  230. package/dist/plus/ai/prompts.js.map +1 -1
  231. package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -1
  232. package/dist/plus/ai/utils/ai.utils.js +2 -0
  233. package/dist/plus/ai/utils/ai.utils.js.map +1 -1
  234. package/dist/plus/ai/utils/results.utils.d.ts +3 -0
  235. package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
  236. package/dist/plus/ai/utils/results.utils.js +75 -0
  237. package/dist/plus/ai/utils/results.utils.js.map +1 -1
  238. package/dist/plus/ai/utils/truncation.utils.d.ts +1 -1
  239. package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -1
  240. package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
  241. package/dist/plus/git-github/api/github.d.ts +10 -1
  242. package/dist/plus/git-github/api/github.d.ts.map +1 -1
  243. package/dist/plus/git-github/api/github.js +156 -49
  244. package/dist/plus/git-github/api/github.js.map +1 -1
  245. package/dist/plus/git-github/api/types.d.ts +8 -0
  246. package/dist/plus/git-github/api/types.d.ts.map +1 -1
  247. package/dist/plus/git-github/models.d.ts +1 -1
  248. package/dist/plus/git-github/models.d.ts.map +1 -1
  249. package/dist/plus/git-github/models.js.map +1 -1
  250. package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -1
  251. package/dist/plus/git-github/providers/github/blame.js.map +1 -1
  252. package/dist/plus/git-github/providers/github/branches.d.ts +5 -1
  253. package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -1
  254. package/dist/plus/git-github/providers/github/branches.js +60 -22
  255. package/dist/plus/git-github/providers/github/branches.js.map +1 -1
  256. package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -1
  257. package/dist/plus/git-github/providers/github/commits.js +144 -92
  258. package/dist/plus/git-github/providers/github/commits.js.map +1 -1
  259. package/dist/plus/git-github/providers/github/diff.d.ts +3 -1
  260. package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -1
  261. package/dist/plus/git-github/providers/github/diff.js +23 -9
  262. package/dist/plus/git-github/providers/github/diff.js.map +1 -1
  263. package/dist/plus/git-github/providers/github/refs.d.ts +9 -1
  264. package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -1
  265. package/dist/plus/git-github/providers/github/refs.js +38 -13
  266. package/dist/plus/git-github/providers/github/refs.js.map +1 -1
  267. package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -1
  268. package/dist/plus/git-github/providers/github/revision.js +1 -2
  269. package/dist/plus/git-github/providers/github/revision.js.map +1 -1
  270. package/dist/plus/git-github/providers/github/status.d.ts +4 -1
  271. package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
  272. package/dist/plus/git-github/providers/github/status.js +1 -1
  273. package/dist/plus/git-github/providers/github/status.js.map +1 -1
  274. package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -1
  275. package/dist/plus/git-github/providers/github/tags.js +35 -36
  276. package/dist/plus/git-github/providers/github/tags.js.map +1 -1
  277. package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -1
  278. package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
  279. package/dist/utils/color.d.ts.map +1 -1
  280. package/dist/utils/color.js.map +1 -1
  281. package/dist/utils/decorators/log.js +1 -1
  282. package/dist/utils/decorators/log.js.map +1 -1
  283. package/dist/utils/decorators/sequentialize.d.ts.map +1 -1
  284. package/dist/utils/decorators/sequentialize.js +4 -2
  285. package/dist/utils/decorators/sequentialize.js.map +1 -1
  286. package/dist/utils/decorators/serializable.d.ts.map +1 -1
  287. package/dist/utils/decorators/serializable.js.map +1 -1
  288. package/dist/utils/dedupedAsyncCache.d.ts +37 -0
  289. package/dist/utils/dedupedAsyncCache.d.ts.map +1 -0
  290. package/dist/utils/dedupedAsyncCache.js +68 -0
  291. package/dist/utils/dedupedAsyncCache.js.map +1 -0
  292. package/dist/utils/diff.d.ts +2 -0
  293. package/dist/utils/diff.d.ts.map +1 -0
  294. package/dist/utils/diff.js +53 -0
  295. package/dist/utils/diff.js.map +1 -0
  296. package/dist/utils/disposable.d.ts.map +1 -1
  297. package/dist/utils/disposable.js.map +1 -1
  298. package/dist/utils/env/node/base64.js.map +1 -1
  299. package/dist/utils/env/node/exec.d.ts.map +1 -1
  300. package/dist/utils/env/node/exec.js.map +1 -1
  301. package/dist/utils/error.d.ts.map +1 -1
  302. package/dist/utils/error.js.map +1 -1
  303. package/dist/utils/formatter.d.ts.map +1 -1
  304. package/dist/utils/formatter.js +4 -10
  305. package/dist/utils/formatter.js.map +1 -1
  306. package/dist/utils/iterable.d.ts.map +1 -1
  307. package/dist/utils/iterable.js.map +1 -1
  308. package/dist/utils/logger.d.ts.map +1 -1
  309. package/dist/utils/logger.js.map +1 -1
  310. package/dist/utils/lruMap.d.ts +49 -0
  311. package/dist/utils/lruMap.d.ts.map +1 -0
  312. package/dist/utils/lruMap.js +103 -0
  313. package/dist/utils/lruMap.js.map +1 -0
  314. package/dist/utils/markdown.d.ts.map +1 -1
  315. package/dist/utils/markdown.js.map +1 -1
  316. package/dist/utils/mru.d.ts.map +1 -1
  317. package/dist/utils/mru.js.map +1 -1
  318. package/dist/utils/path.d.ts.map +1 -1
  319. package/dist/utils/path.js.map +1 -1
  320. package/dist/utils/promise.d.ts +1 -0
  321. package/dist/utils/promise.d.ts.map +1 -1
  322. package/dist/utils/promise.js +17 -0
  323. package/dist/utils/promise.js.map +1 -1
  324. package/dist/utils/promiseCache.d.ts +10 -0
  325. package/dist/utils/promiseCache.d.ts.map +1 -1
  326. package/dist/utils/promiseCache.js +22 -0
  327. package/dist/utils/promiseCache.js.map +1 -1
  328. package/dist/utils/string.d.ts.map +1 -1
  329. package/dist/utils/string.js.map +1 -1
  330. package/dist/utils/uri.d.ts.map +1 -1
  331. package/dist/utils/uri.js.map +1 -1
  332. package/dist/utils/version.d.ts +14 -0
  333. package/dist/utils/version.d.ts.map +1 -1
  334. package/dist/utils/version.js +48 -0
  335. package/dist/utils/version.js.map +1 -1
  336. package/package.json +13 -1
  337. package/src/git/cache.ts +309 -29
  338. package/src/git/context.ts +11 -2
  339. package/src/git/models/branch.ts +1 -0
  340. package/src/git/models/commit.ts +2 -17
  341. package/src/git/models/graph.ts +2 -4
  342. package/src/git/models/reference.ts +33 -0
  343. package/src/git/models/remote.ts +1 -0
  344. package/src/git/models/repository.ts +44 -6
  345. package/src/git/models/search.ts +2 -2
  346. package/src/git/models/worktree.ts +10 -2
  347. package/src/git/parsers/diffParser.ts +9 -44
  348. package/src/git/providers/branches.ts +25 -4
  349. package/src/git/providers/commits.ts +7 -0
  350. package/src/git/providers/config.ts +4 -0
  351. package/src/git/providers/diff.ts +8 -2
  352. package/src/git/providers/operations.ts +54 -3
  353. package/src/git/providers/pausedOperations.ts +1 -0
  354. package/src/git/providers/refs.ts +32 -3
  355. package/src/git/providers/revision.ts +5 -1
  356. package/src/git/providers/staging.ts +14 -0
  357. package/src/git/providers/status.ts +6 -1
  358. package/src/git/remotes/azure-devops.ts +2 -0
  359. package/src/git/{exec.types.ts → run.types.ts} +22 -2
  360. package/src/git/service.ts +1 -0
  361. package/src/git/utils/autolink.utils.ts +1 -0
  362. package/src/git/utils/blame.utils.ts +2 -0
  363. package/src/git/utils/conflictResolution.utils.ts +31 -0
  364. package/src/git/utils/fileStatus.utils.ts +7 -1
  365. package/src/git/utils/search.utils.ts +2 -0
  366. package/src/git/utils/sorting.ts +38 -0
  367. package/src/git/utils/status.utils.ts +1 -0
  368. package/src/git/watching/classifyChange.ts +9 -0
  369. package/src/git/watching/gitIgnoreFilter.ts +2 -2
  370. package/src/git/watching/initWatcher.ts +2 -0
  371. package/src/git/watching/watchGroup.ts +3 -0
  372. package/src/git/watching/watchService.ts +38 -5
  373. package/src/git/watching/watchSession.ts +10 -0
  374. package/src/git-cli/cliGitProvider.ts +1 -1
  375. package/src/git-cli/exec/exec.types.ts +2 -2
  376. package/src/git-cli/exec/git.ts +76 -23
  377. package/src/git-cli/exec/gitQueue.ts +98 -25
  378. package/src/git-cli/parsers/blameParser.ts +1 -0
  379. package/src/git-cli/parsers/logParser.ts +6 -1
  380. package/src/git-cli/parsers/refParser.ts +33 -34
  381. package/src/git-cli/providers/blame.ts +2 -1
  382. package/src/git-cli/providers/branches.ts +341 -196
  383. package/src/git-cli/providers/commits.ts +145 -46
  384. package/src/git-cli/providers/config.ts +50 -16
  385. package/src/git-cli/providers/contributors.ts +7 -12
  386. package/src/git-cli/providers/diff.ts +107 -20
  387. package/src/git-cli/providers/graph.ts +58 -29
  388. package/src/git-cli/providers/operations.ts +253 -57
  389. package/src/git-cli/providers/patch.ts +16 -37
  390. package/src/git-cli/providers/pausedOperations.ts +14 -6
  391. package/src/git-cli/providers/refs.ts +274 -11
  392. package/src/git-cli/providers/remotes.ts +4 -4
  393. package/src/git-cli/providers/revision.ts +22 -15
  394. package/src/git-cli/providers/staging.ts +51 -8
  395. package/src/git-cli/providers/stash.ts +67 -134
  396. package/src/git-cli/providers/status.ts +21 -10
  397. package/src/git-cli/providers/tags.ts +18 -19
  398. package/src/git-cli/providers/worktrees.ts +3 -3
  399. package/src/ipc/discovery.ts +56 -0
  400. package/src/ipc/ipcServer.ts +171 -0
  401. package/src/plus/agents/providers/claudeCodeProvider.ts +1782 -0
  402. package/src/plus/agents/providers/claudeCodeTranscript.ts +214 -0
  403. package/src/plus/agents/sanitizePrompt.ts +109 -0
  404. package/src/plus/agents/stateMachine.ts +197 -0
  405. package/src/plus/agents/types.ts +277 -0
  406. package/src/plus/ai/constants.ts +8 -0
  407. package/src/plus/ai/errors.ts +40 -0
  408. package/src/plus/ai/models/model.ts +1 -0
  409. package/src/plus/ai/models/promptTemplates.ts +42 -0
  410. package/src/plus/ai/models/results.ts +30 -0
  411. package/src/plus/ai/prompts.ts +171 -1
  412. package/src/plus/ai/utils/ai.utils.ts +2 -0
  413. package/src/plus/ai/utils/results.utils.ts +101 -0
  414. package/src/plus/ai/utils/truncation.utils.ts +3 -1
  415. package/src/plus/git-github/api/github.ts +199 -53
  416. package/src/plus/git-github/api/types.ts +15 -0
  417. package/src/plus/git-github/models.ts +1 -1
  418. package/src/plus/git-github/providers/github/blame.ts +2 -0
  419. package/src/plus/git-github/providers/github/branches.ts +75 -33
  420. package/src/plus/git-github/providers/github/commits.ts +231 -160
  421. package/src/plus/git-github/providers/github/diff.ts +35 -21
  422. package/src/plus/git-github/providers/github/refs.ts +57 -22
  423. package/src/plus/git-github/providers/github/revision.ts +1 -2
  424. package/src/plus/git-github/providers/github/status.ts +6 -1
  425. package/src/plus/git-github/providers/github/tags.ts +61 -62
  426. package/src/plus/git-github/providers/githubGitProvider.ts +1 -0
  427. package/src/utils/color.ts +2 -0
  428. package/src/utils/decorators/log.ts +1 -1
  429. package/src/utils/decorators/sequentialize.ts +8 -6
  430. package/src/utils/decorators/serializable.ts +1 -0
  431. package/src/utils/dedupedAsyncCache.ts +74 -0
  432. package/src/utils/diff.ts +61 -0
  433. package/src/utils/disposable.ts +2 -0
  434. package/src/utils/env/node/base64.ts +1 -1
  435. package/src/utils/env/node/exec.ts +4 -2
  436. package/src/utils/error.ts +1 -0
  437. package/src/utils/formatter.ts +4 -11
  438. package/src/utils/iterable.ts +4 -1
  439. package/src/utils/logger.ts +1 -0
  440. package/src/utils/lruMap.ts +112 -0
  441. package/src/utils/markdown.ts +1 -0
  442. package/src/utils/mru.ts +2 -0
  443. package/src/utils/path.ts +1 -0
  444. package/src/utils/promise.ts +22 -0
  445. package/src/utils/promiseCache.ts +24 -0
  446. package/src/utils/string.ts +2 -0
  447. package/src/utils/uri.ts +1 -0
  448. package/src/utils/version.ts +49 -0
  449. package/dist/git/exec.types.d.ts.map +0 -1
  450. package/dist/git/exec.types.js +0 -2
  451. package/dist/git/exec.types.js.map +0 -1
@@ -60,7 +60,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
60
60
  repoPath: string,
61
61
  to?: string,
62
62
  from?: string,
63
- options?: { uris?: (string | Uri)[] },
63
+ options?: { uris?: (string | Uri)[]; includeUntracked?: boolean },
64
64
  _cancellation?: AbortSignal,
65
65
  ): Promise<GitDiffShortStat | undefined> {
66
66
  const scope = getScopedLogger();
@@ -76,7 +76,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
76
76
  }
77
77
 
78
78
  try {
79
- const result = await this.git.exec(
79
+ const result = await this.git.run(
80
80
  { cwd: repoPath, configs: gitConfigsDiff },
81
81
  'diff',
82
82
  '--shortstat',
@@ -85,12 +85,27 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
85
85
  '--',
86
86
  ...(options?.uris?.map(p => this.provider.getRelativePath(p, repoPath)) ?? []),
87
87
  );
88
- if (!result.stdout) return undefined;
89
88
 
90
- return parseGitDiffShortStat(result.stdout);
89
+ const stat = result.stdout ? parseGitDiffShortStat(result.stdout) : undefined;
90
+
91
+ // Merge in untracked files when the comparison involves the working tree.
92
+ // Skip when a pathspec filter is active — mixing a path-filtered diff count with an
93
+ // unfiltered untracked count would silently produce wrong totals.
94
+ if (options?.includeUntracked && !options.uris?.length && isWorkingTreeComparison(to, from)) {
95
+ const untracked = (await this.provider.status?.getUntrackedFiles?.(repoPath)) ?? [];
96
+ if (untracked.length) {
97
+ return {
98
+ files: (stat?.files ?? 0) + untracked.length,
99
+ additions: stat?.additions ?? 0,
100
+ deletions: stat?.deletions ?? 0,
101
+ };
102
+ }
103
+ }
104
+
105
+ return stat;
91
106
  } catch (ex) {
92
107
  const msg: string = ex?.toString() ?? '';
93
- if (GitErrors.noMergeBase.test(msg)) {
108
+ if (GitErrors.noMergeBase.test(msg) || GitErrors.badRevision.test(msg)) {
94
109
  return undefined;
95
110
  }
96
111
 
@@ -134,7 +149,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
134
149
 
135
150
  let result;
136
151
  try {
137
- result = await this.git.exec(
152
+ result = await this.git.run(
138
153
  { cwd: repoPath, configs: gitConfigsDiff, errors: 'throw', env: options?.index?.env },
139
154
  'diff',
140
155
  ...args,
@@ -173,7 +188,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
173
188
  contents: string,
174
189
  _cancellation?: AbortSignal,
175
190
  ): Promise<GitDiffFiles | undefined> {
176
- const result = await this.git.exec(
191
+ const result = await this.git.run(
177
192
  { cwd: repoPath, configs: gitConfigsLog, stdin: contents },
178
193
  'apply',
179
194
  '--numstat',
@@ -194,7 +209,13 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
194
209
  repoPath: string,
195
210
  ref1OrRange: string | GitRevisionRange,
196
211
  ref2?: string,
197
- options?: { filters?: GitDiffFilter[]; path?: string; renameLimit?: number; similarityThreshold?: number },
212
+ options?: {
213
+ filters?: GitDiffFilter[];
214
+ includeUntracked?: boolean;
215
+ path?: string;
216
+ renameLimit?: number;
217
+ similarityThreshold?: number;
218
+ },
198
219
  ): Promise<GitFile[] | undefined> {
199
220
  try {
200
221
  const similarityThreshold = options?.similarityThreshold;
@@ -202,7 +223,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
202
223
  options?.renameLimit != null
203
224
  ? [...gitConfigsDiff, '-c', `diff.renameLimit=${options.renameLimit}`]
204
225
  : gitConfigsDiff;
205
- const result = await this.git.exec(
226
+ const result = await this.git.run(
206
227
  { cwd: repoPath, configs: configs },
207
228
  'diff',
208
229
  '--numstat',
@@ -216,9 +237,34 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
216
237
  '--',
217
238
  options?.path ? options.path : undefined,
218
239
  );
219
- if (!result.stdout) return undefined;
220
240
 
221
- return parseGitDiffNumStatFiles(result.stdout, repoPath);
241
+ const files = result.stdout ? (parseGitDiffNumStatFiles(result.stdout, repoPath) ?? []) : [];
242
+
243
+ // Merge in untracked files when the comparison involves the working tree.
244
+ // Skip when `filters` excludes additions (untracked entries are semantically 'A'/added),
245
+ // or when `path` is a non-exact pathspec we can't reliably match against the untracked list.
246
+ if (
247
+ options?.includeUntracked &&
248
+ ref2 == null &&
249
+ typeof ref1OrRange === 'string' &&
250
+ !isRevisionRange(ref1OrRange) &&
251
+ !isUncommittedStaged(ref1OrRange) &&
252
+ filtersAllowUntracked(options.filters) &&
253
+ !isNonExactPathspec(options.path)
254
+ ) {
255
+ const untracked = (await this.provider.status?.getUntrackedFiles?.(repoPath)) ?? [];
256
+ if (untracked.length) {
257
+ const seen = new Set(files.map(f => f.path));
258
+ for (const file of untracked) {
259
+ if (seen.has(file.path)) continue;
260
+ if (options.path && options.path !== file.path) continue;
261
+
262
+ files.push(file);
263
+ }
264
+ }
265
+ }
266
+
267
+ return files.length ? files : undefined;
222
268
  } catch (_ex) {
223
269
  return undefined;
224
270
  }
@@ -283,7 +329,12 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
283
329
  // Follow file history and specify the file path
284
330
  args.push('--follow', '--', relativePath);
285
331
 
286
- const result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
332
+ // Unbounded --follow walk over file history can be slow on long histories — queue as background
333
+ // so it doesn't compete with interactive work.
334
+ const result = await this.git.run(
335
+ { cwd: repoPath, configs: gitConfigsLog, priority: 'background' },
336
+ ...args,
337
+ );
287
338
 
288
339
  let currentSha;
289
340
  let currentPath;
@@ -511,7 +562,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
511
562
 
512
563
  args.push('--follow', rev!, '--', relativePath);
513
564
 
514
- const result = await this.git.exec(
565
+ const result = await this.git.run(
515
566
  {
516
567
  cwd: repoPath,
517
568
  configs: gitConfigsLog,
@@ -636,7 +687,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
636
687
 
637
688
  let result: GitResult;
638
689
  try {
639
- result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
690
+ result = await this.git.run({ cwd: repoPath, configs: gitConfigsLog }, ...args);
640
691
  } catch (ex) {
641
692
  if (rev && !isUncommittedStaged(rev)) throw ex;
642
693
 
@@ -659,7 +710,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
659
710
  };
660
711
 
661
712
  args.splice(index, 1, `-L${range.startLine},${range.endLine}:${relativePath}`);
662
- result = await this.git.exec({ cwd: repoPath, configs: gitConfigsLog }, ...args);
713
+ result = await this.git.run({ cwd: repoPath, configs: gitConfigsLog }, ...args);
663
714
  }
664
715
 
665
716
  let currentRange;
@@ -761,7 +812,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
761
812
  }
762
813
 
763
814
  try {
764
- return await this.git.exec(
815
+ return await this.git.run(
765
816
  { cwd: repoPath, configs: gitConfigsDiff, encoding: options?.encoding },
766
817
  ...params,
767
818
  '--',
@@ -805,7 +856,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
805
856
  params.push('--no-index');
806
857
 
807
858
  try {
808
- const result = await this.git.exec(
859
+ const result = await this.git.run(
809
860
  {
810
861
  cwd: repoPath,
811
862
  configs: gitConfigsDiff,
@@ -939,7 +990,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
939
990
  scope?.debug(`Using tool=${tool}`);
940
991
  }
941
992
 
942
- await this.git.exec(
993
+ await this.git.run(
943
994
  { cwd: root },
944
995
  'difftool',
945
996
  '--no-prompt',
@@ -978,7 +1029,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
978
1029
  scope?.debug(`Using tool=${tool}`);
979
1030
  }
980
1031
 
981
- await this.git.exec({ cwd: repoPath }, 'difftool', '--dir-diff', `--tool=${tool}`, ref1, ref2);
1032
+ await this.git.run({ cwd: repoPath }, 'difftool', '--dir-diff', `--tool=${tool}`, ref1, ref2);
982
1033
  } catch (ex) {
983
1034
  const msg: string = ex?.toString() ?? '';
984
1035
  if (msg === 'No diff tool found' || /Unknown .+? tool/.test(msg)) {
@@ -993,6 +1044,42 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
993
1044
  }
994
1045
  }
995
1046
  }
1047
+ // Returns true when no --diff-filter is active or when it includes additions ('A' or '*').
1048
+ // Untracked files are semantically "added" — if a caller restricts filters to e.g. ['M'],
1049
+ // honor that and omit untracked.
1050
+ function filtersAllowUntracked(filters: GitDiffFilter[] | undefined): boolean {
1051
+ if (!filters?.length) return true;
1052
+ return filters.includes('A') || filters.includes('*');
1053
+ }
1054
+
1055
+ // Returns true when the path is a git pathspec we can't match with simple equality
1056
+ // (directory prefix, glob, or magic pathspec). In that case, skip the untracked merge
1057
+ // rather than risk excluding legitimate matches or including wrong ones.
1058
+ function isNonExactPathspec(path: string | undefined): boolean {
1059
+ if (!path) return false;
1060
+ return path.endsWith('/') || /[*?[\]]|^:/.test(path);
1061
+ }
1062
+
1063
+ // Returns true when the `git diff` invocation shape includes the working tree
1064
+ // (i.e. `git diff`, `git diff HEAD`, or `git diff <ref>` with no `from`), and
1065
+ // therefore untracked files are a meaningful addition to the result.
1066
+ function isWorkingTreeComparison(to: string | undefined, from: string | undefined): boolean {
1067
+ if (to == null) return true;
1068
+ if (isRevisionRange(to) || isUncommittedStaged(to)) return false;
1069
+
1070
+ // `to === uncommitted` always targets the working tree (`prepareToFromDiffArgs` sets
1071
+ // `from = 'HEAD'` when omitted, or diffs against the caller-supplied `from`).
1072
+ if (isUncommitted(to)) return true;
1073
+
1074
+ // `git diff <from>` — `to === ''` means the caller explicitly asked for working tree vs `from`
1075
+ if (to === '') return from == null || !isUncommittedStaged(from);
1076
+
1077
+ // `getChangedFilesCount` uses `prepareToFromDiffArgs`, which translates `to` (with no `from`)
1078
+ // to `${to}^ ${to}` UNLESS `to` is HEAD or empty.
1079
+ if (to.toUpperCase() === 'HEAD' && from == null) return true;
1080
+ return false;
1081
+ }
1082
+
996
1083
  function prepareToFromDiffArgs(
997
1084
  to: string,
998
1085
  from: string | undefined,
@@ -1063,7 +1150,7 @@ export async function findPathStatusChanged(
1063
1150
 
1064
1151
  const ordering = options?.ordering;
1065
1152
 
1066
- const result = await git.exec(
1153
+ const result = await git.run(
1067
1154
  { cwd: repoPath, configs: gitConfigsLog },
1068
1155
  'log',
1069
1156
  ...parser.arguments,
@@ -24,6 +24,7 @@ import type {
24
24
  import type { GitRemote } from '../../git/models/remote.js';
25
25
  import type { SearchQuery } from '../../git/models/search.js';
26
26
  import type { GitWorktree } from '../../git/models/worktree.js';
27
+ import type { GitCommitReachability } from '../../git/providers/commits.js';
27
28
  import type { GitGraphSubProvider } from '../../git/providers/graph.js';
28
29
  import {
29
30
  getBranchId,
@@ -33,6 +34,7 @@ import {
33
34
  import { getChangedFilesCount } from '../../git/utils/commit.utils.js';
34
35
  import { isUncommitted } from '../../git/utils/revision.utils.js';
35
36
  import { getSearchQueryComparisonKey, parseSearchQueryGitCommand } from '../../git/utils/search.utils.js';
37
+ import { compareReachableRefs } from '../../git/utils/sorting.js';
36
38
  import { getTagId } from '../../git/utils/tag.utils.js';
37
39
  import { isUserMatch } from '../../git/utils/user.utils.js';
38
40
  import { getWorktreeId, groupWorktreesByBranch } from '../../git/utils/worktree.utils.js';
@@ -56,6 +58,8 @@ import { convertStashesToStdin } from './stash.js';
56
58
 
57
59
  const progressiveSearchResultsBatchTimeMs = 500; // Send updates every 500ms (2 updates/second)
58
60
 
61
+ type ReachableRef = GitCommitReachability['refs'][number];
62
+
59
63
  export class GraphGitSubProvider implements GitGraphSubProvider {
60
64
  constructor(
61
65
  private readonly context: GitServiceContext,
@@ -87,7 +91,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
87
91
  const [shaResult, stashResult, branchesResult, remotesResult, currentUserResult, worktreesResult] =
88
92
  await Promise.allSettled([
89
93
  !isUncommitted(rev, true)
90
- ? this.git.exec(
94
+ ? this.git.run(
91
95
  { cwd: repoPath, configs: gitConfigsLog },
92
96
  'log',
93
97
  ...shaParser.arguments,
@@ -96,7 +100,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
96
100
  '--',
97
101
  )
98
102
  : undefined,
99
- this.provider.stash?.getStash(repoPath, undefined, cancellation),
103
+ this.provider.stash?.getStash(repoPath, { includeFiles: false }, cancellation),
100
104
  this.provider.branches.getBranches(repoPath, undefined, cancellation),
101
105
  this.provider.remotes.getRemotes(repoPath, undefined, cancellation),
102
106
  this.provider.config.getCurrentUser(repoPath),
@@ -138,7 +142,9 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
138
142
  const avatars = new Map<string, string>();
139
143
  const ids = new Set<string>();
140
144
  const reachableFromHEAD = new Set<string>();
141
- const reachableFromBranches = new Map<string, Set<string>>();
145
+
146
+ // Map<sha, Map<refKey, ref>> — inner map deduplicates refs during propagation
147
+ const reachableRefs = new Map<string, Map<string, ReachableRef>>();
142
148
  const rowStats: GitGraphRowsStats = new Map<string, GitGraphRowStats>();
143
149
  let pendingRowsStatsCount = 0;
144
150
  let iterations = 0;
@@ -218,7 +224,6 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
218
224
  branchIdOfMainWorktree: branchIdOfMainWorktree,
219
225
  stashes: gitStash?.stashes,
220
226
  reachableFromHEAD: reachableFromHEAD,
221
- reachableFromBranches: reachableFromBranches,
222
227
  avatars: avatars,
223
228
  }
224
229
  : undefined;
@@ -229,7 +234,14 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
229
234
  // - SHA + limit = 0: Find SHA, stop immediately
230
235
  // - No SHA + limit > 0: Load exactly `limit` commits
231
236
  // - No SHA + limit = 0: Load everything remaining
232
- if ((limit && count >= limit && (!sha || found)) || (!limit && sha && found)) {
237
+ // - SHA + limit > 0 + still unfound past 10× limit: defensive cap so an unreachable
238
+ // SHA (e.g. a stale merge-base the webview hasn't yet seen invalidated) can't
239
+ // walk the entire history. `hasMore=true` lets callers retry; the graph-wrapper
240
+ // side deduplicates re-requests so the cap doesn't loop.
241
+ if (
242
+ (limit && count >= limit && (!sha || found || count >= limit * 10)) ||
243
+ (!limit && sha && found)
244
+ ) {
233
245
  hasMore = true;
234
246
  aborter.abort();
235
247
  break;
@@ -245,6 +257,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
245
257
  total++;
246
258
  shaOrRemapped = remappedIds.get(commit.sha);
247
259
  if (shaOrRemapped && ids.has(shaOrRemapped)) continue;
260
+
248
261
  shaOrRemapped ??= commit.sha;
249
262
 
250
263
  ids.add(shaOrRemapped);
@@ -340,34 +353,46 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
340
353
  }
341
354
  }
342
355
 
343
- if (refHeads.length > 0) {
344
- let branches = reachableFromBranches.get(shaOrRemapped);
345
- if (branches == null) {
346
- branches = new Set<string>();
347
- reachableFromBranches.set(shaOrRemapped, branches);
356
+ // Seed reachability from all ref types on this commit
357
+ if (refHeads.length > 0 || refRemoteHeads.length > 0 || refTags.length > 0) {
358
+ let refs = reachableRefs.get(shaOrRemapped);
359
+ if (refs == null) {
360
+ refs = new Map<string, ReachableRef>();
361
+ reachableRefs.set(shaOrRemapped, refs);
362
+ }
363
+ for (const h of refHeads) {
364
+ const key = `b:${h.name}`;
365
+ refs.set(key, { refType: 'branch', name: h.name, remote: false, current: h.isCurrentHead });
366
+ }
367
+ for (const r of refRemoteHeads) {
368
+ const name = `${r.owner}/${r.name}`;
369
+ refs.set(`r:${name}`, { refType: 'branch', name: name, remote: true });
348
370
  }
349
- for (const refHead of refHeads) {
350
- branches.add(refHead.name);
371
+ for (const t of refTags) {
372
+ refs.set(`t:${t.name}`, { refType: 'tag', name: t.name });
351
373
  }
352
374
  }
353
375
 
354
- const currentBranches = reachableFromBranches.get(shaOrRemapped);
355
- if (currentBranches != null && currentBranches.size > 0) {
376
+ // Propagate reachability to parents
377
+ const currentRefs = reachableRefs.get(shaOrRemapped);
378
+ if (currentRefs != null && currentRefs.size > 0) {
356
379
  for (parent of parents) {
357
- let parentBranches = reachableFromBranches.get(parent);
358
- if (parentBranches == null) {
359
- parentBranches = new Set<string>();
360
- reachableFromBranches.set(parent, parentBranches);
380
+ let parentRefs = reachableRefs.get(parent);
381
+ if (parentRefs == null) {
382
+ parentRefs = new Map<string, ReachableRef>();
383
+ reachableRefs.set(parent, parentRefs);
361
384
  }
362
- for (const branchName of currentBranches) {
363
- parentBranches.add(branchName);
385
+ for (const [key, ref] of currentRefs) {
386
+ if (!parentRefs.has(key)) {
387
+ parentRefs.set(key, ref);
388
+ }
364
389
  }
365
390
  }
366
391
  }
367
392
 
368
393
  stash = gitStash?.stashes.get(shaOrRemapped);
369
394
  if (stash != null) {
370
- const branches = reachableFromBranches.get(shaOrRemapped);
395
+ const refs = reachableRefs.get(shaOrRemapped);
371
396
  const row: GitGraphRow = {
372
397
  sha: shaOrRemapped,
373
398
  // Always only return the first parent for stashes, as it is a Git implementation for the index and untracked files
@@ -381,7 +406,9 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
381
406
  heads: refHeads,
382
407
  remotes: refRemoteHeads,
383
408
  tags: refTags,
384
- reachableFromBranches: branches ? [...branches] : undefined,
409
+ reachability: refs?.size
410
+ ? { partial: true, refs: [...refs.values()].sort(compareReachableRefs) }
411
+ : undefined,
385
412
  isCurrentUser: true,
386
413
  };
387
414
  rowProcessor?.processRow(row, graphCtx!);
@@ -397,7 +424,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
397
424
  } else {
398
425
  isCurrentUser = isUserMatch(currentUser, commit.author, commit.authorEmail);
399
426
 
400
- const branches = reachableFromBranches.get(shaOrRemapped);
427
+ const refs = reachableRefs.get(shaOrRemapped);
401
428
  const row: GitGraphRow = {
402
429
  sha: shaOrRemapped,
403
430
  parents: onlyFollowFirstParent ? parents.slice(0, 1) : parents,
@@ -410,7 +437,9 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
410
437
  heads: refHeads,
411
438
  remotes: refRemoteHeads,
412
439
  tags: refTags,
413
- reachableFromBranches: branches ? [...branches] : undefined,
440
+ reachability: refs?.size
441
+ ? { partial: true, refs: [...refs.values()].sort(compareReachableRefs) }
442
+ : undefined,
414
443
  isCurrentUser: isCurrentUser || undefined,
415
444
  };
416
445
  rowProcessor?.processRow(row, graphCtx!);
@@ -442,8 +471,8 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
442
471
  }
443
472
  args.push(`--${ordering}-order`, '--all');
444
473
 
445
- const statsResult = await this.git.exec(
446
- { cwd: repoPath, configs: gitConfigsLog, stdin: stdin },
474
+ const statsResult = await this.git.run(
475
+ { cwd: repoPath, configs: gitConfigsLog, stdin: stdin, priority: 'background' },
447
476
  'log',
448
477
  stdin ? '--stdin' : undefined,
449
478
  ...args,
@@ -455,7 +484,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
455
484
  for (const stat of statsParser.parse(statsResult.stdout)) {
456
485
  statShaOrRemapped = remappedIds.get(stat.sha) ?? stat.sha;
457
486
 
458
- // If we already have the stats for this sha, skip it (e.g. stashes)
487
+ // Don't overwrite stats already populated for this sha
459
488
  if (rowStats.has(statShaOrRemapped)) continue;
460
489
 
461
490
  rowStats.set(statShaOrRemapped, stat.stats);
@@ -485,7 +514,6 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
485
514
  worktrees: worktrees,
486
515
  worktreesByBranch: worktreesByBranch,
487
516
  reachableFromHEAD: reachableFromHEAD,
488
- reachableFromBranches: reachableFromBranches,
489
517
  rows: rows,
490
518
  id: sha ?? rev,
491
519
  rowsStats: rowStats,
@@ -595,7 +623,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
595
623
  // Don't include stashes when using ref: filter, as they would add unrelated commits
596
624
  // There *HAS* to be a better way to get git log to return stashes, but this is the best we've found
597
625
  ({ stdin, stashes, remappedIds } = convertStashesToStdin(
598
- await this.provider.stash?.getStash(repoPath, undefined, cancellation),
626
+ await this.provider.stash?.getStash(repoPath, { includeFiles: false }, cancellation),
599
627
  ));
600
628
  } else {
601
629
  remappedIds = new Map();
@@ -705,6 +733,7 @@ export class GraphGitSubProvider implements GitGraphSubProvider {
705
733
  runningTotal: results.size,
706
734
  hasMore: true,
707
735
  };
736
+
708
737
  batch.length = 0;
709
738
  lastProgressTime = Date.now();
710
739
  }