@inherits MSGComponentBase
@T("Work state")
@TA("The work state records what this step yielded. The lab writes a draft from the conversation, which you check and edit. Once you confirm it, the lab builds on it in the later steps. You can change it afterward.")
@if (this.WorkState is not { } workState)
{
@TA("AI Studio cannot open the work state of this step. Its file may be damaged, or a newer version of AI Studio stored it. AI Studio leaves the file unchanged.")
}
else
{
@switch (this.Status)
{
case BflWorkStateStatus.CONFIRMED when workState.Confirmed is { } confirmed:
@string.Format(Culture, TA("You confirmed this work state on {0}. The lab builds on it in the later steps."), confirmed.ConfirmedAtUtc.ToLocalTime().ToString("g", Culture))
break;
case BflWorkStateStatus.DETAILS_CHANGED:
@TA("You changed your details in this step since you confirmed the work state. Please check whether it still fits, and confirm it again.")
break;
case BflWorkStateStatus.OUTDATED:
@TA("The work state of an earlier step changed since you confirmed this one. Please check whether it still fits, and confirm it again.")
break;
}
@if (this.IsGenerating)
{
@T("The lab writes the work state from the conversation")
@T("Stop")
}
@if (workState.Draft is { } draft)
{
@T("Draft, not confirmed yet")
@foreach (var section in this.Sections)
{
}
@T("Confirm")
@T("Discard draft")
}
else if (workState.Confirmed is { } confirmed)
{
@TA("Work state confirmed by you")
@foreach (var section in this.Sections.Where(section => !string.IsNullOrWhiteSpace(confirmed.Sections.GetValueOrDefault(section.Key))))
{
@section.Title
}
@if (this.Status is BflWorkStateStatus.OUTDATED or BflWorkStateStatus.DETAILS_CHANGED)
{
@T("Confirm again")
}
@T("Edit")
@T("Withdraw")
}
@(workState.Draft is null && workState.Confirmed is null ? T("Create work state") : T("Create anew"))
@if (this.VisibleSuggestions.Count > 0)
{
@TA("Suggestions for your details")
@TA("The lab found values for empty fields of your details. Take over what fits; your details stay as they are until then.")
@foreach (var (field, value) in this.VisibleSuggestions)
{
@field.Label
@value
@T("Take over")
@T("Dismiss")
}
}
}