mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 20:13:48 +00:00
Show permanently skipped files as their own category
This commit is contained in:
6 files changed
+64
-10
No files matched your search
@@ -68,6 +68,10 @@ public partial class DataSourceManagement : MSGComponentBase
|
||||
this.availableEmbeddingProviders.Add(new (provider.Name, provider.Id));
|
||||
}
|
||||
|
||||
/// <remarks>
|
||||
/// Files which were skipped for good are none of the failed ones, so a data source made of
|
||||
/// scanned documents stays green: there is nothing here for the user to fix.
|
||||
/// </remarks>
|
||||
private static Color GetIndexingStatusColor(DataSourceEmbeddingStatus? status)
|
||||
{
|
||||
if (status is null || status.State is DataSourceEmbeddingState.IDLE or DataSourceEmbeddingState.QUEUED or DataSourceEmbeddingState.RUNNING)
|
||||
@@ -78,6 +82,25 @@ public partial class DataSourceManagement : MSGComponentBase
|
||||
: Color.Success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Explains the indexing dot, including the files which stay out of the index.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The column shows the indexed files against the total, which reads as unfinished for a data
|
||||
/// source whose remaining files were skipped for good. The tooltip is where that gap gets its
|
||||
/// explanation.
|
||||
/// </remarks>
|
||||
private string GetIndexingStatusTooltip(DataSourceEmbeddingStatus? status)
|
||||
{
|
||||
if (status is null)
|
||||
return T("Waiting for indexing status");
|
||||
|
||||
if (status.PermanentlySkippedFiles == 0)
|
||||
return status.StateLabel;
|
||||
|
||||
return $"{status.StateLabel} — {string.Format(T("{0} files were skipped because they contain no readable text. AI Studio reads them again once they change."), status.PermanentlySkippedFiles)}";
|
||||
}
|
||||
|
||||
private string GetEmbeddingName(IDataSource dataSource)
|
||||
{
|
||||
if(dataSource is IInternalDataSource internalDataSource)
|
||||
|
||||
Reference in new issue
Block a user