Skip to content

Commit 6f2a0a6

Browse files
committed
Adds extension-provided AI models (Copilot)
- Adds the following settings: - `gitlens.ai.experimental.model` - `gitlens.ai.experimental.vscode.model` - Removes the following settings: - `gitlens.ai.experimental.provider` - `gitlens.ai.experimental.openai.model` - `gitlens.ai.experimental.anthropic.model` - `gitlens.ai.experimental.gemini.model`
1 parent 17f2519 commit 6f2a0a6

17 files changed

+827
-272
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Adds support for GitHub Copilot and other VS Code extension-provided AI models for GitLens' experimental AI features
12+
- Adds a `gitlens.ai.experimental.model` setting to specify the AI model to use
13+
- Adds a `gitlens.ai.experimental.vscode.model` setting to specify the VS Code extension-provided AI model to use when `gitlens.ai.experimental.model` is set to `vscode`
14+
15+
### Changed
16+
17+
- Changes the settings used to configure the AI models for GitLens' experimental AI features
18+
- Adds a `gitlens.ai.experimental.model` setting to specify the AI model to use
19+
- Removes the `gitlens.ai.experimental.provider`, `gitlens.ai.experimental.openai.model`, `gitlens.ai.experimental.anthropic.model`, and `gitlens.ai.experimental.gemini.model` settings in favor of the above
20+
921
## [15.0.4] - 2024-05-20
1022

1123
### Added

package.json

Lines changed: 42 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -3522,52 +3522,54 @@
35223522
"scope": "window",
35233523
"order": 2
35243524
},
3525-
"gitlens.ai.experimental.provider": {
3525+
"gitlens.ai.experimental.model": {
35263526
"type": [
35273527
"string",
35283528
"null"
35293529
],
35303530
"default": null,
35313531
"enum": [
3532-
"openai",
3533-
"anthropic"
3532+
"openai:gpt-4o",
3533+
"openai:gpt-4-turbo",
3534+
"openai:gpt-4-turbo-preview",
3535+
"openai:gpt-4",
3536+
"openai:gpt-4-32k",
3537+
"openai:gpt-3.5-turbo",
3538+
"openai:gpt-3.5-turbo-16k",
3539+
"anthropic:claude-3-opus-20240229",
3540+
"anthropic:claude-3-sonnet-20240229",
3541+
"anthropic:claude-3-haiku-20240307",
3542+
"anthropic:claude-2.1",
3543+
"anthropic:claude-2",
3544+
"anthropic:claude-instant-1",
3545+
"google:gemini-1.5-pro-latest",
3546+
"google:gemini-1.5-flash-latest",
3547+
"google:gemini-1.0-pro",
3548+
"vscode"
35343549
],
35353550
"enumDescriptions": [
3536-
"OpenAI",
3537-
"Anthropic"
3551+
"OpenAI GPT-4 Omni",
3552+
"OpenAI GPT-4 Turbo with Vision",
3553+
"OpenAI GPT-4 Turbo Preview",
3554+
"OpenAI GPT-4",
3555+
"OpenAI GPT-4 32k",
3556+
"OpenAI GPT-3.5 Turbo",
3557+
"OpenAI GPT-3.5 Turbo 16k",
3558+
"Anthropic Claude 3 Opus",
3559+
"Anthropic Claude 3 Sonnet",
3560+
"Anthropic Claude 3 Haiku",
3561+
"Anthropic Claude 2.1",
3562+
"Anthropic Claude 2",
3563+
"Anthropic Claude Instant 1.2",
3564+
"Google Gemini 1.5 Pro (Latest)",
3565+
"Google Gemini 1.5 Flash",
3566+
"Google Gemini 1.0 Pro",
3567+
"VS Code Extension"
35383568
],
3539-
"markdownDescription": "Specifies the AI provider to use for GitLens' experimental AI features",
3569+
"markdownDescription": "Specifies the AI model to use for GitLens' experimental AI features",
35403570
"scope": "window",
35413571
"order": 100
35423572
},
3543-
"gitlens.ai.experimental.openai.model": {
3544-
"type": [
3545-
"string",
3546-
"null"
3547-
],
3548-
"default": null,
3549-
"enum": [
3550-
"gpt-4o",
3551-
"gpt-4-turbo",
3552-
"gpt-4-turbo-preview",
3553-
"gpt-4",
3554-
"gpt-4-32k",
3555-
"gpt-3.5-turbo",
3556-
"gpt-3.5-turbo-16k"
3557-
],
3558-
"enumDescriptions": [
3559-
"GPT-4 Omni",
3560-
"GPT-4 Turbo with Vision",
3561-
"GPT-4 Turbo Preview",
3562-
"GPT-4",
3563-
"GPT-4 32k",
3564-
"GPT-3.5 Turbo",
3565-
"GPT-3.5 Turbo 16k"
3566-
],
3567-
"markdownDescription": "Specifies the OpenAI model to use for GitLens' experimental AI features",
3568-
"scope": "window",
3569-
"order": 101
3570-
},
35713573
"gitlens.ai.experimental.openai.url": {
35723574
"type": [
35733575
"string",
@@ -3578,51 +3580,16 @@
35783580
"scope": "window",
35793581
"order": 102
35803582
},
3581-
"gitlens.ai.experimental.anthropic.model": {
3582-
"type": [
3583-
"string",
3584-
"null"
3585-
],
3586-
"default": null,
3587-
"enum": [
3588-
"claude-3-opus-20240229",
3589-
"claude-3-sonnet-20240229",
3590-
"claude-3-haiku-20240307",
3591-
"claude-2.1",
3592-
"claude-2",
3593-
"claude-instant-1"
3594-
],
3595-
"enumDescriptions": [
3596-
"Claude 3 Opus",
3597-
"Claude 3 Sonnet",
3598-
"Claude 3 Haiku",
3599-
"Claude 2.1",
3600-
"Claude 2",
3601-
"Claude Instant 1.2"
3602-
],
3603-
"markdownDescription": "Specifies the Anthropic model to use for GitLens' experimental AI features",
3604-
"scope": "window",
3605-
"order": 102
3606-
},
3607-
"gitlens.ai.experimental.gemini.model": {
3583+
"gitlens.ai.experimental.vscode.model": {
36083584
"type": [
36093585
"string",
36103586
"null"
36113587
],
36123588
"default": null,
3613-
"enum": [
3614-
"gemini-1.5-pro-latest",
3615-
"gemini-1.5-flash-latest",
3616-
"gemini-1.0-pro"
3617-
],
3618-
"enumDescriptions": [
3619-
"Gemini 1.5 Pro (Latest)",
3620-
"Gemini 1.5 Flash",
3621-
"Gemini 1.0 Pro"
3622-
],
3623-
"markdownDescription": "Specifies the Google Gemini model to use for GitLens' experimental AI features",
3589+
"pattern": "^(.*):(.*)$",
3590+
"markdownDescription": "Specifies the VS Code provided model to use for GitLens' experimental AI features, formatted as `vendor:family`",
36243591
"scope": "window",
3625-
"order": 103
3592+
"order": 105
36263593
}
36273594
}
36283595
},
@@ -17516,8 +17483,8 @@
1751617483
"-watch:tests": "webpack --watch -c webpack.config.test.js --mode development",
1751717484
"web": "vscode-test-web --extensionDevelopmentPath=. --folder-uri=vscode-vfs://github/gitkraken/vscode-gitlens",
1751817485
"web:serve": "node -e \"const p = require('path'); const h = require('os').homedir(); require('child_process').execSync('npx serve --cors -l 5000 --ssl-cert '+p.resolve(h, 'certs/localhost.pem')+' --ssl-key '+p.resolve(h, 'certs/localhost-key.pem'), { stdio: 'inherit' })\"",
17519-
"update-dts": "pushd \"src/@types\" && npx vscode-dts dev && popd",
17520-
"update-dts:master": "pushd \"src/@types\" && npx vscode-dts master && popd",
17486+
"update-dts": "pushd \"src/@types\" && npx @vscode/dts dev && popd",
17487+
"update-dts:main": "pushd \"src/@types\" && npx @vscode/dts main && popd",
1752117488
"update-emoji": "node ./scripts/generateEmojiShortcodeMap.mjs",
1752217489
"update-licenses": "node ./scripts/generateLicenses.mjs",
1752317490
"-pretest": "yarn run build:tests",

0 commit comments

Comments
 (0)