Add Git overlay, operation tools, and virtualized preview so large folders stay responsive.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 15:04:04 +02:00
parent 9bf451932f
commit a3c54bbb03
127 changed files with 14748 additions and 633 deletions

View File

@@ -188,25 +188,34 @@ public sealed class StorageProviderRegistry
return null;
}
}
public async Task<ProviderQuota?> TryGetQuotaAsync(string rootPath, CancellationToken cancellationToken = default)
{
var provider = Find(rootPath);
if (provider is null)
{
return null;
}
try
{
return await provider.TryGetQuotaAsync(rootPath, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
_logger.LogDebug(ex, "Provider {Id} failed reading quota for {Path}", provider.Manifest.Id, rootPath);
return null;
}
}
}
public static class CloudPresenceMapper
{
public static FileSystemItem Apply(FileSystemItem item, ProviderItemState state)
=> new()
{
FullPath = item.FullPath,
Name = item.Name,
IsDirectory = item.IsDirectory,
SizeBytes = item.SizeBytes,
CreatedUtc = item.CreatedUtc,
ModifiedUtc = item.ModifiedUtc,
Attributes = item.Attributes,
FileId = item.FileId,
ReparseTag = item.ReparseTag,
AllocatedSizeBytes = state.AllocatedSizeBytes ?? item.AllocatedSizeBytes,
Cloud = ToPresence(state)
};
=> item.Overlay(
allocatedSizeBytes: state.AllocatedSizeBytes ?? item.AllocatedSizeBytes,
cloud: ToPresence(state),
hydration: item.Hydration | ItemHydrationFlags.Provider);
public static CloudPresence ToPresence(ProviderItemState state)
=> new(