Skip to content

Commit

Permalink
Merge branch 'main' into users/nityagi/ReleaseNotesAugRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
tyaginidhi authored Aug 13, 2024
2 parents d8991c6 + 77a0c65 commit 433f070
Show file tree
Hide file tree
Showing 15 changed files with 254 additions and 111 deletions.
11 changes: 9 additions & 2 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,30 @@
"In your own words, describe what you need. You can get help with writing code for Power Pages sites in HTML, CSS, and JS languages.": "In your own words, describe what you need. You can get help with writing code for Power Pages sites in HTML, CSS, and JS languages.",
"To know more, see <a href=\"https://go.microsoft.com/fwlink/?linkid=2206366\">Copilot in Power Pages documentation.": "To know more, see <a href=\"https://go.microsoft.com/fwlink/?linkid=2206366\">Copilot in Power Pages documentation.",
"Working on it...": "Working on it...",
"You can use this in <a href=\"#\" id=\"github-copilot-link\">GitHub Copilot with @powerpages</a> and leverage best of both world.": "You can use this in <a href=\"#\" id=\"github-copilot-link\">GitHub Copilot with @powerpages</a> and leverage best of both world.",
"NEW": "NEW",
"Copied to clipboard!": "Copied to clipboard!",
"What do you need help with?": "What do you need help with?",
"Make sure AI-generated content is accurate and appropriate before using. <a href=\"https://go.microsoft.com/fwlink/?linkid=2240145\">Learn more</a> | <a href=\"https://go.microsoft.com/fwlink/?linkid=2189520\">View\n terms</a>": "Make sure AI-generated content is accurate and appropriate before using. <a href=\"https://go.microsoft.com/fwlink/?linkid=2240145\">Learn more</a> | <a href=\"https://go.microsoft.com/fwlink/?linkid=2189520\">View\n terms</a>",
"Try @powerpages with GitHub Copilot": "Try @powerpages with GitHub Copilot",
"Get GitHub Copilot to try @powerpages": "Get GitHub Copilot to try @powerpages",
"Let Copilot help you code": "Let Copilot help you code",
"Whether it’s HTML, CSS, JS, or Liquid code, just describe what you need and let AI build it for you. ": "Whether it’s HTML, CSS, JS, or Liquid code, just describe what you need and let AI build it for you. ",
"Try Copilot for Power Pages": "Try Copilot for Power Pages",
"Continue with Copilot for Power Pages": "Continue with Copilot for Power Pages",
"Do not show again": "Do not show again",
"Like something? Tell us more.": "Like something? Tell us more.",
"Dislike something? Tell us more.": "Dislike something? Tell us more.",
"Feedback": "Feedback",
"Tell us more.": "Tell us more.",
"Try and be as specific as possible. Your feedback will be used to improve Copilot. <a href=\"https://privacy.microsoft.com/en-US/data-privacy-notice\"> View privacy details </a>": "Try and be as specific as possible. Your feedback will be used to improve Copilot. <a href=\"https://privacy.microsoft.com/en-US/data-privacy-notice\"> View privacy details </a>",
"Submit": "Submit",
"Please provide a prompt to get started.\n You can get help with writing code for Power Pages sites in HTML, CSS, and JS languages.": "Please provide a prompt to get started.\n You can get help with writing code for Power Pages sites in HTML, CSS, and JS languages.",
"Hi! Power Pages lets you build secure, professional websites that you can quickly configure and publish across web browsers and devices.\n\nTo create your website, visit the [Power Pages](https://powerpages.microsoft.com/).\nReturn to this chat and @powerpages can help you write and edit your website code.": "Hi! Power Pages lets you build secure, professional websites that you can quickly configure and publish across web browsers and devices.\n\nTo create your website, visit the [Power Pages](https://powerpages.microsoft.com/).\nReturn to this chat and @powerpages can help you write and edit your website code.",
"Authentication failed. Please try again.": "Authentication failed. Please try again.",
"Copilot is not available. Please contact your administrator.": "Copilot is not available. Please contact your administrator.",
"Active auth profile is not found or has expired. Please try again.": "Active auth profile is not found or has expired. Please try again.",
"Make sure AI-generated content is accurate and appropriate before using. [Learn more](https://go.microsoft.com/fwlink/?linkid=2240145) | [View terms](https://go.microsoft.com/fwlink/?linkid=2189520)": "Make sure AI-generated content is accurate and appropriate before using. [Learn more](https://go.microsoft.com/fwlink/?linkid=2240145) | [View terms](https://go.microsoft.com/fwlink/?linkid=2189520)",
"Explain the following code {% include 'Page Copy'%}": "Explain the following code {% include 'Page Copy'%}",
"Hi! @powerpages can help you write, edit, and even summarize your website code.": "Hi! @powerpages can help you write, edit, and even summarize your website code.",
"Select Folder for new PCF Control/Do not translate 'PCF' as it is a product name.": {
"message": "Select Folder for new PCF Control",
"comment": [
Expand Down
35 changes: 29 additions & 6 deletions loc/translations-export/vscode-powerplatform.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
<trans-unit id="++CODE++eebdd24a77d9ad32222660c07777163bf5f6732df2b172351f3f8d5783e4f529">
<source xml:lang="en">Confirm</source>
</trans-unit>
<trans-unit id="++CODE++02c3c88b02a43e1818bf427f60d8e58b84d40c0990e09d01c75fff4a934221d0">
<source xml:lang="en">Continue with Copilot for Power Pages</source>
</trans-unit>
<trans-unit id="++CODE++916fa4a51e4d90e09a42289aa7961a6aff3401424f633240c630ac47f58a6d30">
<source xml:lang="en">Copied to clipboard!</source>
</trans-unit>
Expand Down Expand Up @@ -134,6 +137,9 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<trans-unit id="++CODE++5a2391041cb1f6f5ab0cce07946dbf4222358fbd947768d94ac12ef5329485d3">
<source xml:lang="en">Explain the following code snippet:</source>
</trans-unit>
<trans-unit id="++CODE++f9e17ed11037dab93f8820c30db63b2ff2a045b5761f71818b7291afae60f199">
<source xml:lang="en">Explain the following code {% include 'Page Copy'%}</source>
</trans-unit>
<trans-unit id="++CODE++2310c6b7e5953cab877859ba1fcfa98e58e1508677df9412010e9b578ea237f4">
<source xml:lang="en">Failed to create: {0}.</source>
<note>{0} will be replaced by the error message.</note>
Expand Down Expand Up @@ -169,15 +175,27 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<trans-unit id="++CODE++7184a5edf42e6fc9ef8f53fc1dd73f10b3f6196a23f6d340c4f434e60c366e45">
<source xml:lang="en">GETTING STARTED</source>
</trans-unit>
<trans-unit id="++CODE++ee1d3100df4b00eabd74481b92106e42cce956213372a914082f82702f56470d">
<source xml:lang="en">Get GitHub Copilot to try @powerpages</source>
</trans-unit>
<trans-unit id="++CODE++b9f4adbdfa2deef1eaa415a914f63329ee06c604b5a1bf34645175b9e28a9712">
<source xml:lang="en">Here are a few suggestions to get you started</source>
</trans-unit>
<trans-unit id="++CODE++3639efcd08abb273b1619e82e78c29a7df02c1051b1820e99fc395dcaa3326b8">
<source xml:lang="en">Hi</source>
</trans-unit>
<trans-unit id="++CODE++f307e9947391e3b9ba6e7a7da781c995fcfc8647e780127a4c475b67fccd4d0c">
<source xml:lang="en">Hi! @powerpages can help you write, edit, and even summarize your website code.</source>
</trans-unit>
<trans-unit id="++CODE++57fa6bc42ff8a73f5c9271ebe8a92febd9ec652aea94798eb9023c5512b9dab1">
<source xml:lang="en">Hi! Instantly generate code for Power Pages sites by typing in what you need. To start using Copilot, log in to your Microsoft account.</source>
</trans-unit>
<trans-unit id="++CODE++61dd014ff85ae4c042dbfd3b581668ee350e515d4abbf0d682df335b22bf703a">
<source xml:lang="en">Hi! Power Pages lets you build secure, professional websites that you can quickly configure and publish across web browsers and devices.

To create your website, visit the [Power Pages](https://powerpages.microsoft.com/).
Return to this chat and @powerpages can help you write and edit your website code.</source>
</trans-unit>
<trans-unit id="++CODE++1d9bc50f05b58d430726840f771cd25056be57873eb33a5d6aeedfff2ca7e2db">
<source xml:lang="en">Hi! Your Microsoft account doesn’t currently support Copilot. Contact your admin for details.</source>
</trans-unit>
Expand Down Expand Up @@ -207,6 +225,9 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<source xml:lang="en">Make sure AI-generated content is accurate and appropriate before using. &lt;a href=&quot;https://go.microsoft.com/fwlink/?linkid=2240145&quot;&gt;Learn more&lt;/a&gt; | &lt;a href=&quot;https://go.microsoft.com/fwlink/?linkid=2189520&quot;&gt;View
terms&lt;/a&gt;</source>
</trans-unit>
<trans-unit id="++CODE++74f89e02b8d346f38df55113eee5dcbb0c0f31471876c67a9c13a3ff7caeebf9">
<source xml:lang="en">Make sure AI-generated content is accurate and appropriate before using. [Learn more](https://go.microsoft.com/fwlink/?linkid=2240145) | [View terms](https://go.microsoft.com/fwlink/?linkid=2189520)</source>
</trans-unit>
<trans-unit id="++CODE++8f2de600bf940a26c63a7ac23984a12ca8970fcf1a85947aa5566c34e23eea07">
<source xml:lang="en">Managed</source>
</trans-unit>
Expand All @@ -216,6 +237,9 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<trans-unit id="++CODE++7fcd8b1c5225f7d9a771a4a02ca3e4795c3c9202cf2b3c3c879c625abb8b43e4">
<source xml:lang="en">Microsoft wants your feeback</source>
</trans-unit>
<trans-unit id="++CODE++a253ff09c5a8678e1fd1962b2c329245e139e45f9cc6ced4e5d7ad42c4108fc0">
<source xml:lang="en">NEW</source>
</trans-unit>
<trans-unit id="++CODE++9ecf722faa0944de54826f72fe9d734c59300a093bcce9cc47b507460ac80710">
<source xml:lang="en">Name/Rename Auth Profile</source>
</trans-unit>
Expand Down Expand Up @@ -294,10 +318,6 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++7f6276dc63b573d177b7d6e17f787b108e3c8c7d449324ac13a6d06b1be59d8e">
<source xml:lang="en">Please enter a name for the webpage.</source>
</trans-unit>
<trans-unit id="++CODE++f39f65c4f7d519a37b66a00d02a6def9e3721080363dae761b907793330333cd">
<source xml:lang="en">Please provide a prompt to get started.
You can get help with writing code for Power Pages sites in HTML, CSS, and JS languages.</source>
</trans-unit>
<trans-unit id="++CODE++1bac158cc07a75506df3774db0ad7c188c19ccad4943c4cf03da8b6700ef9ce4">
<source xml:lang="en">Power Pages Copilot is now connected to the environment: {0} : {1}</source>
<note>{0} represents the environment name</note>
Expand Down Expand Up @@ -380,8 +400,8 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++4f8c4d58a87feaaff06fd5f9cb84370ab4a42220bf1e8cbedbca716f8f21c9ee">
<source xml:lang="en">To know more, see &lt;a href=&quot;https://go.microsoft.com/fwlink/?linkid=2206366&quot;&gt;Copilot in Power Pages documentation.</source>
</trans-unit>
<trans-unit id="++CODE++8d6329ce370e7f2cf3a5b77a73e0100c08550628408f2763deafe57dce769719">
<source xml:lang="en">Try Copilot for Power Pages</source>
<trans-unit id="++CODE++4a7c431a6572c68bba17c3a5d858adbf5112462574953baf4d7d2fd0619807fe">
<source xml:lang="en">Try @powerpages with GitHub Copilot</source>
</trans-unit>
<trans-unit id="++CODE++d8b8392e2c542950ca64867168e4ef87d4ad606882d5898f826b51c6d553988f">
<source xml:lang="en">Try again</source>
Expand Down Expand Up @@ -435,6 +455,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++3c65297a1fc0860c6993f5c8beb4341dd13b71d7f3957daba611adf04a6c971b">
<source xml:lang="en">You are editing a live, public site </source>
</trans-unit>
<trans-unit id="++CODE++beb45bfdd4c3f6da9bb3687e4d9275790d086c1dffaec84839fa9ec9ce4e9ee2">
<source xml:lang="en">You can use this in &lt;a href=&quot;#&quot; id=&quot;github-copilot-link&quot;&gt;GitHub Copilot with @powerpages&lt;/a&gt; and leverage best of both world.</source>
</trans-unit>
<trans-unit id="++CODE++3a928d0a6dd0e0c6b56eb3bf08b20e6361e876fd6b2eeca59f718cbfdc310472">
<source xml:lang="en">dotnet sdk 6.0 or greater must be installed</source>
<note>Do not translate 'dotnet' or 'sdk'</note>
Expand Down
13 changes: 12 additions & 1 deletion src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ import { desktopTelemetryEventNames } from "../common/OneDSLoggerTelemetry/clien
import { ArtemisService } from "../common/services/ArtemisService";
import { workspaceContainsPortalConfigFolder } from "../common/utilities/PathFinderUtil";
import { getPortalsOrgURLs } from "../common/utilities/WorkspaceInfoFinderUtil";
import { SUCCESS } from "../common/constants";
import { AadIdKey } from "../common/OneDSLoggerTelemetry/telemetryConstants";

let client: LanguageClient;
let _context: vscode.ExtensionContext;
Expand Down Expand Up @@ -191,9 +193,18 @@ export async function activate(
const orgID = orgDetails.OrgId;
const artemisResponse = await ArtemisService.getArtemisResponse(orgID, _telemetry, "");
if (artemisResponse !== null && artemisResponse.response !== null) {
const pacActiveAuth = await pacTerminal.getWrapper()?.activeAuth();
let AadIdObject;
if ((pacActiveAuth && pacActiveAuth.Status === SUCCESS)) {
AadIdObject = pacActiveAuth.Results?.filter(obj => obj.Key === AadIdKey);
}
const { geoName, geoLongName } = artemisResponse.response;
oneDSLoggerWrapper.instantiate(geoName, geoLongName);
oneDSLoggerWrapper.getLogger().traceInfo(desktopTelemetryEventNames.DESKTOP_EXTENSION_INIT_CONTEXT, { ...orgDetails, orgGeo: geoName });
let initContext: object = { ...orgDetails, orgGeo: geoName };
if (AadIdObject?.[0]?.Value) {
initContext = { ...initContext, AadId: AadIdObject[0].Value }
}
oneDSLoggerWrapper.getLogger().traceInfo(desktopTelemetryEventNames.DESKTOP_EXTENSION_INIT_CONTEXT, initContext);
}
})
);
Expand Down
7 changes: 7 additions & 0 deletions src/client/pac/PacTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,10 @@ export type ActiveOrgOutput = {
}

export type PacOrgWhoOutput = PacOutputWithResult<ActiveOrgOutput>;

export type ActiveAuthOutput = {
Key: string,
Value: string
}

export type PacAuthWhoOutput = PacOutputWithResultList<ActiveAuthOutput>;
6 changes: 5 additions & 1 deletion src/client/pac/PacWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as fs from "fs-extra";
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import { BlockingQueue } from "../../common/utilities/BlockingQueue";
import { ITelemetry } from "../../common/OneDSLoggerTelemetry/telemetry/ITelemetry";
import { PacOutput, PacAdminListOutput, PacAuthListOutput, PacSolutionListOutput, PacOrgListOutput, PacOrgWhoOutput } from "./PacTypes";
import { PacOutput, PacAdminListOutput, PacAuthListOutput, PacSolutionListOutput, PacOrgListOutput, PacOrgWhoOutput, PacAuthWhoOutput } from "./PacTypes";
import { v4 } from "uuid";
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";

Expand Down Expand Up @@ -168,6 +168,10 @@ export class PacWrapper {
return this.executeCommandAndParseResults<PacOrgWhoOutput>(new PacArguments("org", "who"));
}

public async activeAuth(): Promise <PacAuthWhoOutput> {
return this.executeCommandAndParseResults<PacAuthWhoOutput>(new PacArguments("auth", "who"));
}

public async pcfInit(outputDirectory: string): Promise<PacOutput> {
return this.executeCommandAndParseResults<PacOutput>(new PacArguments("pcf", "init", "--outputDirectory", outputDirectory));
}
Expand Down
1 change: 1 addition & 0 deletions src/common/OneDSLoggerTelemetry/oneDSLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export class OneDSLogger implements ITelemetryLogger {
OneDSLogger.contextInfo.orgId = JSON.parse(envelope.data.eventInfo).OrgId;
OneDSLogger.contextInfo.envId = JSON.parse(envelope.data.eventInfo).EnvironmentId;
OneDSLogger.contextInfo.orgGeo = JSON.parse(envelope.data.eventInfo).orgGeo;
OneDSLogger.userInfo.oid = JSON.parse(envelope.data.eventInfo).AadId;
// TODO: Populate website id
OneDSLogger.contextInfo.websiteId = 'test'
}
Expand Down
2 changes: 2 additions & 0 deletions src/common/OneDSLoggerTelemetry/telemetryConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ export enum GeoNames {
}
// Custom telemetry feature flag
export const CUSTOM_TELEMETRY_FOR_POWER_PAGES_SETTING_NAME = 'enableTelemetry';

export const AadIdKey= 'Entra ID Object Id:';
Loading

0 comments on commit 433f070

Please sign in to comment.