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

@@ -0,0 +1,55 @@
using System.IO;
using System.Reflection;
namespace Explorer.App;
public static class DocumentationLoader
{
public const string EmbeddedName = "Explorer.Documentation.md";
public const string FileName = "Documentation.md";
public static LoadedDocumentation Load()
{
foreach (var path in CandidatePaths())
{
try
{
if (File.Exists(path))
{
return new LoadedDocumentation(File.ReadAllText(path), path);
}
}
catch (IOException)
{
// try the next candidate
}
}
var assembly = typeof(DocumentationLoader).Assembly;
using var stream = assembly.GetManifestResourceStream(EmbeddedName);
if (stream is null)
{
return new LoadedDocumentation(
"# Documentation\n\nThe user guide file was not found. Add `docs/Documentation.md` to the project.",
null);
}
using var reader = new StreamReader(stream);
return new LoadedDocumentation(reader.ReadToEnd(), null);
}
public static IEnumerable<string> CandidatePaths()
{
var baseDir = AppContext.BaseDirectory;
yield return Path.Combine(baseDir, FileName);
yield return Path.Combine(baseDir, "docs", FileName);
var dir = new DirectoryInfo(baseDir);
for (var n = 0; n < 8 && dir is not null; n++, dir = dir.Parent)
{
yield return Path.Combine(dir.FullName, "docs", FileName);
yield return Path.Combine(dir.FullName, FileName);
}
}
}
public sealed record LoadedDocumentation(string Markdown, string? SourcePath);