Repository navigation
Added profile, provider, and workspace preselection to chat templates - #1099
Merged
SommerEngineering merged 25 commits intoOct 22, 2026
Conversation
Chat templates gain the optional fields ProfileId and ProviderId. Null keeps saying nothing, so chats keep their usual profile and provider; the empty GUID as ProfileId states that chats start without a profile. Configuration plugins read both fields from CONFIG[CHAT_TEMPLATES], and an entry which is no usable GUID is dropped with a warning. The export writes them, with a note that the IDs stem from this machine, and the snippet import names a provider or profile which does not exist here. Nothing uses the fields yet; starting chats with them follows separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chat now starts with the profile and provider its chat template preselects: the first chat of the page, every new chat, and a change of the template before the first message. The provider of the template wins over the setting for the provider of added chats. Either stays changeable in the chat. What cannot be used is left out, and the chat starts as if the template said nothing: a profile or provider which is gone, a provider below the confidence level of chats, and a profile of a template which forbids profiles. SettingsManager decides this in one place for the chat and for assistant chat launchers. For launchers, the template wins over the profile and provider of the launcher, the same rule as for tools and data sources, and the dropped choice is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chat template dialog gains a switch and a selection for the profile and one for the provider, in the style of the tools and data sources. The profile offers "use no profile" as well and only appears while the template allows profiles; the provider list holds the providers which may be used for chats. A warning names a preselected profile or provider which is gone or may not be used, for example in a template from a configuration plugin. The form of assistant chat launchers now says when the chosen chat template brings a provider or profile of its own, which wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The example configuration plugin shows a chat template which preselects a provider and a profile, the Enterprise IT documentation explains what each field means and how missing targets behave, and the README of the assistant plugins states that a template wins over the launcher for both. The changelog tells users and IT departments about the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chat templates gain the optional field WorkspaceName. It names the workspace by name rather than by ID, because a workspace has an ID of its own on every computer; like for assistant chat launchers, the workspace is created when it does not exist yet. Configuration plugins read the field from CONFIG["CHAT_TEMPLATES"], an empty or non-text value is dropped with a warning, and the export and the snippet import carry it. SettingsManager returns no workspace while workspaces are switched off. Nothing uses the field yet; starting chats in it follows separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chat whose chat template names a workspace now starts in it, wherever it would belong to no workspace otherwise: the first chat of the page, a new disappearing chat, and a change of the template before the first message. The workspace is created when it does not exist yet. Like every new chat in a workspace, the chat reaches the disk only once there is something to keep. A workspace chosen on purpose wins: the one of the workspace list, the open one for the button that starts a new chat in it, and the one an assistant chat launcher names. A launcher that opens a disappearing chat takes the workspace of its template instead. A workspace which cannot be opened or created does not stop the chat; it starts without a workspace, as it would without the template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chat template dialog gains a switch and a workspace name for the chats of the template, with the existing workspaces to pick from, like in the form of assistant chat launchers. A note says when workspaces are switched off and the name therefore has no effect for now. The form of assistant chat launchers now says when a launcher without a workspace opens its chat in the workspace of the chosen chat template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The example configuration plugin, the Enterprise IT documentation, and the README of the assistant plugins explain WorkspaceName: by name, created on demand, only where a chat would otherwise be a disappearing chat, and a launcher's own workspace wins. The changelog tells users and IT departments about it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the profile a chat template preselects no longer exists, a new chat kept whatever profile it had before, for example the one of the previous chat. It now starts with the default profile of the chat settings, which may be none, as the requirement for missing targets says. A template which says nothing about profiles still keeps the current profile, and assistant chat launchers are unchanged: there, the launcher's own choice decides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The localization run adds the texts of the profile, provider, and workspace preselection of chat templates. The German translations were reviewed afterward and aligned with the established wording, such as "Chat-Vorlage", "selbstlöschender Chat", and "vorab auswählen". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peerschuett
marked this pull request as draft
October 21, 2026 14:06
A chat on the chat page got a thread in the workspace of its chat template as soon as the page opened or the template was picked. That created the workspace without a single message, brought back one the user had deleted, and kept the chat in the workspace of the previous template when the user switched to another one. The workspace is now resolved when the chat gets something to keep: its first message, a media import, or a draft kept when the page is left. A chat which sits in the workspace of its template no longer stays there when the user picks another template. Switching from a template which preselects a profile or a provider to one which says nothing kept that choice, although nobody made it for the new chat. SettingsManager now decides this with ChooseChatTemplateProfile and ChooseChatTemplateProvider: the choice of the previous template falls back to the chat defaults, while one the user made by hand stays. Smaller fixes from the review: - The import hints name a provider below the confidence level of chats and a profile of a template which forbids profiles. - DirectChatService logs a failed template workspace once instead of twice, and its provider and profile decisions are tested. - The example in plugin.lua no longer uses the zero GUID, which means "no profile" and is rejected as a provider ID. - .gitignore covers pdfium.dll, the name of the library on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While workspaces are switched off, no chat goes into a workspace, so a workspace chosen in the chat template dialog took effect for no chat, and those chats did not move there later either. The dialog only showed a small hint below the field. The workspace switch and fields are now locked while workspaces are off, and a warning above them says what happens instead. A workspace the template already names stays as it is and applies again once workspaces are back.
Without the RAG preview, the chat uses no data sources. The form of assistant chat launchers still offered data sources and the note about those of the chat template, and a launch still checked the sources of the launcher or its template: one which was gone or not permitted stopped the launch, although the chat would not have used it. The form now hides both while RAG is off, and the launch skips the check. The options travel into the chat unchanged and count again once RAG is switched on, just like the data sources a chat template keeps.
Added new texts and localized them.
peerschuett
marked this pull request as ready for review
October 22, 2026 08:41
… sharing one component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Chat templates could already preselect tools and data sources. They couldn't choose the provider (and so the model), the profile, or where their chats are kept. So users had to switch these by hand for every chat, for example to pick a provider whose confidence level a mailbox data source needs. This PR lets a chat template preselect all three.
Changes
ProviderId,ProfileIdandWorkspaceNameonChatTemplate. They are preselections, not locks: users can still change provider and profile in the chat and move the chat to another workspace.AllowProfileUsageis false.ChatComponent,DirectChatService): chats apply the template's selections. Switching to a template without them no longer carries over the previous template's provider or profile. Launchers drop their data sources while RAG is off.pdfium.dlladded to.gitignoreRelated proposal or issue
Internal issue
How did you test it?
dotnet run verifyRequired statements
Credits (optional)