Persist file categories on the index and classify archives and unknown types during idle maintenance.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -59,6 +59,11 @@ public interface IEntryStore
|
||||
Task DeleteExpiredTombstonesAsync(DateTimeOffset cutoffUtc, CancellationToken cancellationToken = default);
|
||||
Task RenameSubtreePathAsync(long sourceId, string oldPathRel, string newPathRel, CancellationToken cancellationToken = default);
|
||||
Task<long> CountPresentAsync(long sourceId, CancellationToken cancellationToken = default);
|
||||
Task RefreshCategoryFromChildrenAsync(long folderOrArchiveId, CancellationToken cancellationToken = default);
|
||||
Task SetUserCategoryAsync(long entryId, FileCategory category, string? reason = null, CancellationToken cancellationToken = default);
|
||||
Task<int> BackfillCheapCategoriesAsync(int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<long>> GetArchiveIdsNeedingContentClassifyAsync(int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<IndexEntry>> GetUnknownFilesForSignatureAsync(int take, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
public interface IExcludeStore
|
||||
@@ -109,6 +114,7 @@ public sealed class SearchRequest
|
||||
public bool DirectChildrenOnly { get; init; }
|
||||
public bool IncludeOffline { get; init; } = true;
|
||||
public bool IncludeDeleted { get; init; }
|
||||
public FileCategory? Category { get; init; }
|
||||
public int Skip { get; init; }
|
||||
public int Take { get; init; } = 500;
|
||||
}
|
||||
@@ -121,6 +127,7 @@ public interface IAnalysisStore
|
||||
Task<IReadOnlyList<IndexEntry>> LargestDirectoriesAsync(long? sourceId, long? parentId, int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<IndexEntry>> LargestFilesAsync(long? sourceId, string? pathRelPrefix, int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<ExtensionUsage>> UsageByExtensionAsync(long? sourceId, string? pathRelPrefix, int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<CategoryUsage>> UsageByCategoryAsync(long? sourceId, string? pathRelPrefix, int take, CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<SourceUsage>> UsageBySourceAsync(CancellationToken cancellationToken = default);
|
||||
Task<IReadOnlyList<IndexEntry>> ChildrenBySizeAsync(long parentId, int take, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -132,6 +139,13 @@ public sealed class ExtensionUsage
|
||||
public long FileCount { get; init; }
|
||||
}
|
||||
|
||||
public sealed class CategoryUsage
|
||||
{
|
||||
public required string Category { get; init; }
|
||||
public long TotalSize { get; init; }
|
||||
public long FileCount { get; init; }
|
||||
}
|
||||
|
||||
public sealed class SourceUsage
|
||||
{
|
||||
public long SourceId { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user