Multiple Profiles can now be selected

This commit is contained in:
Peer Hogeterp committed 2026-09-07 16:09:00 +02:00
1 parent d043fbc8f0
commit cefc5464d5
89 files changed
+1360 -503

No files matched your search

+20 -1
View File
@@ -94,6 +94,25 @@ public record Profile(
{actions}
""";
}
public static string ToSystemPrompt(IReadOnlyList<Profile> profiles)
{
if (profiles.Count == 0)
return string.Empty;
var profileSections = profiles.Select((profile, index) =>
$"""
## Profile {index + 1}: {profile.Name}
{profile.ToSystemPrompt()}
""");
return $"""
The user selected the following profiles. Combine them as equally important context. If their instructions conflict, resolve the conflict as well as possible.
{string.Join("\n\n---\n\n", profileSections)}
""";
}
public static bool TryParseProfileTable(int idx, LuaTable table, Guid configPluginId, out ConfigurationBaseObject template)
{
@@ -151,4 +170,4 @@ public record Profile(
}
""";
}
}
}