Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
PowerPagesCopilot
class and related files to handle cases where certain organizations or tenants are disabled. The changes primarily involve checking if the current organization or tenant is included in a list of disabled entities and sending a telemetry event if so. A new utility filecopilotUtil.ts
has been added to fetch these disabled lists.Here are the most important changes:
Changes to
PowerPagesCopilot
class:src/common/copilot/PowerPagesCopilot.ts
: ImportedgetDisabledOrgList
andgetDisabledTenantList
fromcopilotUtil.ts
and added checks to see if the current organization or tenant is included in these lists. If so, a telemetry event is sent and a message is sent to the webview indicating that the service is unavailable. [1] [2] [3]Changes to telemetry constants:
src/common/copilot/telemetry/telemetryConstants.ts
: Added a new constantCopilotNotAvailableECSConfig
for the new telemetry event.Addition of new utility file:
src/common/copilot/utils/copilotUtil.ts
: Added this new file which exportsgetDisabledOrgList
andgetDisabledTenantList
functions. These functions fetch configuration fromECSFeaturesClient
and return lists of disabled organizations or tenants.Changes to
ECSFeaturesClient
class:src/common/ecs-features/ecsFeatureClient.ts
: ModifiedgetConfig
method to directly use the ECS configuration instead of caching it in a private variable. [1] [2]Addition of new feature config:
src/common/ecs-features/ecsFeatureGates.ts
: Added a new feature configCopilotDisableList
for disabling certain organizations or tenants.