mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:27:21 +00:00
Allowed moving local data sources without embedding them again (#1091)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f6e48e95f3
commit
5d6e48ef93
49 files changed
+2280
-297
No files matched your search
@@ -35,6 +35,15 @@ public sealed class FileSourceIndexerWatcherTests
|
||||
Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SingleFileWatcherIgnoresAnotherCaseDistinctFileOnUnix()
|
||||
{
|
||||
var configuration = new FileSourceIndexer.DataSourceWatcherConfiguration(Path.GetTempPath(), false, TargetFileName: "Report.md");
|
||||
|
||||
Assert.That(FileSourceIndexer.IsRelevantWatcherPath(configuration, Path.Combine(Path.GetTempPath(), "report.md"), WatcherChangeTypes.Changed),
|
||||
Is.EqualTo(OperatingSystem.IsWindows()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SingleFileWatcherRecognizesARenameAwayFromTheConfiguredFile()
|
||||
{
|
||||
@@ -262,6 +271,15 @@ public sealed class FileSourceIndexerWatcherTests
|
||||
Assert.That(FileSourceIndexer.IsSameWatchConfiguration(before, after), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RelocatingToADirectoryWithDifferentCasingUsesTheLocalPathRules()
|
||||
{
|
||||
var before = DefaultConfiguration(Path.Combine(Path.GetTempPath(), "Documents"));
|
||||
var after = before with { RootPath = Path.Combine(Path.GetTempPath(), "documents") };
|
||||
|
||||
Assert.That(FileSourceIndexer.IsSameWatchConfiguration(before, after), Is.EqualTo(OperatingSystem.IsWindows()), "On Unix these can be different directories; their watchers must not be treated as interchangeable.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task DirectoryWatcherIgnoresTheBatchTranscriptWhenTheMediaIsSelected()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user