Let direct chat launchers open disappearing chats (#967)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-09-14 10:26:10 +02:00
1 parent 65a1683b95
commit 828541ce93
22 files changed
+212 -103

No files matched your search

@@ -23,7 +23,7 @@
</MudField>
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
@(this.createChatLauncher
? T("The direct chat launcher tile has no input form of its own. It opens a new chat right away, in the workspace you name below and with the provider, profile, chat template, and data sources you select there.")
? T("The direct chat launcher tile has no input form of its own. It opens a new chat right away, with the provider, profile, chat template, and data sources you select below. Name a workspace for that chat, or leave the workspace empty to open a disappearing chat.")
: T("The assistant asks users for input through a form and builds its own prompt from it."))
</MudJustifiedText>
@if (this.createChatLauncher)
@@ -39,8 +39,7 @@
@bind-ProfileId="@this.launcherProfileId"
@bind-ChatTemplateId="@this.launcherChatTemplateId"
@bind-DataSourceIds="@this.launcherDataSourceIds"
@bind-ToolIds="@this.launcherToolIds"
ValidateWorkspaceName="@this.ValidateLauncherWorkspaceName"/>
@bind-ToolIds="@this.launcherToolIds"/>
</MudPaper>
}
@@ -375,14 +375,6 @@ public partial class AssistantBuilder : AssistantBaseCore<NoSettingsPanel>
return null;
}
private string? ValidateLauncherWorkspaceName(string workspaceName)
{
if (this.createChatLauncher && string.IsNullOrWhiteSpace(workspaceName))
return T("Please select or enter a workspace name for the chat launcher.");
return null;
}
private async Task GenerateAssistantSpec()
{
await this.Form!.Validate();
@@ -589,7 +581,8 @@ public partial class AssistantBuilder : AssistantBaseCore<NoSettingsPanel>
// The description stays required for both kinds of assistant. Users who only want a tile
// usually flip the switch before typing anything, so the Builder offers a starting point they
// can edit or replace. The workspace is picked after that, hence the suggestion is refreshed
// whenever the workspace changes:
// whenever the workspace changes — including when it is cleared again, which turns the tile
// into one that opens a disappearing chat:
//
private void SuggestLauncherDescription()
{
@@ -597,8 +590,9 @@ public partial class AssistantBuilder : AssistantBaseCore<NoSettingsPanel>
return;
var suggestion = T("Create a tile that opens a preconfigured chat directly, without an input form of its own.");
if (!string.IsNullOrWhiteSpace(this.launcherWorkspaceName))
suggestion = $"{suggestion} {string.Format(T("Workspace: {0}"), this.launcherWorkspaceName.Trim())}";
suggestion = string.IsNullOrWhiteSpace(this.launcherWorkspaceName)
? $"{suggestion} {T("The chat opens as a disappearing chat, without a workspace.")}"
: $"{suggestion} {string.Format(T("Workspace: {0}"), this.launcherWorkspaceName.Trim())}";
this.assistantDescription = suggestion;
this.descriptionSuggestion = suggestion;
@@ -2,6 +2,10 @@ namespace AIStudio.Assistants.Builder;
internal sealed class AssistantBuilderChatLaunchMetadata
{
/// <summary>
/// The workspace the chat is created in. A model leaves this field out for a launcher that
/// opens a chat without a workspace, which is why it stays empty rather than null.
/// </summary>
public string WorkspaceName { get; init; } = string.Empty;
public string? ProviderId { get; init; }
public string? ProfileId { get; init; }
@@ -131,11 +131,9 @@
"chatLaunch": {
"type": "object",
"additionalProperties": false,
"required": [
"workspace_name"
],
"properties": {
"workspace_name": {
"description": "Omit this field for a launcher that opens a chat without a workspace.",
"type": "string",
"minLength": 1
},
@@ -124,7 +124,12 @@ internal sealed partial class LuaResponse
private static bool IsValidChatLaunchMetadata(AssistantBuilderChatLaunchMetadata? launch)
{
if (launch is null || string.IsNullOrWhiteSpace(launch.WorkspaceName))
//
// A missing workspace name describes a launcher that opens a chat without a workspace, so
// only the launch block itself is mandatory here. Whether the name matches the plugin the
// model wrote is decided later, by comparing both.
//
if (launch is null)
return false;
if (!IsOptionalGuid(launch.ProviderId, allowEmpty: false) ||