Added file patterns and exclusions to folder data sources (#1057)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Paul KoudelkaandThorsten Sommer authored and GitHub committed 2026-10-17 19:12:43 +02:00
1 parent 249fc778a2
commit 031874cebf
75 files changed
+4808 -589

No files matched your search

+11 -2
View File
@@ -15,7 +15,7 @@ namespace AIStudio.Tests.Tools;
[TestFixture]
public sealed class IndexingPassTests
{
private static readonly DataSourceRunSignature SIGNATURE = new("EMBEDDING-SIGNATURE");
private static readonly DataSourceRunSignature SIGNATURE = new("EMBEDDING-SIGNATURE", "SELECTION");
[Test]
public void TheNextStepCarriesOnThePass()
@@ -45,7 +45,7 @@ public sealed class IndexingPassTests
public void OtherEmbeddingSettingsBeginANewPass()
{
var pass = new IndexingPass(SIGNATURE);
var otherSignature = new DataSourceRunSignature("OTHER-EMBEDDING-SIGNATURE");
var otherSignature = new DataSourceRunSignature("OTHER-EMBEDDING-SIGNATURE", "SELECTION");
var nextPass = IndexingPass.ContinueOrBegin(pass, DataSourceEmbeddingRefreshMode.CONTINUATION, otherSignature);
@@ -56,6 +56,15 @@ public sealed class IndexingPassTests
});
}
[Test]
public void AnotherSelectionBeginsANewPass()
{
var pass = new IndexingPass(SIGNATURE);
var otherSelection = SIGNATURE with { SelectionSignature = "OTHER-SELECTION" };
Assert.That(IndexingPass.ContinueOrBegin(pass, DataSourceEmbeddingRefreshMode.CONTINUATION, otherSelection), Is.Not.SameAs(pass), "The data source selects other documents, so the run goes through it anew.");
}
[Test]
public void ARunWithoutAPassBeginsOne() =>
Assert.That(IndexingPass.ContinueOrBegin(null, DataSourceEmbeddingRefreshMode.CONTINUATION, SIGNATURE).RunSignature, Is.EqualTo(SIGNATURE));