From f8af474828082636fb4e0f418133dfb5abbc8d6e Mon Sep 17 00:00:00 2001 From: tyaginidhi Date: Thu, 23 May 2024 12:38:04 +0530 Subject: [PATCH 1/3] Fix EnvId getting null for Web extension flow (#963) * Auth Profile listing fix (#841) (#842) * Fix Enhanced data model filename language fetch and populate (#835) * February release notes updates for web extension (#831) * February release notes updates for web extension * Update for bug fix and release extension version * Auth Profile listing fix (#841) (#842) * Invoking Language server only for PowerPages workspace (#952) Co-authored-by: amitjoshi * envID fix for desktop extension --------- Co-authored-by: Crash Collison <3751389+tehcrashxor@users.noreply.github.com> Co-authored-by: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com> Co-authored-by: amitjoshi --- src/common/copilot/PowerPagesCopilot.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/copilot/PowerPagesCopilot.ts b/src/common/copilot/PowerPagesCopilot.ts index d367e84b..7eb70706 100644 --- a/src/common/copilot/PowerPagesCopilot.ts +++ b/src/common/copilot/PowerPagesCopilot.ts @@ -110,7 +110,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider { orgChangeEvent((orgDetails: ActiveOrgOutput) => this.handleOrgChangeSuccess(orgDetails)) ); - if(this._view?.visible) { + if (this._view?.visible) { this._disposables.push(orgChangeErrorEvent(async () => await createAuthProfileExp(this._pacWrapper))); } @@ -165,7 +165,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider { if (pacOutput && pacOutput.Status === PAC_SUCCESS) { await this.handleOrgChangeSuccess(pacOutput.Results); } else if (!IS_DESKTOP && orgID && activeOrgUrl) { - await this.handleOrgChangeSuccess({ OrgId: orgID, UserId: userID, OrgUrl: activeOrgUrl } as ActiveOrgOutput); + await this.handleOrgChangeSuccess({ OrgId: orgID, UserId: userID, OrgUrl: activeOrgUrl, EnvironmentId: environmentId } as ActiveOrgOutput); } webviewView.webview.html = this._getHtmlForWebview(webviewView.webview); From 0f9c3f4acb9160754dafdcd8c00b419e79fb17f2 Mon Sep 17 00:00:00 2001 From: tyaginidhi Date: Fri, 24 May 2024 09:09:14 +0530 Subject: [PATCH 2/3] Users/nityagi/fix cross geo flagread and release notes update (#964) * Auth Profile listing fix (#841) (#842) * Fix Enhanced data model filename language fetch and populate (#835) * February release notes updates for web extension (#831) * February release notes updates for web extension * Update for bug fix and release extension version * Auth Profile listing fix (#841) (#842) * Invoking Language server only for PowerPages workspace (#952) Co-authored-by: amitjoshi * Fix EnvId getting null for Web extension flow (#963) * Auth Profile listing fix (#841) (#842) * Fix Enhanced data model filename language fetch and populate (#835) * February release notes updates for web extension (#831) * February release notes updates for web extension * Update for bug fix and release extension version * Auth Profile listing fix (#841) (#842) * Invoking Language server only for PowerPages workspace (#952) Co-authored-by: amitjoshi * envID fix for desktop extension --------- Co-authored-by: Crash Collison <3751389+tehcrashxor@users.noreply.github.com> Co-authored-by: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com> Co-authored-by: amitjoshi * Update release notes and fix cross geo flag read and use * nit: fix spacing --------- Co-authored-by: Crash Collison <3751389+tehcrashxor@users.noreply.github.com> Co-authored-by: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com> Co-authored-by: amitjoshi --- CHANGELOG.md | 8 +++++--- src/common/services/ArtemisService.ts | 2 +- src/common/services/BAPService.ts | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48bbf09e..a9fd4a32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Change Log - Power Platform Extension -## NEXTRELEASE +## 2.0.58 - pac CLI 1.32.7, (May 2024 refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/)) +- Web extension updates + - Copilot available in public regions that has " Move data across regions" option enabled per [Turn on copilots and generative AI features](https://learn.microsoft.com/en-us/power-platform/admin/geographical-availability-copilot#turn-on-copilots-and-generative-ai-features-1) ## 2.0.49 -Web extension updates -- Copresence support - Find out who's working on a site (Power Pages Studio and Power Pages VS Code for the Web) at the same time as you with copresence +- Web extension updates + - Copresence support - Find out who's working on a site (Power Pages Studio and Power Pages VS Code for the Web) at the same time as you with copresence ## 2.0.41 - pac CLI 1.31.6, (February 2024 refresh, see release notes on [nuget.org](https://www.nuget.org/packages/Microsoft.PowerApps.CLI/)) diff --git a/src/common/services/ArtemisService.ts b/src/common/services/ArtemisService.ts index ebbddd78..2f62ea92 100644 --- a/src/common/services/ArtemisService.ts +++ b/src/common/services/ArtemisService.ts @@ -41,7 +41,7 @@ export class ArtemisService { const intelligenceEndpoint = `https://aibuildertextapiservice.${geoName}-${'il' + clusterNumber}.gateway.${environment}.island.powerapps.com/v1.0/${orgId}/appintelligence/chat` - return { intelligenceEndpoint: intelligenceEndpoint, geoName: geoName, crossGeoDataMovementEnabledPPACFlag: false }; + return { intelligenceEndpoint: intelligenceEndpoint, geoName: geoName, crossGeoDataMovementEnabledPPACFlag: crossGeoDataMovementEnabledPPACFlag }; } return { intelligenceEndpoint: null, geoName: null, crossGeoDataMovementEnabledPPACFlag: false }; diff --git a/src/common/services/BAPService.ts b/src/common/services/BAPService.ts index dd258eab..511aaacd 100644 --- a/src/common/services/BAPService.ts +++ b/src/common/services/BAPService.ts @@ -22,8 +22,8 @@ export class BAPService { if (response.ok) { const data = await response.json(); - sendTelemetryEvent(telemetry, { eventName: VSCODE_EXTENSION_GET_CROSS_GEO_DATA_MOVEMENT_ENABLED_FLAG_COMPLETED, data: data.enabled }); - return data.enabled; + sendTelemetryEvent(telemetry, { eventName: VSCODE_EXTENSION_GET_CROSS_GEO_DATA_MOVEMENT_ENABLED_FLAG_COMPLETED, data: data.properties.copilotPolicies?.crossGeoCopilotDataMovementEnabled }); + return data.properties.copilotPolicies?.crossGeoCopilotDataMovementEnabled; } } catch (error) { From cf7fc7e829330905bfcb9f6a266529ab2b2191cd Mon Sep 17 00:00:00 2001 From: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com> Date: Wed, 29 May 2024 17:01:07 +0530 Subject: [PATCH 3/3] chore: Update MultiStepInput import paths in create power pages files (#968) Co-authored-by: amitjoshi --- .eslintrc.js | 1 + src/client/power-pages/create/Contentsnippet.ts | 2 +- src/client/power-pages/create/PageTemplate.ts | 4 ++-- src/client/power-pages/create/Webfile.ts | 2 +- src/client/power-pages/create/Webpage.ts | 2 +- .../create/utils => common/utilities}/MultiStepInput.ts | 0 6 files changed, 6 insertions(+), 5 deletions(-) rename src/{client/power-pages/create/utils => common/utilities}/MultiStepInput.ts (100%) diff --git a/.eslintrc.js b/.eslintrc.js index 12f203a5..398c5a30 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,6 +20,7 @@ module.exports = { "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", ], + ignorePatterns: ["src/typings"], rules: { "@typescript-eslint/no-unused-vars": [ "error", diff --git a/src/client/power-pages/create/Contentsnippet.ts b/src/client/power-pages/create/Contentsnippet.ts index 510e86bf..f6846a1f 100644 --- a/src/client/power-pages/create/Contentsnippet.ts +++ b/src/client/power-pages/create/Contentsnippet.ts @@ -13,7 +13,7 @@ import { isNullOrEmpty, } from "./utils/CommonUtils"; import { QuickPickItem } from "vscode"; -import { MultiStepInput } from "./utils/MultiStepInput"; +import { MultiStepInput } from "../../../common/utilities/MultiStepInput"; import path from "path"; import { statSync } from "fs"; import { diff --git a/src/client/power-pages/create/PageTemplate.ts b/src/client/power-pages/create/PageTemplate.ts index 716bff96..8f1c7042 100644 --- a/src/client/power-pages/create/PageTemplate.ts +++ b/src/client/power-pages/create/PageTemplate.ts @@ -14,7 +14,7 @@ import { getWebTemplates, } from "./utils/CommonUtils"; import { QuickPickItem } from "vscode"; -import { MultiStepInput } from "./utils/MultiStepInput"; +import { MultiStepInput } from "../../../common/utilities/MultiStepInput"; import path from "path"; import { statSync } from "fs"; import { ITelemetry } from "../../telemetry/ITelemetry"; @@ -150,7 +150,7 @@ async function getPageTemplateInputs( if (!name) { return vscode.l10n.t("Please enter a name for the page template."); } - + const file = formatFileName(name); const filePath = path.join( selectedWorkspaceFolder, diff --git a/src/client/power-pages/create/Webfile.ts b/src/client/power-pages/create/Webfile.ts index db1893d0..cf7b46ca 100644 --- a/src/client/power-pages/create/Webfile.ts +++ b/src/client/power-pages/create/Webfile.ts @@ -12,7 +12,7 @@ import { logErrorAndNotifyUser, } from "./utils/CommonUtils"; import { QuickPickItem } from "vscode"; -import { MultiStepInput } from "./utils/MultiStepInput"; +import { MultiStepInput } from "../../../common/utilities/MultiStepInput"; import { exec } from "child_process"; import { Tables, WEBFILE, YoSubGenerator } from "./CreateOperationConstants"; import { FileCreateEvent, sendTelemetryEvent, UserFileCreateEvent } from "../telemetry"; diff --git a/src/client/power-pages/create/Webpage.ts b/src/client/power-pages/create/Webpage.ts index ccffc48a..642c3b2e 100644 --- a/src/client/power-pages/create/Webpage.ts +++ b/src/client/power-pages/create/Webpage.ts @@ -17,7 +17,7 @@ import { } from "./utils/CommonUtils"; import { QuickPickItem } from "vscode"; -import { MultiStepInput } from "./utils/MultiStepInput"; +import { MultiStepInput } from "../../../common/utilities/MultiStepInput"; import { TableFolder, Tables, YoSubGenerator } from "./CreateOperationConstants"; import path from "path"; import { ITelemetry } from "../../telemetry/ITelemetry"; diff --git a/src/client/power-pages/create/utils/MultiStepInput.ts b/src/common/utilities/MultiStepInput.ts similarity index 100% rename from src/client/power-pages/create/utils/MultiStepInput.ts rename to src/common/utilities/MultiStepInput.ts