Skip to content

Commit 8be1dc0

Browse files
committed
Adds repo switching support to Visual History
Adds visual history commands to SCM Reorganizes SCM menu structure
1 parent 43012df commit 8be1dc0

File tree

17 files changed

+327
-146
lines changed

17 files changed

+327
-146
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1919
- Adds updated AI model support for GitLens' AI features
2020
- Adds GPT-5 family (GPT-5, GPT-5 Mini, GPT-5 Nano), and Claude 4.1 Opus models
2121
- Add Azure DevOps Server integration support ([#4478](https://github.com/gitkraken/vscode-gitlens/issues/4478))
22+
- Adds ability to switch between open repositories on the _Visual History_
23+
- Adds _Visualize Repository History_ commands to the SCM menus
2224

2325
### Changed
2426

contributions.json

Lines changed: 95 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
{
1212
"when": "gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && config.gitlens.menus.scmRepository.authors",
1313
"group": "4_gitlens",
14-
"order": 1
14+
"order": 3
1515
}
1616
],
1717
"scm/title": [
1818
{
1919
"when": "scmProvider == git && gitlens:enabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && config.gitlens.menus.scmRepository.authors",
2020
"group": "2_gitlens",
21-
"order": 1
21+
"order": 10
2222
}
2323
]
2424
}
@@ -34,8 +34,8 @@
3434
"webview/context": [
3535
{
3636
"when": "webviewItem =~ /gitlens:branch\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
37-
"group": "1_gitlens_actions_4",
38-
"order": 100
37+
"group": "1_gitlens_ai",
38+
"order": 10
3939
}
4040
]
4141
}
@@ -47,8 +47,8 @@
4747
"view/item/context": [
4848
{
4949
"when": "viewItem =~ /gitlens:branch\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
50-
"group": "3_gitlens_ai",
51-
"order": 1
50+
"group": "1_gitlens_ai",
51+
"order": 10
5252
}
5353
]
5454
}
@@ -64,8 +64,8 @@
6464
"webview/context": [
6565
{
6666
"when": "webviewItem =~ /gitlens:commit\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
67-
"group": "1_gitlens_actions_3",
68-
"order": 1
67+
"group": "1_gitlens_ai",
68+
"order": 10
6969
}
7070
]
7171
}
@@ -77,8 +77,8 @@
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_explore",
81-
"order": 1
80+
"group": "1_gitlens_ai",
81+
"order": 10
8282
}
8383
]
8484
}
@@ -94,8 +94,8 @@
9494
"webview/context": [
9595
{
9696
"when": "webviewItem =~ /gitlens:stash\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
97-
"group": "1_gitlens_actions_3",
98-
"order": 1
97+
"group": "1_gitlens_ai",
98+
"order": 10
9999
}
100100
]
101101
}
@@ -107,8 +107,8 @@
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_explore",
111-
"order": 1
110+
"group": "1_gitlens_ai",
111+
"order": 10
112112
}
113113
]
114114
}
@@ -124,8 +124,8 @@
124124
"webview/context": [
125125
{
126126
"when": "webviewItem == gitlens:wip && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
127-
"group": "1_gitlens",
128-
"order": 2
127+
"group": "1_gitlens_ai",
128+
"order": 10
129129
}
130130
]
131131
}
@@ -138,7 +138,7 @@
138138
{
139139
"when": "viewItem =~ /gitlens:(worktree\\b(?=.*?\\b\\+working\\b)|uncommitted)\\b/ && !listMultiSelection && !gitlens:readonly && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
140140
"group": "3_gitlens_ai",
141-
"order": 1
141+
"order": 10
142142
}
143143
]
144144
}
@@ -244,8 +244,8 @@
244244
"webview/context": [
245245
{
246246
"when": "webviewItem =~ /gitlens:(branch|tag)\\b/ && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
247-
"group": "1_gitlens_actions_3",
248-
"order": 100
247+
"group": "1_gitlens_ai",
248+
"order": 5
249249
}
250250
]
251251
}
@@ -257,8 +257,8 @@
257257
"view/item/context": [
258258
{
259259
"when": "viewItem =~ /gitlens:(branch|tag)\\b/ && !gitlens:untrusted && gitlens:gk:organization:ai:enabled",
260-
"group": "1_gitlens_actions_3",
261-
"order": 100
260+
"group": "1_gitlens_ai",
261+
"order": 5
262262
}
263263
]
264264
}
@@ -739,10 +739,10 @@
739739
"label": "Copy Changes (Patch)",
740740
"commandPalette": "gitlens:enabled && !gitlens:untrusted && !gitlens:hasVirtualFolders",
741741
"menus": {
742-
"git.commit": [
742+
"git.changes": [
743743
{
744-
"when": "gitlens:enabled && scmProvider == git && config.gitlens.menus.scmRepository.patch",
745-
"group": "4_gitlens",
744+
"when": "gitlens:enabled && scmProvider == git",
745+
"group": "gitlens",
746746
"order": 3
747747
}
748748
],
@@ -767,13 +767,6 @@
767767
"order": 97
768768
}
769769
],
770-
"scm/title": [
771-
{
772-
"when": "scmProvider == git && gitlens:enabled && config.gitlens.menus.scmRepository.patch",
773-
"group": "2_z_gitlens",
774-
"order": 2
775-
}
776-
],
777770
"view/item/context": [
778771
{
779772
"when": "viewItem =~ /gitlens:(commit|stash)\\b/ && !listMultiSelection && !gitlens:untrusted && !gitlens:hasVirtualFolders",
@@ -3860,10 +3853,10 @@
38603853
"label": "Share as Cloud Patch...",
38613854
"commandPalette": "gitlens:enabled && gitlens:gk:organization:drafts:enabled && config.gitlens.cloudPatches.enabled",
38623855
"menus": {
3863-
"git.commit": [
3856+
"git.changes": [
38643857
{
3865-
"when": "gitlens:enabled && scmProvider == git && config.gitlens.menus.scmRepository.patch",
3866-
"group": "4_gitlens",
3858+
"when": "gitlens:enabled && scmProvider == git",
3859+
"group": "gitlens",
38673860
"order": 5
38683861
}
38693862
],
@@ -3880,13 +3873,6 @@
38803873
"group": "7_cutcopypaste",
38813874
"order": 98
38823875
}
3883-
],
3884-
"scm/title": [
3885-
{
3886-
"when": "scmProvider == git && gitlens:enabled && config.gitlens.menus.scmRepository.patch",
3887-
"group": "2_z_gitlens",
3888-
"order": 3
3889-
}
38903876
]
38913877
}
38923878
},
@@ -3916,7 +3902,7 @@
39163902
{
39173903
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !listMultiSelection",
39183904
"group": "3_gitlens_explore",
3919-
"order": 2
3905+
"order": 1
39203906
},
39213907
{
39223908
"when": "viewItem =~ /gitlens:repository\\b/ && !listMultiSelection",
@@ -3969,7 +3955,7 @@
39693955
],
39703956
"scm/sourceControl": [
39713957
{
3972-
"when": "scmProvider == git && gitlens:enabled && config.gitlens.menus.scm.graph && !gitlens:plus:disabled && scmProviderRootUri not in gitlens:plus:disallowedRepos",
3958+
"when": "scmProvider == git && gitlens:enabled && !gitlens:plus:disabled && scmProviderRootUri not in gitlens:plus:disallowedRepos && config.gitlens.menus.scm.graph",
39733959
"group": "6_gitlens",
39743960
"order": 1
39753961
}
@@ -3995,23 +3981,13 @@
39953981
{
39963982
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !listMultiSelection && !gitlens:plus:disabled",
39973983
"group": "3_gitlens_explore",
3998-
"order": 1
3999-
},
4000-
{
4001-
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
4002-
"group": "inline",
4003-
"order": 11
3984+
"order": 2
40043985
},
40053986
{
40063987
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
40073988
"group": "inline",
40083989
"order": 11
40093990
},
4010-
{
4011-
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
4012-
"group": "8_gitlens_toggles",
4013-
"order": 0
4014-
},
40153991
{
40163992
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
40173993
"group": "8_gitlens_toggles",
@@ -16085,6 +16061,71 @@
1608516061
}
1608616062
]
1608716063
}
16064+
},
16065+
"gitlens.visualizeHistory.repo:scm": {
16066+
"label": "Visualize Repository History",
16067+
"icon": "$(graph-scatter)",
16068+
"menus": {
16069+
"scm/sourceControl": [
16070+
{
16071+
"when": "scmProvider == git && gitlens:enabled && !gitlens:plus:disabled && scmProviderRootUri not in gitlens:plus:disallowedRepos && config.gitlens.menus.scm.visualHistory",
16072+
"group": "6_gitlens",
16073+
"order": 1
16074+
}
16075+
],
16076+
"scm/title": [
16077+
{
16078+
"when": "scmProvider == git && gitlens:enabled && !gitlens:plus:disabled && scmProviderRootUri not in gitlens:plus:disallowedRepos && config.gitlens.menus.scmRepositoryInline.visualHistory",
16079+
"group": "navigation",
16080+
"order": 0
16081+
},
16082+
{
16083+
"when": "scmProvider == git && gitlens:enabled && !gitlens:plus:disabled && scmProviderRootUri not in gitlens:plus:disallowedRepos && config.gitlens.menus.scmRepository.visualHistory",
16084+
"group": "2_z_gitlens",
16085+
"order": 5
16086+
}
16087+
]
16088+
}
16089+
},
16090+
"gitlens.visualizeHistory.repo:views": {
16091+
"label": "Visualize Repository History",
16092+
"icon": "$(graph-scatter)",
16093+
"menus": {
16094+
"view/item/context": [
16095+
{
16096+
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !gitlens:plus:disabled",
16097+
"group": "inline",
16098+
"order": 99
16099+
},
16100+
{
16101+
"when": "viewItem =~ /gitlens:repo-folder\\b/ && !listMultiSelection && !gitlens:plus:disabled",
16102+
"group": "3_gitlens_explore",
16103+
"order": 3
16104+
},
16105+
{
16106+
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
16107+
"group": "inline",
16108+
"order": 10
16109+
},
16110+
{
16111+
"when": "viewItem == gitlens:views:commits && !gitlens:plus:disabled",
16112+
"group": "8_gitlens_toggles",
16113+
"order": 1
16114+
}
16115+
],
16116+
"view/title": [
16117+
{
16118+
"when": "view == gitlens.views.commits && !gitlens:plus:disabled",
16119+
"group": "navigation",
16120+
"order": 10
16121+
},
16122+
{
16123+
"when": "view == gitlens.views.commits && !gitlens:plus:disabled",
16124+
"group": "8_gitlens_toggles",
16125+
"order": 1
16126+
}
16127+
]
16128+
}
1608816129
}
1608916130
},
1609016131
"submenus": {

contributions.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
"explorer/context",
235235
"extension/context",
236236
"git.commit",
237+
"git.changes",
237238
"menuBar/edit/copy",
238239
"scm/title",
239240
"scm/sourceControl",

docs/telemetry-events.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)