@gitkraken/core-gitlens 0.1.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 (1375) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +30 -0
  3. package/LICENSE.plus +40 -0
  4. package/README.md +54 -0
  5. package/dist/git/cache.d.ts +140 -0
  6. package/dist/git/cache.d.ts.map +1 -0
  7. package/dist/git/cache.js +765 -0
  8. package/dist/git/cache.js.map +1 -0
  9. package/dist/git/context.d.ts +238 -0
  10. package/dist/git/context.d.ts.map +1 -0
  11. package/dist/git/context.js +11 -0
  12. package/dist/git/context.js.map +1 -0
  13. package/dist/git/errors.d.ts +419 -0
  14. package/dist/git/errors.d.ts.map +1 -0
  15. package/dist/git/errors.js +681 -0
  16. package/dist/git/errors.js.map +1 -0
  17. package/dist/git/exec.types.d.ts +66 -0
  18. package/dist/git/exec.types.d.ts.map +1 -0
  19. package/dist/git/exec.types.js +2 -0
  20. package/dist/git/exec.types.js.map +1 -0
  21. package/dist/git/features.d.ts +8 -0
  22. package/dist/git/features.d.ts.map +1 -0
  23. package/dist/git/features.js +18 -0
  24. package/dist/git/features.js.map +1 -0
  25. package/dist/git/models/author.d.ts +17 -0
  26. package/dist/git/models/author.d.ts.map +1 -0
  27. package/dist/git/models/author.js +2 -0
  28. package/dist/git/models/author.js.map +1 -0
  29. package/dist/git/models/autolink.d.ts +51 -0
  30. package/dist/git/models/autolink.d.ts.map +1 -0
  31. package/dist/git/models/autolink.js +2 -0
  32. package/dist/git/models/autolink.js.map +1 -0
  33. package/dist/git/models/blame.d.ts +41 -0
  34. package/dist/git/models/blame.d.ts.map +1 -0
  35. package/dist/git/models/blame.js +2 -0
  36. package/dist/git/models/blame.js.map +1 -0
  37. package/dist/git/models/branch.d.ts +85 -0
  38. package/dist/git/models/branch.d.ts.map +1 -0
  39. package/dist/git/models/branch.js +174 -0
  40. package/dist/git/models/branch.js.map +1 -0
  41. package/dist/git/models/commit.d.ts +163 -0
  42. package/dist/git/models/commit.d.ts.map +1 -0
  43. package/dist/git/models/commit.js +496 -0
  44. package/dist/git/models/commit.js.map +1 -0
  45. package/dist/git/models/contributor.d.ts +40 -0
  46. package/dist/git/models/contributor.d.ts.map +1 -0
  47. package/dist/git/models/contributor.js +67 -0
  48. package/dist/git/models/contributor.js.map +1 -0
  49. package/dist/git/models/defaultBranch.d.ts +6 -0
  50. package/dist/git/models/defaultBranch.d.ts.map +1 -0
  51. package/dist/git/models/defaultBranch.js +2 -0
  52. package/dist/git/models/defaultBranch.js.map +1 -0
  53. package/dist/git/models/diff.d.ts +73 -0
  54. package/dist/git/models/diff.d.ts.map +1 -0
  55. package/dist/git/models/diff.js +2 -0
  56. package/dist/git/models/diff.js.map +1 -0
  57. package/dist/git/models/file.d.ts +23 -0
  58. package/dist/git/models/file.d.ts.map +1 -0
  59. package/dist/git/models/file.js +2 -0
  60. package/dist/git/models/file.js.map +1 -0
  61. package/dist/git/models/fileChange.d.ts +50 -0
  62. package/dist/git/models/fileChange.d.ts.map +1 -0
  63. package/dist/git/models/fileChange.js +69 -0
  64. package/dist/git/models/fileChange.js.map +1 -0
  65. package/dist/git/models/fileStatus.d.ts +33 -0
  66. package/dist/git/models/fileStatus.d.ts.map +1 -0
  67. package/dist/git/models/fileStatus.js +29 -0
  68. package/dist/git/models/fileStatus.js.map +1 -0
  69. package/dist/git/models/graph.d.ts +171 -0
  70. package/dist/git/models/graph.d.ts.map +1 -0
  71. package/dist/git/models/graph.js +2 -0
  72. package/dist/git/models/graph.js.map +1 -0
  73. package/dist/git/models/graphSearch.d.ts +48 -0
  74. package/dist/git/models/graphSearch.d.ts.map +1 -0
  75. package/dist/git/models/graphSearch.js +2 -0
  76. package/dist/git/models/graphSearch.js.map +1 -0
  77. package/dist/git/models/issue.d.ts +69 -0
  78. package/dist/git/models/issue.d.ts.map +1 -0
  79. package/dist/git/models/issue.js +68 -0
  80. package/dist/git/models/issue.js.map +1 -0
  81. package/dist/git/models/issueOrPullRequest.d.ts +19 -0
  82. package/dist/git/models/issueOrPullRequest.d.ts.map +1 -0
  83. package/dist/git/models/issueOrPullRequest.js +2 -0
  84. package/dist/git/models/issueOrPullRequest.js.map +1 -0
  85. package/dist/git/models/lineRange.d.ts +8 -0
  86. package/dist/git/models/lineRange.d.ts.map +1 -0
  87. package/dist/git/models/lineRange.js +2 -0
  88. package/dist/git/models/lineRange.js.map +1 -0
  89. package/dist/git/models/log.d.ts +19 -0
  90. package/dist/git/models/log.d.ts.map +1 -0
  91. package/dist/git/models/log.js +2 -0
  92. package/dist/git/models/log.js.map +1 -0
  93. package/dist/git/models/mergeConflicts.d.ts +23 -0
  94. package/dist/git/models/mergeConflicts.d.ts.map +1 -0
  95. package/dist/git/models/mergeConflicts.js +2 -0
  96. package/dist/git/models/mergeConflicts.js.map +1 -0
  97. package/dist/git/models/patch.d.ts +22 -0
  98. package/dist/git/models/patch.d.ts.map +1 -0
  99. package/dist/git/models/patch.js +2 -0
  100. package/dist/git/models/patch.js.map +1 -0
  101. package/dist/git/models/pausedOperationStatus.d.ts +52 -0
  102. package/dist/git/models/pausedOperationStatus.d.ts.map +1 -0
  103. package/dist/git/models/pausedOperationStatus.js +2 -0
  104. package/dist/git/models/pausedOperationStatus.js.map +1 -0
  105. package/dist/git/models/pullRequest.d.ts +125 -0
  106. package/dist/git/models/pullRequest.d.ts.map +1 -0
  107. package/dist/git/models/pullRequest.js +127 -0
  108. package/dist/git/models/pullRequest.js.map +1 -0
  109. package/dist/git/models/rebase.d.ts +51 -0
  110. package/dist/git/models/rebase.d.ts.map +1 -0
  111. package/dist/git/models/rebase.js +2 -0
  112. package/dist/git/models/rebase.js.map +1 -0
  113. package/dist/git/models/reference.d.ts +48 -0
  114. package/dist/git/models/reference.d.ts.map +1 -0
  115. package/dist/git/models/reference.js +2 -0
  116. package/dist/git/models/reference.js.map +1 -0
  117. package/dist/git/models/reflog.d.ts +33 -0
  118. package/dist/git/models/reflog.d.ts.map +1 -0
  119. package/dist/git/models/reflog.js +85 -0
  120. package/dist/git/models/reflog.js.map +1 -0
  121. package/dist/git/models/remote.d.ts +37 -0
  122. package/dist/git/models/remote.d.ts.map +1 -0
  123. package/dist/git/models/remote.js +98 -0
  124. package/dist/git/models/remote.js.map +1 -0
  125. package/dist/git/models/remoteProvider.d.ts +112 -0
  126. package/dist/git/models/remoteProvider.d.ts.map +1 -0
  127. package/dist/git/models/remoteProvider.js +154 -0
  128. package/dist/git/models/remoteProvider.js.map +1 -0
  129. package/dist/git/models/remoteResource.d.ts +78 -0
  130. package/dist/git/models/remoteResource.d.ts.map +1 -0
  131. package/dist/git/models/remoteResource.js +13 -0
  132. package/dist/git/models/remoteResource.js.map +1 -0
  133. package/dist/git/models/repository.d.ts +106 -0
  134. package/dist/git/models/repository.d.ts.map +1 -0
  135. package/dist/git/models/repository.js +324 -0
  136. package/dist/git/models/repository.js.map +1 -0
  137. package/dist/git/models/repositoryChangeEvent.d.ts +17 -0
  138. package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -0
  139. package/dist/git/models/repositoryChangeEvent.js +26 -0
  140. package/dist/git/models/repositoryChangeEvent.js.map +1 -0
  141. package/dist/git/models/repositoryIdentities.d.ts +72 -0
  142. package/dist/git/models/repositoryIdentities.d.ts.map +1 -0
  143. package/dist/git/models/repositoryIdentities.js +7 -0
  144. package/dist/git/models/repositoryIdentities.js.map +1 -0
  145. package/dist/git/models/repositoryMetadata.d.ts +12 -0
  146. package/dist/git/models/repositoryMetadata.d.ts.map +1 -0
  147. package/dist/git/models/repositoryMetadata.js +2 -0
  148. package/dist/git/models/repositoryMetadata.js.map +1 -0
  149. package/dist/git/models/resourceDescriptor.d.ts +12 -0
  150. package/dist/git/models/resourceDescriptor.d.ts.map +1 -0
  151. package/dist/git/models/resourceDescriptor.js +2 -0
  152. package/dist/git/models/resourceDescriptor.js.map +1 -0
  153. package/dist/git/models/revision.d.ts +7 -0
  154. package/dist/git/models/revision.d.ts.map +1 -0
  155. package/dist/git/models/revision.js +6 -0
  156. package/dist/git/models/revision.js.map +1 -0
  157. package/dist/git/models/search.d.ts +66 -0
  158. package/dist/git/models/search.d.ts.map +1 -0
  159. package/dist/git/models/search.js +48 -0
  160. package/dist/git/models/search.js.map +1 -0
  161. package/dist/git/models/shortlog.d.ts +6 -0
  162. package/dist/git/models/shortlog.d.ts.map +1 -0
  163. package/dist/git/models/shortlog.js +2 -0
  164. package/dist/git/models/shortlog.js.map +1 -0
  165. package/dist/git/models/signature.d.ts +26 -0
  166. package/dist/git/models/signature.d.ts.map +1 -0
  167. package/dist/git/models/signature.js +2 -0
  168. package/dist/git/models/signature.js.map +1 -0
  169. package/dist/git/models/staging.d.ts +24 -0
  170. package/dist/git/models/staging.d.ts.map +1 -0
  171. package/dist/git/models/staging.js +2 -0
  172. package/dist/git/models/staging.js.map +1 -0
  173. package/dist/git/models/stash.d.ts +6 -0
  174. package/dist/git/models/stash.d.ts.map +1 -0
  175. package/dist/git/models/stash.js +2 -0
  176. package/dist/git/models/stash.js.map +1 -0
  177. package/dist/git/models/status.d.ts +55 -0
  178. package/dist/git/models/status.d.ts.map +1 -0
  179. package/dist/git/models/status.js +208 -0
  180. package/dist/git/models/status.js.map +1 -0
  181. package/dist/git/models/statusFile.d.ts +28 -0
  182. package/dist/git/models/statusFile.d.ts.map +1 -0
  183. package/dist/git/models/statusFile.js +114 -0
  184. package/dist/git/models/statusFile.js.map +1 -0
  185. package/dist/git/models/tag.d.ts +26 -0
  186. package/dist/git/models/tag.d.ts.map +1 -0
  187. package/dist/git/models/tag.js +73 -0
  188. package/dist/git/models/tag.js.map +1 -0
  189. package/dist/git/models/tree.d.ts +10 -0
  190. package/dist/git/models/tree.d.ts.map +1 -0
  191. package/dist/git/models/tree.js +2 -0
  192. package/dist/git/models/tree.js.map +1 -0
  193. package/dist/git/models/user.d.ts +7 -0
  194. package/dist/git/models/user.d.ts.map +1 -0
  195. package/dist/git/models/user.js +2 -0
  196. package/dist/git/models/user.js.map +1 -0
  197. package/dist/git/models/worktree.d.ts +51 -0
  198. package/dist/git/models/worktree.d.ts.map +1 -0
  199. package/dist/git/models/worktree.js +136 -0
  200. package/dist/git/models/worktree.js.map +1 -0
  201. package/dist/git/parsers/diffParser.d.ts +45 -0
  202. package/dist/git/parsers/diffParser.d.ts.map +1 -0
  203. package/dist/git/parsers/diffParser.js +628 -0
  204. package/dist/git/parsers/diffParser.js.map +1 -0
  205. package/dist/git/parsers/rebaseTodoParser.d.ts +15 -0
  206. package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -0
  207. package/dist/git/parsers/rebaseTodoParser.js +215 -0
  208. package/dist/git/parsers/rebaseTodoParser.js.map +1 -0
  209. package/dist/git/providers/blame.d.ts +15 -0
  210. package/dist/git/providers/blame.d.ts.map +1 -0
  211. package/dist/git/providers/blame.js +2 -0
  212. package/dist/git/providers/blame.js.map +1 -0
  213. package/dist/git/providers/branches.d.ts +80 -0
  214. package/dist/git/providers/branches.d.ts.map +1 -0
  215. package/dist/git/providers/branches.js +2 -0
  216. package/dist/git/providers/branches.js.map +1 -0
  217. package/dist/git/providers/commits.d.ts +102 -0
  218. package/dist/git/providers/commits.d.ts.map +1 -0
  219. package/dist/git/providers/commits.js +2 -0
  220. package/dist/git/providers/commits.js.map +1 -0
  221. package/dist/git/providers/config.d.ts +64 -0
  222. package/dist/git/providers/config.d.ts.map +1 -0
  223. package/dist/git/providers/config.js +2 -0
  224. package/dist/git/providers/config.js.map +1 -0
  225. package/dist/git/providers/contributors.d.ts +26 -0
  226. package/dist/git/providers/contributors.d.ts.map +1 -0
  227. package/dist/git/providers/contributors.js +2 -0
  228. package/dist/git/providers/contributors.js.map +1 -0
  229. package/dist/git/providers/diff.d.ts +73 -0
  230. package/dist/git/providers/diff.d.ts.map +1 -0
  231. package/dist/git/providers/diff.js +2 -0
  232. package/dist/git/providers/diff.js.map +1 -0
  233. package/dist/git/providers/graph.d.ts +20 -0
  234. package/dist/git/providers/graph.d.ts.map +1 -0
  235. package/dist/git/providers/graph.js +2 -0
  236. package/dist/git/providers/graph.js.map +1 -0
  237. package/dist/git/providers/operations.d.ts +65 -0
  238. package/dist/git/providers/operations.d.ts.map +1 -0
  239. package/dist/git/providers/operations.js +2 -0
  240. package/dist/git/providers/operations.js.map +1 -0
  241. package/dist/git/providers/patch.d.ts +27 -0
  242. package/dist/git/providers/patch.d.ts.map +1 -0
  243. package/dist/git/providers/patch.js +2 -0
  244. package/dist/git/providers/patch.js.map +1 -0
  245. package/dist/git/providers/pausedOperations.d.ts +11 -0
  246. package/dist/git/providers/pausedOperations.d.ts.map +1 -0
  247. package/dist/git/providers/pausedOperations.js +2 -0
  248. package/dist/git/providers/pausedOperations.js.map +1 -0
  249. package/dist/git/providers/provider.d.ts +57 -0
  250. package/dist/git/providers/provider.d.ts.map +1 -0
  251. package/dist/git/providers/provider.js +2 -0
  252. package/dist/git/providers/provider.js.map +1 -0
  253. package/dist/git/providers/refs.d.ts +22 -0
  254. package/dist/git/providers/refs.d.ts.map +1 -0
  255. package/dist/git/providers/refs.js +2 -0
  256. package/dist/git/providers/refs.js.map +1 -0
  257. package/dist/git/providers/remotes.d.ts +25 -0
  258. package/dist/git/providers/remotes.d.ts.map +1 -0
  259. package/dist/git/providers/remotes.js +2 -0
  260. package/dist/git/providers/remotes.js.map +1 -0
  261. package/dist/git/providers/revision.d.ts +28 -0
  262. package/dist/git/providers/revision.d.ts.map +1 -0
  263. package/dist/git/providers/revision.js +2 -0
  264. package/dist/git/providers/revision.js.map +1 -0
  265. package/dist/git/providers/shared/remotes.d.ts +25 -0
  266. package/dist/git/providers/shared/remotes.d.ts.map +1 -0
  267. package/dist/git/providers/shared/remotes.js +79 -0
  268. package/dist/git/providers/shared/remotes.js.map +1 -0
  269. package/dist/git/providers/staging.d.ts +22 -0
  270. package/dist/git/providers/staging.d.ts.map +1 -0
  271. package/dist/git/providers/staging.js +2 -0
  272. package/dist/git/providers/staging.js.map +1 -0
  273. package/dist/git/providers/stash.d.ts +41 -0
  274. package/dist/git/providers/stash.d.ts.map +1 -0
  275. package/dist/git/providers/stash.js +2 -0
  276. package/dist/git/providers/stash.js.map +1 -0
  277. package/dist/git/providers/status.d.ts +30 -0
  278. package/dist/git/providers/status.d.ts.map +1 -0
  279. package/dist/git/providers/status.js +2 -0
  280. package/dist/git/providers/status.js.map +1 -0
  281. package/dist/git/providers/tags.d.ts +18 -0
  282. package/dist/git/providers/tags.d.ts.map +1 -0
  283. package/dist/git/providers/tags.js +2 -0
  284. package/dist/git/providers/tags.js.map +1 -0
  285. package/dist/git/providers/types.d.ts +28 -0
  286. package/dist/git/providers/types.d.ts.map +1 -0
  287. package/dist/git/providers/types.js +2 -0
  288. package/dist/git/providers/types.js.map +1 -0
  289. package/dist/git/providers/worktrees.d.ts +23 -0
  290. package/dist/git/providers/worktrees.d.ts.map +1 -0
  291. package/dist/git/providers/worktrees.js +2 -0
  292. package/dist/git/providers/worktrees.js.map +1 -0
  293. package/dist/git/remotes/azure-devops.d.ts +43 -0
  294. package/dist/git/remotes/azure-devops.d.ts.map +1 -0
  295. package/dist/git/remotes/azure-devops.js +248 -0
  296. package/dist/git/remotes/azure-devops.js.map +1 -0
  297. package/dist/git/remotes/bitbucket-server.d.ts +32 -0
  298. package/dist/git/remotes/bitbucket-server.d.ts.map +1 -0
  299. package/dist/git/remotes/bitbucket-server.js +145 -0
  300. package/dist/git/remotes/bitbucket-server.js.map +1 -0
  301. package/dist/git/remotes/bitbucket.d.ts +29 -0
  302. package/dist/git/remotes/bitbucket.d.ts.map +1 -0
  303. package/dist/git/remotes/bitbucket.js +114 -0
  304. package/dist/git/remotes/bitbucket.js.map +1 -0
  305. package/dist/git/remotes/custom.d.ts +26 -0
  306. package/dist/git/remotes/custom.d.ts.map +1 -0
  307. package/dist/git/remotes/custom.js +111 -0
  308. package/dist/git/remotes/custom.js.map +1 -0
  309. package/dist/git/remotes/gerrit.d.ts +31 -0
  310. package/dist/git/remotes/gerrit.d.ts.map +1 -0
  311. package/dist/git/remotes/gerrit.js +146 -0
  312. package/dist/git/remotes/gerrit.js.map +1 -0
  313. package/dist/git/remotes/gitea.d.ts +30 -0
  314. package/dist/git/remotes/gitea.d.ts.map +1 -0
  315. package/dist/git/remotes/gitea.js +148 -0
  316. package/dist/git/remotes/gitea.js.map +1 -0
  317. package/dist/git/remotes/github.d.ts +41 -0
  318. package/dist/git/remotes/github.d.ts.map +1 -0
  319. package/dist/git/remotes/github.js +198 -0
  320. package/dist/git/remotes/github.js.map +1 -0
  321. package/dist/git/remotes/gitlab.d.ts +35 -0
  322. package/dist/git/remotes/gitlab.d.ts.map +1 -0
  323. package/dist/git/remotes/gitlab.js +232 -0
  324. package/dist/git/remotes/gitlab.js.map +1 -0
  325. package/dist/git/remotes/google-source.d.ts +17 -0
  326. package/dist/git/remotes/google-source.d.ts.map +1 -0
  327. package/dist/git/remotes/google-source.js +32 -0
  328. package/dist/git/remotes/google-source.js.map +1 -0
  329. package/dist/git/remotes/matcher.d.ts +35 -0
  330. package/dist/git/remotes/matcher.d.ts.map +1 -0
  331. package/dist/git/remotes/matcher.js +140 -0
  332. package/dist/git/remotes/matcher.js.map +1 -0
  333. package/dist/git/repositoryService.d.ts +127 -0
  334. package/dist/git/repositoryService.d.ts.map +1 -0
  335. package/dist/git/repositoryService.js +54 -0
  336. package/dist/git/repositoryService.js.map +1 -0
  337. package/dist/git/service.d.ts +112 -0
  338. package/dist/git/service.d.ts.map +1 -0
  339. package/dist/git/service.js +303 -0
  340. package/dist/git/service.js.map +1 -0
  341. package/dist/git/utils/autolink.utils.d.ts +13 -0
  342. package/dist/git/utils/autolink.utils.d.ts.map +1 -0
  343. package/dist/git/utils/autolink.utils.js +147 -0
  344. package/dist/git/utils/autolink.utils.js.map +1 -0
  345. package/dist/git/utils/blame.utils.d.ts +47 -0
  346. package/dist/git/utils/blame.utils.d.ts.map +1 -0
  347. package/dist/git/utils/blame.utils.js +239 -0
  348. package/dist/git/utils/blame.utils.js.map +1 -0
  349. package/dist/git/utils/branch.utils.d.ts +22 -0
  350. package/dist/git/utils/branch.utils.d.ts.map +1 -0
  351. package/dist/git/utils/branch.utils.js +122 -0
  352. package/dist/git/utils/branch.utils.js.map +1 -0
  353. package/dist/git/utils/commit.utils.d.ts +26 -0
  354. package/dist/git/utils/commit.utils.d.ts.map +1 -0
  355. package/dist/git/utils/commit.utils.js +54 -0
  356. package/dist/git/utils/commit.utils.js.map +1 -0
  357. package/dist/git/utils/contributor.utils.d.ts +15 -0
  358. package/dist/git/utils/contributor.utils.d.ts.map +1 -0
  359. package/dist/git/utils/contributor.utils.js +55 -0
  360. package/dist/git/utils/contributor.utils.js.map +1 -0
  361. package/dist/git/utils/fetch.utils.d.ts +20 -0
  362. package/dist/git/utils/fetch.utils.d.ts.map +1 -0
  363. package/dist/git/utils/fetch.utils.js +47 -0
  364. package/dist/git/utils/fetch.utils.js.map +1 -0
  365. package/dist/git/utils/fileStatus.utils.d.ts +24 -0
  366. package/dist/git/utils/fileStatus.utils.d.ts.map +1 -0
  367. package/dist/git/utils/fileStatus.utils.js +45 -0
  368. package/dist/git/utils/fileStatus.utils.js.map +1 -0
  369. package/dist/git/utils/issue.utils.d.ts +4 -0
  370. package/dist/git/utils/issue.utils.d.ts.map +1 -0
  371. package/dist/git/utils/issue.utils.js +76 -0
  372. package/dist/git/utils/issue.utils.js.map +1 -0
  373. package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -0
  374. package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -0
  375. package/dist/git/utils/issueOrPullRequest.utils.js +22 -0
  376. package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -0
  377. package/dist/git/utils/mergeConflicts.utils.d.ts +3 -0
  378. package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -0
  379. package/dist/git/utils/mergeConflicts.utils.js +19 -0
  380. package/dist/git/utils/mergeConflicts.utils.js.map +1 -0
  381. package/dist/git/utils/pausedOperationStatus.utils.d.ts +58 -0
  382. package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -0
  383. package/dist/git/utils/pausedOperationStatus.utils.js +133 -0
  384. package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -0
  385. package/dist/git/utils/pullRequest.utils.d.ts +12 -0
  386. package/dist/git/utils/pullRequest.utils.d.ts.map +1 -0
  387. package/dist/git/utils/pullRequest.utils.js +124 -0
  388. package/dist/git/utils/pullRequest.utils.js.map +1 -0
  389. package/dist/git/utils/rebase.utils.d.ts +19 -0
  390. package/dist/git/utils/rebase.utils.d.ts.map +1 -0
  391. package/dist/git/utils/rebase.utils.js +93 -0
  392. package/dist/git/utils/rebase.utils.js.map +1 -0
  393. package/dist/git/utils/reference.utils.d.ts +56 -0
  394. package/dist/git/utils/reference.utils.d.ts.map +1 -0
  395. package/dist/git/utils/reference.utils.js +191 -0
  396. package/dist/git/utils/reference.utils.js.map +1 -0
  397. package/dist/git/utils/remote.utils.d.ts +17 -0
  398. package/dist/git/utils/remote.utils.d.ts.map +1 -0
  399. package/dist/git/utils/remote.utils.js +124 -0
  400. package/dist/git/utils/remote.utils.js.map +1 -0
  401. package/dist/git/utils/repository.utils.d.ts +5 -0
  402. package/dist/git/utils/repository.utils.d.ts.map +1 -0
  403. package/dist/git/utils/repository.utils.js +15 -0
  404. package/dist/git/utils/repository.utils.js.map +1 -0
  405. package/dist/git/utils/resourceDescriptor.utils.d.ts +4 -0
  406. package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -0
  407. package/dist/git/utils/resourceDescriptor.utils.js +17 -0
  408. package/dist/git/utils/resourceDescriptor.utils.js.map +1 -0
  409. package/dist/git/utils/revision.utils.d.ts +36 -0
  410. package/dist/git/utils/revision.utils.d.ts.map +1 -0
  411. package/dist/git/utils/revision.utils.js +114 -0
  412. package/dist/git/utils/revision.utils.js.map +1 -0
  413. package/dist/git/utils/search.utils.d.ts +15 -0
  414. package/dist/git/utils/search.utils.d.ts.map +1 -0
  415. package/dist/git/utils/search.utils.js +422 -0
  416. package/dist/git/utils/search.utils.js.map +1 -0
  417. package/dist/git/utils/sorting.d.ts +34 -0
  418. package/dist/git/utils/sorting.d.ts.map +1 -0
  419. package/dist/git/utils/sorting.js +203 -0
  420. package/dist/git/utils/sorting.js.map +1 -0
  421. package/dist/git/utils/status.utils.d.ts +20 -0
  422. package/dist/git/utils/status.utils.d.ts.map +1 -0
  423. package/dist/git/utils/status.utils.js +82 -0
  424. package/dist/git/utils/status.utils.js.map +1 -0
  425. package/dist/git/utils/statusFile.utils.d.ts +8 -0
  426. package/dist/git/utils/statusFile.utils.d.ts.map +1 -0
  427. package/dist/git/utils/statusFile.utils.js +76 -0
  428. package/dist/git/utils/statusFile.utils.js.map +1 -0
  429. package/dist/git/utils/tag.utils.d.ts +7 -0
  430. package/dist/git/utils/tag.utils.d.ts.map +1 -0
  431. package/dist/git/utils/tag.utils.js +13 -0
  432. package/dist/git/utils/tag.utils.js.map +1 -0
  433. package/dist/git/utils/tooltip.utils.d.ts +14 -0
  434. package/dist/git/utils/tooltip.utils.d.ts.map +1 -0
  435. package/dist/git/utils/tooltip.utils.js +29 -0
  436. package/dist/git/utils/tooltip.utils.js.map +1 -0
  437. package/dist/git/utils/uriAuthority.d.ts +16 -0
  438. package/dist/git/utils/uriAuthority.d.ts.map +1 -0
  439. package/dist/git/utils/uriAuthority.js +20 -0
  440. package/dist/git/utils/uriAuthority.js.map +1 -0
  441. package/dist/git/utils/user.utils.d.ts +3 -0
  442. package/dist/git/utils/user.utils.d.ts.map +1 -0
  443. package/dist/git/utils/user.utils.js +12 -0
  444. package/dist/git/utils/user.utils.js.map +1 -0
  445. package/dist/git/utils/worktree.utils.d.ts +7 -0
  446. package/dist/git/utils/worktree.utils.d.ts.map +1 -0
  447. package/dist/git/utils/worktree.utils.js +15 -0
  448. package/dist/git/utils/worktree.utils.js.map +1 -0
  449. package/dist/git/watching/changeEvent.d.ts +47 -0
  450. package/dist/git/watching/changeEvent.d.ts.map +1 -0
  451. package/dist/git/watching/changeEvent.js +69 -0
  452. package/dist/git/watching/changeEvent.js.map +1 -0
  453. package/dist/git/watching/classifyChange.d.ts +16 -0
  454. package/dist/git/watching/classifyChange.d.ts.map +1 -0
  455. package/dist/git/watching/classifyChange.js +61 -0
  456. package/dist/git/watching/classifyChange.js.map +1 -0
  457. package/dist/git/watching/gitIgnoreFilter.d.ts +58 -0
  458. package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -0
  459. package/dist/git/watching/gitIgnoreFilter.js +109 -0
  460. package/dist/git/watching/gitIgnoreFilter.js.map +1 -0
  461. package/dist/git/watching/initWatcher.d.ts +33 -0
  462. package/dist/git/watching/initWatcher.d.ts.map +1 -0
  463. package/dist/git/watching/initWatcher.js +59 -0
  464. package/dist/git/watching/initWatcher.js.map +1 -0
  465. package/dist/git/watching/provider.d.ts +23 -0
  466. package/dist/git/watching/provider.d.ts.map +1 -0
  467. package/dist/git/watching/provider.js +2 -0
  468. package/dist/git/watching/provider.js.map +1 -0
  469. package/dist/git/watching/watchGroup.d.ts +54 -0
  470. package/dist/git/watching/watchGroup.d.ts.map +1 -0
  471. package/dist/git/watching/watchGroup.js +139 -0
  472. package/dist/git/watching/watchGroup.js.map +1 -0
  473. package/dist/git/watching/watchService.d.ts +79 -0
  474. package/dist/git/watching/watchService.d.ts.map +1 -0
  475. package/dist/git/watching/watchService.js +282 -0
  476. package/dist/git/watching/watchService.js.map +1 -0
  477. package/dist/git/watching/watchSession.d.ts +118 -0
  478. package/dist/git/watching/watchSession.d.ts.map +1 -0
  479. package/dist/git/watching/watchSession.js +274 -0
  480. package/dist/git/watching/watchSession.js.map +1 -0
  481. package/dist/git/watching/watcherPatterns.d.ts +21 -0
  482. package/dist/git/watching/watcherPatterns.d.ts.map +1 -0
  483. package/dist/git/watching/watcherPatterns.js +36 -0
  484. package/dist/git/watching/watcherPatterns.js.map +1 -0
  485. package/dist/git-cli/cliGitProvider.d.ts +133 -0
  486. package/dist/git-cli/cliGitProvider.d.ts.map +1 -0
  487. package/dist/git-cli/cliGitProvider.js +273 -0
  488. package/dist/git-cli/cliGitProvider.js.map +1 -0
  489. package/dist/git-cli/exec/exec.d.ts +4 -0
  490. package/dist/git-cli/exec/exec.d.ts.map +1 -0
  491. package/dist/git-cli/exec/exec.errors.d.ts +2 -0
  492. package/dist/git-cli/exec/exec.errors.d.ts.map +1 -0
  493. package/dist/git-cli/exec/exec.errors.js +2 -0
  494. package/dist/git-cli/exec/exec.errors.js.map +1 -0
  495. package/dist/git-cli/exec/exec.js +3 -0
  496. package/dist/git-cli/exec/exec.js.map +1 -0
  497. package/dist/git-cli/exec/exec.types.d.ts +2 -0
  498. package/dist/git-cli/exec/exec.types.d.ts.map +1 -0
  499. package/dist/git-cli/exec/exec.types.js +2 -0
  500. package/dist/git-cli/exec/exec.types.js.map +1 -0
  501. package/dist/git-cli/exec/features.d.ts +3 -0
  502. package/dist/git-cli/exec/features.d.ts.map +1 -0
  503. package/dist/git-cli/exec/features.js +2 -0
  504. package/dist/git-cli/exec/features.js.map +1 -0
  505. package/dist/git-cli/exec/git.d.ts +228 -0
  506. package/dist/git-cli/exec/git.d.ts.map +1 -0
  507. package/dist/git-cli/exec/git.js +823 -0
  508. package/dist/git-cli/exec/git.js.map +1 -0
  509. package/dist/git-cli/exec/gitQueue.d.ts +68 -0
  510. package/dist/git-cli/exec/gitQueue.d.ts.map +1 -0
  511. package/dist/git-cli/exec/gitQueue.js +207 -0
  512. package/dist/git-cli/exec/gitQueue.js.map +1 -0
  513. package/dist/git-cli/exec/locator.d.ts +14 -0
  514. package/dist/git-cli/exec/locator.d.ts.map +1 -0
  515. package/dist/git-cli/exec/locator.js +133 -0
  516. package/dist/git-cli/exec/locator.js.map +1 -0
  517. package/dist/git-cli/parsers/blameParser.d.ts +30 -0
  518. package/dist/git-cli/parsers/blameParser.d.ts.map +1 -0
  519. package/dist/git-cli/parsers/blameParser.js +339 -0
  520. package/dist/git-cli/parsers/blameParser.js.map +1 -0
  521. package/dist/git-cli/parsers/indexParser.d.ts +4 -0
  522. package/dist/git-cli/parsers/indexParser.d.ts.map +1 -0
  523. package/dist/git-cli/parsers/indexParser.js +226 -0
  524. package/dist/git-cli/parsers/indexParser.js.map +1 -0
  525. package/dist/git-cli/parsers/logParser.d.ts +178 -0
  526. package/dist/git-cli/parsers/logParser.d.ts.map +1 -0
  527. package/dist/git-cli/parsers/logParser.js +1166 -0
  528. package/dist/git-cli/parsers/logParser.js.map +1 -0
  529. package/dist/git-cli/parsers/mergeTreeParser.d.ts +7 -0
  530. package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -0
  531. package/dist/git-cli/parsers/mergeTreeParser.js +74 -0
  532. package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -0
  533. package/dist/git-cli/parsers/refParser.d.ts +34 -0
  534. package/dist/git-cli/parsers/refParser.d.ts.map +1 -0
  535. package/dist/git-cli/parsers/refParser.js +148 -0
  536. package/dist/git-cli/parsers/refParser.js.map +1 -0
  537. package/dist/git-cli/parsers/reflogParser.d.ts +12 -0
  538. package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -0
  539. package/dist/git-cli/parsers/reflogParser.js +181 -0
  540. package/dist/git-cli/parsers/reflogParser.js.map +1 -0
  541. package/dist/git-cli/parsers/remoteParser.d.ts +4 -0
  542. package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -0
  543. package/dist/git-cli/parsers/remoteParser.js +128 -0
  544. package/dist/git-cli/parsers/remoteParser.js.map +1 -0
  545. package/dist/git-cli/parsers/shortlogParser.d.ts +4 -0
  546. package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -0
  547. package/dist/git-cli/parsers/shortlogParser.js +51 -0
  548. package/dist/git-cli/parsers/shortlogParser.js.map +1 -0
  549. package/dist/git-cli/parsers/signatureParser.d.ts +21 -0
  550. package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -0
  551. package/dist/git-cli/parsers/signatureParser.js +139 -0
  552. package/dist/git-cli/parsers/signatureParser.js.map +1 -0
  553. package/dist/git-cli/parsers/statusParser.d.ts +4 -0
  554. package/dist/git-cli/parsers/statusParser.d.ts.map +1 -0
  555. package/dist/git-cli/parsers/statusParser.js +216 -0
  556. package/dist/git-cli/parsers/statusParser.js.map +1 -0
  557. package/dist/git-cli/parsers/treeParser.d.ts +3 -0
  558. package/dist/git-cli/parsers/treeParser.d.ts.map +1 -0
  559. package/dist/git-cli/parsers/treeParser.js +110 -0
  560. package/dist/git-cli/parsers/treeParser.js.map +1 -0
  561. package/dist/git-cli/parsers/worktreeParser.d.ts +5 -0
  562. package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -0
  563. package/dist/git-cli/parsers/worktreeParser.js +136 -0
  564. package/dist/git-cli/parsers/worktreeParser.js.map +1 -0
  565. package/dist/git-cli/providers/blame.d.ts +26 -0
  566. package/dist/git-cli/providers/blame.d.ts.map +1 -0
  567. package/dist/git-cli/providers/blame.js +426 -0
  568. package/dist/git-cli/providers/blame.js.map +1 -0
  569. package/dist/git-cli/providers/branches.d.ts +87 -0
  570. package/dist/git-cli/providers/branches.d.ts.map +1 -0
  571. package/dist/git-cli/providers/branches.js +1153 -0
  572. package/dist/git-cli/providers/branches.js.map +1 -0
  573. package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -0
  574. package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -0
  575. package/dist/git-cli/providers/commitFilesetUtils.js +20 -0
  576. package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -0
  577. package/dist/git-cli/providers/commits.d.ts +49 -0
  578. package/dist/git-cli/providers/commits.d.ts.map +1 -0
  579. package/dist/git-cli/providers/commits.js +1151 -0
  580. package/dist/git-cli/providers/commits.js.map +1 -0
  581. package/dist/git-cli/providers/config.d.ts +74 -0
  582. package/dist/git-cli/providers/config.d.ts.map +1 -0
  583. package/dist/git-cli/providers/config.js +588 -0
  584. package/dist/git-cli/providers/config.js.map +1 -0
  585. package/dist/git-cli/providers/contributors.d.ts +31 -0
  586. package/dist/git-cli/providers/contributors.d.ts.map +1 -0
  587. package/dist/git-cli/providers/contributors.js +350 -0
  588. package/dist/git-cli/providers/contributors.js.map +1 -0
  589. package/dist/git-cli/providers/diff.d.ts +99 -0
  590. package/dist/git-cli/providers/diff.d.ts.map +1 -0
  591. package/dist/git-cli/providers/diff.js +786 -0
  592. package/dist/git-cli/providers/diff.js.map +1 -0
  593. package/dist/git-cli/providers/graph.d.ts +31 -0
  594. package/dist/git-cli/providers/graph.d.ts.map +1 -0
  595. package/dist/git-cli/providers/graph.js +703 -0
  596. package/dist/git-cli/providers/graph.js.map +1 -0
  597. package/dist/git-cli/providers/operations.d.ts +75 -0
  598. package/dist/git-cli/providers/operations.d.ts.map +1 -0
  599. package/dist/git-cli/providers/operations.js +564 -0
  600. package/dist/git-cli/providers/operations.js.map +1 -0
  601. package/dist/git-cli/providers/patch.d.ts +38 -0
  602. package/dist/git-cli/providers/patch.d.ts.map +1 -0
  603. package/dist/git-cli/providers/patch.js +324 -0
  604. package/dist/git-cli/providers/patch.js.map +1 -0
  605. package/dist/git-cli/providers/pausedOperations.d.ts +22 -0
  606. package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -0
  607. package/dist/git-cli/providers/pausedOperations.js +411 -0
  608. package/dist/git-cli/providers/pausedOperations.js.map +1 -0
  609. package/dist/git-cli/providers/refs.d.ts +32 -0
  610. package/dist/git-cli/providers/refs.d.ts.map +1 -0
  611. package/dist/git-cli/providers/refs.js +149 -0
  612. package/dist/git-cli/providers/refs.js.map +1 -0
  613. package/dist/git-cli/providers/remotes.d.ts +24 -0
  614. package/dist/git-cli/providers/remotes.d.ts.map +1 -0
  615. package/dist/git-cli/providers/remotes.js +94 -0
  616. package/dist/git-cli/providers/remotes.js.map +1 -0
  617. package/dist/git-cli/providers/revision.d.ts +27 -0
  618. package/dist/git-cli/providers/revision.d.ts.map +1 -0
  619. package/dist/git-cli/providers/revision.js +269 -0
  620. package/dist/git-cli/providers/revision.js.map +1 -0
  621. package/dist/git-cli/providers/staging.d.ts +24 -0
  622. package/dist/git-cli/providers/staging.d.ts.map +1 -0
  623. package/dist/git-cli/providers/staging.js +138 -0
  624. package/dist/git-cli/providers/staging.js.map +1 -0
  625. package/dist/git-cli/providers/stash.d.ts +55 -0
  626. package/dist/git-cli/providers/stash.d.ts.map +1 -0
  627. package/dist/git-cli/providers/stash.js +430 -0
  628. package/dist/git-cli/providers/stash.js.map +1 -0
  629. package/dist/git-cli/providers/status.d.ts +38 -0
  630. package/dist/git-cli/providers/status.d.ts.map +1 -0
  631. package/dist/git-cli/providers/status.js +352 -0
  632. package/dist/git-cli/providers/status.js.map +1 -0
  633. package/dist/git-cli/providers/tags.d.ts +29 -0
  634. package/dist/git-cli/providers/tags.d.ts.map +1 -0
  635. package/dist/git-cli/providers/tags.js +190 -0
  636. package/dist/git-cli/providers/tags.js.map +1 -0
  637. package/dist/git-cli/providers/worktrees.d.ts +33 -0
  638. package/dist/git-cli/providers/worktrees.d.ts.map +1 -0
  639. package/dist/git-cli/providers/worktrees.js +175 -0
  640. package/dist/git-cli/providers/worktrees.js.map +1 -0
  641. package/dist/git-cli/service.d.ts +52 -0
  642. package/dist/git-cli/service.d.ts.map +1 -0
  643. package/dist/git-cli/service.js +35 -0
  644. package/dist/git-cli/service.js.map +1 -0
  645. package/dist/plus/ai/constants.d.ts +21 -0
  646. package/dist/plus/ai/constants.d.ts.map +1 -0
  647. package/dist/plus/ai/constants.js +99 -0
  648. package/dist/plus/ai/constants.js.map +1 -0
  649. package/dist/plus/ai/errors.d.ts +25 -0
  650. package/dist/plus/ai/errors.d.ts.map +1 -0
  651. package/dist/plus/ai/errors.js +76 -0
  652. package/dist/plus/ai/errors.js.map +1 -0
  653. package/dist/plus/ai/models/conversation.d.ts +12 -0
  654. package/dist/plus/ai/models/conversation.d.ts.map +1 -0
  655. package/dist/plus/ai/models/conversation.js +27 -0
  656. package/dist/plus/ai/models/conversation.js.map +1 -0
  657. package/dist/plus/ai/models/model.d.ts +34 -0
  658. package/dist/plus/ai/models/model.d.ts.map +1 -0
  659. package/dist/plus/ai/models/model.js +379 -0
  660. package/dist/plus/ai/models/model.js.map +1 -0
  661. package/dist/plus/ai/models/promptTemplates.d.ts +74 -0
  662. package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -0
  663. package/dist/plus/ai/models/promptTemplates.js +2 -0
  664. package/dist/plus/ai/models/promptTemplates.js.map +1 -0
  665. package/dist/plus/ai/models/provider.d.ts +46 -0
  666. package/dist/plus/ai/models/provider.d.ts.map +1 -0
  667. package/dist/plus/ai/models/provider.js +2 -0
  668. package/dist/plus/ai/models/provider.js.map +1 -0
  669. package/dist/plus/ai/models/results.d.ts +5 -0
  670. package/dist/plus/ai/models/results.d.ts.map +1 -0
  671. package/dist/plus/ai/models/results.js +2 -0
  672. package/dist/plus/ai/models/results.js.map +1 -0
  673. package/dist/plus/ai/prompts.d.ts +13 -0
  674. package/dist/plus/ai/prompts.d.ts.map +1 -0
  675. package/dist/plus/ai/prompts.js +517 -0
  676. package/dist/plus/ai/prompts.js.map +1 -0
  677. package/dist/plus/ai/providers/anthropicProvider.d.ts +21 -0
  678. package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -0
  679. package/dist/plus/ai/providers/anthropicProvider.js +257 -0
  680. package/dist/plus/ai/providers/anthropicProvider.js.map +1 -0
  681. package/dist/plus/ai/providers/azureProvider.d.ts +18 -0
  682. package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -0
  683. package/dist/plus/ai/providers/azureProvider.js +54 -0
  684. package/dist/plus/ai/providers/azureProvider.js.map +1 -0
  685. package/dist/plus/ai/providers/context.d.ts +23 -0
  686. package/dist/plus/ai/providers/context.d.ts.map +1 -0
  687. package/dist/plus/ai/providers/context.js +2 -0
  688. package/dist/plus/ai/providers/context.js.map +1 -0
  689. package/dist/plus/ai/providers/deepSeekProvider.d.ts +15 -0
  690. package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -0
  691. package/dist/plus/ai/providers/deepSeekProvider.js +35 -0
  692. package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -0
  693. package/dist/plus/ai/providers/geminiProvider.d.ts +15 -0
  694. package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -0
  695. package/dist/plus/ai/providers/geminiProvider.js +195 -0
  696. package/dist/plus/ai/providers/geminiProvider.js.map +1 -0
  697. package/dist/plus/ai/providers/githubModelsProvider.d.ts +19 -0
  698. package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +1 -0
  699. package/dist/plus/ai/providers/githubModelsProvider.js +51 -0
  700. package/dist/plus/ai/providers/githubModelsProvider.js.map +1 -0
  701. package/dist/plus/ai/providers/gitkrakenProvider.d.ts +18 -0
  702. package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -0
  703. package/dist/plus/ai/providers/gitkrakenProvider.js +151 -0
  704. package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -0
  705. package/dist/plus/ai/providers/huggingFaceProvider.d.ts +15 -0
  706. package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -0
  707. package/dist/plus/ai/providers/huggingFaceProvider.js +39 -0
  708. package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -0
  709. package/dist/plus/ai/providers/mistralProvider.d.ts +20 -0
  710. package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -0
  711. package/dist/plus/ai/providers/mistralProvider.js +118 -0
  712. package/dist/plus/ai/providers/mistralProvider.js.map +1 -0
  713. package/dist/plus/ai/providers/ollamaProvider.d.ts +25 -0
  714. package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -0
  715. package/dist/plus/ai/providers/ollamaProvider.js +155 -0
  716. package/dist/plus/ai/providers/ollamaProvider.js.map +1 -0
  717. package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +17 -0
  718. package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -0
  719. package/dist/plus/ai/providers/openAICompatibleProvider.js +47 -0
  720. package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -0
  721. package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +39 -0
  722. package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -0
  723. package/dist/plus/ai/providers/openAICompatibleProviderBase.js +218 -0
  724. package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -0
  725. package/dist/plus/ai/providers/openRouterProvider.d.ts +17 -0
  726. package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -0
  727. package/dist/plus/ai/providers/openRouterProvider.js +57 -0
  728. package/dist/plus/ai/providers/openRouterProvider.js.map +1 -0
  729. package/dist/plus/ai/providers/openaiProvider.d.ts +16 -0
  730. package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -0
  731. package/dist/plus/ai/providers/openaiProvider.js +34 -0
  732. package/dist/plus/ai/providers/openaiProvider.js.map +1 -0
  733. package/dist/plus/ai/providers/xaiProvider.d.ts +15 -0
  734. package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -0
  735. package/dist/plus/ai/providers/xaiProvider.js +27 -0
  736. package/dist/plus/ai/providers/xaiProvider.js.map +1 -0
  737. package/dist/plus/ai/utils/ai.utils.d.ts +18 -0
  738. package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -0
  739. package/dist/plus/ai/utils/ai.utils.js +70 -0
  740. package/dist/plus/ai/utils/ai.utils.js.map +1 -0
  741. package/dist/plus/ai/utils/results.utils.d.ts +9 -0
  742. package/dist/plus/ai/utils/results.utils.d.ts.map +1 -0
  743. package/dist/plus/ai/utils/results.utils.js +44 -0
  744. package/dist/plus/ai/utils/results.utils.js.map +1 -0
  745. package/dist/plus/ai/utils/truncation.utils.d.ts +13 -0
  746. package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -0
  747. package/dist/plus/ai/utils/truncation.utils.js +228 -0
  748. package/dist/plus/ai/utils/truncation.utils.js.map +1 -0
  749. package/dist/plus/git-github/api/config.d.ts +66 -0
  750. package/dist/plus/git-github/api/config.d.ts.map +1 -0
  751. package/dist/plus/git-github/api/config.js +2 -0
  752. package/dist/plus/git-github/api/config.js.map +1 -0
  753. package/dist/plus/git-github/api/github.d.ts +178 -0
  754. package/dist/plus/git-github/api/github.d.ts.map +1 -0
  755. package/dist/plus/git-github/api/github.js +2360 -0
  756. package/dist/plus/git-github/api/github.js.map +1 -0
  757. package/dist/plus/git-github/api/github.utils.d.ts +9 -0
  758. package/dist/plus/git-github/api/github.utils.d.ts.map +1 -0
  759. package/dist/plus/git-github/api/github.utils.js +22 -0
  760. package/dist/plus/git-github/api/github.utils.js.map +1 -0
  761. package/dist/plus/git-github/api/token.d.ts +16 -0
  762. package/dist/plus/git-github/api/token.d.ts.map +1 -0
  763. package/dist/plus/git-github/api/token.js +2 -0
  764. package/dist/plus/git-github/api/token.js.map +1 -0
  765. package/dist/plus/git-github/api/tokenUtils.d.ts +7 -0
  766. package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -0
  767. package/dist/plus/git-github/api/tokenUtils.js +13 -0
  768. package/dist/plus/git-github/api/tokenUtils.js.map +1 -0
  769. package/dist/plus/git-github/api/types.d.ts +100 -0
  770. package/dist/plus/git-github/api/types.d.ts.map +1 -0
  771. package/dist/plus/git-github/api/types.js +2 -0
  772. package/dist/plus/git-github/api/types.js.map +1 -0
  773. package/dist/plus/git-github/context.d.ts +102 -0
  774. package/dist/plus/git-github/context.d.ts.map +1 -0
  775. package/dist/plus/git-github/context.js +12 -0
  776. package/dist/plus/git-github/context.js.map +1 -0
  777. package/dist/plus/git-github/models.d.ts +204 -0
  778. package/dist/plus/git-github/models.d.ts.map +1 -0
  779. package/dist/plus/git-github/models.js +229 -0
  780. package/dist/plus/git-github/models.js.map +1 -0
  781. package/dist/plus/git-github/providers/github/blame.d.ts +34 -0
  782. package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -0
  783. package/dist/plus/git-github/providers/github/blame.js +155 -0
  784. package/dist/plus/git-github/providers/github/blame.js.map +1 -0
  785. package/dist/plus/git-github/providers/github/branches.d.ts +38 -0
  786. package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -0
  787. package/dist/plus/git-github/providers/github/branches.js +234 -0
  788. package/dist/plus/git-github/providers/github/branches.js.map +1 -0
  789. package/dist/plus/git-github/providers/github/commits.d.ts +36 -0
  790. package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -0
  791. package/dist/plus/git-github/providers/github/commits.js +560 -0
  792. package/dist/plus/git-github/providers/github/commits.js.map +1 -0
  793. package/dist/plus/git-github/providers/github/config.d.ts +11 -0
  794. package/dist/plus/git-github/providers/github/config.d.ts.map +1 -0
  795. package/dist/plus/git-github/providers/github/config.js +47 -0
  796. package/dist/plus/git-github/providers/github/config.js.map +1 -0
  797. package/dist/plus/git-github/providers/github/contributors.d.ts +27 -0
  798. package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -0
  799. package/dist/plus/git-github/providers/github/contributors.js +218 -0
  800. package/dist/plus/git-github/providers/github/contributors.js.map +1 -0
  801. package/dist/plus/git-github/providers/github/diff.d.ts +33 -0
  802. package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -0
  803. package/dist/plus/git-github/providers/github/diff.js +184 -0
  804. package/dist/plus/git-github/providers/github/diff.js.map +1 -0
  805. package/dist/plus/git-github/providers/github/graph.d.ts +25 -0
  806. package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -0
  807. package/dist/plus/git-github/providers/github/graph.js +372 -0
  808. package/dist/plus/git-github/providers/github/graph.js.map +1 -0
  809. package/dist/plus/git-github/providers/github/refs.d.ts +26 -0
  810. package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -0
  811. package/dist/plus/git-github/providers/github/refs.js +108 -0
  812. package/dist/plus/git-github/providers/github/refs.js.map +1 -0
  813. package/dist/plus/git-github/providers/github/remotes.d.ts +9 -0
  814. package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -0
  815. package/dist/plus/git-github/providers/github/remotes.js +37 -0
  816. package/dist/plus/git-github/providers/github/remotes.js.map +1 -0
  817. package/dist/plus/git-github/providers/github/revision.d.ts +14 -0
  818. package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -0
  819. package/dist/plus/git-github/providers/github/revision.js +132 -0
  820. package/dist/plus/git-github/providers/github/revision.js.map +1 -0
  821. package/dist/plus/git-github/providers/github/status.d.ts +21 -0
  822. package/dist/plus/git-github/providers/github/status.d.ts.map +1 -0
  823. package/dist/plus/git-github/providers/github/status.js +49 -0
  824. package/dist/plus/git-github/providers/github/status.js.map +1 -0
  825. package/dist/plus/git-github/providers/github/tags.d.ts +22 -0
  826. package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -0
  827. package/dist/plus/git-github/providers/github/tags.js +104 -0
  828. package/dist/plus/git-github/providers/github/tags.js.map +1 -0
  829. package/dist/plus/git-github/providers/githubGitProvider.d.ts +85 -0
  830. package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -0
  831. package/dist/plus/git-github/providers/githubGitProvider.js +130 -0
  832. package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -0
  833. package/dist/plus/git-github/providers/githubProvider.d.ts +55 -0
  834. package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -0
  835. package/dist/plus/git-github/providers/githubProvider.js +2 -0
  836. package/dist/plus/git-github/providers/githubProvider.js.map +1 -0
  837. package/dist/utils/array.d.ts +27 -0
  838. package/dist/utils/array.d.ts.map +1 -0
  839. package/dist/utils/array.js +142 -0
  840. package/dist/utils/array.js.map +1 -0
  841. package/dist/utils/base64.d.ts +2 -0
  842. package/dist/utils/base64.d.ts.map +1 -0
  843. package/dist/utils/base64.js +2 -0
  844. package/dist/utils/base64.js.map +1 -0
  845. package/dist/utils/brand.d.ts +11 -0
  846. package/dist/utils/brand.d.ts.map +1 -0
  847. package/dist/utils/brand.js +2 -0
  848. package/dist/utils/brand.js.map +1 -0
  849. package/dist/utils/cancellation.d.ts +54 -0
  850. package/dist/utils/cancellation.d.ts.map +1 -0
  851. package/dist/utils/cancellation.js +133 -0
  852. package/dist/utils/cancellation.js.map +1 -0
  853. package/dist/utils/charCode.d.ts +39 -0
  854. package/dist/utils/charCode.d.ts.map +1 -0
  855. package/dist/utils/charCode.js +39 -0
  856. package/dist/utils/charCode.js.map +1 -0
  857. package/dist/utils/color.d.ts +177 -0
  858. package/dist/utils/color.d.ts.map +1 -0
  859. package/dist/utils/color.js +693 -0
  860. package/dist/utils/color.js.map +1 -0
  861. package/dist/utils/counter.d.ts +7 -0
  862. package/dist/utils/counter.d.ts.map +1 -0
  863. package/dist/utils/counter.js +19 -0
  864. package/dist/utils/counter.js.map +1 -0
  865. package/dist/utils/crypto.d.ts +2 -0
  866. package/dist/utils/crypto.d.ts.map +1 -0
  867. package/dist/utils/crypto.js +2 -0
  868. package/dist/utils/crypto.js.map +1 -0
  869. package/dist/utils/date.d.ts +20 -0
  870. package/dist/utils/date.d.ts.map +1 -0
  871. package/dist/utils/date.js +313 -0
  872. package/dist/utils/date.js.map +1 -0
  873. package/dist/utils/debounce.d.ts +108 -0
  874. package/dist/utils/debounce.d.ts.map +1 -0
  875. package/dist/utils/debounce.js +209 -0
  876. package/dist/utils/debounce.js.map +1 -0
  877. package/dist/utils/decorators/debounce.d.ts +3 -0
  878. package/dist/utils/decorators/debounce.d.ts.map +1 -0
  879. package/dist/utils/decorators/debounce.js +21 -0
  880. package/dist/utils/decorators/debounce.js.map +1 -0
  881. package/dist/utils/decorators/gate.d.ts +15 -0
  882. package/dist/utils/decorators/gate.d.ts.map +1 -0
  883. package/dist/utils/decorators/gate.js +129 -0
  884. package/dist/utils/decorators/gate.js.map +1 -0
  885. package/dist/utils/decorators/log.d.ts +46 -0
  886. package/dist/utils/decorators/log.d.ts.map +1 -0
  887. package/dist/utils/decorators/log.js +238 -0
  888. package/dist/utils/decorators/log.js.map +1 -0
  889. package/dist/utils/decorators/memoize.d.ts +17 -0
  890. package/dist/utils/decorators/memoize.d.ts.map +1 -0
  891. package/dist/utils/decorators/memoize.js +63 -0
  892. package/dist/utils/decorators/memoize.js.map +1 -0
  893. package/dist/utils/decorators/resolver.d.ts +12 -0
  894. package/dist/utils/decorators/resolver.d.ts.map +1 -0
  895. package/dist/utils/decorators/resolver.js +85 -0
  896. package/dist/utils/decorators/resolver.js.map +1 -0
  897. package/dist/utils/decorators/sequentialize.d.ts +29 -0
  898. package/dist/utils/decorators/sequentialize.d.ts.map +1 -0
  899. package/dist/utils/decorators/sequentialize.js +81 -0
  900. package/dist/utils/decorators/sequentialize.js.map +1 -0
  901. package/dist/utils/decorators/serializable.d.ts +13 -0
  902. package/dist/utils/decorators/serializable.d.ts.map +1 -0
  903. package/dist/utils/decorators/serializable.js +42 -0
  904. package/dist/utils/decorators/serializable.js.map +1 -0
  905. package/dist/utils/disposable.d.ts +40 -0
  906. package/dist/utils/disposable.d.ts.map +1 -0
  907. package/dist/utils/disposable.js +87 -0
  908. package/dist/utils/disposable.js.map +1 -0
  909. package/dist/utils/encoding.d.ts +3 -0
  910. package/dist/utils/encoding.d.ts.map +1 -0
  911. package/dist/utils/encoding.js +7 -0
  912. package/dist/utils/encoding.js.map +1 -0
  913. package/dist/utils/env/browser/base64.d.ts +9 -0
  914. package/dist/utils/env/browser/base64.d.ts.map +1 -0
  915. package/dist/utils/env/browser/base64.js +42 -0
  916. package/dist/utils/env/browser/base64.js.map +1 -0
  917. package/dist/utils/env/browser/crypto.d.ts +5 -0
  918. package/dist/utils/env/browser/crypto.d.ts.map +1 -0
  919. package/dist/utils/env/browser/crypto.js +18 -0
  920. package/dist/utils/env/browser/crypto.js.map +1 -0
  921. package/dist/utils/env/browser/fs.d.ts +2 -0
  922. package/dist/utils/env/browser/fs.d.ts.map +1 -0
  923. package/dist/utils/env/browser/fs.js +4 -0
  924. package/dist/utils/env/browser/fs.js.map +1 -0
  925. package/dist/utils/env/browser/hex.d.ts +4 -0
  926. package/dist/utils/env/browser/hex.d.ts.map +1 -0
  927. package/dist/utils/env/browser/hex.js +38 -0
  928. package/dist/utils/env/browser/hex.js.map +1 -0
  929. package/dist/utils/env/browser/hrtime.d.ts +2 -0
  930. package/dist/utils/env/browser/hrtime.d.ts.map +1 -0
  931. package/dist/utils/env/browser/hrtime.js +15 -0
  932. package/dist/utils/env/browser/hrtime.js.map +1 -0
  933. package/dist/utils/env/browser/logScope.d.ts +25 -0
  934. package/dist/utils/env/browser/logScope.d.ts.map +1 -0
  935. package/dist/utils/env/browser/logScope.js +53 -0
  936. package/dist/utils/env/browser/logScope.js.map +1 -0
  937. package/dist/utils/env/browser/md5.d.ts +2 -0
  938. package/dist/utils/env/browser/md5.d.ts.map +1 -0
  939. package/dist/utils/env/browser/md5.js +199 -0
  940. package/dist/utils/env/browser/md5.js.map +1 -0
  941. package/dist/utils/env/browser/platform.d.ts +4 -0
  942. package/dist/utils/env/browser/platform.d.ts.map +1 -0
  943. package/dist/utils/env/browser/platform.js +6 -0
  944. package/dist/utils/env/browser/platform.js.map +1 -0
  945. package/dist/utils/env/node/base64.d.ts +9 -0
  946. package/dist/utils/env/node/base64.d.ts.map +1 -0
  947. package/dist/utils/env/node/base64.js +14 -0
  948. package/dist/utils/env/node/base64.js.map +1 -0
  949. package/dist/utils/env/node/crypto.d.ts +5 -0
  950. package/dist/utils/env/node/crypto.d.ts.map +1 -0
  951. package/dist/utils/env/node/crypto.js +14 -0
  952. package/dist/utils/env/node/crypto.js.map +1 -0
  953. package/dist/utils/env/node/exec.d.ts +89 -0
  954. package/dist/utils/env/node/exec.d.ts.map +1 -0
  955. package/dist/utils/env/node/exec.js +277 -0
  956. package/dist/utils/env/node/exec.js.map +1 -0
  957. package/dist/utils/env/node/fs.d.ts +2 -0
  958. package/dist/utils/env/node/fs.d.ts.map +1 -0
  959. package/dist/utils/env/node/fs.js +5 -0
  960. package/dist/utils/env/node/fs.js.map +1 -0
  961. package/dist/utils/env/node/hex.d.ts +4 -0
  962. package/dist/utils/env/node/hex.d.ts.map +1 -0
  963. package/dist/utils/env/node/hex.js +10 -0
  964. package/dist/utils/env/node/hex.js.map +1 -0
  965. package/dist/utils/env/node/hrtime.d.ts +2 -0
  966. package/dist/utils/env/node/hrtime.d.ts.map +1 -0
  967. package/dist/utils/env/node/hrtime.js +2 -0
  968. package/dist/utils/env/node/hrtime.js.map +1 -0
  969. package/dist/utils/env/node/logScope.d.ts +34 -0
  970. package/dist/utils/env/node/logScope.d.ts.map +1 -0
  971. package/dist/utils/env/node/logScope.js +52 -0
  972. package/dist/utils/env/node/logScope.js.map +1 -0
  973. package/dist/utils/env/node/platform.d.ts +4 -0
  974. package/dist/utils/env/node/platform.d.ts.map +1 -0
  975. package/dist/utils/env/node/platform.js +5 -0
  976. package/dist/utils/env/node/platform.js.map +1 -0
  977. package/dist/utils/error.d.ts +18 -0
  978. package/dist/utils/error.d.ts.map +1 -0
  979. package/dist/utils/error.js +19 -0
  980. package/dist/utils/error.js.map +1 -0
  981. package/dist/utils/event.d.ts +59 -0
  982. package/dist/utils/event.d.ts.map +1 -0
  983. package/dist/utils/event.js +183 -0
  984. package/dist/utils/event.js.map +1 -0
  985. package/dist/utils/formatter.d.ts +21 -0
  986. package/dist/utils/formatter.d.ts.map +1 -0
  987. package/dist/utils/formatter.js +139 -0
  988. package/dist/utils/formatter.js.map +1 -0
  989. package/dist/utils/fs.d.ts +2 -0
  990. package/dist/utils/fs.d.ts.map +1 -0
  991. package/dist/utils/fs.js +2 -0
  992. package/dist/utils/fs.js.map +1 -0
  993. package/dist/utils/function.d.ts +24 -0
  994. package/dist/utils/function.d.ts.map +1 -0
  995. package/dist/utils/function.js +103 -0
  996. package/dist/utils/function.js.map +1 -0
  997. package/dist/utils/fuzzy.d.ts +68 -0
  998. package/dist/utils/fuzzy.d.ts.map +1 -0
  999. package/dist/utils/fuzzy.js +134 -0
  1000. package/dist/utils/fuzzy.js.map +1 -0
  1001. package/dist/utils/hash.d.ts +32 -0
  1002. package/dist/utils/hash.d.ts.map +1 -0
  1003. package/dist/utils/hash.js +53 -0
  1004. package/dist/utils/hash.js.map +1 -0
  1005. package/dist/utils/hex.d.ts +2 -0
  1006. package/dist/utils/hex.d.ts.map +1 -0
  1007. package/dist/utils/hex.js +2 -0
  1008. package/dist/utils/hex.js.map +1 -0
  1009. package/dist/utils/hrtime.d.ts +4 -0
  1010. package/dist/utils/hrtime.d.ts.map +1 -0
  1011. package/dist/utils/hrtime.js +7 -0
  1012. package/dist/utils/hrtime.js.map +1 -0
  1013. package/dist/utils/iterable.d.ts +65 -0
  1014. package/dist/utils/iterable.d.ts.map +1 -0
  1015. package/dist/utils/iterable.js +635 -0
  1016. package/dist/utils/iterable.js.map +1 -0
  1017. package/dist/utils/lazy.d.ts +18 -0
  1018. package/dist/utils/lazy.d.ts.map +1 -0
  1019. package/dist/utils/lazy.js +40 -0
  1020. package/dist/utils/lazy.js.map +1 -0
  1021. package/dist/utils/loggable.d.ts +5 -0
  1022. package/dist/utils/loggable.d.ts.map +1 -0
  1023. package/dist/utils/loggable.js +4 -0
  1024. package/dist/utils/loggable.js.map +1 -0
  1025. package/dist/utils/logger.d.ts +63 -0
  1026. package/dist/utils/logger.d.ts.map +1 -0
  1027. package/dist/utils/logger.js +316 -0
  1028. package/dist/utils/logger.js.map +1 -0
  1029. package/dist/utils/logger.scoped.d.ts +56 -0
  1030. package/dist/utils/logger.scoped.d.ts.map +1 -0
  1031. package/dist/utils/logger.scoped.js +166 -0
  1032. package/dist/utils/logger.scoped.js.map +1 -0
  1033. package/dist/utils/markdown.d.ts +9 -0
  1034. package/dist/utils/markdown.d.ts.map +1 -0
  1035. package/dist/utils/markdown.js +100 -0
  1036. package/dist/utils/markdown.js.map +1 -0
  1037. package/dist/utils/mru.d.ts +14 -0
  1038. package/dist/utils/mru.d.ts.map +1 -0
  1039. package/dist/utils/mru.js +63 -0
  1040. package/dist/utils/mru.js.map +1 -0
  1041. package/dist/utils/object.d.ts +62 -0
  1042. package/dist/utils/object.d.ts.map +1 -0
  1043. package/dist/utils/object.js +151 -0
  1044. package/dist/utils/object.js.map +1 -0
  1045. package/dist/utils/paging.d.ts +19 -0
  1046. package/dist/utils/paging.d.ts.map +1 -0
  1047. package/dist/utils/paging.js +32 -0
  1048. package/dist/utils/paging.js.map +1 -0
  1049. package/dist/utils/path.d.ts +17 -0
  1050. package/dist/utils/path.d.ts.map +1 -0
  1051. package/dist/utils/path.js +156 -0
  1052. package/dist/utils/path.js.map +1 -0
  1053. package/dist/utils/platform.d.ts +2 -0
  1054. package/dist/utils/platform.d.ts.map +1 -0
  1055. package/dist/utils/platform.js +2 -0
  1056. package/dist/utils/platform.js.map +1 -0
  1057. package/dist/utils/promise.d.ts +61 -0
  1058. package/dist/utils/promise.d.ts.map +1 -0
  1059. package/dist/utils/promise.js +337 -0
  1060. package/dist/utils/promise.js.map +1 -0
  1061. package/dist/utils/promiseCache.d.ts +337 -0
  1062. package/dist/utils/promiseCache.d.ts.map +1 -0
  1063. package/dist/utils/promiseCache.js +634 -0
  1064. package/dist/utils/promiseCache.js.map +1 -0
  1065. package/dist/utils/searchTree.d.ts +58 -0
  1066. package/dist/utils/searchTree.d.ts.map +1 -0
  1067. package/dist/utils/searchTree.js +394 -0
  1068. package/dist/utils/searchTree.js.map +1 -0
  1069. package/dist/utils/stopwatch.d.ts +41 -0
  1070. package/dist/utils/stopwatch.d.ts.map +1 -0
  1071. package/dist/utils/stopwatch.js +83 -0
  1072. package/dist/utils/stopwatch.js.map +1 -0
  1073. package/dist/utils/string.d.ts +91 -0
  1074. package/dist/utils/string.d.ts.map +1 -0
  1075. package/dist/utils/string.js +803 -0
  1076. package/dist/utils/string.js.map +1 -0
  1077. package/dist/utils/subscriptionManager.d.ts +18 -0
  1078. package/dist/utils/subscriptionManager.d.ts.map +1 -0
  1079. package/dist/utils/subscriptionManager.js +34 -0
  1080. package/dist/utils/subscriptionManager.js.map +1 -0
  1081. package/dist/utils/trie.d.ts +76 -0
  1082. package/dist/utils/trie.d.ts.map +1 -0
  1083. package/dist/utils/trie.js +584 -0
  1084. package/dist/utils/trie.js.map +1 -0
  1085. package/dist/utils/types.d.ts +21 -0
  1086. package/dist/utils/types.d.ts.map +1 -0
  1087. package/dist/utils/types.js +2 -0
  1088. package/dist/utils/types.js.map +1 -0
  1089. package/dist/utils/uri.d.ts +69 -0
  1090. package/dist/utils/uri.d.ts.map +1 -0
  1091. package/dist/utils/uri.js +66 -0
  1092. package/dist/utils/uri.js.map +1 -0
  1093. package/dist/utils/validation.d.ts +14 -0
  1094. package/dist/utils/validation.d.ts.map +1 -0
  1095. package/dist/utils/validation.js +26 -0
  1096. package/dist/utils/validation.js.map +1 -0
  1097. package/dist/utils/version.d.ts +15 -0
  1098. package/dist/utils/version.d.ts.map +1 -0
  1099. package/dist/utils/version.js +66 -0
  1100. package/dist/utils/version.js.map +1 -0
  1101. package/package.json +161 -0
  1102. package/src/git/cache.ts +1152 -0
  1103. package/src/git/context.ts +248 -0
  1104. package/src/git/errors.ts +1121 -0
  1105. package/src/git/exec.types.ts +78 -0
  1106. package/src/git/features.ts +45 -0
  1107. package/src/git/models/author.ts +19 -0
  1108. package/src/git/models/autolink.ts +59 -0
  1109. package/src/git/models/blame.ts +46 -0
  1110. package/src/git/models/branch.ts +236 -0
  1111. package/src/git/models/commit.ts +688 -0
  1112. package/src/git/models/contributor.ts +84 -0
  1113. package/src/git/models/defaultBranch.ts +6 -0
  1114. package/src/git/models/diff.ts +74 -0
  1115. package/src/git/models/file.ts +29 -0
  1116. package/src/git/models/fileChange.ts +82 -0
  1117. package/src/git/models/fileStatus.ts +35 -0
  1118. package/src/git/models/graph.ts +184 -0
  1119. package/src/git/models/graphSearch.ts +53 -0
  1120. package/src/git/models/issue.ts +88 -0
  1121. package/src/git/models/issueOrPullRequest.ts +20 -0
  1122. package/src/git/models/lineRange.ts +7 -0
  1123. package/src/git/models/log.ts +21 -0
  1124. package/src/git/models/mergeConflicts.ts +18 -0
  1125. package/src/git/models/patch.ts +25 -0
  1126. package/src/git/models/pausedOperationStatus.ts +63 -0
  1127. package/src/git/models/pullRequest.ts +161 -0
  1128. package/src/git/models/rebase.ts +60 -0
  1129. package/src/git/models/reference.ts +47 -0
  1130. package/src/git/models/reflog.ts +88 -0
  1131. package/src/git/models/remote.ts +99 -0
  1132. package/src/git/models/remoteProvider.ts +290 -0
  1133. package/src/git/models/remoteResource.ts +87 -0
  1134. package/src/git/models/repository.ts +417 -0
  1135. package/src/git/models/repositoryChangeEvent.ts +30 -0
  1136. package/src/git/models/repositoryIdentities.ts +99 -0
  1137. package/src/git/models/repositoryMetadata.ts +12 -0
  1138. package/src/git/models/resourceDescriptor.ts +11 -0
  1139. package/src/git/models/revision.ts +12 -0
  1140. package/src/git/models/search.ts +123 -0
  1141. package/src/git/models/shortlog.ts +6 -0
  1142. package/src/git/models/signature.ts +29 -0
  1143. package/src/git/models/staging.ts +27 -0
  1144. package/src/git/models/stash.ts +6 -0
  1145. package/src/git/models/status.ts +246 -0
  1146. package/src/git/models/statusFile.ts +116 -0
  1147. package/src/git/models/tag.ts +71 -0
  1148. package/src/git/models/tree.ts +10 -0
  1149. package/src/git/models/user.ts +7 -0
  1150. package/src/git/models/worktree.ts +152 -0
  1151. package/src/git/parsers/diffParser.ts +660 -0
  1152. package/src/git/parsers/rebaseTodoParser.ts +169 -0
  1153. package/src/git/providers/blame.ts +40 -0
  1154. package/src/git/providers/branches.ts +111 -0
  1155. package/src/git/providers/commits.ts +147 -0
  1156. package/src/git/providers/config.ts +104 -0
  1157. package/src/git/providers/contributors.ts +34 -0
  1158. package/src/git/providers/diff.ts +127 -0
  1159. package/src/git/providers/graph.ts +30 -0
  1160. package/src/git/providers/operations.ts +82 -0
  1161. package/src/git/providers/patch.ts +31 -0
  1162. package/src/git/providers/pausedOperations.ts +10 -0
  1163. package/src/git/providers/provider.ts +62 -0
  1164. package/src/git/providers/refs.ts +39 -0
  1165. package/src/git/providers/remotes.ts +33 -0
  1166. package/src/git/providers/revision.ts +28 -0
  1167. package/src/git/providers/shared/remotes.ts +95 -0
  1168. package/src/git/providers/staging.ts +22 -0
  1169. package/src/git/providers/stash.ts +51 -0
  1170. package/src/git/providers/status.ts +42 -0
  1171. package/src/git/providers/tags.ts +28 -0
  1172. package/src/git/providers/types.ts +33 -0
  1173. package/src/git/providers/worktrees.ts +23 -0
  1174. package/src/git/remotes/azure-devops.ts +309 -0
  1175. package/src/git/remotes/bitbucket-server.ts +191 -0
  1176. package/src/git/remotes/bitbucket.ts +144 -0
  1177. package/src/git/remotes/custom.ts +139 -0
  1178. package/src/git/remotes/gerrit.ts +188 -0
  1179. package/src/git/remotes/gitea.ts +186 -0
  1180. package/src/git/remotes/github.ts +238 -0
  1181. package/src/git/remotes/gitlab.ts +272 -0
  1182. package/src/git/remotes/google-source.ts +51 -0
  1183. package/src/git/remotes/matcher.ts +215 -0
  1184. package/src/git/repositoryService.ts +179 -0
  1185. package/src/git/service.ts +365 -0
  1186. package/src/git/utils/autolink.utils.ts +201 -0
  1187. package/src/git/utils/blame.utils.ts +296 -0
  1188. package/src/git/utils/branch.utils.ts +154 -0
  1189. package/src/git/utils/commit.utils.ts +89 -0
  1190. package/src/git/utils/contributor.utils.ts +81 -0
  1191. package/src/git/utils/fetch.utils.ts +48 -0
  1192. package/src/git/utils/fileStatus.utils.ts +49 -0
  1193. package/src/git/utils/issue.utils.ts +81 -0
  1194. package/src/git/utils/issueOrPullRequest.utils.ts +23 -0
  1195. package/src/git/utils/mergeConflicts.utils.ts +21 -0
  1196. package/src/git/utils/pausedOperationStatus.utils.ts +156 -0
  1197. package/src/git/utils/pullRequest.utils.ts +149 -0
  1198. package/src/git/utils/rebase.utils.ts +128 -0
  1199. package/src/git/utils/reference.utils.ts +267 -0
  1200. package/src/git/utils/remote.utils.ts +140 -0
  1201. package/src/git/utils/repository.utils.ts +18 -0
  1202. package/src/git/utils/resourceDescriptor.utils.ts +26 -0
  1203. package/src/git/utils/revision.utils.ts +149 -0
  1204. package/src/git/utils/search.utils.ts +498 -0
  1205. package/src/git/utils/sorting.ts +291 -0
  1206. package/src/git/utils/status.utils.ts +114 -0
  1207. package/src/git/utils/statusFile.utils.ts +182 -0
  1208. package/src/git/utils/tag.utils.ts +17 -0
  1209. package/src/git/utils/tooltip.utils.ts +37 -0
  1210. package/src/git/utils/uriAuthority.ts +34 -0
  1211. package/src/git/utils/user.utils.ts +20 -0
  1212. package/src/git/utils/worktree.utils.ts +21 -0
  1213. package/src/git/watching/changeEvent.ts +90 -0
  1214. package/src/git/watching/classifyChange.ts +81 -0
  1215. package/src/git/watching/gitIgnoreFilter.ts +134 -0
  1216. package/src/git/watching/initWatcher.ts +79 -0
  1217. package/src/git/watching/provider.ts +24 -0
  1218. package/src/git/watching/watchGroup.ts +182 -0
  1219. package/src/git/watching/watchService.ts +350 -0
  1220. package/src/git/watching/watchSession.ts +370 -0
  1221. package/src/git/watching/watcherPatterns.ts +51 -0
  1222. package/src/git-cli/cliGitProvider.ts +436 -0
  1223. package/src/git-cli/exec/exec.errors.ts +1 -0
  1224. package/src/git-cli/exec/exec.ts +11 -0
  1225. package/src/git-cli/exec/exec.types.ts +8 -0
  1226. package/src/git-cli/exec/features.ts +2 -0
  1227. package/src/git-cli/exec/git.ts +1092 -0
  1228. package/src/git-cli/exec/gitQueue.ts +251 -0
  1229. package/src/git-cli/exec/locator.ts +157 -0
  1230. package/src/git-cli/parsers/blameParser.ts +373 -0
  1231. package/src/git-cli/parsers/indexParser.ts +192 -0
  1232. package/src/git-cli/parsers/logParser.ts +1275 -0
  1233. package/src/git-cli/parsers/mergeTreeParser.ts +22 -0
  1234. package/src/git-cli/parsers/refParser.ts +111 -0
  1235. package/src/git-cli/parsers/reflogParser.ts +153 -0
  1236. package/src/git-cli/parsers/remoteParser.ts +95 -0
  1237. package/src/git-cli/parsers/shortlogParser.ts +59 -0
  1238. package/src/git-cli/parsers/signatureParser.ts +162 -0
  1239. package/src/git-cli/parsers/statusParser.ts +209 -0
  1240. package/src/git-cli/parsers/treeParser.ts +61 -0
  1241. package/src/git-cli/parsers/worktreeParser.ts +113 -0
  1242. package/src/git-cli/providers/blame.ts +602 -0
  1243. package/src/git-cli/providers/branches.ts +1491 -0
  1244. package/src/git-cli/providers/commitFilesetUtils.ts +45 -0
  1245. package/src/git-cli/providers/commits.ts +1517 -0
  1246. package/src/git-cli/providers/config.ts +724 -0
  1247. package/src/git-cli/providers/contributors.ts +361 -0
  1248. package/src/git-cli/providers/diff.ts +1084 -0
  1249. package/src/git-cli/providers/graph.ts +799 -0
  1250. package/src/git-cli/providers/operations.ts +776 -0
  1251. package/src/git-cli/providers/patch.ts +326 -0
  1252. package/src/git-cli/providers/pausedOperations.ts +538 -0
  1253. package/src/git-cli/providers/refs.ts +193 -0
  1254. package/src/git-cli/providers/remotes.ts +115 -0
  1255. package/src/git-cli/providers/revision.ts +334 -0
  1256. package/src/git-cli/providers/staging.ts +160 -0
  1257. package/src/git-cli/providers/stash.ts +626 -0
  1258. package/src/git-cli/providers/status.ts +373 -0
  1259. package/src/git-cli/providers/tags.ts +188 -0
  1260. package/src/git-cli/providers/worktrees.ts +229 -0
  1261. package/src/git-cli/service.ts +74 -0
  1262. package/src/plus/ai/constants.ts +121 -0
  1263. package/src/plus/ai/errors.ts +82 -0
  1264. package/src/plus/ai/models/conversation.ts +35 -0
  1265. package/src/plus/ai/models/model.ts +425 -0
  1266. package/src/plus/ai/models/promptTemplates.ts +122 -0
  1267. package/src/plus/ai/models/provider.ts +52 -0
  1268. package/src/plus/ai/models/results.ts +1 -0
  1269. package/src/plus/ai/prompts.ts +528 -0
  1270. package/src/plus/ai/providers/anthropicProvider.ts +308 -0
  1271. package/src/plus/ai/providers/azureProvider.ts +74 -0
  1272. package/src/plus/ai/providers/context.ts +29 -0
  1273. package/src/plus/ai/providers/deepSeekProvider.ts +40 -0
  1274. package/src/plus/ai/providers/geminiProvider.ts +207 -0
  1275. package/src/plus/ai/providers/githubModelsProvider.ts +92 -0
  1276. package/src/plus/ai/providers/gitkrakenProvider.ts +218 -0
  1277. package/src/plus/ai/providers/huggingFaceProvider.ts +51 -0
  1278. package/src/plus/ai/providers/mistralProvider.ts +160 -0
  1279. package/src/plus/ai/providers/ollamaProvider.ts +241 -0
  1280. package/src/plus/ai/providers/openAICompatibleProvider.ts +59 -0
  1281. package/src/plus/ai/providers/openAICompatibleProviderBase.ts +279 -0
  1282. package/src/plus/ai/providers/openRouterProvider.ts +84 -0
  1283. package/src/plus/ai/providers/openaiProvider.ts +46 -0
  1284. package/src/plus/ai/providers/xaiProvider.ts +32 -0
  1285. package/src/plus/ai/utils/ai.utils.ts +79 -0
  1286. package/src/plus/ai/utils/results.utils.ts +50 -0
  1287. package/src/plus/ai/utils/truncation.utils.ts +295 -0
  1288. package/src/plus/git-github/api/config.ts +78 -0
  1289. package/src/plus/git-github/api/github.ts +3424 -0
  1290. package/src/plus/git-github/api/github.utils.ts +36 -0
  1291. package/src/plus/git-github/api/token.ts +15 -0
  1292. package/src/plus/git-github/api/tokenUtils.ts +15 -0
  1293. package/src/plus/git-github/api/types.ts +182 -0
  1294. package/src/plus/git-github/context.ts +107 -0
  1295. package/src/plus/git-github/models.ts +524 -0
  1296. package/src/plus/git-github/providers/github/blame.ts +222 -0
  1297. package/src/plus/git-github/providers/github/branches.ts +356 -0
  1298. package/src/plus/git-github/providers/github/commits.ts +858 -0
  1299. package/src/plus/git-github/providers/github/config.ts +47 -0
  1300. package/src/plus/git-github/providers/github/contributors.ts +313 -0
  1301. package/src/plus/git-github/providers/github/diff.ts +267 -0
  1302. package/src/plus/git-github/providers/github/graph.ts +511 -0
  1303. package/src/plus/git-github/providers/github/refs.ts +137 -0
  1304. package/src/plus/git-github/providers/github/remotes.ts +44 -0
  1305. package/src/plus/git-github/providers/github/revision.ts +141 -0
  1306. package/src/plus/git-github/providers/github/status.ts +63 -0
  1307. package/src/plus/git-github/providers/github/tags.ts +147 -0
  1308. package/src/plus/git-github/providers/githubGitProvider.ts +167 -0
  1309. package/src/plus/git-github/providers/githubProvider.ts +65 -0
  1310. package/src/utils/array.ts +194 -0
  1311. package/src/utils/base64.ts +1 -0
  1312. package/src/utils/brand.ts +9 -0
  1313. package/src/utils/cancellation.ts +150 -0
  1314. package/src/utils/charCode.ts +38 -0
  1315. package/src/utils/color.ts +815 -0
  1316. package/src/utils/counter.ts +21 -0
  1317. package/src/utils/crypto.ts +1 -0
  1318. package/src/utils/date.ts +394 -0
  1319. package/src/utils/debounce.ts +303 -0
  1320. package/src/utils/decorators/debounce.ts +31 -0
  1321. package/src/utils/decorators/gate.ts +167 -0
  1322. package/src/utils/decorators/log.ts +320 -0
  1323. package/src/utils/decorators/memoize.ts +98 -0
  1324. package/src/utils/decorators/resolver.ts +95 -0
  1325. package/src/utils/decorators/sequentialize.ts +116 -0
  1326. package/src/utils/decorators/serializable.ts +42 -0
  1327. package/src/utils/disposable.ts +141 -0
  1328. package/src/utils/encoding.ts +8 -0
  1329. package/src/utils/env/browser/base64.ts +50 -0
  1330. package/src/utils/env/browser/crypto.ts +21 -0
  1331. package/src/utils/env/browser/fs.ts +3 -0
  1332. package/src/utils/env/browser/hex.ts +41 -0
  1333. package/src/utils/env/browser/hrtime.ts +14 -0
  1334. package/src/utils/env/browser/logScope.ts +57 -0
  1335. package/src/utils/env/browser/md5.ts +217 -0
  1336. package/src/utils/env/browser/platform.ts +10 -0
  1337. package/src/utils/env/node/base64.ts +17 -0
  1338. package/src/utils/env/node/crypto.ts +17 -0
  1339. package/src/utils/env/node/exec.ts +471 -0
  1340. package/src/utils/env/node/fs.ts +5 -0
  1341. package/src/utils/env/node/hex.ts +11 -0
  1342. package/src/utils/env/node/hrtime.ts +1 -0
  1343. package/src/utils/env/node/logScope.ts +63 -0
  1344. package/src/utils/env/node/platform.ts +5 -0
  1345. package/src/utils/error.ts +17 -0
  1346. package/src/utils/event.ts +236 -0
  1347. package/src/utils/formatter.ts +205 -0
  1348. package/src/utils/fs.ts +1 -0
  1349. package/src/utils/function.ts +141 -0
  1350. package/src/utils/fuzzy.ts +185 -0
  1351. package/src/utils/hash.ts +60 -0
  1352. package/src/utils/hex.ts +1 -0
  1353. package/src/utils/hrtime.ts +8 -0
  1354. package/src/utils/iterable.ts +787 -0
  1355. package/src/utils/lazy.ts +39 -0
  1356. package/src/utils/loggable.ts +7 -0
  1357. package/src/utils/logger.scoped.ts +237 -0
  1358. package/src/utils/logger.ts +402 -0
  1359. package/src/utils/markdown.ts +114 -0
  1360. package/src/utils/mru.ts +66 -0
  1361. package/src/utils/object.ts +227 -0
  1362. package/src/utils/paging.ts +51 -0
  1363. package/src/utils/path.ts +189 -0
  1364. package/src/utils/platform.ts +1 -0
  1365. package/src/utils/promise.ts +590 -0
  1366. package/src/utils/promiseCache.ts +803 -0
  1367. package/src/utils/searchTree.ts +442 -0
  1368. package/src/utils/stopwatch.ts +125 -0
  1369. package/src/utils/string.ts +964 -0
  1370. package/src/utils/subscriptionManager.ts +40 -0
  1371. package/src/utils/trie.ts +739 -0
  1372. package/src/utils/types.ts +31 -0
  1373. package/src/utils/uri.ts +117 -0
  1374. package/src/utils/validation.ts +38 -0
  1375. package/src/utils/version.ts +79 -0
@@ -0,0 +1,1517 @@
1
+ import type { Cache } from '../../git/cache.js';
2
+ import type { GitServiceContext } from '../../git/context.js';
3
+ import type { GitBlame } from '../../git/models/blame.js';
4
+ import type { GitStashCommit } from '../../git/models/commit.js';
5
+ import { GitCommit, GitCommitIdentity } from '../../git/models/commit.js';
6
+ import type { GitDiffFilter, ParsedGitDiffHunks } from '../../git/models/diff.js';
7
+ import { GitFileChange } from '../../git/models/fileChange.js';
8
+ import type { GitFileStatus } from '../../git/models/fileStatus.js';
9
+ import type { GitLog } from '../../git/models/log.js';
10
+ import type { GitReflog } from '../../git/models/reflog.js';
11
+ import type { GitRevisionRange } from '../../git/models/revision.js';
12
+ import type { SearchQuery, SearchQueryFilters } from '../../git/models/search.js';
13
+ import type { CommitSignature } from '../../git/models/signature.js';
14
+ import type { GitUser } from '../../git/models/user.js';
15
+ import type {
16
+ GitCommitReachability,
17
+ GitCommitsSubProvider,
18
+ GitLogForPathOptions,
19
+ GitLogOptions,
20
+ GitLogShasOptions,
21
+ GitSearchCommitsOptions,
22
+ IncomingActivityOptions,
23
+ LeftRightCommitCountResult,
24
+ SearchCommitsResult,
25
+ } from '../../git/providers/commits.js';
26
+ import type { DiffRange } from '../../git/providers/types.js';
27
+ import { createUncommittedChangesCommit } from '../../git/utils/commit.utils.js';
28
+ import { isRevisionRange, isSha, isUncommitted, isUncommittedStaged } from '../../git/utils/revision.utils.js';
29
+ import { parseSearchQueryGitCommand } from '../../git/utils/search.utils.js';
30
+ import { isUserMatch } from '../../git/utils/user.utils.js';
31
+ import { CancellationError, isCancellationError } from '../../utils/cancellation.js';
32
+ import { debug, trace } from '../../utils/decorators/log.js';
33
+ import { createDisposable } from '../../utils/disposable.js';
34
+ import { filterMap, findLast, first, join, last, some } from '../../utils/iterable.js';
35
+ import { getScopedLogger } from '../../utils/logger.scoped.js';
36
+ import { isFolderGlob, normalizePath, splitPath, stripFolderGlob } from '../../utils/path.js';
37
+ import type { CacheController } from '../../utils/promiseCache.js';
38
+ import { maybeStopWatch } from '../../utils/stopwatch.js';
39
+ import { escapeRegex } from '../../utils/string.js';
40
+ import type { Uri } from '../../utils/uri.js';
41
+ import { fileUri, joinUriPath, toFsPath } from '../../utils/uri.js';
42
+ import type { CliGitProviderInternal } from '../cliGitProvider.js';
43
+ import type { GitExecOptions, GitResult } from '../exec/exec.types.js';
44
+ import type { Git } from '../exec/git.js';
45
+ import { gitConfigsLog, gitConfigsLogWithFiles, GitErrors } from '../exec/git.js';
46
+ import type {
47
+ CommitsInFileRangeLogParser,
48
+ CommitsLogParser,
49
+ CommitsWithFilesLogParser,
50
+ ParsedCommit,
51
+ } from '../parsers/logParser.js';
52
+ import { getCommitsLogParser, getShaAndFilesAndStatsLogParser, getShaLogParser } from '../parsers/logParser.js';
53
+ import { getReflogParser, parseGitRefLog } from '../parsers/reflogParser.js';
54
+ import { parseSignatureOutput, signatureFormat } from '../parsers/signatureParser.js';
55
+ import { createCommitFileset } from './commitFilesetUtils.js';
56
+ import { convertStashesToStdin } from './stash.js';
57
+
58
+ const emptyPromise: Promise<GitBlame | ParsedGitDiffHunks | GitLog | undefined> = Promise.resolve(undefined);
59
+ const reflogCommands = ['merge', 'pull'];
60
+
61
+ export class CommitsGitSubProvider implements GitCommitsSubProvider {
62
+ constructor(
63
+ private readonly context: GitServiceContext,
64
+ private readonly git: Git,
65
+ private readonly cache: Cache,
66
+ private readonly provider: CliGitProviderInternal,
67
+ ) {}
68
+
69
+ @debug()
70
+ async createUnreachableCommitFromTree(
71
+ repoPath: string,
72
+ tree: string,
73
+ parent: string,
74
+ message: string,
75
+ cancellation?: AbortSignal,
76
+ ): Promise<string> {
77
+ const result = await this.git.exec(
78
+ { cwd: repoPath, cancellation: cancellation, errors: 'throw' },
79
+ 'commit-tree',
80
+ tree,
81
+ '-p',
82
+ parent,
83
+ '-m',
84
+ message,
85
+ );
86
+ return result.stdout.trim();
87
+ }
88
+
89
+ @debug()
90
+ async getCommit(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<GitCommit | undefined> {
91
+ if (isUncommitted(rev, true)) {
92
+ return createUncommittedChangesCommit(
93
+ repoPath,
94
+ rev,
95
+ new Date(),
96
+ await this.provider.config.getCurrentUser(repoPath),
97
+ );
98
+ }
99
+
100
+ const log = await this.getLogCore(repoPath, rev, { limit: 1 }, cancellation);
101
+ if (log == null) return undefined;
102
+
103
+ return log.commits.get(rev) ?? first(log.commits.values());
104
+ }
105
+
106
+ @debug({ exit: true })
107
+ async getCommitCount(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<number | undefined> {
108
+ const result = await this.git.exec(
109
+ { cwd: repoPath, cancellation: cancellation, errors: 'ignore' },
110
+ 'rev-list',
111
+ '--count',
112
+ rev,
113
+ '--',
114
+ );
115
+ if (result.cancelled || cancellation?.aborted) {
116
+ throw new CancellationError();
117
+ }
118
+
119
+ const data = result.stdout.trim();
120
+ if (!data) return undefined;
121
+
122
+ const count = parseInt(data, 10);
123
+ return isNaN(count) ? undefined : count;
124
+ }
125
+
126
+ @debug()
127
+ async getCommitFiles(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<GitFileChange[]> {
128
+ const parser = getShaAndFilesAndStatsLogParser();
129
+ const result = await this.git.exec(
130
+ { cwd: repoPath, cancellation: cancellation, configs: gitConfigsLog },
131
+ 'log',
132
+ ...parser.arguments,
133
+ '-n1',
134
+ rev && !isUncommittedStaged(rev) ? rev : undefined,
135
+ '--',
136
+ );
137
+
138
+ const repoUri = fileUri(normalizePath(repoPath));
139
+ const files = first(parser.parse(result.stdout))?.files.map(
140
+ f =>
141
+ new GitFileChange(
142
+ repoPath,
143
+ f.path,
144
+ f.status as GitFileStatus,
145
+ joinUriPath(repoUri, normalizePath(f.path)),
146
+ f.originalPath,
147
+ f.originalPath != null ? joinUriPath(repoUri, normalizePath(f.originalPath)) : undefined,
148
+ undefined,
149
+ { additions: f.additions, deletions: f.deletions, changes: 0 },
150
+ undefined,
151
+ undefined,
152
+ f.mode,
153
+ f.oid ? { oid: f.oid, previousOid: f.previousOid } : undefined,
154
+ ),
155
+ );
156
+
157
+ return files ?? [];
158
+ }
159
+
160
+ @debug()
161
+ async getCommitForFile(
162
+ repoPath: string,
163
+ pathOrUri: string | Uri,
164
+ rev?: string | undefined,
165
+ options?: { firstIfNotFound?: boolean },
166
+ cancellation?: AbortSignal,
167
+ ): Promise<GitCommit | undefined> {
168
+ const scope = getScopedLogger();
169
+
170
+ const [relativePath, root] = splitPath(toFsPath(pathOrUri), repoPath);
171
+
172
+ try {
173
+ const log = await this.getLogForPath(root, relativePath, rev, { limit: 1 }, cancellation);
174
+ if (log == null) return undefined;
175
+
176
+ let commit;
177
+ if (rev) {
178
+ commit = log.commits.get(rev);
179
+ if (commit == null && !options?.firstIfNotFound) {
180
+ // If the ref isn't a valid sha we will never find it, so let it fall through so we return the first
181
+ if (isSha(rev) || isUncommitted(rev)) return undefined;
182
+ }
183
+ }
184
+
185
+ return commit ?? first(log.commits.values());
186
+ } catch (ex) {
187
+ scope?.error(ex);
188
+ if (isCancellationError(ex)) throw ex;
189
+
190
+ return undefined;
191
+ }
192
+ }
193
+
194
+ @debug()
195
+ getCommitReachability(
196
+ repoPath: string,
197
+ rev: string,
198
+ cancellation?: AbortSignal,
199
+ ): Promise<GitCommitReachability | undefined> {
200
+ if (repoPath == null || isUncommitted(rev)) return Promise.resolve(undefined);
201
+
202
+ const scope = getScopedLogger();
203
+
204
+ const getCore = async (cacheable?: CacheController) => {
205
+ try {
206
+ // Use for-each-ref with %(HEAD) to mark current branch with *
207
+ const result = await this.git.exec(
208
+ { cwd: repoPath, cancellation: cancellation, errors: 'ignore' },
209
+ 'for-each-ref',
210
+ '--contains',
211
+ rev,
212
+ '--format=%(HEAD)%(refname)',
213
+ '--sort=-version:refname',
214
+ '--sort=-committerdate',
215
+ '--sort=-HEAD',
216
+ 'refs/heads/',
217
+ 'refs/remotes/',
218
+ 'refs/tags/',
219
+ );
220
+ if (cancellation?.aborted) throw new CancellationError();
221
+
222
+ const refs: GitCommitReachability['refs'] = [];
223
+
224
+ // Parse branches from refs/heads/ and refs/remotes/
225
+ if (result?.stdout) {
226
+ const lines = result.stdout.split('\n');
227
+
228
+ for (let line of lines) {
229
+ line = line.trim();
230
+ if (!line) continue;
231
+
232
+ // %(HEAD) outputs '*' for current branch, ' ' for others
233
+ const isCurrent = line.startsWith('*');
234
+ const refname = isCurrent ? line.substring(1) : line; // Skip the HEAD marker
235
+
236
+ // Skip HEADs
237
+ if (refname.endsWith('/HEAD')) continue;
238
+
239
+ if (refname.startsWith('refs/heads/')) {
240
+ // Remove 'refs/heads/'
241
+ const name = refname.substring(11);
242
+ refs.push({
243
+ refType: 'branch',
244
+ name: name,
245
+ remote: false,
246
+ current: isCurrent,
247
+ });
248
+ } else if (refname.startsWith('refs/remotes/')) {
249
+ // Remove 'refs/remotes/'
250
+ refs.push({ refType: 'branch', name: refname.substring(13), remote: true });
251
+ } else if (refname.startsWith('refs/tags/')) {
252
+ // Remove 'refs/tags/'
253
+ refs.push({ refType: 'tag', name: refname.substring(10) });
254
+ }
255
+ }
256
+ }
257
+
258
+ // Sort to move tags to the end, preserving order within each type
259
+ refs.sort((a, b) => (a.refType !== b.refType ? (a.refType === 'tag' ? 1 : -1) : 0));
260
+
261
+ return { refs: refs };
262
+ } catch (ex) {
263
+ cacheable?.invalidate();
264
+ debugger;
265
+ if (isCancellationError(ex)) throw ex;
266
+
267
+ scope?.error(ex);
268
+
269
+ return undefined;
270
+ }
271
+ };
272
+
273
+ return this.cache.reachability.getOrCreate(repoPath, rev, getCore);
274
+ }
275
+
276
+ @debug()
277
+ async getIncomingActivity(
278
+ repoPath: string,
279
+ options?: IncomingActivityOptions,
280
+ cancellation?: AbortSignal,
281
+ ): Promise<GitReflog | undefined> {
282
+ const scope = getScopedLogger();
283
+
284
+ const cfg = this.context.config;
285
+ const parser = getReflogParser();
286
+ const args = ['--walk-reflogs', ...parser.arguments, '--date=iso8601'];
287
+
288
+ const ordering = options?.ordering ?? cfg?.commits.ordering;
289
+ if (ordering) {
290
+ args.push(`--${ordering}-order`);
291
+ }
292
+
293
+ if (options?.all) {
294
+ args.push('--all');
295
+ }
296
+
297
+ // Pass a much larger limit to reflog, because we aggregate the data and we won't know how many lines we'll need
298
+ const limit = (options?.limit ?? cfg?.commits.maxItems ?? 0) * 100;
299
+ if (limit) {
300
+ args.push(`-n${limit}`);
301
+ }
302
+
303
+ if (options?.skip) {
304
+ args.push(`--skip=${options.skip}`);
305
+ }
306
+
307
+ try {
308
+ const result = await this.git.exec(
309
+ { cwd: repoPath, cancellation: cancellation, configs: gitConfigsLog },
310
+ 'log',
311
+ ...args,
312
+ );
313
+
314
+ const reflog = parseGitRefLog(parser, result.stdout, repoPath, reflogCommands, limit, limit * 100);
315
+ if (reflog?.hasMore) {
316
+ reflog.more = this.getReflogMoreFn(reflog, options);
317
+ }
318
+
319
+ return reflog;
320
+ } catch (ex) {
321
+ scope?.error(ex);
322
+ if (isCancellationError(ex)) throw ex;
323
+
324
+ return undefined;
325
+ }
326
+ }
327
+
328
+ private getReflogMoreFn(
329
+ reflog: GitReflog,
330
+ options?: IncomingActivityOptions,
331
+ ): (limit: number) => Promise<GitReflog> {
332
+ return async (limit: number | undefined) => {
333
+ limit = limit ?? 0;
334
+
335
+ const moreLog = await this.getIncomingActivity(reflog.repoPath, {
336
+ ...options,
337
+ limit: limit,
338
+ skip: reflog.total,
339
+ });
340
+ if (moreLog == null) {
341
+ // If we can't find any more, assume we have everything
342
+ return { ...reflog, hasMore: false, more: undefined };
343
+ }
344
+
345
+ const mergedLog: GitReflog = {
346
+ repoPath: reflog.repoPath,
347
+ records: [...reflog.records, ...moreLog.records],
348
+ count: reflog.count + moreLog.count,
349
+ total: reflog.total + moreLog.total,
350
+ limit: (reflog.limit ?? 0) + limit,
351
+ hasMore: moreLog.hasMore,
352
+ };
353
+ if (mergedLog.hasMore) {
354
+ mergedLog.more = this.getReflogMoreFn(mergedLog, options);
355
+ }
356
+
357
+ return mergedLog;
358
+ };
359
+ }
360
+
361
+ @debug({ exit: true })
362
+ getInitialCommitSha(repoPath: string, cancellation?: AbortSignal): Promise<string | undefined> {
363
+ // Initial commit SHA is shared across all worktrees
364
+ return this.cache.getInitialCommitSha(repoPath, async commonPath => {
365
+ try {
366
+ const result = await this.git.exec(
367
+ { cwd: commonPath, cancellation: cancellation, errors: 'ignore' },
368
+ 'rev-list',
369
+ `--max-parents=0`,
370
+ 'HEAD',
371
+ '--',
372
+ );
373
+ if (result.cancelled || cancellation?.aborted) {
374
+ throw new CancellationError();
375
+ }
376
+
377
+ return result.stdout.trim().split('\n')?.[0];
378
+ } catch (ex) {
379
+ if (isCancellationError(ex)) throw ex;
380
+
381
+ return undefined;
382
+ }
383
+ });
384
+ }
385
+
386
+ @debug()
387
+ async getLeftRightCommitCount(
388
+ repoPath: string,
389
+ range: GitRevisionRange,
390
+ options?: { authors?: GitUser[]; excludeMerges?: boolean },
391
+ cancellation?: AbortSignal,
392
+ ): Promise<LeftRightCommitCountResult | undefined> {
393
+ const authors = options?.authors?.length
394
+ ? options.authors.map(a => `--author=^${escapeRegex(a.name ?? '')} <${escapeRegex(a.email ?? '')}>$`)
395
+ : [];
396
+
397
+ const run = async (): Promise<LeftRightCommitCountResult | undefined> => {
398
+ const result = await this.git.exec(
399
+ { cwd: repoPath, cancellation: cancellation, errors: 'ignore' },
400
+ 'rev-list',
401
+ '--left-right',
402
+ '--count',
403
+ ...authors,
404
+ options?.excludeMerges ? '--no-merges' : undefined,
405
+ range,
406
+ '--',
407
+ );
408
+ if (result.cancelled || cancellation?.aborted) {
409
+ throw new CancellationError();
410
+ }
411
+ if (!result.stdout) return undefined;
412
+
413
+ const parts = result.stdout.split('\t');
414
+ if (parts.length !== 2) return undefined;
415
+
416
+ const [left, right] = parts;
417
+ const counts = {
418
+ left: parseInt(left, 10),
419
+ right: parseInt(right, 10),
420
+ };
421
+
422
+ if (isNaN(counts.left) || isNaN(counts.right)) return undefined;
423
+
424
+ return counts;
425
+ };
426
+
427
+ // Author-filtered calls are one-off (e.g. "who made these commits") with low re-hit
428
+ // rate; skip the cache to protect its capacity for the hot no-author merge-target path.
429
+ if (authors.length > 0) return run();
430
+
431
+ // Cache key: range + excludeMerges. RepositoryChange events affecting branches/remotes
432
+ // invalidate this cache via clearCaches('branches').
433
+ const cacheKey = `${range}\x1f${options?.excludeMerges ? 'no-merges' : ''}`;
434
+ return this.cache.getLeftRightCommitCount(repoPath, cacheKey, run);
435
+ }
436
+
437
+ @debug()
438
+ async getLog(
439
+ repoPath: string,
440
+ rev?: string | undefined,
441
+ options?: GitLogOptions,
442
+ cancellation?: AbortSignal,
443
+ ): Promise<GitLog | undefined> {
444
+ return this.getLogCore(repoPath, rev, options, cancellation);
445
+ }
446
+
447
+ @trace({ args: (repoPath, rev) => ({ repoPath: repoPath, rev: rev }), exit: true })
448
+ private async getLogCore(
449
+ repoPath: string,
450
+ rev?: string | undefined,
451
+ options?: GitLogOptions & {
452
+ path?: { pathspec: string; filters?: GitDiffFilter[]; range?: DiffRange; renames?: boolean };
453
+ },
454
+ cancellation?: AbortSignal,
455
+ additionalArgs?: string[],
456
+ ): Promise<GitLog | undefined> {
457
+ const scope = getScopedLogger();
458
+
459
+ try {
460
+ const currentUserPromise = this.provider.config.getCurrentUser(repoPath);
461
+
462
+ const cfg = this.context.config;
463
+ const limit = options?.limit ?? cfg?.commits.maxItems ?? 0;
464
+ const isSingleCommit = limit === 1;
465
+
466
+ const cfgIncludeFiles = options?.includeFiles ?? cfg?.commits.includeFileDetails ?? true;
467
+ const includeFiles = cfgIncludeFiles || isSingleCommit || Boolean(options?.path?.pathspec);
468
+
469
+ const parser = getCommitsLogParser(includeFiles, Boolean(options?.path?.pathspec && options?.path?.range));
470
+ const args = ['log', ...parser.arguments];
471
+
472
+ const similarityThreshold = options?.similarityThreshold ?? cfg?.commits.similarityThreshold;
473
+ args.push(`-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`, '--use-mailmap');
474
+
475
+ if (options?.all) {
476
+ args.push('--all');
477
+ if (options?.path?.pathspec) {
478
+ args.push('--single-worktree');
479
+ }
480
+ }
481
+
482
+ const merges = options?.merges ?? true;
483
+ if (merges) {
484
+ // If we are are asking for a specific ref, ensure we return the merge commit files
485
+ if (isSingleCommit) {
486
+ args.push('-m');
487
+ }
488
+ args.push(merges === 'first-parent' ? '--first-parent' : '--no-min-parents');
489
+ } else {
490
+ args.push('--no-merges');
491
+ }
492
+
493
+ const ordering = options?.ordering ?? cfg?.commits.ordering;
494
+ if (ordering) {
495
+ args.push(`--${ordering}-order`);
496
+ }
497
+
498
+ if (options?.authors?.length) {
499
+ args.push(
500
+ ...options.authors.map(
501
+ a => `--author=^${escapeRegex(a.name ?? '')} <${escapeRegex(a.email ?? '')}>$`,
502
+ ),
503
+ );
504
+ }
505
+
506
+ let overrideHasMore;
507
+
508
+ if (options?.since) {
509
+ overrideHasMore = true;
510
+ args.push(`--since="${options.since}"`);
511
+ }
512
+
513
+ if (options?.until) {
514
+ overrideHasMore = true;
515
+ args.push(`--until="${options.until}"`);
516
+ }
517
+
518
+ if (additionalArgs?.length) {
519
+ args.push(...additionalArgs);
520
+ }
521
+
522
+ if (limit > 0) {
523
+ overrideHasMore = isSingleCommit ? false : undefined;
524
+ // Add 1 to the limit so we can check if there are more commits
525
+ args.push(`-n${isSingleCommit ? 1 : limit + 1}`);
526
+ }
527
+
528
+ let stashes: Map<string, GitStashCommit> | undefined;
529
+ let stdin: string | undefined;
530
+
531
+ if (!isSingleCommit) {
532
+ if (options?.stashes) {
533
+ // There *HAS* to be a better way to get git log to return stashes, but this is the best we've found
534
+ ({ stdin, stashes } = convertStashesToStdin(
535
+ typeof options.stashes === 'boolean'
536
+ ? await this.provider.stash?.getStash(repoPath, { reachableFrom: rev }, cancellation)
537
+ : options.stashes,
538
+ ));
539
+ if (stashes.size) {
540
+ rev ??= 'HEAD';
541
+ }
542
+ }
543
+
544
+ if (stdin) {
545
+ args.push('--stdin');
546
+ }
547
+ }
548
+
549
+ if (rev && !isUncommittedStaged(rev)) {
550
+ args.push(rev);
551
+ }
552
+
553
+ let pathspec: string | undefined;
554
+ let pathspecRange: `${number},${number}` | undefined;
555
+
556
+ if (options?.path?.pathspec) {
557
+ pathspec = options.path.pathspec;
558
+ const { filters, range, renames } = options.path;
559
+
560
+ if (filters?.length) {
561
+ args.push(`--diff-filter=${filters.join('')}`);
562
+ }
563
+
564
+ if (range != null) {
565
+ // Git doesn't allow rename detection (`--follow`) if a range is used
566
+
567
+ const [start, end] = getGitStartEnd(range);
568
+ pathspecRange = `${start},${end}`;
569
+ args.push(`-L ${pathspecRange}:${pathspec}`, '--');
570
+ } else {
571
+ if (renames !== false) {
572
+ args.push('--follow');
573
+ }
574
+ args.push('--', pathspec);
575
+ }
576
+ } else {
577
+ args.push('--');
578
+ }
579
+
580
+ const currentUser = await currentUserPromise.catch(() => undefined);
581
+ if (cancellation?.aborted) throw new CancellationError();
582
+
583
+ const cmdOpts: GitExecOptions = {
584
+ cwd: repoPath,
585
+ cancellation: cancellation,
586
+ configs: gitConfigsLogWithFiles,
587
+ stdin: stdin,
588
+ };
589
+ let { commits, count, countStashChildCommits } = await parseCommits(
590
+ parser,
591
+ isSingleCommit ? this.git.exec(cmdOpts, ...args) : this.git.stream(cmdOpts, ...args),
592
+ repoPath,
593
+ pathspec,
594
+ limit,
595
+ stashes,
596
+ currentUser,
597
+ );
598
+
599
+ // If we didn't find any history from the working tree, check to see if the file was renamed
600
+ if (rev == null && pathspec && !commits.size) {
601
+ const status = await this.provider.status?.getStatusForFile?.(
602
+ repoPath,
603
+ pathspec,
604
+ undefined,
605
+ cancellation,
606
+ );
607
+ if (status?.originalPath != null) {
608
+ pathspec = status.originalPath;
609
+
610
+ if (pathspecRange) {
611
+ const index = args.findIndex(a => a.startsWith('-L '));
612
+ args.splice(index, 1, `-L ${pathspecRange}:${pathspec}`);
613
+ } else {
614
+ args.splice(args.length - 1, 1, pathspec);
615
+ }
616
+
617
+ ({ commits, count, countStashChildCommits } = await parseCommits(
618
+ parser,
619
+ isSingleCommit ? this.git.exec(cmdOpts, ...args) : this.git.stream(cmdOpts, ...args),
620
+ repoPath,
621
+ pathspec,
622
+ limit,
623
+ stashes,
624
+ currentUser,
625
+ ));
626
+ }
627
+ }
628
+
629
+ const log: GitLog = {
630
+ repoPath: repoPath,
631
+ commits: commits,
632
+ sha: isRevisionRange(rev) ? undefined : rev,
633
+ count: commits.size,
634
+ limit: limit,
635
+ hasMore: overrideHasMore ?? count - countStashChildCommits > commits.size,
636
+ };
637
+
638
+ if (!isSingleCommit) {
639
+ log.query = (limit: number | undefined) =>
640
+ this.getLogCore(repoPath, rev, { ...options, limit: limit }, undefined, additionalArgs);
641
+ if (log.hasMore) {
642
+ log.more = this.getLogCoreMoreFn(log, rev, options);
643
+ }
644
+ }
645
+
646
+ return log;
647
+ } catch (ex) {
648
+ if (isCancellationError(ex)) throw ex;
649
+
650
+ // Check if this is a "bad object" error due to a submodule's internal SHA
651
+ const pathspec = options?.path?.pathspec;
652
+ if (rev && pathspec && ex instanceof Error && GitErrors.badObject.test(ex.message)) {
653
+ const tree = await this.provider.revision.getTreeEntryForRevision(repoPath, pathspec, 'HEAD');
654
+ if (tree?.type === 'commit') {
655
+ // It's a submodule - retry without the rev and without rename tracking
656
+ return this.getLogCore(
657
+ repoPath,
658
+ undefined,
659
+ { ...options, path: { ...options.path, pathspec: pathspec, renames: false } },
660
+ cancellation,
661
+ additionalArgs,
662
+ );
663
+ }
664
+ }
665
+
666
+ scope?.error(ex);
667
+ debugger;
668
+
669
+ return undefined;
670
+ }
671
+ }
672
+
673
+ private getLogCoreMoreFn(
674
+ log: GitLog,
675
+ rev: string | undefined,
676
+ options?: GitLogOptions & {
677
+ path?: { pathspec: string; filters?: GitDiffFilter[]; range?: DiffRange; renames?: boolean };
678
+ },
679
+ ): (limit: number | { until: string } | undefined) => Promise<GitLog> {
680
+ return async (limit: number | { until: string } | undefined) => {
681
+ const moreUntil = limit != null && typeof limit === 'object' ? limit.until : undefined;
682
+ let moreLimit = typeof limit === 'number' ? limit : undefined;
683
+
684
+ if (moreUntil && some(log.commits.values(), c => c.ref === moreUntil)) {
685
+ return log;
686
+ }
687
+
688
+ moreLimit = moreLimit ?? 0;
689
+
690
+ // If the log is for a range, then just get everything prior + more
691
+ if (isRevisionRange(log.sha)) {
692
+ const moreLog = await this.getLogCore(log.repoPath, rev, {
693
+ ...options,
694
+ limit: moreLimit === 0 ? 0 : (options?.limit ?? 0) + moreLimit,
695
+ });
696
+ // If we can't find any more, assume we have everything
697
+ if (moreLog == null) return { ...log, hasMore: false, more: undefined };
698
+
699
+ return moreLog;
700
+ }
701
+
702
+ // Stashes are not part of the normal commit history, so we need to find the last non-stash commit for the cursor
703
+ const lastCommit = findLast(log.commits.values(), c => !GitCommit.isStash(c)) ?? last(log.commits.values());
704
+ const sha = lastCommit?.ref;
705
+
706
+ // Check to make sure the filename hasn't changed and if it has use the previous
707
+ const lastCommitFile = lastCommit?.anyFiles?.[0];
708
+ if (options?.path?.pathspec && lastCommitFile != null) {
709
+ const path = lastCommitFile.originalPath ?? lastCommitFile.path;
710
+ if (path !== options.path.pathspec) {
711
+ options = { ...options, path: { ...options.path, pathspec: path } };
712
+ }
713
+ }
714
+
715
+ // If we were asked for all refs, use the last commit timestamp (plus a second) as a cursor
716
+ let timestamp: number | undefined;
717
+ if (options?.all) {
718
+ const date = lastCommit?.committer.date;
719
+ // Git only allows 1-second precision, so round up to the nearest second
720
+ timestamp = date != null ? Math.ceil(date.getTime() / 1000) + 1 : undefined;
721
+ }
722
+
723
+ let moreLogCount;
724
+ let queryLimit = moreUntil == null ? moreLimit : 0;
725
+ do {
726
+ const moreLog = await this.getLogCore(
727
+ log.repoPath,
728
+ timestamp ? rev : moreUntil == null ? `${sha}^` : `${moreUntil}^..${sha}^`,
729
+ {
730
+ ...options,
731
+ limit: queryLimit,
732
+ ...(timestamp ? { until: timestamp } : undefined),
733
+ },
734
+ undefined,
735
+ timestamp ? ['--boundary'] : undefined,
736
+ );
737
+ // If we can't find any more, assume we have everything
738
+ if (moreLog == null) return { ...log, hasMore: false, more: undefined };
739
+
740
+ const currentCount = log.commits.size;
741
+ const commits = new Map([...log.commits, ...moreLog.commits]);
742
+
743
+ if (currentCount === commits.size && queryLimit !== 0) {
744
+ // If we didn't find any new commits, we must have them all so return that we have everything
745
+ if (moreLogCount === moreLog.commits.size) {
746
+ return { ...log, hasMore: false, more: undefined };
747
+ }
748
+
749
+ moreLogCount = moreLog.commits.size;
750
+ queryLimit = queryLimit * 2;
751
+ continue;
752
+ }
753
+
754
+ if (timestamp != null && sha != null && !moreLog.commits.has(sha)) {
755
+ debugger;
756
+ }
757
+
758
+ const mergedLog: GitLog = {
759
+ repoPath: log.repoPath,
760
+ commits: commits,
761
+ sha: log.sha,
762
+ count: commits.size,
763
+ limit: moreUntil == null ? (log.limit ?? 0) + moreLimit : undefined,
764
+ hasMore: moreUntil == null ? moreLog.hasMore : true,
765
+ // The oldest commit SHA of the previous page — the graph webview compares this
766
+ // against its last displayed row to determine the merge point for appending new rows
767
+ startingCursor: sha,
768
+ endingCursor: moreLog.endingCursor,
769
+ pagedCommits: () => {
770
+ // Remove any duplicates
771
+ for (const sha of log.commits.keys()) {
772
+ moreLog.commits.delete(sha);
773
+ }
774
+ return moreLog.commits;
775
+ },
776
+ // eslint-disable-next-line no-loop-func
777
+ query: (limit: number | undefined) =>
778
+ this.getLogCore(log.repoPath, rev, { ...options, limit: limit }),
779
+ };
780
+ if (mergedLog.hasMore) {
781
+ mergedLog.more = this.getLogCoreMoreFn(mergedLog, rev, options);
782
+ }
783
+
784
+ return mergedLog;
785
+ } while (true);
786
+ };
787
+ }
788
+
789
+ @debug()
790
+ async getLogForPath(
791
+ repoPath: string | undefined,
792
+ pathOrUri: string | Uri,
793
+ rev?: string | undefined,
794
+ options?: GitLogForPathOptions,
795
+ cancellation?: AbortSignal,
796
+ ): Promise<GitLog | undefined> {
797
+ if (repoPath == null) return undefined;
798
+
799
+ const scope = getScopedLogger();
800
+
801
+ let relativePath = this.provider.getRelativePath(pathOrUri, repoPath);
802
+
803
+ if (repoPath != null && repoPath === relativePath) {
804
+ throw new Error(`Path cannot match the repository path; path=${relativePath}`);
805
+ }
806
+
807
+ const cfg = this.context.config;
808
+ options = {
809
+ ...options,
810
+ all: options?.all ?? cfg?.fileHistory?.showAllBranches,
811
+ limit: options?.limit ?? cfg?.commits.maxItems ?? 0,
812
+ merges: options?.merges ?? cfg?.fileHistory?.showMergeCommits,
813
+ ordering: options?.ordering ?? cfg?.commits.ordering ?? undefined,
814
+ renames: options?.renames ?? cfg?.fileHistory?.followRenames,
815
+ similarityThreshold: options?.similarityThreshold ?? cfg?.commits.similarityThreshold,
816
+ };
817
+
818
+ if (isFolderGlob(relativePath)) {
819
+ relativePath = stripFolderGlob(relativePath);
820
+ options.isFolder = true;
821
+ } else if (options.isFolder == null) {
822
+ const tree = await this.provider.revision.getTreeEntryForRevision(repoPath, relativePath, rev || 'HEAD');
823
+ if (cancellation?.aborted) throw new CancellationError();
824
+
825
+ if (tree?.type === 'commit') {
826
+ // It's a submodule — line ranges and rename tracking don't apply, and the rev may reference
827
+ // the submodule's internal SHA which isn't valid in the parent repo
828
+ options.range = undefined;
829
+ options.renames = false;
830
+ // rev = undefined;
831
+ } else {
832
+ options.isFolder = tree?.type === 'tree';
833
+ }
834
+ }
835
+
836
+ // Build cache key — only for non-folder, non-filtered queries
837
+ let cacheKey: string | undefined;
838
+ if (
839
+ !options.isFolder &&
840
+ options.authors == null &&
841
+ options.cursor == null &&
842
+ options.filters == null &&
843
+ options.range == null &&
844
+ options.since == null &&
845
+ options.until == null
846
+ ) {
847
+ let suffix = 'log';
848
+ if (rev != null) {
849
+ suffix += `:${rev}`;
850
+ }
851
+ if (options.all) {
852
+ suffix += ':all';
853
+ }
854
+ if (options.limit) {
855
+ suffix += `:n${options.limit}`;
856
+ }
857
+ if (options.merges) {
858
+ suffix += `:merges=${options.merges}`;
859
+ }
860
+ if (options.ordering) {
861
+ suffix += `:ordering=${options.ordering}`;
862
+ }
863
+ if (options.renames) {
864
+ suffix += ':follow';
865
+ }
866
+ cacheKey = `${normalizePath(relativePath)}:${suffix}`;
867
+ }
868
+
869
+ if (cacheKey != null) {
870
+ // Check for exact cache hit
871
+ const cached = this.cache.fileLog.get(repoPath, cacheKey);
872
+ if (cached != null) {
873
+ scope?.trace(`Cache hit: '${cacheKey}'`);
874
+ return cached;
875
+ }
876
+
877
+ // Subset optimization: if requesting partial log, check if whole-file log is cached
878
+ if (rev != null || (options.limit != null && options.limit !== 0)) {
879
+ const baseKey = `${normalizePath(relativePath)}:log${options.renames ? ':follow' : ''}`;
880
+ const baseLog = this.cache.fileLog.get(repoPath, baseKey);
881
+ if (baseLog != null) {
882
+ if (rev == null) {
883
+ scope?.trace(`Cache hit: ~'${cacheKey}'`);
884
+ return baseLog;
885
+ }
886
+
887
+ scope?.trace(`Cache ?: '${cacheKey}'`);
888
+ const log = await baseLog;
889
+ if (log != null && !log.hasMore && log.commits.has(rev)) {
890
+ scope?.trace(`Cache hit: '${cacheKey}'`);
891
+
892
+ // Create a copy of the log starting at the requested commit
893
+ let skip = true;
894
+ let i = 0;
895
+ const limit = options.limit;
896
+ const commits = new Map(
897
+ filterMap<[string, GitCommit], [string, GitCommit]>(log.commits.entries(), ([sha, c]) => {
898
+ if (skip) {
899
+ if (sha !== rev) return undefined;
900
+ skip = false;
901
+ }
902
+
903
+ i++;
904
+ if (limit != null && i > limit) {
905
+ return undefined;
906
+ }
907
+
908
+ return [sha, c];
909
+ }),
910
+ );
911
+
912
+ const optsCopy = { ...options };
913
+ return {
914
+ ...log,
915
+ limit: optsCopy.limit,
916
+ count: commits.size,
917
+ commits: commits,
918
+ query: (limit: number | undefined) =>
919
+ this.getLogForPath(repoPath, pathOrUri, rev, {
920
+ ...optsCopy,
921
+ limit: limit,
922
+ }),
923
+ };
924
+ }
925
+ }
926
+ }
927
+
928
+ scope?.trace(`Cache miss: '${cacheKey}'`);
929
+
930
+ return this.cache.fileLog.getOrCreate(
931
+ repoPath,
932
+ cacheKey,
933
+ (_cacheable, signal) => this.getLogForPathCore(repoPath, relativePath, rev, options, signal),
934
+ { cancellation: cancellation },
935
+ );
936
+ }
937
+
938
+ return this.getLogForPathCore(repoPath, relativePath, rev, options, cancellation);
939
+ }
940
+
941
+ private async getLogForPathCore(
942
+ repoPath: string,
943
+ path: string,
944
+ rev: string | undefined,
945
+ options: GitLogForPathOptions,
946
+ cancellation?: AbortSignal,
947
+ ): Promise<GitLog | undefined> {
948
+ const scope = getScopedLogger();
949
+
950
+ const tracked = await this.provider.isTrackedWithDetails(path, repoPath, rev);
951
+ if (cancellation?.aborted) throw new CancellationError();
952
+
953
+ if (tracked == null) {
954
+ scope?.debug(`Skipping log; '${path}' is not tracked`);
955
+ return emptyPromise as Promise<GitLog>;
956
+ }
957
+
958
+ const relativePath = tracked.path;
959
+ const root = repoPath;
960
+
961
+ const log = await this.getLogCore(
962
+ root,
963
+ rev,
964
+ {
965
+ all: options.all,
966
+ authors: options.authors,
967
+ cursor: options.cursor,
968
+ limit: options.limit,
969
+ merges: options.merges,
970
+ ordering: options.ordering,
971
+ since: options.since,
972
+ until: options.until,
973
+ path: {
974
+ pathspec: relativePath,
975
+ filters: options.filters,
976
+ range: options.range,
977
+ renames: options.renames,
978
+ },
979
+ },
980
+ cancellation,
981
+ );
982
+
983
+ return log;
984
+ }
985
+
986
+ @debug()
987
+ async getLogShas(
988
+ repoPath: string,
989
+ rev?: string | undefined,
990
+ options?: GitLogShasOptions,
991
+ cancellation?: AbortSignal,
992
+ ): Promise<Iterable<string>> {
993
+ const scope = getScopedLogger();
994
+
995
+ const cfg = this.context.config;
996
+ options ??= {};
997
+ options.limit ??= cfg?.commits.maxItems ?? 0;
998
+ options.ordering ??= cfg?.commits.ordering ?? undefined;
999
+ options.similarityThreshold ??= cfg?.commits.similarityThreshold;
1000
+ options.merges ??= true;
1001
+
1002
+ const getCore = async (): Promise<string[]> => {
1003
+ try {
1004
+ const parser = getShaLogParser();
1005
+ const args = [...parser.arguments];
1006
+
1007
+ if (options.all) {
1008
+ args.push(`--all`);
1009
+ }
1010
+
1011
+ if (options.ordering) {
1012
+ args.push(`--${options.ordering}-order`);
1013
+ }
1014
+
1015
+ if (options.limit) {
1016
+ args.push(`-n${options.limit}`);
1017
+ }
1018
+
1019
+ if (options.since) {
1020
+ args.push(`--since="${options.since}"`);
1021
+ }
1022
+
1023
+ if (options.merges) {
1024
+ args.push(options.merges === 'first-parent' ? '--first-parent' : '--no-min-parents');
1025
+ } else {
1026
+ args.push('--no-merges');
1027
+ }
1028
+
1029
+ if (options.reverse) {
1030
+ args.push('--reverse');
1031
+ }
1032
+
1033
+ if (options.authors?.length) {
1034
+ if (!args.includes('--use-mailmap')) {
1035
+ args.push('--use-mailmap');
1036
+ }
1037
+ args.push(
1038
+ ...options.authors.map(
1039
+ a => `--author=^${escapeRegex(a.name ?? '')} <${escapeRegex(a.email ?? '')}>$`,
1040
+ ),
1041
+ );
1042
+ }
1043
+
1044
+ const pathspec =
1045
+ options.pathOrUri != null ? this.provider.getRelativePath(options.pathOrUri, repoPath) : undefined;
1046
+ if (pathspec) {
1047
+ const similarityThreshold = options.similarityThreshold;
1048
+ args.push(`-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`);
1049
+ }
1050
+
1051
+ if (rev && !isUncommittedStaged(rev)) {
1052
+ args.push(rev);
1053
+ }
1054
+
1055
+ args.push('--');
1056
+
1057
+ if (pathspec) {
1058
+ args.push(pathspec);
1059
+ }
1060
+
1061
+ const result = await this.git.exec(
1062
+ { cwd: repoPath, cancellation: cancellation, configs: gitConfigsLog },
1063
+ 'log',
1064
+ ...args,
1065
+ );
1066
+ return [...parser.parse(result.stdout)];
1067
+ } catch (ex) {
1068
+ scope?.error(ex);
1069
+ if (isCancellationError(ex)) throw ex;
1070
+ debugger;
1071
+
1072
+ return [];
1073
+ }
1074
+ };
1075
+
1076
+ // Cache simple queries (no pathspec, no authors) as these are on hot paths (e.g. getting unpublished commits)
1077
+ const cacheable = !options.pathOrUri && !options.authors?.length && !options.reverse && !options.all;
1078
+
1079
+ if (cacheable) {
1080
+ return this.cache.logShas.getOrCreate(
1081
+ repoPath,
1082
+ `${rev ?? ''}:${options.ordering ?? ''}:${options.limit}:${options.merges}:${options.since ?? ''}`,
1083
+ () => getCore(),
1084
+ );
1085
+ }
1086
+
1087
+ return getCore();
1088
+ }
1089
+
1090
+ @debug()
1091
+ async getOldestUnpushedShaForPath(
1092
+ repoPath: string,
1093
+ pathOrUri: string | Uri,
1094
+ cancellation?: AbortSignal,
1095
+ ): Promise<string | undefined> {
1096
+ const scope = getScopedLogger();
1097
+
1098
+ try {
1099
+ const relativePath = this.provider.getRelativePath(pathOrUri, repoPath);
1100
+
1101
+ const parser = getShaLogParser();
1102
+
1103
+ const result = await this.git.exec(
1104
+ { cwd: repoPath, cancellation: cancellation, configs: gitConfigsLog },
1105
+ 'log',
1106
+ ...parser.arguments,
1107
+ '--follow',
1108
+ '--reverse',
1109
+ '@{u}..',
1110
+ '--',
1111
+ relativePath,
1112
+ );
1113
+ return first(parser.parse(result.stdout));
1114
+ } catch (ex) {
1115
+ scope?.error(ex);
1116
+ if (isCancellationError(ex)) throw ex;
1117
+ debugger;
1118
+
1119
+ return undefined;
1120
+ }
1121
+ }
1122
+
1123
+ @debug()
1124
+ async hasCommitBeenPushed(repoPath: string, rev: string, cancellation?: AbortSignal): Promise<boolean> {
1125
+ if (repoPath == null) return false;
1126
+
1127
+ return this.isAncestorOf(repoPath, rev, '@{u}', cancellation);
1128
+ }
1129
+
1130
+ @debug()
1131
+ async isAncestorOf(repoPath: string, rev1: string, rev2: string, cancellation?: AbortSignal): Promise<boolean> {
1132
+ if (repoPath == null) return false;
1133
+
1134
+ const result = await this.git.exec(
1135
+ { cwd: repoPath, cancellation: cancellation, errors: 'ignore' },
1136
+ 'merge-base',
1137
+ '--is-ancestor',
1138
+ rev1,
1139
+ rev2,
1140
+ );
1141
+ return result.exitCode === 0;
1142
+ }
1143
+
1144
+ @debug({
1145
+ args: (repoPath, s) => ({
1146
+ repoPath: repoPath,
1147
+ search: `[${s.matchAll ? 'A' : ''}${s.matchCase ? 'C' : ''}${s.matchRegex ? 'R' : ''}${
1148
+ s.matchWholeWord ? 'W' : ''
1149
+ }]: ${s.query.length > 500 ? `${s.query.substring(0, 500)}...` : s.query}`,
1150
+ }),
1151
+ })
1152
+ async searchCommits(
1153
+ repoPath: string,
1154
+ search: SearchQuery,
1155
+ options?: GitSearchCommitsOptions,
1156
+ cancellation?: AbortSignal,
1157
+ ): Promise<SearchCommitsResult> {
1158
+ const scope = getScopedLogger();
1159
+
1160
+ search = { matchAll: false, matchCase: false, matchRegex: true, matchWholeWord: false, ...search };
1161
+
1162
+ // Pre-process natural language search queries via the host-provided hook
1163
+ if (
1164
+ search.naturalLanguage &&
1165
+ (typeof search.naturalLanguage !== 'object' || !search.naturalLanguage.processedQuery)
1166
+ ) {
1167
+ search = (await this.context.searchQuery?.preprocessQuery?.(search, options?.source)) ?? search;
1168
+ }
1169
+
1170
+ try {
1171
+ const cfg = this.context.config;
1172
+ const currentUser = await this.provider.config.getCurrentUser(repoPath);
1173
+ if (cancellation?.aborted) throw new CancellationError();
1174
+
1175
+ const parser = getCommitsLogParser(true);
1176
+
1177
+ const similarityThreshold = options?.similarityThreshold ?? cfg?.commits.similarityThreshold;
1178
+ const args = [
1179
+ 'log',
1180
+ ...parser.arguments,
1181
+ `-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`,
1182
+ '--use-mailmap',
1183
+ ];
1184
+
1185
+ const { args: searchArgs, files, shas, filters } = parseSearchQueryGitCommand(search, currentUser);
1186
+
1187
+ let stashes: Map<string, GitStashCommit> | undefined;
1188
+ let stdin: string | undefined;
1189
+
1190
+ if (shas?.size) {
1191
+ stdin = join(shas, '\n');
1192
+ args.push('--no-walk');
1193
+ } else if (!filters.refs) {
1194
+ // Don't include stashes when using ref: filter, as they would add unrelated commits
1195
+ // There *HAS* to be a better way to get git log to return stashes, but this is the best we've found
1196
+ ({ stdin, stashes } = convertStashesToStdin(
1197
+ await this.provider.stash?.getStash(repoPath, undefined, cancellation),
1198
+ ));
1199
+ }
1200
+
1201
+ if (stdin) {
1202
+ args.push('--stdin');
1203
+ }
1204
+
1205
+ const limit = options?.limit ?? cfg?.search?.maxItems ?? 0;
1206
+ if (limit && !shas?.size) {
1207
+ args.push(`-n${limit + 1}`);
1208
+ }
1209
+
1210
+ const ordering = options?.ordering ?? cfg?.commits.ordering;
1211
+ if (ordering) {
1212
+ args.push(`--${ordering}-order`);
1213
+ }
1214
+
1215
+ if (options?.skip) {
1216
+ args.push(`--skip=${options.skip}`);
1217
+ }
1218
+
1219
+ // Add the search args, but skip any shas (as they are already included in the stdin)
1220
+ for (const arg of searchArgs) {
1221
+ if (shas?.has(arg) || args.includes(arg)) continue;
1222
+
1223
+ args.push(arg);
1224
+ }
1225
+
1226
+ const pathspec = files?.join(' ');
1227
+ const { commits, count, countStashChildCommits } = await parseCommits(
1228
+ parser,
1229
+ this.git.stream(
1230
+ {
1231
+ cwd: repoPath,
1232
+ cancellation: cancellation,
1233
+ configs: ['-C', repoPath, ...gitConfigsLog],
1234
+ stdin: stdin,
1235
+ },
1236
+ ...args,
1237
+ '--',
1238
+ ...files,
1239
+ ),
1240
+ repoPath,
1241
+ pathspec,
1242
+ limit,
1243
+ stashes,
1244
+ currentUser,
1245
+ filters,
1246
+ );
1247
+
1248
+ const log: GitLog = {
1249
+ repoPath: repoPath,
1250
+ commits: commits,
1251
+ sha: undefined,
1252
+ searchFilters: filters,
1253
+ count: commits.size,
1254
+ limit: limit,
1255
+ hasMore: count - countStashChildCommits > commits.size,
1256
+ query: (limit: number | undefined) =>
1257
+ this.searchCommits(repoPath, search, { ...options, limit: limit }).then(r => r.log),
1258
+ };
1259
+
1260
+ if (log.hasMore) {
1261
+ const searchCommitsCore = (log: GitLog): ((limit: number | undefined) => Promise<GitLog>) => {
1262
+ return async (limit: number | undefined) => {
1263
+ limit = limit ?? 0;
1264
+
1265
+ const moreLog = (
1266
+ await this.searchCommits(log.repoPath, search, {
1267
+ ...options,
1268
+ limit: limit,
1269
+ skip: log.count,
1270
+ })
1271
+ ).log;
1272
+ // If we can't find any more, assume we have everything
1273
+ if (moreLog == null) return { ...log, hasMore: false, more: undefined };
1274
+
1275
+ const commits = new Map([...log.commits, ...moreLog.commits]);
1276
+
1277
+ const mergedLog: GitLog = {
1278
+ repoPath: log.repoPath,
1279
+ commits: commits,
1280
+ sha: log.sha,
1281
+ searchFilters: filters,
1282
+ count: commits.size,
1283
+ limit: (log.limit ?? 0) + limit,
1284
+ hasMore: moreLog.hasMore,
1285
+ query: (limit: number | undefined) =>
1286
+ this.searchCommits(log.repoPath, search, { ...options, limit: limit }).then(r => r.log),
1287
+ };
1288
+ if (mergedLog.hasMore) {
1289
+ mergedLog.more = searchCommitsCore(mergedLog);
1290
+ }
1291
+
1292
+ return mergedLog;
1293
+ };
1294
+ };
1295
+
1296
+ log.more = searchCommitsCore(log);
1297
+ }
1298
+
1299
+ return { search: search, log: log };
1300
+ } catch (ex) {
1301
+ scope?.error(ex);
1302
+ if (isCancellationError(ex)) throw ex;
1303
+
1304
+ return { search: search, log: undefined };
1305
+ }
1306
+ }
1307
+
1308
+ @debug()
1309
+ async getCommitSignature(repoPath: string, sha: string): Promise<CommitSignature | undefined> {
1310
+ const scope = getScopedLogger();
1311
+
1312
+ try {
1313
+ const result = await this.git.exec(
1314
+ {
1315
+ cwd: repoPath,
1316
+ errors: 'ignore',
1317
+ caching: { cache: this.cache.gitResults, options: { accessTTL: 60 * 1000 } },
1318
+ configs: gitConfigsLog,
1319
+ },
1320
+ 'log',
1321
+ `--format=${signatureFormat}`,
1322
+ '-1',
1323
+ sha,
1324
+ );
1325
+
1326
+ if (!result.stdout) return undefined;
1327
+
1328
+ return parseSignatureOutput(result.stdout);
1329
+ } catch (ex) {
1330
+ scope?.error(ex);
1331
+ return undefined;
1332
+ }
1333
+ }
1334
+
1335
+ @debug()
1336
+ async isCommitSigned(repoPath: string, sha: string): Promise<boolean> {
1337
+ const scope = getScopedLogger();
1338
+
1339
+ try {
1340
+ const result = await this.git.exec(
1341
+ {
1342
+ cwd: repoPath,
1343
+ errors: 'ignore',
1344
+ caching: { cache: this.cache.gitResults, options: { accessTTL: 60 * 1000 } },
1345
+ },
1346
+ 'cat-file',
1347
+ 'commit',
1348
+ sha,
1349
+ );
1350
+ return /^gpgsig(-sha256)? /m.test(result.stdout);
1351
+ } catch (ex) {
1352
+ scope?.error(ex);
1353
+ return false;
1354
+ }
1355
+ }
1356
+ }
1357
+
1358
+ function toCommit(c: ParsedCommit, repoPath: string, pathspec: string | undefined, currentUser: GitUser | undefined) {
1359
+ const message = c.message.trim();
1360
+ const index = message.indexOf('\n');
1361
+
1362
+ const isCurrentAuthor = isUserMatch(currentUser, c.author, c.authorEmail) || undefined;
1363
+ const isCurrentCommitter = isUserMatch(currentUser, c.committer, c.committerEmail) || undefined;
1364
+
1365
+ return new GitCommit(
1366
+ repoPath,
1367
+ c.sha,
1368
+ new GitCommitIdentity(
1369
+ c.author,
1370
+ c.authorEmail,
1371
+ new Date(Number(c.authorDate) * 1000),
1372
+ undefined,
1373
+ isCurrentAuthor,
1374
+ ),
1375
+ new GitCommitIdentity(
1376
+ c.committer,
1377
+ c.committerEmail,
1378
+ new Date(Number(c.committerDate) * 1000),
1379
+ undefined,
1380
+ isCurrentCommitter,
1381
+ ),
1382
+ index !== -1 ? message.substring(0, index) : message,
1383
+ c.parents?.split(' ') ?? [],
1384
+ message,
1385
+ createCommitFileset(c, repoPath, pathspec),
1386
+ c.stats,
1387
+ undefined,
1388
+ c.tips?.split(' '),
1389
+ );
1390
+ }
1391
+
1392
+ function getGitStartEnd(range: DiffRange): [number, number] {
1393
+ // Library DiffRange is always 1-based, startLine <= endLine
1394
+ return [range.startLine, range.endLine];
1395
+ }
1396
+
1397
+ async function parseCommits(
1398
+ parser: CommitsLogParser | CommitsWithFilesLogParser | CommitsInFileRangeLogParser,
1399
+ resultOrStream: Promise<GitResult> | AsyncGenerator<string>,
1400
+ repoPath: string,
1401
+ pathspec: string | undefined,
1402
+ limit: number | undefined,
1403
+ stashes: Map<string, GitStashCommit> | undefined,
1404
+ currentUser: GitUser | undefined,
1405
+ searchFilters?: SearchQueryFilters,
1406
+ ): Promise<{ commits: Map<string, GitCommit>; count: number; countStashChildCommits: number }> {
1407
+ let count = 0;
1408
+ let countStashChildCommits = 0;
1409
+ const commits = new Map<string, GitCommit>();
1410
+
1411
+ const tipsOnly = searchFilters?.type === 'tip';
1412
+
1413
+ if (resultOrStream instanceof Promise) {
1414
+ const scope = getScopedLogger();
1415
+ const result = await resultOrStream;
1416
+
1417
+ using sw = maybeStopWatch(scope, { log: { onlyExit: true, level: 'debug' } });
1418
+
1419
+ if (stashes?.size) {
1420
+ const allowFilteredFiles = searchFilters?.files ?? false;
1421
+ const stashesOnly = searchFilters?.type === 'stash';
1422
+
1423
+ for (const c of parser.parse(result.stdout)) {
1424
+ if (stashesOnly && !stashes?.has(c.sha)) continue;
1425
+ if (tipsOnly && !c.tips) continue;
1426
+
1427
+ count++;
1428
+ if (limit && count > limit) break;
1429
+
1430
+ const stash = stashes?.get(c.sha);
1431
+ if (stash != null) {
1432
+ if (commits.has(stash.sha)) {
1433
+ countStashChildCommits++;
1434
+ } else if (allowFilteredFiles) {
1435
+ commits.set(
1436
+ stash.sha,
1437
+ stash.with({
1438
+ fileset: {
1439
+ ...createCommitFileset(c, repoPath, pathspec),
1440
+ // Add the full stash files back into the fileset
1441
+ files: stash.fileset?.files,
1442
+ },
1443
+ }),
1444
+ );
1445
+ } else {
1446
+ commits.set(stash.sha, stash);
1447
+ }
1448
+ continue;
1449
+ }
1450
+
1451
+ commits.set(c.sha, toCommit(c, repoPath, pathspec, currentUser));
1452
+ }
1453
+ } else {
1454
+ for (const c of parser.parse(result.stdout)) {
1455
+ if (tipsOnly && !c.tips) continue;
1456
+
1457
+ count++;
1458
+ if (limit && count > limit) break;
1459
+
1460
+ commits.set(c.sha, toCommit(c, repoPath, pathspec, currentUser));
1461
+ }
1462
+ }
1463
+
1464
+ sw?.stop({ suffix: ` created ${count} commits` });
1465
+
1466
+ return { commits: commits, count: count, countStashChildCommits: countStashChildCommits };
1467
+ }
1468
+
1469
+ using _streamDisposer = createDisposable(() => void resultOrStream.return?.(undefined));
1470
+
1471
+ if (stashes?.size) {
1472
+ const allowFilteredFiles = searchFilters?.files ?? false;
1473
+ const stashesOnly = searchFilters?.type === 'stash';
1474
+
1475
+ for await (const c of parser.parseAsync(resultOrStream)) {
1476
+ if (stashesOnly && !stashes?.has(c.sha)) continue;
1477
+ if (tipsOnly && !c.tips) continue;
1478
+
1479
+ count++;
1480
+ if (limit && count > limit) break;
1481
+
1482
+ const stash = stashes?.get(c.sha);
1483
+ if (stash != null) {
1484
+ if (commits.has(stash.sha)) {
1485
+ countStashChildCommits++;
1486
+ } else if (allowFilteredFiles) {
1487
+ commits.set(
1488
+ stash.sha,
1489
+ stash.with({
1490
+ fileset: {
1491
+ ...createCommitFileset(c, repoPath, pathspec),
1492
+ // Add the full stash files back into the fileset
1493
+ files: stash.fileset?.files,
1494
+ },
1495
+ }),
1496
+ );
1497
+ } else {
1498
+ commits.set(stash.sha, stash);
1499
+ }
1500
+ continue;
1501
+ }
1502
+
1503
+ commits.set(c.sha, toCommit(c, repoPath, pathspec, currentUser));
1504
+ }
1505
+ } else {
1506
+ for await (const c of parser.parseAsync(resultOrStream)) {
1507
+ if (tipsOnly && !c.tips) continue;
1508
+
1509
+ count++;
1510
+ if (limit && count > limit) break;
1511
+
1512
+ commits.set(c.sha, toCommit(c, repoPath, pathspec, currentUser));
1513
+ }
1514
+ }
1515
+
1516
+ return { commits: commits, count: count, countStashChildCommits: countStashChildCommits };
1517
+ }