mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:07:21 +00:00
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:
1 parent
249fc778a2
commit
031874cebf
75 files changed
+4808
-589
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user