@gitkraken/core-gitlens 0.6.0 → 0.7.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.
- package/CHANGELOG.md +15 -1
- package/README.md +9 -2
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/decorate.js +9 -0
- package/dist/_virtual/@oxc-project+runtime/helpers/esm/usingCtx.js +57 -0
- package/dist/git/cache.d.ts +297 -297
- package/dist/git/cache.js +948 -1276
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +202 -197
- package/dist/git/context.js +12 -8
- package/dist/git/context.js.map +1 -1
- package/dist/git/errors.d.ts +268 -281
- package/dist/git/errors.js +928 -706
- package/dist/git/errors.js.map +1 -1
- package/dist/git/features.d.ts +3 -2
- package/dist/git/features.js +34 -55
- package/dist/git/features.js.map +1 -1
- package/dist/git/gitHealth.d.ts +88 -81
- package/dist/git/gitHealth.js +259 -329
- package/dist/git/gitHealth.js.map +1 -1
- package/dist/git/models/author.d.ts +12 -10
- package/dist/git/models/author.js +0 -2
- package/dist/git/models/autolink.d.ts +36 -37
- package/dist/git/models/autolink.js +0 -2
- package/dist/git/models/blame.d.ts +25 -23
- package/dist/git/models/blame.js +0 -2
- package/dist/git/models/branch.d.ts +74 -72
- package/dist/git/models/branch.js +132 -171
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts +135 -133
- package/dist/git/models/commit.js +381 -484
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts +30 -29
- package/dist/git/models/contributor.js +56 -64
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts +5 -3
- package/dist/git/models/defaultBranch.js +0 -2
- package/dist/git/models/diff.d.ts +49 -47
- package/dist/git/models/diff.js +0 -2
- package/dist/git/models/file.d.ts +20 -18
- package/dist/git/models/file.js +0 -2
- package/dist/git/models/fileChange.d.ts +45 -43
- package/dist/git/models/fileChange.js +60 -66
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +25 -23
- package/dist/git/models/fileStatus.js +30 -26
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +328 -320
- package/dist/git/models/graph.js +31 -27
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts +37 -35
- package/dist/git/models/graphSearch.js +0 -2
- package/dist/git/models/graphSession.d.ts +158 -66
- package/dist/git/models/graphSession.js +72 -1
- package/dist/git/models/graphSession.js.map +1 -1
- package/dist/git/models/issue.d.ts +171 -150
- package/dist/git/models/issue.js +86 -88
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts +16 -14
- package/dist/git/models/issueOrPullRequest.js +0 -2
- package/dist/git/models/lineRange.d.ts +6 -4
- package/dist/git/models/lineRange.js +0 -2
- package/dist/git/models/log.d.ts +18 -16
- package/dist/git/models/log.js +0 -2
- package/dist/git/models/mergeConflicts.d.ts +17 -15
- package/dist/git/models/mergeConflicts.js +0 -2
- package/dist/git/models/patch.d.ts +14 -12
- package/dist/git/models/patch.js +0 -2
- package/dist/git/models/pausedOperationStatus.d.ts +42 -40
- package/dist/git/models/pausedOperationStatus.js +0 -2
- package/dist/git/models/pullRequest.d.ts +238 -236
- package/dist/git/models/pullRequest.js +151 -163
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts +30 -28
- package/dist/git/models/rebase.js +0 -2
- package/dist/git/models/reference.d.ts +57 -55
- package/dist/git/models/reference.js +0 -2
- package/dist/git/models/reflog.d.ts +29 -27
- package/dist/git/models/reflog.js +63 -82
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts +34 -32
- package/dist/git/models/remote.js +74 -95
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts +86 -84
- package/dist/git/models/remoteProvider.js +145 -150
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts +58 -56
- package/dist/git/models/remoteResource.js +15 -12
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +144 -142
- package/dist/git/models/repository.js +358 -406
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts +8 -6
- package/dist/git/models/repositoryChangeEvent.js +26 -24
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts +50 -46
- package/dist/git/models/repositoryIdentities.js +7 -5
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts +9 -7
- package/dist/git/models/repositoryMetadata.js +0 -2
- package/dist/git/models/resourceDescriptor.d.ts +11 -9
- package/dist/git/models/resourceDescriptor.js +0 -2
- package/dist/git/models/revision.d.ts +2 -0
- package/dist/git/models/revision.js +8 -5
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts +48 -47
- package/dist/git/models/search.js +53 -49
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts +5 -3
- package/dist/git/models/shortlog.js +0 -2
- package/dist/git/models/signature.d.ts +28 -26
- package/dist/git/models/signature.js +0 -2
- package/dist/git/models/staging.d.ts +18 -16
- package/dist/git/models/staging.js +0 -2
- package/dist/git/models/stash.d.ts +5 -3
- package/dist/git/models/stash.js +0 -2
- package/dist/git/models/status.d.ts +51 -49
- package/dist/git/models/status.js +172 -205
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts +35 -34
- package/dist/git/models/statusFile.js +112 -125
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +34 -32
- package/dist/git/models/tag.js +64 -77
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts +8 -6
- package/dist/git/models/tree.js +0 -2
- package/dist/git/models/user.d.ts +6 -4
- package/dist/git/models/user.js +0 -2
- package/dist/git/models/worktree.d.ts +50 -48
- package/dist/git/models/worktree.js +102 -133
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts +7 -5
- package/dist/git/parsers/diffParser.js +438 -587
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts +3 -1
- package/dist/git/parsers/rebaseTodoParser.js +165 -208
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts +12 -10
- package/dist/git/providers/blame.js +0 -2
- package/dist/git/providers/branches.d.ts +96 -94
- package/dist/git/providers/branches.js +0 -2
- package/dist/git/providers/commits.d.ts +105 -104
- package/dist/git/providers/commits.js +0 -2
- package/dist/git/providers/config.d.ts +80 -78
- package/dist/git/providers/config.js +0 -2
- package/dist/git/providers/contributors.d.ts +23 -21
- package/dist/git/providers/contributors.js +0 -2
- package/dist/git/providers/diff.d.ts +68 -66
- package/dist/git/providers/diff.js +0 -2
- package/dist/git/providers/graph.d.ts +73 -62
- package/dist/git/providers/graph.js +0 -2
- package/dist/git/providers/maintenance.d.ts +180 -178
- package/dist/git/providers/maintenance.js +0 -20
- package/dist/git/providers/operations.d.ts +114 -112
- package/dist/git/providers/operations.js +0 -2
- package/dist/git/providers/patch.d.ts +26 -24
- package/dist/git/providers/patch.js +0 -2
- package/dist/git/providers/pausedOperations.d.ts +19 -17
- package/dist/git/providers/pausedOperations.js +0 -2
- package/dist/git/providers/provider.d.ts +52 -50
- package/dist/git/providers/provider.js +0 -2
- package/dist/git/providers/refs.d.ts +42 -40
- package/dist/git/providers/refs.js +0 -2
- package/dist/git/providers/remotes.d.ts +24 -22
- package/dist/git/providers/remotes.js +0 -2
- package/dist/git/providers/revision.d.ts +25 -23
- package/dist/git/providers/revision.js +0 -2
- package/dist/git/providers/shared/remotes.d.ts +24 -22
- package/dist/git/providers/shared/remotes.js +52 -77
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts +37 -35
- package/dist/git/providers/staging.js +0 -2
- package/dist/git/providers/stash.d.ts +38 -36
- package/dist/git/providers/stash.js +0 -2
- package/dist/git/providers/status.d.ts +32 -30
- package/dist/git/providers/status.js +0 -2
- package/dist/git/providers/tags.d.ts +20 -18
- package/dist/git/providers/tags.js +0 -2
- package/dist/git/providers/types.d.ts +19 -17
- package/dist/git/providers/types.js +0 -2
- package/dist/git/providers/worktrees.d.ts +26 -24
- package/dist/git/providers/worktrees.js +0 -2
- package/dist/git/remotes/azure-devops.d.ts +46 -45
- package/dist/git/remotes/azure-devops.js +252 -257
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts +30 -29
- package/dist/git/remotes/bitbucket-server.js +141 -142
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts +27 -26
- package/dist/git/remotes/bitbucket.js +114 -111
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts +26 -25
- package/dist/git/remotes/custom.js +130 -130
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts +29 -28
- package/dist/git/remotes/gerrit.js +140 -143
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts +28 -27
- package/dist/git/remotes/gitea.js +141 -145
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts +35 -34
- package/dist/git/remotes/github.js +196 -190
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts +31 -30
- package/dist/git/remotes/gitlab.js +245 -227
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts +16 -14
- package/dist/git/remotes/google-source.js +33 -31
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts +16 -14
- package/dist/git/remotes/matcher.js +141 -124
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/repositoryService.d.ts +47 -47
- package/dist/git/repositoryService.js +47 -44
- package/dist/git/repositoryService.js.map +1 -1
- package/dist/git/run.types.d.ts +91 -76
- package/dist/git/run.types.js +0 -2
- package/dist/git/service.d.ts +73 -71
- package/dist/git/service.js +286 -302
- package/dist/git/service.js.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts +4 -2
- package/dist/git/utils/autolink.utils.js +103 -139
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts +22 -20
- package/dist/git/utils/blame.utils.js +196 -230
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts +7 -9
- package/dist/git/utils/branch.utils.js +89 -115
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts +10 -16
- package/dist/git/utils/commit.utils.js +28 -47
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/config.utils.d.ts +2 -0
- package/dist/git/utils/config.utils.js +14 -5
- package/dist/git/utils/config.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts +16 -13
- package/dist/git/utils/conflictResolution.utils.js +116 -113
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +10 -8
- package/dist/git/utils/contributor.utils.js +47 -69
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts +2 -0
- package/dist/git/utils/fetch.utils.js +33 -44
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +22 -21
- package/dist/git/utils/fileStatus.utils.js +59 -45
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +19 -1
- package/dist/git/utils/graph.utils.js +60 -35
- package/dist/git/utils/graph.utils.js.map +1 -1
- package/dist/git/utils/issue.utils.d.ts +3 -1
- package/dist/git/utils/issue.utils.js +154 -158
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -1
- package/dist/git/utils/issueOrPullRequest.utils.js +23 -20
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts +4 -1
- package/dist/git/utils/mergeConflicts.utils.js +28 -15
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +7 -42
- package/dist/git/utils/pausedOperationStatus.utils.js +83 -146
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts +7 -5
- package/dist/git/utils/pullRequest.utils.js +180 -187
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +6 -6
- package/dist/git/utils/reachability.utils.js +120 -147
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts +3 -1
- package/dist/git/utils/rebase.utils.js +87 -71
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts +33 -32
- package/dist/git/utils/reference.utils.js +152 -179
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts +5 -3
- package/dist/git/utils/remote.utils.js +77 -116
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts +3 -1
- package/dist/git/utils/repository.utils.js +12 -11
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts +3 -1
- package/dist/git/utils/resourceDescriptor.utils.js +8 -14
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts +11 -10
- package/dist/git/utils/revision.utils.js +69 -83
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts +5 -3
- package/dist/git/utils/search.utils.js +383 -522
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts +22 -20
- package/dist/git/utils/sorting.js +133 -227
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +2 -0
- package/dist/git/utils/sshKey.utils.js +10 -15
- package/dist/git/utils/sshKey.utils.js.map +1 -1
- package/dist/git/utils/status.utils.d.ts +20 -15
- package/dist/git/utils/status.utils.js +93 -79
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts +6 -4
- package/dist/git/utils/statusFile.utils.js +71 -72
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts +4 -2
- package/dist/git/utils/tag.utils.js +10 -8
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts +5 -2
- package/dist/git/utils/tooltip.utils.js +49 -24
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts +9 -7
- package/dist/git/utils/uriAuthority.js +19 -16
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts +3 -1
- package/dist/git/utils/user.utils.js +6 -10
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts +5 -3
- package/dist/git/utils/worktree.utils.js +14 -12
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +38 -36
- package/dist/git/watching/changeEvent.js +60 -67
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts +3 -1
- package/dist/git/watching/classifyChange.js +50 -79
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts +43 -41
- package/dist/git/watching/gitIgnoreFilter.js +92 -107
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts +22 -20
- package/dist/git/watching/initWatcher.js +58 -57
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts +8 -7
- package/dist/git/watching/provider.js +0 -2
- package/dist/git/watching/watchGroup.d.ts +29 -28
- package/dist/git/watching/watchGroup.js +105 -137
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +70 -68
- package/dist/git/watching/watchService.js +275 -339
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +112 -111
- package/dist/git/watching/watchSession.js +260 -314
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts +4 -2
- package/dist/git/watching/watcherPatterns.js +21 -24
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts +117 -114
- package/dist/git-cli/cliGitProvider.js +261 -283
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/exec/eventLoopMonitor.d.ts +26 -0
- package/dist/git-cli/exec/eventLoopMonitor.js +61 -0
- package/dist/git-cli/exec/eventLoopMonitor.js.map +1 -0
- package/dist/git-cli/exec/exec.d.ts +3 -4
- package/dist/git-cli/exec/exec.errors.d.ts +2 -2
- package/dist/git-cli/exec/exec.errors.js +2 -2
- package/dist/git-cli/exec/exec.js +3 -3
- package/dist/git-cli/exec/exec.types.d.ts +2 -2
- package/dist/git-cli/exec/exec.types.js +0 -2
- package/dist/git-cli/exec/features.d.ts +2 -3
- package/dist/git-cli/exec/features.js +2 -2
- package/dist/git-cli/exec/git.d.ts +224 -205
- package/dist/git-cli/exec/git.js +834 -1042
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts +51 -48
- package/dist/git-cli/exec/gitQueue.js +225 -260
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts +8 -6
- package/dist/git-cli/exec/locator.js +95 -121
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts +22 -20
- package/dist/git-cli/parsers/blameParser.js +238 -332
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts +3 -1
- package/dist/git-cli/parsers/indexParser.js +146 -221
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +103 -110
- package/dist/git-cli/parsers/logParser.js +998 -1199
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts +5 -3
- package/dist/git-cli/parsers/mergeTreeParser.js +28 -72
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts +5 -4
- package/dist/git-cli/parsers/refParser.js +92 -137
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts +7 -6
- package/dist/git-cli/parsers/reflogParser.js +100 -173
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts +4 -2
- package/dist/git-cli/parsers/remoteParser.js +74 -126
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts +4 -2
- package/dist/git-cli/parsers/shortlogParser.js +44 -49
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts +3 -1
- package/dist/git-cli/parsers/signatureParser.js +82 -124
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +5 -3
- package/dist/git-cli/parsers/sshSignatureParser.js +55 -64
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -1
- package/dist/git-cli/parsers/statusParser.d.ts +4 -2
- package/dist/git-cli/parsers/statusParser.js +148 -205
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts +3 -1
- package/dist/git-cli/parsers/treeParser.js +57 -108
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts +4 -3
- package/dist/git-cli/parsers/worktreeParser.js +76 -132
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts +25 -23
- package/dist/git-cli/providers/blame.js +404 -413
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +117 -116
- package/dist/git-cli/providers/branches.js +1132 -1468
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -2
- package/dist/git-cli/providers/commitFilesetUtils.js +36 -18
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +58 -56
- package/dist/git-cli/providers/commits.js +1084 -1423
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +129 -127
- package/dist/git-cli/providers/config.js +612 -831
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts +29 -28
- package/dist/git-cli/providers/contributors.js +246 -351
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts +97 -94
- package/dist/git-cli/providers/diff.js +638 -845
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +66 -68
- package/dist/git-cli/providers/graph.js +1400 -1848
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/maintenance.d.ts +305 -303
- package/dist/git-cli/providers/maintenance.js +1526 -2078
- package/dist/git-cli/providers/maintenance.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts +96 -94
- package/dist/git-cli/providers/operations.js +664 -724
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts +37 -35
- package/dist/git-cli/providers/patch.js +206 -307
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts +30 -28
- package/dist/git-cli/providers/pausedOperations.js +475 -506
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +50 -48
- package/dist/git-cli/providers/refs.js +335 -479
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts +23 -21
- package/dist/git-cli/providers/remotes.js +71 -92
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +27 -25
- package/dist/git-cli/providers/revision.js +288 -304
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts +31 -29
- package/dist/git-cli/providers/staging.js +140 -189
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts +44 -42
- package/dist/git-cli/providers/stash.js +288 -387
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +61 -59
- package/dist/git-cli/providers/status.js +332 -453
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts +31 -29
- package/dist/git-cli/providers/tags.js +158 -215
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +35 -33
- package/dist/git-cli/providers/worktrees.js +178 -203
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts +28 -26
- package/dist/git-cli/service.js +38 -40
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/discovery.d.ts +19 -17
- package/dist/ipc/discovery.js +104 -128
- package/dist/ipc/discovery.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts +16 -14
- package/dist/ipc/ipcServer.js +139 -160
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/agentCapabilities.d.ts +50 -37
- package/dist/plus/agents/agentCapabilities.js +138 -173
- package/dist/plus/agents/agentCapabilities.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +153 -151
- package/dist/plus/agents/providers/claudeCodeTranscript.js +605 -679
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts +237 -240
- package/dist/plus/agents/providers/gkAgentProvider.js +2162 -3334
- package/dist/plus/agents/providers/gkAgentProvider.js.map +1 -1
- package/dist/plus/agents/sanitizePrompt.d.ts +2 -0
- package/dist/plus/agents/sanitizePrompt.js +58 -91
- package/dist/plus/agents/sanitizePrompt.js.map +1 -1
- package/dist/plus/agents/stateMachine.d.ts +7 -5
- package/dist/plus/agents/stateMachine.js +135 -163
- package/dist/plus/agents/stateMachine.js.map +1 -1
- package/dist/plus/agents/types.d.ts +333 -336
- package/dist/plus/agents/types.js +48 -48
- package/dist/plus/agents/types.js.map +1 -1
- package/dist/plus/ai/constants.d.ts +3 -1
- package/dist/plus/ai/constants.js +88 -84
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +22 -18
- package/dist/plus/ai/errors.js +158 -138
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts +11 -9
- package/dist/plus/ai/models/conversation.js +30 -26
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +29 -27
- package/dist/plus/ai/models/model.js +663 -471
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +56 -55
- package/dist/plus/ai/models/promptTemplates.js +0 -2
- package/dist/plus/ai/models/provider.d.ts +79 -77
- package/dist/plus/ai/models/provider.js +0 -2
- package/dist/plus/ai/models/results.d.ts +27 -21
- package/dist/plus/ai/models/results.js +0 -2
- package/dist/plus/ai/prompts.d.ts +4 -2
- package/dist/plus/ai/prompts.js +301 -190
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +33 -32
- package/dist/plus/ai/providers/anthropicProvider.js +484 -381
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts +18 -16
- package/dist/plus/ai/providers/azureProvider.js +53 -53
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts +23 -20
- package/dist/plus/ai/providers/context.js +0 -2
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +17 -15
- package/dist/plus/ai/providers/deepSeekProvider.js +45 -39
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/geminiProvider.js +316 -230
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +22 -20
- package/dist/plus/ai/providers/gitkrakenProvider.js +165 -260
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +16 -14
- package/dist/plus/ai/providers/huggingFaceProvider.js +45 -46
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts +22 -20
- package/dist/plus/ai/providers/mistralProvider.js +263 -195
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts +26 -24
- package/dist/plus/ai/providers/ollamaProvider.js +156 -189
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +18 -16
- package/dist/plus/ai/providers/openAICompatibleProvider.js +50 -50
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +187 -185
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +356 -475
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts +20 -19
- package/dist/plus/ai/providers/openRouterProvider.js +60 -65
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts +17 -15
- package/dist/plus/ai/providers/openaiProvider.js +35 -34
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts +4 -2
- package/dist/plus/ai/providers/responseFormatCache.js +21 -17
- package/dist/plus/ai/providers/responseFormatCache.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts +16 -14
- package/dist/plus/ai/providers/xaiProvider.js +61 -46
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts +4 -2
- package/dist/plus/ai/utils/ai.utils.js +50 -77
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +7 -5
- package/dist/plus/ai/utils/results.utils.js +235 -269
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +3 -2
- package/dist/plus/ai/utils/truncation.utils.js +242 -205
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts +58 -56
- package/dist/plus/git-github/api/config.js +15 -11
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +500 -497
- package/dist/plus/git-github/api/github.js +2326 -3121
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts +5 -3
- package/dist/plus/git-github/api/github.utils.js +24 -19
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts +5 -3
- package/dist/plus/git-github/api/issueSearchQuery.js +204 -221
- package/dist/plus/git-github/api/issueSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +6 -5
- package/dist/plus/git-github/api/pullRequestSearchQuery.js +89 -116
- package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts +10 -8
- package/dist/plus/git-github/api/token.js +0 -2
- package/dist/plus/git-github/api/tokenUtils.d.ts +4 -2
- package/dist/plus/git-github/api/tokenUtils.js +14 -10
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts +94 -92
- package/dist/plus/git-github/api/types.js +0 -2
- package/dist/plus/git-github/context.d.ts +65 -63
- package/dist/plus/git-github/context.js +13 -9
- package/dist/plus/git-github/context.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +182 -182
- package/dist/plus/git-github/models.js +199 -265
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts +32 -31
- package/dist/plus/git-github/providers/github/blame.js +137 -150
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +42 -40
- package/dist/plus/git-github/providers/github/branches.js +199 -274
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts +35 -33
- package/dist/plus/git-github/providers/github/commits.js +527 -606
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts +10 -8
- package/dist/plus/git-github/providers/github/config.js +35 -45
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts +25 -24
- package/dist/plus/git-github/providers/github/contributors.js +174 -216
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts +34 -32
- package/dist/plus/git-github/providers/github/diff.js +154 -194
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +33 -31
- package/dist/plus/git-github/providers/github/graph.js +400 -452
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts +33 -31
- package/dist/plus/git-github/providers/github/refs.js +97 -131
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts +8 -6
- package/dist/plus/git-github/providers/github/remotes.js +30 -35
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts +13 -11
- package/dist/plus/git-github/providers/github/revision.js +106 -129
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts +24 -22
- package/dist/plus/git-github/providers/github/status.js +49 -47
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts +21 -19
- package/dist/plus/git-github/providers/github/tags.js +78 -103
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts +67 -64
- package/dist/plus/git-github/providers/githubGitProvider.js +131 -128
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts +46 -44
- package/dist/plus/git-github/providers/githubProvider.js +0 -2
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +29 -27
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +173 -208
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +126 -107
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +399 -497
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +73 -72
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +153 -232
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +61 -59
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +100 -124
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +14 -12
- package/dist/plus/integrations/authentication/manualTokenProvider.js +26 -51
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +102 -85
- package/dist/plus/integrations/authentication/models.js +55 -54
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts +19 -17
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js +53 -51
- package/dist/plus/integrations/authentication/rejectedTokenTracker.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +12 -10
- package/dist/plus/integrations/collectionMetadata.js +204 -254
- package/dist/plus/integrations/collectionMetadata.js.map +1 -1
- package/dist/plus/integrations/constants.d.ts +60 -34
- package/dist/plus/integrations/constants.js +157 -132
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +253 -252
- package/dist/plus/integrations/context.js +0 -2
- package/dist/plus/integrations/errors.d.ts +26 -25
- package/dist/plus/integrations/errors.js +116 -140
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +36 -40
- package/dist/plus/integrations/index.js +46 -57
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +445 -440
- package/dist/plus/integrations/integrationService.js +1054 -1324
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.d.ts +33 -31
- package/dist/plus/integrations/lite.js +84 -122
- package/dist/plus/integrations/lite.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +592 -580
- package/dist/plus/integrations/manager.js +0 -2
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +420 -415
- package/dist/plus/integrations/models/gitHostIntegration.js +1180 -1293
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +200 -190
- package/dist/plus/integrations/models/integration.js +577 -722
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issueCache.d.ts +15 -13
- package/dist/plus/integrations/models/issueCache.js +9 -7
- package/dist/plus/integrations/models/issueCache.js.map +1 -1
- package/dist/plus/integrations/models/issueReads.d.ts +108 -85
- package/dist/plus/integrations/models/issueReads.js +0 -2
- package/dist/plus/integrations/models/issuesIntegration.d.ts +72 -71
- package/dist/plus/integrations/models/issuesIntegration.js +160 -186
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts +9 -7
- package/dist/plus/integrations/models/pullRequestReads.js +0 -2
- package/dist/plus/integrations/providerFilters.d.ts +8 -20
- package/dist/plus/integrations/providerFilters.js +11 -7
- package/dist/plus/integrations/providerFilters.js.map +1 -1
- package/dist/plus/integrations/providers/accounts.d.ts +7 -5
- package/dist/plus/integrations/providers/accounts.js +21 -31
- package/dist/plus/integrations/providers/accounts.js.map +1 -1
- package/dist/plus/integrations/providers/apiClients.d.ts +13 -10
- package/dist/plus/integrations/providers/apiClients.js +51 -36
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts +31 -29
- package/dist/plus/integrations/providers/apiConfig.js +18 -16
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +69 -67
- package/dist/plus/integrations/providers/azure/azure.js +452 -577
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +228 -226
- package/dist/plus/integrations/providers/azure/models.js +223 -251
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -131
- package/dist/plus/integrations/providers/azureDevOps.js +773 -931
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +50 -48
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +417 -585
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts +179 -179
- package/dist/plus/integrations/providers/bitbucket/models.js +96 -144
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +111 -109
- package/dist/plus/integrations/providers/bitbucket-server/models.js +102 -121
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +79 -79
- package/dist/plus/integrations/providers/bitbucket-server.js +205 -241
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +80 -79
- package/dist/plus/integrations/providers/bitbucket.js +390 -477
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts +5 -3
- package/dist/plus/integrations/providers/github/github.js +38 -45
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts +8 -5
- package/dist/plus/integrations/providers/github/github.utils.js +7 -4
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts +2 -3
- package/dist/plus/integrations/providers/github/models.js +2 -2
- package/dist/plus/integrations/providers/github.d.ts +174 -172
- package/dist/plus/integrations/providers/github.js +431 -523
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +67 -66
- package/dist/plus/integrations/providers/gitlab/gitlab.js +546 -757
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +7 -5
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +45 -46
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +109 -107
- package/dist/plus/integrations/providers/gitlab/models.js +74 -89
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +115 -114
- package/dist/plus/integrations/providers/gitlab.js +440 -528
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts +3 -1
- package/dist/plus/integrations/providers/issueSorts.js +66 -62
- package/dist/plus/integrations/providers/issueSorts.js.map +1 -1
- package/dist/plus/integrations/providers/jira-server.d.ts +90 -0
- package/dist/plus/integrations/providers/jira-server.js +322 -0
- package/dist/plus/integrations/providers/jira-server.js.map +1 -0
- package/dist/plus/integrations/providers/jira.d.ts +41 -39
- package/dist/plus/integrations/providers/jira.js +378 -440
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts +3 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.js +85 -89
- package/dist/plus/integrations/providers/jiraIssueByKey.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +63 -62
- package/dist/plus/integrations/providers/linear.js +315 -358
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +514 -503
- package/dist/plus/integrations/providers/models.js +816 -865
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts +35 -2
- package/dist/plus/integrations/providers/providerErrors.js +120 -81
- package/dist/plus/integrations/providers/providerErrors.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +299 -271
- package/dist/plus/integrations/providers/providersApi.js +1048 -1001
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts +21 -21
- package/dist/plus/integrations/providers/pullRequestReviews.js +64 -90
- package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +35 -34
- package/dist/plus/integrations/providers/trello.js +136 -143
- package/dist/plus/integrations/providers/trello.js.map +1 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +4 -2
- package/dist/plus/integrations/providers/utils/providerPaging.js +131 -156
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -1
- package/dist/plus/integrations/providers/utils.d.ts +51 -50
- package/dist/plus/integrations/providers/utils.js +185 -296
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +10 -8
- package/dist/plus/integrations/reads/broaden.js +320 -439
- package/dist/plus/integrations/reads/broaden.js.map +1 -1
- package/dist/plus/integrations/reads/context.d.ts +47 -45
- package/dist/plus/integrations/reads/context.js +0 -2
- package/dist/plus/integrations/reads/counts.d.ts +74 -72
- package/dist/plus/integrations/reads/counts.js +233 -314
- package/dist/plus/integrations/reads/counts.js.map +1 -1
- package/dist/plus/integrations/reads/cursors.d.ts +26 -24
- package/dist/plus/integrations/reads/cursors.js +80 -115
- package/dist/plus/integrations/reads/cursors.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +24 -23
- package/dist/plus/integrations/reads/drains.js +225 -298
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/filters.d.ts +84 -80
- package/dist/plus/integrations/reads/filters.js +326 -414
- package/dist/plus/integrations/reads/filters.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts +14 -12
- package/dist/plus/integrations/reads/hierarchy.js +248 -332
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +11 -9
- package/dist/plus/integrations/reads/hierarchy.utils.js +109 -108
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts +28 -26
- package/dist/plus/integrations/reads/issueBatch.js +83 -85
- package/dist/plus/integrations/reads/issueBatch.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts +42 -33
- package/dist/plus/integrations/reads/issueTracker.js +265 -386
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts +50 -47
- package/dist/plus/integrations/reads/issues.js +202 -331
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/ordering.d.ts +32 -30
- package/dist/plus/integrations/reads/ordering.js +47 -43
- package/dist/plus/integrations/reads/ordering.js.map +1 -1
- package/dist/plus/integrations/reads/paging.d.ts +59 -57
- package/dist/plus/integrations/reads/paging.js +244 -261
- package/dist/plus/integrations/reads/paging.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts +37 -35
- package/dist/plus/integrations/reads/pullRequests.js +95 -148
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts +15 -13
- package/dist/plus/integrations/reads/resolveRepository.js +147 -231
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts +29 -27
- package/dist/plus/integrations/reads/searchIssues.js +104 -153
- package/dist/plus/integrations/reads/searchIssues.js.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts +20 -18
- package/dist/plus/integrations/reads/searchPullRequests.js +91 -113
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/sweeps.d.ts +6 -4
- package/dist/plus/integrations/reads/sweeps.js +143 -178
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts +24 -16
- package/dist/plus/integrations/reads/trackerIssue.js +52 -49
- package/dist/plus/integrations/reads/trackerIssue.js.map +1 -1
- package/dist/plus/integrations/reads/warnings.d.ts +10 -7
- package/dist/plus/integrations/reads/warnings.js +264 -291
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +201 -199
- package/dist/plus/integrations/results.js +105 -119
- package/dist/plus/integrations/results.js.map +1 -1
- package/dist/plus/integrations/telemetry.d.ts +7 -5
- package/dist/plus/integrations/telemetry.js +9 -9
- package/dist/plus/integrations/telemetry.js.map +1 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts +21 -0
- package/dist/plus/integrations/utils/domain.utils.js +55 -22
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts +30 -6
- package/dist/plus/integrations/utils/integration.utils.js +154 -161
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- package/dist/utils/array.d.ts +9 -7
- package/dist/utils/array.js +110 -126
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/base64.d.ts +2 -2
- package/dist/utils/base64.js +2 -2
- package/dist/utils/brand.d.ts +4 -3
- package/dist/utils/brand.js +0 -2
- package/dist/utils/cancellation.d.ts +24 -24
- package/dist/utils/cancellation.js +152 -167
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts +31 -37
- package/dist/utils/charCode.js +41 -37
- package/dist/utils/charCode.js.map +1 -1
- package/dist/utils/coalescedRun.d.ts +10 -8
- package/dist/utils/coalescedRun.js +39 -41
- package/dist/utils/coalescedRun.js.map +1 -1
- package/dist/utils/color.d.ts +137 -135
- package/dist/utils/color.js +535 -660
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/counter.d.ts +5 -3
- package/dist/utils/counter.js +19 -17
- package/dist/utils/counter.js.map +1 -1
- package/dist/utils/crypto.d.ts +2 -2
- package/dist/utils/crypto.js +2 -2
- package/dist/utils/date.d.ts +10 -9
- package/dist/utils/date.js +312 -350
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.d.ts +45 -43
- package/dist/utils/debounce.js +175 -206
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts +3 -1
- package/dist/utils/decorators/debounce.js +16 -19
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts +13 -11
- package/dist/utils/decorators/gate.js +97 -124
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts +25 -24
- package/dist/utils/decorators/log.js +166 -227
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts +10 -8
- package/dist/utils/decorators/memoize.js +49 -57
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts +2 -0
- package/dist/utils/decorators/resolver.js +64 -75
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts +15 -14
- package/dist/utils/decorators/sequentialize.js +61 -80
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts +2 -0
- package/dist/utils/decorators/serializable.js +30 -39
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts +23 -21
- package/dist/utils/dedupedAsyncCache.js +63 -66
- package/dist/utils/dedupedAsyncCache.js.map +1 -1
- package/dist/utils/diff.d.ts +2 -0
- package/dist/utils/diff.js +41 -51
- package/dist/utils/diff.js.map +1 -1
- package/dist/utils/disposable.d.ts +15 -13
- package/dist/utils/disposable.js +71 -80
- package/dist/utils/disposable.js.map +1 -1
- package/dist/utils/dom.d.ts +45 -0
- package/dist/utils/dom.js +106 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/encoding.d.ts +2 -0
- package/dist/utils/encoding.js +7 -5
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/env/browser/base64.d.ts +2 -0
- package/dist/utils/env/browser/base64.js +32 -34
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts +2 -0
- package/dist/utils/env/browser/crypto.js +17 -13
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts +2 -0
- package/dist/utils/env/browser/fs.js +6 -2
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts +2 -0
- package/dist/utils/env/browser/hex.js +271 -29
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts +2 -0
- package/dist/utils/env/browser/hrtime.js +17 -13
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts +3 -1
- package/dist/utils/env/browser/logScope.js +39 -43
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts +2 -0
- package/dist/utils/env/browser/md5.js +211 -184
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts +3 -0
- package/dist/utils/env/browser/platform.js +11 -4
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts +2 -0
- package/dist/utils/env/node/base64.js +13 -11
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts +2 -0
- package/dist/utils/env/node/crypto.js +13 -9
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +66 -65
- package/dist/utils/env/node/exec.js +255 -267
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts +2 -0
- package/dist/utils/env/node/fs.js +7 -3
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts +2 -0
- package/dist/utils/env/node/hex.js +10 -6
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts +2 -2
- package/dist/utils/env/node/hrtime.js +2 -2
- package/dist/utils/env/node/logScope.d.ts +3 -1
- package/dist/utils/env/node/logScope.js +52 -42
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts +3 -0
- package/dist/utils/env/node/platform.js +11 -4
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/error.d.ts +8 -6
- package/dist/utils/error.js +16 -14
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/event.d.ts +27 -25
- package/dist/utils/event.js +141 -170
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts +15 -14
- package/dist/utils/formatter.js +96 -129
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/fs.d.ts +2 -2
- package/dist/utils/fs.js +2 -2
- package/dist/utils/function.d.ts +5 -6
- package/dist/utils/function.js +73 -90
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/fuzzy.d.ts +18 -16
- package/dist/utils/fuzzy.js +121 -127
- package/dist/utils/fuzzy.js.map +1 -1
- package/dist/utils/gitRefs.d.ts +11 -0
- package/dist/utils/gitRefs.js +21 -0
- package/dist/utils/gitRefs.js.map +1 -0
- package/dist/utils/hash.d.ts +2 -0
- package/dist/utils/hash.js +49 -47
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/hex.d.ts +2 -2
- package/dist/utils/hex.js +2 -2
- package/dist/utils/hostingServiceType.d.ts +8 -0
- package/dist/utils/hostingServiceType.js +0 -0
- package/dist/utils/hrtime.d.ts +4 -2
- package/dist/utils/hrtime.js +8 -5
- package/dist/utils/hrtime.js.map +1 -1
- package/dist/utils/iterable.d.ts +3 -1
- package/dist/utils/iterable.js +591 -616
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/keys/chord.d.ts +27 -25
- package/dist/utils/keys/chord.js +108 -122
- package/dist/utils/keys/chord.js.map +1 -1
- package/dist/utils/keys/keybinding.d.ts +98 -22
- package/dist/utils/keys/keybinding.js +151 -53
- package/dist/utils/keys/keybinding.js.map +1 -1
- package/dist/utils/keys/keymapDispatcher.d.ts +66 -0
- package/dist/utils/keys/keymapDispatcher.js +187 -0
- package/dist/utils/keys/keymapDispatcher.js.map +1 -0
- package/dist/utils/lazy.d.ts +14 -12
- package/dist/utils/lazy.js +35 -36
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/loggable.d.ts +3 -1
- package/dist/utils/loggable.js +6 -2
- package/dist/utils/loggable.js.map +1 -1
- package/dist/utils/logger.d.ts +48 -46
- package/dist/utils/logger.js +219 -304
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.d.ts +30 -28
- package/dist/utils/logger.scoped.js +133 -147
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts +34 -32
- package/dist/utils/lruMap.js +97 -101
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/markdown.d.ts +5 -3
- package/dist/utils/markdown.js +52 -88
- package/dist/utils/markdown.js.map +1 -1
- package/dist/utils/mru.d.ts +13 -11
- package/dist/utils/mru.js +57 -62
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.d.ts +9 -34
- package/dist/utils/object.js +132 -191
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +36 -34
- package/dist/utils/paging.js +42 -45
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.d.ts +4 -1
- package/dist/utils/path.js +129 -162
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/pausedOperation.d.ts +42 -0
- package/dist/utils/pausedOperation.js +62 -0
- package/dist/utils/pausedOperation.js.map +1 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/platform.js +2 -2
- package/dist/utils/plural.d.ts +21 -0
- package/dist/utils/plural.js +136 -0
- package/dist/utils/plural.js.map +1 -0
- package/dist/utils/promise.d.ts +19 -18
- package/dist/utils/promise.js +323 -360
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +331 -330
- package/dist/utils/promiseCache.js +602 -717
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/resourceUsage.d.ts +2 -0
- package/dist/utils/resourceUsage.js +0 -2
- package/dist/utils/searchTree.d.ts +51 -49
- package/dist/utils/searchTree.js +306 -396
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts +33 -32
- package/dist/utils/stopwatch.js +67 -81
- package/dist/utils/stopwatch.js.map +1 -1
- package/dist/utils/string.d.ts +17 -24
- package/dist/utils/string.js +787 -803
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts +15 -14
- package/dist/utils/subscriptionManager.js +36 -33
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts +64 -62
- package/dist/utils/trie.js +438 -580
- package/dist/utils/trie.js.map +1 -1
- package/dist/utils/types.d.ts +8 -16
- package/dist/utils/types.js +0 -2
- package/dist/utils/uri.d.ts +27 -25
- package/dist/utils/uri.js +42 -42
- package/dist/utils/uri.js.map +1 -1
- package/dist/utils/validation.d.ts +13 -12
- package/dist/utils/validation.js +17 -23
- package/dist/utils/validation.js.map +1 -1
- package/dist/utils/version.d.ts +6 -5
- package/dist/utils/version.js +77 -104
- package/dist/utils/version.js.map +1 -1
- package/docs/integrations.md +70 -26
- package/package.json +18 -8
- package/dist/git/cache.d.ts.map +0 -1
- package/dist/git/context.d.ts.map +0 -1
- package/dist/git/errors.d.ts.map +0 -1
- package/dist/git/features.d.ts.map +0 -1
- package/dist/git/gitHealth.d.ts.map +0 -1
- package/dist/git/models/author.d.ts.map +0 -1
- package/dist/git/models/author.js.map +0 -1
- package/dist/git/models/autolink.d.ts.map +0 -1
- package/dist/git/models/autolink.js.map +0 -1
- package/dist/git/models/blame.d.ts.map +0 -1
- package/dist/git/models/blame.js.map +0 -1
- package/dist/git/models/branch.d.ts.map +0 -1
- package/dist/git/models/commit.d.ts.map +0 -1
- package/dist/git/models/contributor.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.d.ts.map +0 -1
- package/dist/git/models/defaultBranch.js.map +0 -1
- package/dist/git/models/diff.d.ts.map +0 -1
- package/dist/git/models/diff.js.map +0 -1
- package/dist/git/models/file.d.ts.map +0 -1
- package/dist/git/models/file.js.map +0 -1
- package/dist/git/models/fileChange.d.ts.map +0 -1
- package/dist/git/models/fileStatus.d.ts.map +0 -1
- package/dist/git/models/graph.d.ts.map +0 -1
- package/dist/git/models/graphSearch.d.ts.map +0 -1
- package/dist/git/models/graphSearch.js.map +0 -1
- package/dist/git/models/graphSession.d.ts.map +0 -1
- package/dist/git/models/issue.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +0 -1
- package/dist/git/models/issueOrPullRequest.js.map +0 -1
- package/dist/git/models/lineRange.d.ts.map +0 -1
- package/dist/git/models/lineRange.js.map +0 -1
- package/dist/git/models/log.d.ts.map +0 -1
- package/dist/git/models/log.js.map +0 -1
- package/dist/git/models/mergeConflicts.d.ts.map +0 -1
- package/dist/git/models/mergeConflicts.js.map +0 -1
- package/dist/git/models/patch.d.ts.map +0 -1
- package/dist/git/models/patch.js.map +0 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +0 -1
- package/dist/git/models/pausedOperationStatus.js.map +0 -1
- package/dist/git/models/pullRequest.d.ts.map +0 -1
- package/dist/git/models/rebase.d.ts.map +0 -1
- package/dist/git/models/rebase.js.map +0 -1
- package/dist/git/models/reference.d.ts.map +0 -1
- package/dist/git/models/reference.js.map +0 -1
- package/dist/git/models/reflog.d.ts.map +0 -1
- package/dist/git/models/remote.d.ts.map +0 -1
- package/dist/git/models/remoteProvider.d.ts.map +0 -1
- package/dist/git/models/remoteResource.d.ts.map +0 -1
- package/dist/git/models/repository.d.ts.map +0 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +0 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +0 -1
- package/dist/git/models/repositoryMetadata.js.map +0 -1
- package/dist/git/models/resourceDescriptor.d.ts.map +0 -1
- package/dist/git/models/resourceDescriptor.js.map +0 -1
- package/dist/git/models/revision.d.ts.map +0 -1
- package/dist/git/models/search.d.ts.map +0 -1
- package/dist/git/models/shortlog.d.ts.map +0 -1
- package/dist/git/models/shortlog.js.map +0 -1
- package/dist/git/models/signature.d.ts.map +0 -1
- package/dist/git/models/signature.js.map +0 -1
- package/dist/git/models/staging.d.ts.map +0 -1
- package/dist/git/models/staging.js.map +0 -1
- package/dist/git/models/stash.d.ts.map +0 -1
- package/dist/git/models/stash.js.map +0 -1
- package/dist/git/models/status.d.ts.map +0 -1
- package/dist/git/models/statusFile.d.ts.map +0 -1
- package/dist/git/models/tag.d.ts.map +0 -1
- package/dist/git/models/tree.d.ts.map +0 -1
- package/dist/git/models/tree.js.map +0 -1
- package/dist/git/models/user.d.ts.map +0 -1
- package/dist/git/models/user.js.map +0 -1
- package/dist/git/models/worktree.d.ts.map +0 -1
- package/dist/git/parsers/diffParser.d.ts.map +0 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +0 -1
- package/dist/git/providers/blame.d.ts.map +0 -1
- package/dist/git/providers/blame.js.map +0 -1
- package/dist/git/providers/branches.d.ts.map +0 -1
- package/dist/git/providers/branches.js.map +0 -1
- package/dist/git/providers/commits.d.ts.map +0 -1
- package/dist/git/providers/commits.js.map +0 -1
- package/dist/git/providers/config.d.ts.map +0 -1
- package/dist/git/providers/config.js.map +0 -1
- package/dist/git/providers/contributors.d.ts.map +0 -1
- package/dist/git/providers/contributors.js.map +0 -1
- package/dist/git/providers/diff.d.ts.map +0 -1
- package/dist/git/providers/diff.js.map +0 -1
- package/dist/git/providers/graph.d.ts.map +0 -1
- package/dist/git/providers/graph.js.map +0 -1
- package/dist/git/providers/maintenance.d.ts.map +0 -1
- package/dist/git/providers/maintenance.js.map +0 -1
- package/dist/git/providers/operations.d.ts.map +0 -1
- package/dist/git/providers/operations.js.map +0 -1
- package/dist/git/providers/patch.d.ts.map +0 -1
- package/dist/git/providers/patch.js.map +0 -1
- package/dist/git/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git/providers/pausedOperations.js.map +0 -1
- package/dist/git/providers/provider.d.ts.map +0 -1
- package/dist/git/providers/provider.js.map +0 -1
- package/dist/git/providers/refs.d.ts.map +0 -1
- package/dist/git/providers/refs.js.map +0 -1
- package/dist/git/providers/remotes.d.ts.map +0 -1
- package/dist/git/providers/remotes.js.map +0 -1
- package/dist/git/providers/revision.d.ts.map +0 -1
- package/dist/git/providers/revision.js.map +0 -1
- package/dist/git/providers/shared/remotes.d.ts.map +0 -1
- package/dist/git/providers/staging.d.ts.map +0 -1
- package/dist/git/providers/staging.js.map +0 -1
- package/dist/git/providers/stash.d.ts.map +0 -1
- package/dist/git/providers/stash.js.map +0 -1
- package/dist/git/providers/status.d.ts.map +0 -1
- package/dist/git/providers/status.js.map +0 -1
- package/dist/git/providers/tags.d.ts.map +0 -1
- package/dist/git/providers/tags.js.map +0 -1
- package/dist/git/providers/types.d.ts.map +0 -1
- package/dist/git/providers/types.js.map +0 -1
- package/dist/git/providers/worktrees.d.ts.map +0 -1
- package/dist/git/providers/worktrees.js.map +0 -1
- package/dist/git/remotes/azure-devops.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +0 -1
- package/dist/git/remotes/bitbucket.d.ts.map +0 -1
- package/dist/git/remotes/custom.d.ts.map +0 -1
- package/dist/git/remotes/gerrit.d.ts.map +0 -1
- package/dist/git/remotes/gitea.d.ts.map +0 -1
- package/dist/git/remotes/github.d.ts.map +0 -1
- package/dist/git/remotes/gitlab.d.ts.map +0 -1
- package/dist/git/remotes/google-source.d.ts.map +0 -1
- package/dist/git/remotes/matcher.d.ts.map +0 -1
- package/dist/git/repositoryService.d.ts.map +0 -1
- package/dist/git/run.types.d.ts.map +0 -1
- package/dist/git/run.types.js.map +0 -1
- package/dist/git/service.d.ts.map +0 -1
- package/dist/git/utils/autolink.utils.d.ts.map +0 -1
- package/dist/git/utils/blame.utils.d.ts.map +0 -1
- package/dist/git/utils/branch.utils.d.ts.map +0 -1
- package/dist/git/utils/commit.utils.d.ts.map +0 -1
- package/dist/git/utils/config.utils.d.ts.map +0 -1
- package/dist/git/utils/conflictResolution.utils.d.ts.map +0 -1
- package/dist/git/utils/contributor.utils.d.ts.map +0 -1
- package/dist/git/utils/fetch.utils.d.ts.map +0 -1
- package/dist/git/utils/fileStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/graph.utils.d.ts.map +0 -1
- package/dist/git/utils/issue.utils.d.ts.map +0 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +0 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +0 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +0 -1
- package/dist/git/utils/reachability.utils.d.ts.map +0 -1
- package/dist/git/utils/rebase.utils.d.ts.map +0 -1
- package/dist/git/utils/reference.utils.d.ts.map +0 -1
- package/dist/git/utils/remote.utils.d.ts.map +0 -1
- package/dist/git/utils/repository.utils.d.ts.map +0 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +0 -1
- package/dist/git/utils/revision.utils.d.ts.map +0 -1
- package/dist/git/utils/search.utils.d.ts.map +0 -1
- package/dist/git/utils/sorting.d.ts.map +0 -1
- package/dist/git/utils/sshKey.utils.d.ts.map +0 -1
- package/dist/git/utils/status.utils.d.ts.map +0 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +0 -1
- package/dist/git/utils/tag.utils.d.ts.map +0 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +0 -1
- package/dist/git/utils/uriAuthority.d.ts.map +0 -1
- package/dist/git/utils/user.utils.d.ts.map +0 -1
- package/dist/git/utils/worktree.utils.d.ts.map +0 -1
- package/dist/git/watching/changeEvent.d.ts.map +0 -1
- package/dist/git/watching/classifyChange.d.ts.map +0 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +0 -1
- package/dist/git/watching/initWatcher.d.ts.map +0 -1
- package/dist/git/watching/provider.d.ts.map +0 -1
- package/dist/git/watching/provider.js.map +0 -1
- package/dist/git/watching/watchGroup.d.ts.map +0 -1
- package/dist/git/watching/watchService.d.ts.map +0 -1
- package/dist/git/watching/watchSession.d.ts.map +0 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +0 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.errors.js.map +0 -1
- package/dist/git-cli/exec/exec.js.map +0 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +0 -1
- package/dist/git-cli/exec/exec.types.js.map +0 -1
- package/dist/git-cli/exec/features.d.ts.map +0 -1
- package/dist/git-cli/exec/features.js.map +0 -1
- package/dist/git-cli/exec/git.d.ts.map +0 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +0 -1
- package/dist/git-cli/exec/locator.d.ts.map +0 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/statusParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +0 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +0 -1
- package/dist/git-cli/providers/blame.d.ts.map +0 -1
- package/dist/git-cli/providers/branches.d.ts.map +0 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +0 -1
- package/dist/git-cli/providers/commits.d.ts.map +0 -1
- package/dist/git-cli/providers/config.d.ts.map +0 -1
- package/dist/git-cli/providers/contributors.d.ts.map +0 -1
- package/dist/git-cli/providers/diff.d.ts.map +0 -1
- package/dist/git-cli/providers/graph.d.ts.map +0 -1
- package/dist/git-cli/providers/maintenance.d.ts.map +0 -1
- package/dist/git-cli/providers/operations.d.ts.map +0 -1
- package/dist/git-cli/providers/patch.d.ts.map +0 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +0 -1
- package/dist/git-cli/providers/refs.d.ts.map +0 -1
- package/dist/git-cli/providers/remotes.d.ts.map +0 -1
- package/dist/git-cli/providers/revision.d.ts.map +0 -1
- package/dist/git-cli/providers/staging.d.ts.map +0 -1
- package/dist/git-cli/providers/stash.d.ts.map +0 -1
- package/dist/git-cli/providers/status.d.ts.map +0 -1
- package/dist/git-cli/providers/tags.d.ts.map +0 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +0 -1
- package/dist/git-cli/service.d.ts.map +0 -1
- package/dist/ipc/discovery.d.ts.map +0 -1
- package/dist/ipc/ipcServer.d.ts.map +0 -1
- package/dist/plus/agents/agentCapabilities.d.ts.map +0 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +0 -1
- package/dist/plus/agents/providers/gkAgentProvider.d.ts.map +0 -1
- package/dist/plus/agents/sanitizePrompt.d.ts.map +0 -1
- package/dist/plus/agents/stateMachine.d.ts.map +0 -1
- package/dist/plus/agents/types.d.ts.map +0 -1
- package/dist/plus/ai/constants.d.ts.map +0 -1
- package/dist/plus/ai/errors.d.ts.map +0 -1
- package/dist/plus/ai/models/conversation.d.ts.map +0 -1
- package/dist/plus/ai/models/model.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.d.ts.map +0 -1
- package/dist/plus/ai/models/promptTemplates.js.map +0 -1
- package/dist/plus/ai/models/provider.d.ts.map +0 -1
- package/dist/plus/ai/models/provider.js.map +0 -1
- package/dist/plus/ai/models/results.d.ts.map +0 -1
- package/dist/plus/ai/models/results.js.map +0 -1
- package/dist/plus/ai/prompts.d.ts.map +0 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.d.ts.map +0 -1
- package/dist/plus/ai/providers/context.js.map +0 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +0 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts.map +0 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +0 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/results.utils.d.ts.map +0 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/config.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.d.ts.map +0 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +0 -1
- package/dist/plus/git-github/api/issueSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.d.ts.map +0 -1
- package/dist/plus/git-github/api/token.js.map +0 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.d.ts.map +0 -1
- package/dist/plus/git-github/api/types.js.map +0 -1
- package/dist/plus/git-github/context.d.ts.map +0 -1
- package/dist/plus/git-github/models.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +0 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +0 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +0 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/models.d.ts.map +0 -1
- package/dist/plus/integrations/authentication/rejectedTokenTracker.d.ts.map +0 -1
- package/dist/plus/integrations/collectionMetadata.d.ts.map +0 -1
- package/dist/plus/integrations/constants.d.ts.map +0 -1
- package/dist/plus/integrations/context.d.ts.map +0 -1
- package/dist/plus/integrations/context.js.map +0 -1
- package/dist/plus/integrations/errors.d.ts.map +0 -1
- package/dist/plus/integrations/index.d.ts.map +0 -1
- package/dist/plus/integrations/integrationService.d.ts.map +0 -1
- package/dist/plus/integrations/lite.d.ts.map +0 -1
- package/dist/plus/integrations/manager.d.ts.map +0 -1
- package/dist/plus/integrations/manager.js.map +0 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/integration.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueCache.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/issueReads.js.map +0 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.d.ts.map +0 -1
- package/dist/plus/integrations/models/pullRequestReads.js.map +0 -1
- package/dist/plus/integrations/providerFilters.d.ts.map +0 -1
- package/dist/plus/integrations/providers/accounts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiClients.d.ts.map +0 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azure/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +0 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/github/models.js.map +0 -1
- package/dist/plus/integrations/providers/github.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/gitlab.d.ts.map +0 -1
- package/dist/plus/integrations/providers/issueSorts.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jira.d.ts.map +0 -1
- package/dist/plus/integrations/providers/jiraIssueByKey.d.ts.map +0 -1
- package/dist/plus/integrations/providers/linear.d.ts.map +0 -1
- package/dist/plus/integrations/providers/models.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providerErrors.d.ts.map +0 -1
- package/dist/plus/integrations/providers/providersApi.d.ts.map +0 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +0 -1
- package/dist/plus/integrations/providers/trello.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +0 -1
- package/dist/plus/integrations/providers/utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/broaden.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.d.ts.map +0 -1
- package/dist/plus/integrations/reads/context.js.map +0 -1
- package/dist/plus/integrations/reads/counts.d.ts.map +0 -1
- package/dist/plus/integrations/reads/cursors.d.ts.map +0 -1
- package/dist/plus/integrations/reads/drains.d.ts.map +0 -1
- package/dist/plus/integrations/reads/filters.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +0 -1
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueBatch.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +0 -1
- package/dist/plus/integrations/reads/issues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/ordering.d.ts.map +0 -1
- package/dist/plus/integrations/reads/paging.d.ts.map +0 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchIssues.d.ts.map +0 -1
- package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +0 -1
- package/dist/plus/integrations/reads/sweeps.d.ts.map +0 -1
- package/dist/plus/integrations/reads/trackerIssue.d.ts.map +0 -1
- package/dist/plus/integrations/reads/warnings.d.ts.map +0 -1
- package/dist/plus/integrations/results.d.ts.map +0 -1
- package/dist/plus/integrations/telemetry.d.ts.map +0 -1
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +0 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +0 -1
- package/dist/utils/array.d.ts.map +0 -1
- package/dist/utils/base64.d.ts.map +0 -1
- package/dist/utils/base64.js.map +0 -1
- package/dist/utils/brand.d.ts.map +0 -1
- package/dist/utils/brand.js.map +0 -1
- package/dist/utils/cancellation.d.ts.map +0 -1
- package/dist/utils/charCode.d.ts.map +0 -1
- package/dist/utils/coalescedRun.d.ts.map +0 -1
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/counter.d.ts.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/crypto.js.map +0 -1
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/debounce.d.ts.map +0 -1
- package/dist/utils/decorators/gate.d.ts.map +0 -1
- package/dist/utils/decorators/log.d.ts.map +0 -1
- package/dist/utils/decorators/memoize.d.ts.map +0 -1
- package/dist/utils/decorators/resolver.d.ts.map +0 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +0 -1
- package/dist/utils/decorators/serializable.d.ts.map +0 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +0 -1
- package/dist/utils/diff.d.ts.map +0 -1
- package/dist/utils/disposable.d.ts.map +0 -1
- package/dist/utils/encoding.d.ts.map +0 -1
- package/dist/utils/env/browser/base64.d.ts.map +0 -1
- package/dist/utils/env/browser/crypto.d.ts.map +0 -1
- package/dist/utils/env/browser/fs.d.ts.map +0 -1
- package/dist/utils/env/browser/hex.d.ts.map +0 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +0 -1
- package/dist/utils/env/browser/logScope.d.ts.map +0 -1
- package/dist/utils/env/browser/md5.d.ts.map +0 -1
- package/dist/utils/env/browser/platform.d.ts.map +0 -1
- package/dist/utils/env/node/base64.d.ts.map +0 -1
- package/dist/utils/env/node/crypto.d.ts.map +0 -1
- package/dist/utils/env/node/exec.d.ts.map +0 -1
- package/dist/utils/env/node/fs.d.ts.map +0 -1
- package/dist/utils/env/node/hex.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.d.ts.map +0 -1
- package/dist/utils/env/node/hrtime.js.map +0 -1
- package/dist/utils/env/node/logScope.d.ts.map +0 -1
- package/dist/utils/env/node/platform.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/event.d.ts.map +0 -1
- package/dist/utils/formatter.d.ts.map +0 -1
- package/dist/utils/fs.d.ts.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/function.d.ts.map +0 -1
- package/dist/utils/fuzzy.d.ts.map +0 -1
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hex.d.ts.map +0 -1
- package/dist/utils/hex.js.map +0 -1
- package/dist/utils/hrtime.d.ts.map +0 -1
- package/dist/utils/iterable.d.ts.map +0 -1
- package/dist/utils/keys/chord.d.ts.map +0 -1
- package/dist/utils/keys/keybinding.d.ts.map +0 -1
- package/dist/utils/lazy.d.ts.map +0 -1
- package/dist/utils/loggable.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.scoped.d.ts.map +0 -1
- package/dist/utils/lruMap.d.ts.map +0 -1
- package/dist/utils/markdown.d.ts.map +0 -1
- package/dist/utils/mru.d.ts.map +0 -1
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/paging.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/promise.d.ts.map +0 -1
- package/dist/utils/promiseCache.d.ts.map +0 -1
- package/dist/utils/resourceUsage.d.ts.map +0 -1
- package/dist/utils/resourceUsage.js.map +0 -1
- package/dist/utils/searchTree.d.ts.map +0 -1
- package/dist/utils/stopwatch.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/subscriptionManager.d.ts.map +0 -1
- package/dist/utils/trie.d.ts.map +0 -1
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js.map +0 -1
- package/dist/utils/uri.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/version.d.ts.map +0 -1
- package/src/git/cache.ts +0 -1859
- package/src/git/context.ts +0 -301
- package/src/git/errors.ts +0 -1168
- package/src/git/features.ts +0 -98
- package/src/git/gitHealth.ts +0 -522
- package/src/git/models/author.ts +0 -19
- package/src/git/models/autolink.ts +0 -59
- package/src/git/models/blame.ts +0 -46
- package/src/git/models/branch.ts +0 -237
- package/src/git/models/commit.ts +0 -673
- package/src/git/models/contributor.ts +0 -84
- package/src/git/models/defaultBranch.ts +0 -6
- package/src/git/models/diff.ts +0 -74
- package/src/git/models/file.ts +0 -29
- package/src/git/models/fileChange.ts +0 -82
- package/src/git/models/fileStatus.ts +0 -36
- package/src/git/models/graph.ts +0 -444
- package/src/git/models/graphSearch.ts +0 -53
- package/src/git/models/graphSession.ts +0 -102
- package/src/git/models/issue.ts +0 -273
- package/src/git/models/issueOrPullRequest.ts +0 -20
- package/src/git/models/lineRange.ts +0 -7
- package/src/git/models/log.ts +0 -21
- package/src/git/models/mergeConflicts.ts +0 -19
- package/src/git/models/patch.ts +0 -25
- package/src/git/models/pausedOperationStatus.ts +0 -63
- package/src/git/models/pullRequest.ts +0 -357
- package/src/git/models/rebase.ts +0 -60
- package/src/git/models/reference.ts +0 -80
- package/src/git/models/reflog.ts +0 -88
- package/src/git/models/remote.ts +0 -100
- package/src/git/models/remoteProvider.ts +0 -291
- package/src/git/models/remoteResource.ts +0 -87
- package/src/git/models/repository.ts +0 -510
- package/src/git/models/repositoryChangeEvent.ts +0 -30
- package/src/git/models/repositoryIdentities.ts +0 -99
- package/src/git/models/repositoryMetadata.ts +0 -12
- package/src/git/models/resourceDescriptor.ts +0 -28
- package/src/git/models/revision.ts +0 -12
- package/src/git/models/search.ts +0 -138
- package/src/git/models/shortlog.ts +0 -6
- package/src/git/models/signature.ts +0 -45
- package/src/git/models/staging.ts +0 -27
- package/src/git/models/stash.ts +0 -6
- package/src/git/models/status.ts +0 -246
- package/src/git/models/statusFile.ts +0 -131
- package/src/git/models/tag.ts +0 -76
- package/src/git/models/tree.ts +0 -10
- package/src/git/models/user.ts +0 -7
- package/src/git/models/worktree.ts +0 -160
- package/src/git/parsers/diffParser.ts +0 -648
- package/src/git/parsers/rebaseTodoParser.ts +0 -169
- package/src/git/providers/blame.ts +0 -40
- package/src/git/providers/branches.ts +0 -143
- package/src/git/providers/commits.ts +0 -174
- package/src/git/providers/config.ts +0 -167
- package/src/git/providers/contributors.ts +0 -34
- package/src/git/providers/diff.ts +0 -133
- package/src/git/providers/graph.ts +0 -95
- package/src/git/providers/maintenance.ts +0 -224
- package/src/git/providers/operations.ts +0 -164
- package/src/git/providers/patch.ts +0 -31
- package/src/git/providers/pausedOperations.ts +0 -23
- package/src/git/providers/provider.ts +0 -64
- package/src/git/providers/refs.ts +0 -68
- package/src/git/providers/remotes.ts +0 -33
- package/src/git/providers/revision.ts +0 -32
- package/src/git/providers/shared/remotes.ts +0 -95
- package/src/git/providers/staging.ts +0 -36
- package/src/git/providers/stash.ts +0 -51
- package/src/git/providers/status.ts +0 -48
- package/src/git/providers/tags.ts +0 -29
- package/src/git/providers/types.ts +0 -33
- package/src/git/providers/worktrees.ts +0 -37
- package/src/git/remotes/azure-devops.ts +0 -361
- package/src/git/remotes/bitbucket-server.ts +0 -189
- package/src/git/remotes/bitbucket.ts +0 -142
- package/src/git/remotes/custom.ts +0 -162
- package/src/git/remotes/gerrit.ts +0 -186
- package/src/git/remotes/gitea.ts +0 -184
- package/src/git/remotes/github.ts +0 -236
- package/src/git/remotes/gitlab.ts +0 -270
- package/src/git/remotes/google-source.ts +0 -51
- package/src/git/remotes/matcher.ts +0 -215
- package/src/git/repositoryService.ts +0 -180
- package/src/git/run.types.ts +0 -156
- package/src/git/service.ts +0 -369
- package/src/git/utils/autolink.utils.ts +0 -202
- package/src/git/utils/blame.utils.ts +0 -298
- package/src/git/utils/branch.utils.ts +0 -165
- package/src/git/utils/commit.utils.ts +0 -89
- package/src/git/utils/config.utils.ts +0 -8
- package/src/git/utils/conflictResolution.utils.ts +0 -157
- package/src/git/utils/contributor.utils.ts +0 -105
- package/src/git/utils/fetch.utils.ts +0 -48
- package/src/git/utils/fileStatus.utils.ts +0 -62
- package/src/git/utils/graph.utils.ts +0 -46
- package/src/git/utils/issue.utils.ts +0 -187
- package/src/git/utils/issueOrPullRequest.utils.ts +0 -23
- package/src/git/utils/mergeConflicts.utils.ts +0 -21
- package/src/git/utils/pausedOperationStatus.utils.ts +0 -184
- package/src/git/utils/pullRequest.utils.ts +0 -244
- package/src/git/utils/reachability.utils.ts +0 -180
- package/src/git/utils/rebase.utils.ts +0 -128
- package/src/git/utils/reference.utils.ts +0 -267
- package/src/git/utils/remote.utils.ts +0 -146
- package/src/git/utils/repository.utils.ts +0 -18
- package/src/git/utils/resourceDescriptor.utils.ts +0 -26
- package/src/git/utils/revision.utils.ts +0 -149
- package/src/git/utils/search.utils.ts +0 -624
- package/src/git/utils/sorting.ts +0 -329
- package/src/git/utils/sshKey.utils.ts +0 -30
- package/src/git/utils/status.utils.ts +0 -115
- package/src/git/utils/statusFile.utils.ts +0 -182
- package/src/git/utils/tag.utils.ts +0 -17
- package/src/git/utils/tooltip.utils.ts +0 -37
- package/src/git/utils/uriAuthority.ts +0 -34
- package/src/git/utils/user.utils.ts +0 -20
- package/src/git/utils/worktree.utils.ts +0 -21
- package/src/git/watching/changeEvent.ts +0 -95
- package/src/git/watching/classifyChange.ts +0 -104
- package/src/git/watching/gitIgnoreFilter.ts +0 -134
- package/src/git/watching/initWatcher.ts +0 -81
- package/src/git/watching/provider.ts +0 -24
- package/src/git/watching/watchGroup.ts +0 -185
- package/src/git/watching/watchService.ts +0 -430
- package/src/git/watching/watchSession.ts +0 -439
- package/src/git/watching/watcherPatterns.ts +0 -51
- package/src/git-cli/cliGitProvider.ts +0 -461
- package/src/git-cli/exec/exec.errors.ts +0 -1
- package/src/git-cli/exec/exec.ts +0 -11
- package/src/git-cli/exec/exec.types.ts +0 -8
- package/src/git-cli/exec/features.ts +0 -2
- package/src/git-cli/exec/git.ts +0 -1371
- package/src/git-cli/exec/gitQueue.ts +0 -326
- package/src/git-cli/exec/locator.ts +0 -157
- package/src/git-cli/parsers/blameParser.ts +0 -374
- package/src/git-cli/parsers/indexParser.ts +0 -192
- package/src/git-cli/parsers/logParser.ts +0 -1365
- package/src/git-cli/parsers/mergeTreeParser.ts +0 -22
- package/src/git-cli/parsers/refParser.ts +0 -110
- package/src/git-cli/parsers/reflogParser.ts +0 -153
- package/src/git-cli/parsers/remoteParser.ts +0 -95
- package/src/git-cli/parsers/shortlogParser.ts +0 -59
- package/src/git-cli/parsers/signatureParser.ts +0 -162
- package/src/git-cli/parsers/sshSignatureParser.ts +0 -85
- package/src/git-cli/parsers/statusParser.ts +0 -209
- package/src/git-cli/parsers/treeParser.ts +0 -61
- package/src/git-cli/parsers/worktreeParser.ts +0 -111
- package/src/git-cli/providers/blame.ts +0 -598
- package/src/git-cli/providers/branches.ts +0 -1931
- package/src/git-cli/providers/commitFilesetUtils.ts +0 -45
- package/src/git-cli/providers/commits.ts +0 -1856
- package/src/git-cli/providers/config.ts +0 -1025
- package/src/git-cli/providers/contributors.ts +0 -360
- package/src/git-cli/providers/diff.ts +0 -1172
- package/src/git-cli/providers/graph.ts +0 -2237
- package/src/git-cli/providers/maintenance.ts +0 -2599
- package/src/git-cli/providers/operations.ts +0 -1016
- package/src/git-cli/providers/patch.ts +0 -305
- package/src/git-cli/providers/pausedOperations.ts +0 -670
- package/src/git-cli/providers/refs.ts +0 -486
- package/src/git-cli/providers/remotes.ts +0 -115
- package/src/git-cli/providers/revision.ts +0 -383
- package/src/git-cli/providers/staging.ts +0 -210
- package/src/git-cli/providers/stash.ts +0 -577
- package/src/git-cli/providers/status.ts +0 -568
- package/src/git-cli/providers/tags.ts +0 -224
- package/src/git-cli/providers/worktrees.ts +0 -285
- package/src/git-cli/service.ts +0 -82
- package/src/ipc/discovery.ts +0 -186
- package/src/ipc/ipcServer.ts +0 -171
- package/src/plus/agents/agentCapabilities.ts +0 -286
- package/src/plus/agents/providers/claudeCodeTranscript.ts +0 -867
- package/src/plus/agents/providers/gkAgentProvider.ts +0 -4036
- package/src/plus/agents/sanitizePrompt.ts +0 -109
- package/src/plus/agents/stateMachine.ts +0 -197
- package/src/plus/agents/types.ts +0 -500
- package/src/plus/ai/constants.ts +0 -121
- package/src/plus/ai/errors.ts +0 -152
- package/src/plus/ai/models/conversation.ts +0 -35
- package/src/plus/ai/models/model.ts +0 -528
- package/src/plus/ai/models/promptTemplates.ts +0 -171
- package/src/plus/ai/models/provider.ts +0 -125
- package/src/plus/ai/models/results.ts +0 -31
- package/src/plus/ai/prompts.ts +0 -849
- package/src/plus/ai/providers/anthropicProvider.ts +0 -458
- package/src/plus/ai/providers/azureProvider.ts +0 -74
- package/src/plus/ai/providers/context.ts +0 -29
- package/src/plus/ai/providers/deepSeekProvider.ts +0 -46
- package/src/plus/ai/providers/geminiProvider.ts +0 -245
- package/src/plus/ai/providers/gitkrakenProvider.ts +0 -347
- package/src/plus/ai/providers/huggingFaceProvider.ts +0 -64
- package/src/plus/ai/providers/mistralProvider.ts +0 -243
- package/src/plus/ai/providers/ollamaProvider.ts +0 -292
- package/src/plus/ai/providers/openAICompatibleProvider.ts +0 -64
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +0 -654
- package/src/plus/ai/providers/openRouterProvider.ts +0 -101
- package/src/plus/ai/providers/openaiProvider.ts +0 -47
- package/src/plus/ai/providers/responseFormatCache.ts +0 -39
- package/src/plus/ai/providers/xaiProvider.ts +0 -54
- package/src/plus/ai/utils/ai.utils.ts +0 -95
- package/src/plus/ai/utils/results.utils.ts +0 -407
- package/src/plus/ai/utils/truncation.utils.ts +0 -296
- package/src/plus/git-github/api/config.ts +0 -91
- package/src/plus/git-github/api/github.ts +0 -5462
- package/src/plus/git-github/api/github.utils.ts +0 -36
- package/src/plus/git-github/api/issueSearchQuery.ts +0 -273
- package/src/plus/git-github/api/pullRequestSearchQuery.ts +0 -154
- package/src/plus/git-github/api/token.ts +0 -15
- package/src/plus/git-github/api/tokenUtils.ts +0 -15
- package/src/plus/git-github/api/types.ts +0 -197
- package/src/plus/git-github/context.ts +0 -107
- package/src/plus/git-github/models.ts +0 -623
- package/src/plus/git-github/providers/github/blame.ts +0 -225
- package/src/plus/git-github/providers/github/branches.ts +0 -401
- package/src/plus/git-github/providers/github/commits.ts +0 -929
- package/src/plus/git-github/providers/github/config.ts +0 -47
- package/src/plus/git-github/providers/github/contributors.ts +0 -313
- package/src/plus/git-github/providers/github/diff.ts +0 -281
- package/src/plus/git-github/providers/github/graph.ts +0 -635
- package/src/plus/git-github/providers/github/refs.ts +0 -172
- package/src/plus/git-github/providers/github/remotes.ts +0 -44
- package/src/plus/git-github/providers/github/revision.ts +0 -140
- package/src/plus/git-github/providers/github/status.ts +0 -69
- package/src/plus/git-github/providers/github/tags.ts +0 -148
- package/src/plus/git-github/providers/githubGitProvider.ts +0 -168
- package/src/plus/git-github/providers/githubProvider.ts +0 -65
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +0 -292
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +0 -656
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +0 -385
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +0 -148
- package/src/plus/integrations/authentication/manualTokenProvider.ts +0 -79
- package/src/plus/integrations/authentication/models.ts +0 -202
- package/src/plus/integrations/authentication/rejectedTokenTracker.ts +0 -56
- package/src/plus/integrations/collectionMetadata.ts +0 -325
- package/src/plus/integrations/constants.ts +0 -190
- package/src/plus/integrations/context.ts +0 -386
- package/src/plus/integrations/errors.ts +0 -188
- package/src/plus/integrations/index.ts +0 -231
- package/src/plus/integrations/integrationService.ts +0 -2003
- package/src/plus/integrations/lite.ts +0 -233
- package/src/plus/integrations/manager.ts +0 -728
- package/src/plus/integrations/models/gitHostIntegration.ts +0 -1862
- package/src/plus/integrations/models/integration.ts +0 -1005
- package/src/plus/integrations/models/issueCache.ts +0 -29
- package/src/plus/integrations/models/issueReads.ts +0 -152
- package/src/plus/integrations/models/issuesIntegration.ts +0 -248
- package/src/plus/integrations/models/pullRequestReads.ts +0 -18
- package/src/plus/integrations/providerFilters.ts +0 -36
- package/src/plus/integrations/providers/accounts.ts +0 -38
- package/src/plus/integrations/providers/apiClients.ts +0 -69
- package/src/plus/integrations/providers/apiConfig.ts +0 -71
- package/src/plus/integrations/providers/azure/azure.ts +0 -953
- package/src/plus/integrations/providers/azure/models.ts +0 -723
- package/src/plus/integrations/providers/azureDevOps.ts +0 -1355
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +0 -904
- package/src/plus/integrations/providers/bitbucket/models.ts +0 -446
- package/src/plus/integrations/providers/bitbucket-server/models.ts +0 -283
- package/src/plus/integrations/providers/bitbucket-server.ts +0 -445
- package/src/plus/integrations/providers/bitbucket.ts +0 -793
- package/src/plus/integrations/providers/github/github.ts +0 -64
- package/src/plus/integrations/providers/github/github.utils.ts +0 -23
- package/src/plus/integrations/providers/github/models.ts +0 -29
- package/src/plus/integrations/providers/github.ts +0 -940
- package/src/plus/integrations/providers/gitlab/gitlab.ts +0 -1320
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +0 -80
- package/src/plus/integrations/providers/gitlab/models.ts +0 -271
- package/src/plus/integrations/providers/gitlab.ts +0 -841
- package/src/plus/integrations/providers/issueSorts.ts +0 -89
- package/src/plus/integrations/providers/jira.ts +0 -596
- package/src/plus/integrations/providers/jiraIssueByKey.ts +0 -155
- package/src/plus/integrations/providers/linear.ts +0 -484
- package/src/plus/integrations/providers/models.ts +0 -1833
- package/src/plus/integrations/providers/providerErrors.ts +0 -115
- package/src/plus/integrations/providers/providersApi.ts +0 -1881
- package/src/plus/integrations/providers/pullRequestReviews.ts +0 -122
- package/src/plus/integrations/providers/trello.ts +0 -208
- package/src/plus/integrations/providers/utils/providerPaging.ts +0 -212
- package/src/plus/integrations/providers/utils.ts +0 -419
- package/src/plus/integrations/reads/broaden.ts +0 -704
- package/src/plus/integrations/reads/context.ts +0 -99
- package/src/plus/integrations/reads/counts.ts +0 -610
- package/src/plus/integrations/reads/cursors.ts +0 -224
- package/src/plus/integrations/reads/drains.ts +0 -420
- package/src/plus/integrations/reads/filters.ts +0 -614
- package/src/plus/integrations/reads/hierarchy.ts +0 -486
- package/src/plus/integrations/reads/hierarchy.utils.ts +0 -155
- package/src/plus/integrations/reads/issueBatch.ts +0 -197
- package/src/plus/integrations/reads/issueTracker.ts +0 -556
- package/src/plus/integrations/reads/issues.ts +0 -600
- package/src/plus/integrations/reads/ordering.ts +0 -124
- package/src/plus/integrations/reads/paging.ts +0 -379
- package/src/plus/integrations/reads/pullRequests.ts +0 -260
- package/src/plus/integrations/reads/resolveRepository.ts +0 -275
- package/src/plus/integrations/reads/searchIssues.ts +0 -274
- package/src/plus/integrations/reads/searchPullRequests.ts +0 -235
- package/src/plus/integrations/reads/sweeps.ts +0 -266
- package/src/plus/integrations/reads/trackerIssue.ts +0 -105
- package/src/plus/integrations/reads/warnings.ts +0 -535
- package/src/plus/integrations/results.ts +0 -443
- package/src/plus/integrations/telemetry.ts +0 -29
- package/src/plus/integrations/utils/domain.utils.ts +0 -26
- package/src/plus/integrations/utils/integration.utils.ts +0 -215
- package/src/utils/array.ts +0 -194
- package/src/utils/base64.ts +0 -1
- package/src/utils/brand.ts +0 -7
- package/src/utils/cancellation.ts +0 -199
- package/src/utils/charCode.ts +0 -38
- package/src/utils/coalescedRun.ts +0 -45
- package/src/utils/color.ts +0 -817
- package/src/utils/counter.ts +0 -21
- package/src/utils/crypto.ts +0 -1
- package/src/utils/date.ts +0 -474
- package/src/utils/debounce.ts +0 -303
- package/src/utils/decorators/debounce.ts +0 -31
- package/src/utils/decorators/gate.ts +0 -167
- package/src/utils/decorators/log.ts +0 -320
- package/src/utils/decorators/memoize.ts +0 -98
- package/src/utils/decorators/resolver.ts +0 -95
- package/src/utils/decorators/sequentialize.ts +0 -118
- package/src/utils/decorators/serializable.ts +0 -43
- package/src/utils/dedupedAsyncCache.ts +0 -74
- package/src/utils/diff.ts +0 -61
- package/src/utils/disposable.ts +0 -156
- package/src/utils/encoding.ts +0 -8
- package/src/utils/env/browser/base64.ts +0 -50
- package/src/utils/env/browser/crypto.ts +0 -21
- package/src/utils/env/browser/fs.ts +0 -3
- package/src/utils/env/browser/hex.ts +0 -41
- package/src/utils/env/browser/hrtime.ts +0 -14
- package/src/utils/env/browser/logScope.ts +0 -57
- package/src/utils/env/browser/md5.ts +0 -217
- package/src/utils/env/browser/platform.ts +0 -10
- package/src/utils/env/node/base64.ts +0 -19
- package/src/utils/env/node/crypto.ts +0 -17
- package/src/utils/env/node/exec.ts +0 -488
- package/src/utils/env/node/fs.ts +0 -5
- package/src/utils/env/node/hex.ts +0 -11
- package/src/utils/env/node/hrtime.ts +0 -1
- package/src/utils/env/node/logScope.ts +0 -63
- package/src/utils/env/node/platform.ts +0 -5
- package/src/utils/error.ts +0 -18
- package/src/utils/event.ts +0 -230
- package/src/utils/formatter.ts +0 -198
- package/src/utils/fs.ts +0 -1
- package/src/utils/function.ts +0 -141
- package/src/utils/fuzzy.ts +0 -185
- package/src/utils/hash.ts +0 -60
- package/src/utils/hex.ts +0 -1
- package/src/utils/hrtime.ts +0 -8
- package/src/utils/iterable.ts +0 -797
- package/src/utils/keys/chord.ts +0 -184
- package/src/utils/keys/keybinding.ts +0 -116
- package/src/utils/lazy.ts +0 -39
- package/src/utils/loggable.ts +0 -7
- package/src/utils/logger.scoped.ts +0 -237
- package/src/utils/logger.ts +0 -403
- package/src/utils/lruMap.ts +0 -112
- package/src/utils/markdown.ts +0 -115
- package/src/utils/mru.ts +0 -68
- package/src/utils/object.ts +0 -278
- package/src/utils/paging.ts +0 -97
- package/src/utils/path.ts +0 -204
- package/src/utils/platform.ts +0 -1
- package/src/utils/promise.ts +0 -657
- package/src/utils/promiseCache.ts +0 -908
- package/src/utils/resourceUsage.ts +0 -5
- package/src/utils/searchTree.ts +0 -444
- package/src/utils/stopwatch.ts +0 -125
- package/src/utils/string.ts +0 -1003
- package/src/utils/subscriptionManager.ts +0 -40
- package/src/utils/trie.ts +0 -740
- package/src/utils/types.ts +0 -31
- package/src/utils/uri.ts +0 -118
- package/src/utils/validation.ts +0 -38
- package/src/utils/version.ts +0 -128
|
@@ -1,2237 +0,0 @@
|
|
|
1
|
-
import type { Cache } from '../../git/cache.js';
|
|
2
|
-
import type { GitServiceContext } from '../../git/context.js';
|
|
3
|
-
import { GitSearchError } from '../../git/errors.js';
|
|
4
|
-
import type { GitBranch } from '../../git/models/branch.js';
|
|
5
|
-
import type { GitStashCommit } from '../../git/models/commit.js';
|
|
6
|
-
import type {
|
|
7
|
-
GitGraph,
|
|
8
|
-
GitGraphRow,
|
|
9
|
-
GitGraphRowHead,
|
|
10
|
-
GitGraphRowRemoteHead,
|
|
11
|
-
GitGraphRowsStats,
|
|
12
|
-
GitGraphRowStats,
|
|
13
|
-
GitGraphRowTag,
|
|
14
|
-
GraphContext,
|
|
15
|
-
GraphIncrementalSeed,
|
|
16
|
-
GraphReachabilityTable,
|
|
17
|
-
GraphRowProcessor,
|
|
18
|
-
IncrementalGraphFallbackReason,
|
|
19
|
-
IncrementalGraphOutcome,
|
|
20
|
-
} from '../../git/models/graph.js';
|
|
21
|
-
import type {
|
|
22
|
-
GitGraphSearch,
|
|
23
|
-
GitGraphSearchCursor,
|
|
24
|
-
GitGraphSearchProgress,
|
|
25
|
-
GitGraphSearchResultData,
|
|
26
|
-
GitGraphSearchResults,
|
|
27
|
-
} from '../../git/models/graphSearch.js';
|
|
28
|
-
import type {
|
|
29
|
-
GitGraphSession,
|
|
30
|
-
GitGraphSessionChangedChannels,
|
|
31
|
-
GitGraphSessionRefreshOptions,
|
|
32
|
-
GitGraphSessionRefreshResult,
|
|
33
|
-
} from '../../git/models/graphSession.js';
|
|
34
|
-
import type { GitRemote } from '../../git/models/remote.js';
|
|
35
|
-
import type { SearchQuery } from '../../git/models/search.js';
|
|
36
|
-
import type { GitWorktree } from '../../git/models/worktree.js';
|
|
37
|
-
import type { GitCommitReachability } from '../../git/providers/commits.js';
|
|
38
|
-
import type { GitGraphSubProvider } from '../../git/providers/graph.js';
|
|
39
|
-
import {
|
|
40
|
-
getBranchId,
|
|
41
|
-
getBranchNameWithoutRemote,
|
|
42
|
-
getRemoteNameFromBranchName,
|
|
43
|
-
} from '../../git/utils/branch.utils.js';
|
|
44
|
-
import { appendRowsAtCursor, mergeAvatarsForward } from '../../git/utils/graph.utils.js';
|
|
45
|
-
import { computeGraphRowContextFlags, createReachabilityTableBuilder } from '../../git/utils/reachability.utils.js';
|
|
46
|
-
import { isUncommitted } from '../../git/utils/revision.utils.js';
|
|
47
|
-
import { getSearchQueryComparisonKey, parseSearchQueryGitCommand } from '../../git/utils/search.utils.js';
|
|
48
|
-
import { getTagId } from '../../git/utils/tag.utils.js';
|
|
49
|
-
import { isUserMatch } from '../../git/utils/user.utils.js';
|
|
50
|
-
import { getWorktreeId, groupWorktreesByBranch } from '../../git/utils/worktree.utils.js';
|
|
51
|
-
import { isCancellationError } from '../../utils/cancellation.js';
|
|
52
|
-
import { debug } from '../../utils/decorators/log.js';
|
|
53
|
-
import { createDisposable } from '../../utils/disposable.js';
|
|
54
|
-
import { fnv1aHash64 } from '../../utils/hash.js';
|
|
55
|
-
import { find, first, join, last } from '../../utils/iterable.js';
|
|
56
|
-
import { getScopedLogger } from '../../utils/logger.scoped.js';
|
|
57
|
-
import { getSettledValue } from '../../utils/promise.js';
|
|
58
|
-
import type { CliGitProviderInternal } from '../cliGitProvider.js';
|
|
59
|
-
import type { Git } from '../exec/git.js';
|
|
60
|
-
import { classifySearchError, gitConfigsLog } from '../exec/git.js';
|
|
61
|
-
import {
|
|
62
|
-
getGraphParser,
|
|
63
|
-
getShaAndDatesLogParser,
|
|
64
|
-
getShaAndDatesWithFilesLogParser,
|
|
65
|
-
getShaAndStatsLogParser,
|
|
66
|
-
getShaLogParser,
|
|
67
|
-
} from '../parsers/logParser.js';
|
|
68
|
-
import { convertStashesToStdin } from './stash.js';
|
|
69
|
-
|
|
70
|
-
const progressiveSearchResultsBatchTimeMs = 500; // Send updates every 500ms (2 updates/second)
|
|
71
|
-
|
|
72
|
-
type ReachableRef = GitCommitReachability['refs'][number];
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Whether a ref participates in graph row decoration (a branch/remote/tag badge) and so must be diffed by
|
|
76
|
-
* the R6b tip gate. Excludes `refs/stash` (handled by the stash gate) and symbolic `…/HEAD` refs (they
|
|
77
|
-
* mirror another ref and produce no badge of their own).
|
|
78
|
-
*/
|
|
79
|
-
function isMoveableGraphRef(refname: string): boolean {
|
|
80
|
-
if (refname === 'refs/stash' || refname === 'HEAD' || refname.endsWith('/HEAD')) return false;
|
|
81
|
-
|
|
82
|
-
return refname.startsWith('refs/heads/') || refname.startsWith('refs/remotes/') || refname.startsWith('refs/tags/');
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Fingerprints the GLOBAL side inputs row construction embeds into row decorations — the default branch
|
|
87
|
-
* (and whether a local branch shadows it), HEAD's upstream, remote urls/providers, secondary-worktree
|
|
88
|
-
* assignments, and the current user. These can all change WITHOUT moving any ref tip (`git remote
|
|
89
|
-
* set-head`, remote/user config edits, `git worktree add`), and the R6b fast path reuses prior rows
|
|
90
|
-
* wholesale (only flags/reachability are re-derived) — so it compares this against the seed's and falls
|
|
91
|
-
* back to the full walk (which rebuilds every decoration) on ANY change. Deliberately EXCLUDES what other
|
|
92
|
-
* gates already own — ref existence/tips (tip gate), the default worktree's checkout (HEAD gate), and
|
|
93
|
-
* per-branch upstream mappings (checked row-by-row against the seed's embedded pills, so tracking-branch
|
|
94
|
-
* CREATES stay fast) — keeping the high-frequency events (commits, branch/tag creates, fetches,
|
|
95
|
-
* checkouts) on the fast path. Sorted so map/list iteration order can't produce spurious mismatches.
|
|
96
|
-
*/
|
|
97
|
-
function computeDecorationFingerprint(
|
|
98
|
-
repoPath: string,
|
|
99
|
-
defaultBranchName: string | undefined,
|
|
100
|
-
defaultLocalName: string | undefined,
|
|
101
|
-
headRefUpstreamName: string | undefined,
|
|
102
|
-
branches: readonly GitBranch[] | undefined,
|
|
103
|
-
remotes: readonly GitRemote[] | undefined,
|
|
104
|
-
worktrees: readonly GitWorktree[],
|
|
105
|
-
currentUser: { name: string | undefined; email: string | undefined } | undefined,
|
|
106
|
-
): string {
|
|
107
|
-
// Remote-head default markers read `!branchMap.has(defaultLocalName)` — a local branch appearing at (or
|
|
108
|
-
// vanishing from) the default's local name flips them even though the DEFAULT ref itself didn't move.
|
|
109
|
-
const localShadowsDefault = defaultLocalName != null && (branches?.some(b => b.name === defaultLocalName) ?? false);
|
|
110
|
-
const parts: string[] = [
|
|
111
|
-
`d:${defaultBranchName ?? ''}|${localShadowsDefault ? 's' : ''}`,
|
|
112
|
-
`h:${headRefUpstreamName ?? ''}`,
|
|
113
|
-
`u:${currentUser?.name ?? ''}|${currentUser?.email ?? ''}`,
|
|
114
|
-
];
|
|
115
|
-
if (branches != null) {
|
|
116
|
-
for (const b of branches) {
|
|
117
|
-
// `+starred` is baked into branch pills' serialized contexts (local AND remote heads); a
|
|
118
|
-
// disposition change moves no ref tip, so it must bust the fingerprint. Star/unstar is rare —
|
|
119
|
-
// one full walk per transition is fine.
|
|
120
|
-
if (b.starred) {
|
|
121
|
-
parts.push(`s:${b.name}`);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (remotes != null) {
|
|
126
|
-
for (const r of remotes) {
|
|
127
|
-
parts.push(`r:${r.name}|${r.url}|${r.provider?.gkProviderId ?? ''}`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
let defaultWorktreeBranch: string | undefined;
|
|
131
|
-
let defaultWorktreePath: string | undefined;
|
|
132
|
-
for (const w of worktrees) {
|
|
133
|
-
if (w.isDefault) {
|
|
134
|
-
defaultWorktreeBranch = w.branch?.name;
|
|
135
|
-
defaultWorktreePath = w.path;
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
// Only branch-attached SECONDARY worktrees decorate rows: bare/detached ones are excluded from
|
|
139
|
-
// `worktreesByBranch` (no pill). NOTE: `w.name` is deliberately avoided; it embeds the checked-out
|
|
140
|
-
// branch (and a detached sha), which would bust this on every checkout.
|
|
141
|
-
if (w.type !== 'branch') continue;
|
|
142
|
-
|
|
143
|
-
parts.push(`w:${w.branch?.name ?? ''}|${w.path}`);
|
|
144
|
-
}
|
|
145
|
-
// The DEFAULT worktree's checkout flips `+checkedout` / the main-path worktree recovery on two branch
|
|
146
|
-
// pills. When the graph IS the default worktree, that's the ordinary HEAD move (the HEAD gate refetches
|
|
147
|
-
// both endpoint rows) — but a graph on a SECONDARY worktree sees no HEAD move when the MAIN worktree
|
|
148
|
-
// checks out, so the assignment must fingerprint there. (`w.path` for the default worktree equals the
|
|
149
|
-
// main repo path in this provider's normalization — pinned by a WorktreesSubProvider test.)
|
|
150
|
-
if (defaultWorktreePath != null && defaultWorktreePath !== repoPath) {
|
|
151
|
-
parts.push(`wd:${defaultWorktreeBranch ?? ''}`);
|
|
152
|
-
}
|
|
153
|
-
parts.sort();
|
|
154
|
-
return fnv1aHash64(parts.join('\x00'));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Whether the shared reachability TABLE changed between two refresh generations. The table is append-only
|
|
159
|
-
* within a generation (`id`), so a new `id` or a grown dictionary/sets length is an EXACT signal — a per-row
|
|
160
|
-
* index that re-points to an already-present set doesn't grow the table (that change rides the rows channel).
|
|
161
|
-
*/
|
|
162
|
-
function reachabilityTableChanged(
|
|
163
|
-
prior: GraphReachabilityTable | undefined,
|
|
164
|
-
next: GraphReachabilityTable | undefined,
|
|
165
|
-
): boolean {
|
|
166
|
-
if (prior == null || next == null) return prior !== next;
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
prior.id !== next.id ||
|
|
170
|
-
prior.dictionary.length !== next.dictionary.length ||
|
|
171
|
-
prior.sets.length !== next.sets.length
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Whether the downstreams map (upstream name → tracking branch names) changed between two refresh
|
|
177
|
-
* generations. Order-sensitive on the arrays: a mere reorder reports "changed" and re-ships the full map,
|
|
178
|
-
* which is harmless — a false negative would silently drop a real upstream change, so err toward "changed".
|
|
179
|
-
*/
|
|
180
|
-
function downstreamsChanged(prior: ReadonlyMap<string, string[]>, next: ReadonlyMap<string, string[]>): boolean {
|
|
181
|
-
if (prior.size !== next.size) return true;
|
|
182
|
-
|
|
183
|
-
for (const [key, priorNames] of prior) {
|
|
184
|
-
const nextNames = next.get(key);
|
|
185
|
-
if (nextNames == null || nextNames.length !== priorNames.length) return true;
|
|
186
|
-
|
|
187
|
-
for (let i = 0; i < priorNames.length; i++) {
|
|
188
|
-
if (priorNames[i] !== nextNames[i]) return true;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/** The walk-shape key (`ordering|onlyFollowFirstParent`) an incremental seed is gated on — one builder so the
|
|
195
|
-
* refresh/rebuild sites can't drift in how they stringify it. */
|
|
196
|
-
function buildShapeKey(shape: { ordering: string; onlyFollowFirstParent: boolean }): string {
|
|
197
|
-
return `${shape.ordering}|${shape.onlyFollowFirstParent}`;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** The graph log parser's per-record shape (see `graphMapping`), narrowed to the fields the row builder reads. */
|
|
201
|
-
type GraphCommitRecord = {
|
|
202
|
-
sha: string;
|
|
203
|
-
author: string;
|
|
204
|
-
authorEmail: string;
|
|
205
|
-
authorDate: string;
|
|
206
|
-
committerDate: string;
|
|
207
|
-
parents: string;
|
|
208
|
-
tips: string;
|
|
209
|
-
message: string;
|
|
210
|
-
stats?: GitGraphRowStats;
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
export class GraphGitSubProvider implements GitGraphSubProvider {
|
|
214
|
-
constructor(
|
|
215
|
-
private readonly context: GitServiceContext,
|
|
216
|
-
private readonly git: Git,
|
|
217
|
-
private readonly cache: Cache,
|
|
218
|
-
private readonly provider: CliGitProviderInternal,
|
|
219
|
-
) {}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Current ref tips (canonical refname → PEELED commit sha), for the R6b fast path's gate. Peeled so an
|
|
223
|
-
* annotated tag maps to the commit its badge sits on — the same convention {@link GraphIncrementalSeed.tips}
|
|
224
|
-
* uses — and so the seed↔current diff is by commit identity. Covers heads/remotes/tags/replace (all the
|
|
225
|
-
* namespaces the gate consumers read); the caller filters to the ref classes it cares about.
|
|
226
|
-
*/
|
|
227
|
-
private async getCurrentRefTips(repoPath: string, cancellation?: AbortSignal): Promise<Map<string, string>> {
|
|
228
|
-
const tips = new Map<string, string>();
|
|
229
|
-
try {
|
|
230
|
-
// `force: true` invalidates the shared refs cache so this spawns fresh (this gate needs a
|
|
231
|
-
// point-in-time read, not a possibly-stale cached one) while ALSO repopulating that cache —
|
|
232
|
-
// one `for-each-ref` serves both this gate and any sibling `getRefs`/`getBranches`/`getTags`
|
|
233
|
-
// call racing it (they attach to the same in-flight spawn).
|
|
234
|
-
const records = await this.provider.refs.getRefs(repoPath, cancellation, { force: true });
|
|
235
|
-
for (const record of records) {
|
|
236
|
-
if (!record.name) continue;
|
|
237
|
-
|
|
238
|
-
// Peeled objectname is set only for annotated tags; everything else uses objectname.
|
|
239
|
-
tips.set(record.name, record.peeledObjectname || record.objectname);
|
|
240
|
-
}
|
|
241
|
-
} catch {
|
|
242
|
-
// Preserve the prelude's "never rejects" contract (see the bare `await` at the call site):
|
|
243
|
-
// a per-caller cancellation race through the shared cache (or any other failure) degrades
|
|
244
|
-
// to no tips, same as the direct `errors: 'ignore'` spawn this replaced.
|
|
245
|
-
}
|
|
246
|
-
return tips;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Whether the repo is a SHALLOW clone right now (a `$GIT_DIR/shallow` file exists). `git` resolves the git
|
|
251
|
-
* dir itself (correct in worktrees / bare / separate git-dirs), so this makes no `.git`-is-a-dir assumption.
|
|
252
|
-
* Returned as {@link GitGraph.shallow} and diffed by the R6b fast path's gate — an un-shallow (or re-shallow)
|
|
253
|
-
* while the graph was closed leaves every branch tip put yet changes what history exists below the window.
|
|
254
|
-
* Errors ignored → treated as NOT shallow: a git too old for `--is-shallow-repository` degrades to no-op
|
|
255
|
-
* detection (consistent on both the seed and the current side, so the gate can't over-fire), and a transient
|
|
256
|
-
* read error biases toward `false`, which — when the seed was shallow — only forces a SAFE full-walk fallback.
|
|
257
|
-
*/
|
|
258
|
-
private async getShallowState(repoPath: string, cancellation?: AbortSignal): Promise<boolean> {
|
|
259
|
-
const result = await this.git.run(
|
|
260
|
-
{ cwd: repoPath, configs: gitConfigsLog, cancellation: cancellation, errors: 'ignore' },
|
|
261
|
-
'rev-parse',
|
|
262
|
-
'--is-shallow-repository',
|
|
263
|
-
);
|
|
264
|
-
return result.stdout.trim() === 'true';
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/** Whether `oldSha` is an ancestor of `newSha` (i.e. the ref moved fast-forward). */
|
|
268
|
-
private async isFastForward(
|
|
269
|
-
repoPath: string,
|
|
270
|
-
oldSha: string,
|
|
271
|
-
newSha: string,
|
|
272
|
-
cancellation?: AbortSignal,
|
|
273
|
-
): Promise<boolean> {
|
|
274
|
-
const result = await this.git.run(
|
|
275
|
-
{ cwd: repoPath, cancellation: cancellation, errors: 'ignore' },
|
|
276
|
-
'merge-base',
|
|
277
|
-
'--is-ancestor',
|
|
278
|
-
oldSha,
|
|
279
|
-
newSha,
|
|
280
|
-
);
|
|
281
|
-
return result.exitCode === 0;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
async openGraphSession(
|
|
285
|
-
repoPath: string,
|
|
286
|
-
options?: {
|
|
287
|
-
rowProcessor?: GraphRowProcessor;
|
|
288
|
-
rev?: string;
|
|
289
|
-
limit?: number;
|
|
290
|
-
include?: { stats?: boolean };
|
|
291
|
-
},
|
|
292
|
-
cancellation?: AbortSignal,
|
|
293
|
-
): Promise<GitGraphSession> {
|
|
294
|
-
// The session computes the walk shape (`ordering|onlyFollowFirstParent`) the SAME way `getGraph`
|
|
295
|
-
// derives it, so it can gate its incremental seed on a shape change (which reshapes every row's
|
|
296
|
-
// parents/order) exactly as the host's former `_graphBuildShape` gate did.
|
|
297
|
-
const getWalkShape = (): { ordering: 'date' | 'author-date' | 'topo'; onlyFollowFirstParent: boolean } => {
|
|
298
|
-
const cfg = this.context.config;
|
|
299
|
-
return {
|
|
300
|
-
ordering: cfg?.graph?.commitOrdering ?? cfg?.commits.ordering ?? 'date',
|
|
301
|
-
onlyFollowFirstParent: cfg?.graph?.onlyFollowFirstParent ?? false,
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
const session = new GraphSession(this, repoPath, options?.rowProcessor, getWalkShape);
|
|
305
|
-
|
|
306
|
-
await session.initialize(options, cancellation);
|
|
307
|
-
return session;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
@debug({
|
|
311
|
-
// The seed params (`incrementalSeed`, `reachabilitySeed`, `rowsStatsSeed`) hold cached rows/stats
|
|
312
|
-
// for potentially thousands of commits — logging them via the default formatting would dump
|
|
313
|
-
// megabytes per call, so only log their presence (and key summary fields).
|
|
314
|
-
args: (repoPath, rev, options) => ({
|
|
315
|
-
repoPath: repoPath,
|
|
316
|
-
rev: rev,
|
|
317
|
-
limit: options?.limit,
|
|
318
|
-
stats: options?.include?.stats,
|
|
319
|
-
incrementalSeed: options?.incrementalSeed && {
|
|
320
|
-
rows: options.incrementalSeed.rows.length,
|
|
321
|
-
tips: options.incrementalSeed.tips.size,
|
|
322
|
-
ordering: options.incrementalSeed.ordering,
|
|
323
|
-
},
|
|
324
|
-
reachabilitySeed: options?.reachabilitySeed != null,
|
|
325
|
-
rowsStatsSeed: options?.rowsStatsSeed != null,
|
|
326
|
-
}),
|
|
327
|
-
})
|
|
328
|
-
async getGraph(
|
|
329
|
-
repoPath: string,
|
|
330
|
-
rev: string | undefined,
|
|
331
|
-
options?: {
|
|
332
|
-
include?: { stats?: boolean };
|
|
333
|
-
limit?: number;
|
|
334
|
-
rowProcessor?: GraphRowProcessor;
|
|
335
|
-
reachabilitySeed?: GraphReachabilityTable;
|
|
336
|
-
rowsStatsSeed?: GitGraphRowsStats;
|
|
337
|
-
// R6b incremental head-walk seed. When present (and the gate holds), walk only the new head
|
|
338
|
-
// region, stitch the seed's cached tail, and re-derive flags/reachability in memory instead of
|
|
339
|
-
// re-walking every loaded row; any structural change degrades to the full walk. See
|
|
340
|
-
// `GraphIncrementalSeed` and the R6 plan section.
|
|
341
|
-
incrementalSeed?: GraphIncrementalSeed;
|
|
342
|
-
// Observational: reports whether the seeded call took the fast path or fell back (with the reason).
|
|
343
|
-
onIncrementalResult?: (outcome: IncrementalGraphOutcome) => void;
|
|
344
|
-
},
|
|
345
|
-
cancellation?: AbortSignal,
|
|
346
|
-
): Promise<GitGraph> {
|
|
347
|
-
const scope = getScopedLogger();
|
|
348
|
-
|
|
349
|
-
const cfg = this.context.config;
|
|
350
|
-
const defaultLimit = options?.limit ?? 5000;
|
|
351
|
-
const ordering: 'date' | 'author-date' | 'topo' = cfg?.graph?.commitOrdering ?? cfg?.commits.ordering ?? 'date';
|
|
352
|
-
const onlyFollowFirstParent = cfg?.graph?.onlyFollowFirstParent ?? false;
|
|
353
|
-
|
|
354
|
-
const deferStats = options?.include?.stats;
|
|
355
|
-
// `let`: cleared before the fallback walk when the fast path bailed for a parent-rewriting reason
|
|
356
|
-
// (unshallow / replace-ref change) — those alter boundary commits' true diffs, so per-sha stats
|
|
357
|
-
// carried from the prior generation may be stale and must recompute.
|
|
358
|
-
let rowsStatsSeed = options?.rowsStatsSeed;
|
|
359
|
-
|
|
360
|
-
const parser = getGraphParser(options?.include?.stats && !deferStats);
|
|
361
|
-
const shaParser = getShaLogParser();
|
|
362
|
-
const statsParser = getShaAndStatsLogParser();
|
|
363
|
-
|
|
364
|
-
const stashPromise = this.provider.stash?.getStash(repoPath, { includeFiles: false }, cancellation);
|
|
365
|
-
|
|
366
|
-
// Pre-BUILD the first walk's stream as soon as the stash list (the spawn's only argv/stdin
|
|
367
|
-
// input) resolves. NOTE: `git.stream` is a lazy async generator — the process does NOT spawn
|
|
368
|
-
// until the walk loop's first iteration, so this achieves argv/stdin PREPARATION overlap only,
|
|
369
|
-
// not the git-startup overlap the original design intended (make the spawn eager — priming the
|
|
370
|
-
// generator — or delete this seam; tracked as a follow-up). Consumed exactly once by the first
|
|
371
|
-
// `getCommitsForGraphCore` call; never iterated = never spawned, so an unconsumed pre-build
|
|
372
|
-
// (fast-path win, error fallback) leaks nothing.
|
|
373
|
-
const prespawnAborter = new AbortController();
|
|
374
|
-
const onPrespawnCancel = () => prespawnAborter.abort();
|
|
375
|
-
cancellation?.addEventListener('abort', onPrespawnCancel, { once: true });
|
|
376
|
-
// An ALREADY-aborted signal never fires listeners added after the fact — propagate it by hand.
|
|
377
|
-
if (cancellation?.aborted) {
|
|
378
|
-
onPrespawnCancel();
|
|
379
|
-
}
|
|
380
|
-
let prespawn: Promise<{ stream: AsyncGenerator<string> } | undefined> | undefined = (async () => {
|
|
381
|
-
try {
|
|
382
|
-
const gitStash = await stashPromise;
|
|
383
|
-
const { stdin } = convertStashesToStdin(gitStash?.stashes);
|
|
384
|
-
const args = ['log', ...parser.arguments, `--${ordering}-order`, '--all'];
|
|
385
|
-
if (stdin) {
|
|
386
|
-
args.push('--stdin');
|
|
387
|
-
}
|
|
388
|
-
if (onlyFollowFirstParent) {
|
|
389
|
-
args.push('--first-parent');
|
|
390
|
-
}
|
|
391
|
-
const stream = this.git.stream(
|
|
392
|
-
{
|
|
393
|
-
cwd: repoPath,
|
|
394
|
-
configs: gitConfigsLog,
|
|
395
|
-
cancellation: prespawnAborter.signal,
|
|
396
|
-
stdin: stdin,
|
|
397
|
-
// See the walk spawn below for why GIT_FLUSH=0.
|
|
398
|
-
env: { GIT_FLUSH: '0' },
|
|
399
|
-
},
|
|
400
|
-
...args,
|
|
401
|
-
'--',
|
|
402
|
-
);
|
|
403
|
-
return { stream: stream };
|
|
404
|
-
} catch {
|
|
405
|
-
return undefined;
|
|
406
|
-
}
|
|
407
|
-
})();
|
|
408
|
-
|
|
409
|
-
// Current ref tips (peeled), captured ONCE at walk entry, overlapped with the rest of the prelude (a
|
|
410
|
-
// single `for-each-ref`, off the rows-walk critical path). Attached to the returned graph as `refTips`
|
|
411
|
-
// so the host can seed the NEXT rebuild's tip diff; the R6b fast path also reuses this same map for its
|
|
412
|
-
// own tip-diff gate (so there's exactly one `for-each-ref` per call whether it goes fast or full).
|
|
413
|
-
// ALWAYS forced, including on a cold build. It's tempting to skip the force when there's no seed to
|
|
414
|
-
// diff against — the cold build only records these tips for the NEXT build — but the tips it records
|
|
415
|
-
// must describe the same repo state the rows walk observed, and the rows walk always reads live git.
|
|
416
|
-
// A cached (stale) enumeration breaks that pairing in a way a later build can't detect: if a ref moves
|
|
417
|
-
// A→B before the cold load and is then reverted B→A, the seed says A, the next forced read says A, the
|
|
418
|
-
// tip diff sees no change and takes the fast path — while the cached rows were built at B and still
|
|
419
|
-
// carry the discarded commit. Staleness here is not "more work, never wrong"; only the seed side can
|
|
420
|
-
// be stale, so a move-and-revert admits a genuinely wrong fast path.
|
|
421
|
-
const refTipsPromise = this.getCurrentRefTips(repoPath, cancellation);
|
|
422
|
-
|
|
423
|
-
// Shallow state (peeled off the same prelude, off the rows-walk critical path) — stamped on the returned
|
|
424
|
-
// graph so the NEXT rebuild's seed can gate on an un-shallow/re-shallow, and reused by the R6b fast path's
|
|
425
|
-
// own shallow gate (one `rev-parse` per call whether it goes fast or full).
|
|
426
|
-
const shallowPromise = this.getShallowState(repoPath, cancellation);
|
|
427
|
-
|
|
428
|
-
const [
|
|
429
|
-
shaResult,
|
|
430
|
-
stashResult,
|
|
431
|
-
branchesResult,
|
|
432
|
-
remotesResult,
|
|
433
|
-
currentUserResult,
|
|
434
|
-
worktreesResult,
|
|
435
|
-
defaultBranchResult,
|
|
436
|
-
] = await Promise.allSettled([
|
|
437
|
-
!isUncommitted(rev, true)
|
|
438
|
-
? this.git.run(
|
|
439
|
-
{ cwd: repoPath, configs: gitConfigsLog },
|
|
440
|
-
'log',
|
|
441
|
-
...shaParser.arguments,
|
|
442
|
-
'-n1',
|
|
443
|
-
rev ?? 'HEAD',
|
|
444
|
-
'--',
|
|
445
|
-
)
|
|
446
|
-
: undefined,
|
|
447
|
-
stashPromise,
|
|
448
|
-
this.provider.branches.getBranches(repoPath, undefined, cancellation),
|
|
449
|
-
this.provider.remotes.getRemotes(repoPath, undefined, cancellation),
|
|
450
|
-
this.provider.config.getCurrentUser(repoPath),
|
|
451
|
-
this.provider.worktrees
|
|
452
|
-
?.getWorktrees(repoPath, cancellation)
|
|
453
|
-
.then((w): [GitWorktree[], Map<string, GitWorktree>] => [
|
|
454
|
-
w,
|
|
455
|
-
groupWorktreesByBranch(w, { includeDefault: true }),
|
|
456
|
-
]),
|
|
457
|
-
// Local-only: never contact the remote on the graph's hot fetch path. `isDefault` is additive,
|
|
458
|
-
// so it's simply absent until a background networked caller resolves origin/HEAD.
|
|
459
|
-
this.provider.branches.getDefaultBranchName(repoPath, undefined, { local: true }, cancellation),
|
|
460
|
-
]);
|
|
461
|
-
|
|
462
|
-
const branches = getSettledValue(branchesResult)?.values;
|
|
463
|
-
const branchMap = branches != null ? new Map(branches.map(r => [r.name, r])) : new Map<string, GitBranch>();
|
|
464
|
-
const headBranch = branches?.find(b => b.current);
|
|
465
|
-
const headRefUpstreamName = headBranch?.upstream?.name;
|
|
466
|
-
const [worktrees, worktreesByBranch] = getSettledValue(worktreesResult) ?? [[], new Map<string, GitWorktree>()];
|
|
467
|
-
|
|
468
|
-
// The repo's default branch (e.g. `origin/main`) reduced to its local branch name (`main`) so it
|
|
469
|
-
// can be matched against each local head's `tip` to flag the default-branch head additively.
|
|
470
|
-
const defaultBranchName = getSettledValue(defaultBranchResult);
|
|
471
|
-
const defaultLocalName = defaultBranchName != null ? getBranchNameWithoutRemote(defaultBranchName) : undefined;
|
|
472
|
-
|
|
473
|
-
let branchIdOfMainWorktree: string | undefined;
|
|
474
|
-
let mainWorktree: GitWorktree | undefined;
|
|
475
|
-
if (worktreesByBranch != null) {
|
|
476
|
-
const defaultEntry = find(worktreesByBranch, ([, wt]) => wt.isDefault);
|
|
477
|
-
if (defaultEntry != null) {
|
|
478
|
-
[branchIdOfMainWorktree, mainWorktree] = defaultEntry;
|
|
479
|
-
// Remove the main/default worktree so the branch-row decoration shows `+checkedout`
|
|
480
|
-
// (not `+worktree`) for the main checkout. `mainWorktree` is retained below purely so
|
|
481
|
-
// Undo Commit can still reach the main worktree's HEAD from a secondary worktree's graph.
|
|
482
|
-
worktreesByBranch.delete(branchIdOfMainWorktree);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
const currentUser = getSettledValue(currentUserResult);
|
|
487
|
-
|
|
488
|
-
const remotes = getSettledValue(remotesResult);
|
|
489
|
-
const remoteMap = remotes != null ? new Map(remotes.map(r => [r.name, r])) : new Map<string, GitRemote>();
|
|
490
|
-
|
|
491
|
-
// Decoration side inputs, fingerprinted for the NEXT rebuild's metadata gate (and compared against
|
|
492
|
-
// the seed's by this call's fast path). Computed from the prelude's fresh queries — the same values
|
|
493
|
-
// row construction below embeds into row decorations.
|
|
494
|
-
const decorationFingerprint = computeDecorationFingerprint(
|
|
495
|
-
repoPath,
|
|
496
|
-
defaultBranchName,
|
|
497
|
-
defaultLocalName,
|
|
498
|
-
headRefUpstreamName,
|
|
499
|
-
branches,
|
|
500
|
-
remotes,
|
|
501
|
-
worktrees,
|
|
502
|
-
currentUser,
|
|
503
|
-
);
|
|
504
|
-
const shas = getSettledValue(shaResult)?.stdout;
|
|
505
|
-
const selectSha = shas != null ? first(shaParser.parse(shas)) : undefined;
|
|
506
|
-
|
|
507
|
-
// Resolved off the critical path (started in the prelude). Same map for the full walk's `refTips`, the
|
|
508
|
-
// fast path's tip-diff gate, and the fast path's `refTips`. Never rejects (errors ignored → empty map).
|
|
509
|
-
const refTips = await refTipsPromise;
|
|
510
|
-
// Same value for the full walk's `shallow`, the fast path's shallow gate, and the fast path's `shallow`.
|
|
511
|
-
const shallow = await shallowPromise;
|
|
512
|
-
|
|
513
|
-
const downstreamMap = new Map<string, string[]>();
|
|
514
|
-
|
|
515
|
-
// There *HAS* to be a better way to get git log to return stashes, but this is the best we've found
|
|
516
|
-
const gitStash = getSettledValue(stashResult);
|
|
517
|
-
const { stdin, remappedIds } = convertStashesToStdin(gitStash?.stashes);
|
|
518
|
-
|
|
519
|
-
const avatars = new Map<string, string>();
|
|
520
|
-
const ids = new Set<string>();
|
|
521
|
-
const reachableFromHEAD = new Set<string>();
|
|
522
|
-
// SHAs on the first-parent chain from HEAD up to (excluding) the first merge commit — the only
|
|
523
|
-
// commits a plain (non-`--rebase-merges`) interactive rebase can safely rewrite. `headSha` seeds
|
|
524
|
-
// the chain; `rewriteableNextSha` tracks the next sha expected on it. Outer scope so they persist
|
|
525
|
-
// across `more()` pagination, like `reachableFromHEAD`.
|
|
526
|
-
const rewriteableFromHEAD = new Set<string>();
|
|
527
|
-
let headSha: string | undefined;
|
|
528
|
-
let rewriteableNextSha: string | undefined;
|
|
529
|
-
// Undo Commit is offered only on a worktree HEAD that is a LEAF (nothing is built on it) —
|
|
530
|
-
// undoing a commit other work is stacked on is unsafe. The leaf check is only needed for the
|
|
531
|
-
// undo-eligible tips (the active HEAD + each worktree's HEAD), so track just those shas rather
|
|
532
|
-
// than every commit, keeping this O(#worktrees) instead of O(#commits).
|
|
533
|
-
const undoableTipShas = new Set<string>();
|
|
534
|
-
if (headBranch?.sha != null) {
|
|
535
|
-
undoableTipShas.add(headBranch.sha);
|
|
536
|
-
}
|
|
537
|
-
for (const wt of worktrees) {
|
|
538
|
-
if (wt.sha != null) {
|
|
539
|
-
undoableTipShas.add(wt.sha);
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
// The subset of `undoableTipShas` that turn out to have a child (are an ancestor of another
|
|
543
|
-
// commit) — i.e. NOT leaves. Built newest-first during the walk, so by the time a tip's row is
|
|
544
|
-
// processed every newer commit (its only possible children) has been seen. Undo is withheld for
|
|
545
|
-
// shas recorded here. Stash rows are excluded (a stash sitting on a tip must not block undoing it).
|
|
546
|
-
const tipShasWithChildren = new Set<string>();
|
|
547
|
-
// SHAs reachable from HEAD's tracking upstream tip. Combined with `reachableFromHEAD`,
|
|
548
|
-
// this lets us mark commits as unpushed (reachable from HEAD but not from HEAD's upstream).
|
|
549
|
-
const reachableFromHeadUpstream = new Set<string>();
|
|
550
|
-
|
|
551
|
-
// Map<sha, Map<refKey, ref>> — inner map deduplicates refs during propagation
|
|
552
|
-
const reachableRefs = new Map<string, Map<string, ReachableRef>>();
|
|
553
|
-
|
|
554
|
-
// Stable, append-only reachability table built as we walk — the PRIMARY representation shipped to
|
|
555
|
-
// consumers. Lives in the outer scope so it accumulates across `more()` pagination; indices
|
|
556
|
-
// already assigned never change, since git reachability only propagates to older (later-walked)
|
|
557
|
-
// commits. Per-row ref arrays are NOT retained — each row keeps only its set index
|
|
558
|
-
// (`contexts.reachabilityIndex`), and the working `reachableRefs` entry is dropped once emitted.
|
|
559
|
-
// The encoder lives next to its decoder in `reachability.utils` so the wire format can't drift.
|
|
560
|
-
// A caller-supplied seed CONTINUES the prior generation's table (same id, stable indices) so
|
|
561
|
-
// rows retained across a rebuild keep valid `reachabilityIndex` values.
|
|
562
|
-
const reachabilityBuilder = createReachabilityTableBuilder(options?.reachabilitySeed);
|
|
563
|
-
|
|
564
|
-
// Set-index cache keyed by the working ref-map INSTANCE: the propagation below transfers a
|
|
565
|
-
// row's map wholesale to its (first) parent, so an entire chain interns the same object —
|
|
566
|
-
// one real intern per chain instead of one per row. Maps only ever GROW (ref seeding adds
|
|
567
|
-
// entries), so an unchanged size proves the cached index is still exact.
|
|
568
|
-
const internCache = new WeakMap<Map<string, ReachableRef>, { size: number; index: number | undefined }>();
|
|
569
|
-
|
|
570
|
-
function finalizeRowReachability(
|
|
571
|
-
row: GitGraphRow,
|
|
572
|
-
sha: string,
|
|
573
|
-
refs: Map<string, ReachableRef> | undefined,
|
|
574
|
-
): void {
|
|
575
|
-
let setIndex;
|
|
576
|
-
const cached = refs != null ? internCache.get(refs) : undefined;
|
|
577
|
-
if (cached != null && cached.size === refs!.size) {
|
|
578
|
-
setIndex = cached.index;
|
|
579
|
-
} else {
|
|
580
|
-
setIndex = reachabilityBuilder.intern(refs?.values());
|
|
581
|
-
if (refs != null) {
|
|
582
|
-
internCache.set(refs, { size: refs.size, index: setIndex });
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
if (setIndex != null) {
|
|
586
|
-
(row.contexts ??= {}).reachabilityIndex = setIndex;
|
|
587
|
-
}
|
|
588
|
-
// Drop the transient per-row arrays so emitted rows don't retain reachability, and release the
|
|
589
|
-
// working entry — once a commit is emitted its children are all walked and its parents already
|
|
590
|
-
// seeded, so nothing reads `reachableRefs.get(sha)` again (orderings keep parents after children).
|
|
591
|
-
row.reachability = undefined;
|
|
592
|
-
reachableRefs.delete(sha);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
const rowStats: GitGraphRowsStats = new Map<string, GitGraphRowStats>();
|
|
596
|
-
let pendingRowsStatsCount = 0;
|
|
597
|
-
let iterations = 0;
|
|
598
|
-
let total = 0;
|
|
599
|
-
|
|
600
|
-
// Hoisted so the ordered walk AND the R6b incremental fast path share one context. It holds the
|
|
601
|
-
// outer accumulator sets BY REFERENCE (they mutate in place across `more()` pagination / replay), so
|
|
602
|
-
// building it once is equivalent to the prior per-call construction.
|
|
603
|
-
const rowProcessor = options?.rowProcessor;
|
|
604
|
-
const graphCtx: GraphContext | undefined =
|
|
605
|
-
rowProcessor != null
|
|
606
|
-
? {
|
|
607
|
-
repoPath: repoPath,
|
|
608
|
-
useAvatars: cfg?.graph?.avatars ?? true,
|
|
609
|
-
branches: branchMap,
|
|
610
|
-
remotes: remoteMap,
|
|
611
|
-
worktreesByBranch: worktreesByBranch,
|
|
612
|
-
branchIdOfMainWorktree: branchIdOfMainWorktree,
|
|
613
|
-
stashes: gitStash?.stashes,
|
|
614
|
-
reachableFromHEAD: reachableFromHEAD,
|
|
615
|
-
rewriteableFromHEAD: rewriteableFromHEAD,
|
|
616
|
-
tipShasWithChildren: tipShasWithChildren,
|
|
617
|
-
// `undefined` when HEAD has no upstream, so the processor flags nothing as
|
|
618
|
-
// unpublished; otherwise the live set (mutated during the walk, read by ref).
|
|
619
|
-
reachableFromHeadUpstream: headRefUpstreamName != null ? reachableFromHeadUpstream : undefined,
|
|
620
|
-
avatars: avatars,
|
|
621
|
-
}
|
|
622
|
-
: undefined;
|
|
623
|
-
|
|
624
|
-
// Parses one commit record into a row (ref badges, parents, stash vs commit) but performs NO
|
|
625
|
-
// reachability/HEAD/downstream accumulation — that half lives in `accumulateRowState`, so the ordered
|
|
626
|
-
// walk and the fast path (which replays accumulation over reused rows, deriving ref lists from their
|
|
627
|
-
// own decoration) share one propagation implementation. Returns `undefined` when the record dedups to
|
|
628
|
-
// an already-seen remapped-stash sha. Faithful extraction of the walk's former inline body — must stay
|
|
629
|
-
// byte-identical to it (the equivalence harness pins this).
|
|
630
|
-
function buildRowFromCommit(commit: GraphCommitRecord):
|
|
631
|
-
| {
|
|
632
|
-
row: GitGraphRow;
|
|
633
|
-
refHeads: GitGraphRowHead[];
|
|
634
|
-
refRemoteHeads: GitGraphRowRemoteHead[];
|
|
635
|
-
refTags: GitGraphRowTag[];
|
|
636
|
-
head: boolean;
|
|
637
|
-
parents: string[];
|
|
638
|
-
}
|
|
639
|
-
| undefined {
|
|
640
|
-
total++;
|
|
641
|
-
let shaOrRemapped: string | undefined = remappedIds.get(commit.sha);
|
|
642
|
-
if (shaOrRemapped && ids.has(shaOrRemapped)) return undefined;
|
|
643
|
-
|
|
644
|
-
shaOrRemapped ??= commit.sha;
|
|
645
|
-
ids.add(shaOrRemapped);
|
|
646
|
-
|
|
647
|
-
const refHeads: GitGraphRowHead[] = [];
|
|
648
|
-
const refRemoteHeads: GitGraphRowRemoteHead[] = [];
|
|
649
|
-
const refTags: GitGraphRowTag[] = [];
|
|
650
|
-
// `head` is per-tip (drives `isCurrentHead` on the branch it decorates); `sawHead` sticks once ANY
|
|
651
|
-
// tip is HEAD so `accumulateRowState` seeds `reachableFromHEAD` even when HEAD isn't the last tip.
|
|
652
|
-
let head = false;
|
|
653
|
-
let sawHead = false;
|
|
654
|
-
|
|
655
|
-
if (commit.tips) {
|
|
656
|
-
for (let tip of commit.tips.split(', ')) {
|
|
657
|
-
head = false;
|
|
658
|
-
if (tip === 'refs/stash') continue;
|
|
659
|
-
|
|
660
|
-
if (tip.startsWith('tag: ')) {
|
|
661
|
-
const tagName = tip.substring(5);
|
|
662
|
-
refTags.push({
|
|
663
|
-
id: getTagId(repoPath, tagName),
|
|
664
|
-
name: tagName,
|
|
665
|
-
// Not currently used, so don't bother looking it up
|
|
666
|
-
annotated: true,
|
|
667
|
-
});
|
|
668
|
-
continue;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
if (tip.startsWith('HEAD')) {
|
|
672
|
-
head = true;
|
|
673
|
-
sawHead = true;
|
|
674
|
-
if (tip !== 'HEAD') {
|
|
675
|
-
tip = tip.substring(8);
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
const remoteName = getRemoteNameFromBranchName(tip);
|
|
680
|
-
if (remoteName) {
|
|
681
|
-
const remote = remoteMap.get(remoteName);
|
|
682
|
-
if (remote != null) {
|
|
683
|
-
const branchName = getBranchNameWithoutRemote(tip);
|
|
684
|
-
if (branchName === 'HEAD') continue;
|
|
685
|
-
|
|
686
|
-
refRemoteHeads.push({
|
|
687
|
-
id: getBranchId(repoPath, true, tip),
|
|
688
|
-
name: branchName,
|
|
689
|
-
owner: remote.name,
|
|
690
|
-
url: remote.url,
|
|
691
|
-
current: tip === headRefUpstreamName,
|
|
692
|
-
// `defaultLocalName!` is non-null here because `tip === defaultBranchName` short-circuits when `defaultBranchName` is null.
|
|
693
|
-
isDefault: tip === defaultBranchName && !branchMap.has(defaultLocalName!),
|
|
694
|
-
hostingServiceType: remote.provider?.gkProviderId,
|
|
695
|
-
// `branchMap` is keyed by full name, so the remote ref resolves here — the same
|
|
696
|
-
// lookup the host does today to bake `+starred` into the context string.
|
|
697
|
-
starred: branchMap.get(tip)?.starred || undefined,
|
|
698
|
-
});
|
|
699
|
-
continue;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
const branch = branchMap.get(tip);
|
|
704
|
-
const branchId = branch?.id ?? getBranchId(repoPath, false, tip);
|
|
705
|
-
// `worktreesByBranch` has the main/default worktree removed, so recover it here.
|
|
706
|
-
const worktree =
|
|
707
|
-
worktreesByBranch?.get(branchId) ??
|
|
708
|
-
(branchId === branchIdOfMainWorktree ? mainWorktree : undefined);
|
|
709
|
-
const worktreeRef =
|
|
710
|
-
worktree != null
|
|
711
|
-
? {
|
|
712
|
-
id: getWorktreeId(repoPath, worktree.name),
|
|
713
|
-
path: worktree.path,
|
|
714
|
-
isDefault: worktree.isDefault === true,
|
|
715
|
-
}
|
|
716
|
-
: undefined;
|
|
717
|
-
refHeads.push({
|
|
718
|
-
id: branchId,
|
|
719
|
-
name: tip,
|
|
720
|
-
isCurrentHead: head,
|
|
721
|
-
upstream:
|
|
722
|
-
branch?.upstream != null
|
|
723
|
-
? {
|
|
724
|
-
name: branch.upstream.name,
|
|
725
|
-
id: getBranchId(repoPath, true, branch.upstream.name),
|
|
726
|
-
missing: branch.upstream.missing,
|
|
727
|
-
state: {
|
|
728
|
-
ahead: branch.upstream.state.ahead,
|
|
729
|
-
behind: branch.upstream.state.behind,
|
|
730
|
-
},
|
|
731
|
-
}
|
|
732
|
-
: undefined,
|
|
733
|
-
worktree: worktreeRef,
|
|
734
|
-
isDefault: defaultLocalName != null && tip === defaultLocalName,
|
|
735
|
-
starred: branch?.starred || undefined,
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
const parents = commit.parents ? commit.parents.split(' ') : [];
|
|
741
|
-
const stash = gitStash?.stashes.get(shaOrRemapped);
|
|
742
|
-
let row: GitGraphRow;
|
|
743
|
-
if (stash != null) {
|
|
744
|
-
row = {
|
|
745
|
-
sha: shaOrRemapped,
|
|
746
|
-
// Always only return the first parent for stashes, as it is a Git implementation for the index and untracked files
|
|
747
|
-
parents: parents.slice(0, 1),
|
|
748
|
-
author: currentUser?.name ?? commit.author,
|
|
749
|
-
email: commit.authorEmail,
|
|
750
|
-
date: Number(ordering === 'author-date' ? commit.authorDate : commit.committerDate) * 1000,
|
|
751
|
-
commitDate: Number(commit.committerDate) * 1000,
|
|
752
|
-
message: (stash.message ?? commit.message).trim(),
|
|
753
|
-
kind: 'stash',
|
|
754
|
-
stashNumber: stash.stashNumber,
|
|
755
|
-
heads: refHeads.length ? refHeads : undefined,
|
|
756
|
-
remotes: refRemoteHeads.length ? refRemoteHeads : undefined,
|
|
757
|
-
tags: refTags.length ? refTags : undefined,
|
|
758
|
-
isCurrentUser: true,
|
|
759
|
-
};
|
|
760
|
-
// Don't seed `rowStats` from `stash.stats` here: the graph's stash list is fetched with
|
|
761
|
-
// `includeFiles: false`, so the commit model SYNTHESIZES a zero-stats object from its empty
|
|
762
|
-
// fileset — seeding it marks the stash "covered" and permanently blanks it. The deferred
|
|
763
|
-
// stats pass owns stash stats (first-parent diff, keyed by stash sha).
|
|
764
|
-
} else {
|
|
765
|
-
const isCurrentUser = isUserMatch(currentUser, commit.author, commit.authorEmail);
|
|
766
|
-
row = {
|
|
767
|
-
sha: shaOrRemapped,
|
|
768
|
-
parents: onlyFollowFirstParent ? parents.slice(0, 1) : parents,
|
|
769
|
-
author: commit.author,
|
|
770
|
-
email: commit.authorEmail,
|
|
771
|
-
date: Number(ordering === 'author-date' ? commit.authorDate : commit.committerDate) * 1000,
|
|
772
|
-
commitDate: Number(commit.committerDate) * 1000,
|
|
773
|
-
message: commit.message.trim(),
|
|
774
|
-
kind: parents.length > 1 ? 'merge' : 'commit',
|
|
775
|
-
heads: refHeads.length ? refHeads : undefined,
|
|
776
|
-
remotes: refRemoteHeads.length ? refRemoteHeads : undefined,
|
|
777
|
-
tags: refTags.length ? refTags : undefined,
|
|
778
|
-
isCurrentUser: isCurrentUser || undefined,
|
|
779
|
-
};
|
|
780
|
-
if (commit.stats != null) {
|
|
781
|
-
rowStats.set(shaOrRemapped, commit.stats);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
return {
|
|
786
|
-
row: row,
|
|
787
|
-
refHeads: refHeads,
|
|
788
|
-
refRemoteHeads: refRemoteHeads,
|
|
789
|
-
refTags: refTags,
|
|
790
|
-
head: sawHead,
|
|
791
|
-
parents: parents,
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
// The propagation half of the walk, factored out so the fast path can replay it in memory over reused
|
|
796
|
-
// rows (passing their own `heads`/`remotes`/`tags` as the ref lists and their full `parents`). Mutates
|
|
797
|
-
// the shared reachability/HEAD/downstream accumulators and returns the row's post-propagation
|
|
798
|
-
// reachable-ref map (for interning + flag derivation). `parents` is the FULL parent list (the walk
|
|
799
|
-
// always propagates through every parent, even when the emitted row stores a sliced set). Faithful
|
|
800
|
-
// extraction of the walk's former inline body — must stay byte-identical to it.
|
|
801
|
-
function accumulateRowState(
|
|
802
|
-
sha: string,
|
|
803
|
-
parents: string[],
|
|
804
|
-
refHeads: GitGraphRowHead[],
|
|
805
|
-
refRemoteHeads: GitGraphRowRemoteHead[],
|
|
806
|
-
refTags: GitGraphRowTag[],
|
|
807
|
-
head: boolean,
|
|
808
|
-
isStash: boolean,
|
|
809
|
-
): Map<string, ReachableRef> | undefined {
|
|
810
|
-
if (head) {
|
|
811
|
-
reachableFromHEAD.add(sha);
|
|
812
|
-
headSha ??= sha;
|
|
813
|
-
}
|
|
814
|
-
if (reachableFromHEAD.has(sha)) {
|
|
815
|
-
for (const parent of parents) {
|
|
816
|
-
reachableFromHEAD.add(parent);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
// First-parent rewriteable chain from HEAD (see the field's declaration for the full rationale).
|
|
821
|
-
if (sha === headSha || sha === rewriteableNextSha) {
|
|
822
|
-
if (parents.length === 1) {
|
|
823
|
-
rewriteableFromHEAD.add(sha);
|
|
824
|
-
rewriteableNextSha = parents[0];
|
|
825
|
-
} else {
|
|
826
|
-
rewriteableNextSha = undefined;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
// A remote head with `current` set IS HEAD's tracking upstream tip (see `buildRowFromCommit`).
|
|
831
|
-
if (refRemoteHeads.some(r => r.current)) {
|
|
832
|
-
reachableFromHeadUpstream.add(sha);
|
|
833
|
-
}
|
|
834
|
-
if (reachableFromHeadUpstream.has(sha)) {
|
|
835
|
-
for (const parent of parents) {
|
|
836
|
-
reachableFromHeadUpstream.add(parent);
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
// Seed reachability from all ref types on this commit.
|
|
841
|
-
if (refHeads.length > 0 || refRemoteHeads.length > 0 || refTags.length > 0) {
|
|
842
|
-
let refs = reachableRefs.get(sha);
|
|
843
|
-
if (refs == null) {
|
|
844
|
-
refs = new Map<string, ReachableRef>();
|
|
845
|
-
reachableRefs.set(sha, refs);
|
|
846
|
-
}
|
|
847
|
-
for (const h of refHeads) {
|
|
848
|
-
refs.set(`b:${h.name}`, {
|
|
849
|
-
refType: 'branch',
|
|
850
|
-
name: h.name,
|
|
851
|
-
remote: false,
|
|
852
|
-
current: h.isCurrentHead,
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
for (const r of refRemoteHeads) {
|
|
856
|
-
const name = `${r.owner}/${r.name}`;
|
|
857
|
-
refs.set(`r:${name}`, { refType: 'branch', name: name, remote: true });
|
|
858
|
-
}
|
|
859
|
-
for (const t of refTags) {
|
|
860
|
-
refs.set(`t:${t.name}`, { refType: 'tag', name: t.name });
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
// Propagate reachability to parents (ownership-transfer fast path; see the `reachableRefs`
|
|
865
|
-
// declaration + `finalizeRowReachability` for why the first childless parent may alias the map).
|
|
866
|
-
const currentRefs = reachableRefs.get(sha);
|
|
867
|
-
if (currentRefs != null && currentRefs.size > 0) {
|
|
868
|
-
let transferred = false;
|
|
869
|
-
for (const parent of parents) {
|
|
870
|
-
const parentRefs = reachableRefs.get(parent);
|
|
871
|
-
if (parentRefs == null) {
|
|
872
|
-
if (transferred) {
|
|
873
|
-
reachableRefs.set(parent, new Map(currentRefs));
|
|
874
|
-
} else {
|
|
875
|
-
transferred = true;
|
|
876
|
-
reachableRefs.set(parent, currentRefs);
|
|
877
|
-
}
|
|
878
|
-
continue;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
for (const [key, ref] of currentRefs) {
|
|
882
|
-
if (!parentRefs.has(key)) {
|
|
883
|
-
parentRefs.set(key, ref);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
// Mark any undo-eligible tip that THIS non-stash commit builds on as non-leaf (stash rows excluded).
|
|
890
|
-
if (!isStash) {
|
|
891
|
-
for (const parent of parents) {
|
|
892
|
-
if (undoableTipShas.has(parent)) {
|
|
893
|
-
tipShasWithChildren.add(parent);
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
// Downstreams: each branch tip → its upstream name.
|
|
899
|
-
for (const h of refHeads) {
|
|
900
|
-
if (h.upstream?.name != null) {
|
|
901
|
-
let downstreams = downstreamMap.get(h.upstream.name);
|
|
902
|
-
if (downstreams == null) {
|
|
903
|
-
downstreams = [];
|
|
904
|
-
downstreamMap.set(h.upstream.name, downstreams);
|
|
905
|
-
}
|
|
906
|
-
downstreams.push(h.name);
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
return reachableRefs.get(sha);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
// Builds the deferred `--shortstat` query for the given rows (only shas the seed doesn't cover),
|
|
914
|
-
// shared by the ordered walk and the fast path. Increments `pendingRowsStatsCount` and resolves it
|
|
915
|
-
// when the background query completes; returns `undefined` when stats aren't requested.
|
|
916
|
-
const buildRowsStatsDeferred = (rows: GitGraphRow[]): GitGraph['rowsStatsDeferred'] => {
|
|
917
|
-
if (!deferStats) return undefined;
|
|
918
|
-
|
|
919
|
-
pendingRowsStatsCount++;
|
|
920
|
-
|
|
921
|
-
// oxlint-disable-next-line no-async-promise-executor
|
|
922
|
-
const promise = new Promise<void>(async resolve => {
|
|
923
|
-
try {
|
|
924
|
-
// Stats are immutable per sha — only query shas the seed doesn't already cover.
|
|
925
|
-
let missingStdin = '';
|
|
926
|
-
let missingStashStdin = '';
|
|
927
|
-
for (const row of rows) {
|
|
928
|
-
if (rowStats.has(row.sha)) continue;
|
|
929
|
-
|
|
930
|
-
const seeded = rowsStatsSeed?.get(row.sha);
|
|
931
|
-
if (seeded != null) {
|
|
932
|
-
rowStats.set(row.sha, seeded);
|
|
933
|
-
continue;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
if (row.kind === 'stash') {
|
|
937
|
-
missingStashStdin += `${row.sha}\n`;
|
|
938
|
-
} else {
|
|
939
|
-
missingStdin += `${row.sha}\n`;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
// Fully seeded — nothing new to compute, so no git process at all.
|
|
944
|
-
if (!missingStdin && !missingStashStdin) return;
|
|
945
|
-
|
|
946
|
-
// A stash is a merge commit, so its own shortstat record is empty. Stashes get their own
|
|
947
|
-
// query diffed against the first parent (`-m --first-parent` — what `git stash show`
|
|
948
|
-
// reports), keyed directly by stash sha: no parent remapping, so none of the old
|
|
949
|
-
// `--no-walk` time-order races that could let the empty record win and blank the stash.
|
|
950
|
-
const [statsResult, stashStatsResult] = await Promise.allSettled([
|
|
951
|
-
missingStdin
|
|
952
|
-
? this.git.run(
|
|
953
|
-
{
|
|
954
|
-
cwd: repoPath,
|
|
955
|
-
configs: gitConfigsLog,
|
|
956
|
-
stdin: missingStdin,
|
|
957
|
-
priority: 'background',
|
|
958
|
-
},
|
|
959
|
-
'log',
|
|
960
|
-
'--no-walk',
|
|
961
|
-
'--stdin',
|
|
962
|
-
...statsParser.arguments,
|
|
963
|
-
'--',
|
|
964
|
-
)
|
|
965
|
-
: undefined,
|
|
966
|
-
missingStashStdin
|
|
967
|
-
? this.git.run(
|
|
968
|
-
{
|
|
969
|
-
cwd: repoPath,
|
|
970
|
-
configs: gitConfigsLog,
|
|
971
|
-
stdin: missingStashStdin,
|
|
972
|
-
priority: 'background',
|
|
973
|
-
},
|
|
974
|
-
'log',
|
|
975
|
-
'--no-walk',
|
|
976
|
-
'--stdin',
|
|
977
|
-
'-m',
|
|
978
|
-
'--first-parent',
|
|
979
|
-
...statsParser.arguments,
|
|
980
|
-
'--',
|
|
981
|
-
)
|
|
982
|
-
: undefined,
|
|
983
|
-
]);
|
|
984
|
-
|
|
985
|
-
for (const result of [getSettledValue(statsResult), getSettledValue(stashStatsResult)]) {
|
|
986
|
-
if (!result?.stdout) continue;
|
|
987
|
-
|
|
988
|
-
for (const stat of statsParser.parse(result.stdout)) {
|
|
989
|
-
// Don't overwrite stats already populated for this sha
|
|
990
|
-
if (rowStats.has(stat.sha)) continue;
|
|
991
|
-
|
|
992
|
-
rowStats.set(stat.sha, stat.stats);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
} finally {
|
|
996
|
-
pendingRowsStatsCount--;
|
|
997
|
-
resolve();
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
|
|
1001
|
-
return { isLoaded: () => pendingRowsStatsCount === 0, promise: promise };
|
|
1002
|
-
};
|
|
1003
|
-
|
|
1004
|
-
const args = ['log', ...parser.arguments, `--${ordering}-order`, '--all'];
|
|
1005
|
-
if (stdin) {
|
|
1006
|
-
args.push('--stdin');
|
|
1007
|
-
}
|
|
1008
|
-
if (onlyFollowFirstParent) {
|
|
1009
|
-
args.push('--first-parent');
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
async function getCommitsForGraphCore(
|
|
1013
|
-
this: GraphGitSubProvider,
|
|
1014
|
-
limit: number,
|
|
1015
|
-
sha?: string,
|
|
1016
|
-
cursor?: { sha: string; skip: number },
|
|
1017
|
-
cancellation?: AbortSignal,
|
|
1018
|
-
): Promise<GitGraph> {
|
|
1019
|
-
try {
|
|
1020
|
-
iterations++;
|
|
1021
|
-
|
|
1022
|
-
// Consume the pre-spawned first walk when available (argv identical by construction:
|
|
1023
|
-
// no cursor on the first call); paging/retry calls spawn normally. The pre-spawn's
|
|
1024
|
-
// aborter doubles as this call's so the limit-stop kills the right process.
|
|
1025
|
-
const prespawned = cursor == null && prespawn != null ? await prespawn : undefined;
|
|
1026
|
-
prespawn = undefined;
|
|
1027
|
-
|
|
1028
|
-
const aborter = prespawned != null ? prespawnAborter : new AbortController();
|
|
1029
|
-
const onAbort = () => {
|
|
1030
|
-
aborter.abort();
|
|
1031
|
-
};
|
|
1032
|
-
cancellation?.addEventListener('abort', onAbort, { once: true });
|
|
1033
|
-
// An ALREADY-aborted signal (e.g. `toAbortSignal` of a cancelled token) never fires listeners
|
|
1034
|
-
// added after the fact — without this the walk would run to completion unabortably.
|
|
1035
|
-
if (cancellation?.aborted) {
|
|
1036
|
-
onAbort();
|
|
1037
|
-
}
|
|
1038
|
-
using _disposable = createDisposable(() => cancellation?.removeEventListener('abort', onAbort));
|
|
1039
|
-
|
|
1040
|
-
const stream =
|
|
1041
|
-
prespawned?.stream ??
|
|
1042
|
-
this.git.stream(
|
|
1043
|
-
{
|
|
1044
|
-
cwd: repoPath,
|
|
1045
|
-
configs: gitConfigsLog,
|
|
1046
|
-
cancellation: aborter.signal,
|
|
1047
|
-
stdin: stdin,
|
|
1048
|
-
// Git flushes stdout per record to a pipe, producing thousands of tiny chunks the
|
|
1049
|
-
// node side must individually await. Full stdio buffering delivers the same bytes
|
|
1050
|
-
// in far fewer, larger chunks — right for this bulk walk (an incremental consumer
|
|
1051
|
-
// wanting per-record latency should NOT set this).
|
|
1052
|
-
env: { GIT_FLUSH: '0' },
|
|
1053
|
-
},
|
|
1054
|
-
...args,
|
|
1055
|
-
cursor?.skip ? `--skip=${cursor.skip}` : undefined,
|
|
1056
|
-
'--',
|
|
1057
|
-
);
|
|
1058
|
-
using _streamDisposer = createDisposable(() => void stream.return?.(undefined));
|
|
1059
|
-
|
|
1060
|
-
const rows: GitGraphRow[] = [];
|
|
1061
|
-
|
|
1062
|
-
let count = 0;
|
|
1063
|
-
let found = false;
|
|
1064
|
-
let hasMore = false;
|
|
1065
|
-
|
|
1066
|
-
// Batched parse when available: one awaited yield per stream chunk instead of two
|
|
1067
|
-
// promise hops per record — the walk's async-iterator overhead collapses. The
|
|
1068
|
-
// with-stats parser (unused here — stats are always deferred) has no batched mode,
|
|
1069
|
-
// so wrap its per-record stream into singleton batches to keep one loop shape.
|
|
1070
|
-
const batches =
|
|
1071
|
-
parser.parseAsyncBatched?.(stream) ??
|
|
1072
|
-
(async function* (it) {
|
|
1073
|
-
for await (const commit of it) {
|
|
1074
|
-
yield [commit];
|
|
1075
|
-
}
|
|
1076
|
-
})(parser.parseAsync(stream));
|
|
1077
|
-
|
|
1078
|
-
outer: for await (const batch of batches) {
|
|
1079
|
-
for (const commit of batch) {
|
|
1080
|
-
// Stopping logic (check AFTER processing the commit):
|
|
1081
|
-
// - SHA + limit > 0: Find SHA, ensure at least `limit` commits loaded
|
|
1082
|
-
// - SHA + limit = 0: Find SHA, stop immediately
|
|
1083
|
-
// - No SHA + limit > 0: Load exactly `limit` commits
|
|
1084
|
-
// - No SHA + limit = 0: Load everything remaining
|
|
1085
|
-
// - SHA + limit > 0 + still unfound past 10× limit: defensive cap so an unreachable
|
|
1086
|
-
// SHA (e.g. a stale merge-base the webview hasn't yet seen invalidated) can't
|
|
1087
|
-
// walk the entire history. `hasMore=true` lets callers retry; the graph-wrapper
|
|
1088
|
-
// side deduplicates re-requests so the cap doesn't loop.
|
|
1089
|
-
if (
|
|
1090
|
-
(limit && count >= limit && (!sha || found || count >= limit * 10)) ||
|
|
1091
|
-
(!limit && sha && found)
|
|
1092
|
-
) {
|
|
1093
|
-
hasMore = true;
|
|
1094
|
-
aborter.abort();
|
|
1095
|
-
break outer;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
if (sha && !found && commit.sha === sha) {
|
|
1099
|
-
found = true;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
count++;
|
|
1103
|
-
if (ids.has(commit.sha)) continue;
|
|
1104
|
-
|
|
1105
|
-
const built = buildRowFromCommit(commit);
|
|
1106
|
-
if (built == null) continue; // remapped-stash dedup
|
|
1107
|
-
|
|
1108
|
-
const { row, refHeads, refRemoteHeads, refTags, head, parents } = built;
|
|
1109
|
-
const refs = accumulateRowState(
|
|
1110
|
-
row.sha,
|
|
1111
|
-
parents,
|
|
1112
|
-
refHeads,
|
|
1113
|
-
refRemoteHeads,
|
|
1114
|
-
refTags,
|
|
1115
|
-
head,
|
|
1116
|
-
row.kind === 'stash',
|
|
1117
|
-
);
|
|
1118
|
-
// Transient: the row processor's `+unique` decision reads this; stripped by finalize.
|
|
1119
|
-
// Unsorted (the consumer re-sorts after decoding) — order doesn't affect interning.
|
|
1120
|
-
row.reachability = refs?.size ? { partial: true, refs: [...refs.values()] } : undefined;
|
|
1121
|
-
rowProcessor?.processRow(row, graphCtx!);
|
|
1122
|
-
finalizeRowReachability(row, row.sha, refs);
|
|
1123
|
-
rows.push(row);
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
const startingCursor = cursor?.sha;
|
|
1128
|
-
const lastSha = last(ids);
|
|
1129
|
-
cursor = lastSha != null ? { sha: lastSha, skip: total - iterations } : undefined;
|
|
1130
|
-
|
|
1131
|
-
const rowsStatsDeferred = buildRowsStatsDeferred(rows);
|
|
1132
|
-
|
|
1133
|
-
return {
|
|
1134
|
-
repoPath: repoPath,
|
|
1135
|
-
avatars: avatars,
|
|
1136
|
-
ids: ids,
|
|
1137
|
-
includes: options?.include,
|
|
1138
|
-
branches: branchMap,
|
|
1139
|
-
remotes: remoteMap,
|
|
1140
|
-
downstreams: downstreamMap,
|
|
1141
|
-
stashes: gitStash?.stashes,
|
|
1142
|
-
worktrees: worktrees,
|
|
1143
|
-
worktreesByBranch: worktreesByBranch,
|
|
1144
|
-
reachableFromHEAD: reachableFromHEAD,
|
|
1145
|
-
rewriteableFromHEAD: rewriteableFromHEAD,
|
|
1146
|
-
reachability: reachabilityBuilder.build(),
|
|
1147
|
-
refTips: refTips,
|
|
1148
|
-
decorationFingerprint: decorationFingerprint,
|
|
1149
|
-
shallow: shallow,
|
|
1150
|
-
rows: rows,
|
|
1151
|
-
id: sha ?? rev,
|
|
1152
|
-
rowsStats: rowStats,
|
|
1153
|
-
rowsStatsDeferred: rowsStatsDeferred,
|
|
1154
|
-
paging: {
|
|
1155
|
-
limit: limit === 0 ? count : limit,
|
|
1156
|
-
startingCursor: startingCursor,
|
|
1157
|
-
hasMore: hasMore,
|
|
1158
|
-
},
|
|
1159
|
-
more: async (
|
|
1160
|
-
limit: number,
|
|
1161
|
-
sha?: string,
|
|
1162
|
-
cancellation?: AbortSignal,
|
|
1163
|
-
): Promise<GitGraph | undefined> =>
|
|
1164
|
-
getCommitsForGraphCore.call(this, limit, sha, cursor, cancellation),
|
|
1165
|
-
};
|
|
1166
|
-
} catch (ex) {
|
|
1167
|
-
scope?.error(ex);
|
|
1168
|
-
debugger;
|
|
1169
|
-
|
|
1170
|
-
throw ex;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
// R6b incremental head-walk fast path: enumerate ONLY the new commits, stitch the seed's cached tail,
|
|
1175
|
-
// and re-derive flags/reachability in memory — instead of re-walking every loaded row. Returns
|
|
1176
|
-
// `undefined` (→ full walk below) on any structural change. Reports the outcome via `onIncrementalResult`.
|
|
1177
|
-
let incrementalFallbackReason: IncrementalGraphFallbackReason | undefined;
|
|
1178
|
-
const tryIncrementalGraph = async (seed: GraphIncrementalSeed): Promise<GitGraph | undefined> => {
|
|
1179
|
-
const onResult = options?.onIncrementalResult;
|
|
1180
|
-
// Reports a fallback outcome; callers then `return undefined` to take the full walk.
|
|
1181
|
-
const fallback = (reason: IncrementalGraphFallbackReason): void => {
|
|
1182
|
-
incrementalFallbackReason = reason;
|
|
1183
|
-
onResult?.({ path: 'fallback', reason: reason });
|
|
1184
|
-
};
|
|
1185
|
-
|
|
1186
|
-
// Cheap gates (no git).
|
|
1187
|
-
if (rowProcessor == null || graphCtx == null) {
|
|
1188
|
-
fallback('no-row-processor');
|
|
1189
|
-
return undefined;
|
|
1190
|
-
}
|
|
1191
|
-
// The convergence + date-boundary reasoning is only sound for `date` order.
|
|
1192
|
-
if (ordering !== 'date' || seed.ordering !== 'date') {
|
|
1193
|
-
fallback('ordering-not-date');
|
|
1194
|
-
return undefined;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
const seedShas = new Set<string>(seed.rows.map(r => r.sha));
|
|
1198
|
-
|
|
1199
|
-
// A `rev` narrows the walk's find/stop semantics. The host's same-repo rebuild passes a rebuild
|
|
1200
|
-
// ANCHOR sha (the loaded window's bottom) to pin that boundary — the anchor is by construction inside
|
|
1201
|
-
// the seed, and the stitch + trim below preserve the seed tail, so the fast path can honor it (it
|
|
1202
|
-
// grows the window down to the anchor; see the window/limit shape below). A rev NOT in the seed is a
|
|
1203
|
-
// real out-of-window target (deep link, reveal) the fast path can't reach → full walk.
|
|
1204
|
-
if (rev != null && !seedShas.has(rev)) {
|
|
1205
|
-
fallback('rev-outside-seed');
|
|
1206
|
-
return undefined;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
// First-parent (now or in the seed) means the emitted rows carry sliced parents the in-memory
|
|
1210
|
-
// re-derivation can't expand back to the full set the walk propagates through.
|
|
1211
|
-
if (onlyFollowFirstParent || seed.onlyFollowFirstParent) {
|
|
1212
|
-
fallback('first-parent');
|
|
1213
|
-
return undefined;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
// The ACTUAL current HEAD sha (to seed reachable-from-HEAD and detect a checkout). Distinct from
|
|
1217
|
-
// `selectSha`, which resolves the `rev` ANCHOR — not HEAD — when a rev is passed: with no rev
|
|
1218
|
-
// `selectSha` already IS the resolved HEAD, otherwise take the current branch tip (also populated for
|
|
1219
|
-
// a detached HEAD). The graph `id` still mirrors the full walk's `selectSha ?? rev` (below).
|
|
1220
|
-
const currentHeadSha = rev == null ? selectSha : headBranch?.sha;
|
|
1221
|
-
|
|
1222
|
-
// Reuse the prelude's tips (same repo state — nothing mutates between the prelude and here).
|
|
1223
|
-
const currentTips = refTips;
|
|
1224
|
-
|
|
1225
|
-
// Shallow-state gate: an un-shallow (or re-shallow) while the graph was closed leaves every branch
|
|
1226
|
-
// tip put — so it passes the tip diff below — yet changes what history exists BELOW the loaded window
|
|
1227
|
-
// (a stale-false `hasMore` would hide the newly deepened commits). Any change → full walk. Checked
|
|
1228
|
-
// against the prelude's already-captured `shallow` (no extra git).
|
|
1229
|
-
if ((seed.shallow ?? false) !== shallow) {
|
|
1230
|
-
fallback('shallow-changed');
|
|
1231
|
-
return undefined;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
// Replace-ref gate: `git replace` (and grafts) rewrite ancestry PRESENTATION globally, so any
|
|
1235
|
-
// change to the replace-ref set (`refs/replace/*`) invalidates the cached rows' parent links even when
|
|
1236
|
-
// no branch tip moved. An UNCHANGED set (including non-empty) stays fast-path-eligible — the seed rows
|
|
1237
|
-
// were built under the same replacement view. Replace refs aren't `isMoveableGraphRef`s (no badge), so
|
|
1238
|
-
// the tip diff below skips them; diff them here on their own.
|
|
1239
|
-
let seedReplaceCount = 0;
|
|
1240
|
-
for (const [refname, oldSha] of seed.tips) {
|
|
1241
|
-
if (!refname.startsWith('refs/replace/')) continue;
|
|
1242
|
-
|
|
1243
|
-
seedReplaceCount++;
|
|
1244
|
-
// Removed (gone from current) or retargeted (points at a different replacement object).
|
|
1245
|
-
if (currentTips.get(refname) !== oldSha) {
|
|
1246
|
-
fallback('replace-refs-changed');
|
|
1247
|
-
return undefined;
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
let currentReplaceCount = 0;
|
|
1251
|
-
for (const refname of currentTips.keys()) {
|
|
1252
|
-
if (refname.startsWith('refs/replace/')) {
|
|
1253
|
-
currentReplaceCount++;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
// Every seed replace ref is present-and-equal in current (checked above); an unequal count means a
|
|
1257
|
-
// replace ref was ADDED.
|
|
1258
|
-
if (seedReplaceCount !== currentReplaceCount) {
|
|
1259
|
-
fallback('replace-refs-changed');
|
|
1260
|
-
return undefined;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
// Ref-tip diff gate: deletions + non-fast-forward moves force a full walk.
|
|
1264
|
-
// Reused rows whose ref badges / current-HEAD flag changed and must be rebuilt from raw git.
|
|
1265
|
-
const affected = new Set<string>();
|
|
1266
|
-
const ffPairs: [string, string][] = [];
|
|
1267
|
-
// A moved/new REMOTE ref also changes its tracking branches' ahead/behind — baked into those
|
|
1268
|
-
// branch pills' serialized contexts (`+ahead`/`+behind` drive Push/Pull menu gating) — while the
|
|
1269
|
-
// LOCAL tips stay put; refetch those rows too so a plain fetch corrects them without a full walk.
|
|
1270
|
-
const addTrackingBranchRows = (remoteRefname: string): void => {
|
|
1271
|
-
if (branches == null || !remoteRefname.startsWith('refs/remotes/')) return;
|
|
1272
|
-
|
|
1273
|
-
const upstreamName = remoteRefname.substring('refs/remotes/'.length);
|
|
1274
|
-
for (const b of branches) {
|
|
1275
|
-
if (b.upstream?.name === upstreamName && b.sha != null && seedShas.has(b.sha)) {
|
|
1276
|
-
affected.add(b.sha);
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
};
|
|
1280
|
-
for (const [refname, oldSha] of seed.tips) {
|
|
1281
|
-
if (!isMoveableGraphRef(refname)) continue;
|
|
1282
|
-
|
|
1283
|
-
const cur = currentTips.get(refname);
|
|
1284
|
-
if (cur == null) {
|
|
1285
|
-
fallback('ref-deleted');
|
|
1286
|
-
return undefined;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
if (cur !== oldSha) {
|
|
1290
|
-
ffPairs.push([oldSha, cur]);
|
|
1291
|
-
if (seedShas.has(oldSha)) {
|
|
1292
|
-
affected.add(oldSha);
|
|
1293
|
-
}
|
|
1294
|
-
if (seedShas.has(cur)) {
|
|
1295
|
-
affected.add(cur);
|
|
1296
|
-
}
|
|
1297
|
-
addTrackingBranchRows(refname);
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
// New refs (present now, absent from the seed) landing on an already-loaded row.
|
|
1301
|
-
for (const [refname, cur] of currentTips) {
|
|
1302
|
-
if (!isMoveableGraphRef(refname) || seed.tips.has(refname)) continue;
|
|
1303
|
-
|
|
1304
|
-
if (seedShas.has(cur)) {
|
|
1305
|
-
affected.add(cur);
|
|
1306
|
-
}
|
|
1307
|
-
addTrackingBranchRows(refname);
|
|
1308
|
-
}
|
|
1309
|
-
if (ffPairs.length > 0) {
|
|
1310
|
-
// Bounded fan-out: a mass-moved-ref fetch can produce hundreds of pairs — an unbounded
|
|
1311
|
-
// `Promise.all` would monopolize (or overflow) the git queue. Small chunks stay well under the
|
|
1312
|
-
// queue's slot count, and the first non-fast-forward bails without paying for the rest.
|
|
1313
|
-
const ffCheckChunkSize = 4;
|
|
1314
|
-
for (let i = 0; i < ffPairs.length; i += ffCheckChunkSize) {
|
|
1315
|
-
const results = await Promise.all(
|
|
1316
|
-
ffPairs
|
|
1317
|
-
.slice(i, i + ffCheckChunkSize)
|
|
1318
|
-
.map(([oldSha, newSha]) => this.isFastForward(repoPath, oldSha, newSha, cancellation)),
|
|
1319
|
-
);
|
|
1320
|
-
if (results.some(ok => !ok)) {
|
|
1321
|
-
fallback('ref-non-fast-forward');
|
|
1322
|
-
return undefined;
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
// HEAD move (checkout) — old/new HEAD rows need their `isCurrentHead` re-derived from raw git. A
|
|
1328
|
-
// checkout between two branches sitting on the SAME commit moves no sha yet flips which head carries
|
|
1329
|
-
// `isCurrentHead`, so compare the current-head ref NAME too (both are git short refnames; a detached
|
|
1330
|
-
// HEAD has an undefined branch name). Either sha or name differing re-derives both endpoints' rows.
|
|
1331
|
-
const priorHeadRow = seed.rows.find(r => r.heads?.some(h => h.isCurrentHead));
|
|
1332
|
-
const priorHeadSha = priorHeadRow?.sha;
|
|
1333
|
-
const priorHeadName = priorHeadRow?.heads?.find(h => h.isCurrentHead)?.name;
|
|
1334
|
-
const currentHeadName = headBranch?.name;
|
|
1335
|
-
if (priorHeadSha !== currentHeadSha || priorHeadName !== currentHeadName) {
|
|
1336
|
-
if (priorHeadSha != null && seedShas.has(priorHeadSha)) {
|
|
1337
|
-
affected.add(priorHeadSha);
|
|
1338
|
-
}
|
|
1339
|
-
if (currentHeadSha != null && seedShas.has(currentHeadSha)) {
|
|
1340
|
-
affected.add(currentHeadSha);
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
// Stash-set gate: any push/pop/drop changes the injected rows.
|
|
1345
|
-
const currentStashShas =
|
|
1346
|
-
gitStash?.stashes != null ? new Set<string>(gitStash.stashes.keys()) : new Set<string>();
|
|
1347
|
-
const priorStashShas = seed.rows.filter(r => r.kind === 'stash').map(r => r.sha);
|
|
1348
|
-
if (priorStashShas.length !== currentStashShas.size || priorStashShas.some(s => !currentStashShas.has(s))) {
|
|
1349
|
-
fallback('stash-changed');
|
|
1350
|
-
return undefined;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
// Decoration-metadata gate: rows EMBED metadata derived from side inputs (default branch,
|
|
1354
|
-
// upstreams, worktree assignments, remote urls/providers, current user) that can change without
|
|
1355
|
-
// moving any ref tip — e.g. `git remote set-head`, `branch --set-upstream-to`, `worktree add`.
|
|
1356
|
-
// Reused rows keep their prior decorations (only flags/reachability are re-derived below), so ANY
|
|
1357
|
-
// change here must take the full walk that rebuilds them. An absent seed fingerprint never matches —
|
|
1358
|
-
// safe full fallback. Deliberately LAST of the gates so the structural gates above keep their precise
|
|
1359
|
-
// reasons (a deleted tracking branch reports `ref-deleted`, not this).
|
|
1360
|
-
if (seed.decorationFingerprint !== decorationFingerprint) {
|
|
1361
|
-
fallback('metadata-changed');
|
|
1362
|
-
return undefined;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
// Per-branch upstream retargets/removals/additions on RETAINED rows: a branch pill embeds its
|
|
1366
|
-
// upstream, and a tip-stationary branch's row is reused as-is — so compare every seed-row pill's
|
|
1367
|
-
// embedded upstream against the current mapping. Kept OUT of the fingerprint so a NEW tracking
|
|
1368
|
-
// branch stays fast (its row is rebuilt via the `affected` refetch; a deleted one is `ref-deleted`).
|
|
1369
|
-
for (const r of seed.rows) {
|
|
1370
|
-
if (r.heads == null) continue;
|
|
1371
|
-
|
|
1372
|
-
for (const h of r.heads) {
|
|
1373
|
-
const currentBranch = branchMap.get(h.name);
|
|
1374
|
-
if (currentBranch == null) continue;
|
|
1375
|
-
|
|
1376
|
-
if (h.upstream?.name !== currentBranch.upstream?.name) {
|
|
1377
|
-
fallback('metadata-changed');
|
|
1378
|
-
return undefined;
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
// Enumerate the new commits (reachable now but not from any prior tip) + boundary check.
|
|
1384
|
-
// Stashes' rows are already in the seed, so their shas join the EXCLUSIONS (passing them via
|
|
1385
|
-
// `--all` would re-emit them as "new"). The exclusions are fed as `^sha` lines over stdin, NOT
|
|
1386
|
-
// argv — a repo can carry more distinct ref tips (tags, PR refs) than a command line holds
|
|
1387
|
-
// (Windows caps ~32K chars), and stdin is unbounded.
|
|
1388
|
-
const notShas = new Set<string>(seed.tips.values());
|
|
1389
|
-
for (const s of currentStashShas) {
|
|
1390
|
-
notShas.add(s);
|
|
1391
|
-
}
|
|
1392
|
-
let exclusionsStdin = '';
|
|
1393
|
-
for (const s of notShas) {
|
|
1394
|
-
exclusionsStdin += `^${s}\n`;
|
|
1395
|
-
}
|
|
1396
|
-
const enumResult = await this.git.run(
|
|
1397
|
-
{ cwd: repoPath, configs: gitConfigsLog, cancellation: cancellation, stdin: exclusionsStdin },
|
|
1398
|
-
'log',
|
|
1399
|
-
...parser.arguments,
|
|
1400
|
-
'--date-order',
|
|
1401
|
-
'--all',
|
|
1402
|
-
'--stdin',
|
|
1403
|
-
'--',
|
|
1404
|
-
);
|
|
1405
|
-
const newCommits = [...parser.parse(enumResult.stdout)];
|
|
1406
|
-
|
|
1407
|
-
// Stitch soundness: the result must equal [...new, ...seed]. That holds iff every new commit is
|
|
1408
|
-
// strictly newer than the seam (the max date across the seed window) — an equal/older date could
|
|
1409
|
-
// interleave under `--date-order`, so bail. Checked on raw dates BEFORE any mutation.
|
|
1410
|
-
let maxSeedDate = Number.NEGATIVE_INFINITY;
|
|
1411
|
-
for (const r of seed.rows) {
|
|
1412
|
-
if (r.date > maxSeedDate) {
|
|
1413
|
-
maxSeedDate = r.date;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
for (const c of newCommits) {
|
|
1417
|
-
if (Number(c.committerDate) * 1000 <= maxSeedDate) {
|
|
1418
|
-
fallback('date-boundary');
|
|
1419
|
-
return undefined;
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
// Window/limit shape.
|
|
1424
|
-
const stitchedSize = newCommits.length + seed.rows.length;
|
|
1425
|
-
const seedHasMore = seed.hasMore === true;
|
|
1426
|
-
const noLimit = defaultLimit === 0;
|
|
1427
|
-
// The rev anchor (a seed sha) bounds the walk's BOTTOM: the full walk with `sha=rev` grows its window
|
|
1428
|
-
// down to (and INCLUDING) rev before honoring the limit — and with no limit it stops the instant it
|
|
1429
|
-
// finds rev — so the anchor row survives the trim even when `limit` alone would cut above it. Its index
|
|
1430
|
-
// in the assembled window `[new…, seed…]` (new commits never dedup, so `newRows.length` equals
|
|
1431
|
-
// `newCommits.length`): `newCommits.length + <its index in seed.rows>`.
|
|
1432
|
-
const revWindowIndex = rev != null ? newCommits.length + seed.rows.findIndex(r => r.sha === rev) : -1;
|
|
1433
|
-
// Rows the walk targets: `defaultLimit`, raised to at least include the rev anchor (with no limit + rev,
|
|
1434
|
-
// exactly `revWindowIndex + 1`, since the walk stops on finding rev).
|
|
1435
|
-
const targetRows =
|
|
1436
|
-
rev != null
|
|
1437
|
-
? noLimit
|
|
1438
|
-
? revWindowIndex + 1
|
|
1439
|
-
: Math.max(defaultLimit, revWindowIndex + 1)
|
|
1440
|
-
: defaultLimit;
|
|
1441
|
-
// The fast path can only serve rows the seed carries; if more is wanted than it holds AND there was
|
|
1442
|
-
// more below it, git is needed for the gap → full walk. (No rev + no limit wants everything below.)
|
|
1443
|
-
const wantsBelowWindow = rev != null ? targetRows > stitchedSize : noLimit || defaultLimit > stitchedSize;
|
|
1444
|
-
if (wantsBelowWindow && seedHasMore) {
|
|
1445
|
-
fallback('limit-exceeds-seed');
|
|
1446
|
-
return undefined;
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
const trimTo =
|
|
1450
|
-
rev != null
|
|
1451
|
-
? Math.min(targetRows, stitchedSize)
|
|
1452
|
-
: noLimit
|
|
1453
|
-
? stitchedSize
|
|
1454
|
-
: Math.min(defaultLimit, stitchedSize);
|
|
1455
|
-
const hasMore = trimTo < stitchedSize || seedHasMore;
|
|
1456
|
-
// Stashes present in the window make the `more()` skip math (records vs unique ids) ambiguous —
|
|
1457
|
-
// only take the fast path when nothing pages below.
|
|
1458
|
-
if (currentStashShas.size > 0 && hasMore) {
|
|
1459
|
-
fallback('stash-window-conflict');
|
|
1460
|
-
return undefined;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
// Commit to the fast path — mutations begin here (all fallbacks are above).
|
|
1464
|
-
const newRows: GitGraphRow[] = [];
|
|
1465
|
-
for (const c of newCommits) {
|
|
1466
|
-
const built = buildRowFromCommit(c);
|
|
1467
|
-
if (built != null) {
|
|
1468
|
-
newRows.push(built.row);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
// Rebuild the affected reused rows from raw git (bounded `--no-walk`) so their ref badges + emojified
|
|
1473
|
-
// message + current-HEAD flag are exactly what a full walk would produce (git owns %D ordering).
|
|
1474
|
-
const refetched = new Map<string, GitGraphRow>();
|
|
1475
|
-
if (affected.size > 0) {
|
|
1476
|
-
// SHAs over stdin, not argv — a mass-moved-ref fetch can put hundreds of retained rows in
|
|
1477
|
-
// `affected`, past what a command line holds (see the enumeration above).
|
|
1478
|
-
const refetchResult = await this.git.run(
|
|
1479
|
-
{ cwd: repoPath, configs: gitConfigsLog, cancellation: cancellation, stdin: join(affected, '\n') },
|
|
1480
|
-
'log',
|
|
1481
|
-
...parser.arguments,
|
|
1482
|
-
'--no-walk',
|
|
1483
|
-
'--stdin',
|
|
1484
|
-
'--',
|
|
1485
|
-
);
|
|
1486
|
-
for (const c of parser.parse(refetchResult.stdout)) {
|
|
1487
|
-
const built = buildRowFromCommit(c);
|
|
1488
|
-
if (built != null) {
|
|
1489
|
-
refetched.set(built.row.sha, built.row);
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
const freshShas = new Set<string>([...newRows.map(r => r.sha), ...refetched.keys()]);
|
|
1494
|
-
|
|
1495
|
-
// Assemble [new…, reused/refetched…] and trim to the requested window (new commits push the
|
|
1496
|
-
// bottom rows out — exactly what a full walk at this limit does).
|
|
1497
|
-
const windowRows: GitGraphRow[] = [...newRows];
|
|
1498
|
-
for (const r of seed.rows) {
|
|
1499
|
-
windowRows.push(refetched.get(r.sha) ?? r);
|
|
1500
|
-
}
|
|
1501
|
-
windowRows.length = Math.min(windowRows.length, trimTo);
|
|
1502
|
-
|
|
1503
|
-
// Building the fresh rows above populated `ids`/`total` (via `buildRowFromCommit`); reset and rebuild
|
|
1504
|
-
// them from the FINAL trimmed window so `ids`/`total`/the reachability boundary match a full walk
|
|
1505
|
-
// exactly (this is what makes `more()` continue identically).
|
|
1506
|
-
ids.clear();
|
|
1507
|
-
total = 0;
|
|
1508
|
-
for (const row of windowRows) {
|
|
1509
|
-
ids.add(row.sha);
|
|
1510
|
-
total++;
|
|
1511
|
-
const refs = accumulateRowState(
|
|
1512
|
-
row.sha,
|
|
1513
|
-
row.parents,
|
|
1514
|
-
row.heads ?? [],
|
|
1515
|
-
row.remotes ?? [],
|
|
1516
|
-
row.tags ?? [],
|
|
1517
|
-
row.sha === currentHeadSha,
|
|
1518
|
-
row.kind === 'stash',
|
|
1519
|
-
);
|
|
1520
|
-
if (freshShas.has(row.sha)) {
|
|
1521
|
-
// Fresh rows are raw — run the full processor (contexts, emojify, avatar). Reused rows keep
|
|
1522
|
-
// their already-processed contexts/message; only their flags (below) are recomputed.
|
|
1523
|
-
row.reachability = refs?.size ? { partial: true, refs: [...refs.values()] } : undefined;
|
|
1524
|
-
rowProcessor.processRow(row, graphCtx);
|
|
1525
|
-
}
|
|
1526
|
-
// Authoritative flags for every commit row (membership can shift on reused rows too — e.g. a new
|
|
1527
|
-
// interior branch flips `+unique`). Stash rows carry none.
|
|
1528
|
-
if (row.kind !== 'stash') {
|
|
1529
|
-
(row.contexts ??= {}).flags = computeGraphRowContextFlags(row.sha, refs?.values(), graphCtx);
|
|
1530
|
-
}
|
|
1531
|
-
finalizeRowReachability(row, row.sha, refs);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
// Reconstruct the walk's first-call cursor so `more()` (which re-spawns git from `--skip`) continues
|
|
1535
|
-
// byte-identically off the trimmed window.
|
|
1536
|
-
iterations = 1;
|
|
1537
|
-
const lastSha = last(ids);
|
|
1538
|
-
const cursor = lastSha != null ? { sha: lastSha, skip: total - iterations } : undefined;
|
|
1539
|
-
const rowsStatsDeferred = buildRowsStatsDeferred(windowRows);
|
|
1540
|
-
|
|
1541
|
-
onResult?.({ path: 'fast', added: newRows.length });
|
|
1542
|
-
return {
|
|
1543
|
-
repoPath: repoPath,
|
|
1544
|
-
avatars: avatars,
|
|
1545
|
-
ids: ids,
|
|
1546
|
-
includes: options?.include,
|
|
1547
|
-
branches: branchMap,
|
|
1548
|
-
remotes: remoteMap,
|
|
1549
|
-
downstreams: downstreamMap,
|
|
1550
|
-
stashes: gitStash?.stashes,
|
|
1551
|
-
worktrees: worktrees,
|
|
1552
|
-
worktreesByBranch: worktreesByBranch,
|
|
1553
|
-
reachableFromHEAD: reachableFromHEAD,
|
|
1554
|
-
rewriteableFromHEAD: rewriteableFromHEAD,
|
|
1555
|
-
reachability: reachabilityBuilder.build(),
|
|
1556
|
-
refTips: refTips,
|
|
1557
|
-
decorationFingerprint: decorationFingerprint,
|
|
1558
|
-
shallow: shallow,
|
|
1559
|
-
rows: windowRows,
|
|
1560
|
-
// Mirror the full walk's `id` (`sha ?? rev`, sha = the resolved rev-or-HEAD) — NOT the actual HEAD,
|
|
1561
|
-
// which `currentHeadSha` now tracks separately when a rev anchor is passed.
|
|
1562
|
-
id: selectSha ?? rev,
|
|
1563
|
-
rowsStats: rowStats,
|
|
1564
|
-
rowsStatsDeferred: rowsStatsDeferred,
|
|
1565
|
-
paging: {
|
|
1566
|
-
limit: noLimit ? total : defaultLimit,
|
|
1567
|
-
startingCursor: undefined,
|
|
1568
|
-
hasMore: hasMore,
|
|
1569
|
-
},
|
|
1570
|
-
more: async (limit: number, sha?: string, cancellation?: AbortSignal): Promise<GitGraph | undefined> =>
|
|
1571
|
-
getCommitsForGraphCore.call(this, limit, sha, cursor, cancellation),
|
|
1572
|
-
};
|
|
1573
|
-
};
|
|
1574
|
-
|
|
1575
|
-
if (options?.incrementalSeed != null) {
|
|
1576
|
-
let fast: GitGraph | undefined;
|
|
1577
|
-
try {
|
|
1578
|
-
fast = await tryIncrementalGraph(options.incrementalSeed);
|
|
1579
|
-
} catch (ex) {
|
|
1580
|
-
// The fast path must never fail where the full walk it accelerates would succeed — its git
|
|
1581
|
-
// operations have failure modes the `--all` walk doesn't (per-tip `--not` argv on huge ref
|
|
1582
|
-
// sets, queue-depth overflow fanning out FF checks, transient git errors). Cancellation
|
|
1583
|
-
// still propagates; anything else degrades to the full walk below.
|
|
1584
|
-
if (isCancellationError(ex) || cancellation?.aborted) throw ex;
|
|
1585
|
-
|
|
1586
|
-
// The fast path may have died AFTER its mutation barrier (the affected-row refetch, or the
|
|
1587
|
-
// row processor) with the walk accumulators partially populated — a full walk over polluted
|
|
1588
|
-
// `ids` would silently DROP those rows (its loop dedups on `ids.has`). Reset every closure
|
|
1589
|
-
// accumulator to its pristine pre-walk state; the seeded reachability builder is append-only
|
|
1590
|
-
// and tolerates orphaned interns by design, and mutated reused-row objects are superseded by
|
|
1591
|
-
// the full walk's fresh rows.
|
|
1592
|
-
ids.clear();
|
|
1593
|
-
total = 0;
|
|
1594
|
-
iterations = 0;
|
|
1595
|
-
rowStats.clear();
|
|
1596
|
-
avatars.clear();
|
|
1597
|
-
reachableFromHEAD.clear();
|
|
1598
|
-
rewriteableFromHEAD.clear();
|
|
1599
|
-
reachableFromHeadUpstream.clear();
|
|
1600
|
-
reachableRefs.clear();
|
|
1601
|
-
tipShasWithChildren.clear();
|
|
1602
|
-
downstreamMap.clear();
|
|
1603
|
-
headSha = undefined;
|
|
1604
|
-
rewriteableNextSha = undefined;
|
|
1605
|
-
|
|
1606
|
-
scope?.warn(`incremental graph walk failed; falling back to full walk; ${String(ex)}`);
|
|
1607
|
-
incrementalFallbackReason = 'error';
|
|
1608
|
-
options.onIncrementalResult?.({ path: 'fallback', reason: 'error' });
|
|
1609
|
-
}
|
|
1610
|
-
if (fast != null) {
|
|
1611
|
-
void this.provider.maintenance?.request(repoPath, 'commit-graph');
|
|
1612
|
-
return fast;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
// Parent-rewriting fallbacks change boundary commits' true diffs — an unshallowed parent or a
|
|
1616
|
-
// replace-ref retarget makes previously-computed per-sha stats stale, so the fallback walk must
|
|
1617
|
-
// recompute them instead of carrying the prior generation's values forward. An `error` fallback
|
|
1618
|
-
// recomputes too: the throw may have preceded the replace-ref/shallow gates, so staleness can't
|
|
1619
|
-
// be ruled out.
|
|
1620
|
-
if (
|
|
1621
|
-
incrementalFallbackReason === 'shallow-changed' ||
|
|
1622
|
-
incrementalFallbackReason === 'replace-refs-changed' ||
|
|
1623
|
-
incrementalFallbackReason === 'error'
|
|
1624
|
-
) {
|
|
1625
|
-
rowsStatsSeed = undefined;
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
let graph = await getCommitsForGraphCore.call(this, defaultLimit, selectSha, undefined, cancellation);
|
|
1630
|
-
|
|
1631
|
-
// Spurious-empty guard: the repo has branches (so `git log --all` should yield commits) yet the
|
|
1632
|
-
// log returned no rows. That's an inconsistent result — almost always a transient ref-read race
|
|
1633
|
-
// while a concurrent git operation rewrites refs/packed-refs — not a genuinely empty repo.
|
|
1634
|
-
// Returning it would flash "No commits" in the graph. Retry once (transient glitches clear within
|
|
1635
|
-
// ms). A truly empty repo has no branches and is left untouched.
|
|
1636
|
-
if (graph.rows.length === 0 && branches?.length && !cancellation?.aborted) {
|
|
1637
|
-
scope?.warn(`graph returned 0 rows but repo has ${branches.length} branches; retrying`);
|
|
1638
|
-
graph = await getCommitsForGraphCore.call(this, defaultLimit, selectSha, undefined, cancellation);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
// After the first load, hint the maintenance service to backfill the commit-graph file (background)
|
|
1642
|
-
// so the NEXT open's ordered walk starts emitting rows immediately instead of sorting the whole
|
|
1643
|
-
// history first. Fire-and-forget — the service's demand throttle decides whether it actually runs.
|
|
1644
|
-
void this.provider.maintenance?.request(repoPath, 'commit-graph');
|
|
1645
|
-
|
|
1646
|
-
return graph;
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
@debug({
|
|
1650
|
-
args: (repoPath, s, o) => ({
|
|
1651
|
-
repoPath: repoPath,
|
|
1652
|
-
search: `[${s.matchAll ? 'A' : ''}${s.matchCase ? 'C' : ''}${s.matchRegex ? 'R' : ''}${s.matchWholeWord ? 'W' : ''}]: ${
|
|
1653
|
-
s.query.length > 500 ? `${s.query.substring(0, 500)}...` : s.query
|
|
1654
|
-
}`,
|
|
1655
|
-
options: `limit=${o?.limit}, ordering=${o?.ordering}`,
|
|
1656
|
-
}),
|
|
1657
|
-
})
|
|
1658
|
-
async *searchGraph(
|
|
1659
|
-
repoPath: string,
|
|
1660
|
-
search: SearchQuery,
|
|
1661
|
-
options?: { limit?: number; ordering?: 'date' | 'author-date' | 'topo' },
|
|
1662
|
-
cancellation?: AbortSignal,
|
|
1663
|
-
): AsyncGenerator<GitGraphSearchProgress, GitGraphSearch, void> {
|
|
1664
|
-
return yield* this.searchGraphCore(repoPath, search, undefined, undefined, options, cancellation);
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
@debug({
|
|
1668
|
-
args: (repoPath, c, r, o) => ({
|
|
1669
|
-
repoPath: repoPath,
|
|
1670
|
-
cursor: `[${c.search.matchAll ? 'A' : ''}${c.search.matchCase ? 'C' : ''}${c.search.matchRegex ? 'R' : ''}${c.search.matchWholeWord ? 'W' : ''}]: ${
|
|
1671
|
-
c.search.query.length > 500 ? `${c.search.query.substring(0, 500)}...` : c.search.query
|
|
1672
|
-
} (continue)`,
|
|
1673
|
-
existingResults: `results=${r.size}`,
|
|
1674
|
-
options: `limit=${o?.limit}`,
|
|
1675
|
-
}),
|
|
1676
|
-
})
|
|
1677
|
-
async *continueSearchGraph(
|
|
1678
|
-
repoPath: string,
|
|
1679
|
-
cursor: GitGraphSearchCursor,
|
|
1680
|
-
existingResults: GitGraphSearchResults,
|
|
1681
|
-
options?: { limit?: number },
|
|
1682
|
-
cancellation?: AbortSignal,
|
|
1683
|
-
): AsyncGenerator<GitGraphSearchProgress, GitGraphSearch, void> {
|
|
1684
|
-
return yield* this.searchGraphCore(repoPath, cursor.search, cursor, existingResults, options, cancellation);
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Cheap commit count for `search`, no result materialization — used to probe a candidate relaxed
|
|
1689
|
-
* query before offering it. Never throws: any failure (including a sha-only `commit:` query, which
|
|
1690
|
-
* can't be meaningfully "relaxed") returns 0, since this is a probe, not a search.
|
|
1691
|
-
*/
|
|
1692
|
-
async countSearchResults(
|
|
1693
|
-
repoPath: string,
|
|
1694
|
-
search: SearchQuery,
|
|
1695
|
-
options?: { maxCount?: number },
|
|
1696
|
-
cancellation?: AbortSignal,
|
|
1697
|
-
): Promise<number> {
|
|
1698
|
-
try {
|
|
1699
|
-
search = { matchAll: false, matchCase: false, matchRegex: true, matchWholeWord: false, ...search };
|
|
1700
|
-
|
|
1701
|
-
const currentUser = search.query.includes('@me')
|
|
1702
|
-
? await this.provider.config.getCurrentUser(repoPath)
|
|
1703
|
-
: undefined;
|
|
1704
|
-
|
|
1705
|
-
const { args: searchArgs, files, shas, filters } = parseSearchQueryGitCommand(search, currentUser);
|
|
1706
|
-
// An exact sha lookup can't be relaxed by dropping filter groups — nothing to count.
|
|
1707
|
-
if (shas?.size) return 0;
|
|
1708
|
-
|
|
1709
|
-
// `--merges` matches stash commits too (they have 2-3 parents). `rev-list` gets no stdin, so the
|
|
1710
|
-
// only stash that can leak in here is refs/stash's tip via `--all` -- exclude it up front
|
|
1711
|
-
if (filters.type === 'merge') {
|
|
1712
|
-
const allIndex = searchArgs.indexOf('--all');
|
|
1713
|
-
if (allIndex !== -1) {
|
|
1714
|
-
searchArgs.splice(allIndex, 0, '--exclude=refs/stash');
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
const maxCount = options?.maxCount ?? 1000;
|
|
1719
|
-
const result = await this.git.run(
|
|
1720
|
-
{ cwd: repoPath, configs: gitConfigsLog, cancellation: cancellation, errors: 'ignore' },
|
|
1721
|
-
'rev-list',
|
|
1722
|
-
'--count',
|
|
1723
|
-
`--max-count=${maxCount}`,
|
|
1724
|
-
...searchArgs,
|
|
1725
|
-
'--',
|
|
1726
|
-
...files,
|
|
1727
|
-
);
|
|
1728
|
-
|
|
1729
|
-
const count = Number.parseInt(result.stdout.trim(), 10);
|
|
1730
|
-
return Number.isFinite(count) ? count : 0;
|
|
1731
|
-
} catch {
|
|
1732
|
-
return 0;
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
private async *searchGraphCore(
|
|
1737
|
-
repoPath: string,
|
|
1738
|
-
search: SearchQuery,
|
|
1739
|
-
cursor: GitGraphSearchCursor | undefined,
|
|
1740
|
-
existingResults: GitGraphSearchResults | undefined,
|
|
1741
|
-
options?: { limit?: number; ordering?: 'date' | 'author-date' | 'topo' },
|
|
1742
|
-
cancellation?: AbortSignal,
|
|
1743
|
-
): AsyncGenerator<GitGraphSearchProgress, GitGraphSearch, void> {
|
|
1744
|
-
search = { matchAll: false, matchCase: false, matchRegex: true, matchWholeWord: false, ...search };
|
|
1745
|
-
|
|
1746
|
-
const comparisonKey = getSearchQueryComparisonKey(search);
|
|
1747
|
-
try {
|
|
1748
|
-
const currentUser = search.query.includes('@me')
|
|
1749
|
-
? await this.provider.config.getCurrentUser(repoPath)
|
|
1750
|
-
: undefined;
|
|
1751
|
-
|
|
1752
|
-
const { args: searchArgs, files, shas, filters } = parseSearchQueryGitCommand(search, currentUser);
|
|
1753
|
-
|
|
1754
|
-
const tipsOnly = filters.type === 'tip';
|
|
1755
|
-
// Stash commits have 2-3 parents, so `--merges` matches them; excluded from results below.
|
|
1756
|
-
// Derived from the args git actually runs rather than `filters.type`, since a multi-value
|
|
1757
|
-
// `type:` query (e.g. `type:merge type:tip`) leaves `--merges` in the args while
|
|
1758
|
-
// `filters.type` reflects only the last value parsed
|
|
1759
|
-
const mergesOnly = searchArgs.includes('--merges');
|
|
1760
|
-
const parser = filters.files
|
|
1761
|
-
? getShaAndDatesWithFilesLogParser(tipsOnly)
|
|
1762
|
-
: getShaAndDatesLogParser(tipsOnly);
|
|
1763
|
-
|
|
1764
|
-
const similarityThreshold = this.context.config?.commits.similarityThreshold ?? undefined;
|
|
1765
|
-
const args = [
|
|
1766
|
-
'log',
|
|
1767
|
-
...parser.arguments,
|
|
1768
|
-
`-M${similarityThreshold == null ? '' : `${similarityThreshold}%`}`,
|
|
1769
|
-
'--use-mailmap',
|
|
1770
|
-
];
|
|
1771
|
-
|
|
1772
|
-
let stashes: Map<string, GitStashCommit> | undefined;
|
|
1773
|
-
let stdin: string | undefined;
|
|
1774
|
-
let remappedIds: Map<string, string>;
|
|
1775
|
-
|
|
1776
|
-
let resolvedShas: Set<string> | undefined;
|
|
1777
|
-
if (shas?.size) {
|
|
1778
|
-
resolvedShas = await this.provider.revision.resolveShas(repoPath, shas, cancellation);
|
|
1779
|
-
// Never throw on cancellation here: the outer catch wraps non-GitSearchError into
|
|
1780
|
-
// GitSearchError, which surfaces as a false "Invalid search pattern". Return instead.
|
|
1781
|
-
if (cancellation?.aborted) {
|
|
1782
|
-
return {
|
|
1783
|
-
repoPath: repoPath,
|
|
1784
|
-
query: search,
|
|
1785
|
-
queryFilters: filters,
|
|
1786
|
-
comparisonKey: comparisonKey,
|
|
1787
|
-
results: existingResults ?? new Map<string, GitGraphSearchResultData>(),
|
|
1788
|
-
hasMore: true,
|
|
1789
|
-
};
|
|
1790
|
-
}
|
|
1791
|
-
// Short SHA(s) matched no commit: return empty (empty stdin to `--no-walk --stdin`
|
|
1792
|
-
// would return HEAD, so we must not fall through to git).
|
|
1793
|
-
if (!resolvedShas.size) {
|
|
1794
|
-
return {
|
|
1795
|
-
repoPath: repoPath,
|
|
1796
|
-
query: search,
|
|
1797
|
-
queryFilters: filters,
|
|
1798
|
-
comparisonKey: comparisonKey,
|
|
1799
|
-
results: existingResults ?? new Map<string, GitGraphSearchResultData>(),
|
|
1800
|
-
hasMore: false,
|
|
1801
|
-
};
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
if (resolvedShas?.size) {
|
|
1806
|
-
stdin = join(resolvedShas, '\n');
|
|
1807
|
-
args.push('--no-walk');
|
|
1808
|
-
|
|
1809
|
-
remappedIds = new Map();
|
|
1810
|
-
} else if (!filters.refs) {
|
|
1811
|
-
// Don't include stashes when using ref: filter, as they would add unrelated commits
|
|
1812
|
-
// There *HAS* to be a better way to get git log to return stashes, but this is the best we've found
|
|
1813
|
-
const converted = convertStashesToStdin(
|
|
1814
|
-
await this.provider.stash?.getStash(repoPath, { includeFiles: false }, cancellation),
|
|
1815
|
-
);
|
|
1816
|
-
stashes = converted.stashes;
|
|
1817
|
-
remappedIds = converted.remappedIds;
|
|
1818
|
-
// `--all` already surfaces refs/stash's tip on its own, so when merges-only there's no need
|
|
1819
|
-
// to walk the rest of the stash stack via stdin -- the results filter below still excludes
|
|
1820
|
-
// any stash sha that slips through via refs/stash
|
|
1821
|
-
stdin = mergesOnly ? undefined : converted.stdin;
|
|
1822
|
-
} else if (mergesOnly) {
|
|
1823
|
-
// `ref:` skips walking stashes into the results (they're unrelated to the ref), but a
|
|
1824
|
-
// stash's tip can still leak in via `--merges` if the ref reaches refs/stash -- fetch
|
|
1825
|
-
// stashes here purely so the results filter below can exclude them, without widening
|
|
1826
|
-
// the walk via stdin
|
|
1827
|
-
const converted = convertStashesToStdin(
|
|
1828
|
-
await this.provider.stash?.getStash(repoPath, { includeFiles: false }, cancellation),
|
|
1829
|
-
);
|
|
1830
|
-
stashes = converted.stashes;
|
|
1831
|
-
remappedIds = converted.remappedIds;
|
|
1832
|
-
} else {
|
|
1833
|
-
remappedIds = new Map();
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
if (stdin) {
|
|
1837
|
-
args.push('--stdin');
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
const limit = options?.limit ?? this.context.config?.graph?.maxSearchItems ?? 0;
|
|
1841
|
-
const ordering = options?.ordering ?? this.context.config?.commits.ordering ?? undefined;
|
|
1842
|
-
if (ordering) {
|
|
1843
|
-
args.push(`--${ordering}-order`);
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
// Add the search args, but skip any shas (as they are already included in the stdin)
|
|
1847
|
-
for (const arg of searchArgs) {
|
|
1848
|
-
if (shas?.has(arg) || args.includes(arg)) continue;
|
|
1849
|
-
|
|
1850
|
-
args.push(arg);
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
const results: GitGraphSearchResults = existingResults ?? new Map<string, GitGraphSearchResultData>();
|
|
1854
|
-
|
|
1855
|
-
// Use state from cursor, if provided
|
|
1856
|
-
const cursorState = cursor?.state != null && typeof cursor.state === 'object' ? cursor.state : undefined;
|
|
1857
|
-
let iterations = cursorState?.iterations ?? 0;
|
|
1858
|
-
let totalSeen = cursorState?.totalSeen ?? 0;
|
|
1859
|
-
let skipCursor = cursorState ? { sha: cursorState.sha, skip: cursorState.skip } : undefined;
|
|
1860
|
-
|
|
1861
|
-
let count = 0;
|
|
1862
|
-
try {
|
|
1863
|
-
iterations++;
|
|
1864
|
-
|
|
1865
|
-
const aborter = new AbortController();
|
|
1866
|
-
const onAbort = () => {
|
|
1867
|
-
aborter.abort();
|
|
1868
|
-
};
|
|
1869
|
-
cancellation?.addEventListener('abort', onAbort, { once: true });
|
|
1870
|
-
// An ALREADY-aborted signal (e.g. `toAbortSignal` of a cancelled token) never fires listeners
|
|
1871
|
-
// added after the fact — without this the walk would run to completion unabortably.
|
|
1872
|
-
if (cancellation?.aborted) {
|
|
1873
|
-
onAbort();
|
|
1874
|
-
}
|
|
1875
|
-
using _disposable = createDisposable(() => cancellation?.removeEventListener('abort', onAbort));
|
|
1876
|
-
|
|
1877
|
-
const stream = this.git.stream(
|
|
1878
|
-
{
|
|
1879
|
-
cwd: repoPath,
|
|
1880
|
-
cancellation: aborter.signal,
|
|
1881
|
-
configs: ['-C', repoPath, ...gitConfigsLog],
|
|
1882
|
-
stdin: stdin,
|
|
1883
|
-
},
|
|
1884
|
-
...args,
|
|
1885
|
-
skipCursor?.skip ? `--skip=${skipCursor.skip}` : undefined,
|
|
1886
|
-
'--',
|
|
1887
|
-
...files,
|
|
1888
|
-
);
|
|
1889
|
-
using _streamDisposer = createDisposable(() => void stream.return?.(undefined));
|
|
1890
|
-
let hasMore = false;
|
|
1891
|
-
let sha;
|
|
1892
|
-
const stashesOnly = filters.type === 'stash';
|
|
1893
|
-
|
|
1894
|
-
// Progressive results support - time-based batching for consistent UI updates
|
|
1895
|
-
const batch: [string, GitGraphSearchResultData][] = [];
|
|
1896
|
-
let lastProgressTime = Date.now();
|
|
1897
|
-
|
|
1898
|
-
for await (const r of parser.parseAsync(stream)) {
|
|
1899
|
-
// Check for cancellation early in each iteration
|
|
1900
|
-
if (cancellation?.aborted) {
|
|
1901
|
-
// When paused/cancelled, assume there are more results
|
|
1902
|
-
hasMore = true;
|
|
1903
|
-
break;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
count++;
|
|
1907
|
-
if (limit && count > limit) {
|
|
1908
|
-
hasMore = true;
|
|
1909
|
-
|
|
1910
|
-
aborter.abort();
|
|
1911
|
-
break;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
sha = remappedIds.get(r.sha) ?? r.sha;
|
|
1915
|
-
if (
|
|
1916
|
-
results.has(sha) ||
|
|
1917
|
-
(stashesOnly && !stashes?.has(sha)) ||
|
|
1918
|
-
(mergesOnly && stashes?.has(sha)) ||
|
|
1919
|
-
(tipsOnly && !r.tips)
|
|
1920
|
-
) {
|
|
1921
|
-
continue;
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
|
-
const resultData: GitGraphSearchResultData = {
|
|
1925
|
-
i: results.size,
|
|
1926
|
-
date: Number(options?.ordering === 'author-date' ? r.authorDate : r.committerDate) * 1000,
|
|
1927
|
-
files: r.files,
|
|
1928
|
-
};
|
|
1929
|
-
results.set(sha, resultData);
|
|
1930
|
-
batch.push([sha, resultData]);
|
|
1931
|
-
|
|
1932
|
-
// Send progress updates with incremental results
|
|
1933
|
-
const timeSinceLastProgress = Date.now() - lastProgressTime;
|
|
1934
|
-
|
|
1935
|
-
// Send batch when enough time has passed and we have new results
|
|
1936
|
-
const shouldSendBatch =
|
|
1937
|
-
timeSinceLastProgress >= progressiveSearchResultsBatchTimeMs && batch.length > 0;
|
|
1938
|
-
|
|
1939
|
-
if (shouldSendBatch) {
|
|
1940
|
-
// Send only the NEW results since last batch (incremental)
|
|
1941
|
-
yield {
|
|
1942
|
-
repoPath: repoPath,
|
|
1943
|
-
query: search,
|
|
1944
|
-
queryFilters: filters,
|
|
1945
|
-
comparisonKey: comparisonKey,
|
|
1946
|
-
results: new Map(batch),
|
|
1947
|
-
runningTotal: results.size,
|
|
1948
|
-
hasMore: true,
|
|
1949
|
-
};
|
|
1950
|
-
|
|
1951
|
-
batch.length = 0;
|
|
1952
|
-
lastProgressTime = Date.now();
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
// Send final progress update if there are remaining results
|
|
1957
|
-
if (batch.length) {
|
|
1958
|
-
yield {
|
|
1959
|
-
repoPath: repoPath,
|
|
1960
|
-
query: search,
|
|
1961
|
-
queryFilters: filters,
|
|
1962
|
-
comparisonKey: comparisonKey,
|
|
1963
|
-
results: new Map(batch),
|
|
1964
|
-
runningTotal: results.size,
|
|
1965
|
-
hasMore: hasMore,
|
|
1966
|
-
};
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
totalSeen += count;
|
|
1970
|
-
const lastSha = last(results)?.[0];
|
|
1971
|
-
skipCursor = lastSha != null ? { sha: lastSha, skip: totalSeen - iterations } : undefined;
|
|
1972
|
-
|
|
1973
|
-
return {
|
|
1974
|
-
repoPath: repoPath,
|
|
1975
|
-
query: search,
|
|
1976
|
-
queryFilters: filters,
|
|
1977
|
-
comparisonKey: comparisonKey,
|
|
1978
|
-
results: results,
|
|
1979
|
-
hasMore: hasMore,
|
|
1980
|
-
paging:
|
|
1981
|
-
limit || hasMore
|
|
1982
|
-
? {
|
|
1983
|
-
limit: limit || count,
|
|
1984
|
-
cursor:
|
|
1985
|
-
hasMore && skipCursor
|
|
1986
|
-
? {
|
|
1987
|
-
search: search,
|
|
1988
|
-
state: {
|
|
1989
|
-
iterations: iterations,
|
|
1990
|
-
totalSeen: totalSeen,
|
|
1991
|
-
sha: skipCursor.sha,
|
|
1992
|
-
skip: skipCursor.skip,
|
|
1993
|
-
},
|
|
1994
|
-
}
|
|
1995
|
-
: undefined,
|
|
1996
|
-
}
|
|
1997
|
-
: undefined,
|
|
1998
|
-
};
|
|
1999
|
-
} catch (ex) {
|
|
2000
|
-
if (isCancellationError(ex) || cancellation?.aborted) {
|
|
2001
|
-
// When cancelled, preserve cursor so search can be resumed
|
|
2002
|
-
// Update totalSeen with the count from this iteration
|
|
2003
|
-
totalSeen += count;
|
|
2004
|
-
const lastSha = last(results)?.[0];
|
|
2005
|
-
const skipCursor = lastSha != null ? { sha: lastSha, skip: totalSeen - iterations } : undefined;
|
|
2006
|
-
|
|
2007
|
-
return {
|
|
2008
|
-
repoPath: repoPath,
|
|
2009
|
-
query: search,
|
|
2010
|
-
queryFilters: filters,
|
|
2011
|
-
comparisonKey: comparisonKey,
|
|
2012
|
-
results: results,
|
|
2013
|
-
hasMore: true, // Assume there are more results since we were cancelled mid-search
|
|
2014
|
-
paging:
|
|
2015
|
-
limit || skipCursor
|
|
2016
|
-
? {
|
|
2017
|
-
limit: limit || count,
|
|
2018
|
-
cursor: skipCursor
|
|
2019
|
-
? {
|
|
2020
|
-
search: search,
|
|
2021
|
-
state: {
|
|
2022
|
-
iterations: iterations,
|
|
2023
|
-
totalSeen: totalSeen,
|
|
2024
|
-
sha: skipCursor.sha,
|
|
2025
|
-
skip: skipCursor.skip,
|
|
2026
|
-
},
|
|
2027
|
-
}
|
|
2028
|
-
: undefined,
|
|
2029
|
-
}
|
|
2030
|
-
: undefined,
|
|
2031
|
-
};
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
const classified = classifySearchError(ex);
|
|
2035
|
-
throw new GitSearchError(ex, classified?.reason, classified?.detail);
|
|
2036
|
-
}
|
|
2037
|
-
} catch (ex) {
|
|
2038
|
-
if (ex instanceof GitSearchError) throw ex;
|
|
2039
|
-
|
|
2040
|
-
const classified = classifySearchError(ex);
|
|
2041
|
-
throw new GitSearchError(ex, classified?.reason, classified?.detail);
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
* CLI-backed {@link GitGraphSession}: a stateful facade over {@link GraphGitSubProvider.getGraph}. It
|
|
2048
|
-
* owns the canonical accumulated window and builds the R6b incremental seed internally (from the window,
|
|
2049
|
-
* the prior walk's tips/reachability/stats, and the walk shape), so the host no longer mirrors loaded
|
|
2050
|
-
* rows, stamps ref tips, or hand-assembles a seed. Behavior-neutral: `refresh`/`more` reproduce exactly
|
|
2051
|
-
* what the host's `getState` seed construction + `setGraph` mirror maintenance + write-once avatar merge
|
|
2052
|
-
* did.
|
|
2053
|
-
*/
|
|
2054
|
-
class GraphSession implements GitGraphSession {
|
|
2055
|
-
// Assigned by `initialize` before the session is handed out; never read before then.
|
|
2056
|
-
private _current!: GitGraph;
|
|
2057
|
-
private _window: readonly GitGraphRow[] = [];
|
|
2058
|
-
// The walk shape (`ordering|onlyFollowFirstParent`) the current window was produced under — the
|
|
2059
|
-
// incremental seed is only valid when the NEXT walk uses the SAME shape (a graph object doesn't
|
|
2060
|
-
// record its shape, so it's tracked here). Undefined until the first walk lands.
|
|
2061
|
-
private _buildShape: string | undefined;
|
|
2062
|
-
|
|
2063
|
-
constructor(
|
|
2064
|
-
private readonly provider: GraphGitSubProvider,
|
|
2065
|
-
readonly repoPath: string,
|
|
2066
|
-
private readonly rowProcessor: GraphRowProcessor | undefined,
|
|
2067
|
-
private readonly getWalkShape: () => {
|
|
2068
|
-
ordering: 'date' | 'author-date' | 'topo';
|
|
2069
|
-
onlyFollowFirstParent: boolean;
|
|
2070
|
-
},
|
|
2071
|
-
) {}
|
|
2072
|
-
|
|
2073
|
-
get window(): readonly GitGraphRow[] {
|
|
2074
|
-
return this._window;
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
|
-
get current(): GitGraph {
|
|
2078
|
-
return this._current;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
/** First walk — no seed (nothing accumulated yet), equivalent to a plain `getGraph`. */
|
|
2082
|
-
async initialize(
|
|
2083
|
-
options?: { rev?: string; limit?: number; include?: { stats?: boolean } },
|
|
2084
|
-
cancellation?: AbortSignal,
|
|
2085
|
-
): Promise<void> {
|
|
2086
|
-
const shape = this.getWalkShape();
|
|
2087
|
-
const graph = await this.provider.getGraph(
|
|
2088
|
-
this.repoPath,
|
|
2089
|
-
options?.rev,
|
|
2090
|
-
{ include: options?.include, limit: options?.limit, rowProcessor: this.rowProcessor },
|
|
2091
|
-
cancellation,
|
|
2092
|
-
);
|
|
2093
|
-
this.applyRebuild(graph, shape);
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
async refresh(
|
|
2097
|
-
options?: GitGraphSessionRefreshOptions,
|
|
2098
|
-
cancellation?: AbortSignal,
|
|
2099
|
-
): Promise<GitGraphSessionRefreshResult> {
|
|
2100
|
-
const shape = this.getWalkShape();
|
|
2101
|
-
const buildShape = buildShapeKey(shape);
|
|
2102
|
-
const prior = this._current;
|
|
2103
|
-
|
|
2104
|
-
// Incremental head-walk seed: the FULL accumulated window + the prior walk's tips/reachability/stats,
|
|
2105
|
-
// gated on an unchanged walk shape (a first-parent/ordering change reshapes every row's parents/order,
|
|
2106
|
-
// so the cached rows can't be reused). Mirrors the host's former `incrementalSeed` construction and
|
|
2107
|
-
// `_graphBuildShape` gate — the session owns the shape, so it can't be handed a lying seed. The provider
|
|
2108
|
-
// still re-validates ordering/first-parent internally and falls back on any structural change.
|
|
2109
|
-
const incrementalSeed: GraphIncrementalSeed | undefined =
|
|
2110
|
-
options?.rebuild !== true && prior.refTips != null && this._buildShape === buildShape
|
|
2111
|
-
? {
|
|
2112
|
-
rows: this._window,
|
|
2113
|
-
tips: prior.refTips,
|
|
2114
|
-
ordering: shape.ordering,
|
|
2115
|
-
reachability: prior.reachability,
|
|
2116
|
-
rowsStats: prior.rowsStats,
|
|
2117
|
-
hasMore: prior.paging?.hasMore ?? false,
|
|
2118
|
-
onlyFollowFirstParent: shape.onlyFollowFirstParent,
|
|
2119
|
-
shallow: prior.shallow,
|
|
2120
|
-
decorationFingerprint: prior.decorationFingerprint,
|
|
2121
|
-
}
|
|
2122
|
-
: undefined;
|
|
2123
|
-
|
|
2124
|
-
let outcome: IncrementalGraphOutcome | undefined;
|
|
2125
|
-
let graph = await this.provider.getGraph(
|
|
2126
|
-
this.repoPath,
|
|
2127
|
-
options?.rev,
|
|
2128
|
-
{
|
|
2129
|
-
include: options?.include,
|
|
2130
|
-
limit: options?.limit,
|
|
2131
|
-
rowProcessor: this.rowProcessor,
|
|
2132
|
-
// Same-repo rebuild: continue the prior reachability generation (stable indices for retained
|
|
2133
|
-
// rows) and reuse immutable per-sha stats — exactly the host's former same-repo seeds.
|
|
2134
|
-
reachabilitySeed: prior.reachability,
|
|
2135
|
-
rowsStatsSeed: prior.rowsStats,
|
|
2136
|
-
incrementalSeed: incrementalSeed,
|
|
2137
|
-
onIncrementalResult: o => {
|
|
2138
|
-
outcome = o;
|
|
2139
|
-
},
|
|
2140
|
-
},
|
|
2141
|
-
cancellation,
|
|
2142
|
-
);
|
|
2143
|
-
|
|
2144
|
-
// Host-serialization backstop: the host serializes refresh against more() per repo. Should a more() still
|
|
2145
|
-
// land mid-refresh (`_current` swapped out from under this await), the rebuild predates that appended page
|
|
2146
|
-
// — refresh carries newer repo truth so we still apply it, but when the accumulated window outran the
|
|
2147
|
-
// rebuild the dropped page must re-page, not vanish. `paging.hasMore` is readonly, so re-wrap it truthful.
|
|
2148
|
-
if (this._current !== prior && graph.paging != null && this._window.length > graph.rows.length) {
|
|
2149
|
-
graph = { ...graph, paging: { ...graph.paging, hasMore: true } };
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
// Write-once cross-generation avatar merge (formerly in host `setGraph`): carry prior URLs forward
|
|
2153
|
-
// into the fresh graph's map without overwriting its own entries.
|
|
2154
|
-
mergeAvatarsForward(prior.avatars, graph.avatars);
|
|
2155
|
-
this.applyRebuild(graph, shape);
|
|
2156
|
-
|
|
2157
|
-
// The full path (seeded fallback or unseeded full walk) re-derives everything → every channel changed.
|
|
2158
|
-
// The fast path derives each channel honestly from what it actually touched — a false negative is data
|
|
2159
|
-
// loss, so a channel is `false` only when it PROVABLY didn't change (never merely when uncertain).
|
|
2160
|
-
if (outcome?.path === 'fast') {
|
|
2161
|
-
const changed: GitGraphSessionChangedChannels = {
|
|
2162
|
-
// A head-walk always reshapes the window; the publisher's ledger diff derives the precise splice
|
|
2163
|
-
// (including reused-row flag / reachability-index changes the re-derivation makes in place).
|
|
2164
|
-
rows: true,
|
|
2165
|
-
// The builder continues the prior generation (same id); a grown table means new dict/set entries
|
|
2166
|
-
// to append. A per-row index that re-points to an EXISTING set rides the rows channel, not this.
|
|
2167
|
-
reachability: reachabilityTableChanged(prior.reachability, graph.reachability),
|
|
2168
|
-
// Only NEW commit shas need stats (reused rows carry seeded, already-shipped stats), and only when
|
|
2169
|
-
// stats were requested at all. The host's deferred-completion hook re-marks this channel when the
|
|
2170
|
-
// background query lands, so this is just the synchronous signal.
|
|
2171
|
-
rowsStats: graph.includes?.stats === true && (outcome.added ?? 0) > 0,
|
|
2172
|
-
// Avatars are write-once merged across generations, so the map only grows — a larger size means
|
|
2173
|
-
// new emails. Value replacements (avatar proxy) ride the host's dedicated avatar path, not this.
|
|
2174
|
-
avatars: graph.avatars.size !== prior.avatars.size,
|
|
2175
|
-
// The fast path rebuilds the downstreams map from all rows; compare it against the prior.
|
|
2176
|
-
downstreams: downstreamsChanged(prior.downstreams, graph.downstreams),
|
|
2177
|
-
};
|
|
2178
|
-
return { path: 'fast', added: outcome.added, changed: changed };
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
const changed: GitGraphSessionChangedChannels = {
|
|
2182
|
-
rows: true,
|
|
2183
|
-
reachability: true,
|
|
2184
|
-
rowsStats: true,
|
|
2185
|
-
// Ties to the rowsStatsSeed drop above: these fallbacks recompute stats for shas already shipped
|
|
2186
|
-
// (`error` included — it drops the seed too, so its recompute must be re-shipped, not dedup-skipped).
|
|
2187
|
-
rowsStatsRecomputed:
|
|
2188
|
-
outcome?.path === 'fallback' &&
|
|
2189
|
-
(outcome.reason === 'shallow-changed' ||
|
|
2190
|
-
outcome.reason === 'replace-refs-changed' ||
|
|
2191
|
-
outcome.reason === 'error'),
|
|
2192
|
-
avatars: true,
|
|
2193
|
-
downstreams: true,
|
|
2194
|
-
};
|
|
2195
|
-
// A seeded fallback carries its reason; an unseeded full walk (no `onIncrementalResult` fired) carries none.
|
|
2196
|
-
if (outcome?.path === 'fallback') return { path: 'full', reason: outcome.reason, changed: changed };
|
|
2197
|
-
return { path: 'full', changed: changed };
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
async more(limit?: number, targetId?: string, cancellation?: AbortSignal): Promise<boolean> {
|
|
2201
|
-
const prior = this._current;
|
|
2202
|
-
const updated = await prior.more?.(limit ?? 0, targetId, cancellation);
|
|
2203
|
-
// A refresh swapped `current` out from under the page walk (stale generation) — benign; drop it and
|
|
2204
|
-
// the host re-requests on the next scroll.
|
|
2205
|
-
if (this._current !== prior) return false;
|
|
2206
|
-
// A live page walk yielding nothing is unexpected (hasMore said otherwise).
|
|
2207
|
-
if (updated == null) {
|
|
2208
|
-
debugger;
|
|
2209
|
-
return false;
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
mergeAvatarsForward(prior.avatars, updated.avatars);
|
|
2213
|
-
this.applyPage(updated);
|
|
2214
|
-
return true;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
dispose(): void {
|
|
2218
|
-
// No-op — the window lives entirely in memory and dies with the session.
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
/** A cursor-less rebuild (full walk / fast path) IS the full window. */
|
|
2222
|
-
private applyRebuild(graph: GitGraph, shape: { ordering: string; onlyFollowFirstParent: boolean }): void {
|
|
2223
|
-
this._current = graph;
|
|
2224
|
-
this._window = graph.rows;
|
|
2225
|
-
this._buildShape = buildShapeKey(shape);
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
/** A page-append: keep the window up to the cursor and append the page (the reducer's cursor-anchored
|
|
2229
|
-
* concatenation); the walk shape is unchanged (same generation). */
|
|
2230
|
-
private applyPage(page: GitGraph): void {
|
|
2231
|
-
this._current = page;
|
|
2232
|
-
const startingCursor = page.paging?.startingCursor;
|
|
2233
|
-
// A page always carries a cursor; a cursor-less page (shouldn't happen) is treated as a full window,
|
|
2234
|
-
// matching the host mirror's former fallback.
|
|
2235
|
-
this._window = startingCursor == null ? page.rows : appendRowsAtCursor(this._window, startingCursor, page.rows);
|
|
2236
|
-
}
|
|
2237
|
-
}
|