Skip to content

Commit 89c0e6c

Browse files
committed
Updates AI command ids for the Commit Graph
1 parent 0d54fac commit 89c0e6c

File tree

4 files changed

+70
-70
lines changed

4 files changed

+70
-70
lines changed

contributions.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,42 @@
13741374
]
13751375
}
13761376
},
1377+
"gitlens.graph.ai.explainCommit": {
1378+
"label": "Explain Commit",
1379+
"menus": {
1380+
"webview/context": [
1381+
{
1382+
"when": "webviewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
1383+
"group": "1_gitlens_actions_3",
1384+
"order": 1
1385+
}
1386+
]
1387+
}
1388+
},
1389+
"gitlens.graph.ai.explainStash": {
1390+
"label": "Explain Stash (Preview)",
1391+
"menus": {
1392+
"webview/context": [
1393+
{
1394+
"when": "webviewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
1395+
"group": "1_gitlens_actions_3",
1396+
"order": 1
1397+
}
1398+
]
1399+
}
1400+
},
1401+
"gitlens.graph.ai.explainWip": {
1402+
"label": "Explain Working Changes (Preview)",
1403+
"menus": {
1404+
"webview/context": [
1405+
{
1406+
"when": "webviewItem =~ /gitlens:wip\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
1407+
"group": "1_gitlens_actions_3",
1408+
"order": 1
1409+
}
1410+
]
1411+
}
1412+
},
13771413
"gitlens.graph.ai.generateChangelogFrom": {
13781414
"label": "Generate Changelog (Preview)...",
13791415
"icon": "$(sparkle)",
@@ -2001,42 +2037,6 @@
20012037
]
20022038
}
20032039
},
2004-
"gitlens.graph.explainCommit": {
2005-
"label": "Explain Commit",
2006-
"menus": {
2007-
"webview/context": [
2008-
{
2009-
"when": "webviewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
2010-
"group": "1_gitlens_actions_3",
2011-
"order": 1
2012-
}
2013-
]
2014-
}
2015-
},
2016-
"gitlens.graph.explainStash": {
2017-
"label": "Explain Stash (Preview)",
2018-
"menus": {
2019-
"webview/context": [
2020-
{
2021-
"when": "webviewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
2022-
"group": "1_gitlens_actions_3",
2023-
"order": 1
2024-
}
2025-
]
2026-
}
2027-
},
2028-
"gitlens.graph.explainWip": {
2029-
"label": "Explain Working Changes (Preview)",
2030-
"menus": {
2031-
"webview/context": [
2032-
{
2033-
"when": "webviewItem =~ /gitlens:wip\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
2034-
"group": "1_gitlens_actions_3",
2035-
"order": 1
2036-
}
2037-
]
2038-
}
2039-
},
20402040
"gitlens.graph.fetch": {
20412041
"label": "Fetch",
20422042
"icon": "$(repo-fetch)",

package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6624,6 +6624,18 @@
66246624
"title": "Add as Co-author",
66256625
"icon": "$(person-add)"
66266626
},
6627+
{
6628+
"command": "gitlens.graph.ai.explainCommit",
6629+
"title": "Explain Commit"
6630+
},
6631+
{
6632+
"command": "gitlens.graph.ai.explainStash",
6633+
"title": "Explain Stash (Preview)"
6634+
},
6635+
{
6636+
"command": "gitlens.graph.ai.explainWip",
6637+
"title": "Explain Working Changes (Preview)"
6638+
},
66276639
{
66286640
"command": "gitlens.graph.ai.generateChangelogFrom",
66296641
"title": "Generate Changelog (Preview)...",
@@ -6852,18 +6864,6 @@
68526864
"icon": "$(trash)",
68536865
"enablement": "!operationInProgress"
68546866
},
6855-
{
6856-
"command": "gitlens.graph.explainCommit",
6857-
"title": "Explain Commit"
6858-
},
6859-
{
6860-
"command": "gitlens.graph.explainStash",
6861-
"title": "Explain Stash (Preview)"
6862-
},
6863-
{
6864-
"command": "gitlens.graph.explainWip",
6865-
"title": "Explain Working Changes (Preview)"
6866-
},
68676867
{
68686868
"command": "gitlens.graph.fetch",
68696869
"title": "Fetch",
@@ -10821,6 +10821,18 @@
1082110821
"command": "gitlens.graph.addAuthor",
1082210822
"when": "false"
1082310823
},
10824+
{
10825+
"command": "gitlens.graph.ai.explainCommit",
10826+
"when": "false"
10827+
},
10828+
{
10829+
"command": "gitlens.graph.ai.explainStash",
10830+
"when": "false"
10831+
},
10832+
{
10833+
"command": "gitlens.graph.ai.explainWip",
10834+
"when": "false"
10835+
},
1082410836
{
1082510837
"command": "gitlens.graph.ai.generateChangelogFrom",
1082610838
"when": "false"
@@ -11013,18 +11025,6 @@
1101311025
"command": "gitlens.graph.deleteTag",
1101411026
"when": "false"
1101511027
},
11016-
{
11017-
"command": "gitlens.graph.explainCommit",
11018-
"when": "false"
11019-
},
11020-
{
11021-
"command": "gitlens.graph.explainStash",
11022-
"when": "false"
11023-
},
11024-
{
11025-
"command": "gitlens.graph.explainWip",
11026-
"when": "false"
11027-
},
1102811028
{
1102911029
"command": "gitlens.graph.fetch",
1103011030
"when": "false"
@@ -20186,7 +20186,7 @@
2018620186
"group": "1_gitlens_actions_1@4"
2018720187
},
2018820188
{
20189-
"command": "gitlens.graph.explainCommit",
20189+
"command": "gitlens.graph.ai.explainCommit",
2019020190
"when": "webviewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
2019120191
"group": "1_gitlens_actions_3@1"
2019220192
},
@@ -20351,7 +20351,7 @@
2035120351
"group": "1_gitlens_actions@3"
2035220352
},
2035320353
{
20354-
"command": "gitlens.graph.explainStash",
20354+
"command": "gitlens.graph.ai.explainStash",
2035520355
"when": "webviewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
2035620356
"group": "1_gitlens_actions_3@1"
2035720357
},
@@ -20416,8 +20416,8 @@
2041620416
"group": "1_gitlens_actions@4"
2041720417
},
2041820418
{
20419-
"command": "gitlens.graph.explainWip",
20420-
"when": "webviewItem =~ /gitlens:wip\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
20419+
"command": "gitlens.graph.ai.explainWip",
20420+
"when": "webviewItem =~ /gitlens:wip\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled && config.gitlens.ai.enabled",
2042120421
"group": "1_gitlens_actions_3@1"
2042220422
},
2042320423
{

src/constants.commands.generated.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export type ContributedCommands =
2323
| 'gitlens.copyRemoteRepositoryUrl'
2424
| 'gitlens.ghpr.views.openOrCreateWorktree'
2525
| 'gitlens.graph.addAuthor'
26+
| 'gitlens.graph.ai.explainCommit'
27+
| 'gitlens.graph.ai.explainStash'
28+
| 'gitlens.graph.ai.explainWip'
2629
| 'gitlens.graph.ai.generateChangelogFrom'
2730
| 'gitlens.graph.ai.generateCommitMessage'
2831
| 'gitlens.graph.associateIssueWithBranch'
@@ -71,9 +74,6 @@ export type ContributedCommands =
7174
| 'gitlens.graph.createWorktree'
7275
| 'gitlens.graph.deleteBranch'
7376
| 'gitlens.graph.deleteTag'
74-
| 'gitlens.graph.explainCommit'
75-
| 'gitlens.graph.explainStash'
76-
| 'gitlens.graph.explainWip'
7777
| 'gitlens.graph.fetch'
7878
| 'gitlens.graph.hideLocalBranch'
7979
| 'gitlens.graph.hideRefGroup'

src/webviews/plus/graph/graphWebview.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,9 @@ export class GraphWebviewProvider implements WebviewProvider<State, State, Graph
685685
this.copyWorkingChangesToWorktree,
686686
),
687687
this.host.registerWebviewCommand('gitlens.graph.ai.generateCommitMessage', this.generateCommitMessage),
688-
this.host.registerWebviewCommand('gitlens.graph.explainCommit', this.explainCommit),
689-
this.host.registerWebviewCommand('gitlens.graph.explainStash', this.explainStash),
690-
this.host.registerWebviewCommand('gitlens.graph.explainWip', this.explainWip),
688+
this.host.registerWebviewCommand('gitlens.graph.ai.explainCommit', this.explainCommit),
689+
this.host.registerWebviewCommand('gitlens.graph.ai.explainStash', this.explainStash),
690+
this.host.registerWebviewCommand('gitlens.graph.ai.explainWip', this.explainWip),
691691

692692
this.host.registerWebviewCommand('gitlens.graph.compareSelectedCommits.multi', this.compareSelectedCommits),
693693
this.host.registerWebviewCommand('gitlens.graph.abortPausedOperation', this.abortPausedOperation),

0 commit comments

Comments
 (0)