Skip to content

Commit da4d414

Browse files
committed
Updates explain command labels
1 parent 625a03f commit da4d414

File tree

8 files changed

+38
-50
lines changed

8 files changed

+38
-50
lines changed

contributions.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
}
2525
},
2626
"gitlens.ai.explainBranch": {
27-
"label": "Explain Branch (Preview)...",
27+
"label": "Explain Branch Changes (Preview)...",
2828
"commandPalette": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled"
2929
},
3030
"gitlens.ai.explainBranch:graph": {
31-
"label": "Explain Branch (Preview)",
31+
"label": "Explain Branch Changes (Preview)",
3232
"icon": "$(sparkle)",
3333
"menus": {
3434
"webview/context": [
@@ -41,7 +41,7 @@
4141
}
4242
},
4343
"gitlens.ai.explainBranch:views": {
44-
"label": "Explain Branch (Preview)",
44+
"label": "Explain Branch Changes (Preview)",
4545
"icon": "$(sparkle)",
4646
"menus": {
4747
"view/item/context": [
@@ -54,11 +54,11 @@
5454
}
5555
},
5656
"gitlens.ai.explainCommit": {
57-
"label": "Explain Commit...",
57+
"label": "Explain Commit Changes (Preview)...",
5858
"commandPalette": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled"
5959
},
6060
"gitlens.ai.explainCommit:graph": {
61-
"label": "Explain Commit",
61+
"label": "Explain Changes (Preview)",
6262
"icon": "$(sparkle)",
6363
"menus": {
6464
"webview/context": [
@@ -71,24 +71,24 @@
7171
}
7272
},
7373
"gitlens.ai.explainCommit:views": {
74-
"label": "Explain Commit",
74+
"label": "Explain Changes (Preview)",
7575
"icon": "$(sparkle)",
7676
"menus": {
7777
"view/item/context": [
7878
{
7979
"when": "viewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
80-
"group": "3_gitlens_ai",
80+
"group": "3_gitlens_explore",
8181
"order": 1
8282
}
8383
]
8484
}
8585
},
8686
"gitlens.ai.explainStash": {
87-
"label": "Explain Stash (Preview)...",
87+
"label": "Explain Stash Changes (Preview)...",
8888
"commandPalette": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled"
8989
},
9090
"gitlens.ai.explainStash:graph": {
91-
"label": "Explain Stash (Preview)",
91+
"label": "Explain Changes (Preview)",
9292
"icon": "$(sparkle)",
9393
"menus": {
9494
"webview/context": [
@@ -101,13 +101,13 @@
101101
}
102102
},
103103
"gitlens.ai.explainStash:views": {
104-
"label": "Explain Stash (Preview)",
104+
"label": "Explain Changes (Preview)",
105105
"icon": "$(sparkle)",
106106
"menus": {
107107
"view/item/context": [
108108
{
109109
"when": "viewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
110-
"group": "3_gitlens_ai",
110+
"group": "3_gitlens_explore",
111111
"order": 1
112112
}
113113
]

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6076,47 +6076,47 @@
60766076
},
60776077
{
60786078
"command": "gitlens.ai.explainBranch",
6079-
"title": "Explain Branch (Preview)...",
6079+
"title": "Explain Branch Changes (Preview)...",
60806080
"category": "GitLens"
60816081
},
60826082
{
60836083
"command": "gitlens.ai.explainBranch:graph",
6084-
"title": "Explain Branch (Preview)",
6084+
"title": "Explain Branch Changes (Preview)",
60856085
"icon": "$(sparkle)"
60866086
},
60876087
{
60886088
"command": "gitlens.ai.explainBranch:views",
6089-
"title": "Explain Branch (Preview)",
6089+
"title": "Explain Branch Changes (Preview)",
60906090
"icon": "$(sparkle)"
60916091
},
60926092
{
60936093
"command": "gitlens.ai.explainCommit",
6094-
"title": "Explain Commit...",
6094+
"title": "Explain Commit Changes (Preview)...",
60956095
"category": "GitLens"
60966096
},
60976097
{
60986098
"command": "gitlens.ai.explainCommit:graph",
6099-
"title": "Explain Commit",
6099+
"title": "Explain Changes (Preview)",
61006100
"icon": "$(sparkle)"
61016101
},
61026102
{
61036103
"command": "gitlens.ai.explainCommit:views",
6104-
"title": "Explain Commit",
6104+
"title": "Explain Changes (Preview)",
61056105
"icon": "$(sparkle)"
61066106
},
61076107
{
61086108
"command": "gitlens.ai.explainStash",
6109-
"title": "Explain Stash (Preview)...",
6109+
"title": "Explain Stash Changes (Preview)...",
61106110
"category": "GitLens"
61116111
},
61126112
{
61136113
"command": "gitlens.ai.explainStash:graph",
6114-
"title": "Explain Stash (Preview)",
6114+
"title": "Explain Changes (Preview)",
61156115
"icon": "$(sparkle)"
61166116
},
61176117
{
61186118
"command": "gitlens.ai.explainStash:views",
6119-
"title": "Explain Stash (Preview)",
6119+
"title": "Explain Changes (Preview)",
61206120
"icon": "$(sparkle)"
61216121
},
61226122
{
@@ -16747,16 +16747,16 @@
1674716747
"when": "viewItem =~ /gitlens:(compare:results(?!:)\\b(?!.*?\\b\\+filtered\\b)|commit|stash|results:files|status-branch:files|status:upstream:(ahead|behind))\\b/ && !listMultiSelection",
1674816748
"group": "2_gitlens_quickopen@1"
1674916749
},
16750-
{
16751-
"command": "gitlens.ai.explainCommit:views",
16752-
"when": "viewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
16753-
"group": "3_gitlens_ai@1"
16754-
},
1675516750
{
1675616751
"command": "gitlens.showInDetailsView",
1675716752
"when": "viewItem =~ /gitlens:(commit|stash)\\b/ && !listMultiSelection",
1675816753
"group": "3_gitlens_explore@0"
1675916754
},
16755+
{
16756+
"command": "gitlens.ai.explainCommit:views",
16757+
"when": "viewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
16758+
"group": "3_gitlens_explore@1"
16759+
},
1676016760
{
1676116761
"command": "gitlens.showInCommitGraph",
1676216762
"when": "viewItem =~ /gitlens:(commit|stash)\\b(?!.*?\\b\\+closed\\b)/ && !listMultiSelection",
@@ -17811,7 +17811,7 @@
1781117811
{
1781217812
"command": "gitlens.ai.explainStash:views",
1781317813
"when": "viewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
17814-
"group": "3_gitlens_ai@1"
17814+
"group": "3_gitlens_explore@1"
1781517815
},
1781617816
{
1781717817
"command": "gitlens.stashSave",

src/commands/explainBranch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ExplainBranchCommand extends GlCommandBase {
5353
repository = await getBestRepositoryOrShowPicker(
5454
gitUri,
5555
editor,
56-
'Explain Branch',
56+
'Explain Branch Changes',
5757
'Choose which repository to explain a branch from',
5858
);
5959
}
@@ -66,7 +66,7 @@ export class ExplainBranchCommand extends GlCommandBase {
6666
// If no ref is provided, show a picker to select a branch
6767
const pick = (await showReferencePicker(
6868
repository.path,
69-
'Explain Branch',
69+
'Explain Branch Changes',
7070
'Choose a branch to explain',
7171
{
7272
include: ReferencesQuickPickIncludes.Branches,

src/commands/explainCommit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class ExplainCommitCommand extends GlCommandBase {
6363
repository = await getBestRepositoryOrShowPicker(
6464
gitUri,
6565
editor,
66-
'Explain Commit',
66+
'Explain Commit Changes',
6767
'Choose which repository to explain a commit from',
6868
);
6969
}
@@ -75,7 +75,7 @@ export class ExplainCommitCommand extends GlCommandBase {
7575
if (args.rev == null) {
7676
const commitsProvider = repository.git.commits();
7777
const log = await commitsProvider.getLog();
78-
const pick = await showCommitPicker(log, 'Explain Commit', 'Choose a commit to explain');
78+
const pick = await showCommitPicker(log, 'Explain Commit Changes', 'Choose a commit to explain');
7979
if (pick?.sha == null) return;
8080
args.rev = pick.sha;
8181
commit = pick;

src/commands/explainStash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ExplainStashCommand extends GlCommandBase {
5353
repository = await getBestRepositoryOrShowPicker(
5454
gitUri,
5555
editor,
56-
'Explain Stash',
56+
'Explain Stash Changes',
5757
'Choose which repository to explain a stash from',
5858
);
5959
}
@@ -63,7 +63,7 @@ export class ExplainStashCommand extends GlCommandBase {
6363
try {
6464
let commit: GitCommit | undefined;
6565
if (args.rev == null) {
66-
const pick = await showStashPicker('Explain Stash', 'Choose a stash to explain', repository);
66+
const pick = await showStashPicker('Explain Stash Changes', 'Choose a stash to explain', repository);
6767
if (pick?.ref == null) return;
6868
args.rev = pick.ref;
6969
commit = pick;

src/webviews/apps/commitDetails/components/gl-commit-details.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,11 @@ export class GlCommitDetails extends GlDetailsBase {
125125
private renderExplainChanges() {
126126
if (this.state?.orgSettings.ai === false) return undefined;
127127

128-
if (this.isUncommitted) {
129-
return html`
130-
<gl-action-chip
131-
label="Explain Working Changes"
132-
icon="sparkle"
133-
data-action="explain-commit"
134-
aria-busy="${this.explainBusy ? 'true' : nothing}"
135-
?disabled="${this.explainBusy ? true : nothing}"
136-
@click=${this.onExplainChanges}
137-
@keydown=${this.onExplainChanges}
138-
><span>explain</span></gl-action-chip
139-
>
140-
`;
141-
}
142128
return html`
143129
<gl-action-chip
144-
label="Explain this ${this.isStash ? 'Stash' : 'Commit'}"
130+
label=${this.isUncommitted
131+
? 'Explain Working Changes'
132+
: `Explain Changes in this ${this.isStash ? 'Stash' : 'Commit'}`}
145133
icon="sparkle"
146134
data-action="explain-commit"
147135
aria-busy="${this.explainBusy ? 'true' : nothing}"

src/webviews/apps/plus/home/components/active-work.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export class GlActiveBranchCard extends GlBranchCardBase {
271271

272272
actions.push(
273273
html`<menu-item ?disabled=${isFetching} href=${this.createCommandLink('gitlens.ai.explainBranch:home')}
274-
>Explain Branch (Preview)</menu-item
274+
>Explain Branch Changes (Preview)</menu-item
275275
>`,
276276
);
277277

src/webviews/apps/plus/home/components/branch-card.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ export class GlBranchCard extends GlBranchCardBase {
10271027
} else {
10281028
actions.push(
10291029
html`<action-item
1030-
label="Explain Branch (Preview)"
1030+
label="Explain Branch Changes (Preview)"
10311031
icon="sparkle"
10321032
href=${this.createCommandLink('gitlens.ai.explainBranch:home')}
10331033
></action-item>`,
@@ -1046,7 +1046,7 @@ export class GlBranchCard extends GlBranchCardBase {
10461046
if (aiEnabled) {
10471047
actions.push(
10481048
html`<action-item
1049-
label="Explain Branch (Preview)"
1049+
label="Explain Branch Changes (Preview)"
10501050
icon="sparkle"
10511051
href=${this.createCommandLink('gitlens.ai.explainBranch:home')}
10521052
></action-item>`,

0 commit comments

Comments
 (0)