Skip to content

Commit ac20da1

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 527e853 commit ac20da1

27 files changed

+991
-720
lines changed

package.json

Lines changed: 105 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3721,113 +3721,99 @@
37213721
},
37223722
{
37233723
"id": "ai",
3724-
"title": "AI (ᴇxᴘᴇʀɪᴍᴇɴᴛᴀʟ)",
3724+
"title": "AI (ᴘʀᴇᴠɪᴇᴡ)",
37253725
"order": 1000,
37263726
"properties": {
3727-
"gitlens.ai.experimental.generateCommitMessage.enabled": {
3728-
"type": "boolean",
3729-
"default": true,
3730-
"markdownDescription": "Specifies whether to enable GitLens' experimental, AI-powered, on-demand commit message generation",
3731-
"scope": "window",
3732-
"order": 1
3733-
},
3734-
"gitlens.experimental.generateCommitMessagePrompt": {
3735-
"type": "string",
3736-
"default": "Now, based on the provided code diff and any additional context, create a concise but meaningful commit message following the instructions above.",
3737-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated commit message",
3738-
"scope": "window",
3739-
"order": 2
3740-
},
3741-
"gitlens.experimental.generateCloudPatchMessagePrompt": {
3742-
"type": "string",
3743-
"default": "Now, based on the provided code diff and any additional context, create a concise but meaningful title and description following the instructions above.",
3744-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated title and description",
3745-
"scope": "window",
3746-
"order": 3
3747-
},
3748-
"gitlens.experimental.generateCodeSuggestMessagePrompt": {
3749-
"type": "string",
3750-
"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.",
3751-
"markdownDescription": "Specifies the prompt to use to tell the AI provider how to structure or format the generated title and description",
3752-
"scope": "window",
3753-
"order": 3
3754-
},
3755-
"gitlens.ai.experimental.model": {
3727+
"gitlens.ai.model": {
37563728
"type": [
37573729
"string",
37583730
"null"
37593731
],
37603732
"default": null,
3761-
"enum": [
3762-
"openai:gpt-4o",
3763-
"openai:gpt-4o-mini",
3764-
"openai:gpt-4-turbo",
3765-
"openai:gpt-4-turbo-preview",
3766-
"openai:gpt-4",
3767-
"openai:gpt-4-32k",
3768-
"openai:gpt-3.5-turbo",
3769-
"openai:gpt-3.5-turbo-16k",
3770-
"anthropic:claude-3-opus-20240229",
3771-
"anthropic:claude-3-opus-latest",
3772-
"anthropic:claude-3-5-sonnet-20240620",
3773-
"anthropic:claude-3-5-sonnet-20241022",
3774-
"anthropic:claude-3-5-sonnet-latest",
3775-
"anthropic:claude-3-sonnet-20240229",
3776-
"anthropic:claude-3-haiku-20240307",
3777-
"anthropic:claude-2.1",
3778-
"anthropic:claude-2",
3779-
"anthropic:claude-instant-1",
3780-
"google:gemini-1.5-pro-latest",
3781-
"google:gemini-1.5-flash-latest",
3782-
"google:gemini-1.0-pro",
3783-
"vscode",
3784-
"xai:grok-beta"
3785-
],
3786-
"enumDescriptions": [
3787-
"OpenAI GPT-4 Omni",
3788-
"OpenAI GPT-4 Omni Mini",
3789-
"OpenAI GPT-4 Turbo with Vision",
3790-
"OpenAI GPT-4 Turbo Preview",
3791-
"OpenAI GPT-4",
3792-
"OpenAI GPT-4 32k",
3793-
"OpenAI GPT-3.5 Turbo",
3794-
"OpenAI GPT-3.5 Turbo 16k",
3795-
"Anthropic Claude 3 Opus",
3796-
"Anthropic Claude 3.5 Sonnet",
3797-
"Anthropic Claude 3 Sonnet",
3798-
"Anthropic Claude 3 Haiku",
3799-
"Anthropic Claude 2.1",
3800-
"Anthropic Claude 2",
3801-
"Anthropic Claude Instant 1.2",
3802-
"Google Gemini 1.5 Pro (Latest)",
3803-
"Google Gemini 1.5 Flash",
3804-
"Google Gemini 1.0 Pro",
3805-
"VS Code Extension"
3806-
],
3807-
"markdownDescription": "Specifies the AI model to use for GitLens' experimental AI features",
3733+
"pattern": "^((anthropic|github|google|huggingface|openai|xai):([\\w.-]+)|vscode)$",
3734+
"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)",
38083735
"scope": "window",
3809-
"order": 100
3736+
"order": 10,
3737+
"tags": [
3738+
"preview"
3739+
]
38103740
},
3811-
"gitlens.ai.experimental.openai.url": {
3741+
"gitlens.ai.vscode.model": {
38123742
"type": [
38133743
"string",
38143744
"null"
38153745
],
38163746
"default": null,
3817-
"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}",
3747+
"pattern": "^(.*):(.*)$",
3748+
"markdownDescription": "Specifies the VS Code provided model to use for GitLens' experimental AI features, formatted as `vendor:family`",
38183749
"scope": "window",
3819-
"order": 102
3750+
"order": 20,
3751+
"tags": [
3752+
"preview"
3753+
]
38203754
},
3821-
"gitlens.ai.experimental.vscode.model": {
3755+
"gitlens.ai.openai.url": {
38223756
"type": [
38233757
"string",
38243758
"null"
38253759
],
38263760
"default": null,
3827-
"pattern": "^(.*):(.*)$",
3828-
"markdownDescription": "Specifies the VS Code provided model to use for GitLens' experimental AI features, formatted as `vendor:family`",
3761+
"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}",
3762+
"scope": "window",
3763+
"order": 30,
3764+
"tags": [
3765+
"preview"
3766+
]
3767+
},
3768+
"gitlens.ai.explainChanges.customInstructions": {
3769+
"type": "string",
3770+
"default": null,
3771+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a summary of changes",
3772+
"scope": "window",
3773+
"order": 100,
3774+
"tags": [
3775+
"preview"
3776+
]
3777+
},
3778+
"gitlens.ai.generateCommitMessage.customInstructions": {
3779+
"type": "string",
3780+
"default": null,
3781+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a commit message",
3782+
"scope": "window",
3783+
"order": 200,
3784+
"tags": [
3785+
"preview"
3786+
]
3787+
},
3788+
"gitlens.ai.generateCommitMessage.enabled": {
3789+
"type": "boolean",
3790+
"default": true,
3791+
"markdownDescription": "Specifies whether to enable GitLens' AI-powered, on-demand commit message generation",
38293792
"scope": "window",
3830-
"order": 105
3793+
"order": 210,
3794+
"tags": [
3795+
"preview"
3796+
]
3797+
},
3798+
"gitlens.ai.generateCloudPatchMessage.customInstructions": {
3799+
"type": "string",
3800+
"default": null,
3801+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a cloud patch title and description",
3802+
"scope": "window",
3803+
"order": 300,
3804+
"tags": [
3805+
"preview"
3806+
]
3807+
},
3808+
"gitlens.ai.generateCodeSuggestMessage.customInstructions": {
3809+
"type": "string",
3810+
"default": null,
3811+
"markdownDescription": "Specifies custom instructions to provide to the AI provider when generating a code suggest title and description",
3812+
"scope": "window",
3813+
"order": 400,
3814+
"tags": [
3815+
"preview"
3816+
]
38313817
}
38323818
}
38333819
},
@@ -5662,7 +5648,12 @@
56625648
"commands": [
56635649
{
56645650
"command": "gitlens.generateCommitMessage",
5665-
"title": "Generate Commit Message (GitLens)...",
5651+
"title": "Generate Commit Message...",
5652+
"category": "GitLens"
5653+
},
5654+
{
5655+
"command": "gitlens.scm.generateCommitMessage",
5656+
"title": "Generate Commit Message with GitLens...",
56665657
"category": "GitLens"
56675658
},
56685659
{
@@ -5780,6 +5771,11 @@
57805771
"title": "Copy Working Changes to Worktree...",
57815772
"category": "GitLens"
57825773
},
5774+
{
5775+
"command": "gitlens.graph.generateCommitMessage",
5776+
"title": "Generate Commit Message...",
5777+
"category": "GitLens"
5778+
},
57835779
{
57845780
"command": "gitlens.createPatch",
57855781
"title": "Create Patch...",
@@ -9232,8 +9228,8 @@
92329228
"icon": "$(eye)"
92339229
},
92349230
{
9235-
"command": "gitlens.graph.openSCM",
9236-
"title": "Open Source Control",
9231+
"command": "gitlens.graph.commitViaSCM",
9232+
"title": "Commit via Source Control...",
92379233
"category": "GitLens"
92389234
},
92399235
{
@@ -12466,7 +12462,7 @@
1246612462
"when": "false"
1246712463
},
1246812464
{
12469-
"command": "gitlens.graph.openSCM",
12465+
"command": "gitlens.graph.commitViaSCM",
1247012466
"when": "false"
1247112467
},
1247212468
{
@@ -12863,7 +12859,15 @@
1286312859
},
1286412860
{
1286512861
"command": "gitlens.generateCommitMessage",
12866-
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.experimental.generateCommitMessage.enabled"
12862+
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled"
12863+
},
12864+
{
12865+
"command": "gitlens.scm.generateCommitMessage",
12866+
"when": "false"
12867+
},
12868+
{
12869+
"command": "gitlens.graph.generateCommitMessage",
12870+
"when": "false"
1286712871
},
1286812872
{
1286912873
"command": "gitlens.resetAIKey",
@@ -13216,8 +13220,8 @@
1321613220
"group": "4_gitlens@3"
1321713221
},
1321813222
{
13219-
"command": "gitlens.generateCommitMessage",
13220-
"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",
13223+
"command": "gitlens.scm.generateCommitMessage",
13224+
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled && config.gitlens.menus.scmRepository.generateCommitMessage",
1322113225
"group": "4_gitlens@4"
1322213226
}
1322313227
],
@@ -13267,8 +13271,8 @@
1326713271
"group": "2_z_gitlens@3"
1326813272
},
1326913273
{
13270-
"command": "gitlens.generateCommitMessage",
13271-
"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",
13274+
"command": "gitlens.scm.generateCommitMessage",
13275+
"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",
1327213276
"group": "2_z_gitlens@4"
1327313277
},
1327413278
{
@@ -16343,9 +16347,14 @@
1634316347
"group": "3_gitlens_explore@0"
1634416348
},
1634516349
{
16346-
"command": "gitlens.graph.openSCM",
16350+
"command": "gitlens.graph.commitViaSCM",
1634716351
"when": "!listMultiSelection && webviewItem == gitlens:wip",
16348-
"group": "3_gitlens_explore@1"
16352+
"group": "1_gitlens@1"
16353+
},
16354+
{
16355+
"command": "gitlens.graph.generateCommitMessage",
16356+
"when": "!listMultiSelection && webviewItem == gitlens:wip && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && gitlens:gk:organization:ai:enabled && config.gitlens.ai.generateCommitMessage.enabled",
16357+
"group": "1_gitlens@2"
1634916358
},
1635016359
{
1635116360
"command": "gitlens.graph.openCommitOnRemote",

0 commit comments

Comments
 (0)