@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
@@ -177,10 +177,7 @@ export class GitCommit implements GitRevisionReference {
177
177
 
178
178
  const stashFiles = getSettledValue(stashFilesResult);
179
179
  if (stashFiles?.length) {
180
- commit.applyFileset({
181
- files: stashFiles as readonly GitFileChange[],
182
- filtered: commit.fileset?.filtered,
183
- });
180
+ commit.applyFileset({ files: stashFiles, filtered: commit.fileset?.filtered });
184
181
  }
185
182
  enrichCommit(commit, { stashUntrackedFilesLoaded: true });
186
183
  } else {
@@ -218,7 +215,6 @@ export class GitCommit implements GitRevisionReference {
218
215
  readonly stashNumber: string | undefined;
219
216
  readonly stashOnRef: string | undefined;
220
217
  readonly tips: string[] | undefined;
221
- readonly parentTimestamps?: GitStashParentInfo[] | undefined;
222
218
 
223
219
  constructor(
224
220
  public readonly repoPath: string,
@@ -234,13 +230,11 @@ export class GitCommit implements GitRevisionReference {
234
230
  tips?: string[],
235
231
  stashName?: string | undefined,
236
232
  stashOnRef?: string | undefined,
237
- parentTimestamps?: GitStashParentInfo[] | undefined,
238
233
  shaLength: number = getAbbreviatedShaLength(),
239
234
  ) {
240
235
  this.ref = sha;
241
236
  this.shortSha = sha.substring(0, shaLength);
242
237
  this.tips = tips;
243
- this.parentTimestamps = parentTimestamps;
244
238
 
245
239
  if (stashName) {
246
240
  this.refType = 'stash';
@@ -457,7 +451,6 @@ export class GitCommit implements GitRevisionReference {
457
451
  stats?: GitCommitStats | null;
458
452
  stashUntrackedFilesLoaded?: boolean;
459
453
  resolvedPreviousSha?: string;
460
- parentTimestamps?: GitStashParentInfo[] | null;
461
454
  }): T {
462
455
  const commit = new GitCommit(
463
456
  this.repoPath,
@@ -473,7 +466,6 @@ export class GitCommit implements GitRevisionReference {
473
466
  this.tips,
474
467
  this.stashName,
475
468
  this.stashOnRef,
476
- this.getChangedValue(changes.parentTimestamps, this.parentTimestamps),
477
469
  this.shortSha.length,
478
470
  );
479
471
  commit._etagWorkingTree = this._etagWorkingTree;
@@ -522,7 +514,6 @@ export class GitCommit implements GitRevisionReference {
522
514
  this.tips,
523
515
  this.stashName,
524
516
  this.stashOnRef,
525
- this.parentTimestamps,
526
517
  );
527
518
  commit._etagWorkingTree = this._etagWorkingTree;
528
519
  return commit as T;
@@ -530,6 +521,7 @@ export class GitCommit implements GitRevisionReference {
530
521
 
531
522
  protected computeFileStats(): void {
532
523
  if (!this._recomputeStats || this._fileset == null) return;
524
+
533
525
  this._recomputeStats = false;
534
526
 
535
527
  const changedFiles = { added: 0, deleted: 0, changed: 0 };
@@ -672,17 +664,10 @@ export interface GitCommitStats<Files extends number | GitDiffFileStats = number
672
664
  readonly deletions: number;
673
665
  }
674
666
 
675
- export interface GitStashParentInfo {
676
- readonly sha: string;
677
- readonly authorDate?: number;
678
- readonly committerDate?: number;
679
- }
680
-
681
667
  export interface GitStashCommit extends GitCommit {
682
668
  readonly refType: GitStashReference['refType'];
683
669
  readonly stashName: string;
684
670
  readonly stashNumber: string;
685
- readonly parentTimestamps?: GitStashParentInfo[];
686
671
  }
687
672
 
688
673
  export type GitCommitWithFullDetails = GitCommit & { message: string; fileset: GitCommitFileset };
@@ -1,3 +1,4 @@
1
+ import type { GitCommitReachability } from '../providers/commits.js';
1
2
  import type { GitBranch } from './branch.js';
2
3
  import type { GitStashCommit } from './commit.js';
3
4
  import type { GitRemote } from './remote.js';
@@ -77,7 +78,7 @@ export interface GitGraphRow {
77
78
  tags?: GitGraphRowTag[];
78
79
  contexts?: GitGraphRowContexts;
79
80
  stats?: GitGraphRowStats;
80
- reachableFromBranches?: string[];
81
+ reachability?: GitCommitReachability;
81
82
  isCurrentUser?: boolean;
82
83
  }
83
84
 
@@ -97,8 +98,6 @@ export interface GitGraph {
97
98
 
98
99
  /** SHAs reachable from HEAD (for enrichment: marking commits on the current branch) */
99
100
  readonly reachableFromHEAD?: ReadonlySet<string>;
100
- /** Map of SHA → set of branch names reachable from that SHA (for enrichment: branch context) */
101
- readonly reachableFromBranches?: ReadonlyMap<string, ReadonlySet<string>>;
102
101
 
103
102
  /** The rows for the set of commits requested */
104
103
  readonly rows: GitGraphRow[];
@@ -179,6 +178,5 @@ export interface GraphContext {
179
178
  readonly branchIdOfMainWorktree: string | undefined;
180
179
  readonly stashes: ReadonlyMap<string, GitStashCommit> | undefined;
181
180
  readonly reachableFromHEAD: ReadonlySet<string>;
182
- readonly reachableFromBranches: ReadonlyMap<string, ReadonlySet<string>>;
183
181
  readonly avatars: Map<string, string>;
184
182
  }
@@ -45,3 +45,36 @@ export interface GitTagReference {
45
45
  }
46
46
 
47
47
  export type GitReference = GitBranchReference | GitRevisionReference | GitStashReference | GitTagReference;
48
+
49
+ /**
50
+ * Lightweight ref-tip tuple — the minimum needed to map a SHA back to the refs that point at it.
51
+ * No upstream tracking, ahead/behind, annotation, etc. — use `GitBranch`/`GitTag` for those.
52
+ */
53
+ export interface GitRefTip {
54
+ readonly type: 'branch' | 'remote' | 'tag';
55
+ /** Short name: `main`, `origin/main`, `v1.2.0` */
56
+ readonly name: string;
57
+ /** Full refname: `refs/heads/main`, `refs/remotes/origin/main`, `refs/tags/v1.2.0` */
58
+ readonly fullName: string;
59
+ /** Tip object SHA. For annotated tags, the peeled commit SHA */
60
+ readonly sha: string;
61
+ }
62
+
63
+ /**
64
+ * Raw parsed `git for-each-ref` record covering every field the unified format emits.
65
+ * Inapplicable fields come back as empty strings from git (e.g. `upstream` on a tag,
66
+ * `peeledObjectname` on a branch).
67
+ */
68
+ export interface RefRecord {
69
+ current: string;
70
+ name: string;
71
+ objectname: string;
72
+ peeledObjectname: string;
73
+ upstream: string;
74
+ upstreamTracking: string;
75
+ committerDate: string;
76
+ creatorDate: string;
77
+ authorDate: string;
78
+ subject: string;
79
+ worktreePath?: string;
80
+ }
@@ -71,6 +71,7 @@ export class GitRemote<TProvider extends RemoteProvider | undefined = RemoteProv
71
71
  matches(urlOrDomain: string, path?: string): boolean {
72
72
  if (path == null) {
73
73
  if (equalsIgnoreCase(urlOrDomain, this.url)) return true;
74
+
74
75
  [, urlOrDomain, path] = parseGitRemoteUrl(urlOrDomain);
75
76
  }
76
77
 
@@ -48,7 +48,8 @@ export type RepositoryChange =
48
48
  | 'remoteProviders'
49
49
  | 'starred'
50
50
  | 'opened'
51
- | 'gkConfig';
51
+ | 'gkConfig'
52
+ | 'lastFetched';
52
53
 
53
54
  export const repositoryChanges = exhaustiveArray<RepositoryChange>()([
54
55
  'unknown',
@@ -71,6 +72,7 @@ export const repositoryChanges = exhaustiveArray<RepositoryChange>()([
71
72
  'starred',
72
73
  'opened',
73
74
  'gkConfig',
75
+ 'lastFetched',
74
76
  ]);
75
77
 
76
78
  export interface RepositoryInit {
@@ -123,6 +125,7 @@ export class Repository {
123
125
  protected readonly _watchService: RepositoryWatchService;
124
126
 
125
127
  private _pendingWorkingTreeChange?: RepositoryWorkingTreeChangeEvent;
128
+ private _pendingWorkingTreeFlush = false;
126
129
  private _repoChangeListener: UnifiedDisposable | undefined;
127
130
 
128
131
  constructor(init: RepositoryInit) {
@@ -355,7 +358,27 @@ export class Repository {
355
358
 
356
359
  /** Called when the watch service notifies of FETCH_HEAD changes. */
357
360
  protected onFetchHeadChanged(): void {
358
- this._lastFetched = undefined;
361
+ // Don't reset `_lastFetched` here: the FS watcher can fire even when the on-disk mtime
362
+ // hasn't advanced (atomic-rename / lock-file activity emits `change` events without an
363
+ // mtime bump), and wiping would clobber a fresher value set by `markFetched()`.
364
+ // `getLastFetched()` reconciles in-memory vs FS via `Math.max`. Force-fire so consumers
365
+ // invalidate their caches and re-read.
366
+ this.fireChange('lastFetched', true);
367
+ }
368
+
369
+ /**
370
+ * Marks the repository as having just been fetched. Use after a GitLens-initiated fetch/pull
371
+ * completes so the "last fetched" UI tracks the attempt even when git skipped rewriting
372
+ * `.git/FETCH_HEAD` (modern git omits the rewrite when all refs are up-to-date). The
373
+ * in-memory timestamp is reconciled with the on-disk mtime by {@link getLastFetched} via
374
+ * `Math.max`, so this is monotonic.
375
+ */
376
+ markFetched(timestamp: number = Date.now()): void {
377
+ const next = Math.max(this._lastFetched ?? 0, timestamp);
378
+ if (next === this._lastFetched) return;
379
+
380
+ this._lastFetched = next;
381
+ this.fireChange('lastFetched', true);
359
382
  }
360
383
 
361
384
  /** Called when .gitignore changes in the working tree. */
@@ -374,7 +397,15 @@ export class Repository {
374
397
  this._onDidChange.fire(extEvent);
375
398
  }
376
399
 
377
- /** Called by the session when debounced working tree changes arrive */
400
+ /**
401
+ * Called by every {@link watchWorkingTree} subscription when its debounced batch arrives. Each
402
+ * call to {@link watchWorkingTree} adds a separate bridge listener on the underlying watch
403
+ * session, so a single fs change can invoke this method multiple times in the same microtask —
404
+ * once per active subscription. We accumulate paths into a single pending event and defer the
405
+ * actual fire to a microtask so back-to-back synchronous bridge calls collapse into ONE
406
+ * `_onDidChangeWorkingTree` emission. Without this coalescing, every WIP-dependent listener
407
+ * (graph, file history, compare branch, etc.) would fire N times for N active subscriptions.
408
+ */
378
409
  protected onWorkingTreeChanged(paths: ReadonlySet<string>): void {
379
410
  this._updatedAt = Date.now();
380
411
 
@@ -384,10 +415,17 @@ export class Repository {
384
415
  }
385
416
 
386
417
  if (this._suspended) return;
418
+ if (this._pendingWorkingTreeFlush) return;
387
419
 
388
- const e = this._pendingWorkingTreeChange;
389
- this._pendingWorkingTreeChange = undefined;
390
- this._onDidChangeWorkingTree.fire(e);
420
+ this._pendingWorkingTreeFlush = true;
421
+ queueMicrotask(() => {
422
+ this._pendingWorkingTreeFlush = false;
423
+ const e = this._pendingWorkingTreeChange;
424
+ if (e == null || this._suspended) return;
425
+
426
+ this._pendingWorkingTreeChange = undefined;
427
+ this._onDidChangeWorkingTree.fire(e);
428
+ });
391
429
  }
392
430
 
393
431
  @trace({ onlyExit: true })
@@ -96,8 +96,8 @@ export interface ParsedSearchQuery {
96
96
  export interface SearchQueryFilters {
97
97
  /** Specifies whether the search results will be filtered to specific files */
98
98
  files: boolean;
99
- /** Specifies whether the search results will be filtered to a specific type, only `stash` and `tip` are supported */
100
- type?: 'stash' | 'tip';
99
+ /** Specifies whether the search results will be filtered to a specific type, only `stash`, `tip`, and `wip` are supported */
100
+ type?: 'stash' | 'tip' | 'wip';
101
101
  /** Specifies whether the search results will be filtered to a specific ref or ref range */
102
102
  refs: boolean;
103
103
  }
@@ -6,6 +6,7 @@ import { basename, normalizePath, relative } from '../../utils/path.js';
6
6
  import type { Shape } from '../../utils/types.js';
7
7
  import type { Uri } from '../../utils/uri.js';
8
8
  import { getRepositoryService } from '../repositoryService.js';
9
+ import type { GitCommandPriority } from '../run.types.js';
9
10
  import { getRepositoryOrWorktreePath } from '../utils/repository.utils.js';
10
11
  import { shortenRevision } from '../utils/revision.utils.js';
11
12
  import type { GitBranch } from './branch.js';
@@ -73,6 +74,7 @@ export class GitWorktree {
73
74
  const relativePath = normalizePath(relative(this.workspaceFolder.uri.fsPath, this.uri.fsPath));
74
75
  return relativePath || this.workspaceFolder.name;
75
76
  }
77
+
76
78
  const relativePath = normalizePath(relative(this.repoPath, this.uri.fsPath));
77
79
  return relativePath || normalizePath(this.uri.fsPath);
78
80
  }
@@ -135,10 +137,15 @@ export class GitWorktree {
135
137
  : GitWorktree.formatDateFromNow(worktree);
136
138
  }
137
139
 
138
- static async getStatus(worktree: GitWorktree): Promise<GitStatus | undefined> {
140
+ static async getStatus(
141
+ worktree: GitWorktree,
142
+ options?: { priority?: GitCommandPriority },
143
+ cancellation?: AbortSignal,
144
+ ): Promise<GitStatus | undefined> {
139
145
  if (worktree.type === 'bare') return undefined;
146
+
140
147
  const repo = getRepositoryService(worktree.path);
141
- return repo?.status.getStatus();
148
+ return repo?.status.getStatus(options, cancellation);
142
149
  }
143
150
 
144
151
  static async hasWorkingChanges(
@@ -146,6 +153,7 @@ export class GitWorktree {
146
153
  options?: { staged?: boolean; unstaged?: boolean; untracked?: boolean },
147
154
  ): Promise<boolean | undefined> {
148
155
  if (worktree.type === 'bare') return undefined;
156
+
149
157
  const repo = getRepositoryService(worktree.path);
150
158
  return repo?.status.hasWorkingChanges(options);
151
159
  }
@@ -364,43 +364,6 @@ export function parseGitFileDiff(data: string, includeRawContent = false): Parse
364
364
  };
365
365
  }
366
366
 
367
- export function parseGitDiffNameStatusFiles(data: string, repoPath: string): GitFile[] | undefined {
368
- using sw = maybeStopWatch('Git.parseDiffNameStatusFiles', { log: { onlyExit: true, level: 'debug' } });
369
- if (!data) {
370
- sw?.stop({ suffix: ` no data` });
371
- return undefined;
372
- }
373
-
374
- const files: GitFile[] = [];
375
-
376
- let status;
377
-
378
- const fields = data.split('\0');
379
- for (let i = 0; i < fields.length - 1; i++) {
380
- status = fields[i][0];
381
- if (status === '.') {
382
- status = '?';
383
- }
384
-
385
- let originalPath;
386
- // Renamed files are old followed by the new path
387
- if (status === 'R' || status === 'C') {
388
- if (i + 1 >= fields.length - 1) break;
389
-
390
- originalPath = fields[++i];
391
- }
392
- if (i + 1 >= fields.length) break;
393
-
394
- const path = fields[++i];
395
-
396
- files.push({ status: status as GitFileStatus, path: path, originalPath: originalPath, repoPath: repoPath });
397
- }
398
-
399
- sw?.stop({ suffix: ` parsed ${files.length} files` });
400
-
401
- return files;
402
- }
403
-
404
367
  /**
405
368
  * Parses the output of `git diff --numstat --summary -z`.
406
369
  *
@@ -450,6 +413,7 @@ export function parseGitDiffNumStatFiles(data: string, repoPath: string): GitFil
450
413
  i++;
451
414
  continue;
452
415
  }
416
+
453
417
  const tabIndex2 = field.indexOf('\t', tabIndex1 + 1);
454
418
  if (tabIndex2 === -1) {
455
419
  i++;
@@ -464,6 +428,7 @@ export function parseGitDiffNumStatFiles(data: string, repoPath: string): GitFil
464
428
  if (path === '') {
465
429
  // Rename or copy: next two fields are oldPath and newPath (summary pass distinguishes R vs C)
466
430
  if (i + 2 >= fields.length) break;
431
+
467
432
  originalPath = fields[++i];
468
433
  path = fields[++i];
469
434
  }
@@ -477,7 +442,7 @@ export function parseGitDiffNumStatFiles(data: string, repoPath: string): GitFil
477
442
  repoPath: repoPath,
478
443
  path: path,
479
444
  originalPath: originalPath,
480
- status: (originalPath ? 'R' : 'M') as GitFileStatus,
445
+ status: originalPath ? 'R' : 'M',
481
446
  stats: { additions: additions, deletions: deletions, changes: additions + deletions },
482
447
  });
483
448
 
@@ -514,14 +479,14 @@ export function parseGitDiffNumStatFiles(data: string, repoPath: string): GitFil
514
479
  if (createOrDelete != null) {
515
480
  const file = files.get(normalizePath(createOrDeletePath));
516
481
  if (file != null) {
517
- file.status = (createOrDelete === 'create' ? 'A' : 'D') as GitFileStatus;
482
+ file.status = createOrDelete === 'create' ? 'A' : 'D';
518
483
  }
519
484
  } else if (renameOrCopy === 'copy') {
520
485
  // Numstat defaulted to R; promote to C. Reconstruct the full new-side path by
521
486
  // concatenating prefix + new-leaf + suffix, covering all compact and non-compact forms.
522
487
  const file = files.get(normalizePath(renameRoot + renameNewLeaf + renameSuffix));
523
488
  if (file != null) {
524
- file.status = 'C' as GitFileStatus;
489
+ file.status = 'C';
525
490
  }
526
491
  } else if (modeChangePath != null) {
527
492
  // File-type boundary: 100xxx = regular file, 120000 = symlink, 160000 = gitlink.
@@ -529,7 +494,7 @@ export function parseGitDiffNumStatFiles(data: string, repoPath: string): GitFil
529
494
  if (oldMode.substring(0, 2) !== newMode.substring(0, 2)) {
530
495
  const file = files.get(normalizePath(modeChangePath));
531
496
  if (file != null) {
532
- file.status = 'T' as GitFileStatus;
497
+ file.status = 'T';
533
498
  }
534
499
  }
535
500
  }
@@ -564,7 +529,7 @@ export function parseGitApplyFiles(data: string, repoPath: string): GitFileChang
564
529
  const [insertions, deletions, path] = line.split('\t');
565
530
  files.set(
566
531
  normalizePath(path),
567
- new GitFileChange(repoPath, path, 'M' as GitFileStatus, getUri(path), undefined, undefined, undefined, {
532
+ new GitFileChange(repoPath, path, 'M', getUri(path), undefined, undefined, undefined, {
568
533
  changes: 0,
569
534
  additions: parseInt(insertions, 10),
570
535
  deletions: parseInt(deletions, 10),
@@ -603,7 +568,7 @@ export function parseGitApplyFiles(data: string, repoPath: string): GitFileChang
603
568
  new GitFileChange(
604
569
  repoPath,
605
570
  newPath,
606
- (renameOrCopy === 'copy' ? 'C' : 'R') as GitFileStatus,
571
+ renameOrCopy === 'copy' ? 'C' : 'R',
607
572
  getUri(newPath),
608
573
  originalPath,
609
574
  getUri(originalPath),
@@ -618,7 +583,7 @@ export function parseGitApplyFiles(data: string, repoPath: string): GitFileChang
618
583
  new GitFileChange(
619
584
  repoPath,
620
585
  file.path,
621
- (createOrDelete === 'create' ? 'A' : 'D') as GitFileStatus,
586
+ createOrDelete === 'create' ? 'A' : 'D',
622
587
  getUri(file.path),
623
588
  undefined,
624
589
  undefined,
@@ -1,10 +1,12 @@
1
1
  import type { PagedResult, PagingOptions } from '../../utils/paging.js';
2
+ import type { GkConfigInvalidationTarget } from '../cache.js';
2
3
  import type { BranchDisposition, GitBranch } from '../models/branch.js';
3
4
  import type { GitCommitStats } from '../models/commit.js';
4
5
  import type { GitContributor } from '../models/contributor.js';
5
6
  import type { ConflictDetectionResult } from '../models/mergeConflicts.js';
6
7
  import type { PullRequest } from '../models/pullRequest.js';
7
8
  import type { GitBranchReference } from '../models/reference.js';
9
+ import type { GitCommandPriority } from '../run.types.js';
8
10
  import type { BranchSortOptions } from '../utils/sorting.js';
9
11
 
10
12
  export interface BranchContributionsOverview extends GitCommitStats<number> {
@@ -12,6 +14,8 @@ export interface BranchContributionsOverview extends GitCommitStats<number> {
12
14
  readonly branch: string;
13
15
  readonly mergeTarget: string;
14
16
  readonly mergeBase: string;
17
+ /** Committer date of the merge-base commit. Lets consumers (e.g. the graph minimap scope window) anchor on the same date semantics as the minimap aggregation without a separate commit fetch. */
18
+ readonly mergeBaseDate: Date | undefined;
15
19
 
16
20
  readonly commits: number;
17
21
  readonly latestCommitDate: Date | undefined;
@@ -41,7 +45,7 @@ export interface GitBranchesSubProvider {
41
45
  getBranchContributionsOverview(
42
46
  repoPath: string,
43
47
  ref: string,
44
- options?: { associatedPullRequest?: Promise<PullRequest | undefined> },
48
+ options?: { associatedPullRequest?: Promise<PullRequest | undefined>; priority?: GitCommandPriority },
45
49
  cancellation?: AbortSignal,
46
50
  ): Promise<BranchContributionsOverview | undefined>;
47
51
  getBranchesWithCommits(
@@ -56,6 +60,7 @@ export interface GitBranchesSubProvider {
56
60
  getDefaultBranchName(
57
61
  repoPath: string | undefined,
58
62
  remote?: string,
63
+ options?: { priority?: GitCommandPriority },
59
64
  cancellation?: AbortSignal,
60
65
  ): Promise<string | undefined>;
61
66
 
@@ -92,12 +97,18 @@ export interface GitBranchesSubProvider {
92
97
  targetBranch: string,
93
98
  cancellation?: AbortSignal,
94
99
  ): Promise<ConflictDetectionResult>;
95
- getBaseBranchName?(repoPath: string, ref: string, cancellation?: AbortSignal): Promise<string | undefined>;
100
+ getBaseBranchName?(
101
+ repoPath: string,
102
+ ref: string,
103
+ options?: { priority?: GitCommandPriority },
104
+ cancellation?: AbortSignal,
105
+ ): Promise<string | undefined>;
96
106
  getStoredMergeTargetBranchName?(repoPath: string, ref: string): Promise<string | undefined>;
97
107
  getStoredDetectedMergeTargetBranchName?(repoPath: string, ref: string): Promise<string | undefined>;
98
108
  getStoredUserMergeTargetBranchName?(repoPath: string, ref: string): Promise<string | undefined>;
99
109
  onCurrentBranchAccessed?(repoPath: string): Promise<void>;
100
110
  onCurrentBranchModified?(repoPath: string): Promise<void>;
111
+ onCurrentBranchAgentActivity?(repoPath: string): Promise<void>;
101
112
  renameBranch?(repoPath: string, oldName: string, newName: string): Promise<void>;
102
113
  setUpstreamBranch?(repoPath: string, name: string, upstream: string | undefined): Promise<void>;
103
114
  setBranchDisposition?(
@@ -105,7 +116,17 @@ export interface GitBranchesSubProvider {
105
116
  branchName: string,
106
117
  disposition: BranchDisposition | undefined,
107
118
  ): Promise<void>;
108
- storeBaseBranchName?(repoPath: string, ref: string, base: string): Promise<void>;
109
- storeMergeTargetBranchName?(repoPath: string, ref: string, target: string): Promise<void>;
119
+ storeBaseBranchName?(
120
+ repoPath: string,
121
+ ref: string,
122
+ base: string,
123
+ options?: { skipInvalidation?: readonly GkConfigInvalidationTarget[] },
124
+ ): Promise<void>;
125
+ storeMergeTargetBranchName?(
126
+ repoPath: string,
127
+ ref: string,
128
+ target: string,
129
+ options?: { skipInvalidation?: readonly GkConfigInvalidationTarget[] },
130
+ ): Promise<void>;
110
131
  storeUserMergeTargetBranchName?(repoPath: string, ref: string, target: string | undefined): Promise<void>;
111
132
  }
@@ -68,6 +68,7 @@ export interface IncomingActivityOptions extends GitLogOptionsBase {
68
68
  }
69
69
 
70
70
  export interface GitCommitReachability {
71
+ readonly partial?: boolean;
71
72
  readonly refs: (
72
73
  | { readonly refType: 'branch'; readonly name: string; readonly remote: boolean; readonly current?: boolean }
73
74
  | { readonly refType: 'tag'; readonly name: string; readonly current?: never }
@@ -77,6 +78,12 @@ export interface GitCommitReachability {
77
78
  export interface GitCommitsSubProvider {
78
79
  getCommit(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<GitCommit | undefined>;
79
80
  getCommitCount(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<number | undefined>;
81
+ /** Cheap author/committer date lookup for a single revision. Skips the full commit parse (no files, parents, or message) — use when only the dates are needed. Pass a full SHA so caching stays correct (commits are immutable; refs are not). */
82
+ getCommitDates?(
83
+ repoPath: string,
84
+ rev: string,
85
+ cancellation?: AbortSignal,
86
+ ): Promise<{ authorDate: Date; committerDate: Date } | undefined>;
80
87
  getCommitFiles(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<GitFileChange[]>;
81
88
  getCommitForFile(
82
89
  repoPath: string,
@@ -1,3 +1,4 @@
1
+ import type { GkConfigInvalidationTarget } from '../cache.js';
1
2
  import type { GitDir } from '../models/repository.js';
2
3
  import type { SigningConfig, ValidationResult } from '../models/signature.js';
3
4
  import type { GitUser } from '../models/user.js';
@@ -36,6 +37,8 @@ export type GkConfigKeys =
36
37
  | `branch.${string}.gk-last-accessed`
37
38
  /** `gk-last-modified` — ISO 8601 timestamp of when the branch last received a commit */
38
39
  | `branch.${string}.gk-last-modified`
40
+ /** `gk-agent-last-activity` — ISO 8601 timestamp of when an AI agent was last active on this branch */
41
+ | `branch.${string}.gk-agent-last-activity`
39
42
  /** `gk-disposition` — user-assigned branch disposition: 'starred' or 'archived' */
40
43
  | `branch.${string}.gk-disposition`
41
44
  /** `gk.defaultRemote` — the user-designated default remote for the repository */
@@ -95,6 +98,7 @@ export interface GitConfigSubProvider {
95
98
  repoPath: string,
96
99
  key: GkConfigKeys | DeprecatedGkConfigKeys,
97
100
  value: string | undefined,
101
+ options?: { skipInvalidation?: readonly GkConfigInvalidationTarget[] },
98
102
  ): Promise<void>;
99
103
 
100
104
  getSigningConfig?(repoPath: string): Promise<SigningConfig>;
@@ -32,7 +32,7 @@ export interface GitDiffSubProvider {
32
32
  repoPath: string,
33
33
  to?: string,
34
34
  from?: string,
35
- options?: { uris?: (string | Uri)[] },
35
+ options?: { uris?: (string | Uri)[]; includeUntracked?: boolean },
36
36
  cancellation?: AbortSignal,
37
37
  ): Promise<GitDiffShortStat | undefined>;
38
38
  getDiff?(
@@ -70,7 +70,13 @@ export interface GitDiffSubProvider {
70
70
  repoPath: string,
71
71
  ref1OrRange: string | GitRevisionRange,
72
72
  ref2?: string,
73
- options?: { filters?: GitDiffFilter[]; path?: string; renameLimit?: number; similarityThreshold?: number },
73
+ options?: {
74
+ filters?: GitDiffFilter[];
75
+ includeUntracked?: boolean;
76
+ path?: string;
77
+ renameLimit?: number;
78
+ similarityThreshold?: number;
79
+ },
74
80
  ): Promise<GitFile[] | undefined>;
75
81
  getDiffTool?(repoPath?: string): Promise<string | undefined>;
76
82
  getNextComparisonUris(