Skip to content

Commit a22dc0b

Browse files
committed
Adds GitHub Models and Hugging Face support
Adds latest model support from OpenAI, Anthropic, & Google Moves AI features from experimental to preview - All-new settings for config and custom instructions Adds markdown output for AI explain Improves the AI explain prompting for better results
1 parent 5b1c7f6 commit a22dc0b

27 files changed

+991
-720
lines changed

package.json

Lines changed: 105 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,113 +3718,99 @@
37183718
},
37193719
{
37203720
"id": "ai",
3721-
"title": "AI (ᴇxᴘᴇʀɪᴍᴇɴᴛᴀʟ)",
3721+
"title": "AI (ᴘʀᴇᴠɪᴇᴡ)",
37223722
"order": 1000,
37233723
"properties": {
3724-
"gitlens.ai.experimental.generateCommitMessage.enabled": {
3725-
"type": "boolean",
3726-
"default": true,
3727-
"markdownDescription": "Specifies whether to enable GitLens' experimental, AI-powered, on-demand commit message generation",
3728-
"scope": "window",
3729-
"order": 1
3730-
},
3731-
"gitlens.experimental.generateCommitMessagePrompt": {
3732-
"type": "string",
3733-
"default": "Now, based on the provided code diff and any additional context, create a concise but meaningful commit message following the instructions above.",
3734-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated commit message",
3735-
"scope": "window",
3736-
"order": 2
3737-
},
3738-
"gitlens.experimental.generateCloudPatchMessagePrompt": {
3739-
"type": "string",
3740-
"default": "Now, based on the provided code diff and any additional context, create a concise but meaningful title and description following the instructions above.",
3741-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated title and description",
3742-
"scope": "window",
3743-
"order": 3
3744-
},
3745-
"gitlens.experimental.generateCodeSuggestMessagePrompt": {
3746-
"type": "string",
3747-
"default": "Now, based on the provided code diff and any additional context, create a concise but meaningful code review title and description following the instructions above.",
3748-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated title and description",
3749-
"scope": "window",
3750-
"order": 3
3751-
},
3752-
"gitlens.ai.experimental.model": {
3724+
"gitlens.ai.model": {
37533725
"type": [
37543726
"string",
37553727
"null"
37563728
],
37573729
"default": null,
3758-
"enum": [
3759-
"openai:gpt-4o",
3760-
"openai:gpt-4o-mini",
3761-
"openai:gpt-4-turbo",
3762-
"openai:gpt-4-turbo-preview",
3763-
"openai:gpt-4",
3764-
"openai:gpt-4-32k",
3765-
"openai:gpt-3.5-turbo",
3766-
"openai:gpt-3.5-turbo-16k",
3767-
"anthropic:claude-3-opus-20240229",
3768-
"anthropic:claude-3-opus-latest",
3769-
"anthropic:claude-3-5-sonnet-20240620",
3770-
"anthropic:claude-3-5-sonnet-20241022",
3771-
"anthropic:claude-3-5-sonnet-latest",
3772-
"anthropic:claude-3-sonnet-20240229",
3773-
"anthropic:claude-3-haiku-20240307",
3774-
"anthropic:claude-2.1",
3775-
"anthropic:claude-2",
3776-
"anthropic:claude-instant-1",
3777-
"google:gemini-1.5-pro-latest",
3778-
"google:gemini-1.5-flash-latest",
3779-
"google:gemini-1.0-pro",
3780-
"vscode",
3781-
"xai:grok-beta"
3782-
],
3783-
"enumDescriptions": [
3784-
"OpenAI GPT-4 Omni",
3785-
"OpenAI GPT-4 Omni Mini",
3786-
"OpenAI GPT-4 Turbo with Vision",
3787-
"OpenAI GPT-4 Turbo Preview",
3788-
"OpenAI GPT-4",
3789-
"OpenAI GPT-4 32k",
3790-
"OpenAI GPT-3.5 Turbo",
3791-
"OpenAI GPT-3.5 Turbo 16k",
3792-
"Anthropic Claude 3 Opus",
3793-
"Anthropic Claude 3.5 Sonnet",
3794-
"Anthropic Claude 3 Sonnet",
3795-
"Anthropic Claude 3 Haiku",
3796-
"Anthropic Claude 2.1",
3797-
"Anthropic Claude 2",
3798-
"Anthropic Claude Instant 1.2",
3799-
"Google Gemini 1.5 Pro (Latest)",
3800-
"Google Gemini 1.5 Flash",
3801-
"Google Gemini 1.0 Pro",
3802-
"VS Code Extension"
3803-
],
3804-
"markdownDescription": "Specifies the AI model to use for GitLens' experimental AI features",
3730+
"pattern": "^((anthropic|github|google|huggingface|openai|xai):([\\w.-]+)|vscode)$",
3731+
"markdownDescription": "Specifies the AI model to use for GitLens' experimental AI features. Should be formatted as `provider:model` (e.g. `openai:gpt-4o` or `anthropic:claude-3-5-sonnet-latest`), or `vscode` for models provided by the VS Code extension API (e.g. Copilot)",
38053732
"scope": "window",
3806-
"order": 100
3733+
"order": 10,
3734+
"tags": [
3735+
"preview"
3736+
]
38073737
},
3808-
"gitlens.ai.experimental.openai.url": {
3738+
"gitlens.ai.vscode.model": {
38093739
"type": [
38103740
"string",
38113741
"null"
38123742
],
38133743
"default": null,
3814-
"markdownDescription": "Specifies a custom URL to use for access to an OpenAI model via Azure. Azure URLs should be in the following format: https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}",
3744+
"pattern": "^(.*):(.*)$",
3745+
"markdownDescription": "Specifies the VS Code provided model to use for GitLens' experimental AI features, formatted as `vendor:family`",
38153746
"scope": "window",
3816-
"order": 102
3747+
"order": 20,
3748+
"tags": [
3749+
"preview"
3750+
]
38173751
},
3818-
"gitlens.ai.experimental.vscode.model": {
3752+
"gitlens.ai.openai.url": {
38193753
"type": [
38203754
"string",
38213755
"null"
38223756
],
38233757
"default": null,
3824-
"pattern": "^(.*):(.*)$",
3825-
"markdownDescription": "Specifies the VS Code provided model to use for GitLens' experimental AI features, formatted as `vendor:family`",
3758+
"markdownDescription": "Specifies a custom URL to use for access to an OpenAI model via Azure. Azure URLs should be in the following format: https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}",
3759+
"scope": "window",
3760+
"order": 30,
3761+
"tags": [
3762+
"preview"
3763+
]
3764+
},
3765+
"gitlens.ai.explainChanges.customInstructions": {
3766+
"type": "string",
3767+
"default": null,
3768+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a summary of changes",
3769+
"scope": "window",
3770+
"order": 100,
3771+
"tags": [
3772+
"preview"
3773+
]
3774+
},
3775+
"gitlens.ai.generateCommitMessage.customInstructions": {
3776+
"type": "string",
3777+
"default": null,
3778+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a commit message",
3779+
"scope": "window",
3780+
"order": 200,
3781+
"tags": [
3782+
"preview"
3783+
]
3784+
},
3785+
"gitlens.ai.generateCommitMessage.enabled": {
3786+
"type": "boolean",
3787+
"default": true,
3788+
"markdownDescription": "Specifies whether to enable GitLens' AI-powered, on-demand commit message generation",
38263789
"scope": "window",
3827-
"order": 105
3790+
"order": 210,
3791+
"tags": [
3792+
"preview"
3793+
]
3794+
},
3795+
"gitlens.ai.generateCloudPatchMessage.customInstructions": {
3796+
"type": "string",
3797+
"default": null,
3798+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a cloud patch title and description",
3799+
"scope": "window",
3800+
"order": 300,
3801+
"tags": [
3802+
"preview"
3803+
]
3804+
},
3805+
"gitlens.ai.generateCodeSuggestMessage.customInstructions": {
3806+
"type": "string",
3807+
"default": null,
3808+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a code suggest title and description",
3809+
"scope": "window",
3810+
"order": 400,
3811+
"tags": [
3812+
"preview"
3813+
]
38283814
}
38293815
}
38303816
},
@@ -5659,7 +5645,12 @@
56595645
"commands": [
56605646
{
56615647
"command": "gitlens.generateCommitMessage",
5662-
"title": "Generate Commit Message (GitLens)...",
5648+
"title": "Generate Commit Message...",
5649+
"category": "GitLens"
5650+
},
5651+
{
5652+
"command": "gitlens.scm.generateCommitMessage",
5653+
"title": "Generate Commit Message with GitLens...",
56635654
"category": "GitLens"
56645655
},
56655656
{
@@ -5777,6 +5768,11 @@
57775768
"title": "Copy Working Changes to Worktree...",
57785769
"category": "GitLens"
57795770
},
5771+
{
5772+
"command": "gitlens.graph.generateCommitMessage",
5773+
"title": "Generate Commit Message...",
5774+
"category": "GitLens"
5775+
},
57805776
{
57815777
"command": "gitlens.createPatch",
57825778
"title": "Create Patch...",
@@ -9229,8 +9225,8 @@
92299225
"icon": "$(eye)"
92309226
},
92319227
{
9232-
"command": "gitlens.graph.openSCM",
9233-
"title": "Open Source Control",
9228+
"command": "gitlens.graph.commitViaSCM",
9229+
"title": "Commit via Source Control...",
92349230
"category": "GitLens"
92359231
},
92369232
{
@@ -12463,7 +12459,7 @@
1246312459
"when": "false"
1246412460
},
1246512461
{
12466-
"command": "gitlens.graph.openSCM",
12462+
"command": "gitlens.graph.commitViaSCM",
1246712463
"when": "false"
1246812464
},
1246912465
{
@@ -12860,7 +12856,15 @@
1286012856
},
1286112857
{
1286212858
"command": "gitlens.generateCommitMessage",
12863-
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.experimental.generateCommitMessage.enabled"
12859+
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled"
12860+
},
12861+
{
12862+
"command": "gitlens.scm.generateCommitMessage",
12863+
"when": "false"
12864+
},
12865+
{
12866+
"command": "gitlens.graph.generateCommitMessage",
12867+
"when": "false"
1286412868
},
1286512869
{
1286612870
"command": "gitlens.resetAIKey",
@@ -13213,8 +13217,8 @@
1321313217
"group": "4_gitlens@3"
1321413218
},
1321513219
{
13216-
"command": "gitlens.generateCommitMessage",
13217-
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.experimental.generateCommitMessage.enabled && config.gitlens.menus.scmRepository.generateCommitMessage",
13220+
"command": "gitlens.scm.generateCommitMessage",
13221+
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled && config.gitlens.menus.scmRepository.generateCommitMessage",
1321813222
"group": "4_gitlens@4"
1321913223
}
1322013224
],
@@ -13264,8 +13268,8 @@
1326413268
"group": "2_z_gitlens@3"
1326513269
},
1326613270
{
13267-
"command": "gitlens.generateCommitMessage",
13268-
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.experimental.generateCommitMessage.enabled && scmProvider == git && config.gitlens.menus.scmRepository.generateCommitMessage",
13271+
"command": "gitlens.scm.generateCommitMessage",
13272+
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled && scmProvider == git && config.gitlens.menus.scmRepository.generateCommitMessage",
1326913273
"group": "2_z_gitlens@4"
1327013274
},
1327113275
{
@@ -16340,9 +16344,14 @@
1634016344
"group": "3_gitlens_explore@0"
1634116345
},
1634216346
{
16343-
"command": "gitlens.graph.openSCM",
16347+
"command": "gitlens.graph.commitViaSCM",
1634416348
"when": "!listMultiSelection && webviewItem == gitlens:wip",
16345-
"group": "3_gitlens_explore@1"
16349+
"group": "1_gitlens@1"
16350+
},
16351+
{
16352+
"command": "gitlens.graph.generateCommitMessage",
16353+
"when": "!listMultiSelection && webviewItem == gitlens:wip && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled",
16354+
"group": "1_gitlens@2"
1634616355
},
1634716356
{
1634816357
"command": "gitlens.graph.openCommitOnRemote",

0 commit comments

Comments
 (0)