Skip to content

Commit

Permalink
Rename to ghcpfa (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 authored Oct 28, 2024
1 parent ff63b93 commit 502bf2e
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 502bf2e

Please sign in to comment.