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

Rename to ghcpfa #946

Merged
merged 1 commit into from
Oct 28, 2024
Merged
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
16 changes: 8 additions & 8 deletions src/gitHubCopilotForAzure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import { localize } from "./utils/localize";

const ghcpExtensionId = 'github.copilot';
const ghcpChatExtensionId = 'github.copilot-chat';
const ghcp4aExtensionId = 'ms-azuretools.vscode-azure-github-copilot';
const ghcp4aLearnPage = 'https://aka.ms/GetGitHubCopilotForAzure';
const dontShowKey = 'ghcp4a/dontShow';
const ghcpfaExtensionId = 'ms-azuretools.vscode-azure-github-copilot';
const ghcpfaLearnPage = 'https://aka.ms/GetGitHubCopilotForAzure';
const dontShowKey = 'ghcpfa/dontShow';

/**
* Conditionally show an install toast for the GitHub Copilot for Azure extension
*/
export function gitHubCopilotForAzureToast({ globalState }: ExtensionContext): void {
void callWithTelemetryAndErrorHandling('ghcp4aToast', async (context: IActionContext) => {
void callWithTelemetryAndErrorHandling('ghcpfaToast', async (context: IActionContext) => {
context.telemetry.properties.isActivationEvent = 'true';

const arePrecursorExtensionsInstalled: boolean = isExtensionInstalled(ghcpExtensionId) && isExtensionInstalled(ghcpChatExtensionId);
if (!arePrecursorExtensionsInstalled || isExtensionInstalled(ghcp4aExtensionId)) {
if (!arePrecursorExtensionsInstalled || isExtensionInstalled(ghcpfaExtensionId)) {
return;
}

Expand All @@ -34,16 +34,16 @@ export function gitHubCopilotForAzureToast({ globalState }: ExtensionContext): v
title: localize('install', 'Install'),
run: async () => {
context.telemetry.properties.toastChoice = 'install';
await commands.executeCommand('extension.open', ghcp4aExtensionId);
await commands.executeCommand('workbench.extensions.installExtension', ghcp4aExtensionId);
await commands.executeCommand('extension.open', ghcpfaExtensionId);
await commands.executeCommand('workbench.extensions.installExtension', ghcpfaExtensionId);
},
};

const learnMore = {
title: localize('learnMore', 'Learn More'),
run: async () => {
context.telemetry.properties.toastChoice = 'learnMore';
await openUrl(ghcp4aLearnPage);
await openUrl(ghcpfaLearnPage);
},
};

Expand Down
Loading