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

[Copilot] Update text for Copilot & AI Capabilities page #554

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all 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 @@ -52,8 +52,8 @@ page 7775 "Copilot AI Capabilities"
group(NotAlwaysConnected)
{
ShowCaption = false;
InstructionalText = 'Generative AI capabilities are deactivated because Azure OpenAI Service is not available in your region. By allowing data movement, you agree to data being stored and processed by the Azure OpenAI Service outside of your environment''s geographic region or compliance boundary.';
Visible = (not WithinGeo) or WithinEuropeGeo;
InstructionalText = 'By allowing data movement, you agree to data being stored and processed by the Azure OpenAI Service outside of your environment''s geographic region or compliance boundary.';
Visible = ((not WithinGeo) or WithinEuropeGeo) and AllowDataMovement;

field(DataMovement; AllowDataMovement)
{
Expand All @@ -63,17 +63,8 @@ page 7775 "Copilot AI Capabilities"
Editable = AllowDataMovementEditable;

trigger OnValidate()
var
PrivacyNotice: Codeunit "Privacy Notice";
begin
if AllowDataMovement then
PrivacyNotice.SetApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), Enum::"Privacy Notice Approval State"::Agreed)
else
PrivacyNotice.SetApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), Enum::"Privacy Notice Approval State"::Disagreed);

CurrPage.GenerallyAvailableCapabilities.Page.SetDataMovement(AllowDataMovement);
CurrPage.PreviewCapabilities.Page.SetDataMovement(AllowDataMovement);
CopilotCapabilityImpl.UpdateGuidedExperience(AllowDataMovement);
UpdateAllowDataMovement();
end;
}

Expand All @@ -88,6 +79,36 @@ page 7775 "Copilot AI Capabilities"
}
}

group(NotAlwaysConnected2)
{
ShowCaption = false;
InstructionalText = 'Generative AI capabilities are deactivated because Azure OpenAI Service is not available in your region. By allowing data movement, you agree to data being stored and processed by the Azure OpenAI Service outside of your environment''s geographic region or compliance boundary.';
Visible = ((not WithinGeo) or WithinEuropeGeo) and (not AllowDataMovement);

field(DataMovement2; AllowDataMovement)
{
ApplicationArea = All;
Caption = 'Allow data movement';
ToolTip = 'Specifies whether data movement across regions is allowed. This is required to enable Copilot in your environment.';
Editable = AllowDataMovementEditable;

trigger OnValidate()
begin
UpdateAllowDataMovement();
end;
}

field(AOAIServiceLocated2; AOAIServiceLocatedLbl)
{
ShowCaption = false;

trigger OnDrillDown()
begin
Hyperlink('https://go.microsoft.com/fwlink/?linkid=2250267');
end;
}
}

part(PreviewCapabilities; "Copilot Capabilities Preview")
{
Caption = 'Production ready previews';
Expand Down Expand Up @@ -174,6 +195,18 @@ page 7775 "Copilot AI Capabilities"
CopilotCapabilityImpl.UpdateGuidedExperience(AllowDataMovement);
end;

local procedure UpdateAllowDataMovement()
begin
if AllowDataMovement then
PrivacyNotice.SetApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), Enum::"Privacy Notice Approval State"::Agreed)
else
PrivacyNotice.SetApprovalState(CopilotCapabilityImpl.GetAzureOpenAICategory(), Enum::"Privacy Notice Approval State"::Disagreed);

CurrPage.GenerallyAvailableCapabilities.Page.SetDataMovement(AllowDataMovement);
CurrPage.PreviewCapabilities.Page.SetDataMovement(AllowDataMovement);
CopilotCapabilityImpl.UpdateGuidedExperience(AllowDataMovement);
end;

[IntegrationEvent(false, false)]
local procedure OnRegisterCopilotCapability()
begin
Expand Down
Loading