Added profile, provider, and workspace preselection to chat templates (#1099)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Peer HogeterpandThorsten Sommer authored and GitHub committed 2026-10-22 14:15:10 +02:00
1 parent ab9df99cf0
commit 24c4c31035
34 files changed
+2084 -142

No files matched your search

@@ -148,6 +148,20 @@ public static class ConfigurationSnippetImport
if (missingChatToolIds.Count > 0)
hints.Add(string.Format(TB("The chat template preselects tools which are not available on this computer: {0}."), string.Join(", ", missingChatToolIds)));
if (template.ProviderId is not null)
{
var templateProvider = settingsManager.GetProviderById(template.ProviderId);
if (templateProvider == Settings.Provider.NONE)
hints.Add(string.Format(TB("The chat template preselects a provider which does not exist on this computer: {0}. Chats started with it use your usual provider instead."), template.ProviderId));
else if (settingsManager.GetChatTemplateProvider(template.ProviderId) == Settings.Provider.NONE)
hints.Add(string.Format(TB("The chat template preselects the provider '{0}', which does not meet the confidence level required for chats. Chats started with it use your usual provider instead."), templateProvider.InstanceName));
}
if (template.ProfileId is not null && !template.AllowProfileUsage)
hints.Add(TB("The chat template preselects a profile but does not allow profiles. Chats started with it ignore that profile."));
else if (template.ProfileId is not null && !template.StartsWithoutProfile() && settingsManager.GetProfileById(template.ProfileId) == Profile.NO_PROFILE)
hints.Add(string.Format(TB("The chat template preselects a profile which does not exist on this computer: {0}. Chats started with it use your usual profile instead."), template.ProfileId));
return result with { ConfigurationObject = template with { ToolIds = templateToolIds }, Hints = hints };
case DataDocumentAnalysisPolicy policy: