Document how chat templates carry tools and data sources

This commit is contained in:
Thorsten Sommer committed 2026-09-22 13:21:20 +02:00
1 parent 6321e59ef6
commit a0c2c652ad
3 files changed
+30 -2

No files matched your search

@@ -147,10 +147,13 @@ ASSISTANT = {
- `OPEN_TEMPORARY_CHAT` must not carry a `WorkspaceName`. A name next to it stops the plugin from loading rather than being ignored, so a leftover or mistyped name cannot silently turn a workspace launcher into a disappearing one.
- Omitted optional IDs use the chat defaults active when the tile is opened. An explicit empty GUID selects no profile or no chat template; an empty provider or data-source GUID is invalid.
- `ProviderId` overrides both the chat-specific and app-wide default provider. It must name a provider that is permitted for chats at the required confidence level.
- Explicit data sources are enabled and manually preselected, automatic source selection is disabled, and the normal automatic-validation setting is retained. Every referenced source must currently be available and permitted for the effective provider.
- Explicit data sources are enabled and manually preselected, automatic source selection is disabled, and the normal automatic-validation setting is retained. Every referenced source must currently be available and permitted for the effective provider. This describes a launcher whose chat template brings no data source options of its own; see the rule below for the case where it does.
- Invalid or unavailable references stop the launch with an error before a workspace or chat is created.
- A selected chat template supplies the chat system prompt, profile allowance, predefined user prompt, attachments, and cloned example conversation. A launcher `SystemPrompt`, if retained in an older plugin, is ignored, so there is never a second competing system prompt.
- When the selected chat template does not allow profiles, the template wins: the launcher `ProfileId` is dropped and the chat starts without a profile. This matches the disabled profile selection such a template produces in the chat.
- A chat template may preselect tools and data sources as well. When it does, it decides them alone: the launcher `ToolIds` and `DataSourceIds` are dropped, and AI Studio writes a warning into the log naming both sides. The rule is the same for tools and for data sources, so there is only one to remember.
- The reason the template wins as a whole rather than field by field is a difference in what the two can express. A launcher can only ever say "these sources, picked by hand", while a chat template carries the whole data source options and can also say "let an agent pick the sources for each message". A mix of both would be something neither of them asked for.
- The data sources of a chat template are checked exactly like the ones of a launcher: a source which no longer exists, or which is not permitted for the effective provider, stops the launch before a workspace or chat is created. The message then names the chat template as the cause, not the launcher. A template which leaves the choice to an agent names no source and is therefore not checked here; that decision is made per message in the chat.
- The predefined user prompt and the attachments of the selected chat template are placed into the chat input, unless the user already has an unsent draft there.
### Editing a launcher in AI Studio
@@ -454,12 +454,18 @@ ASSISTANT = {
["ProviderId"] = "<optional provider GUID; omit to use the chat default>",
["ProfileId"] = "<optional profile GUID; use the empty GUID for no profile>",
["ChatTemplateId"] = "<optional chat template GUID; use the empty GUID for no template>",
-- Optional: the data sources the chat starts with. A chat template chosen above may bring
-- data source options of its own. It then decides them alone, the IDs named here are dropped,
-- and AI Studio writes a warning into the log. Only a chat template can also say that the AI
-- picks the sources for each message, which is why it wins as a whole instead of field by
-- field.
["DataSourceIds"] = {
"<optional data source GUID>",
},
-- Optional: the tools preselected when the chat opens. Users may change the selection
-- in the chat afterwards, and every tool has to meet the confidence requirements of the
-- provider in use. A tool ID unknown to the installation is ignored.
-- provider in use. A tool ID unknown to the installation is ignored. The same rule as for the
-- data sources applies here: a chat template which names tools of its own wins over this list.
-- Tool IDs include: web_search, read_web_page
["ToolIds"] = {
"<optional tool ID>",