mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-12 15:07:39 +00:00
Added research on the web to the BeyondFacts Lab (#1186)
This commit is contained in:
1 parent
e5c0931a60
commit
9a676101f7
66 files changed
+3609
-70
No files matched your search
+32
@@ -55,6 +55,38 @@ public partial class BeyondFactsLabAssistant
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the research once the person confirmed the event details, on every topic without one and on every topic
|
||||
/// whose public details changed since, and tells the person.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Nothing starts for an event which is not public, nor while the work state suggests whether the event is public
|
||||
/// and the person has not decided yet; the person hears why. Taking over the suggestion changes the details, so
|
||||
/// that the person confirms the work state again, and the research starts then if the event is public.
|
||||
/// </remarks>
|
||||
/// <param name="step">The step whose work state the person confirmed.</param>
|
||||
private async Task WorkStateConfirmedAsync(BflStep step)
|
||||
{
|
||||
if (step is not BflStep.FRAMEWORK || this.selectedProject?.Project is not { } project || this.ValidateProvider(this.providerSettings) is not null)
|
||||
return;
|
||||
|
||||
if (BflEventVisibility.IsNotPublic(this.forms))
|
||||
{
|
||||
await this.MessageBus.SendInfo(new(Icons.Material.Filled.PublicOff, 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)));
|
||||
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)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the work states of the preparation shown again once the generator started, ended, or stored a draft.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user