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:
@@ -64,6 +64,10 @@ public sealed class SourceManager
|
||||
await _store.Entries.MarkSourceOnlinePresentAsync(source.Id, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else if (fp.Kind.IsNetwork())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
source = new Source
|
||||
@@ -302,6 +306,29 @@ public sealed class SourceManager
|
||||
return created;
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<VolumeFingerprint>> ListUntrackedOnlineVolumesAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
var known = await _store.Sources.GetAllAsync(cancellationToken).ConfigureAwait(false);
|
||||
var untracked = new List<VolumeFingerprint>();
|
||||
foreach (var fp in _volumes.EnumerateOnlineVolumes())
|
||||
{
|
||||
var match = VolumeIdentityMatcher.Match(fp, known);
|
||||
if (match.Source is not null && !match.Ambiguous)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (known.Any(s => s.LastRootPath is not null && RootsEqual(s.LastRootPath, fp.RootPath)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
untracked.Add(fp);
|
||||
}
|
||||
|
||||
return untracked;
|
||||
}
|
||||
|
||||
private async Task<Source?> FindSourceRootAsync(string path, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path) || LocationRoots.IsVirtual(path))
|
||||
|
||||
Reference in New Issue
Block a user