@using AIStudio.Settings @using AIStudio.Settings.DataModel @using AIStudio.Tools.Mail @using AIStudio.Tools.Validation @using AIStudio.Provider @inherits MSGComponentBase @if (this.IsAddingNotAllowed) { @T("Your organization no longer allows adding mailboxes, so this one cannot be added.") } @if (this.IsOnServerNotAllowed) { @MailboxConnectionFailure.SERVER_NOT_ALLOWED.GetDescription() } @if (this.authFailure is not null) { @this.AuthFailureText @if (!string.IsNullOrWhiteSpace(this.authFailure.FailureMessage)) { @string.Format(T("The server answered: {0}"), this.authFailure.FailureMessage) } } @* ReSharper disable once CSharpWarnings::CS8974 *@ @if (this.CanChangeSource) { @if (this.AllowsOnlyOrganizationMailServers) { @T("Your organization allows mailboxes only on its own mail servers. Choose one of them here, and AI Studio fills in the server settings for you.") } else if (this.HasOrganizationProviders) { @T("Choose your mail provider here, and AI Studio fills in the server settings for you. The mail servers of your organization come first, marked with a building. Alternatively, you can enter the technical details yourself.") } else { @T("Choose your mail provider here, and AI Studio fills in the server settings for you. Alternatively, e.g., for a mail server of your organization, you can enter the technical details yourself.") } @if (this.AllowsOnlyOrganizationMailServers && !this.HasOrganizationProviders) { @T("Your organization has not set up any of its mail servers here yet. Please ask your IT department.") } @* No adornment: the field shows the chosen entry together with its icon, see the entries below. They use the size and spacing of ProviderLabel, so a logo and a Material icon line up. *@ @if (!this.AllowsOnlyOrganizationMailServers) { @T("Another provider") } @foreach (var organizationProvider in this.organizationProviders) { @organizationProvider.Name } @if (!this.AllowsOnlyOrganizationMailServers) { foreach (var template in MailboxProviderTemplates.ALL) { @if (string.IsNullOrEmpty(template.IconUrl)) { } else { } @template.Name } } } @if (this.selectedOrganizationProvider is { } chosenOrganizationProvider) { @T("Your organization offers this mail server. Sign in with your own username and password.") @if (!string.IsNullOrEmpty(chosenOrganizationProvider.UsernameHint)) { @string.Format(T("Username: {0}"), chosenOrganizationProvider.UsernameHint) } @if (!string.IsNullOrEmpty(chosenOrganizationProvider.HelpUrl)) { @string.Format(T("Instructions of {0}"), chosenOrganizationProvider.Name) } } else if (this.selectedTemplate is not null) { @foreach (var requirement in this.selectedTemplate.Requirements.GetDescriptions()) { @requirement } @string.Format(T("Username: {0}"), this.selectedTemplate.UsernameFormat.GetDescription()) @string.Format(T("Instructions of {0}"), this.selectedTemplate.Name) } @* Settings AI Studio fills in wait behind a button, so the sign-in follows the choice of the provider directly: *@ @if (this.AreServerSettingsFilledIn) { @(this.showServerDetails ? T("Hide Server Details") : T("Show Server Details")) } else { @T("Server") }
@* ReSharper disable once CSharpWarnings::CS8974 *@ @* ReSharper disable once CSharpWarnings::CS8974 *@ @foreach (var transportSecurity in ConfigurationSelectDataFactory.GetMailboxTransportSecurityData()) { @transportSecurity.Name }
@T("Sign-in")
@* ReSharper disable once CSharpWarnings::CS8974 *@ @T("Test connection & load folders") @if (this.isTestingConnection) { } @this.TestResultText
@T("Folder") @T("Select the folder AI Studio indexes, together with its subfolders. The AI only reads from this folder. Without a folder, AI Studio indexes the whole mailbox, apart from the trash and the junk folder.") @if (!this.CanChangeSource) { @T("The mails of this mailbox are already prepared, so its server, its username, and its folder cannot be changed. Another account or folder holds other mails, which makes it another mailbox: please add one for it. The embedding provider below can be changed.") } @if (this.CanChangeSource && this.ConnectionTestSucceeded) { } else { } @if (!string.IsNullOrWhiteSpace(this.folderIssue)) { @this.folderIssue } @foreach (var maxAge in ConfigurationSelectDataFactory.GetMailboxMaxAgeData()) { @maxAge.Name } @T("AI Studio indexes the newest mails first. Flagged mails are always indexed, however old they are.") @if (this.dataIndexAttachments) { @* ReSharper disable once CSharpWarnings::CS8974 *@ } @T("In order for the AI to be able to determine the appropriate data at any time, you must choose an embedding provider.") @foreach (var embedding in this.AvailableEmbeddings) { @if (this.GetEmbeddingProvider(embedding.Value) is { } provider) { } else { @embedding.Name } } @if (!string.IsNullOrWhiteSpace(this.dataEmbeddingId)) { if (this.SelectedCloudEmbedding) { } else { @T("The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.") } } @foreach (var level in ConfigurationSelectDataFactory.GetMailboxConfidenceLevelsData()) { @level.Name } @T("Only providers with at least this confidence level see the content of your mails: the chat provider, the embedding provider, and every provider which checks a mail for you.") @foreach (var restriction in ConfigurationSelectDataFactory.GetOutboundDataRestrictionData(this.MinimumOutboundDataRestriction)) { @restriction.Name } @this.dataOutboundDataRestriction.GetDescription() @if (this.IsOutboundDataRestrictionLimited) { @T("Your organization does not allow less strict settings than the ones offered here.") } @T("Mails come from strangers and may contain instructions meant for the AI. This setting decides where a chat may still send data once it has read from this mailbox. Mind that opening a link can be enough to set something off, e.g., to confirm a subscription, an order, or a payment.") @(this.showExpertSettings ? T("Hide Expert Settings") : T("Show Expert Settings")) @T("Optional expert settings for how this data source is split before embedding.")
@T("Cancel") @if(this.IsEditing) { @T("Update") } else { @T("Add") }