Skip to content
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

Replace EUGeo with EUDB #2456

Merged
merged 19 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ page 7775 "Copilot AI Capabilities"
var
EnvironmentInformation: Codeunit "Environment Information";
WithinGeo: Boolean;
WithinEuropeGeo: Boolean;
WithinEUDB: Boolean;
begin
OnRegisterCopilotCapability();

CopilotCapabilityImpl.CheckGeo(WithinGeo, WithinEuropeGeo);
CopilotCapabilityImpl.CheckGeoAndEUDB(WithinGeo, WithinEUDB);

case PrivacyNotice.GetPrivacyNoticeApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), false) of
Enum::"Privacy Notice Approval State"::Agreed:
Expand All @@ -274,17 +274,16 @@ page 7775 "Copilot AI Capabilities"
if not EnvironmentInformation.IsSaaSInfrastructure() then
CopilotCapabilityImpl.ShowCapabilitiesNotAvailableOnPremNotification();

if (WithinGeo and not WithinEuropeGeo) and (not AllowDataMovement) then
if (WithinGeo and not WithinEUDB) and (not AllowDataMovement) then
CopilotCapabilityImpl.ShowPrivacyNoticeDisagreedNotification();

CopilotCapabilityImpl.UpdateGuidedExperience(AllowDataMovement);

HasEarlyPreview := HasEarlyPreviewCapabilities();

//Todo: replace WithinEuropeGeo with WithinEUBD
WithinEUDBArea := WithinEuropeGeo;
WithinAOAIServicesInRegionArea := WithinGeo and (not WithinEuropeGeo);
WithinAOAIOutOfRegionArea := (not WithinGeo) and (not WithinEuropeGeo);
WithinEUDBArea := WithinEUDB;
WithinAOAIServicesInRegionArea := WithinGeo and (not WithinEUDB);
WithinAOAIOutOfRegionArea := (not WithinGeo) and (not WithinEUDB);
end;

local procedure HasEarlyPreviewCapabilities(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@
WithinEuropeGeo := ALCopilotFunctions.IsEuropeGeo();
end;

[TryFunction]
procedure CheckGeoAndEUDB(var WithinGeo: Boolean; var WithinEUDB: Boolean)
gggdttt marked this conversation as resolved.
Show resolved Hide resolved
var
ALCopilotFunctions: DotNet ALCopilotFunctions;
begin
WithinGeo := ALCopilotFunctions.IsWithinGeo();
WithinEUDB := ALCopilotFunctions.IsWithinEUDB();

Check failure on line 261 in src/System Application/App/AI/src/Copilot/CopilotCapabilityImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Clean) / System Application and Tools (Clean)

AL0132 'DotNet "Microsoft.Dynamics.Nav.Service.CopilotApi.AL.ALCopilotFunctions"' does not contain a definition for 'IsWithinEUDB'

Check failure on line 261 in src/System Application/App/AI/src/Copilot/CopilotCapabilityImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Default) / System Application and Tools (Default)

AL0132 'DotNet "Microsoft.Dynamics.Nav.Service.CopilotApi.AL.ALCopilotFunctions"' does not contain a definition for 'IsWithinEUDB'

Check failure on line 261 in src/System Application/App/AI/src/Copilot/CopilotCapabilityImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Translated) / System Application and Tools (Translated)

AL0132 'DotNet "Microsoft.Dynamics.Nav.Service.CopilotApi.AL.ALCopilotFunctions"' does not contain a definition for 'IsWithinEUDB'
end;

procedure UpdateGuidedExperience(AllowDataMovement: Boolean)
var
GuidedExperience: Codeunit "Guided Experience";
Expand Down
Loading