Skip to content

Commit

Permalink
Merge branch 'users/nityagi/SeptemberReleaseNotes' of https://github.…
Browse files Browse the repository at this point in the history
…com/microsoft/powerplatform-vscode into users/nityagi/SeptemberReleaseNotes
  • Loading branch information
tyaginidhi committed Sep 13, 2024
2 parents 14fc17c + 80b802c commit 796a7ad
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
11 changes: 6 additions & 5 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ export async function activate(
const pacTerminal = new PacTerminal(_context, _telemetry, cliPath);
_context.subscriptions.push(cli);
_context.subscriptions.push(pacTerminal);
const workspaceFolders =
vscode.workspace.workspaceFolders?.map(
(fl) => ({ ...fl, uri: fl.uri.fsPath } as WorkspaceFolder)
) || [];

_context.subscriptions.push(
orgChangeEvent(async (orgDetails: ActiveOrgOutput) => {
Expand All @@ -213,7 +209,7 @@ export async function activate(
TenantID: TenantID[0].Value,
Region: artemisResponse.stamp
},
PowerPagesClientName);
PowerPagesClientName, true);
}

oneDSLoggerWrapper.instantiate(geoName, geoLongName);
Expand All @@ -226,6 +222,11 @@ export async function activate(
})
);


const workspaceFolders =
vscode.workspace.workspaceFolders?.map(
(fl) => ({ ...fl, uri: fl.uri.fsPath } as WorkspaceFolder)
) || [];
// TODO: Handle for VSCode.dev also
if (workspaceContainsPortalConfigFolder(workspaceFolders)) {
let telemetryData = '';
Expand Down
3 changes: 2 additions & 1 deletion src/common/copilot/PowerPagesCopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { IOrgInfo } from './model';
import { checkCopilotAvailability, escapeDollarSign, getActiveEditorContent, getNonce, getSelectedCode, getSelectedCodeLineRange, getUserName, openWalkthrough, showConnectedOrgMessage, showInputBoxAndGetOrgUrl, showProgressWithNotification } from "../utilities/Utils";
import { CESUserFeedback } from "./user-feedback/CESSurvey";
import { ActiveOrgOutput } from "../../client/pac/PacTypes";
import { CopilotWalkthroughEvent, CopilotCopyCodeToClipboardEvent, CopilotInsertCodeToEditorEvent, CopilotLoadedEvent, CopilotOrgChangedEvent, CopilotUserFeedbackThumbsDownEvent, CopilotUserFeedbackThumbsUpEvent, CopilotUserPromptedEvent, CopilotCodeLineCountEvent, CopilotClearChatEvent, CopilotExplainCode, CopilotExplainCodeSize, CopilotNotAvailableECSConfig } from "./telemetry/telemetryConstants";
import { CopilotWalkthroughEvent, CopilotCopyCodeToClipboardEvent, CopilotInsertCodeToEditorEvent, CopilotLoadedEvent, CopilotOrgChangedEvent, CopilotUserFeedbackThumbsDownEvent, CopilotUserFeedbackThumbsUpEvent, CopilotUserPromptedEvent, CopilotCodeLineCountEvent, CopilotClearChatEvent, CopilotExplainCode, CopilotExplainCodeSize, CopilotNotAvailableECSConfig, CopilotPanelTryGitHubCopilotClicked } from "./telemetry/telemetryConstants";
import { sendTelemetryEvent } from "./telemetry/copilotTelemetry";
import TelemetryReporter from "@vscode/extension-telemetry";
import { getEntityColumns, getEntityName, getFormXml } from "./dataverseMetadata";
Expand Down Expand Up @@ -295,6 +295,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider {
}
case "openGitHubCopilotLink": {
//Open the GitHub Copilot Chat with @powerpages if GitHub Copilot Chat is installed
sendTelemetryEvent(this.telemetry, { eventName: CopilotPanelTryGitHubCopilotClicked, copilotSessionId: sessionID, orgId: orgID, userId: userID });
if (vscode.extensions.getExtension(GITHUB_COPILOT_CHAT_EXT)) {
vscode.commands.executeCommand('workbench.action.chat.open', PowerPagesParticipantPrompt);
} else {
Expand Down
3 changes: 3 additions & 0 deletions src/common/copilot/telemetry/telemetryConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ export const CopilotNotAvailableECSConfig = 'CopilotNotAvailableECSConfig';
export const CopilotExplainCode = 'CopilotExplainCode';
export const CopilotExplainCodeSize = 'CopilotExplainCodeSize';
export const CopilotNpsAuthenticationCompleted = "CopilotNpsAuthenticationCompleted";
export const CopilotNotificationTryGitHubCopilotClicked = 'CopilotNotificationTryGitHubCopilotClicked';
export const CopilotPanelTryGitHubCopilotClicked = 'CopilotPanelTryGitHubCopilotClicked ';

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import * as vscode from "vscode";
import { getNonce } from "../../utilities/Utils";
import TelemetryReporter from "@vscode/extension-telemetry";
import { CopilotNotificationDoNotShowChecked, CopilotTryNotificationClickedEvent, CopilotNotificationDoNotShowUnchecked } from "../telemetry/telemetryConstants";
import { COPILOT_IN_POWERPAGES, COPILOT_NOTIFICATION_DISABLED } from "../constants";
import { CopilotNotificationDoNotShowChecked, CopilotTryNotificationClickedEvent, CopilotNotificationDoNotShowUnchecked, CopilotNotificationTryGitHubCopilotClicked } from "../telemetry/telemetryConstants";
import { COPILOT_IN_POWERPAGES, COPILOT_NOTIFICATION_DISABLED, PowerPagesParticipantDocLink, PowerPagesParticipantPrompt } from "../constants";
import { oneDSLoggerWrapper } from "../../OneDSLoggerTelemetry/oneDSLoggerWrapper";

let NotificationPanel: vscode.WebviewPanel | undefined;
Expand Down Expand Up @@ -56,12 +56,12 @@ export async function copilotNotificationPanel(context: vscode.ExtensionContext,
NotificationPanel?.dispose();
break;
case 'learnMore':
// telemetry.sendTelemetryEvent(CopilotWalkthroughEvent, { listOfOrgs: telemetryData, countOfActivePortals: countOfActivePortals as string });
// openWalkthrough(context.extensionUri);
telemetry.sendTelemetryEvent(CopilotNotificationTryGitHubCopilotClicked, { listOfOrgs: telemetryData, countOfActivePortals: countOfActivePortals as string });
oneDSLoggerWrapper.getLogger().traceInfo(CopilotNotificationTryGitHubCopilotClicked, { listOfOrgs: telemetryData, countOfActivePortals: countOfActivePortals as string });
if (isGitHubCopilotPresent) {
vscode.commands.executeCommand('workbench.action.chat.open', '@powerpages how can you help with coding for my website?');
vscode.commands.executeCommand('workbench.action.chat.open', PowerPagesParticipantPrompt);
} else {
vscode.env.openExternal(vscode.Uri.parse('https://go.microsoft.com/fwlink/?linkid=2276973'));
vscode.env.openExternal(vscode.Uri.parse(PowerPagesParticipantDocLink));
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/common/ecs-features/ecsFeatureClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export abstract class ECSFeaturesClient {

// Initialize ECSFeatureClient - any client config can be fetched with utility function like below
// EnableMultifileVscodeWeb.getConfig().enableMultifileVscodeWeb
public static async init(telemetry: ITelemetry | TelemetryReporter, filters: ECSAPIFeatureFlagFilters, clientName: string) {
if (this._ecsConfig) return;
public static async init(telemetry: ITelemetry | TelemetryReporter, filters: ECSAPIFeatureFlagFilters, clientName: string, force = false) {
if (this._ecsConfig && !force) return

const requestURL = createECSRequestURL(filters, clientName);
try {
Expand Down

0 comments on commit 796a7ad

Please sign in to comment.