Skip to content

Commit

Permalink
refactor: added defaultPortalLanguageCode before crossGeoDataMovement…
Browse files Browse the repository at this point in the history
…EnabledPPACFlag as being a required parameter.
  • Loading branch information
ritikramuka committed May 21, 2024
1 parent abff20e commit 9717e15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/copilot/IntelligenceApiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/common/copilot/PowerPagesCopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 9717e15

Please sign in to comment.