Skip to content

[Power Pages] [Copilot] Implement Copilot Governance Check feature and telemetry updates #1171

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

Merged
merged 32 commits into from
May 8, 2025

Conversation

amitjoshi438
Copy link
Contributor

@amitjoshi438 amitjoshi438 commented Mar 27, 2025

This pull request introduces enhancements to Power Pages Copilot functionality, focusing on governance checks, improved context handling, and telemetry updates. The changes primarily involve adding support for governance flag checks, passing websiteId throughout the system, and updating telemetry to capture governance-related events.

VSCode Web:
image

VSCode Desktop:
image

Governance and Context Enhancements:

  • Introduced a governance check for Pro Dev Copilot using a feature flag and a new setting, COPILOT_GOVERNANCE_SETTING_NAME. This includes a call to PPAPIService.getGovernanceFlag to validate the governance flag for a given websiteId. ([[1]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-f1dd6f5b86828cf85be6b15fd02b13d7d00be9c203d5b9dca855587708a4b9c0R29-R52), [[2]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-462f39a33142dd709a8624bf7ae6e2d5785f7b5cdfd1830406ebe3bdc120a2d7R15-R16), [[3]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-a9a990370940ab92755b288c99c112a8e03eede0ee01bd4f772073d00e4ae16dR42-R52))
  • Added websiteId as a parameter to several classes and methods, such as PowerPagesCopilot, PowerPagesChatParticipant, and getIntelligenceEndpoint, to ensure the current site context is passed throughout the system. ([[1]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-367f4c2df27cd65dad8a96ff1497027c82dcde8723c93e4356a147f20e1de86fL36-R43), [[2]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-885f58fd5bd7ee590ddae0f7854d056026aff9b576864e07f61887fb7586da29L35-R40), [[3]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-f1dd6f5b86828cf85be6b15fd02b13d7d00be9c203d5b9dca855587708a4b9c0L9-R17))

Telemetry Updates:

  • Enhanced telemetry to capture governance-related data, including isGovernanceCheckEnabled, copilotGovernanceResponse, and copilotGovernanceSetting. New telemetry events such as CopilotGovernanceCheckEnabled were introduced. ([[1]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-d73b46474d7a1e801babe96986791f338b5804fa29442ea969355996535755d0R32-R36), [[2]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-8be6094fdbb66269472fff9fba0b0fa6042e180ee442d1d0dc9d2cc9320413b9R44), [[3]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-cb9d6c99c020ebd978eea34f2f848b1fa1fd3975e99d1beb09f82cf2a9d1f399R29-R33))

Refactoring and Utilities:

  • Moved the ICurrentSiteContext interface to constants.ts and updated CurrentSiteContext to initialize asynchronously with site information. Added a new isInitialized property to track initialization status. ([[1]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-a0c4768e8cb7751abd7b1a9368a299968c9ad2408b95fccdabae86e242af413cL7-L36), [[2]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-118a1ed2ebf5b946c94c5dfeae1c4d13c9a57ef105b36ad323e0b7b8e368da27R93-R97), [[3]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-a0c4768e8cb7751abd7b1a9368a299968c9ad2408b95fccdabae86e242af413cL47-R66))
  • Added utility functions isCopilotGovernanceCheckEnabled and getCopilotGovernanceSetting to check the governance feature flag and retrieve the governance setting. ([[1]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-da12f9f276031e34ebcc98fad2885e044b06376ac3fffcd9b64babedf7cdcad4R70-R87), [[2]](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-462f39a33142dd709a8624bf7ae6e2d5785f7b5cdfd1830406ebe3bdc120a2d7R15-R16))

Minor Changes:

  • Updated .vscode/settings.json to include Prodev in the list of recognized keywords. ([.vscode/settings.jsonR30](https://github.com/microsoft/powerplatform-vscode/pull/1171/files#diff-a5de3e5871ffcc383a2294845bd3df25d3eeff6c29ad46e3a396577c413bf357R30))This pull request includes several changes to improve the governance check for Pro Dev Copilot and refactor the CurrentSiteContext class. The most important changes include adding new governance check functionality, refactoring the CurrentSiteContext class to use a new utility function, and updating telemetry data to include new fields.

Governance Check Enhancements:

  • Added governance check functionality in ArtemisService to ensure compliance with governance settings before enabling Pro Dev Copilot. [1] [2]
  • Introduced isCopilotGovernanceCheckEnabled and getCopilotGovernanceSetting utility functions to manage governance settings.
  • Updated telemetry to log governance check events. [1] [2]

Refactoring CurrentSiteContext:

  • Refactored CurrentSiteContext class to use getCurrentSiteInfo utility function for retrieving site information, simplifying the class and removing redundant code. [1] [2] [3]

Telemetry Data Enhancements:

  • Updated IProDevCopilotTelemetryData to include new fields such as environmentId, websiteId, and copilotGovernanceResponse.
  • Modified sendTelemetryEvent function to handle the new telemetry fields.

Miscellaneous Changes:

  • Added websiteId parameter to PowerPagesCopilot class and updated related methods to utilize this parameter. [1] [2]
  • Included Prodev in the .vscode/settings.json file.

@amitjoshi438 amitjoshi438 requested review from a team as code owners March 27, 2025 13:38
Copy link
Contributor

@priyanshu92 priyanshu92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests as well.

amitjoshi438 and others added 14 commits April 16, 2025 17:18
 into users/amitjoshi/copilotGovernanceCheck
- ✨ Adjusted formatting in OneDSLogger for clarity.
- 🔧 Added a missing line break in PPAPIService.
- 🔄 Updated governance check conditions in PPAPIService.

-Priyanshu
 into users/amitjoshi/copilotGovernanceCheck
 into users/amitjoshi/copilotGovernanceCheck
Amit Joshi added 2 commits May 6, 2025 15:19
@amitjoshi438 amitjoshi438 requested a review from priyanshu92 May 6, 2025 10:27
@amitjoshi438 amitjoshi438 changed the title Implement Copilot Governance Check feature and telemetry updates [Power Pages] [Copilot] Implement Copilot Governance Check feature and telemetry updates May 6, 2025
@amitjoshi438 amitjoshi438 merged commit 26ccf85 into main May 8, 2025
7 checks passed
@amitjoshi438 amitjoshi438 deleted the users/amitjoshi/copilotGovernanceCheck branch May 8, 2025 07:25
amitjoshi438 added a commit that referenced this pull request May 12, 2025
* Refactor PowerPagesChatParticipant and add CommandRegistry (#1050)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [PowerPage][Copilot] Nl2Site and Nl2Page Service Integration for Site Create (#1053)

* Refactor PowerPagesChatParticipantConstants and add NL2PAGE and NL2SITE constants

* Refactor PowerPagesChatParticipantConstants and add new page types

* Update constants and move telemetry to different file

* Refactor and add getCommonHeaders function

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Corrected scope of PPAPI access token for preprod env (#1055)

Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>

* Hook for create site command with nl2page&site (#1057)

* Hook for create site command with nl2page&site

* Disable any type validation

* Refactor PowerPagesChatParticipantConstants and CreateSiteCommand

- Add NL2SITE_GENERATING_SITE constant for generating a new Power Pages site
- Update progress message in CreateSiteCommand to use NL2SITE_GENERATING_SITE constant
- Remove unnecessary markdown formatting in CreateSiteHelper error handling

* Refactor localization files and update Power Pages chat participant utils

* Refactor NL2SiteService and Nl2PageService to include additional telemetry logging

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: tyaginidhi <tyaginidhi@users.noreply.github.com>

* Add environment list retrieval and refactor BAP endpoint logic (#1060)

* Add environment list retrieval and refactor BAP endpoint logic

* Add type annotation for environment list retrieval in Utils.ts

* Update src/common/utilities/Utils.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Refactor BAP environment list URL to use a variable for API version and update imports in Utils.ts

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [PowerPages][create-site] Preview and Edit Site Page and Command Registration (#1061)

* Enhance CreateSiteCommand to include extension context and add ReadonlyFileSystemProvider for site page previews

* Implement EditableFileSystemProvider for site page editing and update CreateSiteHelper to utilize it

* Integrate CreateSiteCommand into CommandRegistry and update related components for site creation functionality

* Disable copy functionality in EditableFileSystemProvider implementation

* Remove ReadonlyFileSystemProvider implementation

* Add telemetry constant for previewing site pages and refactor related components

* Refactor CommandRegistry and add command registration utility for chat participants

* Add constants for site creation parameters and refactor NL2SiteService to use them

* Refactor CreateSiteCommand and CreateSiteHelper to use structured options and improve readability; add CreateSiteTypes for better type management

* Add error telemetry constant for previewing site pages and handle errors in previewSitePagesContent function

* Rename fileContentMap to _fileContentMap for consistency and clarity in EditableFileSystemProvider

* Remove unused getUpdatedPageContent function from CreateSiteHelper to streamline code

* Add ESLint disable comments for any type usage in CreateSiteHelper and CreateSiteTypes

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Bump cross-spawn (#1059)

Bumps  and [cross-spawn](https://github.com/moxystudio/node-cross-spawn). These dependencies needed to be updated together.

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

Updates `cross-spawn` from 6.0.5 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump CLI version from 1.35.1 to 1.37.4 (#1065)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* December Release Notes (#1066)

* add release note

* fix typo

---------

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* Remove unused command from package.json (#1070)

Removing the command `extension.createChatView` from package.json as it is registered but there is no handler associated with it.

* Fix error type for concurrency handler (#1071)

Fixes the error throws in case of bulk header rejection

* Add code coverage output folder in gitignore (#1072)

Adding the code coverage output folder `.nyc_ouput` folder in `.gitignore` so that it doesn't show up in `git diff` after running code coverage command.

* Refactor CLI Acquisition Context (#1074)

* Refactor CLI Acquisition Context

* Fix import

* Add tests

* [PowerPages] [Create-Site] Implement multi-step site creation with enhanced input handling (#1063)

* Enhance CreateSiteCommand to include extension context and add ReadonlyFileSystemProvider for site page previews

* Implement EditableFileSystemProvider for site page editing and update CreateSiteHelper to utilize it

* Integrate CreateSiteCommand into CommandRegistry and update related components for site creation functionality

* Disable copy functionality in EditableFileSystemProvider implementation

* Remove ReadonlyFileSystemProvider implementation

* Add telemetry constant for previewing site pages and refactor related components

* Refactor CommandRegistry and add command registration utility for chat participants

* Add constants for site creation parameters and refactor NL2SiteService to use them

* Refactor CreateSiteCommand and CreateSiteHelper to use structured options and improve readability; add CreateSiteTypes for better type management

* Add error telemetry constant for previewing site pages and handle errors in previewSitePagesContent function

* Rename fileContentMap to _fileContentMap for consistency and clarity in EditableFileSystemProvider

* Implement multi-step input for site creation and register command for user inputs in CreateSiteHelper

* Enhance copilot availability checks and update response structure in ArtemisService

* Add site creation inputs and environment info interfaces; refactor CreateSiteCommand

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteTypes.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteHelper.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteHelper.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Add eslint directives to suppress no-explicit-any warnings in site page handling

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Fix accessibility issue in Pages Copilot pane (#1076)

Fix accessibility issue in `Send` button in Power Pages Copilot pane. Updated the `aria-label` to `Send` instead of `Match Case`

* Fix casing of OrgUrl to orgUrl in site creation input handling (#1077)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add test scripts in .vscode\tasks.json (#1078)

To be able to easily run tests from VS Code, added test scripts in `tasks.json`

* Remove redundant step from gulp file (#1079)

The step `testWeb` is redundant as the step `testUnitTests` already includes the test pattern defined in `testWeb` step. Hence, removing it from gulp config.

* Added site runtime preview code behind ECS Config (#1052)

* Added site runtime preview code behind ECS Config

* localization added and moved preview site code to separate file

* fixed build failures and handled empty website recordID

* Corrected website details ppapi service for runtime preview

* merged main branch to runtimePreviewECS

* correcting function call for runtime preview

* corrected localised error

* removed bug of no show command found

* Launch Edge new tab instead of launching project

---------

Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Hide preview site command from palette when feature is disabled (#1080)

* Enhance feedback interaction by adding keyboard accessibility for thumbs up/down buttons (#1082)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add conditional visibility for Current Active Users command in web virtual workspace and remove alt cmds (#1083)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Handle null language code for content snippets and update query parameters in portal schema (#1086)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance accessibility by adding ARIA attributes and keyboard navigation support (#1085)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance accessibility by adding ARIA attributes and making thinking message focusable (#1087)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add sovereign cloud endpoints for PPAPI service (#1081)

* Site Preview Enhancements: Clear cache and telemetry logging (#1088)

* Enhance accessibility by improving focus styles and adding ARIA attributes in notification panel (#1089)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Actions Hub: Implement base classes to show tree structure (#1090)

* Add models for Actions Hub

* Basic wireup

* Add models

* ToDo

* Remove foo environment

* Remove error

* Refactor

* Add translations

* Add tests

* Add tree item for No sites found

* Add translations

* Added changes for orgGeo (#1093)

* Refactor: Move actions-hub and preview-site folder under power-pages (#1092)

* Refactor: Move actions-hub and preview-site folder under power-pages

* Remove unwanted file

* Refactor

* Add PPAPI to known words

* Disable actions hub by default

* Web Extension: Remove dependency on website preview URL (#1091)

* Web Extension: Remove dependency on website preview URL

* Translations

* Web Extension: Fix file opening for media files (#1094)

Using `vscode.open` API to open the default file instead of `window.showTextDocument` because `showTextDocument` doesn't open binary files to it was failing to open non-text files.

* Bump CLI version from 1.37.4 to 1.39.3 (#1095)

* Fix environment icon for dark mode (#1097)

* Fix environment icon for dark mode

* Refactor

* Fix test

* fix screen reader issue in copilot chat (#1100)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* add focus ring (#1099)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* add release notes (#1101)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* Site Preview: Initialize after ECS fetch (#1102)

* Site Preview: Initialize after ECS fetch

* Set context after loading website URL

* Add source attribute handling and telemetry for invalid attributes in web extension (#1105)

* Add source attribute handling and telemetry for invalid attributes in web extension

* Refactor source attribute handling in processDataAndCreateFile function

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance Actions Hub with environment support and unit tests (#1098)

* Enhance Actions Hub: Add support for environment retrieval and localization updates

* Add unit tests for ActionsHubTreeDataProvider functionality

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Fix A11y bug (#1108)

* Actions Hub: Add toggle based on ECS (#1107)

* Add feature flag for Actions Hub

* Refactor

* Fix errors

* Fix errors

* Add unit tests

* [PowerPages] [Site Preview] Simplify preview functionality (#1109)

* Refactor telemetry handling by removing ITelemetry parameter from functions (#1110)

* Refactor telemetry handling by removing ITelemetry parameter from sendTelemetryEvent and related functions

* Refactor: Remove telemetry parameter from getEndpoint and related functions

* Refactor: Remove telemetry parameter from authentication functions and related calls

* Refactor: Remove telemetry parameter from getArtemisResponse call in activate function

* Refactor: Remove telemetry parameter from various authentication and service calls

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Webpack: Ignore warnings (#1113)

* Run desktop integration tests in CI (#1114)

* Run desktop integration tests in CI

* Run desktop test only on Windows

* Enhance Actions Hub with environment retrieval and refresh functionality (#1111)

* Enhance Actions Hub: Add support for environment retrieval and localization updates

* Add unit tests for ActionsHubTreeDataProvider functionality

* Add AuthManager class and AuthInfo interface for authentication handling

* Enhance authentication handling: Add auth info extraction and update environment info retrieval in Actions Hub

* Add refresh command and event handling for Actions Hub environment changes

* Refactor ActionsHubTreeDataProvider: Manual refresh should trigger Pac

* Remove AuthManager class and related authentication logic

* Add error handling to refresh command in ActionsHubTreeDataProvider

* RemoveDependencyOnOldTelemetryCluster

* Refactor ActionsHubTreeDataProvider tests to include PacTerminal in initialization

* Remove telemetry dependency from intelligence API endpoint retrieval

* Refactor telemetry handling by removing ITelemetry parameter from sendTelemetryEvent and related functions

* Refactor: Remove telemetry parameter from getEndpoint and related functions

* Refactor: Remove telemetry parameter from authentication functions and related calls

* Refactor telemetry event assertion in AuthenticationProvider tests

* Refactor: Remove telemetry parameter from getArtemisResponse call in activate function

* Refactor: Remove telemetry parameter from various authentication and service calls

* Refactor: Rename AuthManager to PacAuthManager for consistency

* Refactor: Use pacWrapper for activeAuth retrieval in ActionsHubTreeDataProvider

* Add ACTIONS_HUB_REFRESH_FAILED constant and update error logging in ActionsHubTreeDataProvider

* Remove unused AuthInfo interface from Constants.ts

* Refactor ActionsHub initialization by removing authentication handling and simplifying the process

* Add localization for expired environment message and update refresh title

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Remove old telemetry usage (#1112)

* Remove old telemetry usage

* Remove more usage

* Remove more usage

* Remove more usage

* Remove more usage

* Fix tests

* Fix typo

* Comment tests

* Refactor Actions Hub and Preview Site initialization logic (#1115)

* [PowerPages][Actions Hub] Toggle to Change Environment (#1119)

* Add switch environment functionality to Actions Hub

* Update icon for switch environment command in Actions Hub

* Update translation for switch environment title to "Change Environment"

* Add tests for switch environment command registration and error handling

* Remove redundant error handling tests for switch environment and refresh commands

* Refactor command names to include namespace for actions in Actions Hub

* Update refresh command registration to include namespace in Actions Hub tests

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Bump serialize-javascript, gulp-mocha and mocha (#1120)

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) to 6.0.2 and updates ancestor dependencies [serialize-javascript](https://github.com/yahoo/serialize-javascript), [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) and [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together.


Updates `serialize-javascript` from 5.0.1 to 6.0.2
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v5.0.1...v6.0.2)

Updates `gulp-mocha` from 8.0.0 to 10.0.1
- [Release notes](https://github.com/sindresorhus/gulp-mocha/releases)
- [Commits](sindresorhus/gulp-mocha@v8.0.0...v10.0.1)

Updates `mocha` from 9.2.2 to 11.1.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](mochajs/mocha@v9.2.2...v11.1.0)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-type: indirect
- dependency-name: gulp-mocha
  dependency-type: direct:development
- dependency-name: mocha
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Power Pages][Actions Hub] Add "Show Environment Details" to Actions Hub (#1118)

* [Power Pages][Actions Hub] Add "Show Environment Details" to Actions Hub

* [PowerPages][Actions Hub] Update icon for switch environment command

* [PowerPages][Actions Hub] Remove refresh command from Actions Hub navigation

* Fix order

* Update translation identifiers and fix newline in localization files

* Refactor Actions Hub commands and extract command handlers into a new file

* Add tests for switchEnvironment command

* [PowerPages][ActionsHub] - Show Active and Inactive Sites (#1117)

* show active and inactive sites in actions hub view

* add integration tests for actions hub

* [Power Pages][Actions Hub] Add NoSitesTreeItem to handle empty site groups

* [Power Pages][Actions Hub] Update website details property names to PascalCase and change collapsible state to expanded

* Refactor environment handling: rename method for clarity, improve error handling, and streamline environment selection process

* Update localization strings for environment selection and session details

* Refactor authentication and organization data structures; update TypeScript configuration and remove unused PacAuthManager

* Add ArtemisContext for managing service responses; update ActionsHub and related components to utilize new context

---------

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [PowerPages][Actions Hub] Add Instance URL to Environment Details (#1122)

* Add 'isCurrent' property and description to site tree items (#1123)

* Update ArtemisService URLs to use production segment for GCC, high, mooncake, and DOD environments (#1121)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [PowerPages][Actions Hub] Add commands to open active and inactive site in PP Studio (#1124)

* [PowerPages][Actions Hub] Add commands to open active and inactive sites in Power Pages Studio

* Refactor studio URL handling to use constants for endpoints

* Add localization entries for "Current" and "Instance url" in JSON and XLF files

* Refactor studio URL generation to include environment ID and add openInactiveSitesInStudio function

* [Power Pages][Actions Hub] Add ability to preview active sites in VS Code (#1127)

* Add preview command and siteInfo property to SiteTreeItem

* Add unit tests for PreviewSite.isSiteRuntimePreviewEnabled method

* Refactor PreviewSite initialization and loadSiteUrl method; update tests for loadSiteUrl functionality

* Add tests for ActionsHubTreeDataProvider.getChildren method; mock website data for active and inactive sites

* Add mocks for active and all websites in ActionsHubTreeDataProvider tests

* Refactor site context values to distinguish between current and non-current active sites; update related tests

* Add websiteId property to IWebsiteInfo interface and update related tree item implementations

* Update walkthrough title to use h4 and enhance focus indicator for accessibility (#1125)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add new command to create authentication profile and handle errors in actions hub (#1128)

* Add new command to create authentication profile and handle errors in actions hub

* Refactor tests for ActionsHubCommandHandlers and ActionsHubTreeDataProvider to improve argument validation and remove unnecessary assertions

* Stub AuthInfo and OrgInfo getters in ActionsHubTreeDataProvider tests to improve test reliability

* Remove redundant test for creating new auth profile in ActionsHubCommandHandlers

* Fix async initialization in ActionsHub and streamline environment info handling in ActionsHubTreeDataProvider

* Implement createAuthProfileExp function and add tests for authentication profile creation

* Refactor createAuthProfileExp function import path and add new utility file for authentication profile creation

* Add tests for ActionsHubTreeDataProvider to validate site retrieval and error handling

* Remove redundant tests from ActionsHubTreeDataProvider for getChildren method

* Refactor import path for createAuthProfileExp to new utility file in PacAuthUtil

* Remove tests for PacAuthUtils as part of code cleanup

* Add comment to clarify DV authentication requirement in createNewAuthProfile

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Show current site (#1129)

* Refactor site context handling and update site data types for improved clarity

* Refactor website data handling to use IWebsiteDetails and streamline site fetching logic

* Refactor import statements in ActiveGroupTreeItem, EnvironmentGroupTreeItem, and InactiveGroupTreeItem for improved organization and clarity

* Refactor import statements in InactiveGroupTreeItem for improved organization

* Add tests for PacContext and improve context update logic

* Add tests for previewSite functionality in ActionsHubCommandHandlers

* Add fetchWebsites function and related tests for website retrieval logic

* Add tests for ActiveGroupTreeItem and update siteInfo assertions

* Add tests for ActionsHubTreeDataProvider to verify website loading logic

* Add websiteid to VSCode settings for improved configuration

* Refactor ActionsHubTreeDataProvider to simplify loadWebsites method and improve refresh logic

* Refactor CurrentSiteContext to utilize utility functions for website YAML handling and improve code clarity

* Refactor ActionsHubTreeDataProvider to streamline website loading logic and improve refresh handling

* [Power Pages][Actions Hub] Update "Change environment" option to match Figma (#1130)

* [Power Pages][Actions Hub] Update "Change environment" option to match Figma

* Add test for environment switching in Actions Hub command handlers

* Refactor environment switching to use detailed description and enhance test coverage for environment selection

* Refactor tests for ActionsHubTreeDataProvider by removing redundant cases and ensuring proper stubbing of fetchWebsites

* Disable website loading in ActionsHubTreeDataProvider tests to ensure empty result for specific scenarios

* [Power Pages][Actions Hub] Add revealInOS command for current active site and update translations (#1131)

* Refactor website details to use camelCase properties and add siteVisibility field (#1133)

* [Power Pages][Actions Hub] Update command references for authentication profile (#1132)

* [Power Pages][Actions Hub] Update command references for authentication profile

* Update command reference for new authentication profile in ActionsHubTreeDataProvider test

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuag@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [Power Pages][Actions Hub] Add open site management functionality (#1136)

* [Power Pages][Actions Hub] Add open site management functionality

* Update translation for "Open Site Management" to use lowercase in localization files

* [PowerPages][ActionsHub] Upload site command with visibility confirmation (#1134)

* Refactor website details to use camelCase properties and add siteVisibility field

* [Power Pages][Actions Hub] Add upload site command with confirmation dialog

* [Power Pages][Actions Hub] Implement upload site command with confirmation dialog and tests

* [Power Pages][Actions Hub] Add site visibility check before upload confirmation dialog

* [Power Pages][Actions Hub] Enhance upload site command to handle public and private site visibility

* Update login message links and adjust Actions Hub feature gate settings

* [Power Pages][Actions Hub] Update upload site tests to use warning message and reset stubs

* Refactor upload site tests to use showInformationMessage and remove unnecessary stubs

* Refactor uploadSite tests to use showInformationMessage and handle site visibility for public and private sites

* Refactor uploadSite test to remove unused showInformationMessage stub

* ```
Refactor uploadSite tests to improve clarity and maintainability
```

* Stub showInformationMessage in ActionsHubCommandHandlers tests for improved test isolation

* Refactor ActionsHubCommandHandlers tests to improve test isolation by removing unused stubs and enhancing setup

* Refactor test setup in ActionsHubCommandHandlers for improved isolation

---------

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>
Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Update login command reference and add upload site title in localization file (#1138)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] Add title for Copilot feedback Submit button (#1139)

* [PowerPages] [Actions Hub] Add support for other sites in Actions Hub (#1140)

* Add support for other sites in Actions Hub and update related interfaces

* Update tests for OtherSitesGroupTreeItem and ActionsHubTreeDataProvider to include handling of other sites

* Refactor findOtherSites function to accept fs and yaml modules as parameters for improved testability

* Add mockFs and mockYaml to ActionsHubCommandHandlers tests for improved isolation

* Remove test for YAML parsing errors in ActionsHubCommandHandlers to streamline error handling

* Disable Actions Hub Panel by default in fallback configuration

* Clarify comment on dataModelVersion in OtherSitesGroupTreeItem to specify defaulting behavior for other sites

* Add js-yaml dependency and update YAML parsing in WorkspaceInfoFinderUtil

* Remove yaml dependency from package.json and package-lock.json

* Replace js-yaml with yaml package and update YAML parsing methods

* Refactor findOtherSites and createKnownSiteIdsSet to use Set for known site IDs

* Refactor findOtherSites and createKnownSiteIdsMap to use Set for known site IDs

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Add site details command (#1141)

* [Power Pages][Actions Hub] Add site details command

* Add openSiteManagement function with error handling and tests

* Fix menu item order

* [Power Pages] [Actions Hub] Add download site command to Actions Hub (#1143)

* [Power Pages][Actions Hub] Add download site command

* Add tests

* [PowerPages][ActionsHub] Upload functionality for other sites (#1144)

* [Power Pages] Enhance upload functionality to support other sites in Actions Hub

* [Power Pages] Enhance uploadSite functionality with confirmation handling and error management

* [Power Pages][Actions Hub] Refactor test setup by removing unused stubs in ActionsHubCommandHandlers tests

* [Power Pages][Actions Hub] Remove unused error handling test for uploadSite and update data model version for other sites

* [Power Pages][Actions Hub] Remove unused test for upload handling of other sites in ActionsHubCommandHandlers

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] [Actions Hub] Add 'Open in Power Pages Studio' command (#1145)

* [Power Pages][Preview Site] Show notification when previewing site with pending changes (#1146)

* [Power Pages][Preview Site] Show notification when previewing site with pending changes

* [Power Pages][Localization] Update localization strings for site preview notifications

* [Power Pages][Preview Site] Enhance site preview functionality with site visibility and upload path adjustments

* [Power Pages][PacInterop] Update PAC executable path to use dynamic CLI path

* Refactor uploadSite function calls to include an empty string parameter for consistency

* Refactor uploadSite to use logical OR for websitePath fallback

* [Power Pages] [Actions Hub] Enhance revealInOS command to support other sites (#1147)

* [Power Pages] [Actions Hub] Initialize OrgChangeNotifier instance in activate function for all workspaces (#1148)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] [Actions Hub] Handle null or undefined labels in ActionsHubTreeItem (#1149)

* [Power Pages] [Actions Hub] Handle null or undefined labels in ActionsHubTreeItem

* [Power Pages] [Actions Hub] Refactor isCurrent logic and enhance tests for ActiveGroupTreeItem

* Fix typos and improve file path handling in tests (#1151)

- ✏️ Corrected spelling of "Pattern" in test names
- 🔧 Updated file path handling to use vscode.Uri.file
- 📂 Simplified file path construction for better readability

-Priyanshu

* Remove outline from feedback button styles (#1150)

- ✨ Removed the outline property from button styles for improved accessibility.

-Priyanshu

* [Power Pages] [Copilot] Add localization for Copilot response and code block messages; enhance accessibility with live regions for screen readers (#1152)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Fix typos in OneDSLogger and oneDSLoggerWrapper (#1153)

- ✏️ Corrected spelling of 'initialize' in OneDSLogger and oneDSLoggerWrapper classes
- 🔧 Updated variable name from 'oneDSLoggerIntance' to 'oneDSLoggerInstance' for consistency

-Priyanshu

* Enhance website management features (#1155)

- ✨ Added new properties `createdOn` and `creator` to website details.
- 🔄 Refactored site visibility handling to use an enum.
- 🛠️ Updated various components to utilize new properties.
- ✅ Enhanced tests to cover new functionality.

-Priyanshu

* [Powerpages][ActionsHub]Sort active websites by creation date in fetchWebsites function (#1156)

* Sort active websites by creation date in fetchWebsites function

* Refactor website sorting logic to use a dedicated function for sorting by creation date

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Add unit tests (#1157)

* Add unit tests for getActiveWebsites function

- 🧪 Implement tests for calling PPAPIService.getAllWebsiteDetails with correct parameters.
- ✅ Validate return values from PPAPIService for active websites.
- 🛠️ Handle empty array responses from PPAPIService.
- 🚨 Ensure errors from PPAPIService are propagated correctly.

-Priyanshu

* Update getAppModules to accept accessToken parameter

- 🔧 Modified getAppModules function to accept accessToken as a parameter.
- 🔄 Updated getAllWebsites to pass accessToken when calling getAppModules.
- 📜 Adjusted related API calls to ensure proper token usage.

-Priyanshu

* Add coding and test guidelines to documentation (#1158)

This commit introduces a comprehensive set of coding and test instructions to ensure consistency and quality in the codebase.
- 📜 Added coding guidelines including naming conventions and style rules.
- 🧪 Included test instructions for writing and running tests effectively.

-Priyanshu

* Bump CLI version to 1.40.4 (#1159)

Bump CLI version to latest

* [Power Pages][Actions Hub] Enhance telemetry logging and error handling (#1161)

* Enhance telemetry logging and error handling

- ✨ Added `getBaseEventInfo` function for enriched telemetry data.
- 🔧 Updated logging in `ActionsHub`, `ActionsHubCommandHandlers`, and `ActionsHubTreeDataProvider` to include event info.
- 🐛 Improved error handling in `fetchWebsites` and `loadWebsites` methods.
- ✅ Added unit tests for `getBaseEventInfo` and updated existing tests for logging changes.

-Priyanshu

* Enhance telemetry and error handling

- ✨ Added OS detection in telemetry events.
- 🔧 Improved logging for environment switching and site management actions.
- 🐛 Fixed error handling in various command handlers.
- 📜 Updated constants for new telemetry events.
- 🧪 Added tests for telemetry helper functions.

-Priyanshu

* Refactor telemetry test for clarity

- 🧹 Remove unused OS import from TelemetryHelper.test.ts
- 🔄 Rename 'siteId' to 'currentSiteId' for consistency in event info
- ✅ Update test assertions to reflect the new naming
- 🧪 Ensure tests maintain expected behavior after changes

-Priyanshu

* Add tenantId to event info and update tests

- ✨ Added tenantId to the event info in getBaseEventInfo.
- 🔧 Updated tests to include tenantId in various scenarios.
- 🧪 Enhanced test stubs for AuthInfo to ensure accurate testing.
- 📜 Improved test coverage for cases with undefined values.
- 🛠️ Fixed formatting issues in TelemetryHelper.ts.
-Priyanshu

* Enhance telemetry and localization support

- ✨ Added new localization strings for environment changes, site visibility, creator, and created date.
- 🔧 Refactored telemetry helper to remove OS dependency and improve event info structure.
- 🧪 Updated tests to reflect changes in telemetry event info and removed OS checks.

-Priyanshu

* Close existing Edge DevTools before launching preview (#1163)

- 🔧 Added a method to close existing Edge DevTools tabs before launching a new preview.
- 🚀 Updated the site preview command to ensure no duplicate DevTools instances are open.

-Priyanshu

* Add preview message for published changes (#1164)

- ✨ Added a new message for the preview indicating that it shows published changes.
- 🔧 Updated localization files to include the new message.
- 📜 Modified the Constants and PreviewSite files to utilize the new message.

-Priyanshu

* [Power Pages][Actions Hub] Refactor telemetry logging  (#1167)

* Refactor telemetry logging in Actions Hub

- 🔄 Replaced oneDSLoggerWrapper with direct calls to traceInfo and traceError in ActionsHubCommandHandlers.
- 🧪 Updated TelemetryHelper to utilize oneDSLoggerWrapper for logging.
- ✅ Enhanced unit tests for TelemetryHelper to verify logging behavior.
- 🔧 Adjusted context population in OneDSLogger for tenantId.

-Priyanshu

* Remove console log from telemetry event

- 🧹 Removed unnecessary console log statement for telemetry events to clean up output.
- 🔒 Ensured sensitive data redaction remains intact after event enrichment.

-Priyanshu

* Update CHANGELOG.md (#1168)

* Update CHANGELOG.md

* Update CHANGELOG for version 2.0.82

* Enhance spell check words and clean activation events (#1169)

- ✏️ Added additional words to the cSpell configuration.
- 🗑️ Removed unused activation events from package.json.

-Priyanshu

* Add download site folder configuration and description (#1170)

- ✨ Introduced a new configuration for the download site folder.
- 📝 Added a description for the download site folder setting in localization files.
- 🔧 Updated the logic to check for a configured download path in the ActionsHub command handlers.

-Priyanshu

* [Power Pages] Refactor PortalWebView to use new utility function (#1172)

* Refactor PortalWebView to use new utility function

- 🔄 Replace `searchPortalConfigFolder` with `findWebsiteYmlFolder` for improved folder detection.
- 🔧 Update logic to handle active text editor and reveal the panel correctly.
- 📂 Simplify local resource root folder setup.

-Priyanshu

* Add error message for missing website root folder

- ✏️ Added a new error message for when the website root folder cannot be located in the localization files.
- 📜 Updated the XLF translation file to include the new message.

-Priyanshu

* Bump PAC version to 1.41.1 (#1173)

Bump PAC version to 1.41.1

* Update CHANGELOG.md (#1174)

* Bump koa from 2.14.2 to 2.16.1 (#1177)

Bumps [koa](https://github.com/koajs/koa) from 2.14.2 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](koajs/koa@2.14.2...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Enhance package.json by adding new categories and keywords for improved discoverability and updating Copilot description for Power Pages (#1175)

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Bump axios, @fluidframework/azure-client and fluid-framework (#1178)

Bumps [axios](https://github.com/axios/axios) to 1.8.4 and updates ancestor dependencies [axios](https://github.com/axios/axios), [@fluidframework/azure-client](https://github.com/microsoft/FluidFramework/tree/HEAD/packages/service-clients/azure-client) and [fluid-framework](https://github.com/microsoft/FluidFramework/tree/HEAD/packages/framework/fluid-framework). These dependencies need to be updated together.


Updates `axios` from 0.28.0 to 1.8.4
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.28.0...v1.8.4)

Updates `@fluidframework/azure-client` from 1.2.0 to 2.31.1
- [Release notes](https://github.com/microsoft/FluidFramework/releases)
- [Changelog](https://github.com/microsoft/FluidFramework/blob/main/packages/service-clients/azure-client/CHANGELOG.md)
- [Commits](https://github.com/microsoft/FluidFramework/commits/client_v2.31.1/packages/service-clients/azure-client)

Updates `fluid-framework` from 1.4.0 to 2.31.1
- [Release notes](https://github.com/microsoft/FluidFramework/releases)
- [Changelog](https://github.com/microsoft/FluidFramework/blob/main/packages/framework/fluid-framework/CHANGELOG.md)
- [Commits](https://github.com/microsoft/FluidFramework/commits/client_v2.31.1/packages/framework/fluid-framework)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.8.4
  dependency-type: indirect
- dependency-name: "@fluidframework/azure-client"
  dependency-version: 2.31.1
  dependency-type: direct:production
- dependency-name: fluid-framework
  dependency-version: 2.31.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add environment initialization context (#1176)

- ✨ Added 'microsoft.powerplatform.environment.initialized' context for command execution in activate function.
- 🔧 Updated command execution on organization change error to ensure actions hub initialization.

-Priyanshu

* Enhance context management for auth and actions hub (#1179)

- ✨ Set context for auth panel initialization.
- 🔄 Update loading state context for actions hub websites.
- 🛠️ Improve conditional enablement for UI elements.

-Priyanshu

* [PowerPages][Web] PPHome Launch Error Page fix for V1 (#1180)

* Add REFERRER enum and update PortalsFS to handle referrer logic

* Update PortalsFS to handle referrer logic based on portal version

* Fix comment to clarify behavior when referrer is power pages home and DM is V1

* Add spacing for REFERRER enum declaration for consistency

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* show outline for focused link. (#1181)

* [PowerPages][ActionsHub][Enable Actions Hub Panel in VS Code Desktop (#1182)

* Enable Actions Hub Panel in VS Code Desktop

* Fix ActionsHub enabling logic to return true when undefined

* Fix test assertion for ActionsHub enabling logic to return true when undefined

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Added sessionId support to Power Pages actions (#1186)

* Implement authentication enhancements and update createNewAuthProfile to accept orgUrl (#1187)

* Implement authentication enhancements and update createNewAuthProfile to accept orgUrl

* Add comment to clarify error handling for user consent in bapServiceAuthentication

* Fix auth

* Update comment

* load websites

* Use basic auth when creating new auth profile

* Rename method

* Fix unit tests

* Update unit tests

* Add global auth for web extension

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Refactor panel registration in PAC Activity Bar and Terminal for improved ECS initialization handling (#1188)

* Refactor panel registration in PAC Activity Bar and Terminal for improved ECS initialization handling

* Remove RegisterPanels function from PacActivityBarUI

- 🗑️ Deleted the RegisterPanels function that combined basic and copilot panels.
- 🔧 Simplified panel registration by directly using individual registration functions.

-Priyanshu

* Refactor copilot panel registration logic for improved clarity and reuse

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Bump CLI version from 1.41.1 to 1.42.1 (#1190)

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* [PowerPages][GitHub Copilot] Refactor endpoint initialization logic to use cached data and improve efficiency (#1191)

* Refactor endpoint initialization logic to use cached data and improve efficiency

* Refactor getEndpoint function to remove cachedEndpoint parameter and streamline endpoint retrieval

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* [Power Pages] [Copilot] Implement Copilot Governance Check feature and telemetry updates (#1171)

* Implement Copilot Governance Check feature and related telemetry events

* Refactor Copilot governance check feature and update related settings

* Add TODO comment to review governance endpoints in PPAPIService

* Refactor governance flag retrieval to use workspace folder path directly and update response handling

* Refactor CurrentSiteContext to utilize getCurrentSiteInfo utility and update PPAPIService to fetch website ID accordingly

* Add websiteId parameter to PowerPagesCopilot and update related services for improved governance checks for web copilot

* Update governance endpoint construction in PPAPIService to use website details and modify response handling in sendApiRequest

* Update governance endpoint construction in PPAPIService to use website details and modify response handling in sendApiRequest

* Remove hardcoded test AIB endpoint from sendApiRequest function

* Fix sendApiRequest to use the correct aibEndpoint variable for API requests

* Add governance settings to telemetry and API service for Pro Dev Copilot

* Fix casing of CopilotGovernanceSetting to copilotGovernanceSetting in feature flags

* Add governance settings to telemetry data and update sendTelemetryEvent calls

* Refactor governance flag check to handle multiple string representations

* Fix formatting and governance checks in services

- ✨ Adjusted formatting in OneDSLogger for clarity.
- 🔧 Added a missing line break in PPAPIService.
- 🔄 Updated governance check conditions in PPAPIService.

-Priyanshu

* Passing website for desktop during copilot panel initialization.

* Refactor governance settings to use constant for Copilot governance configuration

* Update COPILOT_GOVERNANCE_SETTING_NAME to allow makers for existing sites

* Refactor endpoint initialization logic to use cached data and improve efficiency

* Update PowerPagesChatParticipant instantiation to include websiteId

* Refactor getEndpoint function to remove cachedEndpoint parameter and streamline endpoint retrieval

* Refactor ICurrentSiteContext interface and remove redundant definition from constants

* Add unit tests for PPAPIService to validate API interactions and governance flag logic

* update telemetry event value

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [Power Pages][Actions Hub] Configure upload and download site command for code sites (#1192)

* Update the logic to find other sites using new .powerpages-site metadata folder.

- ✨ Introduced a new constant for the Power Pages site folder.
- 🔧 Updated logic in findOtherSites to check for the existence of the new folder.
- 🛠️ Enhanced condition to ensure siteTreeItem is defined before accessing its properties.

-Priyanshu

* Refactor createKnownSiteIdsSet function declaration

- 🔧 Changed the export declaration of createKnownSiteIdsSet to a regular function declaration.
- 📦 No functional changes were made to the logic.
- -Priyanshu

* Enhance Power Pages site management features

- ✨ Added `isCodeSite` property to various site-related models.
- 🔧 Updated logic to handle code sites in site download commands.
- 📈 Introduced new API paths for managing Power Pages site settings.
- 🛠️ Refactored site fetching logic to incorporate new settings.

-Priyanshu

* Add upload code site functionality and related updates

- ✨ Implemented `uploadCodeSite` function for uploading code sites.
- 🔧 Updated `uploadOtherSite` and `uploadCurrentSite` to handle code sites.
- 📦 Added constants for error messages related to code site uploads.
- 🔍 Enhanced `getCurrentSiteInfo` to find Power Pages site folder.
- 🛠️ Introduced `findPowerPagesSiteFolder` utility function.

-Priyanshu

* Update CHANGELOG for pac CLI 1.42.1 release and authentication flow improvements (#1193)

* Update CHANGELOG for pac CLI 1.42.1 release and authentication flow improvements

* Add Download/Upload support for code sites in Actions hub to CHANGELOG

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Ashwani Kumar <ashwanikumar1303@gmail.com>
Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>
Co-authored-by: tyaginidhi <tyaginidhi@users.noreply.github.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sandeep Satheesh <sansth4x496@gmail.com>
Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuag@microsoft.com>
Co-authored-by: BidishaMS <97606074+BidishaMS@users.noreply.github.com>
amitjoshi438 added a commit that referenced this pull request May 16, 2025
* Refactor PowerPagesChatParticipant and add CommandRegistry (#1050)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [PowerPage][Copilot] Nl2Site and Nl2Page Service Integration for Site Create (#1053)

* Refactor PowerPagesChatParticipantConstants and add NL2PAGE and NL2SITE constants

* Refactor PowerPagesChatParticipantConstants and add new page types

* Update constants and move telemetry to different file

* Refactor and add getCommonHeaders function

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Corrected scope of PPAPI access token for preprod env (#1055)

Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>

* Hook for create site command with nl2page&site (#1057)

* Hook for create site command with nl2page&site

* Disable any type validation

* Refactor PowerPagesChatParticipantConstants and CreateSiteCommand

- Add NL2SITE_GENERATING_SITE constant for generating a new Power Pages site
- Update progress message in CreateSiteCommand to use NL2SITE_GENERATING_SITE constant
- Remove unnecessary markdown formatting in CreateSiteHelper error handling

* Refactor localization files and update Power Pages chat participant utils

* Refactor NL2SiteService and Nl2PageService to include additional telemetry logging

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: tyaginidhi <tyaginidhi@users.noreply.github.com>

* Add environment list retrieval and refactor BAP endpoint logic (#1060)

* Add environment list retrieval and refactor BAP endpoint logic

* Add type annotation for environment list retrieval in Utils.ts

* Update src/common/utilities/Utils.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Refactor BAP environment list URL to use a variable for API version and update imports in Utils.ts

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [PowerPages][create-site] Preview and Edit Site Page and Command Registration (#1061)

* Enhance CreateSiteCommand to include extension context and add ReadonlyFileSystemProvider for site page previews

* Implement EditableFileSystemProvider for site page editing and update CreateSiteHelper to utilize it

* Integrate CreateSiteCommand into CommandRegistry and update related components for site creation functionality

* Disable copy functionality in EditableFileSystemProvider implementation

* Remove ReadonlyFileSystemProvider implementation

* Add telemetry constant for previewing site pages and refactor related components

* Refactor CommandRegistry and add command registration utility for chat participants

* Add constants for site creation parameters and refactor NL2SiteService to use them

* Refactor CreateSiteCommand and CreateSiteHelper to use structured options and improve readability; add CreateSiteTypes for better type management

* Add error telemetry constant for previewing site pages and handle errors in previewSitePagesContent function

* Rename fileContentMap to _fileContentMap for consistency and clarity in EditableFileSystemProvider

* Remove unused getUpdatedPageContent function from CreateSiteHelper to streamline code

* Add ESLint disable comments for any type usage in CreateSiteHelper and CreateSiteTypes

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Bump cross-spawn (#1059)

Bumps  and [cross-spawn](https://github.com/moxystudio/node-cross-spawn). These dependencies needed to be updated together.

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

Updates `cross-spawn` from 6.0.5 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump CLI version from 1.35.1 to 1.37.4 (#1065)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* December Release Notes (#1066)

* add release note

* fix typo

---------

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* Remove unused command from package.json (#1070)

Removing the command `extension.createChatView` from package.json as it is registered but there is no handler associated with it.

* Fix error type for concurrency handler (#1071)

Fixes the error throws in case of bulk header rejection

* Add code coverage output folder in gitignore (#1072)

Adding the code coverage output folder `.nyc_ouput` folder in `.gitignore` so that it doesn't show up in `git diff` after running code coverage command.

* Refactor CLI Acquisition Context (#1074)

* Refactor CLI Acquisition Context

* Fix import

* Add tests

* [PowerPages] [Create-Site] Implement multi-step site creation with enhanced input handling (#1063)

* Enhance CreateSiteCommand to include extension context and add ReadonlyFileSystemProvider for site page previews

* Implement EditableFileSystemProvider for site page editing and update CreateSiteHelper to utilize it

* Integrate CreateSiteCommand into CommandRegistry and update related components for site creation functionality

* Disable copy functionality in EditableFileSystemProvider implementation

* Remove ReadonlyFileSystemProvider implementation

* Add telemetry constant for previewing site pages and refactor related components

* Refactor CommandRegistry and add command registration utility for chat participants

* Add constants for site creation parameters and refactor NL2SiteService to use them

* Refactor CreateSiteCommand and CreateSiteHelper to use structured options and improve readability; add CreateSiteTypes for better type management

* Add error telemetry constant for previewing site pages and handle errors in previewSitePagesContent function

* Rename fileContentMap to _fileContentMap for consistency and clarity in EditableFileSystemProvider

* Implement multi-step input for site creation and register command for user inputs in CreateSiteHelper

* Enhance copilot availability checks and update response structure in ArtemisService

* Add site creation inputs and environment info interfaces; refactor CreateSiteCommand

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteTypes.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteHelper.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Update src/common/chat-participants/powerpages/commands/create-site/CreateSiteHelper.ts

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Add eslint directives to suppress no-explicit-any warnings in site page handling

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Fix accessibility issue in Pages Copilot pane (#1076)

Fix accessibility issue in `Send` button in Power Pages Copilot pane. Updated the `aria-label` to `Send` instead of `Match Case`

* Fix casing of OrgUrl to orgUrl in site creation input handling (#1077)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add test scripts in .vscode\tasks.json (#1078)

To be able to easily run tests from VS Code, added test scripts in `tasks.json`

* Remove redundant step from gulp file (#1079)

The step `testWeb` is redundant as the step `testUnitTests` already includes the test pattern defined in `testWeb` step. Hence, removing it from gulp config.

* Added site runtime preview code behind ECS Config (#1052)

* Added site runtime preview code behind ECS Config

* localization added and moved preview site code to separate file

* fixed build failures and handled empty website recordID

* Corrected website details ppapi service for runtime preview

* merged main branch to runtimePreviewECS

* correcting function call for runtime preview

* corrected localised error

* removed bug of no show command found

* Launch Edge new tab instead of launching project

---------

Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Hide preview site command from palette when feature is disabled (#1080)

* Enhance feedback interaction by adding keyboard accessibility for thumbs up/down buttons (#1082)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add conditional visibility for Current Active Users command in web virtual workspace and remove alt cmds (#1083)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Handle null language code for content snippets and update query parameters in portal schema (#1086)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance accessibility by adding ARIA attributes and keyboard navigation support (#1085)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance accessibility by adding ARIA attributes and making thinking message focusable (#1087)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add sovereign cloud endpoints for PPAPI service (#1081)

* Site Preview Enhancements: Clear cache and telemetry logging (#1088)

* Enhance accessibility by improving focus styles and adding ARIA attributes in notification panel (#1089)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Actions Hub: Implement base classes to show tree structure (#1090)

* Add models for Actions Hub

* Basic wireup

* Add models

* ToDo

* Remove foo environment

* Remove error

* Refactor

* Add translations

* Add tests

* Add tree item for No sites found

* Add translations

* Added changes for orgGeo (#1093)

* Refactor: Move actions-hub and preview-site folder under power-pages (#1092)

* Refactor: Move actions-hub and preview-site folder under power-pages

* Remove unwanted file

* Refactor

* Add PPAPI to known words

* Disable actions hub by default

* Web Extension: Remove dependency on website preview URL (#1091)

* Web Extension: Remove dependency on website preview URL

* Translations

* Web Extension: Fix file opening for media files (#1094)

Using `vscode.open` API to open the default file instead of `window.showTextDocument` because `showTextDocument` doesn't open binary files to it was failing to open non-text files.

* Bump CLI version from 1.37.4 to 1.39.3 (#1095)

* Fix environment icon for dark mode (#1097)

* Fix environment icon for dark mode

* Refactor

* Fix test

* fix screen reader issue in copilot chat (#1100)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* add focus ring (#1099)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* add release notes (#1101)

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>

* Site Preview: Initialize after ECS fetch (#1102)

* Site Preview: Initialize after ECS fetch

* Set context after loading website URL

* Add source attribute handling and telemetry for invalid attributes in web extension (#1105)

* Add source attribute handling and telemetry for invalid attributes in web extension

* Refactor source attribute handling in processDataAndCreateFile function

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Enhance Actions Hub with environment support and unit tests (#1098)

* Enhance Actions Hub: Add support for environment retrieval and localization updates

* Add unit tests for ActionsHubTreeDataProvider functionality

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Fix A11y bug (#1108)

* Actions Hub: Add toggle based on ECS (#1107)

* Add feature flag for Actions Hub

* Refactor

* Fix errors

* Fix errors

* Add unit tests

* [PowerPages] [Site Preview] Simplify preview functionality (#1109)

* Refactor telemetry handling by removing ITelemetry parameter from functions (#1110)

* Refactor telemetry handling by removing ITelemetry parameter from sendTelemetryEvent and related functions

* Refactor: Remove telemetry parameter from getEndpoint and related functions

* Refactor: Remove telemetry parameter from authentication functions and related calls

* Refactor: Remove telemetry parameter from getArtemisResponse call in activate function

* Refactor: Remove telemetry parameter from various authentication and service calls

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Webpack: Ignore warnings (#1113)

* Run desktop integration tests in CI (#1114)

* Run desktop integration tests in CI

* Run desktop test only on Windows

* Enhance Actions Hub with environment retrieval and refresh functionality (#1111)

* Enhance Actions Hub: Add support for environment retrieval and localization updates

* Add unit tests for ActionsHubTreeDataProvider functionality

* Add AuthManager class and AuthInfo interface for authentication handling

* Enhance authentication handling: Add auth info extraction and update environment info retrieval in Actions Hub

* Add refresh command and event handling for Actions Hub environment changes

* Refactor ActionsHubTreeDataProvider: Manual refresh should trigger Pac

* Remove AuthManager class and related authentication logic

* Add error handling to refresh command in ActionsHubTreeDataProvider

* RemoveDependencyOnOldTelemetryCluster

* Refactor ActionsHubTreeDataProvider tests to include PacTerminal in initialization

* Remove telemetry dependency from intelligence API endpoint retrieval

* Refactor telemetry handling by removing ITelemetry parameter from sendTelemetryEvent and related functions

* Refactor: Remove telemetry parameter from getEndpoint and related functions

* Refactor: Remove telemetry parameter from authentication functions and related calls

* Refactor telemetry event assertion in AuthenticationProvider tests

* Refactor: Remove telemetry parameter from getArtemisResponse call in activate function

* Refactor: Remove telemetry parameter from various authentication and service calls

* Refactor: Rename AuthManager to PacAuthManager for consistency

* Refactor: Use pacWrapper for activeAuth retrieval in ActionsHubTreeDataProvider

* Add ACTIONS_HUB_REFRESH_FAILED constant and update error logging in ActionsHubTreeDataProvider

* Remove unused AuthInfo interface from Constants.ts

* Refactor ActionsHub initialization by removing authentication handling and simplifying the process

* Add localization for expired environment message and update refresh title

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Remove old telemetry usage (#1112)

* Remove old telemetry usage

* Remove more usage

* Remove more usage

* Remove more usage

* Remove more usage

* Fix tests

* Fix typo

* Comment tests

* Refactor Actions Hub and Preview Site initialization logic (#1115)

* [PowerPages][Actions Hub] Toggle to Change Environment (#1119)

* Add switch environment functionality to Actions Hub

* Update icon for switch environment command in Actions Hub

* Update translation for switch environment title to "Change Environment"

* Add tests for switch environment command registration and error handling

* Remove redundant error handling tests for switch environment and refresh commands

* Refactor command names to include namespace for actions in Actions Hub

* Update refresh command registration to include namespace in Actions Hub tests

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Bump serialize-javascript, gulp-mocha and mocha (#1120)

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) to 6.0.2 and updates ancestor dependencies [serialize-javascript](https://github.com/yahoo/serialize-javascript), [gulp-mocha](https://github.com/sindresorhus/gulp-mocha) and [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together.


Updates `serialize-javascript` from 5.0.1 to 6.0.2
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v5.0.1...v6.0.2)

Updates `gulp-mocha` from 8.0.0 to 10.0.1
- [Release notes](https://github.com/sindresorhus/gulp-mocha/releases)
- [Commits](sindresorhus/gulp-mocha@v8.0.0...v10.0.1)

Updates `mocha` from 9.2.2 to 11.1.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](mochajs/mocha@v9.2.2...v11.1.0)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-type: indirect
- dependency-name: gulp-mocha
  dependency-type: direct:development
- dependency-name: mocha
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Power Pages][Actions Hub] Add "Show Environment Details" to Actions Hub (#1118)

* [Power Pages][Actions Hub] Add "Show Environment Details" to Actions Hub

* [PowerPages][Actions Hub] Update icon for switch environment command

* [PowerPages][Actions Hub] Remove refresh command from Actions Hub navigation

* Fix order

* Update translation identifiers and fix newline in localization files

* Refactor Actions Hub commands and extract command handlers into a new file

* Add tests for switchEnvironment command

* [PowerPages][ActionsHub] - Show Active and Inactive Sites (#1117)

* show active and inactive sites in actions hub view

* add integration tests for actions hub

* [Power Pages][Actions Hub] Add NoSitesTreeItem to handle empty site groups

* [Power Pages][Actions Hub] Update website details property names to PascalCase and change collapsible state to expanded

* Refactor environment handling: rename method for clarity, improve error handling, and streamline environment selection process

* Update localization strings for environment selection and session details

* Refactor authentication and organization data structures; update TypeScript configuration and remove unused PacAuthManager

* Add ArtemisContext for managing service responses; update ActionsHub and related components to utilize new context

---------

Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [PowerPages][Actions Hub] Add Instance URL to Environment Details (#1122)

* Add 'isCurrent' property and description to site tree items (#1123)

* Update ArtemisService URLs to use production segment for GCC, high, mooncake, and DOD environments (#1121)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [PowerPages][Actions Hub] Add commands to open active and inactive site in PP Studio (#1124)

* [PowerPages][Actions Hub] Add commands to open active and inactive sites in Power Pages Studio

* Refactor studio URL handling to use constants for endpoints

* Add localization entries for "Current" and "Instance url" in JSON and XLF files

* Refactor studio URL generation to include environment ID and add openInactiveSitesInStudio function

* [Power Pages][Actions Hub] Add ability to preview active sites in VS Code (#1127)

* Add preview command and siteInfo property to SiteTreeItem

* Add unit tests for PreviewSite.isSiteRuntimePreviewEnabled method

* Refactor PreviewSite initialization and loadSiteUrl method; update tests for loadSiteUrl functionality

* Add tests for ActionsHubTreeDataProvider.getChildren method; mock website data for active and inactive sites

* Add mocks for active and all websites in ActionsHubTreeDataProvider tests

* Refactor site context values to distinguish between current and non-current active sites; update related tests

* Add websiteId property to IWebsiteInfo interface and update related tree item implementations

* Update walkthrough title to use h4 and enhance focus indicator for accessibility (#1125)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Add new command to create authentication profile and handle errors in actions hub (#1128)

* Add new command to create authentication profile and handle errors in actions hub

* Refactor tests for ActionsHubCommandHandlers and ActionsHubTreeDataProvider to improve argument validation and remove unnecessary assertions

* Stub AuthInfo and OrgInfo getters in ActionsHubTreeDataProvider tests to improve test reliability

* Remove redundant test for creating new auth profile in ActionsHubCommandHandlers

* Fix async initialization in ActionsHub and streamline environment info handling in ActionsHubTreeDataProvider

* Implement createAuthProfileExp function and add tests for authentication profile creation

* Refactor createAuthProfileExp function import path and add new utility file for authentication profile creation

* Add tests for ActionsHubTreeDataProvider to validate site retrieval and error handling

* Remove redundant tests from ActionsHubTreeDataProvider for getChildren method

* Refactor import path for createAuthProfileExp to new utility file in PacAuthUtil

* Remove tests for PacAuthUtils as part of code cleanup

* Add comment to clarify DV authentication requirement in createNewAuthProfile

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Show current site (#1129)

* Refactor site context handling and update site data types for improved clarity

* Refactor website data handling to use IWebsiteDetails and streamline site fetching logic

* Refactor import statements in ActiveGroupTreeItem, EnvironmentGroupTreeItem, and InactiveGroupTreeItem for improved organization and clarity

* Refactor import statements in InactiveGroupTreeItem for improved organization

* Add tests for PacContext and improve context update logic

* Add tests for previewSite functionality in ActionsHubCommandHandlers

* Add fetchWebsites function and related tests for website retrieval logic

* Add tests for ActiveGroupTreeItem and update siteInfo assertions

* Add tests for ActionsHubTreeDataProvider to verify website loading logic

* Add websiteid to VSCode settings for improved configuration

* Refactor ActionsHubTreeDataProvider to simplify loadWebsites method and improve refresh logic

* Refactor CurrentSiteContext to utilize utility functions for website YAML handling and improve code clarity

* Refactor ActionsHubTreeDataProvider to streamline website loading logic and improve refresh handling

* [Power Pages][Actions Hub] Update "Change environment" option to match Figma (#1130)

* [Power Pages][Actions Hub] Update "Change environment" option to match Figma

* Add test for environment switching in Actions Hub command handlers

* Refactor environment switching to use detailed description and enhance test coverage for environment selection

* Refactor tests for ActionsHubTreeDataProvider by removing redundant cases and ensuring proper stubbing of fetchWebsites

* Disable website loading in ActionsHubTreeDataProvider tests to ensure empty result for specific scenarios

* [Power Pages][Actions Hub] Add revealInOS command for current active site and update translations (#1131)

* Refactor website details to use camelCase properties and add siteVisibility field (#1133)

* [Power Pages][Actions Hub] Update command references for authentication profile (#1132)

* [Power Pages][Actions Hub] Update command references for authentication profile

* Update command reference for new authentication profile in ActionsHubTreeDataProvider test

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuag@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [Power Pages][Actions Hub] Add open site management functionality (#1136)

* [Power Pages][Actions Hub] Add open site management functionality

* Update translation for "Open Site Management" to use lowercase in localization files

* [PowerPages][ActionsHub] Upload site command with visibility confirmation (#1134)

* Refactor website details to use camelCase properties and add siteVisibility field

* [Power Pages][Actions Hub] Add upload site command with confirmation dialog

* [Power Pages][Actions Hub] Implement upload site command with confirmation dialog and tests

* [Power Pages][Actions Hub] Add site visibility check before upload confirmation dialog

* [Power Pages][Actions Hub] Enhance upload site command to handle public and private site visibility

* Update login message links and adjust Actions Hub feature gate settings

* [Power Pages][Actions Hub] Update upload site tests to use warning message and reset stubs

* Refactor upload site tests to use showInformationMessage and remove unnecessary stubs

* Refactor uploadSite tests to use showInformationMessage and handle site visibility for public and private sites

* Refactor uploadSite test to remove unused showInformationMessage stub

* ```
Refactor uploadSite tests to improve clarity and maintainability
```

* Stub showInformationMessage in ActionsHubCommandHandlers tests for improved test isolation

* Refactor ActionsHubCommandHandlers tests to improve test isolation by removing unused stubs and enhancing setup

* Refactor test setup in ActionsHubCommandHandlers for improved isolation

---------

Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>
Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Update login command reference and add upload site title in localization file (#1138)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] Add title for Copilot feedback Submit button (#1139)

* [PowerPages] [Actions Hub] Add support for other sites in Actions Hub (#1140)

* Add support for other sites in Actions Hub and update related interfaces

* Update tests for OtherSitesGroupTreeItem and ActionsHubTreeDataProvider to include handling of other sites

* Refactor findOtherSites function to accept fs and yaml modules as parameters for improved testability

* Add mockFs and mockYaml to ActionsHubCommandHandlers tests for improved isolation

* Remove test for YAML parsing errors in ActionsHubCommandHandlers to streamline error handling

* Disable Actions Hub Panel by default in fallback configuration

* Clarify comment on dataModelVersion in OtherSitesGroupTreeItem to specify defaulting behavior for other sites

* Add js-yaml dependency and update YAML parsing in WorkspaceInfoFinderUtil

* Remove yaml dependency from package.json and package-lock.json

* Replace js-yaml with yaml package and update YAML parsing methods

* Refactor findOtherSites and createKnownSiteIdsSet to use Set for known site IDs

* Refactor findOtherSites and createKnownSiteIdsMap to use Set for known site IDs

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Add site details command (#1141)

* [Power Pages][Actions Hub] Add site details command

* Add openSiteManagement function with error handling and tests

* Fix menu item order

* [Power Pages] [Actions Hub] Add download site command to Actions Hub (#1143)

* [Power Pages][Actions Hub] Add download site command

* Add tests

* [PowerPages][ActionsHub] Upload functionality for other sites (#1144)

* [Power Pages] Enhance upload functionality to support other sites in Actions Hub

* [Power Pages] Enhance uploadSite functionality with confirmation handling and error management

* [Power Pages][Actions Hub] Refactor test setup by removing unused stubs in ActionsHubCommandHandlers tests

* [Power Pages][Actions Hub] Remove unused error handling test for uploadSite and update data model version for other sites

* [Power Pages][Actions Hub] Remove unused test for upload handling of other sites in ActionsHubCommandHandlers

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] [Actions Hub] Add 'Open in Power Pages Studio' command (#1145)

* [Power Pages][Preview Site] Show notification when previewing site with pending changes (#1146)

* [Power Pages][Preview Site] Show notification when previewing site with pending changes

* [Power Pages][Localization] Update localization strings for site preview notifications

* [Power Pages][Preview Site] Enhance site preview functionality with site visibility and upload path adjustments

* [Power Pages][PacInterop] Update PAC executable path to use dynamic CLI path

* Refactor uploadSite function calls to include an empty string parameter for consistency

* Refactor uploadSite to use logical OR for websitePath fallback

* [Power Pages] [Actions Hub] Enhance revealInOS command to support other sites (#1147)

* [Power Pages] [Actions Hub] Initialize OrgChangeNotifier instance in activate function for all workspaces (#1148)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages] [Actions Hub] Handle null or undefined labels in ActionsHubTreeItem (#1149)

* [Power Pages] [Actions Hub] Handle null or undefined labels in ActionsHubTreeItem

* [Power Pages] [Actions Hub] Refactor isCurrent logic and enhance tests for ActiveGroupTreeItem

* Fix typos and improve file path handling in tests (#1151)

- ✏️ Corrected spelling of "Pattern" in test names
- 🔧 Updated file path handling to use vscode.Uri.file
- 📂 Simplified file path construction for better readability

-Priyanshu

* Remove outline from feedback button styles (#1150)

- ✨ Removed the outline property from button styles for improved accessibility.

-Priyanshu

* [Power Pages] [Copilot] Add localization for Copilot response and code block messages; enhance accessibility with live regions for screen readers (#1152)

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* Fix typos in OneDSLogger and oneDSLoggerWrapper (#1153)

- ✏️ Corrected spelling of 'initialize' in OneDSLogger and oneDSLoggerWrapper classes
- 🔧 Updated variable name from 'oneDSLoggerIntance' to 'oneDSLoggerInstance' for consistency

-Priyanshu

* Enhance website management features (#1155)

- ✨ Added new properties `createdOn` and `creator` to website details.
- 🔄 Refactored site visibility handling to use an enum.
- 🛠️ Updated various components to utilize new properties.
- ✅ Enhanced tests to cover new functionality.

-Priyanshu

* [Powerpages][ActionsHub]Sort active websites by creation date in fetchWebsites function (#1156)

* Sort active websites by creation date in fetchWebsites function

* Refactor website sorting logic to use a dedicated function for sorting by creation date

---------

Co-authored-by: amitjoshi <amitjoshi@microsoft.com>

* [Power Pages][Actions Hub] Add unit tests (#1157)

* Add unit tests for getActiveWebsites function

- 🧪 Implement tests for calling PPAPIService.getAllWebsiteDetails with correct parameters.
- ✅ Validate return values from PPAPIService for active websites.
- 🛠️ Handle empty array responses from PPAPIService.
- 🚨 Ensure errors from PPAPIService are propagated correctly.

-Priyanshu

* Update getAppModules to accept accessToken parameter

- 🔧 Modified getAppModules function to accept accessToken as a parameter.
- 🔄 Updated getAllWebsites to pass accessToken when calling getAppModules.
- 📜 Adjusted related API calls to ensure proper token usage.

-Priyanshu

* Add coding and test guidelines to documentation (#1158)

This commit introduces a comprehensive set of coding and test instructions to ensure consistency and quality in the codebase.
- 📜 Added coding guidelines including naming conventions and style rules.
- 🧪 Included test instructions for writing and running tests effectively.

-Priyanshu

* Bump CLI version to 1.40.4 (#1159)

Bump CLI version to latest

* [Power Pages][Actions Hub] Enhance telemetry logging and error handling (#1161)

* Enhance telemetry logging and error handling

- ✨ Added `getBaseEventInfo` function for enriched telemetry data.
- 🔧 Updated logging in `ActionsHub`, `ActionsHubCommandHandlers`, and `ActionsHubTreeDataProvider` to include event info.
- 🐛 Improved error handling in `fetchWebsites` and `loadWebsites` methods.
- ✅ Added unit tests for `getBaseEventInfo` and updated existing tests for logging changes.

-Priyanshu

* Enhance telemetry and error handling

- ✨ Added OS detection in telemetry events.
- 🔧 Improved logging for environment switching and site management actions.
- 🐛 Fixed error handling in various command handlers.
- 📜 Updated constants for new telemetry events.
- 🧪 Added tests for telemetry helper functions.

-Priyanshu

* Refactor telemetry test for clarity

- 🧹 Remove unused OS import from TelemetryHelper.test.ts
- 🔄 Rename 'siteId' to 'currentSiteId' for consistency in event info
- ✅ Update test assertions to reflect the new naming
- 🧪 Ensure tests maintain expected behavior after changes

-Priyanshu

* Add tenantId to event info and update tests

- ✨ Added tenantId to the event info in getBaseEventInfo.
- 🔧 Updated tests to include tenantId in various scenarios.
- 🧪 Enhanced test stubs for AuthInfo to ensure accurate testing.
- 📜 Improved test coverage for cases with undefined values.
- 🛠️ Fixed formatting issues in TelemetryHelper.ts.
-Priyanshu

* Enhance telemetry and localization support

- ✨ Added new localization strings for environment changes, site visibility, creator, and created date.
- 🔧 Refactored telemetry helper to remove OS dependency and improve event info structure.
- 🧪 Updated tests to reflect changes in telemetry event info and removed OS checks.

-Priyanshu

* Close existing Edge DevTools before launching preview (#1163)

- 🔧 Added a method to close existing Edge DevTools tabs before launching a new preview.
- 🚀 Updated the site preview command to ensure no duplicate DevTools instances are open.

-Priyanshu

* Add preview message for published changes (#1164)

- ✨ Added a new message for the preview indicating that it shows published changes.
- 🔧 Updated localization files to include the new message.
- 📜 Modified the Constants and PreviewSite files to utilize the new message.

-Priyanshu

* [Power Pages][Actions Hub] Refactor telemetry logging  (#1167)

* Refactor telemetry logging in Actions Hub

- 🔄 Replaced oneDSLoggerWrapper with direct calls to traceInfo and traceError in ActionsHubCommandHandlers.
- 🧪 Updated TelemetryHelper to utilize oneDSLoggerWrapper for logging.
- ✅ Enhanced unit tests for TelemetryHelper to verify logging behavior.
- 🔧 Adjusted context population in OneDSLogger for tenantId.

-Priyanshu

* Remove console log from telemetry event

- 🧹 Removed unnecessary console log statement for telemetry events to clean up output.
- 🔒 Ensured sensitive data redaction remains intact after event enrichment.

-Priyanshu

* Update CHANGELOG.md (#1168)

* Update CHANGELOG.md

* Update CHANGELOG for version 2.0.82

* Enhance spell check words and clean activation events (#1169)

- ✏️ Added additional words to the cSpell configuration.
- 🗑️ Removed unused activation events from package.json.

-Priyanshu

* Add download site folder configuration and description (#1170)

- ✨ Introduced a new configuration for the download site folder.
- 📝 Added a description for the download site folder setting in localization files.
- 🔧 Updated the logic to check for a configured download path in the ActionsHub command handlers.

-Priyanshu

* [Power Pages] Refactor PortalWebView to use new utility function (#1172)

* Refactor PortalWebView to use new utility function

- 🔄 Replace `searchPortalConfigFolder` with `findWebsiteYmlFolder` for improved folder detection.
- 🔧 Update logic to handle active text editor and reveal the panel correctly.
- 📂 Simplify local resource root folder setup.

-Priyanshu

* Add error message for missing website root folder

- ✏️ Added a new error message for when the website root folder cannot be located in the localization files.
- 📜 Updated the XLF translation file to include the new message.

-Priyanshu

* Bump PAC version to 1.41.1 (#1173)

Bump PAC version to 1.41.1

* Update CHANGELOG.md (#1174)

* Bump koa from 2.14.2 to 2.16.1 (#1177)

Bumps [koa](https://github.com/koajs/koa) from 2.14.2 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](koajs/koa@2.14.2...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Enhance package.json by adding new categories and keywords for improved discoverability and updating Copilot description for Power Pages (#1175)

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Bump axios, @fluidframework/azure-client and fluid-framework (#1178)

Bumps [axios](https://github.com/axios/axios) to 1.8.4 and updates ancestor dependencies [axios](https://github.com/axios/axios), [@fluidframework/azure-client](https://github.com/microsoft/FluidFramework/tree/HEAD/packages/service-clients/azure-client) and [fluid-framework](https://github.com/microsoft/FluidFramework/tree/HEAD/packages/framework/fluid-framework). These dependencies need to be updated together.


Updates `axios` from 0.28.0 to 1.8.4
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.28.0...v1.8.4)

Updates `@fluidframework/azure-client` from 1.2.0 to 2.31.1
- [Release notes](https://github.com/microsoft/FluidFramework/releases)
- [Changelog](https://github.com/microsoft/FluidFramework/blob/main/packages/service-clients/azure-client/CHANGELOG.md)
- [Commits](https://github.com/microsoft/FluidFramework/commits/client_v2.31.1/packages/service-clients/azure-client)

Updates `fluid-framework` from 1.4.0 to 2.31.1
- [Release notes](https://github.com/microsoft/FluidFramework/releases)
- [Changelog](https://github.com/microsoft/FluidFramework/blob/main/packages/framework/fluid-framework/CHANGELOG.md)
- [Commits](https://github.com/microsoft/FluidFramework/commits/client_v2.31.1/packages/framework/fluid-framework)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.8.4
  dependency-type: indirect
- dependency-name: "@fluidframework/azure-client"
  dependency-version: 2.31.1
  dependency-type: direct:production
- dependency-name: fluid-framework
  dependency-version: 2.31.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add environment initialization context (#1176)

- ✨ Added 'microsoft.powerplatform.environment.initialized' context for command execution in activate function.
- 🔧 Updated command execution on organization change error to ensure actions hub initialization.

-Priyanshu

* Enhance context management for auth and actions hub (#1179)

- ✨ Set context for auth panel initialization.
- 🔄 Update loading state context for actions hub websites.
- 🛠️ Improve conditional enablement for UI elements.

-Priyanshu

* [PowerPages][Web] PPHome Launch Error Page fix for V1 (#1180)

* Add REFERRER enum and update PortalsFS to handle referrer logic

* Update PortalsFS to handle referrer logic based on portal version

* Fix comment to clarify behavior when referrer is power pages home and DM is V1

* Add spacing for REFERRER enum declaration for consistency

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* show outline for focused link. (#1181)

* [PowerPages][ActionsHub][Enable Actions Hub Panel in VS Code Desktop (#1182)

* Enable Actions Hub Panel in VS Code Desktop

* Fix ActionsHub enabling logic to return true when undefined

* Fix test assertion for ActionsHub enabling logic to return true when undefined

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Added sessionId support to Power Pages actions (#1186)

* Implement authentication enhancements and update createNewAuthProfile to accept orgUrl (#1187)

* Implement authentication enhancements and update createNewAuthProfile to accept orgUrl

* Add comment to clarify error handling for user consent in bapServiceAuthentication

* Fix auth

* Update comment

* load websites

* Use basic auth when creating new auth profile

* Rename method

* Fix unit tests

* Update unit tests

* Add global auth for web extension

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Refactor panel registration in PAC Activity Bar and Terminal for improved ECS initialization handling (#1188)

* Refactor panel registration in PAC Activity Bar and Terminal for improved ECS initialization handling

* Remove RegisterPanels function from PacActivityBarUI

- 🗑️ Deleted the RegisterPanels function that combined basic and copilot panels.
- 🔧 Simplified panel registration by directly using individual registration functions.

-Priyanshu

* Refactor copilot panel registration logic for improved clarity and reuse

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* Bump CLI version from 1.41.1 to 1.42.1 (#1190)

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* [PowerPages][GitHub Copilot] Refactor endpoint initialization logic to use cached data and improve efficiency (#1191)

* Refactor endpoint initialization logic to use cached data and improve efficiency

* Refactor getEndpoint function to remove cachedEndpoint parameter and streamline endpoint retrieval

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* [Power Pages] [Copilot] Implement Copilot Governance Check feature and telemetry updates (#1171)

* Implement Copilot Governance Check feature and related telemetry events

* Refactor Copilot governance check feature and update related settings

* Add TODO comment to review governance endpoints in PPAPIService

* Refactor governance flag retrieval to use workspace folder path directly and update response handling

* Refactor CurrentSiteContext to utilize getCurrentSiteInfo utility and update PPAPIService to fetch website ID accordingly

* Add websiteId parameter to PowerPagesCopilot and update related services for improved governance checks for web copilot

* Update governance endpoint construction in PPAPIService to use website details and modify response handling in sendApiRequest

* Update governance endpoint construction in PPAPIService to use website details and modify response handling in sendApiRequest

* Remove hardcoded test AIB endpoint from sendApiRequest function

* Fix sendApiRequest to use the correct aibEndpoint variable for API requests

* Add governance settings to telemetry and API service for Pro Dev Copilot

* Fix casing of CopilotGovernanceSetting to copilotGovernanceSetting in feature flags

* Add governance settings to telemetry data and update sendTelemetryEvent calls

* Refactor governance flag check to handle multiple string representations

* Fix formatting and governance checks in services

- ✨ Adjusted formatting in OneDSLogger for clarity.
- 🔧 Added a missing line break in PPAPIService.
- 🔄 Updated governance check conditions in PPAPIService.

-Priyanshu

* Passing website for desktop during copilot panel initialization.

* Refactor governance settings to use constant for Copilot governance configuration

* Update COPILOT_GOVERNANCE_SETTING_NAME to allow makers for existing sites

* Refactor endpoint initialization logic to use cached data and improve efficiency

* Update PowerPagesChatParticipant instantiation to include websiteId

* Refactor getEndpoint function to remove cachedEndpoint parameter and streamline endpoint retrieval

* Refactor ICurrentSiteContext interface and remove redundant definition from constants

* Add unit tests for PPAPIService to validate API interactions and governance flag logic

* update telemetry event value

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>

* [Power Pages][Actions Hub] Configure upload and download site command for code sites (#1192)

* Update the logic to find other sites using new .powerpages-site metadata folder.

- ✨ Introduced a new constant for the Power Pages site folder.
- 🔧 Updated logic in findOtherSites to check for the existence of the new folder.
- 🛠️ Enhanced condition to ensure siteTreeItem is defined before accessing its properties.

-Priyanshu

* Refactor createKnownSiteIdsSet function declaration

- 🔧 Changed the export declaration of createKnownSiteIdsSet to a regular function declaration.
- 📦 No functional changes were made to the logic.
- -Priyanshu

* Enhance Power Pages site management features

- ✨ Added `isCodeSite` property to various site-related models.
- 🔧 Updated logic to handle code sites in site download commands.
- 📈 Introduced new API paths for managing Power Pages site settings.
- 🛠️ Refactored site fetching logic to incorporate new settings.

-Priyanshu

* Add upload code site functionality and related updates

- ✨ Implemented `uploadCodeSite` function for uploading code sites.
- 🔧 Updated `uploadOtherSite` and `uploadCurrentSite` to handle code sites.
- 📦 Added constants for error messages related to code site uploads.
- 🔍 Enhanced `getCurrentSiteInfo` to find Power Pages site folder.
- 🛠️ Introduced `findPowerPagesSiteFolder` utility function.

-Priyanshu

* Update CHANGELOG for pac CLI 1.42.1 release and authentication flow improvements (#1193)

* Update CHANGELOG for pac CLI 1.42.1 release and authentication flow improvements

* Add Download/Upload support for code sites in Actions hub to CHANGELOG

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Bump PAC version to 1.43.6 (#1196)

Bump PAC version to 1.43.6

* [PowerPages] Enhance reauthentication flow for copilots (#1195)

* [Power Pages] Enhance authentication flow with login button and improved error messaging

* [Power Pages] Integrate user authentication in VSCode and enhance API request handling

* Update authentication messages for clarity in localization files

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Fix: Update preprod studio endpoint to use test endpoint (#1197)

* Fix: Update preprod studio endpoint to use test endpoint

* Fix: Update URLs in ActionsHubCommandHandlers tests to use test environment

---------

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

* Update CHANGELOG for pac CLI 1.43.6 release and authentication flow fix (#1198)

Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: amitjoshi <amitjoshi@microsoft.com>
Co-authored-by: Ashwani Kumar <ashwanikumar1303@gmail.com>
Co-authored-by: Ashwani Kumar <ashwanikumar@microsoft.com>
Co-authored-by: tyaginidhi <tyaginidhi@users.noreply.github.com>
Co-authored-by: Priyanshu Agrawal <priyanshuagrawal@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sandeep Satheesh <sansth4x496@gmail.com>
Co-authored-by: Sandeep Satheesh <ssatheesh@microsoft.com>
Co-authored-by: Priyanshu Agrawal <priyanshuag@microsoft.com>
Co-authored-by: BidishaMS <97606074+BidishaMS@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants