mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 15:28:40 +00:00
Changed all icons of AI Studio to Lucide (#1187)
This commit is contained in:
1 parent
9a676101f7
commit
7ef26cd5c8
352 files changed
+6261
-1620
No files matched your search
@@ -10,16 +10,16 @@
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Class="mb-3 mr-3" StretchItems="StretchItems.Start">
|
||||
<MudText Typo="Typo.h3">@T("BeyondFacts Lab")</MudText>
|
||||
<MudSpacer/>
|
||||
<MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" OnClick="@this.OpenSettingsDialogAsync"/>
|
||||
<MudIconButton Variant="Variant.Text" Icon="@AppIcons.SETTINGS" OnClick="@this.OpenSettingsDialogAsync"/>
|
||||
</MudStack>
|
||||
|
||||
<InnerScrolling>
|
||||
@* How to work with the lab opens by itself while there is no preparation yet. *@
|
||||
<MudExpansionPanels MultiExpansion="@true" Class="mb-6 mr-3">
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.School" HeaderText="@T("Working with the lab")" IsExpanded="@this.introductionExpanded" ExpandedChanged="@this.IntroductionExpandedChanged">
|
||||
<ExpansionPanel HeaderIcon="@AppIcons.INTRODUCTION" HeaderText="@T("Working with the lab")" IsExpanded="@this.introductionExpanded" ExpandedChanged="@this.IntroductionExpandedChanged">
|
||||
<BflIntroduction/>
|
||||
</ExpansionPanel>
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.HelpOutline" HeaderText="@T("Is the lab right for my task?")">
|
||||
<ExpansionPanel HeaderIcon="@AppIcons.HELP" HeaderText="@T("Is the lab right for my task?")">
|
||||
<BflOnboarding/>
|
||||
</ExpansionPanel>
|
||||
</MudExpansionPanels>
|
||||
@@ -56,7 +56,7 @@
|
||||
</MudList>
|
||||
}
|
||||
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add" OnClick="@this.CreateProjectAsync" Disabled="@this.isBusy" Class="mt-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.ADD" OnClick="@this.CreateProjectAsync" Disabled="@this.isBusy" Class="mt-1">
|
||||
@T("New preparation")
|
||||
</MudButton>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<MudCopyClipboardButton TooltipMessage="@T("Copy preparation ID")" StringContent="@unavailableProject.ProjectId.ToString("D")"/>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap">
|
||||
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.DeleteForever" Color="Color.Error" OnClick="@this.DeleteProjectAsync" Disabled="@this.isBusy">@T("Delete")</MudButton>
|
||||
<MudButton Variant="Variant.Filled" StartIcon="@AppIcons.DELETE" Color="Color.Error" OnClick="@this.DeleteProjectAsync" Disabled="@this.isBusy">@T("Delete")</MudButton>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
@@ -102,8 +102,8 @@
|
||||
<MudSwitch T="bool" Value="@(project.HappenedAtUtc is not null)" ValueChanged="@this.SetHappenedAsync" Disabled="@this.isBusy" Color="Color.Primary" Class="mr-2">
|
||||
@T("The event has taken place")
|
||||
</MudSwitch>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.DriveFileRenameOutline" OnClick="@this.RenameProjectAsync" Disabled="@this.isBusy">@T("Rename")</MudButton>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.DeleteForever" Color="Color.Error" OnClick="@this.DeleteProjectAsync" Disabled="@this.isBusy">@T("Delete")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.RENAME" OnClick="@this.RenameProjectAsync" Disabled="@this.isBusy">@T("Rename")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.DELETE" Color="Color.Error" OnClick="@this.DeleteProjectAsync" Disabled="@this.isBusy">@T("Delete")</MudButton>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
|
||||
|
||||
+4
-4
@@ -207,7 +207,7 @@ public partial class BeyondFactsLabAssistant
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException or ArgumentException)
|
||||
{
|
||||
this.Logger.LogError(exception, "A change of the preparations of the BeyondFacts Lab failed.");
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.RecordVoiceOver, TA("AI Studio could not save the change of your preparations. Please try again.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.ASSISTANT_BEYOND_FACTS_LAB, TA("AI Studio could not save the change of your preparations. Please try again.")));
|
||||
await this.ReloadAfterFailureAsync();
|
||||
}
|
||||
finally
|
||||
@@ -237,9 +237,9 @@ public partial class BeyondFactsLabAssistant
|
||||
/// <param name="project">The preparation.</param>
|
||||
private static string ProjectIcon(BflProjectEntry project) => project switch
|
||||
{
|
||||
{ IsAvailable: false } => Icons.Material.Filled.WarningAmber,
|
||||
{ Project.HappenedAtUtc: not null } => Icons.Material.Filled.EventAvailable,
|
||||
_ => Icons.Material.Filled.Event,
|
||||
{ IsAvailable: false } => AppIcons.WARNING,
|
||||
{ Project.HappenedAtUtc: not null } => AppIcons.EVENT_TOOK_PLACE,
|
||||
_ => AppIcons.EVENT,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
+4
-4
@@ -72,19 +72,19 @@ public partial class BeyondFactsLabAssistant
|
||||
|
||||
if (BflEventVisibility.IsNotPublic(this.forms))
|
||||
{
|
||||
await this.MessageBus.SendInfo(new(Icons.Material.Filled.PublicOff, BflEventVisibility.NotPublicMessage));
|
||||
await this.MessageBus.SendInfo(new(AppIcons.NOT_PUBLIC, BflEventVisibility.NotPublicMessage));
|
||||
return;
|
||||
}
|
||||
|
||||
if (BflEventVisibility.IsSuggestionPending(this.workStates, this.forms))
|
||||
{
|
||||
await this.MessageBus.SendInfo(new(Icons.Material.Filled.TravelExplore, string.Format(TA("The lab has not started the research on the web yet. First, decide on the suggestion below the work state whether the event is public. Afterward, you can start the research in the step '{0}'."), BflStep.STRATEGY.Title)));
|
||||
await this.MessageBus.SendInfo(new(AppIcons.WEB_RESEARCH, string.Format(TA("The lab has not started the research on the web yet. First, decide on the suggestion below the work state whether the event is public. Afterward, you can start the research in the step '{0}'."), BflStep.STRATEGY.Title)));
|
||||
return;
|
||||
}
|
||||
|
||||
var started = await this.ResearchRunner.StartWhenDueAsync(project.ProjectId, this.providerSettings, this.forms);
|
||||
if (started.Count > 0)
|
||||
await this.MessageBus.SendInfo(new(Icons.Material.Filled.TravelExplore, string.Format(TA("The lab now researches the event on the web, with the public details about it only. You find the result in the step '{0}'."), BflStep.STRATEGY.Title)));
|
||||
await this.MessageBus.SendInfo(new(AppIcons.WEB_RESEARCH, string.Format(TA("The lab now researches the event on the web, with the public details about it only. You find the result in the step '{0}'."), BflStep.STRATEGY.Title)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -156,7 +156,7 @@ public partial class BeyondFactsLabAssistant
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
this.Logger.LogError(exception, "Could not save the details of a step in the BeyondFacts Lab.");
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.RecordVoiceOver, TA("AI Studio could not save your details. Please try again.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.ASSISTANT_BEYOND_FACTS_LAB, TA("AI Studio could not save your details. Please try again.")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ else if (this.conversation.Thread is not { } thread)
|
||||
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Class="mb-3">
|
||||
@TA("AI Studio cannot open this conversation. Its file may be damaged, or a newer version of AI Studio stored it. You can start the conversation over, which deletes it.")
|
||||
</MudAlert>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.RestartAlt" Color="Color.Error" OnClick="@this.ResetAsync">@T("Start over")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.RESET" Color="Color.Error" OnClick="@this.ResetAsync">@T("Start over")</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -22,7 +22,7 @@ else
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mb-3">@this.Introduction</MudText>
|
||||
<div class="mb-4">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Forum" OnClick="@this.StartAsync" Disabled="@(!this.CanSend)">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CHAT" OnClick="@this.StartAsync" Disabled="@(!this.CanSend)">
|
||||
@T("Start the conversation")
|
||||
</MudButton>
|
||||
</div>
|
||||
@@ -53,7 +53,7 @@ else
|
||||
Variant="Variant.Outlined"
|
||||
Label="@TA("Your message")"
|
||||
Adornment="Adornment.End"
|
||||
AdornmentIcon="@Icons.Material.Filled.Send"
|
||||
AdornmentIcon="@AppIcons.SEND"
|
||||
AdornmentColor="@(this.CanSendMessage ? Color.Primary : Color.Default)"
|
||||
AdornmentAriaLabel="@T("Send")"
|
||||
OnAdornmentClick="@this.SendAsync"
|
||||
@@ -68,11 +68,11 @@ else
|
||||
<MudStack Row="true" Spacing="1" Class="mt-2">
|
||||
@if (this.IsRunning)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Stop" OnClick="@this.CancelAsync">@T("Stop")</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@AppIcons.STOP" OnClick="@this.CancelAsync">@T("Stop")</MudButton>
|
||||
}
|
||||
@if (this.conversation.HasVisibleMessages)
|
||||
{
|
||||
<MudButton StartIcon="@Icons.Material.Filled.RestartAlt" OnClick="@this.ResetAsync" Disabled="@this.IsRunning">@T("Start over")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.RESET" OnClick="@this.ResetAsync" Disabled="@this.IsRunning">@T("Start over")</MudButton>
|
||||
}
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ public partial class BflChat : MSGComponentBase
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
this.Logger.LogError(exception, "Could not delete the chat '{Location}' of the BeyondFacts Lab.", this.Location.Key);
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.DeleteForever, TA("AI Studio could not delete this conversation. Please try again.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.DELETE, TA("AI Studio could not delete this conversation. Please try again.")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
var confirmed = this.WorkStates[step].Confirmed!;
|
||||
var isOutdated = BflStaleness.Of(step, this.WorkStates, this.Forms) is BflWorkStateStatus.OUTDATED;
|
||||
<ExpansionPanel @key="step"
|
||||
HeaderIcon="@(isOutdated ? Icons.Material.Filled.Update : Icons.Material.Filled.CheckCircle)"
|
||||
HeaderIcon="@(isOutdated ? AppIcons.OUTDATED : AppIcons.SUCCESS)"
|
||||
IconColor="@(isOutdated ? Color.Warning : Color.Success)"
|
||||
HeaderText="@(isOutdated ? string.Format(T("{0} (outdated)"), step.Title) : step.Title)">
|
||||
@foreach (var section in BflWorkStateSections.ForStep(step).Where(section => !string.IsNullOrWhiteSpace(confirmed.Sections.GetValueOrDefault(section.Key))))
|
||||
|
||||
@@ -155,13 +155,13 @@ public sealed class BflConversationService(BeyondFactsLabStore store, SettingsMa
|
||||
catch (BflPromptOverrideException exception)
|
||||
{
|
||||
logger.LogWarning(exception, "A prompt override of the BeyondFacts Lab has a placeholder which the lab does not fill.");
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."),exception.FileName, exception.Placeholder)));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."),exception.FileName, exception.Placeholder)));
|
||||
return;
|
||||
}
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or FormatException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not put together the system prompt of the chat '{Location}'.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, TA("The BeyondFacts Lab could not put together its instructions for the model. Please report this as a bug.")));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, TA("The BeyondFacts Lab could not put together its instructions for the model. Please report this as a bug.")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,12 +231,12 @@ public sealed class BflConversationService(BeyondFactsLabStore store, SettingsMa
|
||||
catch (ProviderRequestException exception)
|
||||
{
|
||||
logger.LogError(exception, "The provider request of the BeyondFacts Lab failed. Status={StatusCode}, Reason='{ReasonPhrase}'.", exception.StatusCode, exception.ReasonPhrase);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.CloudOff, exception.UserMessage));
|
||||
await messageBus.SendError(new(AppIcons.PROVIDER_ERROR, exception.UserMessage));
|
||||
}
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not store the chat '{Location}'.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not save this conversation. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not save this conversation. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -532,7 +532,7 @@ public sealed class BflConversationService(BeyondFactsLabStore store, SettingsMa
|
||||
if (reason is null)
|
||||
return true;
|
||||
|
||||
await messageBus.SendError(new(Icons.Material.Filled.CloudOff, reason));
|
||||
await messageBus.SendError(new(AppIcons.PROVIDER_ERROR, reason));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ public sealed class BflConversationService(BeyondFactsLabStore store, SettingsMa
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not store the chat '{Location}'.", conversation.Location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not save this conversation. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not save this conversation. Please try again.")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@T("The knowledge base of the lab is a guide on science in public debates by Lara Wüster from the Technical University of Munich (TUM).")
|
||||
</MudJustifiedText>
|
||||
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Icon="@Icons.Material.Filled.Schedule" Class="mb-4">
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Icon="@AppIcons.TIME" Class="mb-4">
|
||||
<MudJustifiedText Typo="Typo.body1">
|
||||
@TA("Plan about 30 to 60 minutes for a preparation. You can pause at any time: AI Studio saves your details and conversations, and you continue where you left off.")
|
||||
</MudJustifiedText>
|
||||
@@ -22,25 +22,25 @@
|
||||
@* Laid out like MudTextList, whose items have a header of their own: justified and hyphenated, with the icon at the first line. *@
|
||||
<MudText Typo="Typo.h6">@T("How to proceed")</MudText>
|
||||
<MudList T="string" ReadOnly="@true" Dense="@true" Class="mud-text-list mb-3">
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.LooksOne" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_1" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Create a preparation for your event with 'New preparation'.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.LooksTwo" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_2" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Work through the seven steps, in any order you like. Each step has the form 'Your details' and a conversation of its own.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.Looks3" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_3" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Fill in what you know. Fields may stay empty: the lab shows which key details are missing and asks for them in the conversation.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.Looks4" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_4" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Add material beside the steps, e.g., notes, a talk draft, a paper, the invitation, the recording of an interview, or a poster. It applies to all steps, and the lab asks you about it. Add only what you may process with the selected provider; recordings also go to the transcription provider of AI Studio.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.Looks5" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_5" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Let the lab start the conversation of a step, or write first and say what support you want, e.g., with your role, your strategy, or a round of critical questions. You can always say that you do not know.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.Looks6" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.STEP_6" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Once a step is largely clear, let the lab create its work state below the conversation. You check and edit it, and once you confirm it, the later steps build on it. The lab also suggests values for empty fields of 'Your details', which you take over one by one.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("In the last step, let the lab create your materials from your confirmed work states: a reflection folder, a position paper, a conversation guide, questions and answers, and your open points. You check, edit, and confirm each of them, and then export it as a document.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
@@ -50,7 +50,7 @@
|
||||
@string.Format(Culture, TA("In the step '{0}', research agents of the lab look into the event, its participants, and the public debate on its topic, one agent for each. They start on their own once you confirm the event details, provided the web search is set up in AI Studio, and you can start them again at any time."), BflStep.STRATEGY.Title)
|
||||
@TA("If you state in the event details that the event is not public, the lab never researches it on the web.")
|
||||
</MudJustifiedText>
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Icon="@Icons.Material.Filled.Shield" Class="mb-4">
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Icon="@AppIcons.PRIVACY" Class="mb-4">
|
||||
<MudJustifiedText Typo="Typo.body1">
|
||||
@TA("The research agents receive only the public details about the event, which the form marks with a symbol. Your other details, your material, your work states, and your conversations stay in your preparation and never reach a search. The conversations of the steps never search the web themselves: they only read web pages whose addresses stand in them, e.g., the link to the event.")
|
||||
</MudJustifiedText>
|
||||
@@ -58,22 +58,22 @@
|
||||
|
||||
<MudText Typo="Typo.h6">@T("How to recognize good results")</MudText>
|
||||
<MudList T="string" ReadOnly="@true" Dense="@true" Class="mud-text-list mb-3">
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("The answers refer to your event and your details.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("You can tell evidence, interpretation, assumptions about values, and recommendations apart.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("Uncertainties and the limits of your expertise stay visible.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@T("Counterarguments are presented fairly.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("The strategy fits your real speaking time and focuses on a few key messages.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Filled.TaskAlt" Style="@LIST_ITEM_STYLE">
|
||||
<MudListItem T="string" Icon="@AppIcons.CHECKLIST_ITEM" Style="@LIST_ITEM_STYLE">
|
||||
<MudJustifiedText Typo="Typo.body1">@TA("You keep the decision about which position you take.")</MudJustifiedText>
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
|
||||
@@ -128,7 +128,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
logger.LogError(exception, "Could not list the material of the preparation '{ProjectId}' of the BeyondFacts Lab.", projectId);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.Description, TA("AI Studio could not read the material of this preparation. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.DOCUMENT, TA("AI Studio could not read the material of this preparation. Please try again.")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
logger.LogError(exception, "Could not delete the material '{MaterialId}' of the preparation '{ProjectId}' of the BeyondFacts Lab.", materialId, projectId);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.DeleteForever, TA("AI Studio could not delete the material. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.DELETE, TA("AI Studio could not delete the material. Please try again.")));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -233,14 +233,14 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
logger.LogWarning(exception, "The BeyondFacts Lab could not open the file '{Path}'.", path);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.Description, string.Format(TB("AI Studio could not open the file '{0}'."), name)));
|
||||
await messageBus.SendError(new(AppIcons.DOCUMENT, string.Format(TB("AI Studio could not open the file '{0}'."), name)));
|
||||
return;
|
||||
}
|
||||
|
||||
// Before anything is read, and above all before a recording is paid for:
|
||||
if (!knownHashes.Add(hash))
|
||||
{
|
||||
await messageBus.SendInfo(new(Icons.Material.Filled.Description, string.Format(TB("The material of this preparation contains '{0}' already."), name)));
|
||||
await messageBus.SendInfo(new(AppIcons.DOCUMENT, string.Format(TB("The material of this preparation contains '{0}' already."), name)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -279,9 +279,9 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
{
|
||||
var addition = await store.AddMaterialAsync(projectId, material, extraction.Content);
|
||||
if (addition.IsDuplicate)
|
||||
await messageBus.SendInfo(new(Icons.Material.Filled.Description, string.Format(TB("The material of this preparation contains '{0}' already."), addition.Material.Name)));
|
||||
await messageBus.SendInfo(new(AppIcons.DOCUMENT, string.Format(TB("The material of this preparation contains '{0}' already."), addition.Material.Name)));
|
||||
else if (addition.Material.IsShortened)
|
||||
await messageBus.SendInfo(new(Icons.Material.Filled.ContentCut, string.Format(TB("The lab keeps only the beginning of '{0}': a conversation never takes more of one material."), addition.Material.Name)));
|
||||
await messageBus.SendInfo(new(AppIcons.CONTENT_SHORTENED, string.Format(TB("The lab keeps only the beginning of '{0}': a conversation never takes more of one material."), addition.Material.Name)));
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
@@ -292,7 +292,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
{
|
||||
knownHashes.Remove(hash);
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not store the material '{Name}' of the preparation '{ProjectId}'.", name, projectId);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, string.Format(TA("AI Studio could not save the material '{0}'. Please try again."), name)));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, string.Format(TA("AI Studio could not save the material '{0}'. Please try again."), name)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
if (!prepared.IsPrepared)
|
||||
{
|
||||
logger.LogWarning("The BeyondFacts Lab could not prepare the image '{Path}': {ErrorCode}.", path, prepared.ErrorCode);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.Image, prepared.ErrorCode.ToUserMessage(name)));
|
||||
await messageBus.SendError(new(AppIcons.IMAGE, prepared.ErrorCode.ToUserMessage(name)));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
{
|
||||
var addition = await store.AddImageMaterialAsync(projectId, material, Convert.FromBase64String(prepared.Base64));
|
||||
if (addition.IsDuplicate)
|
||||
await messageBus.SendInfo(new(Icons.Material.Filled.Image, string.Format(TB("The material of this preparation contains '{0}' already."), addition.Material.Name)));
|
||||
await messageBus.SendInfo(new(AppIcons.IMAGE, string.Format(TB("The material of this preparation contains '{0}' already."), addition.Material.Name)));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException or FormatException or ArgumentException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not store the image '{Name}' of the preparation '{ProjectId}'.", name, projectId);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, string.Format(TA("AI Studio could not save the material '{0}'. Please try again."), name)));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, string.Format(TA("AI Studio could not save the material '{0}'. Please try again."), name)));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -372,7 +372,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
{
|
||||
if (this.UsableTranscriptionProvider() is not { } provider)
|
||||
{
|
||||
await messageBus.SendWarning(new(Icons.Material.Filled.VoiceChat, this.NoTranscriptionProviderMessage));
|
||||
await messageBus.SendWarning(new(AppIcons.VOICE_TRANSCRIPTION, this.NoTranscriptionProviderMessage));
|
||||
return FileExtractionResult.Failed(FileExtractionErrorCode.INVALID_REQUEST, "No transcription provider may hear the recordings of the BeyondFacts Lab.");
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
if (transcript.Status is not PersistentMediaTranscriptStatus.READY)
|
||||
{
|
||||
logger.LogWarning("The BeyondFacts Lab could not transcribe the recording '{Path}': {Status}.", path, transcript.Status);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.VoiceChat, string.Format(TB("AI Studio could not transcribe the recording '{0}': {1}"), name, transcript.UserMessage)));
|
||||
await messageBus.SendError(new(AppIcons.VOICE_TRANSCRIPTION, string.Format(TB("AI Studio could not transcribe the recording '{0}': {1}"), name, transcript.UserMessage)));
|
||||
return FileExtractionResult.Failed(FileExtractionErrorCode.INTERNAL, transcript.UserMessage);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public sealed class BflMaterialService(BeyondFactsLabStore store, RustService ru
|
||||
if (!extraction.HasUsableContent)
|
||||
{
|
||||
logger.LogError("The BeyondFacts Lab could not read the transcript of the recording '{Path}': code={ErrorCode}, message='{ErrorMessage}'.", path, extraction.ErrorCode, extraction.ErrorMessage);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.VoiceChat, extraction.ToUserMessage(name)));
|
||||
await messageBus.SendError(new(AppIcons.VOICE_TRANSCRIPTION, extraction.ToUserMessage(name)));
|
||||
}
|
||||
|
||||
return extraction;
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
</MudStack>
|
||||
<MudTooltip Text="@T("Remove material")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Small" OnClick="@(() => this.DeleteAsync(entry))"/>
|
||||
<MudIconButton Icon="@AppIcons.DELETE" Size="Size.Small" OnClick="@(() => this.DeleteAsync(entry))"/>
|
||||
</MudTooltip>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public partial class BflMaterials : MSGComponentBase
|
||||
{
|
||||
if (this.MaterialService.UsableTranscriptionProvider() is not { } provider)
|
||||
{
|
||||
await this.MessageBus.SendWarning(new(Icons.Material.Filled.VoiceChat, this.MaterialService.NoTranscriptionProviderMessage));
|
||||
await this.MessageBus.SendWarning(new(AppIcons.VOICE_TRANSCRIPTION, this.MaterialService.NoTranscriptionProviderMessage));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -291,10 +291,10 @@ public partial class BflMaterials : MSGComponentBase
|
||||
/// <param name="entry">The material.</param>
|
||||
private static string Icon(BflMaterialEntry entry) => entry.Material?.Kind switch
|
||||
{
|
||||
null => Icons.Material.Filled.ErrorOutline,
|
||||
BflMaterialKind.RECORDING => Icons.Material.Filled.Mic,
|
||||
BflMaterialKind.IMAGE => Icons.Material.Filled.Image,
|
||||
_ => Icons.Material.Filled.Description,
|
||||
null => AppIcons.FILE_NOT_FOUND,
|
||||
BflMaterialKind.RECORDING => AppIcons.MICROPHONE,
|
||||
BflMaterialKind.IMAGE => AppIcons.IMAGE,
|
||||
_ => AppIcons.DOCUMENT,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
@if (this.IsNotPublic)
|
||||
{
|
||||
@* An event which is not public is never researched, and earlier research no longer counts: *@
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@Icons.Material.Filled.PublicOff" Class="mb-3">
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@AppIcons.NOT_PUBLIC" Class="mb-3">
|
||||
@string.Format(Culture, TA("The event is not public. Therefore, the lab does not research it on the web, and none of your details reach a search. If the event is public after all, change this in the step '{0}'."), BflStep.FRAMEWORK.Title)
|
||||
</MudAlert>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* What the research receives, and what it never receives: *@
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@Icons.Material.Filled.Shield" Class="mb-3">
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@AppIcons.PRIVACY" Class="mb-3">
|
||||
<MudText Typo="Typo.body2">@TA("The research agents receive only the public details about the event. Your other details, your material, your work states, and your conversations stay in your preparation and never reach a search.")</MudText>
|
||||
@if (this.PublicDetails.Count > 0)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ else
|
||||
|
||||
<MudButton Variant="@(this.research.Count > 0 ? Variant.Outlined : Variant.Filled)"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.TravelExplore"
|
||||
StartIcon="@AppIcons.WEB_RESEARCH"
|
||||
OnClick="@this.StartAllAsync"
|
||||
Disabled="@(!this.CanStart)"
|
||||
Class="mb-3">
|
||||
@@ -68,7 +68,7 @@ else
|
||||
}
|
||||
<MudText Typo="Typo.h6">@topic.Title</MudText>
|
||||
<MudTooltip Text="@topic.Description" Placement="Placement.Top">
|
||||
<MudIcon Icon="@Icons.Material.Outlined.Info" Size="Size.Small" Color="Color.Info" Class="ml-2"/>
|
||||
<MudIcon Icon="@AppIcons.INFO" Size="Size.Small" Color="Color.Info" Class="ml-2"/>
|
||||
</MudTooltip>
|
||||
<MudSpacer/>
|
||||
<MudText Typo="Typo.caption" Class="mr-2">@this.StatusText(found, isRunning)</MudText>
|
||||
@@ -80,7 +80,7 @@ else
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-1"/>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="mb-3">
|
||||
<MudText Typo="Typo.caption">@T("The agent researches this topic")</MudText>
|
||||
<MudButton Size="Size.Small" StartIcon="@Icons.Material.Filled.Stop" OnClick="@(() => this.CancelAsync(topic))">@T("Stop")</MudButton>
|
||||
<MudButton Size="Size.Small" StartIcon="@AppIcons.STOP" OnClick="@(() => this.CancelAsync(topic))">@T("Stop")</MudButton>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ else
|
||||
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Outlined"
|
||||
StartIcon="@Icons.Material.Filled.Refresh"
|
||||
StartIcon="@AppIcons.WEB"
|
||||
OnClick="@(() => this.StartAsync(topic))"
|
||||
Disabled="@(!this.CanStart)">
|
||||
@(found is null ? T("Research this topic") : T("Research this topic again"))
|
||||
|
||||
@@ -151,9 +151,9 @@ public partial class BflResearchPanel : MSGComponentBase
|
||||
|
||||
private string StatusIcon(BflResearch? found) => found switch
|
||||
{
|
||||
null => Icons.Material.Outlined.Circle,
|
||||
_ when found.IsOutdated(this.PublicDetails) => Icons.Material.Filled.Update,
|
||||
_ => Icons.Material.Filled.CheckCircle,
|
||||
null => AppIcons.NOT_STARTED,
|
||||
_ when found.IsOutdated(this.PublicDetails) => AppIcons.OUTDATED,
|
||||
_ => AppIcons.SUCCESS,
|
||||
};
|
||||
|
||||
private Color StatusColor(BflResearch? found) => found switch
|
||||
|
||||
@@ -138,7 +138,7 @@ public sealed class BflResearchRunner(BeyondFactsLabStore store, BflConversation
|
||||
var availability = await this.CheckAvailabilityAsync(provider);
|
||||
if (!availability.CanResearch)
|
||||
{
|
||||
await messageBus.SendError(new(Icons.Material.Filled.TravelExplore, availability.Message));
|
||||
await messageBus.SendError(new(AppIcons.WEB_RESEARCH, availability.Message));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,14 +157,14 @@ public sealed class BflResearchRunner(BeyondFactsLabStore store, BflConversation
|
||||
var forms = await store.LoadFormsAsync(location.ProjectId);
|
||||
if (BflEventVisibility.IsNotPublic(forms))
|
||||
{
|
||||
await messageBus.SendError(new(Icons.Material.Filled.PublicOff, BflEventVisibility.NotPublicMessage));
|
||||
await messageBus.SendError(new(AppIcons.NOT_PUBLIC, BflEventVisibility.NotPublicMessage));
|
||||
return;
|
||||
}
|
||||
|
||||
var details = BflPromptComposer.PublicDetailsOf(forms);
|
||||
if (details.Count is 0)
|
||||
{
|
||||
await messageBus.SendError(new(Icons.Material.Filled.TravelExplore, string.Format(TA("Please enter public details about the event first, in the step '{0}', such as its topic or its link. The research receives these details only."), BflStep.FRAMEWORK.Title)));
|
||||
await messageBus.SendError(new(AppIcons.WEB_RESEARCH, string.Format(TA("Please enter public details about the event first, in the step '{0}', such as its topic or its link. The research receives these details only."), BflStep.FRAMEWORK.Title)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public sealed class BflResearchRunner(BeyondFactsLabStore store, BflConversation
|
||||
if (research.Text.Length is 0)
|
||||
{
|
||||
logger.LogWarning("The agent wrote no text for the research '{Location}' of the BeyondFacts Lab.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, TA("The research ended without a result. Please try again, or try another provider.")));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, TA("The research ended without a result. Please try again, or try another provider.")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -201,12 +201,12 @@ public sealed class BflResearchRunner(BeyondFactsLabStore store, BflConversation
|
||||
catch (BflPromptOverrideException exception)
|
||||
{
|
||||
logger.LogWarning(exception, "A prompt override of the BeyondFacts Lab has a placeholder which the lab does not fill.");
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
}
|
||||
catch (ProviderRequestException exception)
|
||||
{
|
||||
logger.LogError(exception, "The provider request for a research of the BeyondFacts Lab failed. Status={StatusCode}, Reason='{ReasonPhrase}'.", exception.StatusCode, exception.ReasonPhrase);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.CloudOff, exception.UserMessage));
|
||||
await messageBus.SendError(new(AppIcons.PROVIDER_ERROR, exception.UserMessage));
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
@@ -215,7 +215,7 @@ public sealed class BflResearchRunner(BeyondFactsLabStore store, BflConversation
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException or FormatException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not do the research '{Location}'.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not finish this research. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not finish this research. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ public sealed class BflResultGenerator(BeyondFactsLabStore store, BflConversatio
|
||||
if (text.Length is 0)
|
||||
{
|
||||
logger.LogWarning("The model wrote no text for the result '{Location}' of the BeyondFacts Lab.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, TA("The model did not write this material. Please try again, or try another provider.")));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, TA("The model did not write this material. Please try again, or try another provider.")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,12 +118,12 @@ public sealed class BflResultGenerator(BeyondFactsLabStore store, BflConversatio
|
||||
catch (BflPromptOverrideException exception)
|
||||
{
|
||||
logger.LogWarning(exception, "A prompt override of the BeyondFacts Lab has a placeholder which the lab does not fill.");
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
}
|
||||
catch (ProviderRequestException exception)
|
||||
{
|
||||
logger.LogError(exception, "The provider request for a result of the BeyondFacts Lab failed. Status={StatusCode}, Reason='{ReasonPhrase}'.", exception.StatusCode, exception.ReasonPhrase);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.CloudOff, exception.UserMessage));
|
||||
await messageBus.SendError(new(AppIcons.PROVIDER_ERROR, exception.UserMessage));
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ public sealed class BflResultGenerator(BeyondFactsLabStore store, BflConversatio
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException or FormatException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not write the result '{Location}'.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not create this material. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not create this material. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -187,7 +187,7 @@ public sealed class BflResultGenerator(BeyondFactsLabStore store, BflConversatio
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not put the reflection folder of '{ProjectId}' together.", projectId);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not create this material. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not create this material. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<MudButton Variant="@(this.AnyCreated ? Variant.Outlined : Variant.Filled)"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.AutoAwesome"
|
||||
StartIcon="@AppIcons.GENERATE"
|
||||
OnClick="@this.CreateAllAsync"
|
||||
Disabled="@(!this.CanCreateAll)"
|
||||
Class="mb-3">
|
||||
@@ -30,7 +30,7 @@
|
||||
<MudIcon Icon="@StatusIcon(status)" Color="@StatusColor(status)" Class="mr-3"/>
|
||||
<MudText Typo="Typo.h6">@kind.Title</MudText>
|
||||
<MudTooltip Text="@kind.Description" Placement="Placement.Top">
|
||||
<MudIcon Icon="@Icons.Material.Outlined.Info" Size="Size.Small" Color="Color.Info" Class="ml-2"/>
|
||||
<MudIcon Icon="@AppIcons.INFO" Size="Size.Small" Color="Color.Info" Class="ml-2"/>
|
||||
</MudTooltip>
|
||||
<MudSpacer/>
|
||||
<MudText Typo="Typo.caption" Class="mr-2">@this.StatusText(status)</MudText>
|
||||
@@ -50,7 +50,7 @@
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-1"/>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="mb-3">
|
||||
<MudText Typo="Typo.caption">@T("The lab writes this material")</MudText>
|
||||
<MudButton Size="Size.Small" StartIcon="@Icons.Material.Filled.Stop" OnClick="@(() => this.CancelAsync(kind))">@T("Stop")</MudButton>
|
||||
<MudButton Size="Size.Small" StartIcon="@AppIcons.STOP" OnClick="@(() => this.CancelAsync(kind))">@T("Stop")</MudButton>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -85,16 +85,16 @@
|
||||
}
|
||||
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap" Class="mt-3">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CheckCircle" OnClick="@(() => this.ConfirmAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Confirm")</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CONFIRM" OnClick="@(() => this.ConfirmAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Confirm")</MudButton>
|
||||
@if (this.editing.Contains(kind))
|
||||
{
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Preview" OnClick="@(() => this.ShowPreview(kind))" Disabled="@this.IsBusy(kind)">@T("Show preview")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.PREVIEW" OnClick="@(() => this.ShowPreview(kind))" Disabled="@this.IsBusy(kind)">@T("Show preview")</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Edit" OnClick="@(() => this.StartEditing(kind))" Disabled="@this.IsBusy(kind)">@T("Edit")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.EDIT" OnClick="@(() => this.StartEditing(kind))" Disabled="@this.IsBusy(kind)">@T("Edit")</MudButton>
|
||||
}
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Delete" OnClick="@(() => this.DiscardDraftAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Discard draft")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.DELETE" OnClick="@(() => this.DiscardDraftAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Discard draft")</MudButton>
|
||||
</MudStack>
|
||||
</div>
|
||||
}
|
||||
@@ -117,8 +117,8 @@
|
||||
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap" Class="mb-3">
|
||||
<MudMenu Label="@T("Export")"
|
||||
StartIcon="@Icons.Material.Filled.Save"
|
||||
EndIcon="@Icons.Material.Filled.KeyboardArrowDown"
|
||||
StartIcon="@AppIcons.EXPORT"
|
||||
EndIcon="@AppIcons.DROPDOWN_MENU"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
MaxHeight="@MenuDefaults.MAX_HEIGHT"
|
||||
@@ -133,7 +133,7 @@
|
||||
<MudMenuItem @key="format" OnClick="@(() => this.ExportAsync(kind, confirmed, format))" Icon="@format.Icon" Label="@format.Name"/>
|
||||
}
|
||||
</MudMenu>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Edit" OnClick="@(() => this.EditAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Edit")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.EDIT" OnClick="@(() => this.EditAsync(kind))" Disabled="@this.IsBusy(kind)">@T("Edit")</MudButton>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
<MudButton Variant="@(result.Draft is null && result.Confirmed is null ? Variant.Filled : Variant.Outlined)"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@(kind.IsWrittenByModel ? Icons.Material.Filled.AutoAwesome : Icons.Material.Filled.FolderCopy)"
|
||||
StartIcon="@(kind.IsWrittenByModel ? AppIcons.GENERATE : AppIcons.REFLECTION_FOLDER)"
|
||||
OnClick="@(() => this.CreateAsync(kind))"
|
||||
Disabled="@(this.IsBusy(kind) || kind.IsWrittenByModel && this.ProviderIssue is not null)">
|
||||
@(result.Draft is null && result.Confirmed is null ? T("Create") : T("Create anew"))
|
||||
|
||||
@@ -188,12 +188,12 @@ public partial class BflResults : MSGComponentBase
|
||||
|
||||
private static string StatusIcon(BflResultStatus status) => status switch
|
||||
{
|
||||
BflResultStatus.UNREADABLE => Icons.Material.Filled.Error,
|
||||
BflResultStatus.WRITING => Icons.Material.Filled.HourglassTop,
|
||||
BflResultStatus.DRAFT => Icons.Material.Filled.EditNote,
|
||||
BflResultStatus.CONFIRMED => Icons.Material.Filled.CheckCircle,
|
||||
BflResultStatus.OUTDATED => Icons.Material.Filled.Update,
|
||||
_ => Icons.Material.Filled.RadioButtonUnchecked
|
||||
BflResultStatus.UNREADABLE => AppIcons.ERROR,
|
||||
BflResultStatus.WRITING => AppIcons.PENDING,
|
||||
BflResultStatus.DRAFT => AppIcons.DRAFT,
|
||||
BflResultStatus.CONFIRMED => AppIcons.SUCCESS,
|
||||
BflResultStatus.OUTDATED => AppIcons.OUTDATED,
|
||||
_ => AppIcons.NOT_CREATED
|
||||
};
|
||||
|
||||
private static Color StatusColor(BflResultStatus status) => status switch
|
||||
@@ -384,7 +384,7 @@ public partial class BflResults : MSGComponentBase
|
||||
catch (ArgumentOutOfRangeException exception)
|
||||
{
|
||||
this.Logger.LogError(exception, "Could not export a result of the BeyondFacts Lab, because no exporter writes the format {ExportFormat}.", format);
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.Error, TA("AI Studio could not export this material. Please try another format.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.ERROR, TA("AI Studio could not export this material. Please try another format.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -403,7 +403,7 @@ public partial class BflResults : MSGComponentBase
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
this.Logger.LogError(exception, "Could not save the result '{Kind}' of a preparation in the BeyondFacts Lab.", kind);
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not save this material. Please try again.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not save this material. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
@if (this.HasPublicDetails && this.IsEventNotPublic)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@Icons.Material.Filled.PublicOff" Class="mb-3">
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Icon="@AppIcons.NOT_PUBLIC" Class="mb-3">
|
||||
@TA("The event is not public. Therefore, the lab does not research it on the web, and none of your details reach a search, not even those marked with a symbol.")
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public partial class BflStepForm : MSGComponentBase
|
||||
/// <summary>
|
||||
/// The symbol which marks a field whose value the research of the lab receives.
|
||||
/// </summary>
|
||||
private const string PUBLIC_DETAIL_ICON = Icons.Material.Filled.TravelExplore;
|
||||
private const string PUBLIC_DETAIL_ICON = AppIcons.WEB_RESEARCH;
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the step has fields whose values the research receives, so that the form explains their symbol.
|
||||
|
||||
@@ -109,7 +109,7 @@ public sealed class BflWorkStateGenerator(BeyondFactsLabStore store, BflConversa
|
||||
if (answer.Sections.Count is 0)
|
||||
{
|
||||
logger.LogWarning("The model wrote no readable work state of the BeyondFacts Lab: {Problems}", string.Join(" ", answer.Problems));
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, TA("The model did not write a work state the lab can read. Please try again, or try another provider.")));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, TA("The model did not write a work state the lab can read. Please try again, or try another provider.")));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,12 +126,12 @@ public sealed class BflWorkStateGenerator(BeyondFactsLabStore store, BflConversa
|
||||
catch (BflPromptOverrideException exception)
|
||||
{
|
||||
logger.LogWarning(exception, "A prompt override of the BeyondFacts Lab has a placeholder which the lab does not fill.");
|
||||
await messageBus.SendError(new(Icons.Material.Filled.ErrorOutline, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
await messageBus.SendError(new(AppIcons.ERROR, string.Format(TA("The file '{0}' in the test folder of the BeyondFacts Lab contains the placeholder '{1}', which the lab does not fill in this file. Please correct the file and try again."), exception.FileName, exception.Placeholder)));
|
||||
}
|
||||
catch (ProviderRequestException exception)
|
||||
{
|
||||
logger.LogError(exception, "The provider request for a work state of the BeyondFacts Lab failed. Status={StatusCode}, Reason='{ReasonPhrase}'.", exception.StatusCode, exception.ReasonPhrase);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.CloudOff, exception.UserMessage));
|
||||
await messageBus.SendError(new(AppIcons.PROVIDER_ERROR, exception.UserMessage));
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ public sealed class BflWorkStateGenerator(BeyondFactsLabStore store, BflConversa
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException or FormatException)
|
||||
{
|
||||
logger.LogError(exception, "The BeyondFacts Lab could not write the work state of '{Location}'.", location.Key);
|
||||
await messageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not create the work state. Please try again.")));
|
||||
await messageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not create the work state. Please try again.")));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ else
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" Class="mb-1"/>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="mb-3">
|
||||
<MudText Typo="Typo.caption">@T("The lab writes the work state from the conversation")</MudText>
|
||||
<MudButton Size="Size.Small" StartIcon="@Icons.Material.Filled.Stop" OnClick="@this.CancelAsync">@T("Stop")</MudButton>
|
||||
<MudButton Size="Size.Small" StartIcon="@AppIcons.STOP" OnClick="@this.CancelAsync">@T("Stop")</MudButton>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ else
|
||||
}
|
||||
</MudStack>
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap" Class="mt-3">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CheckCircle" OnClick="@this.ConfirmDraftAsync" Disabled="@this.IsBusy">@T("Confirm")</MudButton>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Delete" OnClick="@this.DiscardDraftAsync" Disabled="@this.IsBusy">@T("Discard draft")</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CONFIRM" OnClick="@this.ConfirmDraftAsync" Disabled="@this.IsBusy">@T("Confirm")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.DELETE" OnClick="@this.DiscardDraftAsync" Disabled="@this.IsBusy">@T("Discard draft")</MudButton>
|
||||
</MudStack>
|
||||
</div>
|
||||
}
|
||||
@@ -78,17 +78,17 @@ else
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap" Class="mt-3">
|
||||
@if (this.Status is BflWorkStateStatus.OUTDATED or BflWorkStateStatus.DETAILS_CHANGED)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CheckCircle" OnClick="@this.ConfirmAgainAsync" Disabled="@this.IsBusy">@T("Confirm again")</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CONFIRM" OnClick="@this.ConfirmAgainAsync" Disabled="@this.IsBusy">@T("Confirm again")</MudButton>
|
||||
}
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Edit" OnClick="@this.EditAsync" Disabled="@this.IsBusy">@T("Edit")</MudButton>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Undo" OnClick="@this.WithdrawAsync" Disabled="@this.IsBusy">@T("Withdraw")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.EDIT" OnClick="@this.EditAsync" Disabled="@this.IsBusy">@T("Edit")</MudButton>
|
||||
<MudButton StartIcon="@AppIcons.WITHDRAW" OnClick="@this.WithdrawAsync" Disabled="@this.IsBusy">@T("Withdraw")</MudButton>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
|
||||
<MudButton Variant="@(workState.Draft is null && workState.Confirmed is null ? Variant.Filled : Variant.Outlined)"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.AutoAwesome"
|
||||
StartIcon="@AppIcons.GENERATE"
|
||||
OnClick="@this.GenerateAsync"
|
||||
Disabled="@(this.IsBusy || this.ProviderIssue is not null)">
|
||||
@(workState.Draft is null && workState.Confirmed is null ? T("Create work state") : T("Create anew"))
|
||||
@@ -105,8 +105,8 @@ else
|
||||
<MudText Typo="Typo.subtitle2">@field.Label</MudText>
|
||||
<MudText Typo="Typo.body2" Style="white-space: pre-wrap;">@TextOf(field, value)</MudText>
|
||||
<MudStack Row="true" Spacing="1" Wrap="Wrap.Wrap" Class="mt-2">
|
||||
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Check" OnClick="@(() => this.TakeOverSuggestionAsync(field, value))" Disabled="@this.IsBusy">@T("Take over")</MudButton>
|
||||
<MudButton Size="Size.Small" StartIcon="@Icons.Material.Filled.Close" OnClick="@(() => this.DismissSuggestionAsync(field))" Disabled="@this.IsBusy">@T("Dismiss")</MudButton>
|
||||
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.CONFIRM" OnClick="@(() => this.TakeOverSuggestionAsync(field, value))" Disabled="@this.IsBusy">@T("Take over")</MudButton>
|
||||
<MudButton Size="Size.Small" StartIcon="@AppIcons.CLOSE" OnClick="@(() => this.DismissSuggestionAsync(field))" Disabled="@this.IsBusy">@T("Dismiss")</MudButton>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public partial class BflWorkStatePanel : MSGComponentBase
|
||||
catch (Exception exception) when (exception is IOException or UnauthorizedAccessException or InvalidDataException)
|
||||
{
|
||||
this.Logger.LogError(exception, "Could not save the work state of a step in the BeyondFacts Lab.");
|
||||
await this.MessageBus.SendError(new(Icons.Material.Filled.SaveAs, TA("AI Studio could not save the work state. Please try again.")));
|
||||
await this.MessageBus.SendError(new(AppIcons.SAVE_FAILED, TA("AI Studio could not save the work state. Please try again.")));
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in new issue
Block a user