mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-16 19:08:27 +00:00
Added the research on individual participants to the BeyondFacts Lab (#1207)
This commit is contained in:
1 parent
3ca4b3878b
commit
92d0ff68f4
69 files changed
+3869
-186
No files matched your search
@@ -1,20 +1,20 @@
|
||||
@inherits MSGComponentBase
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mt-6 mb-1">@T("Research")</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-3">@TA("Research agents of the lab look into the event, its participants, and the public debate on its topic, one agent for each. The conversation of this step builds on what they find.")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">@TA("Research agents of the lab look into the event, its participants, and the public debate on its topic, one agent for each. The conversation of this step builds on what they find.")</MudJustifiedText>
|
||||
|
||||
@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="@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)
|
||||
<MudJustifiedText Typo="Typo.body2">@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)</MudJustifiedText>
|
||||
</MudAlert>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* What the research receives, and what it never receives: *@
|
||||
<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>
|
||||
<MudJustifiedText 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.")</MudJustifiedText>
|
||||
@if (this.PublicDetails.Count > 0)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mt-2">@T("The research receives these details:")</MudText>
|
||||
@@ -27,17 +27,21 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mt-2">@string.Format(Culture, TA("You have not entered any public details yet. Enter them in the step '{0}', such as the topic of the event or its link."), BflStep.FRAMEWORK.Title)</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mt-2">@string.Format(Culture, TA("You have not entered any public details yet. Enter them in the step '{0}', such as the topic of the event or its link."), BflStep.FRAMEWORK.Title)</MudJustifiedText>
|
||||
}
|
||||
</MudAlert>
|
||||
|
||||
@if (this.ProviderIssue is { } providerIssue)
|
||||
{
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true" Class="mb-3">@providerIssue</MudAlert>
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true" Class="mb-3">
|
||||
<MudJustifiedText Typo="Typo.body2">@providerIssue</MudJustifiedText>
|
||||
</MudAlert>
|
||||
}
|
||||
else if (this.availability is { CanResearch: false } unavailable)
|
||||
{
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true" Class="mb-3">@unavailable.Message</MudAlert>
|
||||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true" Class="mb-3">
|
||||
<MudJustifiedText Typo="Typo.body2">@unavailable.Message</MudJustifiedText>
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
<MudButton Variant="@(this.research.Count > 0 ? Variant.Outlined : Variant.Filled)"
|
||||
@@ -84,16 +88,17 @@ else
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@if (found is null)
|
||||
@* While the agent researches anew, the earlier research would look like its result: *@
|
||||
@if (!isRunning && found is null)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mb-3">@topic.Description</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">@topic.Description</MudJustifiedText>
|
||||
}
|
||||
else
|
||||
else if (!isRunning && found is not null)
|
||||
{
|
||||
@if (found.IsOutdated(this.PublicDetails))
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true" Class="mb-2">
|
||||
@TA("The public details changed since this research. You can research this topic again.")
|
||||
<MudJustifiedText Typo="Typo.body2">@TA("The public details changed since this research. You can research this topic again.")</MudJustifiedText>
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
@@ -101,47 +106,27 @@ else
|
||||
<MudMarkdown Value="@found.Text" Props="Markdown.DefaultConfig" MarkdownPipeline="Markdown.SAFE_MARKDOWN_PIPELINE"/>
|
||||
</div>
|
||||
|
||||
@* What left AI Studio for this research: *@
|
||||
<MudText Typo="Typo.subtitle2">@T("Queries sent to the web search")</MudText>
|
||||
@if (found.SearchQueries.Count is 0)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mb-2">@T("None")</MudText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="ml-4 mb-2">
|
||||
@foreach (var query in found.SearchQueries)
|
||||
{
|
||||
<li><MudText Typo="Typo.body2">@query</MudText></li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.subtitle2">@T("Web pages opened")</MudText>
|
||||
@if (found.Pages.Count is 0)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mb-2">@T("None")</MudText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="ml-4 mb-2">
|
||||
@foreach (var webPage in found.Pages)
|
||||
{
|
||||
<li><MudLink Href="@webPage.Url" Target="_blank" Typo="Typo.body2">@webPage.Title</MudLink></li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
<BflResearchTrace Research="@found"/>
|
||||
}
|
||||
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Outlined"
|
||||
StartIcon="@AppIcons.WEB"
|
||||
OnClick="@(() => this.StartAsync(topic))"
|
||||
Disabled="@(!this.CanStart)">
|
||||
Disabled="@(!this.CanStart || isRunning)">
|
||||
@(found is null ? T("Research this topic") : T("Research this topic again"))
|
||||
</MudButton>
|
||||
</ChildContent>
|
||||
</MudExpansionPanel>
|
||||
}
|
||||
</MudExpansionPanels>
|
||||
|
||||
@* While the list of participants is researched anew, the earlier list no longer counts: *@
|
||||
<BflPersonResearchPanel ProjectId="@this.ProjectId"
|
||||
List="@(this.IsRunning(BflResearchTopic.PARTICIPANTS) ? null : this.research.GetValueOrDefault(BflResearchTopic.PARTICIPANTS))"
|
||||
PublicDetails="@this.PublicDetails"
|
||||
CanStart="@this.CanStart"
|
||||
Provider="@this.Provider"
|
||||
ProviderIssue="@this.ProviderIssue"
|
||||
ResearchStored="@this.ResearchStored"/>
|
||||
}
|
||||
Reference in new issue
Block a user