mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:07:21 +00:00
Upgraded to .NET 10 (#1147)
This commit is contained in:
1 parent
faae2951f7
commit
fc7399e81b
327 files changed
+3059
-3049
No files matched your search
@@ -22,11 +22,11 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
var toolChoice = ChatTemplate.ChooseToolIds(NewTemplate(), null);
|
||||
var optionsChoice = ChatTemplate.ChooseDataSourceOptions(NewTemplate(), null);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(toolChoice, Is.EqualTo(ChatTemplateToolChoice.NONE), "Nobody named any tool, so the chat has to keep using the tools of its own default.");
|
||||
Assert.That(optionsChoice, Is.EqualTo(ChatTemplateDataSourceChoice.NONE), "Nobody named any data source, so the chat has to keep using its own default options.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -38,13 +38,13 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
var toolChoice = ChatTemplate.ChooseToolIds(template, new[] { "web_search" });
|
||||
var optionsChoice = ChatTemplate.ChooseDataSourceOptions(template, launcherOptions);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(toolChoice.ToolIds, Is.EquivalentTo(new[] { "web_search" }));
|
||||
Assert.That(toolChoice.LauncherChoiceDropped, Is.False, "Nothing was dropped here, so nothing may be reported as dropped either.");
|
||||
Assert.That(optionsChoice.Options, Is.SameAs(launcherOptions));
|
||||
Assert.That(optionsChoice.LauncherChoiceDropped, Is.False);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -59,13 +59,13 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
var toolChoice = ChatTemplate.ChooseToolIds(template, null);
|
||||
var optionsChoice = ChatTemplate.ChooseDataSourceOptions(template, null);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(toolChoice.ToolIds, Is.EquivalentTo(new[] { "read_web_page" }));
|
||||
Assert.That(toolChoice.LauncherChoiceDropped, Is.False);
|
||||
Assert.That(optionsChoice.Options!.PreselectedDataSourceIds, Is.EqualTo(new[] { "22222222-2222-2222-2222-222222222222" }));
|
||||
Assert.That(optionsChoice.LauncherChoiceDropped, Is.False);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -80,13 +80,13 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
var toolChoice = ChatTemplate.ChooseToolIds(template, new[] { "web_search" });
|
||||
var optionsChoice = ChatTemplate.ChooseDataSourceOptions(template, NewLauncherOptions("11111111-1111-1111-1111-111111111111"));
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(toolChoice.ToolIds, Is.EquivalentTo(new[] { "read_web_page" }));
|
||||
Assert.That(toolChoice.LauncherChoiceDropped, Is.True, "The tools of the launcher are gone, and only this flag can make the log say so.");
|
||||
Assert.That(optionsChoice.Options!.PreselectedDataSourceIds, Is.EqualTo(new[] { "22222222-2222-2222-2222-222222222222" }));
|
||||
Assert.That(optionsChoice.LauncherChoiceDropped, Is.True);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -96,11 +96,11 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
|
||||
var toolChoice = ChatTemplate.ChooseToolIds(template, new[] { "web_search" });
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(toolChoice.ToolIds, Is.Empty, "An empty selection is the statement that this template wants no tools, which is as much of a statement as naming one.");
|
||||
Assert.That(toolChoice.LauncherChoiceDropped, Is.True);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -113,12 +113,12 @@ public sealed class ChatTemplatePrecedenceTests
|
||||
|
||||
var optionsChoice = ChatTemplate.ChooseDataSourceOptions(template, NewLauncherOptions("11111111-1111-1111-1111-111111111111"));
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(optionsChoice.Options!.AutomaticDataSourceSelection, Is.True, "Letting an agent pick the sources is the one thing a launcher cannot express, so it is exactly what must not be overwritten by one.");
|
||||
Assert.That(optionsChoice.Options.PreselectedDataSourceIds, Is.Empty);
|
||||
Assert.That(optionsChoice.LauncherChoiceDropped, Is.True);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in new issue
Block a user