Skip to content

Commit 1825cd9

Browse files
committed
Ensure we hide things when local folders are opened in github.dev (#17812)
1 parent b7c15f2 commit 1825cd9

File tree

2 files changed

+47
-46
lines changed

2 files changed

+47
-46
lines changed

news/2 Fixes/17811.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure we filter out unsupported features in web scenario using `shellExecutionSupported` context key.

package.json

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@
16081608
"variables": {
16091609
"pickProcess": "python.pickLocalProcess"
16101610
},
1611-
"when": "!virtualWorkspace"
1611+
"when": "!virtualWorkspace && shellExecutionSupported"
16121612
}
16131613
],
16141614
"grammars": [
@@ -1712,108 +1712,108 @@
17121712
"category": "Python",
17131713
"command": "python.analysis.clearCache",
17141714
"title": "%python.command.python.analysis.clearCache.title%",
1715-
"when": "!virtualWorkspace"
1715+
"when": "!virtualWorkspace && shellExecutionSupported"
17161716
},
17171717
{
17181718
"category": "Python",
17191719
"command": "python.analysis.restartLanguageServer",
17201720
"title": "%python.command.python.analysis.restartLanguageServer.title%",
1721-
"when": "!virtualWorkspace"
1721+
"when": "!virtualWorkspace && shellExecutionSupported"
17221722
},
17231723
{
17241724
"category": "Python",
17251725
"command": "python.clearPersistentStorage",
17261726
"title": "%python.command.python.clearPersistentStorage.title%",
1727-
"when": "!virtualWorkspace"
1727+
"when": "!virtualWorkspace && shellExecutionSupported"
17281728
},
17291729
{
17301730
"category": "Python",
17311731
"command": "python.clearWorkspaceInterpreter",
17321732
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
1733-
"when": "!virtualWorkspace"
1733+
"when": "!virtualWorkspace && shellExecutionSupported"
17341734
},
17351735
{
17361736
"category": "Python",
17371737
"command": "python.configureTests",
17381738
"title": "%python.command.python.configureTests.title%",
1739-
"when": "!virtualWorkspace"
1739+
"when": "!virtualWorkspace && shellExecutionSupported"
17401740
},
17411741
{
17421742
"category": "Python",
17431743
"command": "python.createTerminal",
17441744
"title": "%python.command.python.createTerminal.title%",
1745-
"when": "!virtualWorkspace"
1745+
"when": "!virtualWorkspace && shellExecutionSupported"
17461746
},
17471747
{
17481748
"category": "Python",
17491749
"command": "python.enableLinting",
17501750
"title": "%python.command.python.enableLinting.title%",
1751-
"when": "!virtualWorkspace"
1751+
"when": "!virtualWorkspace && shellExecutionSupported"
17521752
},
17531753
{
17541754
"category": "Python",
17551755
"command": "python.enableSourceMapSupport",
17561756
"title": "%python.command.python.enableSourceMapSupport.title%",
1757-
"when": "!virtualWorkspace"
1757+
"when": "!virtualWorkspace && shellExecutionSupported"
17581758
},
17591759
{
17601760
"category": "Python",
17611761
"command": "python.execInTerminal",
17621762
"title": "%python.command.python.execInTerminal.title%",
1763-
"when": "!virtualWorkspace"
1763+
"when": "!virtualWorkspace && shellExecutionSupported"
17641764
},
17651765
{
17661766
"category": "Python",
17671767
"command": "python.execInTerminal-icon",
17681768
"icon": "$(play)",
17691769
"title": "%python.command.python.execInTerminal.title%",
1770-
"when": "!virtualWorkspace"
1770+
"when": "!virtualWorkspace && shellExecutionSupported"
17711771
},
17721772
{
17731773
"category": "Python",
17741774
"command": "python.debugInTerminal",
17751775
"icon": "$(debug-alt)",
17761776
"title": "%python.command.python.debugInTerminal.title%",
1777-
"when": "!virtualWorkspace"
1777+
"when": "!virtualWorkspace && shellExecutionSupported"
17781778
},
17791779
{
17801780
"category": "Python",
17811781
"command": "python.execSelectionInDjangoShell",
17821782
"title": "%python.command.python.execSelectionInDjangoShell.title%",
1783-
"when": "!virtualWorkspace"
1783+
"when": "!virtualWorkspace && shellExecutionSupported"
17841784
},
17851785
{
17861786
"category": "Python",
17871787
"command": "python.execSelectionInTerminal",
17881788
"title": "%python.command.python.execSelectionInTerminal.title%",
1789-
"when": "!virtualWorkspace"
1789+
"when": "!virtualWorkspace && shellExecutionSupported"
17901790
},
17911791
{
17921792
"category": "Python",
17931793
"command": "python.goToPythonObject",
17941794
"title": "%python.command.python.goToPythonObject.title%",
1795-
"when": "!virtualWorkspace"
1795+
"when": "!virtualWorkspace && shellExecutionSupported"
17961796
},
17971797
{
17981798
"category": "Python",
17991799
"command": "python.launchTensorBoard",
18001800
"title": "%python.command.python.launchTensorBoard.title%",
1801-
"when": "!virtualWorkspace"
1801+
"when": "!virtualWorkspace && shellExecutionSupported"
18021802
},
18031803
{
18041804
"category": "Python",
18051805
"command": "python.refreshTensorBoard",
18061806
"enablement": "python.hasActiveTensorBoardSession",
18071807
"icon": "$(refresh)",
18081808
"title": "%python.command.python.refreshTensorBoard.title%",
1809-
"when": "!virtualWorkspace"
1809+
"when": "!virtualWorkspace && shellExecutionSupported"
18101810
},
18111811
{
18121812
"category": "Test",
18131813
"command": "python.refreshTests",
18141814
"icon": "$(refresh)",
18151815
"title": "%python.command.python.refreshTests.title%",
1816-
"when": "!virtualWorkspace"
1816+
"when": "!virtualWorkspace && shellExecutionSupported"
18171817
},
18181818
{
18191819
"category": "Test",
@@ -1823,166 +1823,166 @@
18231823
"light": "resources/light/discovering-tests.svg"
18241824
},
18251825
"title": "%python.command.python.refreshingTests.title%",
1826-
"when": "!virtualWorkspace"
1826+
"when": "!virtualWorkspace && shellExecutionSupported"
18271827
},
18281828
{
18291829
"category": "Test",
18301830
"command": "python.stopRefreshingTests",
18311831
"icon": "$(stop-circle)",
18321832
"title": "%python.command.python.stopRefreshingTests.title%",
1833-
"when": "!virtualWorkspace"
1833+
"when": "!virtualWorkspace && shellExecutionSupported"
18341834
},
18351835
{
18361836
"category": "Python",
18371837
"command": "python.reportIssue",
18381838
"title": "%python.command.python.reportIssue.title%",
1839-
"when": "!virtualWorkspace"
1839+
"when": "!virtualWorkspace && shellExecutionSupported"
18401840
},
18411841
{
18421842
"category": "Test",
18431843
"command": "testing.reRunFailTests",
18441844
"icon": "$(run-errors)",
18451845
"title": "%python.command.testing.rerunFailedTests.title%",
1846-
"when": "!virtualWorkspace"
1846+
"when": "!virtualWorkspace && shellExecutionSupported"
18471847
},
18481848
{
18491849
"category": "Python",
18501850
"command": "python.runLinting",
18511851
"title": "%python.command.python.runLinting.title%",
1852-
"when": "!virtualWorkspace"
1852+
"when": "!virtualWorkspace && shellExecutionSupported"
18531853
},
18541854
{
18551855
"category": "Python",
18561856
"command": "python.setInterpreter",
18571857
"title": "%python.command.python.setInterpreter.title%",
1858-
"when": "!virtualWorkspace"
1858+
"when": "!virtualWorkspace && shellExecutionSupported"
18591859
},
18601860
{
18611861
"category": "Python",
18621862
"command": "python.setLinter",
18631863
"title": "%python.command.python.setLinter.title%",
1864-
"when": "!virtualWorkspace"
1864+
"when": "!virtualWorkspace && shellExecutionSupported"
18651865
},
18661866
{
18671867
"category": "Python Refactor",
18681868
"command": "python.sortImports",
18691869
"title": "%python.command.python.sortImports.title%",
1870-
"when": "!virtualWorkspace"
1870+
"when": "!virtualWorkspace && shellExecutionSupported"
18711871
},
18721872
{
18731873
"category": "Python",
18741874
"command": "python.startREPL",
18751875
"title": "%python.command.python.startREPL.title%",
1876-
"when": "!virtualWorkspace"
1876+
"when": "!virtualWorkspace && shellExecutionSupported"
18771877
},
18781878
{
18791879
"category": "Python",
18801880
"command": "python.viewLanguageServerOutput",
18811881
"enablement": "python.hasLanguageServerOutputChannel",
18821882
"title": "%python.command.python.viewLanguageServerOutput.title%",
1883-
"when": "!virtualWorkspace"
1883+
"when": "!virtualWorkspace && shellExecutionSupported"
18841884
},
18851885
{
18861886
"category": "Python",
18871887
"command": "python.clearWorkspaceInterpreter",
18881888
"title": "%python.command.python.clearWorkspaceInterpreter.title%",
1889-
"when": "!virtualWorkspace"
1889+
"when": "!virtualWorkspace && shellExecutionSupported"
18901890
},
18911891
{
18921892
"category": "Python",
18931893
"command": "python.switchOffInsidersChannel",
18941894
"title": "%python.command.python.switchOffInsidersChannel.title%",
1895-
"when": "config.python.insidersChannel != 'default' && !virtualWorkspace"
1895+
"when": "config.python.insidersChannel != 'default' && !virtualWorkspace && shellExecutionSupported"
18961896
},
18971897
{
18981898
"category": "Python",
18991899
"command": "python.switchToDailyChannel",
19001900
"title": "%python.command.python.switchToDailyChannel.title%",
1901-
"when": "config.python.insidersChannel != 'daily' && !virtualWorkspace"
1901+
"when": "config.python.insidersChannel != 'daily' && !virtualWorkspace && shellExecutionSupported"
19021902
},
19031903
{
19041904
"category": "Python",
19051905
"command": "python.switchToWeeklyChannel",
19061906
"title": "%python.command.python.switchToWeeklyChannel.title%",
1907-
"when": "config.python.insidersChannel != 'weekly' && !virtualWorkspace"
1907+
"when": "config.python.insidersChannel != 'weekly' && !virtualWorkspace && shellExecutionSupported"
19081908
},
19091909
{
19101910
"category": "Python",
19111911
"command": "python.viewOutput",
19121912
"title": "%python.command.python.viewOutput.title%",
1913-
"when": "!virtualWorkspace"
1913+
"when": "!virtualWorkspace && shellExecutionSupported"
19141914
}
19151915
],
19161916
"editor/context": [
19171917
{
19181918
"command": "python.execInTerminal",
19191919
"group": "Python",
1920-
"when": "resourceLangId == python && !virtualWorkspace"
1920+
"when": "resourceLangId == python && !virtualWorkspace && shellExecutionSupported"
19211921
},
19221922
{
19231923
"command": "python.execSelectionInDjangoShell",
19241924
"group": "Python",
1925-
"when": "editorHasSelection && editorLangId == python && python.isDjangoProject && !virtualWorkspace"
1925+
"when": "editorHasSelection && editorLangId == python && python.isDjangoProject && !virtualWorkspace && shellExecutionSupported"
19261926
},
19271927
{
19281928
"command": "python.execSelectionInTerminal",
19291929
"group": "Python",
1930-
"when": "editorFocus && editorLangId == python && !virtualWorkspace"
1930+
"when": "editorFocus && editorLangId == python && !virtualWorkspace && shellExecutionSupported"
19311931
},
19321932
{
19331933
"command": "python.sortImports",
19341934
"group": "Refactor",
19351935
"title": "Refactor: Sort Imports",
1936-
"when": "editorLangId == python && !notebookEditorFocused && !virtualWorkspace"
1936+
"when": "editorLangId == python && !notebookEditorFocused && !virtualWorkspace && shellExecutionSupported"
19371937
}
19381938
],
19391939
"editor/title": [
19401940
{
19411941
"command": "python.refreshTensorBoard",
19421942
"group": "navigation@0",
1943-
"when": "python.hasActiveTensorBoardSession && !virtualWorkspace"
1943+
"when": "python.hasActiveTensorBoardSession && !virtualWorkspace && shellExecutionSupported"
19441944
}
19451945
],
19461946
"editor/title/run": [
19471947
{
19481948
"command": "python.execInTerminal-icon",
19491949
"group": "navigation@0",
19501950
"title": "%python.command.python.execInTerminal.title%",
1951-
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
1951+
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported"
19521952
},
19531953
{
19541954
"command": "python.debugInTerminal",
19551955
"group": "navigation@1",
19561956
"title": "%python.command.python.debugInTerminal.title%",
1957-
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace"
1957+
"when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported"
19581958
}
19591959
],
19601960
"explorer/context": [
19611961
{
19621962
"command": "python.execInTerminal",
19631963
"group": "Python",
1964-
"when": "resourceLangId == python && !virtualWorkspace"
1964+
"when": "resourceLangId == python && !virtualWorkspace && shellExecutionSupported"
19651965
}
19661966
],
19671967
"view/title": [
19681968
{
19691969
"command": "python.refreshTests",
1970-
"when": "view == workbench.view.testing && !refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
1970+
"when": "view == workbench.view.testing && !refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
19711971
"group": "navigation@0"
19721972
},
19731973
{
19741974
"command": "python.refreshingTests",
1975-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
1975+
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
19761976
"group": "navigation@0"
19771977
},
19781978
{
19791979
"command": "python.stopRefreshingTests",
1980-
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace",
1980+
"when": "view == workbench.view.testing && refreshingTests && inShowRefreshingTestsExperiment && !virtualWorkspace && shellExecutionSupported",
19811981
"group": "navigation@0"
19821982
},
19831983
{
19841984
"command": "testing.reRunFailTests",
1985-
"when": "view == workbench.view.testing && hasFailedTests && inShowRunFailedTestsExperiment && !virtualWorkspace",
1985+
"when": "view == workbench.view.testing && hasFailedTests && inShowRunFailedTestsExperiment && !virtualWorkspace && shellExecutionSupported",
19861986
"group": "navigation@1"
19871987
}
19881988
]
@@ -1991,7 +1991,7 @@
19911991
{
19921992
"view": "testing",
19931993
"contents": "Configure a test framework to see your tests here.\n[Configure Python Tests](command:python.configureTests)",
1994-
"when": "!virtualWorkspace"
1994+
"when": "!virtualWorkspace && shellExecutionSupported"
19951995
}
19961996
],
19971997
"yamlValidation": [

0 commit comments

Comments
 (0)