mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 10:57:59 +00:00
Show all data sources on the embeddings page from the start
This commit is contained in:
3 files changed
+44
No files matched your search
@@ -19,6 +19,12 @@
|
||||
<MudChip T="string" Color="Color.Default" Variant="Variant.Filled">@string.Format(T("Skipped files: {0}"), this.TotalPermanentlySkippedFiles)</MudChip>
|
||||
<MudChip T="string" Color="Color.Error" Variant="Variant.Filled">@string.Format(T("Failed files: {0}"), this.TotalFailedFiles)</MudChip>
|
||||
</MudStack>
|
||||
@if (this.IsWorkingThroughDataSources)
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="mt-2">
|
||||
@string.Format(T("Data source {0} of {1} is being worked on. The others are waiting their turn."), this.CurrentDataSourceNumber, this.Statuses.Count)
|
||||
</MudText>
|
||||
}
|
||||
</MudPaper>
|
||||
|
||||
@if (this.Statuses.Count == 0)
|
||||
|
||||
@@ -43,6 +43,19 @@ public partial class Embeddings : MSGComponentBase
|
||||
|
||||
private int TotalPermanentlySkippedFiles => this.Statuses.Sum(status => status.PermanentlySkippedFiles);
|
||||
|
||||
/// <remarks>
|
||||
/// The chips above count files, which says nothing about how far the list of data sources itself
|
||||
/// has come. While several of them wait their turn, this is the one line saying so. With a single
|
||||
/// data source there is nothing to say: its own row already tells the whole story.
|
||||
/// </remarks>
|
||||
private bool IsWorkingThroughDataSources => this.Statuses.Count > 1 && this.Statuses.Any(status => status.State is DataSourceEmbeddingState.RUNNING or DataSourceEmbeddingState.QUEUED);
|
||||
|
||||
/// <remarks>
|
||||
/// The one being worked on is the one after those which are done. A data source which needs
|
||||
/// attention counts as done here: nothing is going to happen to it during this pass.
|
||||
/// </remarks>
|
||||
private int CurrentDataSourceNumber => Math.Min(this.Statuses.Count, this.Statuses.Count(status => status.State is DataSourceEmbeddingState.COMPLETED or DataSourceEmbeddingState.FAILED) + 1);
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user