@gitkraken/core-gitlens 0.5.109 → 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 +48 -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 +119 -2
- package/dist/git/models/pullRequest.d.ts.map +1 -1
- package/dist/git/models/pullRequest.js +27 -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 +24 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +71 -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 +92 -4
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +324 -20
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts +27 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.d.ts.map +1 -1
- package/dist/plus/git-github/api/pullRequestSearchQuery.js +73 -6
- package/dist/plus/git-github/api/pullRequestSearchQuery.js.map +1 -1
- package/dist/plus/git-github/models.d.ts +33 -5
- package/dist/plus/git-github/models.d.ts.map +1 -1
- package/dist/plus/git-github/models.js +43 -4
- 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/integrationService.d.ts +16 -1
- package/dist/plus/integrations/integrationService.d.ts.map +1 -1
- package/dist/plus/integrations/integrationService.js +9 -1
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/manager.d.ts +45 -5
- package/dist/plus/integrations/manager.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +18 -3
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +30 -2
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +4 -2
- 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/providerFilters.d.ts +1 -1
- package/dist/plus/integrations/providerFilters.d.ts.map +1 -1
- package/dist/plus/integrations/providers/accounts.d.ts +6 -0
- package/dist/plus/integrations/providers/accounts.d.ts.map +1 -0
- package/dist/plus/integrations/providers/accounts.js +34 -0
- package/dist/plus/integrations/providers/accounts.js.map +1 -0
- 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 +23 -2
- package/dist/plus/integrations/providers/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github.js +169 -138
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +9 -0
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +23 -4
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +14 -32
- package/dist/plus/integrations/providers/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/models.js +66 -109
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts +50 -0
- package/dist/plus/integrations/providers/pullRequestReviews.d.ts.map +1 -0
- package/dist/plus/integrations/providers/pullRequestReviews.js +99 -0
- package/dist/plus/integrations/providers/pullRequestReviews.js.map +1 -0
- 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/counts.d.ts +55 -0
- package/dist/plus/integrations/reads/counts.d.ts.map +1 -1
- package/dist/plus/integrations/reads/counts.js +146 -2
- package/dist/plus/integrations/reads/counts.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +7 -1
- package/dist/plus/integrations/reads/drains.d.ts.map +1 -1
- package/dist/plus/integrations/reads/drains.js +20 -6
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/filters.d.ts.map +1 -1
- package/dist/plus/integrations/reads/filters.js +22 -0
- package/dist/plus/integrations/reads/filters.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/plus/integrations/reads/searchPullRequests.d.ts +4 -3
- package/dist/plus/integrations/reads/searchPullRequests.d.ts.map +1 -1
- package/dist/plus/integrations/reads/searchPullRequests.js +6 -4
- package/dist/plus/integrations/reads/searchPullRequests.js.map +1 -1
- package/dist/plus/integrations/reads/sweeps.js +1 -1
- package/dist/plus/integrations/reads/sweeps.js.map +1 -1
- package/dist/plus/integrations/reads/warnings.d.ts +2 -2
- package/dist/plus/integrations/reads/warnings.d.ts.map +1 -1
- package/dist/plus/integrations/reads/warnings.js +11 -2
- package/dist/plus/integrations/reads/warnings.js.map +1 -1
- package/dist/plus/integrations/results.d.ts +6 -1
- package/dist/plus/integrations/results.d.ts.map +1 -1
- package/dist/plus/integrations/results.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/docs/integrations.md +76 -10
- package/docs/kepler-read-api-parity.md +9 -0
- 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 +117 -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 +86 -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 +467 -23
- package/src/plus/git-github/api/pullRequestSearchQuery.ts +81 -7
- package/src/plus/git-github/models.ts +77 -7
- 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/integrationService.ts +25 -2
- package/src/plus/integrations/manager.ts +50 -5
- package/src/plus/integrations/models/gitHostIntegration.ts +54 -2
- package/src/plus/integrations/models/integration.ts +24 -13
- package/src/plus/integrations/providerFilters.ts +6 -1
- package/src/plus/integrations/providers/accounts.ts +38 -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 +218 -145
- package/src/plus/integrations/providers/gitlab.ts +30 -20
- package/src/plus/integrations/providers/models.ts +99 -127
- package/src/plus/integrations/providers/pullRequestReviews.ts +122 -0
- package/src/plus/integrations/reads/broaden.ts +6 -1
- package/src/plus/integrations/reads/counts.ts +273 -2
- package/src/plus/integrations/reads/drains.ts +19 -6
- package/src/plus/integrations/reads/filters.ts +22 -0
- 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/plus/integrations/reads/searchPullRequests.ts +12 -4
- package/src/plus/integrations/reads/sweeps.ts +1 -1
- package/src/plus/integrations/reads/warnings.ts +12 -1
- package/src/plus/integrations/results.ts +6 -1
- 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
package/src/plus/ai/prompts.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PromptTemplate } from './models/promptTemplates.js';
|
|
2
|
+
import type { AIResponseFormat, JSONSchema } from './models/provider.js';
|
|
2
3
|
|
|
3
4
|
export const generateCommitMessage: PromptTemplate<'generate-commitMessage'> = {
|
|
4
5
|
id: 'generate-commitMessage_v2',
|
|
@@ -326,8 +327,19 @@ User Query: \${query}
|
|
|
326
327
|
Convert the user's natural language query into the appropriate search operators. Return only the search query string without any explanatory text. If the query cannot be converted to search operators, return the original query as a message search. For complex temporal expressions that might be ambiguous, prefer simpler, more reliable relative date formats.`,
|
|
327
328
|
};
|
|
328
329
|
|
|
330
|
+
/** Example output block shared by the {@link generateCommits} template and its structural-retry prompt */
|
|
331
|
+
export const generateCommitsExampleJson = `{
|
|
332
|
+
"commits": [
|
|
333
|
+
{
|
|
334
|
+
"message": "[commit message here]",
|
|
335
|
+
"explanation": "[detailed explanation of changes here]",
|
|
336
|
+
"hunks": [{"hunk": [index from hunk_map]}, {"hunk": [index from hunk_map]}]
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}`;
|
|
340
|
+
|
|
329
341
|
export const generateCommits: PromptTemplate<'generate-commits'> = {
|
|
330
|
-
id: 'generate-
|
|
342
|
+
id: 'generate-commits_v3',
|
|
331
343
|
variables: ['hunks', 'existingCommits', 'commitMessages', 'hunkMap', 'instructions'],
|
|
332
344
|
template: `You are an advanced AI programming assistant tasked with organizing code changes into commits. Your goal is to create a complete set of commits that are related, grouped logically, atomic, and easy to review. You will be working with individual code hunks and may have some existing commits that already have hunks assigned.
|
|
333
345
|
|
|
@@ -392,22 +404,14 @@ Follow these guidelines:
|
|
|
392
404
|
|
|
393
405
|
8. Write a detailed explanation for each commit (separate from the commit message), walking through the changes in further detail as if explaining them to a reviewer.
|
|
394
406
|
|
|
395
|
-
Output your complete commit organization as a JSON
|
|
407
|
+
Output your complete commit organization as a single JSON object with a "commits" property. The "commits" property is an array where each commit is an object with the following properties:
|
|
396
408
|
- "message": A string containing the commit message
|
|
397
409
|
- "explanation": A string with a detailed explanation of the changes in the commit. Note that this is separate from the commit message and provides more detail than in the message itself.
|
|
398
410
|
- "hunks": An array of objects, each representing a hunk in the commit. Each hunk object should have:
|
|
399
411
|
- "hunk": The hunk index (number) from the hunk_map
|
|
400
412
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
[
|
|
404
|
-
{
|
|
405
|
-
"message": "[commit message here]",
|
|
406
|
-
"explanation": "[detailed explanation of changes here]",
|
|
407
|
-
"hunks": [{"hunk": [index from hunk_map]}, {"hunk": [index from hunk_map]}]
|
|
408
|
-
}
|
|
409
|
-
]
|
|
410
|
-
</output>
|
|
413
|
+
Example output structure:
|
|
414
|
+
${generateCommitsExampleJson}
|
|
411
415
|
|
|
412
416
|
Remember:
|
|
413
417
|
- Text in [] brackets above should be replaced with your own text, not including the brackets
|
|
@@ -418,10 +422,43 @@ Remember:
|
|
|
418
422
|
|
|
419
423
|
\${instructions}
|
|
420
424
|
|
|
421
|
-
Now, proceed with your analysis and organization of the commits. Return only the
|
|
425
|
+
Now, proceed with your analysis and organization of the commits. Return only the JSON object and no other text — no code fences, no XML tags, and no explanatory text.
|
|
422
426
|
`,
|
|
423
427
|
};
|
|
424
428
|
|
|
429
|
+
/** Schema counterpart of the {@link generateCommits} template's described output shape */
|
|
430
|
+
export const generateCommitsSchema: AIResponseFormat = {
|
|
431
|
+
name: 'generate_commits',
|
|
432
|
+
schema: {
|
|
433
|
+
type: 'object',
|
|
434
|
+
additionalProperties: false,
|
|
435
|
+
required: ['commits'],
|
|
436
|
+
properties: {
|
|
437
|
+
commits: {
|
|
438
|
+
type: 'array',
|
|
439
|
+
items: {
|
|
440
|
+
type: 'object',
|
|
441
|
+
additionalProperties: false,
|
|
442
|
+
required: ['message', 'explanation', 'hunks'],
|
|
443
|
+
properties: {
|
|
444
|
+
message: { type: 'string', description: 'The commit message' },
|
|
445
|
+
explanation: { type: 'string', description: 'Detailed explanation of the changes' },
|
|
446
|
+
hunks: {
|
|
447
|
+
type: 'array',
|
|
448
|
+
items: {
|
|
449
|
+
type: 'object',
|
|
450
|
+
additionalProperties: false,
|
|
451
|
+
required: ['hunk'],
|
|
452
|
+
properties: { hunk: { type: 'integer', description: 'Hunk index from the hunk_map' } },
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
|
|
425
462
|
export const startWorkFromIssue: PromptTemplate<'start-work-issue'> = {
|
|
426
463
|
id: 'start-work-issue',
|
|
427
464
|
variables: ['issue', 'instructions'],
|
|
@@ -479,8 +516,11 @@ You can use GitKraken MCP tools to gather additional context about the repositor
|
|
|
479
516
|
Now, proceed with your analysis and provide a comprehensive review of the PR. Return only the relevant information without any additional text.`,
|
|
480
517
|
};
|
|
481
518
|
|
|
519
|
+
// Shared by the reviewChanges and reviewDetail templates so line-citation rules can't drift apart
|
|
520
|
+
const lineCitationGuidance = `- For "lines", copy the "start" and "end" numbers from the \`[NNNNN]\` annotations of the specific lines your finding concerns. Do not count, infer, or estimate — use only the annotated numbers. Removed lines (blank brackets \`[ ]\`) cannot be cited; pick the nearest surrounding new-file line instead. Anchor the range tightly to the lines the finding actually concerns; do not span an entire hunk. If a finding is not tied to specific lines, set "lines" to null; if not tied to a single file, set "file" to null`;
|
|
521
|
+
|
|
482
522
|
export const reviewChanges: PromptTemplate<'review-changes'> = {
|
|
483
|
-
id: 'review-
|
|
523
|
+
id: 'review-changes_v2',
|
|
484
524
|
variables: ['diff', 'message', 'context', 'instructions'],
|
|
485
525
|
template: `You are an expert code reviewer analyzing a set of code changes. Your goal is to identify meaningful issues — bugs, logic errors, security vulnerabilities, missing error handling, and potential regressions — while ignoring style preferences and linter-level concerns. Focus on problems a careful human reviewer would catch.
|
|
486
526
|
|
|
@@ -501,40 +541,117 @@ Author's description of the changes:
|
|
|
501
541
|
Related work items (known pull requests and issues for this change set). Use these for *intent*: what the change is trying to accomplish. They are not authoritative spec — if a finding contradicts the stated intent, flag it rather than defer to it. May be empty.
|
|
502
542
|
\${context}
|
|
503
543
|
|
|
504
|
-
Produce a structured review
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
A concise 1-3 sentence summary of what these changes do and their overall quality. Note any systemic concerns.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
544
|
+
Produce a structured review as a single JSON object with this exact structure:
|
|
545
|
+
|
|
546
|
+
{
|
|
547
|
+
"overview": "A concise 1-3 sentence summary of what these changes do and their overall quality. Note any systemic concerns.",
|
|
548
|
+
"focusAreas": [
|
|
549
|
+
{
|
|
550
|
+
"label": "Short title of the concern (under 60 chars)",
|
|
551
|
+
"rationale": "Why this matters — what could go wrong or what is suboptimal",
|
|
552
|
+
"severity": "critical|warning|suggestion",
|
|
553
|
+
"files": ["path/to/file.ts"],
|
|
554
|
+
"findings": [
|
|
555
|
+
{
|
|
556
|
+
"severity": "critical|warning|suggestion",
|
|
557
|
+
"title": "Specific issue title",
|
|
558
|
+
"description": "Clear explanation of the problem and how to address it",
|
|
559
|
+
"file": "path/to/file.ts",
|
|
560
|
+
"lines": { "start": 42, "end": 45 }
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
}
|
|
521
566
|
|
|
522
567
|
Guidelines:
|
|
523
568
|
- Severity levels: "critical" = bugs, security issues, data loss risks; "warning" = logic concerns, missing error handling, potential regressions; "suggestion" = improvements, maintainability, performance
|
|
524
569
|
- Group related findings into focus areas by theme, not by file
|
|
525
|
-
- If changes look correct and well-structured, say so in the overview and
|
|
570
|
+
- If changes look correct and well-structured, say so in the overview and use an empty "focusAreas" array
|
|
526
571
|
- 3-5 high-quality findings are better than 15 low-quality ones
|
|
527
|
-
|
|
572
|
+
${lineCitationGuidance}
|
|
528
573
|
- Do not flag style issues, naming preferences, or things a linter would catch
|
|
529
574
|
- Base conclusions only on the code shown — do not speculate about unseen code
|
|
530
575
|
|
|
531
576
|
\${instructions}
|
|
532
577
|
|
|
533
|
-
Review the changes and
|
|
578
|
+
Review the changes and return only the JSON object above — no other text, no code fences.`,
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
// Nullable so the same schema passes OpenAI strict mode (all properties required, optionals as
|
|
582
|
+
// null-unions) and Anthropic's structured outputs (which allow optionals natively)
|
|
583
|
+
const reviewFindingSchema: JSONSchema = {
|
|
584
|
+
type: 'object',
|
|
585
|
+
additionalProperties: false,
|
|
586
|
+
required: ['severity', 'title', 'description', 'file', 'lines'],
|
|
587
|
+
properties: {
|
|
588
|
+
severity: { type: 'string', enum: ['critical', 'warning', 'suggestion'] },
|
|
589
|
+
title: { type: 'string' },
|
|
590
|
+
description: { type: 'string' },
|
|
591
|
+
file: { type: ['string', 'null'] },
|
|
592
|
+
lines: {
|
|
593
|
+
type: ['object', 'null'],
|
|
594
|
+
additionalProperties: false,
|
|
595
|
+
required: ['start', 'end'],
|
|
596
|
+
properties: { start: { type: 'integer' }, end: { type: 'integer' } },
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
function buildReviewResultSchema(name: string, findings: JSONSchema): AIResponseFormat {
|
|
602
|
+
return {
|
|
603
|
+
name: name,
|
|
604
|
+
schema: {
|
|
605
|
+
type: 'object',
|
|
606
|
+
additionalProperties: false,
|
|
607
|
+
required: ['overview', 'focusAreas'],
|
|
608
|
+
properties: {
|
|
609
|
+
overview: { type: 'string' },
|
|
610
|
+
focusAreas: {
|
|
611
|
+
type: 'array',
|
|
612
|
+
items: {
|
|
613
|
+
type: 'object',
|
|
614
|
+
additionalProperties: false,
|
|
615
|
+
required: ['label', 'rationale', 'severity', 'files', 'findings'],
|
|
616
|
+
properties: {
|
|
617
|
+
label: { type: 'string' },
|
|
618
|
+
rationale: { type: 'string' },
|
|
619
|
+
severity: { type: 'string', enum: ['critical', 'warning', 'suggestion'] },
|
|
620
|
+
files: { type: 'array', items: { type: 'string' } },
|
|
621
|
+
findings: findings,
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
},
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/** Schema counterpart of the {@link reviewChanges} template's output shape */
|
|
631
|
+
export const reviewResultSchema: AIResponseFormat = buildReviewResultSchema('review_result', {
|
|
632
|
+
type: ['array', 'null'],
|
|
633
|
+
items: reviewFindingSchema,
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
/** Schema counterpart of the {@link reviewOverview} template — the manifest-only pass has no diffs,
|
|
637
|
+
* so the grammar itself forbids findings (the template mandates `"findings": null`) */
|
|
638
|
+
export const reviewOverviewSchema: AIResponseFormat = buildReviewResultSchema('review_overview', { type: 'null' });
|
|
639
|
+
|
|
640
|
+
/** Schema counterpart of the {@link reviewDetail} template's output shape */
|
|
641
|
+
export const reviewDetailSchema: AIResponseFormat = {
|
|
642
|
+
name: 'review_detail',
|
|
643
|
+
schema: {
|
|
644
|
+
type: 'object',
|
|
645
|
+
additionalProperties: false,
|
|
646
|
+
required: ['findings'],
|
|
647
|
+
properties: {
|
|
648
|
+
findings: { type: 'array', items: reviewFindingSchema },
|
|
649
|
+
},
|
|
650
|
+
},
|
|
534
651
|
};
|
|
535
652
|
|
|
536
653
|
export const reviewOverview: PromptTemplate<'review-overview'> = {
|
|
537
|
-
id: 'review-
|
|
654
|
+
id: 'review-overview_v2',
|
|
538
655
|
variables: ['files', 'message', 'context', 'instructions'],
|
|
539
656
|
template: `You are an expert code reviewer performing an initial assessment of a set of code changes. You are given a file manifest (not full diffs) — use the file paths, change types, and line counts to identify which areas deserve closer inspection.
|
|
540
657
|
|
|
@@ -551,32 +668,35 @@ Author's description of the changes:
|
|
|
551
668
|
Related work items (known pull requests and issues for this change set). Use these for *intent* — what the change is trying to accomplish — when ranking which areas deserve closer review. May be empty.
|
|
552
669
|
\${context}
|
|
553
670
|
|
|
554
|
-
Produce a structured assessment
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
A concise 1-3 sentence summary of the scope and nature of these changes based on the file manifest and description.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
671
|
+
Produce a structured assessment as a single JSON object with this exact structure:
|
|
672
|
+
|
|
673
|
+
{
|
|
674
|
+
"overview": "A concise 1-3 sentence summary of the scope and nature of these changes based on the file manifest and description.",
|
|
675
|
+
"focusAreas": [
|
|
676
|
+
{
|
|
677
|
+
"label": "Short title of the area to inspect (under 60 chars)",
|
|
678
|
+
"rationale": "Why this area deserves closer review — based on the types of files changed, the volume of changes, and potential risk",
|
|
679
|
+
"severity": "critical|warning|suggestion",
|
|
680
|
+
"files": ["path/to/file.ts"],
|
|
681
|
+
"findings": null
|
|
682
|
+
}
|
|
683
|
+
]
|
|
684
|
+
}
|
|
565
685
|
|
|
566
686
|
Guidelines:
|
|
567
687
|
- Severity reflects potential risk: "critical" = security-sensitive files, auth/crypto/payment paths, database migrations; "warning" = core logic changes, API changes, large modifications; "suggestion" = refactoring, config changes, documentation
|
|
568
688
|
- Rank focus areas from highest to lowest risk
|
|
569
689
|
- Group related files into focus areas by theme
|
|
570
690
|
- Include 2-6 focus areas. If changes are very simple, fewer is fine
|
|
571
|
-
-
|
|
691
|
+
- Always set "findings" to null — findings come in a later pass when full diffs are available
|
|
572
692
|
|
|
573
693
|
\${instructions}
|
|
574
694
|
|
|
575
|
-
Assess the changes and
|
|
695
|
+
Assess the changes and return only the JSON object above — no other text, no code fences.`,
|
|
576
696
|
};
|
|
577
697
|
|
|
578
698
|
export const reviewRefine: PromptTemplate<'review-refine'> = {
|
|
579
|
-
id: 'review-
|
|
699
|
+
id: 'review-refine_v2',
|
|
580
700
|
variables: ['instructions'],
|
|
581
701
|
template: `The user has follow-up guidance for the review you produced above. Produce an updated review that incorporates it:
|
|
582
702
|
- Keep prior findings that remain valid — do not drop them just because the guidance doesn't mention them
|
|
@@ -588,7 +708,7 @@ export const reviewRefine: PromptTemplate<'review-refine'> = {
|
|
|
588
708
|
\${instructions}
|
|
589
709
|
</~~instructions~~>
|
|
590
710
|
|
|
591
|
-
Produce the full updated review in the same
|
|
711
|
+
Produce the full updated review as a single JSON object in the same structure as your previous response. Return only the JSON object — no other text, no code fences.`,
|
|
592
712
|
};
|
|
593
713
|
|
|
594
714
|
export const addressReviewFindings: PromptTemplate<'address-review-findings'> = {
|
|
@@ -616,7 +736,7 @@ Guidelines:
|
|
|
616
736
|
};
|
|
617
737
|
|
|
618
738
|
export const reviewDetail: PromptTemplate<'review-detail'> = {
|
|
619
|
-
id: 'review-
|
|
739
|
+
id: 'review-detail_v2',
|
|
620
740
|
variables: ['diff', 'overview', 'message', 'focusArea', 'context', 'instructions'],
|
|
621
741
|
template: `You are an expert code reviewer performing a detailed inspection of specific files that were flagged for closer review. You have the context from an initial overview assessment.
|
|
622
742
|
|
|
@@ -644,23 +764,28 @@ Code changes for the files in this focus area (Git diff format). Each non-header
|
|
|
644
764
|
\${diff}
|
|
645
765
|
</~~diff~~>
|
|
646
766
|
|
|
647
|
-
Produce detailed findings
|
|
767
|
+
Produce detailed findings as a single JSON object with this exact structure:
|
|
648
768
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
769
|
+
{
|
|
770
|
+
"findings": [
|
|
771
|
+
{
|
|
772
|
+
"severity": "critical|warning|suggestion",
|
|
773
|
+
"title": "Specific issue title",
|
|
774
|
+
"description": "Clear explanation of the problem and how to address it",
|
|
775
|
+
"file": "path/to/file.ts",
|
|
776
|
+
"lines": { "start": 42, "end": 45 }
|
|
777
|
+
}
|
|
778
|
+
]
|
|
779
|
+
}
|
|
655
780
|
|
|
656
781
|
Guidelines:
|
|
657
782
|
- Severity: "critical" = bugs, security, data loss; "warning" = logic concerns, error handling, regressions; "suggestion" = improvements, maintainability
|
|
658
|
-
|
|
783
|
+
${lineCitationGuidance}
|
|
659
784
|
- Be concrete — explain what the problem is and how to fix it
|
|
660
|
-
- If the code in this area looks correct, return
|
|
785
|
+
- If the code in this area looks correct, return {"findings": []}
|
|
661
786
|
- Do not flag style issues or things a linter would catch
|
|
662
787
|
|
|
663
788
|
\${instructions}
|
|
664
789
|
|
|
665
|
-
Inspect the diff for this focus area and
|
|
790
|
+
Inspect the diff for this focus area and return only the JSON object above — no other text, no code fences.`,
|
|
666
791
|
};
|