@gitkraken/core-gitlens 0.5.110 → 0.5.111
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 +16 -1
- package/dist/git/cache.d.ts +111 -6
- package/dist/git/cache.d.ts.map +1 -1
- package/dist/git/cache.js +312 -43
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts +11 -0
- package/dist/git/context.d.ts.map +1 -1
- package/dist/git/context.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +1 -0
- package/dist/git/models/fileStatus.d.ts.map +1 -1
- package/dist/git/models/fileStatus.js +1 -0
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/issue.d.ts +4 -0
- package/dist/git/models/issue.d.ts.map +1 -1
- package/dist/git/models/mergeConflicts.d.ts +2 -0
- package/dist/git/models/mergeConflicts.d.ts.map +1 -1
- package/dist/git/models/pullRequest.d.ts +38 -2
- package/dist/git/models/pullRequest.d.ts.map +1 -1
- package/dist/git/models/pullRequest.js +12 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/repository.d.ts +32 -5
- package/dist/git/models/repository.d.ts.map +1 -1
- package/dist/git/models/repository.js +58 -12
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/statusFile.d.ts.map +1 -1
- package/dist/git/models/statusFile.js +3 -0
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/providers/branches.d.ts +2 -0
- package/dist/git/providers/branches.d.ts.map +1 -1
- package/dist/git/providers/commits.d.ts +8 -0
- package/dist/git/providers/commits.d.ts.map +1 -1
- package/dist/git/providers/config.d.ts +19 -1
- package/dist/git/providers/config.d.ts.map +1 -1
- package/dist/git/providers/operations.d.ts +1 -0
- package/dist/git/providers/operations.d.ts.map +1 -1
- package/dist/git/providers/pausedOperations.d.ts +2 -0
- package/dist/git/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git/providers/status.d.ts +1 -0
- package/dist/git/providers/status.d.ts.map +1 -1
- package/dist/git/utils/config.utils.d.ts +3 -0
- package/dist/git/utils/config.utils.d.ts.map +1 -0
- package/dist/git/utils/config.utils.js +8 -0
- package/dist/git/utils/config.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -1
- package/dist/git/utils/issue.utils.js +2 -0
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +14 -0
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.js +23 -0
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts +14 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +31 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts +6 -1
- package/dist/git/watching/changeEvent.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.js +14 -1
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/watchService.d.ts.map +1 -1
- package/dist/git/watching/watchService.js +18 -3
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +8 -1
- package/dist/git/watching/watchSession.d.ts.map +1 -1
- package/dist/git/watching/watchSession.js +38 -6
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts +2 -2
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -1
- package/dist/git/watching/watcherPatterns.js +1 -1
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +1 -1
- package/dist/git-cli/exec/git.d.ts.map +1 -1
- package/dist/git-cli/exec/git.js +13 -3
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +19 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -1
- package/dist/git-cli/providers/branches.js +282 -78
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +4 -0
- package/dist/git-cli/providers/commits.d.ts.map +1 -1
- package/dist/git-cli/providers/commits.js +84 -11
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +42 -0
- package/dist/git-cli/providers/config.d.ts.map +1 -1
- package/dist/git-cli/providers/config.js +186 -5
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts.map +1 -1
- package/dist/git-cli/providers/contributors.js +1 -1
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +2 -2
- package/dist/git-cli/providers/graph.d.ts.map +1 -1
- package/dist/git-cli/providers/graph.js +27 -9
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js +40 -12
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts +5 -0
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +87 -16
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts +5 -3
- package/dist/git-cli/providers/refs.d.ts.map +1 -1
- package/dist/git-cli/providers/refs.js +33 -4
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +1 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -1
- package/dist/git-cli/providers/status.js +18 -3
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +4 -0
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts.map +1 -1
- package/dist/git-cli/service.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts +39 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.js +978 -71
- package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +24 -2
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +84 -9
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/types.d.ts +37 -2
- package/dist/plus/agents/types.d.ts.map +1 -1
- package/dist/plus/agents/types.js +2 -0
- package/dist/plus/agents/types.js.map +1 -1
- package/dist/plus/ai/errors.d.ts +10 -0
- package/dist/plus/ai/errors.d.ts.map +1 -1
- package/dist/plus/ai/errors.js +29 -0
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +4 -0
- package/dist/plus/ai/models/model.d.ts.map +1 -1
- package/dist/plus/ai/models/model.js +51 -6
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
- package/dist/plus/ai/models/provider.d.ts +60 -2
- package/dist/plus/ai/models/provider.d.ts.map +1 -1
- package/dist/plus/ai/prompts.d.ts +12 -0
- package/dist/plus/ai/prompts.d.ts.map +1 -1
- package/dist/plus/ai/prompts.js +177 -61
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +10 -2
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.js +139 -46
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +2 -0
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.js +10 -21
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts +1 -0
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.js +19 -0
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +5 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.js +118 -3
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +1 -0
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.js +5 -0
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts +3 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js +99 -19
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts +4 -3
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.js +38 -3
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +1 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.js +4 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +154 -5
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +259 -10
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts +4 -0
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.js +9 -0
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts +1 -0
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.js +1 -0
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/responseFormatCache.d.ts +8 -0
- package/dist/plus/ai/providers/responseFormatCache.d.ts.map +1 -0
- package/dist/plus/ai/providers/responseFormatCache.js +25 -0
- package/dist/plus/ai/providers/responseFormatCache.js.map +1 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts +1 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.js +10 -1
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts +3 -0
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/ai.utils.js +13 -0
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +16 -2
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/results.utils.js +204 -28
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +55 -0
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +177 -4
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +16 -0
- package/dist/plus/git-github/models.d.ts.map +1 -1
- package/dist/plus/git-github/models.js +29 -3
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts +1 -0
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +4 -0
- package/dist/plus/integrations/context.d.ts.map +1 -1
- package/dist/plus/integrations/index.d.ts.map +1 -1
- package/dist/plus/integrations/index.js +2 -0
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +6 -3
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +12 -2
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +3 -1
- package/dist/plus/integrations/models/integration.d.ts.map +1 -1
- package/dist/plus/integrations/models/integration.js +2 -2
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/accounts.d.ts.map +1 -1
- package/dist/plus/integrations/providers/accounts.js +4 -0
- package/dist/plus/integrations/providers/accounts.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/models.js +3 -0
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.js +1 -0
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +14 -2
- package/dist/plus/integrations/providers/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github.js +55 -3
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/models.js +30 -4
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -1
- package/dist/plus/integrations/reads/broaden.js +6 -1
- package/dist/plus/integrations/reads/broaden.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts.map +1 -1
- package/dist/plus/integrations/reads/drains.js +7 -4
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +1 -1
- package/dist/plus/integrations/reads/hierarchy.js +3 -1
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -1
- package/dist/plus/integrations/reads/issueTracker.js +8 -3
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -1
- package/dist/plus/integrations/reads/issues.d.ts.map +1 -1
- package/dist/plus/integrations/reads/issues.js +9 -4
- package/dist/plus/integrations/reads/issues.js.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +1 -1
- package/dist/plus/integrations/reads/pullRequests.js +9 -4
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -1
- package/dist/utils/env/browser/base64.d.ts +1 -1
- package/dist/utils/env/browser/base64.d.ts.map +1 -1
- package/dist/utils/env/node/base64.d.ts +1 -1
- package/dist/utils/env/node/base64.d.ts.map +1 -1
- package/dist/utils/env/node/base64.js +2 -0
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/keys/chord.d.ts +52 -0
- package/dist/utils/keys/chord.d.ts.map +1 -0
- package/dist/utils/keys/chord.js +135 -0
- package/dist/utils/keys/chord.js.map +1 -0
- package/dist/utils/keys/keybinding.d.ts +53 -0
- package/dist/utils/keys/keybinding.d.ts.map +1 -0
- package/dist/utils/keys/keybinding.js +58 -0
- package/dist/utils/keys/keybinding.js.map +1 -0
- package/dist/utils/path.d.ts +11 -0
- package/dist/utils/path.d.ts.map +1 -1
- package/dist/utils/path.js +13 -0
- package/dist/utils/path.js.map +1 -1
- package/package.json +13 -5
- package/src/git/cache.ts +383 -47
- package/src/git/context.ts +11 -0
- package/src/git/models/fileStatus.ts +1 -0
- package/src/git/models/issue.ts +4 -0
- package/src/git/models/mergeConflicts.ts +3 -2
- package/src/git/models/pullRequest.ts +33 -1
- package/src/git/models/repository.ts +58 -17
- package/src/git/models/statusFile.ts +3 -0
- package/src/git/providers/branches.ts +6 -0
- package/src/git/providers/commits.ts +11 -0
- package/src/git/providers/config.ts +18 -0
- package/src/git/providers/operations.ts +1 -0
- package/src/git/providers/pausedOperations.ts +2 -0
- package/src/git/providers/status.ts +1 -0
- package/src/git/utils/config.utils.ts +8 -0
- package/src/git/utils/issue.utils.ts +2 -0
- package/src/git/utils/pausedOperationStatus.utils.ts +28 -0
- package/src/git/utils/pullRequest.utils.ts +36 -0
- package/src/git/watching/changeEvent.ts +6 -1
- package/src/git/watching/classifyChange.ts +15 -1
- package/src/git/watching/watchService.ts +20 -3
- package/src/git/watching/watchSession.ts +41 -6
- package/src/git/watching/watcherPatterns.ts +1 -1
- package/src/git-cli/exec/git.ts +13 -3
- package/src/git-cli/providers/branches.ts +384 -132
- package/src/git-cli/providers/commits.ts +106 -15
- package/src/git-cli/providers/config.ts +229 -8
- package/src/git-cli/providers/contributors.ts +5 -1
- package/src/git-cli/providers/graph.ts +26 -13
- package/src/git-cli/providers/operations.ts +45 -20
- package/src/git-cli/providers/pausedOperations.ts +109 -17
- package/src/git-cli/providers/refs.ts +33 -3
- package/src/git-cli/providers/status.ts +25 -4
- package/src/git-cli/providers/worktrees.ts +5 -0
- package/src/git-cli/service.ts +0 -1
- package/src/plus/agents/providers/claudeCodeProvider.ts +1130 -87
- package/src/plus/agents/providers/claudeCodeTranscript.ts +95 -9
- package/src/plus/agents/types.ts +46 -2
- package/src/plus/ai/errors.ts +30 -0
- package/src/plus/ai/models/model.ts +56 -6
- package/src/plus/ai/models/promptTemplates.ts +1 -1
- package/src/plus/ai/models/provider.ts +69 -2
- package/src/plus/ai/prompts.ts +186 -61
- package/src/plus/ai/providers/anthropicProvider.ts +155 -47
- package/src/plus/ai/providers/deepSeekProvider.ts +11 -21
- package/src/plus/ai/providers/geminiProvider.ts +19 -0
- package/src/plus/ai/providers/gitkrakenProvider.ts +126 -3
- package/src/plus/ai/providers/huggingFaceProvider.ts +6 -0
- package/src/plus/ai/providers/mistralProvider.ts +102 -19
- package/src/plus/ai/providers/ollamaProvider.ts +55 -4
- package/src/plus/ai/providers/openAICompatibleProvider.ts +5 -0
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +360 -17
- package/src/plus/ai/providers/openRouterProvider.ts +17 -0
- package/src/plus/ai/providers/openaiProvider.ts +1 -0
- package/src/plus/ai/providers/responseFormatCache.ts +39 -0
- package/src/plus/ai/providers/xaiProvider.ts +10 -1
- package/src/plus/ai/utils/ai.utils.ts +14 -0
- package/src/plus/ai/utils/results.utils.ts +255 -31
- package/src/plus/git-github/api/github.ts +291 -7
- package/src/plus/git-github/models.ts +48 -2
- package/src/plus/git-github/providers/github/status.ts +1 -0
- package/src/plus/integrations/context.ts +4 -0
- package/src/plus/integrations/index.ts +2 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +25 -2
- package/src/plus/integrations/models/integration.ts +23 -13
- package/src/plus/integrations/providers/accounts.ts +4 -0
- package/src/plus/integrations/providers/azure/models.ts +3 -0
- package/src/plus/integrations/providers/bitbucket/models.ts +1 -0
- package/src/plus/integrations/providers/github.ts +85 -1
- package/src/plus/integrations/providers/gitlab.ts +2 -10
- package/src/plus/integrations/providers/models.ts +36 -4
- package/src/plus/integrations/reads/broaden.ts +6 -1
- package/src/plus/integrations/reads/drains.ts +7 -4
- package/src/plus/integrations/reads/hierarchy.ts +3 -1
- package/src/plus/integrations/reads/issueTracker.ts +9 -3
- package/src/plus/integrations/reads/issues.ts +9 -4
- package/src/plus/integrations/reads/pullRequests.ts +9 -4
- package/src/utils/env/browser/base64.ts +1 -1
- package/src/utils/env/node/base64.ts +3 -1
- package/src/utils/keys/chord.ts +184 -0
- package/src/utils/keys/keybinding.ts +116 -0
- package/src/utils/path.ts +14 -0
|
@@ -56,6 +56,15 @@ export interface WatchSessionOptions {
|
|
|
56
56
|
const defaultRepoDelay = 250;
|
|
57
57
|
const defaultWorkingTreeDelay = 2500;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Cap on retained working-tree paths per flush. The set otherwise grows without bound — while the window
|
|
61
|
+
* is unfocused the session is suspended, so a branch switch or build accumulates every touched path until
|
|
62
|
+
* refocus. Set low deliberately: ordinary edits are a handful of paths, anything past this was a
|
|
63
|
+
* refresh-everything event anyway, and dropping past it only costs the matching consumers a
|
|
64
|
+
* conservative refresh.
|
|
65
|
+
*/
|
|
66
|
+
const maxWorkingTreePaths = 1000;
|
|
67
|
+
|
|
59
68
|
/**
|
|
60
69
|
* Per-repository session that owns the debounce/coalesce/suspend
|
|
61
70
|
* pipeline for both repo (.git) and working-tree changes.
|
|
@@ -78,6 +87,7 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
78
87
|
private readonly workingTreeDelays = new Map<number, number>();
|
|
79
88
|
private workingTreeNextId = 0;
|
|
80
89
|
private pendingWorkingTreePaths = new Set<string>();
|
|
90
|
+
private pendingWorkingTreeIncomplete = false;
|
|
81
91
|
private workingTreeTimer: ReturnType<typeof setTimeout> | undefined;
|
|
82
92
|
private effectiveWorkingTreeMs: number;
|
|
83
93
|
private readonly defaultWorkingTreeMs: number;
|
|
@@ -116,6 +126,7 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
116
126
|
|
|
117
127
|
this.pendingRepoEvent = undefined;
|
|
118
128
|
this.pendingWorkingTreePaths.clear();
|
|
129
|
+
this.pendingWorkingTreeIncomplete = false;
|
|
119
130
|
this.repoDelays.clear();
|
|
120
131
|
this.workingTreeDelays.clear();
|
|
121
132
|
|
|
@@ -128,7 +139,15 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
get hasPendingChanges(): boolean {
|
|
131
|
-
return this.pendingRepoEvent != null || this.
|
|
142
|
+
return this.pendingRepoEvent != null || this.hasPendingWorkingTreeChanges;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* An incomplete batch with no surviving paths still has to fire: the caller dropped paths we never saw, so
|
|
147
|
+
* gating the pipeline on the retained set alone would swallow the change entirely.
|
|
148
|
+
*/
|
|
149
|
+
private get hasPendingWorkingTreeChanges(): boolean {
|
|
150
|
+
return this.pendingWorkingTreePaths.size > 0 || this.pendingWorkingTreeIncomplete;
|
|
132
151
|
}
|
|
133
152
|
|
|
134
153
|
get repoSubscriberCount(): number {
|
|
@@ -243,6 +262,9 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
243
262
|
if (this.workingTreeDelays.size === 0) {
|
|
244
263
|
this.cancelWorkingTreeTimer();
|
|
245
264
|
this.pendingWorkingTreePaths.clear();
|
|
265
|
+
// Dropped with the paths it describes — a stale flag would make the next subscriber's
|
|
266
|
+
// first ordinary flush claim a partial set and force needless full refreshes.
|
|
267
|
+
this.pendingWorkingTreeIncomplete = false;
|
|
246
268
|
this.lifecycle?.onLastWorkingTreeSubscriber?.();
|
|
247
269
|
}
|
|
248
270
|
}),
|
|
@@ -266,7 +288,7 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
266
288
|
if (this.pendingRepoEvent != null) {
|
|
267
289
|
this.scheduleRepoFlush(delayMs);
|
|
268
290
|
}
|
|
269
|
-
if (this.
|
|
291
|
+
if (this.hasPendingWorkingTreeChanges) {
|
|
270
292
|
this.scheduleWorkingTreeFlush(delayMs);
|
|
271
293
|
}
|
|
272
294
|
}
|
|
@@ -298,10 +320,14 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
298
320
|
}
|
|
299
321
|
|
|
300
322
|
/** Push working tree file changes into the pipeline */
|
|
301
|
-
|
|
323
|
+
/** `incomplete` marks the batch as partial when the caller already dropped paths of its own. */
|
|
324
|
+
pushWorkingTreeChanges(paths: Iterable<string>, incomplete?: boolean): void {
|
|
302
325
|
if (this._disposed) return;
|
|
303
326
|
|
|
304
327
|
this._etagWorkingTree++;
|
|
328
|
+
if (incomplete) {
|
|
329
|
+
this.pendingWorkingTreeIncomplete = true;
|
|
330
|
+
}
|
|
305
331
|
this.coalesceWorkingTrees(paths);
|
|
306
332
|
}
|
|
307
333
|
|
|
@@ -362,18 +388,20 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
362
388
|
|
|
363
389
|
private flushWorkingTree(): void {
|
|
364
390
|
this.workingTreeTimer = undefined;
|
|
365
|
-
if (this.
|
|
391
|
+
if (!this.hasPendingWorkingTreeChanges) return;
|
|
366
392
|
|
|
367
393
|
const paths = this.pendingWorkingTreePaths;
|
|
394
|
+
const incomplete = this.pendingWorkingTreeIncomplete;
|
|
368
395
|
this.pendingWorkingTreePaths = new Set();
|
|
396
|
+
this.pendingWorkingTreeIncomplete = false;
|
|
369
397
|
// Advance the cache's status clock (via WatchService's global forwarding) BEFORE notifying subscribers,
|
|
370
398
|
// so a subscriber that synchronously reads status sees the post-change generation, not a joinable pre-change run.
|
|
371
399
|
this.onDidFireWorkingTreeChangeCallback?.(this.repoPath);
|
|
372
|
-
this.workingTreeEmitter.fire({ repoPath: this.repoPath, paths: paths });
|
|
400
|
+
this.workingTreeEmitter.fire({ repoPath: this.repoPath, paths: paths, incomplete: incomplete });
|
|
373
401
|
}
|
|
374
402
|
|
|
375
403
|
private scheduleWorkingTreeFlush(delayOverride?: number): void {
|
|
376
|
-
if (this._suspended || this.
|
|
404
|
+
if (this._suspended || !this.hasPendingWorkingTreeChanges) return;
|
|
377
405
|
|
|
378
406
|
if (this.workingTreeTimer != null) {
|
|
379
407
|
clearTimeout(this.workingTreeTimer);
|
|
@@ -383,6 +411,13 @@ export class RepositoryWatchSession implements UnifiedDisposable {
|
|
|
383
411
|
|
|
384
412
|
private coalesceWorkingTrees(paths: Iterable<string>): void {
|
|
385
413
|
for (const p of paths) {
|
|
414
|
+
// Stop retaining paths past the cap, but keep draining the iterable — the flag is what makes the
|
|
415
|
+
// partial set safe to consume, and dropping out early would leave later paths for the next window.
|
|
416
|
+
if (this.pendingWorkingTreePaths.size >= maxWorkingTreePaths && !this.pendingWorkingTreePaths.has(p)) {
|
|
417
|
+
this.pendingWorkingTreeIncomplete = true;
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
|
|
386
421
|
this.pendingWorkingTreePaths.add(p);
|
|
387
422
|
}
|
|
388
423
|
this.scheduleWorkingTreeFlush();
|
|
@@ -8,7 +8,7 @@ const dotGitFiles =
|
|
|
8
8
|
const dotGitWorktreeFiles =
|
|
9
9
|
'worktrees/*,worktrees/**/index,worktrees/**/HEAD,worktrees/**/*_HEAD,worktrees/**/MERGE_*,worktrees/**/rebase-merge,worktrees/**/rebase-merge/**,worktrees/**/rebase-apply,worktrees/**/rebase-apply/**,worktrees/**/sequencer,worktrees/**/sequencer/**';
|
|
10
10
|
|
|
11
|
-
const dotGitCommonFiles = `config,gk/config,refs/**,info/exclude,FETCH_HEAD,${dotGitWorktreeFiles}`;
|
|
11
|
+
const dotGitCommonFiles = `config,gk/config,refs/**,packed-refs,info/exclude,FETCH_HEAD,${dotGitWorktreeFiles}`;
|
|
12
12
|
|
|
13
13
|
/** For standard repos (no worktrees): single watcher covering all .git files */
|
|
14
14
|
export const dotGitGlobCombined = `{${dotGitFiles},${dotGitCommonFiles}}`;
|
package/src/git-cli/exec/git.ts
CHANGED
|
@@ -71,7 +71,6 @@ export const GitErrors = {
|
|
|
71
71
|
changesWouldBeOverwritten:
|
|
72
72
|
/Your local changes to the following files would be overwritten|Your local changes would be overwritten|overwritten by checkout/i,
|
|
73
73
|
cherryPickAborted: /cherry-pick.*aborted/i,
|
|
74
|
-
cherryPickEmptyPrevious: /The previous cherry-pick is now empty/i,
|
|
75
74
|
cherryPickInProgress: /cherry-pick is already in progress|You have not concluded your cherry-pick/i,
|
|
76
75
|
commitChangesFirst: /Please, commit your changes before you can/i,
|
|
77
76
|
conflict: /^CONFLICT \([^)]+\): \b/m,
|
|
@@ -100,6 +99,7 @@ export const GitErrors = {
|
|
|
100
99
|
noPausedOperation:
|
|
101
100
|
/no merge (?:in progress|to abort)|no cherry-pick(?: or revert)? in progress|no rebase in progress/i,
|
|
102
101
|
permissionDenied: /Permission.*denied/i,
|
|
102
|
+
previousOperationEmpty: /The previous (?:cherry-pick|revert) is now empty/i,
|
|
103
103
|
pushRejected: /^error:\s*failed to push some refs to\b/m,
|
|
104
104
|
pushRejectedRefDoesNotExists: /error:\s*unable to delete '(.*?)': remote ref does not exist/m,
|
|
105
105
|
rebaseAborted: /Nothing to do|rebase.*aborted/i,
|
|
@@ -242,7 +242,7 @@ const errorToReasonMap = new Map<GitCommand, [RegExp, GitCommandToReasonMap[GitC
|
|
|
242
242
|
[GitErrors.cherryPickAborted, 'aborted'],
|
|
243
243
|
[GitErrors.cherryPickInProgress, 'alreadyInProgress'],
|
|
244
244
|
[GitErrors.conflict, 'conflicts'],
|
|
245
|
-
[GitErrors.
|
|
245
|
+
[GitErrors.previousOperationEmpty, 'emptyCommit'],
|
|
246
246
|
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
247
247
|
],
|
|
248
248
|
],
|
|
@@ -277,13 +277,23 @@ const errorToReasonMap = new Map<GitCommand, [RegExp, GitCommandToReasonMap[GitC
|
|
|
277
277
|
[
|
|
278
278
|
'paused-operation-continue',
|
|
279
279
|
[
|
|
280
|
-
[GitErrors.
|
|
280
|
+
[GitErrors.previousOperationEmpty, 'emptyCommit'],
|
|
281
281
|
[GitErrors.noPausedOperation, 'nothingToContinue'],
|
|
282
282
|
[GitErrors.uncommittedChanges, 'uncommittedChanges'],
|
|
283
283
|
[GitErrors.unmergedFiles, 'unmergedFiles'],
|
|
284
284
|
[GitErrors.unresolvedConflicts, 'conflicts'],
|
|
285
285
|
[GitErrors.unstagedChanges, 'unstagedChanges'],
|
|
286
286
|
[GitErrors.changesWouldBeOverwritten, 'wouldOverwriteChanges'],
|
|
287
|
+
// A single (non-sequencer) revert resolved to a no-op never gets git's "previous revert is now
|
|
288
|
+
// empty" message — its `--continue` falls through to the commit, which reports having nothing to
|
|
289
|
+
// commit. Mid-paused-op that means the step became empty, so it earns the same choice.
|
|
290
|
+
//
|
|
291
|
+
// Kept LAST because the pattern is deliberately broad: it also matches "no changes added to
|
|
292
|
+
// commit" and "nothing added to commit", which appear alongside the more specific unmerged /
|
|
293
|
+
// conflict / unstaged messages. Matching first would shadow those. It isn't narrowed to the
|
|
294
|
+
// "working tree clean" variant because an empty step with untracked files present instead reports
|
|
295
|
+
// "nothing added to commit but untracked files present".
|
|
296
|
+
[GitErrors.nothingToCommit, 'emptyCommit'],
|
|
287
297
|
],
|
|
288
298
|
],
|
|
289
299
|
[
|