From 9717e15c151ecf0c65f24af8bea79b7d25200c9c Mon Sep 17 00:00:00 2001 From: ramukaritik Date: Tue, 21 May 2024 16:18:18 +0530 Subject: [PATCH] refactor: added defaultPortalLanguageCode before crossGeoDataMovementEnabledPPACFlag as being a required parameter. --- src/common/copilot/IntelligenceApiService.ts | 2 +- src/common/copilot/PowerPagesCopilot.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/copilot/IntelligenceApiService.ts b/src/common/copilot/IntelligenceApiService.ts index 43e9d7b5..a7468794 100644 --- a/src/common/copilot/IntelligenceApiService.ts +++ b/src/common/copilot/IntelligenceApiService.ts @@ -16,7 +16,7 @@ import { enableCrossGeoDataFlowInGeo } from "./utils/copilotUtil"; const clientType = EXTENSION_NAME + '-' + getExtensionType(); const clientVersion = getExtensionVersion(); -export async function sendApiRequest(userPrompt: UserPrompt[], activeFileParams: IActiveFileParams, orgID: string, apiToken: string, sessionID: string, entityName: string, entityColumns: string[], telemetry: ITelemetry, aibEndpoint: string | null, geoName: string | null, crossGeoDataMovementEnabledPPACFlag = false, defaultPortalLanguageCode: string) { +export async function sendApiRequest(userPrompt: UserPrompt[], activeFileParams: IActiveFileParams, orgID: string, apiToken: string, sessionID: string, entityName: string, entityColumns: string[], telemetry: ITelemetry, aibEndpoint: string | null, geoName: string | null, defaultPortalLanguageCode: string, crossGeoDataMovementEnabledPPACFlag = false) { if (!aibEndpoint) { return NetworkError; diff --git a/src/common/copilot/PowerPagesCopilot.ts b/src/common/copilot/PowerPagesCopilot.ts index 017e642e..de822a2a 100644 --- a/src/common/copilot/PowerPagesCopilot.ts +++ b/src/common/copilot/PowerPagesCopilot.ts @@ -378,7 +378,7 @@ export class PowerPagesCopilot implements vscode.WebviewViewProvider { const defaultPortalLanguageCode = await getDefaultLanguageCode(activeOrgUrl, this.telemetry, sessionID, dataverseToken); - return sendApiRequest(data, activeFileParams, orgID, intelligenceApiToken, sessionID, metadataInfo.entityName, componentInfo, telemetry, this.aibEndpoint, this.geoName, this.crossGeoDataMovementEnabledPPACFlag, defaultPortalLanguageCode); + return sendApiRequest(data, activeFileParams, orgID, intelligenceApiToken, sessionID, metadataInfo.entityName, componentInfo, telemetry, this.aibEndpoint, this.geoName, defaultPortalLanguageCode, this.crossGeoDataMovementEnabledPPACFlag); }) .then(apiResponse => { this.sendMessageToWebview({ type: 'apiResponse', value: apiResponse });