@gitkraken/core-gitlens 0.5.116 → 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 +32 -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 +174 -140
- package/dist/git/models/issue.js +86 -84
- 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 -230
- 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 +49 -38
- package/dist/git/remotes/azure-devops.js +254 -224
- 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 -149
- 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 -54
- package/dist/plus/integrations/providers/azure/azure.js +453 -515
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +258 -229
- package/dist/plus/integrations/providers/azure/models.js +241 -203
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +132 -130
- package/dist/plus/integrations/providers/azureDevOps.js +775 -921
- 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 +818 -856
- 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 -229
- 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 +101 -24
- package/docs/kepler-read-api-parity.md +15 -12
- 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 -258
- 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 -353
- 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 -307
- 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 -177
- 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 -822
- package/src/plus/integrations/providers/azure/models.ts +0 -621
- package/src/plus/integrations/providers/azureDevOps.ts +0 -1346
- 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 -1816
- 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 -272
- 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
package/dist/git/cache.js
CHANGED
|
@@ -1,1288 +1,960 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { exhaustiveArray } from "../utils/array.js";
|
|
2
|
+
import { raceWithSignal } from "../utils/cancellation.js";
|
|
3
|
+
import { debug } from "../utils/decorators/log.js";
|
|
4
|
+
import { invalidateMemoized } from "../utils/decorators/memoize.js";
|
|
5
|
+
import { getBranchId } from "../utils/gitRefs.js";
|
|
6
|
+
import { normalizePath } from "../utils/path.js";
|
|
7
|
+
import { PromiseCache, PromiseMap, RepoPromiseCacheMap } from "../utils/promiseCache.js";
|
|
8
|
+
import { createReference } from "./utils/reference.utils.js";
|
|
9
|
+
import { getCommonRepositoryPath, getRepositoryOrWorktreePath } from "./utils/repository.utils.js";
|
|
10
|
+
import __decorate from "../_virtual/@oxc-project+runtime/helpers/esm/decorate.js";
|
|
11
|
+
//#region ../git/src/cache.ts
|
|
12
|
+
const uriScopedCachedGitTypes = [
|
|
13
|
+
"blame",
|
|
14
|
+
"diff",
|
|
15
|
+
"fileLog"
|
|
16
|
+
];
|
|
17
|
+
function areUriScopedCachedGitTypes(types) {
|
|
18
|
+
return types.every((t) => uriScopedCachedGitTypes.includes(t));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const baseBranchNameTTL =
|
|
21
|
+
* Ceiling on how long a derived branch base is trusted. Long enough that repeated reads during normal use
|
|
22
|
+
* are served from cache, short enough that a base that changed by a route with no eviction signal (an
|
|
23
|
+
* external delete-and-recreate of a branch that is never checked out) self-heals without a reload.
|
|
24
|
+
*/
|
|
25
|
+
const baseBranchNameTTL = 3e5;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const maxCachedBlameLines =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
catch {
|
|
39
|
-
// The provider factory resolves as soon as streaming starts, so a later stream failure must also be retried.
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
27
|
+
* Completed blame graphs retain several objects and substrings per line. Keep normal files hot, but let large
|
|
28
|
+
* documents be owned by their active tracked-document snapshot instead of retaining a second long-lived owner.
|
|
29
|
+
*/
|
|
30
|
+
const maxCachedBlameLines = 5e3;
|
|
31
|
+
async function shouldEvictBlameCacheEntry(progressive) {
|
|
32
|
+
if (progressive == null) return false;
|
|
33
|
+
try {
|
|
34
|
+
return (await progressive.completed).lines.length > maxCachedBlameLines;
|
|
35
|
+
} catch {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
42
38
|
}
|
|
43
39
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
* gkConfig keys that participate in the `branchOverviews` cache's mergeTarget/mergeBase lineage.
|
|
41
|
+
* Capture group 1 is the ref name (which may itself contain `.`/`/`).
|
|
42
|
+
*/
|
|
47
43
|
const branchOverviewGkConfigKeysRegex = /^branch\.(.+)\.(?:gk-merge-(?:base|target(?:-user)?)|gk-target-base)$/;
|
|
48
44
|
/** Compile-time enforced: adding a key to SharedCaches without listing it here is a type error */
|
|
49
45
|
const sharedCacheKeys = new Set(exhaustiveArray()([
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
46
|
+
"baseBranchName",
|
|
47
|
+
"branchMergedStatus",
|
|
48
|
+
"branchMetadataMap",
|
|
49
|
+
"branchOverviews",
|
|
50
|
+
"branches",
|
|
51
|
+
"configKeys",
|
|
52
|
+
"configPatterns",
|
|
53
|
+
"contributors",
|
|
54
|
+
"contributorsLite",
|
|
55
|
+
"contributorsStats",
|
|
56
|
+
"defaultBranchName",
|
|
57
|
+
"gitResults",
|
|
58
|
+
"gkConfigMap",
|
|
59
|
+
"initialCommitSha",
|
|
60
|
+
"lastFetched",
|
|
61
|
+
"logShas",
|
|
62
|
+
"refs",
|
|
63
|
+
"refTips",
|
|
64
|
+
"remotes",
|
|
65
|
+
"sharedBranches",
|
|
66
|
+
"stashes",
|
|
67
|
+
"tags",
|
|
68
|
+
"worktrees"
|
|
73
69
|
]));
|
|
74
70
|
function createEmptyCaches() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
export class Cache {
|
|
122
|
-
_caches = createEmptyCaches();
|
|
123
|
-
_commonPathRegistry = new Map();
|
|
124
|
-
/** Reverse index: commonPath → set of worktree repoPaths that share it */
|
|
125
|
-
_worktreesByCommonPath = new Map();
|
|
126
|
-
/** Monotonic per-worktree "status clock" — see {@link getStatusGeneration}. */
|
|
127
|
-
_statusGenerations = new Map();
|
|
128
|
-
/** Monotonic per-path "close clock" — see {@link getCloseGeneration}. */
|
|
129
|
-
_closeGenerations = new Map();
|
|
130
|
-
/**
|
|
131
|
-
* Per-commonPath snapshot of the merge-relevant subset of `.git/gk/config` (keys matching
|
|
132
|
-
* {@link branchOverviewGkConfigKeysRegex}), used by {@link reconcileGkConfigMap} to diff a watcher
|
|
133
|
-
* `'gkConfig'` event down to only the keys that actually changed, instead of coarsely re-deriving
|
|
134
|
-
* `baseBranchName`/`branchOverviews` on every gk write. Absent means "never observed".
|
|
135
|
-
*/
|
|
136
|
-
_gkConfigMergeSnapshots = new Map();
|
|
137
|
-
/**
|
|
138
|
-
* Reconciler registered by the CLI config sub-provider (see {@link setGkConfigReconciler}),
|
|
139
|
-
* invoked on a watcher-observed `'gkConfig'` change instead of the coarse `clearCaches(repoPath,
|
|
140
|
-
* 'gkConfig')` cascade. `undefined` (e.g. the GitHub provider, which has no `.git/gk/config`)
|
|
141
|
-
* falls back to the coarse clear.
|
|
142
|
-
*/
|
|
143
|
-
_gkConfigReconciler;
|
|
144
|
-
[Symbol.dispose]() {
|
|
145
|
-
this.dispose();
|
|
146
|
-
}
|
|
147
|
-
dispose() {
|
|
148
|
-
this.reset();
|
|
149
|
-
}
|
|
150
|
-
/** Resource usage retained by instantiated sub-caches and their bookkeeping maps. */
|
|
151
|
-
getResourceUsage() {
|
|
152
|
-
const usage = {};
|
|
153
|
-
for (const [name, cache] of Object.entries(this._caches)) {
|
|
154
|
-
if (cache != null) {
|
|
155
|
-
usage[`cache.${name}.entries.count`] =
|
|
156
|
-
cache instanceof RepoPromiseCacheMap ? cache.entryCount : cache.size;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
usage['cache.commonPathRegistry.entries.count'] = this._commonPathRegistry.size;
|
|
160
|
-
usage['cache.worktreesByCommonPath.entries.count'] = this._worktreesByCommonPath.size;
|
|
161
|
-
usage['cache.statusGenerations.entries.count'] = this._statusGenerations.size;
|
|
162
|
-
usage['cache.closeGenerations.entries.count'] = this._closeGenerations.size;
|
|
163
|
-
usage['cache.gkConfigMergeSnapshots.entries.count'] = this._gkConfigMergeSnapshots.size;
|
|
164
|
-
return usage;
|
|
165
|
-
}
|
|
166
|
-
get bestRemotes() {
|
|
167
|
-
return (this._caches.bestRemotes ??= new PromiseMap());
|
|
168
|
-
}
|
|
169
|
-
get blame() {
|
|
170
|
-
return (this._caches.blame ??= new RepoPromiseCacheMap({
|
|
171
|
-
createTTL: 1000 * 60 * 10, // 10 minutes
|
|
172
|
-
capacity: 50,
|
|
173
|
-
}));
|
|
174
|
-
}
|
|
175
|
-
get diff() {
|
|
176
|
-
return (this._caches.diff ??= new RepoPromiseCacheMap({
|
|
177
|
-
createTTL: 1000 * 60 * 10, // 10 minutes
|
|
178
|
-
capacity: 50,
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
get fileLog() {
|
|
182
|
-
return (this._caches.fileLog ??= new RepoPromiseCacheMap({
|
|
183
|
-
createTTL: 1000 * 60 * 10, // 10 minutes
|
|
184
|
-
capacity: 50,
|
|
185
|
-
}));
|
|
186
|
-
}
|
|
187
|
-
get baseBranchName() {
|
|
188
|
-
return (this._caches.baseBranchName ??= new RepoPromiseCacheMap());
|
|
189
|
-
}
|
|
190
|
-
get branch() {
|
|
191
|
-
return (this._caches.branch ??= new PromiseMap());
|
|
192
|
-
}
|
|
193
|
-
get branchMergedStatus() {
|
|
194
|
-
return (this._caches.branchMergedStatus ??= new RepoPromiseCacheMap({
|
|
195
|
-
createTTL: 1000 * 60 * 30, // 30 minutes — content-keyed on tip shas, so this is just a backstop
|
|
196
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
197
|
-
capacity: 100, // Limit to 100 branch-pairs per repo
|
|
198
|
-
}));
|
|
199
|
-
}
|
|
200
|
-
get branchMetadataMap() {
|
|
201
|
-
return (this._caches.branchMetadataMap ??= new PromiseMap());
|
|
202
|
-
}
|
|
203
|
-
get branchOverviews() {
|
|
204
|
-
return (this._caches.branchOverviews ??= new RepoPromiseCacheMap({ accessTTL: 1000 * 60 * 60 }));
|
|
205
|
-
}
|
|
206
|
-
get branches() {
|
|
207
|
-
return (this._caches.branches ??= new PromiseMap());
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Internal cache for raw shared branch data (keyed by commonPath)
|
|
211
|
-
* Separate from branches cache because branches need to be mapped for each worktree
|
|
212
|
-
*/
|
|
213
|
-
get sharedBranches() {
|
|
214
|
-
return (this._caches.sharedBranches ??= new PromiseMap());
|
|
215
|
-
}
|
|
216
|
-
get configKeys() {
|
|
217
|
-
return (this._caches.configKeys ??= new RepoPromiseCacheMap({
|
|
218
|
-
createTTL: 1000 * 30, // 30 seconds - ensures global config changes are picked up
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
get configPatterns() {
|
|
222
|
-
return (this._caches.configPatterns ??= new RepoPromiseCacheMap({
|
|
223
|
-
createTTL: 1000 * 30, // 30 seconds - ensures global config changes are picked up
|
|
224
|
-
}));
|
|
225
|
-
}
|
|
226
|
-
get gkConfigMap() {
|
|
227
|
-
return (this._caches.gkConfigMap ??= new PromiseMap());
|
|
228
|
-
}
|
|
229
|
-
get currentBranchReference() {
|
|
230
|
-
return (this._caches.currentBranchReference ??= new PromiseCache());
|
|
231
|
-
}
|
|
232
|
-
setCurrentBranchReferenceIfAbsent(worktreePath, reference) {
|
|
233
|
-
if (this.currentBranchReference.get(worktreePath) == null) {
|
|
234
|
-
this.currentBranchReference.set(worktreePath, Promise.resolve(reference));
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
get conflictDetection() {
|
|
238
|
-
return (this._caches.conflictDetection ??= new RepoPromiseCacheMap({
|
|
239
|
-
createTTL: 1000 * 30, // 30 seconds
|
|
240
|
-
}));
|
|
241
|
-
}
|
|
242
|
-
get contributors() {
|
|
243
|
-
return (this._caches.contributors ??= new RepoPromiseCacheMap({
|
|
244
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
245
|
-
}));
|
|
246
|
-
}
|
|
247
|
-
get contributorsLite() {
|
|
248
|
-
return (this._caches.contributorsLite ??= new RepoPromiseCacheMap({
|
|
249
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
250
|
-
}));
|
|
251
|
-
}
|
|
252
|
-
get contributorsStats() {
|
|
253
|
-
return (this._caches.contributorsStats ??= new RepoPromiseCacheMap({
|
|
254
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
255
|
-
}));
|
|
256
|
-
}
|
|
257
|
-
get currentUser() {
|
|
258
|
-
return (this._caches.currentUser ??= new Map());
|
|
259
|
-
}
|
|
260
|
-
get defaultBranchName() {
|
|
261
|
-
return (this._caches.defaultBranchName ??= new RepoPromiseCacheMap());
|
|
262
|
-
}
|
|
263
|
-
get gitDir() {
|
|
264
|
-
return (this._caches.gitDir ??= new Map());
|
|
265
|
-
}
|
|
266
|
-
get gitIgnore() {
|
|
267
|
-
return (this._caches.gitIgnore ??= new Map());
|
|
268
|
-
}
|
|
269
|
-
get gitResults() {
|
|
270
|
-
return (this._caches.gitResults ??= new RepoPromiseCacheMap({ capacity: 200 }));
|
|
271
|
-
}
|
|
272
|
-
get initialCommitSha() {
|
|
273
|
-
return (this._caches.initialCommitSha ??= new PromiseMap());
|
|
274
|
-
}
|
|
275
|
-
get lastFetched() {
|
|
276
|
-
return (this._caches.lastFetched ??= new PromiseCache({
|
|
277
|
-
createTTL: 1000 * 30, // 30 seconds
|
|
278
|
-
}));
|
|
279
|
-
}
|
|
280
|
-
get leftRightCommitCount() {
|
|
281
|
-
return (this._caches.leftRightCommitCount ??= new RepoPromiseCacheMap({
|
|
282
|
-
createTTL: 1000 * 60 * 5, // 5 minutes max age — invalidated sooner on branch/remote changes
|
|
283
|
-
capacity: 50, // Limit to 50 ref-pairs per repo
|
|
284
|
-
}));
|
|
285
|
-
}
|
|
286
|
-
get commit() {
|
|
287
|
-
return (this._caches.commit ??= new RepoPromiseCacheMap({
|
|
288
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
289
|
-
capacity: 100, // Limit to 100 commits per repo
|
|
290
|
-
}));
|
|
291
|
-
}
|
|
292
|
-
get commitCount() {
|
|
293
|
-
return (this._caches.commitCount ??= new RepoPromiseCacheMap({
|
|
294
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
295
|
-
capacity: 50,
|
|
296
|
-
}));
|
|
297
|
-
}
|
|
298
|
-
get mergeBase() {
|
|
299
|
-
return (this._caches.mergeBase ??= new RepoPromiseCacheMap({
|
|
300
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
301
|
-
capacity: 50,
|
|
302
|
-
}));
|
|
303
|
-
}
|
|
304
|
-
get logShas() {
|
|
305
|
-
return (this._caches.logShas ??= new RepoPromiseCacheMap({
|
|
306
|
-
createTTL: 1000 * 60 * 5, // 5 minutes max age
|
|
307
|
-
accessTTL: 1000 * 30, // 30 seconds if not accessed
|
|
308
|
-
capacity: 5, // Limit to 5 different ranges per repo
|
|
309
|
-
}));
|
|
310
|
-
}
|
|
311
|
-
get pausedOperationStatus() {
|
|
312
|
-
return (this._caches.pausedOperationStatus ??= new PromiseMap());
|
|
313
|
-
}
|
|
314
|
-
get resolvedRevisions() {
|
|
315
|
-
return (this._caches.resolvedRevisions ??= new RepoPromiseCacheMap({
|
|
316
|
-
capacity: 100,
|
|
317
|
-
}));
|
|
318
|
-
}
|
|
319
|
-
get refs() {
|
|
320
|
-
return (this._caches.refs ??= new PromiseMap());
|
|
321
|
-
}
|
|
322
|
-
get refTips() {
|
|
323
|
-
return (this._caches.refTips ??= new PromiseMap());
|
|
324
|
-
}
|
|
325
|
-
get reachability() {
|
|
326
|
-
return (this._caches.reachability ??= new RepoPromiseCacheMap({
|
|
327
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
328
|
-
capacity: 25, // Limit to 25 commits per repo
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
get remotes() {
|
|
332
|
-
return (this._caches.remotes ??= new PromiseMap());
|
|
333
|
-
}
|
|
334
|
-
get stashes() {
|
|
335
|
-
return (this._caches.stashes ??= new RepoPromiseCacheMap({
|
|
336
|
-
accessTTL: 1000 * 60 * 60, // 60 minutes
|
|
337
|
-
}));
|
|
338
|
-
}
|
|
339
|
-
get tags() {
|
|
340
|
-
return (this._caches.tags ??= new PromiseMap());
|
|
341
|
-
}
|
|
342
|
-
get fileExistence() {
|
|
343
|
-
return (this._caches.fileExistence ??= new RepoPromiseCacheMap({
|
|
344
|
-
createTTL: 1000 * 10, // 10 seconds
|
|
345
|
-
capacity: 100,
|
|
346
|
-
expireOnError: true,
|
|
347
|
-
}));
|
|
348
|
-
}
|
|
349
|
-
// Key: repoPath (not the ignoreRevsFile path) so that per-repo cache resets (clearCaches with repoPath)
|
|
350
|
-
// correctly evict the entry. The actual file path is used inside the factory closure in blame.ts.
|
|
351
|
-
get ignoreRevsFile() {
|
|
352
|
-
return (this._caches.ignoreRevsFile ??= new PromiseCache({
|
|
353
|
-
accessTTL: 1000 * 60 * 60 * 2, // 2 hours
|
|
354
|
-
expireOnError: true,
|
|
355
|
-
}));
|
|
356
|
-
}
|
|
357
|
-
get trackedPaths() {
|
|
358
|
-
return (this._caches.trackedPaths ??= new RepoPromiseCacheMap({
|
|
359
|
-
createTTL: 1000 * 60, // 60 seconds
|
|
360
|
-
accessTTL: 1000 * 30, // 30 seconds idle
|
|
361
|
-
capacity: 200,
|
|
362
|
-
}));
|
|
363
|
-
}
|
|
364
|
-
get worktrees() {
|
|
365
|
-
return (this._caches.worktrees ??= new PromiseMap());
|
|
366
|
-
}
|
|
367
|
-
clearCaches(repoPath, ...types) {
|
|
368
|
-
const keysToClear = new Set();
|
|
369
|
-
if (!types.length) {
|
|
370
|
-
// Clear all caches
|
|
371
|
-
for (const key of Object.keys(this._caches)) {
|
|
372
|
-
keysToClear.add(key);
|
|
373
|
-
}
|
|
374
|
-
invalidateMemoized('providers');
|
|
375
|
-
this.incrementStatusGenerations(repoPath);
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
// Clear specific cache types
|
|
379
|
-
if (types.includes('blame')) {
|
|
380
|
-
keysToClear.add('blame');
|
|
381
|
-
}
|
|
382
|
-
if (types.includes('diff')) {
|
|
383
|
-
keysToClear.add('diff');
|
|
384
|
-
}
|
|
385
|
-
if (types.includes('fileLog')) {
|
|
386
|
-
keysToClear.add('fileLog');
|
|
387
|
-
}
|
|
388
|
-
// Branch caches affected by HEAD/heads changes. `branchMergedStatus` is deliberately NOT
|
|
389
|
-
// cleared here — it's content-keyed on the involved tip shas, so tip movement already
|
|
390
|
-
// self-invalidates (a new key); evicting it here would only discard still-valid answers.
|
|
391
|
-
if (types.includes('branch') || types.includes('branches')) {
|
|
392
|
-
keysToClear.add('branch');
|
|
393
|
-
keysToClear.add('branchOverviews');
|
|
394
|
-
// `commit`/`commitCount` are keyed by symbolic ref or SHA — symbolic-ref entries
|
|
395
|
-
// can drift when branches move; cascade-clear conservatively.
|
|
396
|
-
keysToClear.add('commit');
|
|
397
|
-
keysToClear.add('commitCount');
|
|
398
|
-
keysToClear.add('conflictDetection');
|
|
399
|
-
keysToClear.add('currentBranchReference');
|
|
400
|
-
keysToClear.add('leftRightCommitCount');
|
|
401
|
-
// `mergeBase` keyed by ref-pairs — symbolic refs can move; cascade-clear.
|
|
402
|
-
keysToClear.add('mergeBase');
|
|
403
|
-
keysToClear.add('reachability');
|
|
404
|
-
keysToClear.add('resolvedRevisions');
|
|
405
|
-
}
|
|
406
|
-
// Shared branch caches (branch list, metadata). `baseBranchName` is deliberately NOT cleared
|
|
407
|
-
// here — a branch's base is set at creation and only changes when its stored key changes
|
|
408
|
-
// (`gkConfig`/`config` below) or the branch itself is created/renamed/deleted. Every op that
|
|
409
|
-
// does one of those calls `deleteBaseBranchName` and moves or drops the branch's persisted
|
|
410
|
-
// `branch.<ref>.gk-*` keys: `createBranch`/`deleteLocalBranch`/`renameBranch`, plus the two
|
|
411
|
-
// paths that create a branch as a side effect (`checkout -b`, `worktree add -b`). Tip movement
|
|
412
|
-
// can't change a base, so clearing on every commit only forced a `git reflog` re-derivation.
|
|
413
|
-
if (types.includes('branch')) {
|
|
414
|
-
// `'branch'` comes from a HEAD change — a checkout — which appends `checkout: moving from X
|
|
415
|
-
// to Y` to the reflog, exactly the entry `getBaseBranchName` greps for when nothing is
|
|
416
|
-
// stored. A base derived as "none" BEFORE that entry existed is cached with no TTL, so
|
|
417
|
-
// without this it stays "none" for the session even though the answer now exists.
|
|
418
|
-
//
|
|
419
|
-
// Deliberately not under `'branches'`: a tip move can't change a branch's base, so re-deriving
|
|
420
|
-
// on every commit would be pure cost. Checkouts are user-driven and rare by comparison.
|
|
421
|
-
keysToClear.add('baseBranchName');
|
|
422
|
-
}
|
|
423
|
-
if (types.includes('branches')) {
|
|
424
|
-
keysToClear.add('branchMetadataMap');
|
|
425
|
-
keysToClear.add('branches');
|
|
426
|
-
keysToClear.add('sharedBranches');
|
|
427
|
-
keysToClear.add('defaultBranchName');
|
|
428
|
-
keysToClear.add('initialCommitSha');
|
|
429
|
-
keysToClear.add('logShas');
|
|
430
|
-
keysToClear.add('refs');
|
|
431
|
-
keysToClear.add('refTips');
|
|
432
|
-
}
|
|
433
|
-
if (types.includes('config')) {
|
|
434
|
-
// `getBaseBranchName` falls back to `branch.<ref>.vscode-merge-base` (written by VS Code's
|
|
435
|
-
// built-in Git), which lives in `.git/config` — so a config change is the only signal that
|
|
436
|
-
// source changed. Cheap: config events are rare.
|
|
437
|
-
keysToClear.add('baseBranchName');
|
|
438
|
-
keysToClear.add('configKeys');
|
|
439
|
-
keysToClear.add('configPatterns');
|
|
440
|
-
keysToClear.add('currentBranchReference');
|
|
441
|
-
keysToClear.add('currentUser');
|
|
442
|
-
// `gitDir` is immutable repo topology (toplevel/git-dir/common-dir/superproject) — a
|
|
443
|
-
// `.git/config` content change never relocates it, and it's owned by the repo lifecycle
|
|
444
|
-
// (registerRepoPath/unregisterRepoPath). Clearing it here forced a redundant `git rev-parse`
|
|
445
|
-
// re-spawn (gitDir is read by getGkConfigPath→getGitDir on every gk op), so leave it warm.
|
|
446
|
-
}
|
|
447
|
-
if (types.includes('contributors')) {
|
|
448
|
-
keysToClear.add('branchOverviews');
|
|
449
|
-
keysToClear.add('contributors');
|
|
450
|
-
keysToClear.add('contributorsLite');
|
|
451
|
-
keysToClear.add('contributorsStats');
|
|
452
|
-
}
|
|
453
|
-
if (types.includes('gitignore')) {
|
|
454
|
-
keysToClear.add('gitIgnore');
|
|
455
|
-
}
|
|
456
|
-
if (types.includes('gkConfig')) {
|
|
457
|
-
keysToClear.add('gkConfigMap');
|
|
458
|
-
// Derived from `branch.<ref>.gk-merge-base`/`vscode-merge-base`; clear so external
|
|
459
|
-
// gkConfig mutations don't leave stale base-branch resolutions cached.
|
|
460
|
-
keysToClear.add('baseBranchName');
|
|
461
|
-
// Cached overviews are keyed by `${ref}|${mergeTarget}`; bulk gkConfig changes can
|
|
462
|
-
// affect any of the merge-target sources (stored, base, default), so clear all.
|
|
463
|
-
keysToClear.add('branchOverviews');
|
|
464
|
-
}
|
|
465
|
-
if (types.includes('lastFetched')) {
|
|
466
|
-
keysToClear.add('lastFetched');
|
|
467
|
-
}
|
|
468
|
-
if (types.includes('providers')) {
|
|
469
|
-
keysToClear.add('remotes');
|
|
470
|
-
keysToClear.add('bestRemotes');
|
|
471
|
-
invalidateMemoized('providers');
|
|
472
|
-
}
|
|
473
|
-
if (types.includes('remotes')) {
|
|
474
|
-
keysToClear.add('remotes');
|
|
475
|
-
keysToClear.add('bestRemotes');
|
|
476
|
-
keysToClear.add('defaultBranchName');
|
|
477
|
-
}
|
|
478
|
-
if (types.includes('stashes')) {
|
|
479
|
-
keysToClear.add('stashes');
|
|
480
|
-
}
|
|
481
|
-
if (types.includes('status')) {
|
|
482
|
-
keysToClear.add('pausedOperationStatus');
|
|
483
|
-
// A caller asserting "status changed" (the post-op hooks in `operations.ts`, a user-initiated
|
|
484
|
-
// refresh) has to advance the clock too — otherwise a `git status` still in flight from before
|
|
485
|
-
// the operation can satisfy the read that follows it.
|
|
486
|
-
this.incrementStatusGenerations(repoPath);
|
|
487
|
-
}
|
|
488
|
-
if (types.includes('tags')) {
|
|
489
|
-
keysToClear.add('tags');
|
|
490
|
-
keysToClear.add('refs');
|
|
491
|
-
keysToClear.add('refTips');
|
|
492
|
-
// `commit`/`commitCount` can be keyed by a tag name (e.g. the tag node's load-more count),
|
|
493
|
-
// which re-points on a force-moved or deleted-and-recreated tag — same drift the
|
|
494
|
-
// `branch`/`branches` cascade above clears for.
|
|
495
|
-
keysToClear.add('commit');
|
|
496
|
-
keysToClear.add('commitCount');
|
|
497
|
-
}
|
|
498
|
-
if (types.includes('tracking')) {
|
|
499
|
-
keysToClear.add('fileExistence');
|
|
500
|
-
keysToClear.add('trackedPaths');
|
|
501
|
-
}
|
|
502
|
-
if (types.includes('worktrees')) {
|
|
503
|
-
keysToClear.add('worktrees');
|
|
504
|
-
}
|
|
505
|
-
// Git results: cleared for any meaningful type change
|
|
506
|
-
if (types.some(t => t !== 'gitignore' && t !== 'gkConfig' && t !== 'providers')) {
|
|
507
|
-
keysToClear.add('gitResults');
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
for (const key of keysToClear) {
|
|
511
|
-
const cache = this._caches[key];
|
|
512
|
-
if (cache == null)
|
|
513
|
-
continue;
|
|
514
|
-
if (repoPath == null) {
|
|
515
|
-
cache.clear();
|
|
516
|
-
}
|
|
517
|
-
else if (sharedCacheKeys.has(key)) {
|
|
518
|
-
this.evictShared(key, repoPath);
|
|
519
|
-
}
|
|
520
|
-
else {
|
|
521
|
-
cache.delete(repoPath);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Evicts a single shared (commonPath-keyed) cache entry for `repoPath` and its sibling worktrees.
|
|
527
|
-
* Prefers `invalidate` where supported so in-flight work is shared across new callers and
|
|
528
|
-
* self-evicts on settle rather than spawning a duplicate factory. `invalidate` does the right
|
|
529
|
-
* thing per-entry: entries with a `CacheController` (created via `getOrCreate`) are marked
|
|
530
|
-
* invalidated; entries without one (created via plain `.set()`, e.g. per-worktree mapper results)
|
|
531
|
-
* are hard-deleted. Caches that don't support `invalidate` fall back to `delete`.
|
|
532
|
-
*/
|
|
533
|
-
evictShared(key, repoPath) {
|
|
534
|
-
const cache = this._caches[key];
|
|
535
|
-
if (cache == null)
|
|
536
|
-
return;
|
|
537
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
538
|
-
const invalidate = cache.invalidate;
|
|
539
|
-
if (typeof invalidate === 'function') {
|
|
540
|
-
invalidate.call(cache, commonPath);
|
|
541
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
542
|
-
if (worktreePath === commonPath)
|
|
543
|
-
continue;
|
|
544
|
-
invalidate.call(cache, worktreePath);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
cache.delete(commonPath);
|
|
549
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
550
|
-
if (worktreePath === commonPath)
|
|
551
|
-
continue;
|
|
552
|
-
cache.delete(worktreePath);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* Monotonic per-worktree counter, advanced whenever anything that can change `git status` output is
|
|
558
|
-
* observed. `git status` and its siblings are point-in-time reads of mutable state, so deduplicating them
|
|
559
|
-
* on repoPath alone is unsound — a run that started before a commit would satisfy a caller that arrived
|
|
560
|
-
* after it. Callers stamp their in-flight run with the generation it started in and refuse older joins.
|
|
561
|
-
* Kept per exact worktree path (never spread to the common path) and advanced on `unregisterRepoPath` so a
|
|
562
|
-
* read in flight from a prior registration can't be joined after a reopen.
|
|
563
|
-
*
|
|
564
|
-
* Note: a run that never settles wedges only its own generation's callers (a newer generation gets a fresh
|
|
565
|
-
* key). `git.run` recovers via its per-command timeout (default 60s); a hung `git.stream` is caught by the
|
|
566
|
-
* status provider's `raceWithTimeout` backstop (scaled to `advanced.git.timeout`; see
|
|
567
|
-
* `dedupeByStatusGeneration`), which rejects a wedged read so waiters unblock and a later caller retries.
|
|
568
|
-
*/
|
|
569
|
-
getStatusGeneration(repoPath) {
|
|
570
|
-
return this._statusGenerations.get(repoPath) ?? 0;
|
|
571
|
-
}
|
|
572
|
-
/** Advances the status clock — see {@link getStatusGeneration}. */
|
|
573
|
-
incrementStatusGeneration(repoPath) {
|
|
574
|
-
this._statusGenerations.set(repoPath, this.getStatusGeneration(repoPath) + 1);
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* Working-tree changes ride their own channel (`Repository.onDidChangeWorkingTree`), not
|
|
578
|
-
* `onRepositoryChanged` — an external `git restore <file>` may touch no `.git` path we classify — so
|
|
579
|
-
* they have to advance the status clock separately or a discard would never invalidate an in-flight read.
|
|
580
|
-
*/
|
|
581
|
-
onWorkingTreeChanged(repoPath) {
|
|
582
|
-
this.incrementStatusGeneration(repoPath);
|
|
583
|
-
}
|
|
584
|
-
/** Advances the status clock for one worktree, or for every known worktree when `repoPath` is undefined. */
|
|
585
|
-
incrementStatusGenerations(repoPath) {
|
|
586
|
-
if (repoPath != null) {
|
|
587
|
-
this.incrementStatusGeneration(repoPath);
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
// Union of registered repos and any path that already carries a generation — a secondary-worktree
|
|
591
|
-
// path incremented via its own watcher may never have been registered, but still has in-flight reads to fence.
|
|
592
|
-
const paths = new Set([...this._commonPathRegistry.keys(), ...this._statusGenerations.keys()]);
|
|
593
|
-
for (const path of paths) {
|
|
594
|
-
this.incrementStatusGeneration(path);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
getCommonPath(repoPath) {
|
|
598
|
-
return this._commonPathRegistry.get(repoPath) ?? repoPath;
|
|
599
|
-
}
|
|
600
|
-
getWorktreePaths(commonPath) {
|
|
601
|
-
const worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
602
|
-
return worktrees != null ? [...worktrees] : [];
|
|
603
|
-
}
|
|
604
|
-
isWorktree(repoPath) {
|
|
605
|
-
const commonPath = this._commonPathRegistry.get(repoPath);
|
|
606
|
-
return commonPath != null && commonPath !== repoPath;
|
|
607
|
-
}
|
|
608
|
-
/** Whether `repoPath` is currently registered (via {@link registerRepoPath}, not yet unregistered). */
|
|
609
|
-
isRegistered(repoPath) {
|
|
610
|
-
return this._commonPathRegistry.has(repoPath);
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* Monotonic per-path counter advanced whenever `repoPath` is unregistered (repo closed, worktree
|
|
614
|
-
* removed). Lets an async post-read step — e.g. the gk-config reconcile — detect that its target was
|
|
615
|
-
* closed (and possibly reopened) mid-flight and bail. Unlike an `isRegistered` check it doesn't
|
|
616
|
-
* require the caller to have registered in the first place, so it stays correct for consumers of
|
|
617
|
-
* this package that don't wire up the host's repo lifecycle.
|
|
618
|
-
*/
|
|
619
|
-
getCloseGeneration(repoPath) {
|
|
620
|
-
return this._closeGenerations.get(repoPath) ?? 0;
|
|
621
|
-
}
|
|
622
|
-
/** Clears file-scoped caches (blame, diff, fileLog) for a specific path within a repo */
|
|
623
|
-
clearForPath(repoPath, path, ...types) {
|
|
624
|
-
const prefix = `${normalizePath(path)}:`;
|
|
625
|
-
if (!types.length || types.includes('blame')) {
|
|
626
|
-
this._caches.blame?.deleteByKeyPrefix(repoPath, prefix);
|
|
627
|
-
}
|
|
628
|
-
if (!types.length || types.includes('diff')) {
|
|
629
|
-
this._caches.diff?.deleteByKeyPrefix(repoPath, prefix);
|
|
630
|
-
}
|
|
631
|
-
if (!types.length || types.includes('fileLog')) {
|
|
632
|
-
this._caches.fileLog?.deleteByKeyPrefix(repoPath, prefix);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
registerRepoPath(repoPath, gitDir) {
|
|
636
|
-
const normalizedPath = getRepositoryOrWorktreePath(repoPath);
|
|
637
|
-
const commonPath = gitDir.commonUri != null ? getCommonRepositoryPath(gitDir.commonUri) : normalizedPath;
|
|
638
|
-
this._commonPathRegistry.set(normalizedPath, commonPath);
|
|
639
|
-
let worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
640
|
-
if (worktrees == null) {
|
|
641
|
-
worktrees = new Set();
|
|
642
|
-
this._worktreesByCommonPath.set(commonPath, worktrees);
|
|
643
|
-
}
|
|
644
|
-
worktrees.add(normalizedPath);
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Symmetric companion to `registerRepoPath`. Clears cache entries specific to `repoPath`
|
|
648
|
-
* and removes the path from the registry.
|
|
649
|
-
*
|
|
650
|
-
* Call this when a worktree is deleted or a repo is closed so stale registry entries
|
|
651
|
-
* and derived cache entries don't persist.
|
|
652
|
-
*
|
|
653
|
-
* Targeted — does NOT cascade to sibling worktrees sharing the same commonPath. The
|
|
654
|
-
* shared commonPath entry in each shared cache is only evicted when unregistering the
|
|
655
|
-
* last remaining worktree for that commonPath (otherwise siblings still depend on it).
|
|
656
|
-
*
|
|
657
|
-
* Uses soft-invalidate where supported so any in-flight factory/mapper keeps its abort
|
|
658
|
-
* wiring intact — a caller whose signal aborts after unregister can still propagate
|
|
659
|
-
* cancellation into the underlying work rather than leaving it orphaned. Controller-backed
|
|
660
|
-
* entries self-evict on settle; plain `.set()`-based entries hard-delete immediately.
|
|
661
|
-
*
|
|
662
|
-
* Cache eviction is a no-op if `repoPath` is not registered, but the status clock is advanced
|
|
663
|
-
* unconditionally (a fresh registration must not let a post-reopen read join a pre-close one).
|
|
664
|
-
*/
|
|
665
|
-
unregisterRepoPath(repoPath) {
|
|
666
|
-
// Advance the status clock on close so a status read still in flight from this registration can't be
|
|
667
|
-
// joined by a read issued after the path is reopened (which would otherwise reuse the same generation).
|
|
668
|
-
this.incrementStatusGeneration(repoPath);
|
|
669
|
-
// Advance the close clock so an async step that captured it before its read (see `getCloseGeneration`)
|
|
670
|
-
// can tell its target went away mid-flight.
|
|
671
|
-
this._closeGenerations.set(repoPath, this.getCloseGeneration(repoPath) + 1);
|
|
672
|
-
const commonPath = this._commonPathRegistry.get(repoPath) ?? repoPath;
|
|
673
|
-
const worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
674
|
-
// After removing repoPath, would the commonPath have any worktrees left?
|
|
675
|
-
const isLastWorktree = worktrees == null || worktrees.size <= 1;
|
|
676
|
-
// Targeted per-repoPath cleanup: for per-worktree caches, clear this repoPath's
|
|
677
|
-
// entries. For shared caches, clear this repoPath's mapper entry (if it's a worktree
|
|
678
|
-
// distinct from commonPath); only evict the shared commonPath entry when this was the
|
|
679
|
-
// last worktree — otherwise siblings still rely on the shared data.
|
|
680
|
-
for (const key of Object.keys(this._caches)) {
|
|
681
|
-
const cache = this._caches[key];
|
|
682
|
-
if (cache == null)
|
|
683
|
-
continue;
|
|
684
|
-
// Prefer `invalidate` so in-flight abort wiring survives until the factory settles;
|
|
685
|
-
// fall back to `delete` for plain `Map`-typed caches that don't track promises.
|
|
686
|
-
const invalidate = cache.invalidate;
|
|
687
|
-
const evict = typeof invalidate === 'function'
|
|
688
|
-
? (k) => invalidate.call(cache, k)
|
|
689
|
-
: (k) => cache.delete(k);
|
|
690
|
-
if (sharedCacheKeys.has(key)) {
|
|
691
|
-
if (repoPath !== commonPath) {
|
|
692
|
-
evict(repoPath);
|
|
693
|
-
}
|
|
694
|
-
if (isLastWorktree) {
|
|
695
|
-
evict(commonPath);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
else {
|
|
699
|
-
evict(repoPath);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
// Shared, commonPath-keyed like `gkConfigMap` — only evict once no worktree still depends on it.
|
|
703
|
-
if (isLastWorktree) {
|
|
704
|
-
this._gkConfigMergeSnapshots.delete(commonPath);
|
|
705
|
-
}
|
|
706
|
-
this._commonPathRegistry.delete(repoPath);
|
|
707
|
-
if (worktrees != null) {
|
|
708
|
-
worktrees.delete(repoPath);
|
|
709
|
-
if (worktrees.size === 0) {
|
|
710
|
-
this._worktreesByCommonPath.delete(commonPath);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
reset() {
|
|
715
|
-
// Advance the close clock BEFORE dropping the registry it reads from. Advancing rather than
|
|
716
|
-
// clearing is the point: an async step that captured a generation must see a mismatch and bail,
|
|
717
|
-
// where a cleared map would hand it a fresh `0` that matches and let it repopulate what was just
|
|
718
|
-
// torn down. Union of registered paths and any already carrying a generation, mirroring
|
|
719
|
-
// `incrementStatusGenerations`.
|
|
720
|
-
for (const path of new Set([...this._commonPathRegistry.keys(), ...this._closeGenerations.keys()])) {
|
|
721
|
-
this._closeGenerations.set(path, this.getCloseGeneration(path) + 1);
|
|
722
|
-
}
|
|
723
|
-
this._commonPathRegistry.clear();
|
|
724
|
-
this._worktreesByCommonPath.clear();
|
|
725
|
-
this._statusGenerations.clear();
|
|
726
|
-
this._gkConfigMergeSnapshots.clear();
|
|
727
|
-
this._gkConfigReconciler = undefined;
|
|
728
|
-
this._caches = createEmptyCaches();
|
|
729
|
-
}
|
|
730
|
-
onRepositoryChanged(repoPath, changes) {
|
|
731
|
-
const changesSet = new Set(changes);
|
|
732
|
-
const hasAny = (...c) => c.some(ch => changesSet.has(ch));
|
|
733
|
-
if (hasAny('unknown', 'closed')) {
|
|
734
|
-
this.unregisterRepoPath(repoPath);
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
// Advance the status clock (see {@link getStatusGeneration}) for changes that alter `git status` output but
|
|
738
|
-
// aren't mapped to the `'status'` cache type below: files (index/head/heads), untracked set (ignores/config),
|
|
739
|
-
// ahead/behind (remotes). Paused-op changes advance it too, but via `clearCaches('status')` (see below) —
|
|
740
|
-
// listing them here as well would double-increment the clock for a single change.
|
|
741
|
-
if (hasAny('index', 'head', 'heads', 'remotes', 'ignores', 'config')) {
|
|
742
|
-
this.incrementStatusGeneration(repoPath);
|
|
743
|
-
}
|
|
744
|
-
const types = new Set();
|
|
745
|
-
if (hasAny('head')) {
|
|
746
|
-
types.add('branch');
|
|
747
|
-
}
|
|
748
|
-
if (hasAny('index', 'heads', 'pausedOp')) {
|
|
749
|
-
types.add('blame');
|
|
750
|
-
types.add('diff');
|
|
751
|
-
types.add('fileLog');
|
|
752
|
-
}
|
|
753
|
-
if (hasAny('index')) {
|
|
754
|
-
types.add('tracking');
|
|
755
|
-
}
|
|
756
|
-
if (hasAny('config')) {
|
|
757
|
-
types.add('config');
|
|
758
|
-
}
|
|
759
|
-
if (hasAny('heads')) {
|
|
760
|
-
types.add('branches');
|
|
761
|
-
types.add('contributors');
|
|
762
|
-
types.add('worktrees');
|
|
763
|
-
}
|
|
764
|
-
if (hasAny('remotes')) {
|
|
765
|
-
types.add('branches');
|
|
766
|
-
types.add('contributors');
|
|
767
|
-
types.add('remotes');
|
|
768
|
-
types.add('worktrees');
|
|
769
|
-
}
|
|
770
|
-
if (hasAny('ignores')) {
|
|
771
|
-
types.add('gitignore');
|
|
772
|
-
}
|
|
773
|
-
if (hasAny('gkConfig')) {
|
|
774
|
-
// Handled separately (not folded into `types`/`clearCaches` below) — a gk write is usually a
|
|
775
|
-
// bookkeeping timestamp that can't affect `baseBranchName`/`branchOverviews`, so this reconciles
|
|
776
|
-
// down to only the keys that actually changed instead of coarsely clearing both on every write.
|
|
777
|
-
this.handleGkConfigChanged(repoPath);
|
|
778
|
-
}
|
|
779
|
-
if (hasAny('lastFetched')) {
|
|
780
|
-
types.add('lastFetched');
|
|
781
|
-
}
|
|
782
|
-
if (hasAny('remoteProviders')) {
|
|
783
|
-
types.add('providers');
|
|
784
|
-
}
|
|
785
|
-
if (hasAny('cherryPick', 'merge', 'rebase', 'revert', 'pausedOp')) {
|
|
786
|
-
types.add('branch');
|
|
787
|
-
types.add('status');
|
|
788
|
-
}
|
|
789
|
-
if (hasAny('stash')) {
|
|
790
|
-
types.add('stashes');
|
|
791
|
-
}
|
|
792
|
-
if (hasAny('tags')) {
|
|
793
|
-
types.add('tags');
|
|
794
|
-
}
|
|
795
|
-
if (hasAny('worktrees')) {
|
|
796
|
-
types.add('worktrees');
|
|
797
|
-
}
|
|
798
|
-
if (types.size) {
|
|
799
|
-
this.clearCaches(repoPath, ...types);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* Handles a watcher-observed `'gkConfig'` change. Always evicts the cached bulk map (forcing the
|
|
804
|
-
* next read to hit disk). If a reconciler is registered (see {@link setGkConfigReconciler}),
|
|
805
|
-
* defers to it instead of coarsely clearing `baseBranchName`/`branchOverviews` — it re-reads the
|
|
806
|
-
* map and diffs it against the snapshot captured here (i.e. as it stood right before this change),
|
|
807
|
-
* cascading only the refs whose merge-relevant keys actually changed. Falls back to the coarse
|
|
808
|
-
* clear when no reconciler is registered (e.g. the GitHub provider) so nothing can go stale.
|
|
809
|
-
*/
|
|
810
|
-
handleGkConfigChanged(repoPath) {
|
|
811
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
812
|
-
// Hard-delete rather than `evictShared`'s soft-invalidate: the reconcile below needs a
|
|
813
|
-
// point-in-time read of the post-change file, and a soft-invalidated entry stays joinable — the
|
|
814
|
-
// re-read would ride a bulk read that started before this change and diff it as unchanged.
|
|
815
|
-
// Same reasoning as `refs.ts`'s `force: true` path and `deleteGkConfig`'s own hard delete.
|
|
816
|
-
this._caches.gkConfigMap?.delete(commonPath);
|
|
817
|
-
if (this._gkConfigReconciler == null) {
|
|
818
|
-
this.clearCaches(repoPath, 'gkConfig');
|
|
819
|
-
return;
|
|
820
|
-
}
|
|
821
|
-
const priorSnapshot = this._gkConfigMergeSnapshots.get(commonPath);
|
|
822
|
-
// Fire-and-forget, but the outcome still decides whether the coarse clear is owed: a reconcile that
|
|
823
|
-
// FAILED leaves every derived cache holding pre-change values with nothing else to correct them, so
|
|
824
|
-
// it falls back to the blunt behavior that registering a reconciler replaced. Kept here rather than
|
|
825
|
-
// in the reconciler so a bail path added later can't silently skip it — the return type makes each
|
|
826
|
-
// one say what it did.
|
|
827
|
-
void Promise.resolve(this._gkConfigReconciler(repoPath, priorSnapshot)).then(outcome => {
|
|
828
|
-
if (outcome === 'failed') {
|
|
829
|
-
this.clearCaches(repoPath, 'gkConfig');
|
|
830
|
-
}
|
|
831
|
-
},
|
|
832
|
-
// An exception escaping the reconciler is a failure by definition — and one its own `catch`
|
|
833
|
-
// never saw, so nothing else will have cascaded.
|
|
834
|
-
() => this.clearCaches(repoPath, 'gkConfig'));
|
|
835
|
-
}
|
|
836
|
-
/** Hard-evicts the cached bulk `.git/gk/config` map so the next read hits disk. */
|
|
837
|
-
deleteGkConfigMap(repoPath) {
|
|
838
|
-
this._caches.gkConfigMap?.delete(this.getCommonPath(repoPath));
|
|
839
|
-
}
|
|
840
|
-
/** The merge-relevant gk config snapshot currently serving as the reconcile baseline. */
|
|
841
|
-
getGkConfigMergeSnapshot(repoPath) {
|
|
842
|
-
return this._gkConfigMergeSnapshots.get(this.getCommonPath(repoPath));
|
|
843
|
-
}
|
|
844
|
-
getBranches(repoPath, factory, mapper, cancellation) {
|
|
845
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
846
|
-
// Register this caller with the shared factory's aggregate so that invariant 3
|
|
847
|
-
// (factory aborts iff every waiter has aborted) holds for same-`repoPath` cache hits too.
|
|
848
|
-
// The returned wrapped promise is deliberately discarded — we use the raw cached inner
|
|
849
|
-
// below to build the mapped entry. Swallow any rejection on this dangling reference so
|
|
850
|
-
// it doesn't surface as an unhandled rejection; the real caller-facing promise (via
|
|
851
|
-
// `branches.getOrCreate` below) is where caller cancellation flows to.
|
|
852
|
-
const registration = this.sharedBranches.getOrCreate(commonPath, (cacheable, signal) => {
|
|
853
|
-
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
854
|
-
// On factory invalidation, propagate to the derived per-worktree mapper entries
|
|
855
|
-
// via soft-invalidate — existing waiters on the mapper complete, and the entry
|
|
856
|
-
// self-evicts on mapper settle so the next callers build fresh derived entries.
|
|
857
|
-
void p
|
|
858
|
-
.finally(() => {
|
|
859
|
-
if (cacheable.invalidated) {
|
|
860
|
-
this.branches.invalidate(commonPath);
|
|
861
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
862
|
-
this.branches.invalidate(worktreePath);
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
})
|
|
866
|
-
// Swallow the cleanup chain's rejection so a rejected factory (e.g. cancellation)
|
|
867
|
-
// doesn't surface as an unhandled rejection; the caller-facing promise handles it.
|
|
868
|
-
.catch(() => { });
|
|
869
|
-
return p;
|
|
870
|
-
}, cancellation);
|
|
871
|
-
void registration.catch(() => { });
|
|
872
|
-
// Build the per-`repoPath` mapped entry through `getOrCreate` so mapper internal git
|
|
873
|
-
// work (e.g. `getCurrentBranchReferenceCore`) runs under a mapper-level aggregate signal
|
|
874
|
-
// separate from the factory's. Subsequent same-`repoPath` cache hits register with this
|
|
875
|
-
// aggregate too — invariant 2/3 hold at the mapper level.
|
|
876
|
-
return this.branches.getOrCreate(repoPath, (_cacheable, mapperSignal) => {
|
|
877
|
-
// After `getOrCreate` above, `sharedBranches[commonPath]` holds the raw inner
|
|
878
|
-
// factory promise. Fall back to `registration` in the paranoid case where a
|
|
879
|
-
// synchronously-rejected factory got auto-evicted before we retrieve it.
|
|
880
|
-
const rawShared = this.sharedBranches.get(commonPath) ?? registration;
|
|
881
|
-
return Promise.resolve(rawShared).then(shared => mapper(shared, repoPath, commonPath, mapperSignal));
|
|
882
|
-
}, cancellation);
|
|
883
|
-
}
|
|
884
|
-
static globalConfigKey = '';
|
|
885
|
-
getConfig(repoPath, key, factory) {
|
|
886
|
-
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
887
|
-
const result = this.configKeys.get(cacheKey, key);
|
|
888
|
-
if (result != null)
|
|
889
|
-
return result;
|
|
890
|
-
const factoryPromise = Promise.resolve(factory());
|
|
891
|
-
this.configKeys.set(cacheKey, key, factoryPromise);
|
|
892
|
-
return factoryPromise;
|
|
893
|
-
}
|
|
894
|
-
getConfigRegex(repoPath, pattern, factory) {
|
|
895
|
-
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
896
|
-
const result = this.configPatterns.get(cacheKey, pattern);
|
|
897
|
-
if (result != null)
|
|
898
|
-
return result;
|
|
899
|
-
const factoryPromise = Promise.resolve(factory());
|
|
900
|
-
this.configPatterns.set(cacheKey, pattern, factoryPromise);
|
|
901
|
-
return factoryPromise;
|
|
902
|
-
}
|
|
903
|
-
deleteConfig(repoPath, key) {
|
|
904
|
-
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
905
|
-
this._caches.configKeys?.delete(cacheKey, key);
|
|
906
|
-
this._caches.configPatterns?.delete(cacheKey);
|
|
907
|
-
}
|
|
908
|
-
/**
|
|
909
|
-
* The whole `.git/gk/config` is read once and cached as a single map per commonPath; per-key and
|
|
910
|
-
* per-namespace gk lookups are served from it in-memory (see `getGkConfigMap` in the CLI config
|
|
911
|
-
* sub-provider). Invalidated by `deleteGkConfig` (write) and, on a watcher `'gkConfig'` event, by
|
|
912
|
-
* `handleGkConfigChanged` (reconciled precisely when a reconciler is registered, or the coarse
|
|
913
|
-
* clear otherwise). The first fresh read seeds the merge-relevant snapshot used by
|
|
914
|
-
* `reconcileGkConfigMap`; later refreshes of that snapshot are owned by the reconcile itself.
|
|
915
|
-
*/
|
|
916
|
-
getGkConfigMap(repoPath, factory) {
|
|
917
|
-
return this.getSharedSimple(this.gkConfigMap, repoPath, async (commonPath, cacheable) => {
|
|
918
|
-
const map = await factory(cacheable);
|
|
919
|
-
// Seed the reconcile baseline on first observation only. Refreshes belong to
|
|
920
|
-
// `reconcileGkConfigMap` (after it has cascaded) and `recordGkConfigWrite` (our own writes):
|
|
921
|
-
// an incidental read that happens to land between an external write and the watcher event
|
|
922
|
-
// would otherwise advance the baseline to the post-change value, so the reconcile would diff
|
|
923
|
-
// that value against itself and silently drop the change.
|
|
924
|
-
if (!this._gkConfigMergeSnapshots.has(commonPath)) {
|
|
925
|
-
this._gkConfigMergeSnapshots.set(commonPath, this.extractMergeRelevantGkConfig(map));
|
|
926
|
-
}
|
|
927
|
-
return map;
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
/** Extracts the subset of a gk config map whose keys participate in the `branchOverviews`/`baseBranchName` lineage. */
|
|
931
|
-
extractMergeRelevantGkConfig(map) {
|
|
932
|
-
const subset = new Map();
|
|
933
|
-
for (const [key, value] of map) {
|
|
934
|
-
if (branchOverviewGkConfigKeysRegex.test(key)) {
|
|
935
|
-
subset.set(key, value);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
return subset;
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* Clears the cached `.git/gk/config` map and invalidates the derived caches
|
|
942
|
-
* (`baseBranchName`/`branchOverviews`) for the written key's ref.
|
|
943
|
-
*
|
|
944
|
-
* @param options.skipInvalidation Downstream caches the caller wants preserved despite this
|
|
945
|
-
* write. Use when the value being written is exactly what was just resolved — e.g. the Tier 2
|
|
946
|
-
* `storeMergeTargetBranchName` self-write inside `getBranchContributionsOverview` (skip
|
|
947
|
-
* `'branchOverviews'`) or the Tier 3 `storeBaseBranchName` self-write inside `getBaseBranchName`
|
|
948
|
-
* (skip both `'baseBranchName'` and `'branchOverviews'`). The bulk `gkConfigMap` map always
|
|
949
|
-
* invalidates so subsequent reads see the new value.
|
|
950
|
-
*/
|
|
951
|
-
deleteGkConfig(repoPath, key, options) {
|
|
952
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
953
|
-
this._caches.gkConfigMap?.delete(commonPath);
|
|
954
|
-
this.cascadeGkConfigKeyChange(commonPath, key, options?.skipInvalidation);
|
|
955
|
-
}
|
|
956
|
-
/**
|
|
957
|
-
* Keeps the merge-relevant gk config snapshot in sync with OUR OWN writes, so the next
|
|
958
|
-
* watcher-triggered `reconcileGkConfigMap` diffs a self-write as unchanged rather than as an
|
|
959
|
-
* external change (which would otherwise defeat `skipInvalidation`). No-ops for keys outside the
|
|
960
|
-
* merge-relevant subset, and if no snapshot exists yet for this repo — nothing to keep in sync;
|
|
961
|
-
* the next real read (`getGkConfigMap`) populates one from scratch.
|
|
962
|
-
*/
|
|
963
|
-
recordGkConfigWrite(repoPath, key, value) {
|
|
964
|
-
if (!branchOverviewGkConfigKeysRegex.test(key))
|
|
965
|
-
return;
|
|
966
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
967
|
-
const snapshot = this._gkConfigMergeSnapshots.get(commonPath);
|
|
968
|
-
if (snapshot == null)
|
|
969
|
-
return;
|
|
970
|
-
// Copy-on-write: a reconcile in flight is holding this map as its `priorSnapshot` baseline, so
|
|
971
|
-
// mutating it in place would silently move that baseline mid-diff.
|
|
972
|
-
const next = new Map(snapshot);
|
|
973
|
-
if (value == null) {
|
|
974
|
-
next.delete(key);
|
|
975
|
-
}
|
|
976
|
-
else {
|
|
977
|
-
next.set(key, value);
|
|
978
|
-
}
|
|
979
|
-
this._gkConfigMergeSnapshots.set(commonPath, next);
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* Registers the reconciler invoked by {@link handleGkConfigChanged} on a watcher-observed
|
|
983
|
-
* `'gkConfig'` change. Only one reconciler is kept — later registrations replace earlier ones,
|
|
984
|
-
* which is harmless since every CLI config sub-provider sharing this `Cache` reconciles the same
|
|
985
|
-
* underlying `.git/gk/config` file identically.
|
|
986
|
-
*/
|
|
987
|
-
setGkConfigReconciler(reconciler) {
|
|
988
|
-
this._gkConfigReconciler = reconciler;
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* Diffs a freshly-read gk config map's merge-relevant subset against `priorSnapshot` (captured by
|
|
992
|
-
* `handleGkConfigChanged` before the reconcile started, so it reflects the pre-change state even
|
|
993
|
-
* though this call's own re-read already raced ahead and refreshed the live snapshot), cascading
|
|
994
|
-
* `baseBranchName`/`branchOverviews` for every ref whose merge-relevant key actually changed.
|
|
995
|
-
* `priorSnapshot` of `undefined` (never observed before this reconcile) is treated as "everything
|
|
996
|
-
* may have changed" — a full coarse clear, same as the pre-existing watcher behavior. Returns
|
|
997
|
-
* whether anything changed (i.e. whether a follow-up repository-changed event is warranted).
|
|
998
|
-
*/
|
|
999
|
-
reconcileGkConfigMap(repoPath, priorSnapshot, freshMap) {
|
|
1000
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1001
|
-
const newSubset = this.extractMergeRelevantGkConfig(freshMap);
|
|
1002
|
-
this._gkConfigMergeSnapshots.set(commonPath, newSubset);
|
|
1003
|
-
if (priorSnapshot == null) {
|
|
1004
|
-
this.evictShared('baseBranchName', repoPath);
|
|
1005
|
-
this.evictShared('branchOverviews', repoPath);
|
|
1006
|
-
return true;
|
|
1007
|
-
}
|
|
1008
|
-
let changed = false;
|
|
1009
|
-
for (const key of new Set([...priorSnapshot.keys(), ...newSubset.keys()])) {
|
|
1010
|
-
if (priorSnapshot.get(key) !== newSubset.get(key)) {
|
|
1011
|
-
changed = true;
|
|
1012
|
-
this.cascadeGkConfigKeyChange(commonPath, key);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
return changed;
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
* Shared per-ref cascade for a changed `branch.<ref>.gk-...` key: invalidates `baseBranchName` (for
|
|
1019
|
-
* `gk-merge-base`) and `branchOverviews` (for any merge-relevant key), honoring `skipInvalidation`.
|
|
1020
|
-
* Used by both a direct write (`deleteGkConfig`) and a reconciled external change
|
|
1021
|
-
* (`reconcileGkConfigMap`). No-ops for keys outside the merge-relevant subset.
|
|
1022
|
-
*/
|
|
1023
|
-
cascadeGkConfigKeyChange(commonPath, key, skip) {
|
|
1024
|
-
const refMatch = key.match(branchOverviewGkConfigKeysRegex);
|
|
1025
|
-
if (refMatch == null)
|
|
1026
|
-
return;
|
|
1027
|
-
const ref = refMatch[1];
|
|
1028
|
-
// `getBaseBranchName` reads `branch.<ref>.gk-merge-base` and caches the resolved value
|
|
1029
|
-
// per-ref. A change to that key must invalidate the cached base or Tier 3 of
|
|
1030
|
-
// `getBranchContributionsOverview` will resolve `mergeTarget` against the pre-change value.
|
|
1031
|
-
if (key.endsWith('.gk-merge-base') && !skip?.includes('baseBranchName')) {
|
|
1032
|
-
this._caches.baseBranchName?.delete(commonPath, ref);
|
|
1033
|
-
}
|
|
1034
|
-
if (skip?.includes('branchOverviews'))
|
|
1035
|
-
return;
|
|
1036
|
-
// When the change affects a branch's merge-target/base lineage, invalidate that branch's
|
|
1037
|
-
// cached overviews so subsequent reads pick up the new stored value rather than stale data.
|
|
1038
|
-
// `getBranchContributionsOverview` keys `branchOverviews` by `${ref}|${mergeTarget}`, so
|
|
1039
|
-
// invalidate every entry for the affected ref regardless of which target it resolved to.
|
|
1040
|
-
// Uses `invalidateByKeyPrefix` (not `deleteByKeyPrefix`) so an in-flight factory is still
|
|
1041
|
-
// shared with new callers instead of triggering a duplicate fetch.
|
|
1042
|
-
//
|
|
1043
|
-
// Sibling worktrees get their own bucket, not just the shared one: `getSharedOrCreateWithKey`
|
|
1044
|
-
// stores a per-worktree *mapped* entry under that worktree's own path, and prefix-invalidation
|
|
1045
|
-
// only reaches one bucket. The in-flight case self-propagates on settle, but an already-settled
|
|
1046
|
-
// overview would otherwise survive here — which the coarse `evictShared` path this replaced did
|
|
1047
|
-
// clear, since it iterated the worktrees.
|
|
1048
|
-
this._caches.branchOverviews?.invalidateByKeyPrefix(commonPath, `${ref}|`);
|
|
1049
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
1050
|
-
if (worktreePath === commonPath)
|
|
1051
|
-
continue;
|
|
1052
|
-
this._caches.branchOverviews?.invalidateByKeyPrefix(worktreePath, `${ref}|`);
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
async getBranchOverview(repoPath, cacheKey, factory, options) {
|
|
1056
|
-
return this.getSharedOrCreateWithKey(this.branchOverviews, repoPath, cacheKey, factory, (data, newRepoPath) => data == null
|
|
1057
|
-
? data
|
|
1058
|
-
: {
|
|
1059
|
-
...data,
|
|
1060
|
-
repoPath: newRepoPath,
|
|
1061
|
-
contributors: data.contributors.map(c => c.withRepoPath(newRepoPath)),
|
|
1062
|
-
}, options);
|
|
1063
|
-
}
|
|
1064
|
-
async getContributors(repoPath, cacheKey, factory, options) {
|
|
1065
|
-
return this.getSharedOrCreateWithKey(this.contributors, repoPath, cacheKey, factory, (data, newRepoPath) => ({
|
|
1066
|
-
...data,
|
|
1067
|
-
contributors: data.contributors.map(c => c.withRepoPath(newRepoPath)),
|
|
1068
|
-
}), options);
|
|
1069
|
-
}
|
|
1070
|
-
async getContributorsLite(repoPath, cacheKey, factory, options) {
|
|
1071
|
-
return this.getSharedOrCreateWithKey(this.contributorsLite, repoPath, cacheKey, factory, (data, newRepoPath) => data.map(c => c.withRepoPath(newRepoPath)), options);
|
|
1072
|
-
}
|
|
1073
|
-
getContributorsStats(repoPath, cacheKey, factory, options) {
|
|
1074
|
-
return this.getSharedSimpleWithKey(this.contributorsStats, repoPath, cacheKey, factory, options);
|
|
1075
|
-
}
|
|
1076
|
-
getBaseBranchName(repoPath, ref, factory, cancellation) {
|
|
1077
|
-
return this.getSharedSimpleWithKey(this.baseBranchName, repoPath, ref, factory, {
|
|
1078
|
-
// A bounded ceiling, because the eviction signals can't cover every way a base changes. The
|
|
1079
|
-
// `'branches'` cascade deliberately doesn't clear this — a tip move can't change a base, and
|
|
1080
|
-
// re-deriving per commit is the cost this exists to avoid — but that leaves a hole: a branch
|
|
1081
|
-
// deleted and recreated OUTSIDE GitLens, and never checked out, emits only `heads`. A base
|
|
1082
|
-
// derived as "none" before that would otherwise stay "none" for the session.
|
|
1083
|
-
//
|
|
1084
|
-
// `createTTL`, NOT `accessTTL`: the sliding variant resets on every read, so a branch card
|
|
1085
|
-
// polling this entry would hold it alive forever and never re-derive — the exact case the
|
|
1086
|
-
// ceiling exists for. Absolute from creation bounds staleness regardless of read frequency.
|
|
1087
|
-
createTTL: baseBranchNameTTL,
|
|
1088
|
-
cancellation: cancellation,
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* Clears the cached base branch for `ref`. Call from ops that create/rename/delete a branch — the
|
|
1093
|
-
* `'branches'` cascade no longer clears these, since tip movement can't change a branch's base.
|
|
1094
|
-
*
|
|
1095
|
-
* Only clears the cache. A branch's base is *persisted* as `branch.<ref>.gk-merge-base` and read back
|
|
1096
|
-
* before the reflog fallback, so an op that ends a branch's identity under a name must drop or move
|
|
1097
|
-
* that key too (`removeGkConfigBranchSection`/`renameGkConfigBranchSection`) — otherwise the
|
|
1098
|
-
* re-derivation this triggers just reads the stale value straight back.
|
|
1099
|
-
*/
|
|
1100
|
-
deleteBaseBranchName(repoPath, ref) {
|
|
1101
|
-
this._caches.baseBranchName?.delete(this.getCommonPath(repoPath), ref);
|
|
1102
|
-
}
|
|
1103
|
-
getBranchMergedStatus(repoPath, cacheKey, factory, cancellation) {
|
|
1104
|
-
return this.getSharedOrCreateWithKey(this.branchMergedStatus, repoPath, cacheKey, factory, (data, newRepoPath) => {
|
|
1105
|
-
if (!data.merged)
|
|
1106
|
-
return data;
|
|
1107
|
-
if (data.localBranchOnly == null)
|
|
1108
|
-
return data;
|
|
1109
|
-
const lbo = data.localBranchOnly;
|
|
1110
|
-
return {
|
|
1111
|
-
...data,
|
|
1112
|
-
localBranchOnly: createReference(lbo.ref, newRepoPath, {
|
|
1113
|
-
id: getBranchId(newRepoPath, lbo.remote, lbo.name),
|
|
1114
|
-
refType: 'branch',
|
|
1115
|
-
name: lbo.name,
|
|
1116
|
-
remote: lbo.remote,
|
|
1117
|
-
upstream: lbo.upstream,
|
|
1118
|
-
sha: lbo.sha,
|
|
1119
|
-
}),
|
|
1120
|
-
};
|
|
1121
|
-
}, { cancellation: cancellation });
|
|
1122
|
-
}
|
|
1123
|
-
getBranchMetadataMap(repoPath, factory) {
|
|
1124
|
-
return this.getSharedSimple(this.branchMetadataMap, repoPath, factory);
|
|
1125
|
-
}
|
|
1126
|
-
getDefaultBranchName(repoPath, remote, factory, cancellation) {
|
|
1127
|
-
return this.getSharedSimpleWithKey(this.defaultBranchName, repoPath, remote, factory, {
|
|
1128
|
-
cancellation: cancellation,
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
/** Clears the cached default branch for one `remote` key (the networked lookup or its `:local` variant). */
|
|
1132
|
-
deleteDefaultBranchName(repoPath, remote) {
|
|
1133
|
-
this._caches.defaultBranchName?.delete(this.getCommonPath(repoPath), remote);
|
|
1134
|
-
}
|
|
1135
|
-
getInitialCommitSha(repoPath, factory) {
|
|
1136
|
-
return this.getSharedSimple(this.initialCommitSha, repoPath, factory);
|
|
1137
|
-
}
|
|
1138
|
-
getLastFetchedTimestamp(repoPath, factory) {
|
|
1139
|
-
return this.getSharedSimple(this.lastFetched, repoPath, factory);
|
|
1140
|
-
}
|
|
1141
|
-
getRefs(repoPath, factory, cancellation) {
|
|
1142
|
-
// Raw ref records are repoPath-agnostic (no per-worktree binding to remap), so we key only
|
|
1143
|
-
// by commonPath and skip the per-worktree mapper that `getBranches`/`getTags` need.
|
|
1144
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1145
|
-
return this.refs.getOrCreate(commonPath, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), cancellation);
|
|
1146
|
-
}
|
|
1147
|
-
getRefTips(repoPath, factory, cancellation) {
|
|
1148
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1149
|
-
return this.refTips.getOrCreate(commonPath, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), cancellation);
|
|
1150
|
-
}
|
|
1151
|
-
async getRemotes(repoPath, factory, cancellation) {
|
|
1152
|
-
return this.getSharedOrCreate(this.remotes, repoPath, factory, (data, newRepoPath) => data.map(r => r.withRepoPath(newRepoPath)), cancellation);
|
|
1153
|
-
}
|
|
1154
|
-
async getStash(repoPath, cacheKey, factory, options) {
|
|
1155
|
-
return this.getSharedOrCreateWithKey(this.stashes, repoPath, cacheKey, factory, (data, newRepoPath) => ({
|
|
1156
|
-
repoPath: newRepoPath,
|
|
1157
|
-
stashes: new Map(Array.from(data.stashes.entries(), ([sha, s]) => [
|
|
1158
|
-
sha,
|
|
1159
|
-
s.withRepoPath(newRepoPath),
|
|
1160
|
-
])),
|
|
1161
|
-
}), options);
|
|
1162
|
-
}
|
|
1163
|
-
async getTags(repoPath, factory, cancellation) {
|
|
1164
|
-
return this.getSharedOrCreate(this.tags, repoPath, factory, (data, newRepoPath) => ({ ...data, values: data.values.map(t => t.withRepoPath(newRepoPath)) }), cancellation);
|
|
1165
|
-
}
|
|
1166
|
-
async getWorktrees(repoPath, factory, cancellation) {
|
|
1167
|
-
return this.getSharedOrCreate(this.worktrees, repoPath, factory, (data, newRepoPath) => data.map(w => w.withRepoPath(newRepoPath)), cancellation);
|
|
1168
|
-
}
|
|
1169
|
-
async getSharedOrCreate(cache, repoPath, factory, mapper, cancellation) {
|
|
1170
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1171
|
-
// Always register this caller with the shared factory's aggregate so same-`repoPath` and
|
|
1172
|
-
// worktree-distinct concurrent callers both contribute — invariant 3 (factory aborts iff
|
|
1173
|
-
// every waiter aborts) holds uniformly. The wrapped return is our caller-facing promise
|
|
1174
|
-
// for the commonPath-keyed branch; the per-worktree branch uses `raceWithSignal` below.
|
|
1175
|
-
const sharedPromise = cache.getOrCreate(commonPath, (cacheable, signal) => {
|
|
1176
|
-
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
1177
|
-
// On factory invalidation (without rejection), propagate to the derived per-worktree
|
|
1178
|
-
// mapper entries so they don't persist past the shared factory's settle. Mapper
|
|
1179
|
-
// entries cached via `cache.set()` have no controller, so `invalidate` hard-deletes.
|
|
1180
|
-
void p
|
|
1181
|
-
.finally(() => {
|
|
1182
|
-
if (cacheable.invalidated) {
|
|
1183
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
1184
|
-
if (worktreePath === commonPath)
|
|
1185
|
-
continue;
|
|
1186
|
-
cache.invalidate(worktreePath);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
})
|
|
1190
|
-
// Swallow the cleanup chain's rejection so a rejected factory (e.g. cancellation)
|
|
1191
|
-
// doesn't surface as an unhandled rejection; the caller-facing promise handles it.
|
|
1192
|
-
.catch(() => { });
|
|
1193
|
-
return p;
|
|
1194
|
-
}, cancellation);
|
|
1195
|
-
// Swallow any rejection on the registration wrapper so it isn't surfaced as an unhandled
|
|
1196
|
-
// rejection when we discard it below (existing-mapper path). The real caller-facing
|
|
1197
|
-
// promise is the returned value.
|
|
1198
|
-
void sharedPromise.catch(() => { });
|
|
1199
|
-
if (commonPath !== repoPath) {
|
|
1200
|
-
// Reuse the cached mapped entry for this worktree if present; otherwise derive it off
|
|
1201
|
-
// the raw inner shared promise so subsequent cache hits don't inherit the first
|
|
1202
|
-
// caller's signal wrap.
|
|
1203
|
-
const existing = cache.get(repoPath);
|
|
1204
|
-
if (existing != null) {
|
|
1205
|
-
return cancellation != null ? raceWithSignal(existing, cancellation) : existing;
|
|
1206
|
-
}
|
|
1207
|
-
const rawShared = cache.get(commonPath) ?? sharedPromise;
|
|
1208
|
-
const mappedPromise = Promise.resolve(rawShared).then(data => mapper(data, repoPath));
|
|
1209
|
-
cache.set(repoPath, mappedPromise);
|
|
1210
|
-
return cancellation != null ? raceWithSignal(mappedPromise, cancellation) : mappedPromise;
|
|
1211
|
-
}
|
|
1212
|
-
return sharedPromise;
|
|
1213
|
-
}
|
|
1214
|
-
async getSharedOrCreateWithKey(cache, repoPath, cacheKey, factory, mapper, options) {
|
|
1215
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1216
|
-
const cancellation = options?.cancellation;
|
|
1217
|
-
// Always register with the shared factory's aggregate (see `getSharedOrCreate` comment).
|
|
1218
|
-
const sharedPromise = cache.getOrCreate(commonPath, cacheKey, (cacheable, signal) => {
|
|
1219
|
-
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
1220
|
-
// On factory invalidation (without rejection), propagate to the derived per-worktree
|
|
1221
|
-
// mapper entries for this `cacheKey` so they don't persist past the shared factory's
|
|
1222
|
-
// settle. Mapper entries cached via `cache.set()` have no controller, so `invalidate`
|
|
1223
|
-
// hard-deletes.
|
|
1224
|
-
void p
|
|
1225
|
-
.finally(() => {
|
|
1226
|
-
if (cacheable.invalidated) {
|
|
1227
|
-
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
1228
|
-
if (worktreePath === commonPath)
|
|
1229
|
-
continue;
|
|
1230
|
-
cache.invalidate(worktreePath, cacheKey);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
})
|
|
1234
|
-
// Swallow the cleanup chain's rejection so a rejected factory (e.g. cancellation)
|
|
1235
|
-
// doesn't surface as an unhandled rejection; the caller-facing promise handles it.
|
|
1236
|
-
.catch(() => { });
|
|
1237
|
-
return p;
|
|
1238
|
-
}, options);
|
|
1239
|
-
// Swallow any rejection on the registration wrapper so it isn't surfaced as an unhandled
|
|
1240
|
-
// rejection when we discard it below (existing-mapper path).
|
|
1241
|
-
void sharedPromise.catch(() => { });
|
|
1242
|
-
if (commonPath !== repoPath) {
|
|
1243
|
-
const existing = cache.get(repoPath, cacheKey);
|
|
1244
|
-
if (existing != null) {
|
|
1245
|
-
return cancellation != null ? raceWithSignal(existing, cancellation) : existing;
|
|
1246
|
-
}
|
|
1247
|
-
const rawShared = cache.get(commonPath, cacheKey) ?? sharedPromise;
|
|
1248
|
-
const mappedPromise = Promise.resolve(rawShared).then(data => mapper(data, repoPath));
|
|
1249
|
-
cache.set(repoPath, cacheKey, mappedPromise, options);
|
|
1250
|
-
return cancellation != null ? raceWithSignal(mappedPromise, cancellation) : mappedPromise;
|
|
1251
|
-
}
|
|
1252
|
-
return sharedPromise;
|
|
1253
|
-
}
|
|
1254
|
-
async getSharedSimple(cache, repoPath,
|
|
1255
|
-
// `cacheable` is forwarded so a factory can refuse the entry when the read FAILED rather than
|
|
1256
|
-
// genuinely produced nothing — see `getSharedSimpleWithKey` for why that distinction matters.
|
|
1257
|
-
factory) {
|
|
1258
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1259
|
-
// `PromiseMap.getOrCreate(key, factory, cancellation?)` and
|
|
1260
|
-
// `PromiseCache.getOrCreate(key, factory, options?)` have different 3rd-argument shapes,
|
|
1261
|
-
// so we dispatch on cache type. Both register a `CacheController` so `invalidate` works.
|
|
1262
|
-
if (cache instanceof PromiseCache) {
|
|
1263
|
-
return cache.getOrCreate(commonPath, cacheable => Promise.resolve(factory(commonPath, cacheable)));
|
|
1264
|
-
}
|
|
1265
|
-
return cache.getOrCreate(commonPath, cacheable => Promise.resolve(factory(commonPath, cacheable)));
|
|
1266
|
-
}
|
|
1267
|
-
async getSharedSimpleWithKey(cache, repoPath, cacheKey,
|
|
1268
|
-
// `cacheable` is forwarded so a factory can distinguish "the answer is genuinely nothing" from "the
|
|
1269
|
-
// read failed": callers here set no TTL by default, so a failure resolved as `undefined` would
|
|
1270
|
-
// otherwise be served as a real answer until something explicitly evicts it.
|
|
1271
|
-
factory, options) {
|
|
1272
|
-
const commonPath = this.getCommonPath(repoPath);
|
|
1273
|
-
return cache.getOrCreate(commonPath, cacheKey, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), options);
|
|
1274
|
-
}
|
|
71
|
+
return {
|
|
72
|
+
baseBranchName: void 0,
|
|
73
|
+
bestRemotes: void 0,
|
|
74
|
+
blame: void 0,
|
|
75
|
+
branch: void 0,
|
|
76
|
+
branchMergedStatus: void 0,
|
|
77
|
+
branchMetadataMap: void 0,
|
|
78
|
+
branchOverviews: void 0,
|
|
79
|
+
branches: void 0,
|
|
80
|
+
commit: void 0,
|
|
81
|
+
commitCount: void 0,
|
|
82
|
+
fileExistence: void 0,
|
|
83
|
+
ignoreRevsFile: void 0,
|
|
84
|
+
leftRightCommitCount: void 0,
|
|
85
|
+
mergeBase: void 0,
|
|
86
|
+
configKeys: void 0,
|
|
87
|
+
configPatterns: void 0,
|
|
88
|
+
conflictDetection: void 0,
|
|
89
|
+
diff: void 0,
|
|
90
|
+
fileLog: void 0,
|
|
91
|
+
contributors: void 0,
|
|
92
|
+
contributorsLite: void 0,
|
|
93
|
+
contributorsStats: void 0,
|
|
94
|
+
currentBranchReference: void 0,
|
|
95
|
+
currentUser: void 0,
|
|
96
|
+
defaultBranchName: void 0,
|
|
97
|
+
gitDir: void 0,
|
|
98
|
+
gitIgnore: void 0,
|
|
99
|
+
gitResults: void 0,
|
|
100
|
+
gkConfigMap: void 0,
|
|
101
|
+
initialCommitSha: void 0,
|
|
102
|
+
lastFetched: void 0,
|
|
103
|
+
logShas: void 0,
|
|
104
|
+
pausedOperationStatus: void 0,
|
|
105
|
+
resolvedRevisions: void 0,
|
|
106
|
+
reachability: void 0,
|
|
107
|
+
refs: void 0,
|
|
108
|
+
refTips: void 0,
|
|
109
|
+
remotes: void 0,
|
|
110
|
+
sharedBranches: void 0,
|
|
111
|
+
stashes: void 0,
|
|
112
|
+
tags: void 0,
|
|
113
|
+
trackedPaths: void 0,
|
|
114
|
+
worktrees: void 0
|
|
115
|
+
};
|
|
1275
116
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
117
|
+
var Cache = class Cache {
|
|
118
|
+
_caches = createEmptyCaches();
|
|
119
|
+
_commonPathRegistry = /* @__PURE__ */ new Map();
|
|
120
|
+
/** Reverse index: commonPath → set of worktree repoPaths that share it */
|
|
121
|
+
_worktreesByCommonPath = /* @__PURE__ */ new Map();
|
|
122
|
+
/** Monotonic per-worktree "status clock" — see {@link getStatusGeneration}. */
|
|
123
|
+
_statusGenerations = /* @__PURE__ */ new Map();
|
|
124
|
+
/** Monotonic per-path "close clock" — see {@link getCloseGeneration}. */
|
|
125
|
+
_closeGenerations = /* @__PURE__ */ new Map();
|
|
126
|
+
/**
|
|
127
|
+
* Per-commonPath snapshot of the merge-relevant subset of `.git/gk/config` (keys matching
|
|
128
|
+
* {@link branchOverviewGkConfigKeysRegex}), used by {@link reconcileGkConfigMap} to diff a watcher
|
|
129
|
+
* `'gkConfig'` event down to only the keys that actually changed, instead of coarsely re-deriving
|
|
130
|
+
* `baseBranchName`/`branchOverviews` on every gk write. Absent means "never observed".
|
|
131
|
+
*/
|
|
132
|
+
_gkConfigMergeSnapshots = /* @__PURE__ */ new Map();
|
|
133
|
+
/**
|
|
134
|
+
* Reconciler registered by the CLI config sub-provider (see {@link setGkConfigReconciler}),
|
|
135
|
+
* invoked on a watcher-observed `'gkConfig'` change instead of the coarse `clearCaches(repoPath,
|
|
136
|
+
* 'gkConfig')` cascade. `undefined` (e.g. the GitHub provider, which has no `.git/gk/config`)
|
|
137
|
+
* falls back to the coarse clear.
|
|
138
|
+
*/
|
|
139
|
+
_gkConfigReconciler;
|
|
140
|
+
[Symbol.dispose]() {
|
|
141
|
+
this.dispose();
|
|
142
|
+
}
|
|
143
|
+
dispose() {
|
|
144
|
+
this.reset();
|
|
145
|
+
}
|
|
146
|
+
/** Resource usage retained by instantiated sub-caches and their bookkeeping maps. */
|
|
147
|
+
getResourceUsage() {
|
|
148
|
+
const usage = {};
|
|
149
|
+
for (const [name, cache] of Object.entries(this._caches)) if (cache != null) usage[`cache.${name}.entries.count`] = cache instanceof RepoPromiseCacheMap ? cache.entryCount : cache.size;
|
|
150
|
+
usage["cache.commonPathRegistry.entries.count"] = this._commonPathRegistry.size;
|
|
151
|
+
usage["cache.worktreesByCommonPath.entries.count"] = this._worktreesByCommonPath.size;
|
|
152
|
+
usage["cache.statusGenerations.entries.count"] = this._statusGenerations.size;
|
|
153
|
+
usage["cache.closeGenerations.entries.count"] = this._closeGenerations.size;
|
|
154
|
+
usage["cache.gkConfigMergeSnapshots.entries.count"] = this._gkConfigMergeSnapshots.size;
|
|
155
|
+
return usage;
|
|
156
|
+
}
|
|
157
|
+
get bestRemotes() {
|
|
158
|
+
return this._caches.bestRemotes ??= new PromiseMap();
|
|
159
|
+
}
|
|
160
|
+
get blame() {
|
|
161
|
+
return this._caches.blame ??= new RepoPromiseCacheMap({
|
|
162
|
+
createTTL: 6e5,
|
|
163
|
+
capacity: 50
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
get diff() {
|
|
167
|
+
return this._caches.diff ??= new RepoPromiseCacheMap({
|
|
168
|
+
createTTL: 6e5,
|
|
169
|
+
capacity: 50
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
get fileLog() {
|
|
173
|
+
return this._caches.fileLog ??= new RepoPromiseCacheMap({
|
|
174
|
+
createTTL: 6e5,
|
|
175
|
+
capacity: 50
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
get baseBranchName() {
|
|
179
|
+
return this._caches.baseBranchName ??= new RepoPromiseCacheMap();
|
|
180
|
+
}
|
|
181
|
+
get branch() {
|
|
182
|
+
return this._caches.branch ??= new PromiseMap();
|
|
183
|
+
}
|
|
184
|
+
get branchMergedStatus() {
|
|
185
|
+
return this._caches.branchMergedStatus ??= new RepoPromiseCacheMap({
|
|
186
|
+
createTTL: 18e5,
|
|
187
|
+
accessTTL: 36e5,
|
|
188
|
+
capacity: 100
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
get branchMetadataMap() {
|
|
192
|
+
return this._caches.branchMetadataMap ??= new PromiseMap();
|
|
193
|
+
}
|
|
194
|
+
get branchOverviews() {
|
|
195
|
+
return this._caches.branchOverviews ??= new RepoPromiseCacheMap({ accessTTL: 36e5 });
|
|
196
|
+
}
|
|
197
|
+
get branches() {
|
|
198
|
+
return this._caches.branches ??= new PromiseMap();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Internal cache for raw shared branch data (keyed by commonPath)
|
|
202
|
+
* Separate from branches cache because branches need to be mapped for each worktree
|
|
203
|
+
*/
|
|
204
|
+
get sharedBranches() {
|
|
205
|
+
return this._caches.sharedBranches ??= new PromiseMap();
|
|
206
|
+
}
|
|
207
|
+
get configKeys() {
|
|
208
|
+
return this._caches.configKeys ??= new RepoPromiseCacheMap({ createTTL: 3e4 });
|
|
209
|
+
}
|
|
210
|
+
get configPatterns() {
|
|
211
|
+
return this._caches.configPatterns ??= new RepoPromiseCacheMap({ createTTL: 3e4 });
|
|
212
|
+
}
|
|
213
|
+
get gkConfigMap() {
|
|
214
|
+
return this._caches.gkConfigMap ??= new PromiseMap();
|
|
215
|
+
}
|
|
216
|
+
get currentBranchReference() {
|
|
217
|
+
return this._caches.currentBranchReference ??= new PromiseCache();
|
|
218
|
+
}
|
|
219
|
+
setCurrentBranchReferenceIfAbsent(worktreePath, reference) {
|
|
220
|
+
if (this.currentBranchReference.get(worktreePath) == null) this.currentBranchReference.set(worktreePath, Promise.resolve(reference));
|
|
221
|
+
}
|
|
222
|
+
get conflictDetection() {
|
|
223
|
+
return this._caches.conflictDetection ??= new RepoPromiseCacheMap({ createTTL: 3e4 });
|
|
224
|
+
}
|
|
225
|
+
get contributors() {
|
|
226
|
+
return this._caches.contributors ??= new RepoPromiseCacheMap({ accessTTL: 36e5 });
|
|
227
|
+
}
|
|
228
|
+
get contributorsLite() {
|
|
229
|
+
return this._caches.contributorsLite ??= new RepoPromiseCacheMap({ accessTTL: 36e5 });
|
|
230
|
+
}
|
|
231
|
+
get contributorsStats() {
|
|
232
|
+
return this._caches.contributorsStats ??= new RepoPromiseCacheMap({ accessTTL: 36e5 });
|
|
233
|
+
}
|
|
234
|
+
get currentUser() {
|
|
235
|
+
return this._caches.currentUser ??= /* @__PURE__ */ new Map();
|
|
236
|
+
}
|
|
237
|
+
get defaultBranchName() {
|
|
238
|
+
return this._caches.defaultBranchName ??= new RepoPromiseCacheMap();
|
|
239
|
+
}
|
|
240
|
+
get gitDir() {
|
|
241
|
+
return this._caches.gitDir ??= /* @__PURE__ */ new Map();
|
|
242
|
+
}
|
|
243
|
+
get gitIgnore() {
|
|
244
|
+
return this._caches.gitIgnore ??= /* @__PURE__ */ new Map();
|
|
245
|
+
}
|
|
246
|
+
get gitResults() {
|
|
247
|
+
return this._caches.gitResults ??= new RepoPromiseCacheMap({ capacity: 200 });
|
|
248
|
+
}
|
|
249
|
+
get initialCommitSha() {
|
|
250
|
+
return this._caches.initialCommitSha ??= new PromiseMap();
|
|
251
|
+
}
|
|
252
|
+
get lastFetched() {
|
|
253
|
+
return this._caches.lastFetched ??= new PromiseCache({ createTTL: 3e4 });
|
|
254
|
+
}
|
|
255
|
+
get leftRightCommitCount() {
|
|
256
|
+
return this._caches.leftRightCommitCount ??= new RepoPromiseCacheMap({
|
|
257
|
+
createTTL: 3e5,
|
|
258
|
+
capacity: 50
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
get commit() {
|
|
262
|
+
return this._caches.commit ??= new RepoPromiseCacheMap({
|
|
263
|
+
accessTTL: 36e5,
|
|
264
|
+
capacity: 100
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
get commitCount() {
|
|
268
|
+
return this._caches.commitCount ??= new RepoPromiseCacheMap({
|
|
269
|
+
accessTTL: 36e5,
|
|
270
|
+
capacity: 50
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
get mergeBase() {
|
|
274
|
+
return this._caches.mergeBase ??= new RepoPromiseCacheMap({
|
|
275
|
+
accessTTL: 36e5,
|
|
276
|
+
capacity: 50
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
get logShas() {
|
|
280
|
+
return this._caches.logShas ??= new RepoPromiseCacheMap({
|
|
281
|
+
createTTL: 3e5,
|
|
282
|
+
accessTTL: 3e4,
|
|
283
|
+
capacity: 5
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
get pausedOperationStatus() {
|
|
287
|
+
return this._caches.pausedOperationStatus ??= new PromiseMap();
|
|
288
|
+
}
|
|
289
|
+
get resolvedRevisions() {
|
|
290
|
+
return this._caches.resolvedRevisions ??= new RepoPromiseCacheMap({ capacity: 100 });
|
|
291
|
+
}
|
|
292
|
+
get refs() {
|
|
293
|
+
return this._caches.refs ??= new PromiseMap();
|
|
294
|
+
}
|
|
295
|
+
get refTips() {
|
|
296
|
+
return this._caches.refTips ??= new PromiseMap();
|
|
297
|
+
}
|
|
298
|
+
get reachability() {
|
|
299
|
+
return this._caches.reachability ??= new RepoPromiseCacheMap({
|
|
300
|
+
accessTTL: 36e5,
|
|
301
|
+
capacity: 25
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
get remotes() {
|
|
305
|
+
return this._caches.remotes ??= new PromiseMap();
|
|
306
|
+
}
|
|
307
|
+
get stashes() {
|
|
308
|
+
return this._caches.stashes ??= new RepoPromiseCacheMap({ accessTTL: 36e5 });
|
|
309
|
+
}
|
|
310
|
+
get tags() {
|
|
311
|
+
return this._caches.tags ??= new PromiseMap();
|
|
312
|
+
}
|
|
313
|
+
get fileExistence() {
|
|
314
|
+
return this._caches.fileExistence ??= new RepoPromiseCacheMap({
|
|
315
|
+
createTTL: 1e4,
|
|
316
|
+
capacity: 100,
|
|
317
|
+
expireOnError: true
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
get ignoreRevsFile() {
|
|
321
|
+
return this._caches.ignoreRevsFile ??= new PromiseCache({
|
|
322
|
+
accessTTL: 72e5,
|
|
323
|
+
expireOnError: true
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
get trackedPaths() {
|
|
327
|
+
return this._caches.trackedPaths ??= new RepoPromiseCacheMap({
|
|
328
|
+
createTTL: 6e4,
|
|
329
|
+
accessTTL: 3e4,
|
|
330
|
+
capacity: 200
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
get worktrees() {
|
|
334
|
+
return this._caches.worktrees ??= new PromiseMap();
|
|
335
|
+
}
|
|
336
|
+
clearCaches(repoPath, ...types) {
|
|
337
|
+
const keysToClear = /* @__PURE__ */ new Set();
|
|
338
|
+
if (!types.length) {
|
|
339
|
+
for (const key of Object.keys(this._caches)) keysToClear.add(key);
|
|
340
|
+
invalidateMemoized("providers");
|
|
341
|
+
this.incrementStatusGenerations(repoPath);
|
|
342
|
+
} else {
|
|
343
|
+
if (types.includes("blame")) keysToClear.add("blame");
|
|
344
|
+
if (types.includes("diff")) keysToClear.add("diff");
|
|
345
|
+
if (types.includes("fileLog")) keysToClear.add("fileLog");
|
|
346
|
+
if (types.includes("branch") || types.includes("branches")) {
|
|
347
|
+
keysToClear.add("branch");
|
|
348
|
+
keysToClear.add("branchOverviews");
|
|
349
|
+
keysToClear.add("commit");
|
|
350
|
+
keysToClear.add("commitCount");
|
|
351
|
+
keysToClear.add("conflictDetection");
|
|
352
|
+
keysToClear.add("currentBranchReference");
|
|
353
|
+
keysToClear.add("leftRightCommitCount");
|
|
354
|
+
keysToClear.add("mergeBase");
|
|
355
|
+
keysToClear.add("reachability");
|
|
356
|
+
keysToClear.add("resolvedRevisions");
|
|
357
|
+
}
|
|
358
|
+
if (types.includes("branch")) keysToClear.add("baseBranchName");
|
|
359
|
+
if (types.includes("branches")) {
|
|
360
|
+
keysToClear.add("branchMetadataMap");
|
|
361
|
+
keysToClear.add("branches");
|
|
362
|
+
keysToClear.add("sharedBranches");
|
|
363
|
+
keysToClear.add("defaultBranchName");
|
|
364
|
+
keysToClear.add("initialCommitSha");
|
|
365
|
+
keysToClear.add("logShas");
|
|
366
|
+
keysToClear.add("refs");
|
|
367
|
+
keysToClear.add("refTips");
|
|
368
|
+
}
|
|
369
|
+
if (types.includes("config")) {
|
|
370
|
+
keysToClear.add("baseBranchName");
|
|
371
|
+
keysToClear.add("configKeys");
|
|
372
|
+
keysToClear.add("configPatterns");
|
|
373
|
+
keysToClear.add("currentBranchReference");
|
|
374
|
+
keysToClear.add("currentUser");
|
|
375
|
+
}
|
|
376
|
+
if (types.includes("contributors")) {
|
|
377
|
+
keysToClear.add("branchOverviews");
|
|
378
|
+
keysToClear.add("contributors");
|
|
379
|
+
keysToClear.add("contributorsLite");
|
|
380
|
+
keysToClear.add("contributorsStats");
|
|
381
|
+
}
|
|
382
|
+
if (types.includes("gitignore")) keysToClear.add("gitIgnore");
|
|
383
|
+
if (types.includes("gkConfig")) {
|
|
384
|
+
keysToClear.add("gkConfigMap");
|
|
385
|
+
keysToClear.add("baseBranchName");
|
|
386
|
+
keysToClear.add("branchOverviews");
|
|
387
|
+
}
|
|
388
|
+
if (types.includes("lastFetched")) keysToClear.add("lastFetched");
|
|
389
|
+
if (types.includes("providers")) {
|
|
390
|
+
keysToClear.add("remotes");
|
|
391
|
+
keysToClear.add("bestRemotes");
|
|
392
|
+
invalidateMemoized("providers");
|
|
393
|
+
}
|
|
394
|
+
if (types.includes("remotes")) {
|
|
395
|
+
keysToClear.add("remotes");
|
|
396
|
+
keysToClear.add("bestRemotes");
|
|
397
|
+
keysToClear.add("defaultBranchName");
|
|
398
|
+
}
|
|
399
|
+
if (types.includes("stashes")) keysToClear.add("stashes");
|
|
400
|
+
if (types.includes("status")) {
|
|
401
|
+
keysToClear.add("pausedOperationStatus");
|
|
402
|
+
this.incrementStatusGenerations(repoPath);
|
|
403
|
+
}
|
|
404
|
+
if (types.includes("tags")) {
|
|
405
|
+
keysToClear.add("tags");
|
|
406
|
+
keysToClear.add("refs");
|
|
407
|
+
keysToClear.add("refTips");
|
|
408
|
+
keysToClear.add("commit");
|
|
409
|
+
keysToClear.add("commitCount");
|
|
410
|
+
}
|
|
411
|
+
if (types.includes("tracking")) {
|
|
412
|
+
keysToClear.add("fileExistence");
|
|
413
|
+
keysToClear.add("trackedPaths");
|
|
414
|
+
}
|
|
415
|
+
if (types.includes("worktrees")) keysToClear.add("worktrees");
|
|
416
|
+
if (types.some((t) => t !== "gitignore" && t !== "gkConfig" && t !== "providers")) keysToClear.add("gitResults");
|
|
417
|
+
}
|
|
418
|
+
for (const key of keysToClear) {
|
|
419
|
+
const cache = this._caches[key];
|
|
420
|
+
if (cache == null) continue;
|
|
421
|
+
if (repoPath == null) cache.clear();
|
|
422
|
+
else if (sharedCacheKeys.has(key)) this.evictShared(key, repoPath);
|
|
423
|
+
else cache.delete(repoPath);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Evicts a single shared (commonPath-keyed) cache entry for `repoPath` and its sibling worktrees.
|
|
428
|
+
* Prefers `invalidate` where supported so in-flight work is shared across new callers and
|
|
429
|
+
* self-evicts on settle rather than spawning a duplicate factory. `invalidate` does the right
|
|
430
|
+
* thing per-entry: entries with a `CacheController` (created via `getOrCreate`) are marked
|
|
431
|
+
* invalidated; entries without one (created via plain `.set()`, e.g. per-worktree mapper results)
|
|
432
|
+
* are hard-deleted. Caches that don't support `invalidate` fall back to `delete`.
|
|
433
|
+
*/
|
|
434
|
+
evictShared(key, repoPath) {
|
|
435
|
+
const cache = this._caches[key];
|
|
436
|
+
if (cache == null) return;
|
|
437
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
438
|
+
const invalidate = cache.invalidate;
|
|
439
|
+
if (typeof invalidate === "function") {
|
|
440
|
+
invalidate.call(cache, commonPath);
|
|
441
|
+
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
442
|
+
if (worktreePath === commonPath) continue;
|
|
443
|
+
invalidate.call(cache, worktreePath);
|
|
444
|
+
}
|
|
445
|
+
} else {
|
|
446
|
+
cache.delete(commonPath);
|
|
447
|
+
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
448
|
+
if (worktreePath === commonPath) continue;
|
|
449
|
+
cache.delete(worktreePath);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Monotonic per-worktree counter, advanced whenever anything that can change `git status` output is
|
|
455
|
+
* observed. `git status` and its siblings are point-in-time reads of mutable state, so deduplicating them
|
|
456
|
+
* on repoPath alone is unsound — a run that started before a commit would satisfy a caller that arrived
|
|
457
|
+
* after it. Callers stamp their in-flight run with the generation it started in and refuse older joins.
|
|
458
|
+
* Kept per exact worktree path (never spread to the common path) and advanced on `unregisterRepoPath` so a
|
|
459
|
+
* read in flight from a prior registration can't be joined after a reopen.
|
|
460
|
+
*
|
|
461
|
+
* Note: a run that never settles wedges only its own generation's callers (a newer generation gets a fresh
|
|
462
|
+
* key). `git.run` recovers via its per-command timeout (default 60s); a hung `git.stream` is caught by the
|
|
463
|
+
* status provider's `raceWithTimeout` backstop (scaled to `advanced.git.timeout`; see
|
|
464
|
+
* `dedupeByStatusGeneration`), which rejects a wedged read so waiters unblock and a later caller retries.
|
|
465
|
+
*/
|
|
466
|
+
getStatusGeneration(repoPath) {
|
|
467
|
+
return this._statusGenerations.get(repoPath) ?? 0;
|
|
468
|
+
}
|
|
469
|
+
/** Advances the status clock — see {@link getStatusGeneration}. */
|
|
470
|
+
incrementStatusGeneration(repoPath) {
|
|
471
|
+
this._statusGenerations.set(repoPath, this.getStatusGeneration(repoPath) + 1);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Working-tree changes ride their own channel (`Repository.onDidChangeWorkingTree`), not
|
|
475
|
+
* `onRepositoryChanged` — an external `git restore <file>` may touch no `.git` path we classify — so
|
|
476
|
+
* they have to advance the status clock separately or a discard would never invalidate an in-flight read.
|
|
477
|
+
*/
|
|
478
|
+
onWorkingTreeChanged(repoPath) {
|
|
479
|
+
this.incrementStatusGeneration(repoPath);
|
|
480
|
+
}
|
|
481
|
+
/** Advances the status clock for one worktree, or for every known worktree when `repoPath` is undefined. */
|
|
482
|
+
incrementStatusGenerations(repoPath) {
|
|
483
|
+
if (repoPath != null) {
|
|
484
|
+
this.incrementStatusGeneration(repoPath);
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
const paths = /* @__PURE__ */ new Set([...this._commonPathRegistry.keys(), ...this._statusGenerations.keys()]);
|
|
488
|
+
for (const path of paths) this.incrementStatusGeneration(path);
|
|
489
|
+
}
|
|
490
|
+
getCommonPath(repoPath) {
|
|
491
|
+
return this._commonPathRegistry.get(repoPath) ?? repoPath;
|
|
492
|
+
}
|
|
493
|
+
getWorktreePaths(commonPath) {
|
|
494
|
+
const worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
495
|
+
return worktrees != null ? [...worktrees] : [];
|
|
496
|
+
}
|
|
497
|
+
isWorktree(repoPath) {
|
|
498
|
+
const commonPath = this._commonPathRegistry.get(repoPath);
|
|
499
|
+
return commonPath != null && commonPath !== repoPath;
|
|
500
|
+
}
|
|
501
|
+
/** Whether `repoPath` is currently registered (via {@link registerRepoPath}, not yet unregistered). */
|
|
502
|
+
isRegistered(repoPath) {
|
|
503
|
+
return this._commonPathRegistry.has(repoPath);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Monotonic per-path counter advanced whenever `repoPath` is unregistered (repo closed, worktree
|
|
507
|
+
* removed). Lets an async post-read step — e.g. the gk-config reconcile — detect that its target was
|
|
508
|
+
* closed (and possibly reopened) mid-flight and bail. Unlike an `isRegistered` check it doesn't
|
|
509
|
+
* require the caller to have registered in the first place, so it stays correct for consumers of
|
|
510
|
+
* this package that don't wire up the host's repo lifecycle.
|
|
511
|
+
*/
|
|
512
|
+
getCloseGeneration(repoPath) {
|
|
513
|
+
return this._closeGenerations.get(repoPath) ?? 0;
|
|
514
|
+
}
|
|
515
|
+
/** Clears file-scoped caches (blame, diff, fileLog) for a specific path within a repo */
|
|
516
|
+
clearForPath(repoPath, path, ...types) {
|
|
517
|
+
const prefix = `${normalizePath(path)}:`;
|
|
518
|
+
if (!types.length || types.includes("blame")) this._caches.blame?.deleteByKeyPrefix(repoPath, prefix);
|
|
519
|
+
if (!types.length || types.includes("diff")) this._caches.diff?.deleteByKeyPrefix(repoPath, prefix);
|
|
520
|
+
if (!types.length || types.includes("fileLog")) this._caches.fileLog?.deleteByKeyPrefix(repoPath, prefix);
|
|
521
|
+
}
|
|
522
|
+
registerRepoPath(repoPath, gitDir) {
|
|
523
|
+
const normalizedPath = getRepositoryOrWorktreePath(repoPath);
|
|
524
|
+
const commonPath = gitDir.commonUri != null ? getCommonRepositoryPath(gitDir.commonUri) : normalizedPath;
|
|
525
|
+
this._commonPathRegistry.set(normalizedPath, commonPath);
|
|
526
|
+
let worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
527
|
+
if (worktrees == null) {
|
|
528
|
+
worktrees = /* @__PURE__ */ new Set();
|
|
529
|
+
this._worktreesByCommonPath.set(commonPath, worktrees);
|
|
530
|
+
}
|
|
531
|
+
worktrees.add(normalizedPath);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Symmetric companion to `registerRepoPath`. Clears cache entries specific to `repoPath`
|
|
535
|
+
* and removes the path from the registry.
|
|
536
|
+
*
|
|
537
|
+
* Call this when a worktree is deleted or a repo is closed so stale registry entries
|
|
538
|
+
* and derived cache entries don't persist.
|
|
539
|
+
*
|
|
540
|
+
* Targeted — does NOT cascade to sibling worktrees sharing the same commonPath. The
|
|
541
|
+
* shared commonPath entry in each shared cache is only evicted when unregistering the
|
|
542
|
+
* last remaining worktree for that commonPath (otherwise siblings still depend on it).
|
|
543
|
+
*
|
|
544
|
+
* Uses soft-invalidate where supported so any in-flight factory/mapper keeps its abort
|
|
545
|
+
* wiring intact — a caller whose signal aborts after unregister can still propagate
|
|
546
|
+
* cancellation into the underlying work rather than leaving it orphaned. Controller-backed
|
|
547
|
+
* entries self-evict on settle; plain `.set()`-based entries hard-delete immediately.
|
|
548
|
+
*
|
|
549
|
+
* Cache eviction is a no-op if `repoPath` is not registered, but the status clock is advanced
|
|
550
|
+
* unconditionally (a fresh registration must not let a post-reopen read join a pre-close one).
|
|
551
|
+
*/
|
|
552
|
+
unregisterRepoPath(repoPath) {
|
|
553
|
+
this.incrementStatusGeneration(repoPath);
|
|
554
|
+
this._closeGenerations.set(repoPath, this.getCloseGeneration(repoPath) + 1);
|
|
555
|
+
const commonPath = this._commonPathRegistry.get(repoPath) ?? repoPath;
|
|
556
|
+
const worktrees = this._worktreesByCommonPath.get(commonPath);
|
|
557
|
+
const isLastWorktree = worktrees == null || worktrees.size <= 1;
|
|
558
|
+
for (const key of Object.keys(this._caches)) {
|
|
559
|
+
const cache = this._caches[key];
|
|
560
|
+
if (cache == null) continue;
|
|
561
|
+
const invalidate = cache.invalidate;
|
|
562
|
+
const evict = typeof invalidate === "function" ? (k) => invalidate.call(cache, k) : (k) => cache.delete(k);
|
|
563
|
+
if (sharedCacheKeys.has(key)) {
|
|
564
|
+
if (repoPath !== commonPath) evict(repoPath);
|
|
565
|
+
if (isLastWorktree) evict(commonPath);
|
|
566
|
+
} else evict(repoPath);
|
|
567
|
+
}
|
|
568
|
+
if (isLastWorktree) this._gkConfigMergeSnapshots.delete(commonPath);
|
|
569
|
+
this._commonPathRegistry.delete(repoPath);
|
|
570
|
+
if (worktrees != null) {
|
|
571
|
+
worktrees.delete(repoPath);
|
|
572
|
+
if (worktrees.size === 0) this._worktreesByCommonPath.delete(commonPath);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
reset() {
|
|
576
|
+
for (const path of /* @__PURE__ */ new Set([...this._commonPathRegistry.keys(), ...this._closeGenerations.keys()])) this._closeGenerations.set(path, this.getCloseGeneration(path) + 1);
|
|
577
|
+
this._commonPathRegistry.clear();
|
|
578
|
+
this._worktreesByCommonPath.clear();
|
|
579
|
+
this._statusGenerations.clear();
|
|
580
|
+
this._gkConfigMergeSnapshots.clear();
|
|
581
|
+
this._gkConfigReconciler = void 0;
|
|
582
|
+
this._caches = createEmptyCaches();
|
|
583
|
+
}
|
|
584
|
+
onRepositoryChanged(repoPath, changes) {
|
|
585
|
+
const changesSet = new Set(changes);
|
|
586
|
+
const hasAny = (...c) => c.some((ch) => changesSet.has(ch));
|
|
587
|
+
if (hasAny("unknown", "closed")) {
|
|
588
|
+
this.unregisterRepoPath(repoPath);
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
if (hasAny("index", "head", "heads", "remotes", "ignores", "config")) this.incrementStatusGeneration(repoPath);
|
|
592
|
+
const types = /* @__PURE__ */ new Set();
|
|
593
|
+
if (hasAny("head")) types.add("branch");
|
|
594
|
+
if (hasAny("index", "heads", "pausedOp")) {
|
|
595
|
+
types.add("blame");
|
|
596
|
+
types.add("diff");
|
|
597
|
+
types.add("fileLog");
|
|
598
|
+
}
|
|
599
|
+
if (hasAny("index")) types.add("tracking");
|
|
600
|
+
if (hasAny("config")) types.add("config");
|
|
601
|
+
if (hasAny("heads")) {
|
|
602
|
+
types.add("branches");
|
|
603
|
+
types.add("contributors");
|
|
604
|
+
types.add("worktrees");
|
|
605
|
+
}
|
|
606
|
+
if (hasAny("remotes")) {
|
|
607
|
+
types.add("branches");
|
|
608
|
+
types.add("contributors");
|
|
609
|
+
types.add("remotes");
|
|
610
|
+
types.add("worktrees");
|
|
611
|
+
}
|
|
612
|
+
if (hasAny("ignores")) types.add("gitignore");
|
|
613
|
+
if (hasAny("gkConfig")) this.handleGkConfigChanged(repoPath);
|
|
614
|
+
if (hasAny("lastFetched")) types.add("lastFetched");
|
|
615
|
+
if (hasAny("remoteProviders")) types.add("providers");
|
|
616
|
+
if (hasAny("cherryPick", "merge", "rebase", "revert", "pausedOp")) {
|
|
617
|
+
types.add("branch");
|
|
618
|
+
types.add("status");
|
|
619
|
+
}
|
|
620
|
+
if (hasAny("stash")) types.add("stashes");
|
|
621
|
+
if (hasAny("tags")) types.add("tags");
|
|
622
|
+
if (hasAny("worktrees")) types.add("worktrees");
|
|
623
|
+
if (types.size) this.clearCaches(repoPath, ...types);
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Handles a watcher-observed `'gkConfig'` change. Always evicts the cached bulk map (forcing the
|
|
627
|
+
* next read to hit disk). If a reconciler is registered (see {@link setGkConfigReconciler}),
|
|
628
|
+
* defers to it instead of coarsely clearing `baseBranchName`/`branchOverviews` — it re-reads the
|
|
629
|
+
* map and diffs it against the snapshot captured here (i.e. as it stood right before this change),
|
|
630
|
+
* cascading only the refs whose merge-relevant keys actually changed. Falls back to the coarse
|
|
631
|
+
* clear when no reconciler is registered (e.g. the GitHub provider) so nothing can go stale.
|
|
632
|
+
*/
|
|
633
|
+
handleGkConfigChanged(repoPath) {
|
|
634
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
635
|
+
this._caches.gkConfigMap?.delete(commonPath);
|
|
636
|
+
if (this._gkConfigReconciler == null) {
|
|
637
|
+
this.clearCaches(repoPath, "gkConfig");
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
const priorSnapshot = this._gkConfigMergeSnapshots.get(commonPath);
|
|
641
|
+
Promise.resolve(this._gkConfigReconciler(repoPath, priorSnapshot)).then((outcome) => {
|
|
642
|
+
if (outcome === "failed") this.clearCaches(repoPath, "gkConfig");
|
|
643
|
+
}, () => this.clearCaches(repoPath, "gkConfig"));
|
|
644
|
+
}
|
|
645
|
+
/** Hard-evicts the cached bulk `.git/gk/config` map so the next read hits disk. */
|
|
646
|
+
deleteGkConfigMap(repoPath) {
|
|
647
|
+
this._caches.gkConfigMap?.delete(this.getCommonPath(repoPath));
|
|
648
|
+
}
|
|
649
|
+
/** The merge-relevant gk config snapshot currently serving as the reconcile baseline. */
|
|
650
|
+
getGkConfigMergeSnapshot(repoPath) {
|
|
651
|
+
return this._gkConfigMergeSnapshots.get(this.getCommonPath(repoPath));
|
|
652
|
+
}
|
|
653
|
+
getBranches(repoPath, factory, mapper, cancellation) {
|
|
654
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
655
|
+
const registration = this.sharedBranches.getOrCreate(commonPath, (cacheable, signal) => {
|
|
656
|
+
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
657
|
+
p.finally(() => {
|
|
658
|
+
if (cacheable.invalidated) {
|
|
659
|
+
this.branches.invalidate(commonPath);
|
|
660
|
+
for (const worktreePath of this.getWorktreePaths(commonPath)) this.branches.invalidate(worktreePath);
|
|
661
|
+
}
|
|
662
|
+
}).catch(() => {});
|
|
663
|
+
return p;
|
|
664
|
+
}, cancellation);
|
|
665
|
+
registration.catch(() => {});
|
|
666
|
+
return this.branches.getOrCreate(repoPath, (_cacheable, mapperSignal) => {
|
|
667
|
+
const rawShared = this.sharedBranches.get(commonPath) ?? registration;
|
|
668
|
+
return Promise.resolve(rawShared).then((shared) => mapper(shared, repoPath, commonPath, mapperSignal));
|
|
669
|
+
}, cancellation);
|
|
670
|
+
}
|
|
671
|
+
static globalConfigKey = "";
|
|
672
|
+
getConfig(repoPath, key, factory) {
|
|
673
|
+
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
674
|
+
const result = this.configKeys.get(cacheKey, key);
|
|
675
|
+
if (result != null) return result;
|
|
676
|
+
const factoryPromise = Promise.resolve(factory());
|
|
677
|
+
this.configKeys.set(cacheKey, key, factoryPromise);
|
|
678
|
+
return factoryPromise;
|
|
679
|
+
}
|
|
680
|
+
getConfigRegex(repoPath, pattern, factory) {
|
|
681
|
+
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
682
|
+
const result = this.configPatterns.get(cacheKey, pattern);
|
|
683
|
+
if (result != null) return result;
|
|
684
|
+
const factoryPromise = Promise.resolve(factory());
|
|
685
|
+
this.configPatterns.set(cacheKey, pattern, factoryPromise);
|
|
686
|
+
return factoryPromise;
|
|
687
|
+
}
|
|
688
|
+
deleteConfig(repoPath, key) {
|
|
689
|
+
const cacheKey = repoPath != null ? this.getCommonPath(repoPath) : Cache.globalConfigKey;
|
|
690
|
+
this._caches.configKeys?.delete(cacheKey, key);
|
|
691
|
+
this._caches.configPatterns?.delete(cacheKey);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* The whole `.git/gk/config` is read once and cached as a single map per commonPath; per-key and
|
|
695
|
+
* per-namespace gk lookups are served from it in-memory (see `getGkConfigMap` in the CLI config
|
|
696
|
+
* sub-provider). Invalidated by `deleteGkConfig` (write) and, on a watcher `'gkConfig'` event, by
|
|
697
|
+
* `handleGkConfigChanged` (reconciled precisely when a reconciler is registered, or the coarse
|
|
698
|
+
* clear otherwise). The first fresh read seeds the merge-relevant snapshot used by
|
|
699
|
+
* `reconcileGkConfigMap`; later refreshes of that snapshot are owned by the reconcile itself.
|
|
700
|
+
*/
|
|
701
|
+
getGkConfigMap(repoPath, factory) {
|
|
702
|
+
return this.getSharedSimple(this.gkConfigMap, repoPath, async (commonPath, cacheable) => {
|
|
703
|
+
const map = await factory(cacheable);
|
|
704
|
+
if (!this._gkConfigMergeSnapshots.has(commonPath)) this._gkConfigMergeSnapshots.set(commonPath, this.extractMergeRelevantGkConfig(map));
|
|
705
|
+
return map;
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
/** Extracts the subset of a gk config map whose keys participate in the `branchOverviews`/`baseBranchName` lineage. */
|
|
709
|
+
extractMergeRelevantGkConfig(map) {
|
|
710
|
+
const subset = /* @__PURE__ */ new Map();
|
|
711
|
+
for (const [key, value] of map) if (branchOverviewGkConfigKeysRegex.test(key)) subset.set(key, value);
|
|
712
|
+
return subset;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Clears the cached `.git/gk/config` map and invalidates the derived caches
|
|
716
|
+
* (`baseBranchName`/`branchOverviews`) for the written key's ref.
|
|
717
|
+
*
|
|
718
|
+
* @param options.skipInvalidation Downstream caches the caller wants preserved despite this
|
|
719
|
+
* write. Use when the value being written is exactly what was just resolved — e.g. the Tier 2
|
|
720
|
+
* `storeMergeTargetBranchName` self-write inside `getBranchContributionsOverview` (skip
|
|
721
|
+
* `'branchOverviews'`) or the Tier 3 `storeBaseBranchName` self-write inside `getBaseBranchName`
|
|
722
|
+
* (skip both `'baseBranchName'` and `'branchOverviews'`). The bulk `gkConfigMap` map always
|
|
723
|
+
* invalidates so subsequent reads see the new value.
|
|
724
|
+
*/
|
|
725
|
+
deleteGkConfig(repoPath, key, options) {
|
|
726
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
727
|
+
this._caches.gkConfigMap?.delete(commonPath);
|
|
728
|
+
this.cascadeGkConfigKeyChange(commonPath, key, options?.skipInvalidation);
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Keeps the merge-relevant gk config snapshot in sync with OUR OWN writes, so the next
|
|
732
|
+
* watcher-triggered `reconcileGkConfigMap` diffs a self-write as unchanged rather than as an
|
|
733
|
+
* external change (which would otherwise defeat `skipInvalidation`). No-ops for keys outside the
|
|
734
|
+
* merge-relevant subset, and if no snapshot exists yet for this repo — nothing to keep in sync;
|
|
735
|
+
* the next real read (`getGkConfigMap`) populates one from scratch.
|
|
736
|
+
*/
|
|
737
|
+
recordGkConfigWrite(repoPath, key, value) {
|
|
738
|
+
if (!branchOverviewGkConfigKeysRegex.test(key)) return;
|
|
739
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
740
|
+
const snapshot = this._gkConfigMergeSnapshots.get(commonPath);
|
|
741
|
+
if (snapshot == null) return;
|
|
742
|
+
const next = new Map(snapshot);
|
|
743
|
+
if (value == null) next.delete(key);
|
|
744
|
+
else next.set(key, value);
|
|
745
|
+
this._gkConfigMergeSnapshots.set(commonPath, next);
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Registers the reconciler invoked by {@link handleGkConfigChanged} on a watcher-observed
|
|
749
|
+
* `'gkConfig'` change. Only one reconciler is kept — later registrations replace earlier ones,
|
|
750
|
+
* which is harmless since every CLI config sub-provider sharing this `Cache` reconciles the same
|
|
751
|
+
* underlying `.git/gk/config` file identically.
|
|
752
|
+
*/
|
|
753
|
+
setGkConfigReconciler(reconciler) {
|
|
754
|
+
this._gkConfigReconciler = reconciler;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Diffs a freshly-read gk config map's merge-relevant subset against `priorSnapshot` (captured by
|
|
758
|
+
* `handleGkConfigChanged` before the reconcile started, so it reflects the pre-change state even
|
|
759
|
+
* though this call's own re-read already raced ahead and refreshed the live snapshot), cascading
|
|
760
|
+
* `baseBranchName`/`branchOverviews` for every ref whose merge-relevant key actually changed.
|
|
761
|
+
* `priorSnapshot` of `undefined` (never observed before this reconcile) is treated as "everything
|
|
762
|
+
* may have changed" — a full coarse clear, same as the pre-existing watcher behavior. Returns
|
|
763
|
+
* whether anything changed (i.e. whether a follow-up repository-changed event is warranted).
|
|
764
|
+
*/
|
|
765
|
+
reconcileGkConfigMap(repoPath, priorSnapshot, freshMap) {
|
|
766
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
767
|
+
const newSubset = this.extractMergeRelevantGkConfig(freshMap);
|
|
768
|
+
this._gkConfigMergeSnapshots.set(commonPath, newSubset);
|
|
769
|
+
if (priorSnapshot == null) {
|
|
770
|
+
this.evictShared("baseBranchName", repoPath);
|
|
771
|
+
this.evictShared("branchOverviews", repoPath);
|
|
772
|
+
return true;
|
|
773
|
+
}
|
|
774
|
+
let changed = false;
|
|
775
|
+
for (const key of /* @__PURE__ */ new Set([...priorSnapshot.keys(), ...newSubset.keys()])) if (priorSnapshot.get(key) !== newSubset.get(key)) {
|
|
776
|
+
changed = true;
|
|
777
|
+
this.cascadeGkConfigKeyChange(commonPath, key);
|
|
778
|
+
}
|
|
779
|
+
return changed;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Shared per-ref cascade for a changed `branch.<ref>.gk-...` key: invalidates `baseBranchName` (for
|
|
783
|
+
* `gk-merge-base`) and `branchOverviews` (for any merge-relevant key), honoring `skipInvalidation`.
|
|
784
|
+
* Used by both a direct write (`deleteGkConfig`) and a reconciled external change
|
|
785
|
+
* (`reconcileGkConfigMap`). No-ops for keys outside the merge-relevant subset.
|
|
786
|
+
*/
|
|
787
|
+
cascadeGkConfigKeyChange(commonPath, key, skip) {
|
|
788
|
+
const refMatch = key.match(branchOverviewGkConfigKeysRegex);
|
|
789
|
+
if (refMatch == null) return;
|
|
790
|
+
const ref = refMatch[1];
|
|
791
|
+
if (key.endsWith(".gk-merge-base") && !skip?.includes("baseBranchName")) this._caches.baseBranchName?.delete(commonPath, ref);
|
|
792
|
+
if (skip?.includes("branchOverviews")) return;
|
|
793
|
+
this._caches.branchOverviews?.invalidateByKeyPrefix(commonPath, `${ref}|`);
|
|
794
|
+
for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
795
|
+
if (worktreePath === commonPath) continue;
|
|
796
|
+
this._caches.branchOverviews?.invalidateByKeyPrefix(worktreePath, `${ref}|`);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
async getBranchOverview(repoPath, cacheKey, factory, options) {
|
|
800
|
+
return this.getSharedOrCreateWithKey(this.branchOverviews, repoPath, cacheKey, factory, (data, newRepoPath) => data == null ? data : {
|
|
801
|
+
...data,
|
|
802
|
+
repoPath: newRepoPath,
|
|
803
|
+
contributors: data.contributors.map((c) => c.withRepoPath(newRepoPath))
|
|
804
|
+
}, options);
|
|
805
|
+
}
|
|
806
|
+
async getContributors(repoPath, cacheKey, factory, options) {
|
|
807
|
+
return this.getSharedOrCreateWithKey(this.contributors, repoPath, cacheKey, factory, (data, newRepoPath) => ({
|
|
808
|
+
...data,
|
|
809
|
+
contributors: data.contributors.map((c) => c.withRepoPath(newRepoPath))
|
|
810
|
+
}), options);
|
|
811
|
+
}
|
|
812
|
+
async getContributorsLite(repoPath, cacheKey, factory, options) {
|
|
813
|
+
return this.getSharedOrCreateWithKey(this.contributorsLite, repoPath, cacheKey, factory, (data, newRepoPath) => data.map((c) => c.withRepoPath(newRepoPath)), options);
|
|
814
|
+
}
|
|
815
|
+
getContributorsStats(repoPath, cacheKey, factory, options) {
|
|
816
|
+
return this.getSharedSimpleWithKey(this.contributorsStats, repoPath, cacheKey, factory, options);
|
|
817
|
+
}
|
|
818
|
+
getBaseBranchName(repoPath, ref, factory, cancellation) {
|
|
819
|
+
return this.getSharedSimpleWithKey(this.baseBranchName, repoPath, ref, factory, {
|
|
820
|
+
createTTL: baseBranchNameTTL,
|
|
821
|
+
cancellation
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Clears the cached base branch for `ref`. Call from ops that create/rename/delete a branch — the
|
|
826
|
+
* `'branches'` cascade no longer clears these, since tip movement can't change a branch's base.
|
|
827
|
+
*
|
|
828
|
+
* Only clears the cache. A branch's base is *persisted* as `branch.<ref>.gk-merge-base` and read back
|
|
829
|
+
* before the reflog fallback, so an op that ends a branch's identity under a name must drop or move
|
|
830
|
+
* that key too (`removeGkConfigBranchSection`/`renameGkConfigBranchSection`) — otherwise the
|
|
831
|
+
* re-derivation this triggers just reads the stale value straight back.
|
|
832
|
+
*/
|
|
833
|
+
deleteBaseBranchName(repoPath, ref) {
|
|
834
|
+
this._caches.baseBranchName?.delete(this.getCommonPath(repoPath), ref);
|
|
835
|
+
}
|
|
836
|
+
getBranchMergedStatus(repoPath, cacheKey, factory, cancellation) {
|
|
837
|
+
return this.getSharedOrCreateWithKey(this.branchMergedStatus, repoPath, cacheKey, factory, (data, newRepoPath) => {
|
|
838
|
+
if (!data.merged) return data;
|
|
839
|
+
if (data.localBranchOnly == null) return data;
|
|
840
|
+
const lbo = data.localBranchOnly;
|
|
841
|
+
return {
|
|
842
|
+
...data,
|
|
843
|
+
localBranchOnly: createReference(lbo.ref, newRepoPath, {
|
|
844
|
+
id: getBranchId(newRepoPath, lbo.remote, lbo.name),
|
|
845
|
+
refType: "branch",
|
|
846
|
+
name: lbo.name,
|
|
847
|
+
remote: lbo.remote,
|
|
848
|
+
upstream: lbo.upstream,
|
|
849
|
+
sha: lbo.sha
|
|
850
|
+
})
|
|
851
|
+
};
|
|
852
|
+
}, { cancellation });
|
|
853
|
+
}
|
|
854
|
+
getBranchMetadataMap(repoPath, factory) {
|
|
855
|
+
return this.getSharedSimple(this.branchMetadataMap, repoPath, factory);
|
|
856
|
+
}
|
|
857
|
+
getDefaultBranchName(repoPath, remote, factory, cancellation) {
|
|
858
|
+
return this.getSharedSimpleWithKey(this.defaultBranchName, repoPath, remote, factory, { cancellation });
|
|
859
|
+
}
|
|
860
|
+
/** Clears the cached default branch for one `remote` key (the networked lookup or its `:local` variant). */
|
|
861
|
+
deleteDefaultBranchName(repoPath, remote) {
|
|
862
|
+
this._caches.defaultBranchName?.delete(this.getCommonPath(repoPath), remote);
|
|
863
|
+
}
|
|
864
|
+
getInitialCommitSha(repoPath, factory) {
|
|
865
|
+
return this.getSharedSimple(this.initialCommitSha, repoPath, factory);
|
|
866
|
+
}
|
|
867
|
+
getLastFetchedTimestamp(repoPath, factory) {
|
|
868
|
+
return this.getSharedSimple(this.lastFetched, repoPath, factory);
|
|
869
|
+
}
|
|
870
|
+
getRefs(repoPath, factory, cancellation) {
|
|
871
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
872
|
+
return this.refs.getOrCreate(commonPath, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), cancellation);
|
|
873
|
+
}
|
|
874
|
+
getRefTips(repoPath, factory, cancellation) {
|
|
875
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
876
|
+
return this.refTips.getOrCreate(commonPath, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), cancellation);
|
|
877
|
+
}
|
|
878
|
+
async getRemotes(repoPath, factory, cancellation) {
|
|
879
|
+
return this.getSharedOrCreate(this.remotes, repoPath, factory, (data, newRepoPath) => data.map((r) => r.withRepoPath(newRepoPath)), cancellation);
|
|
880
|
+
}
|
|
881
|
+
async getStash(repoPath, cacheKey, factory, options) {
|
|
882
|
+
return this.getSharedOrCreateWithKey(this.stashes, repoPath, cacheKey, factory, (data, newRepoPath) => ({
|
|
883
|
+
repoPath: newRepoPath,
|
|
884
|
+
stashes: new Map(Array.from(data.stashes.entries(), ([sha, s]) => [sha, s.withRepoPath(newRepoPath)]))
|
|
885
|
+
}), options);
|
|
886
|
+
}
|
|
887
|
+
async getTags(repoPath, factory, cancellation) {
|
|
888
|
+
return this.getSharedOrCreate(this.tags, repoPath, factory, (data, newRepoPath) => ({
|
|
889
|
+
...data,
|
|
890
|
+
values: data.values.map((t) => t.withRepoPath(newRepoPath))
|
|
891
|
+
}), cancellation);
|
|
892
|
+
}
|
|
893
|
+
async getWorktrees(repoPath, factory, cancellation) {
|
|
894
|
+
return this.getSharedOrCreate(this.worktrees, repoPath, factory, (data, newRepoPath) => data.map((w) => w.withRepoPath(newRepoPath)), cancellation);
|
|
895
|
+
}
|
|
896
|
+
async getSharedOrCreate(cache, repoPath, factory, mapper, cancellation) {
|
|
897
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
898
|
+
const sharedPromise = cache.getOrCreate(commonPath, (cacheable, signal) => {
|
|
899
|
+
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
900
|
+
p.finally(() => {
|
|
901
|
+
if (cacheable.invalidated) for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
902
|
+
if (worktreePath === commonPath) continue;
|
|
903
|
+
cache.invalidate(worktreePath);
|
|
904
|
+
}
|
|
905
|
+
}).catch(() => {});
|
|
906
|
+
return p;
|
|
907
|
+
}, cancellation);
|
|
908
|
+
sharedPromise.catch(() => {});
|
|
909
|
+
if (commonPath !== repoPath) {
|
|
910
|
+
const existing = cache.get(repoPath);
|
|
911
|
+
if (existing != null) return cancellation != null ? raceWithSignal(existing, cancellation) : existing;
|
|
912
|
+
const rawShared = cache.get(commonPath) ?? sharedPromise;
|
|
913
|
+
const mappedPromise = Promise.resolve(rawShared).then((data) => mapper(data, repoPath));
|
|
914
|
+
cache.set(repoPath, mappedPromise);
|
|
915
|
+
return cancellation != null ? raceWithSignal(mappedPromise, cancellation) : mappedPromise;
|
|
916
|
+
}
|
|
917
|
+
return sharedPromise;
|
|
918
|
+
}
|
|
919
|
+
async getSharedOrCreateWithKey(cache, repoPath, cacheKey, factory, mapper, options) {
|
|
920
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
921
|
+
const cancellation = options?.cancellation;
|
|
922
|
+
const sharedPromise = cache.getOrCreate(commonPath, cacheKey, (cacheable, signal) => {
|
|
923
|
+
const p = Promise.resolve(factory(commonPath, cacheable, signal));
|
|
924
|
+
p.finally(() => {
|
|
925
|
+
if (cacheable.invalidated) for (const worktreePath of this.getWorktreePaths(commonPath)) {
|
|
926
|
+
if (worktreePath === commonPath) continue;
|
|
927
|
+
cache.invalidate(worktreePath, cacheKey);
|
|
928
|
+
}
|
|
929
|
+
}).catch(() => {});
|
|
930
|
+
return p;
|
|
931
|
+
}, options);
|
|
932
|
+
sharedPromise.catch(() => {});
|
|
933
|
+
if (commonPath !== repoPath) {
|
|
934
|
+
const existing = cache.get(repoPath, cacheKey);
|
|
935
|
+
if (existing != null) return cancellation != null ? raceWithSignal(existing, cancellation) : existing;
|
|
936
|
+
const rawShared = cache.get(commonPath, cacheKey) ?? sharedPromise;
|
|
937
|
+
const mappedPromise = Promise.resolve(rawShared).then((data) => mapper(data, repoPath));
|
|
938
|
+
cache.set(repoPath, cacheKey, mappedPromise, options);
|
|
939
|
+
return cancellation != null ? raceWithSignal(mappedPromise, cancellation) : mappedPromise;
|
|
940
|
+
}
|
|
941
|
+
return sharedPromise;
|
|
942
|
+
}
|
|
943
|
+
async getSharedSimple(cache, repoPath, factory) {
|
|
944
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
945
|
+
if (cache instanceof PromiseCache) return cache.getOrCreate(commonPath, (cacheable) => Promise.resolve(factory(commonPath, cacheable)));
|
|
946
|
+
return cache.getOrCreate(commonPath, (cacheable) => Promise.resolve(factory(commonPath, cacheable)));
|
|
947
|
+
}
|
|
948
|
+
async getSharedSimpleWithKey(cache, repoPath, cacheKey, factory, options) {
|
|
949
|
+
const commonPath = this.getCommonPath(repoPath);
|
|
950
|
+
return cache.getOrCreate(commonPath, cacheKey, (cacheable, signal) => Promise.resolve(factory(commonPath, cacheable, signal)), options);
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
__decorate([debug({ onlyExit: true })], Cache.prototype, "clearCaches", null);
|
|
954
|
+
__decorate([debug({ onlyExit: true })], Cache.prototype, "unregisterRepoPath", null);
|
|
955
|
+
__decorate([debug({ onlyExit: true })], Cache.prototype, "reset", null);
|
|
956
|
+
__decorate([debug({ onlyExit: true })], Cache.prototype, "onRepositoryChanged", null);
|
|
957
|
+
//#endregion
|
|
958
|
+
export { Cache, areUriScopedCachedGitTypes, shouldEvictBlameCacheEntry };
|
|
959
|
+
|
|
1288
960
|
//# sourceMappingURL=cache.js.map
|