using AIStudio.Assistants; using Microsoft.AspNetCore.Components; namespace AIStudio.Components; /// /// Tells the user what became of a document an assistant worked on, and lets them save the new document. /// /// /// It counts the sections which stayed as they were and names what the format of the document leaves alone. /// The texts which name what the assistant did come from the assistant. /// public partial class EditedDocumentSummary : MSGComponentBase { /// /// The document the assistant worked on. /// [Parameter, EditorRequired] public EditedDocument Document { get; set; } = null!; /// /// What the result is called, e.g., "Translated document". /// [Parameter] public string Title { get; set; } = string.Empty; /// /// What became of the document, e.g., into which language it was translated. /// [Parameter] public string DoneText { get; set; } = string.Empty; /// /// How many sections of the document the assistant changed. /// [Parameter] public string SectionsText { get; set; } = string.Empty; /// /// The text of the button which saves the new document. /// [Parameter] public string SaveText { get; set; } = string.Empty; /// /// Whether the new document is being saved right now, which disables the button. /// [Parameter] public bool IsSaving { get; set; } /// /// Called when the user wants to save the new document. /// [Parameter] public EventCallback OnSave { get; set; } private async Task Save() => await this.OnSave.InvokeAsync(); }