Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show export to language icon only when copilot is active VSCODE-655 #882

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
{
"command": "mdb.selectTargetForExportToLanguage",
"group": "navigation@1",
"when": "mdb.isPlayground == true"
"when": "mdb.isPlayground == true && mdb.isCopilotActive == true"
},
{
"command": "mdb.runPlayground",
Expand Down
7 changes: 7 additions & 0 deletions src/mdbExtensionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ export default class MDBExtensionController implements vscode.Disposable {
this.showOverviewPageIfRecentlyInstalled();
void this.showSurveyForEstablishedUsers();
void this.showCopilotIntroductionForEstablishedUsers();

const copilot = vscode.extensions.getExtension('GitHub.copilot');
void vscode.commands.executeCommand(
'setContext',
'mdb.isCopilotActive',
copilot?.isActive
);
}

registerCommands = (): void => {
Expand Down
2 changes: 2 additions & 0 deletions src/test/suite/participant/participant.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,8 @@ Schema:
});

suite('export to playground', function () {
this.timeout(5000);

beforeEach(async function () {
await vscode.commands.executeCommand(
'workbench.action.files.newUntitledFile'
Expand Down
Loading