mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-24 10:33:37 +00:00
70 lines
5.1 KiB
Plaintext
70 lines
5.1 KiB
Plaintext
@inherits MSGComponentBase
|
|
|
|
@if (this.availableWorkspaces.Count > 0)
|
|
{
|
|
<MudSelect T="string" Value="@this.WorkspaceName" ValueChanged="@this.SelectExistingWorkspace" Strict="@false" Label="@T("Existing workspace (Optional)")" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-3 rounded-lg" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Folder">
|
|
@foreach (var workspace in this.availableWorkspaces)
|
|
{
|
|
<MudSelectItem T="string" Value="@workspace.Name">@workspace.Name</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
}
|
|
|
|
<MudTextField T="string" Text="@this.WorkspaceName" TextChanged="@this.SetWorkspaceName" AdornmentIcon="@(this.OpensTemporaryChat ? Icons.Material.Filled.Timer : Icons.Material.Filled.CreateNewFolder)" Adornment="Adornment.Start" IconSize="Size.Small" Label="@T("Workspace name (Optional)")" HelperText="@T("Choose an existing workspace or enter a name that should be created when the launcher is opened.")" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-1" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
|
|
|
@* The tile behaves differently with and without a workspace, so the form says which of the two is
|
|
chosen right now instead of only explaining that both are possible. *@
|
|
<MudText Typo="Typo.body2" Class="mud-text-secondary mb-3">
|
|
@(this.OpensTemporaryChat
|
|
? T("Without a workspace, the tile opens a disappearing chat: it belongs to no workspace and is deleted according to your workspace maintenance settings.")
|
|
: T("The tile opens its chat in this workspace and creates the workspace when it does not exist yet."))
|
|
</MudText>
|
|
<MudSelect T="string" Value="@this.ProviderId" ValueChanged="@this.SetProviderId" Label="@T("Chat provider")" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-3 rounded-lg" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.SmartToy">
|
|
<MudSelectItem T="string" Value="@string.Empty">@T("Use chat default")</MudSelectItem>
|
|
@foreach (var provider in this.SettingsManager.GetConfidentProviders(Components.CHAT))
|
|
{
|
|
<MudSelectItem T="string" Value="@provider.Id">
|
|
<ProviderLabel ProviderSettings="@provider" Text="@provider.InstanceName"/>
|
|
</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
<MudSelect T="string" Value="@this.ProfileId" ValueChanged="@this.SetProfileId" Label="@T("Chat profile")" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-3 rounded-lg" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Person">
|
|
<MudSelectItem T="string" Value="@string.Empty">@T("Use chat default")</MudSelectItem>
|
|
<MudSelectItem T="string" Value="@Guid.Empty.ToString()">@T("Use no profile")</MudSelectItem>
|
|
@foreach (var profile in this.SettingsManager.ConfigurationData.Profiles)
|
|
{
|
|
<MudSelectItem T="string" Value="@profile.Id">@profile.GetSafeName()</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
<MudSelect T="string" Value="@this.ChatTemplateId" ValueChanged="@this.SetChatTemplateId" Label="@T("Chat template")" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-3 rounded-lg" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Article">
|
|
<MudSelectItem T="string" Value="@string.Empty">@T("Use chat default")</MudSelectItem>
|
|
<MudSelectItem T="string" Value="@Guid.Empty.ToString()">@T("Use no chat template")</MudSelectItem>
|
|
@foreach (var chatTemplate in this.SettingsManager.ConfigurationData.ChatTemplates)
|
|
{
|
|
<MudSelectItem T="string" Value="@chatTemplate.Id">@chatTemplate.GetSafeName()</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
<MudSelect T="string" Label="@T("Data sources (Optional)")" MultiSelection="@true" SelectedValues="@this.DataSourceIds" SelectedValuesChanged="@this.SetDataSourceIds" MultiSelectionTextFunc="@this.GetSelectedDataSourceText" Variant="Variant.Outlined" Margin="Margin.Dense" Class="mb-3 rounded-lg" Adornment="Adornment.Start" AdornmentIcon="@AppIcons.DATABASE">
|
|
@foreach (var dataSource in this.SettingsManager.ConfigurationData.DataSources)
|
|
{
|
|
<MudSelectItem T="string" Value="@dataSource.Id">@dataSource.Name</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
|
|
@* A chat template wins over what is chosen here, so the form says so before somebody picks
|
|
something which would never take effect: *@
|
|
@if (this.SelectedChatTemplate.DataSourceOptions is not null)
|
|
{
|
|
<MudText Typo="Typo.body2" Class="mud-text-secondary mb-3">
|
|
@T("The chosen chat template brings data sources of its own, and those win over a selection made here. Only a template can also leave the choice of sources to the AI, which is why it decides this on its own.")
|
|
</MudText>
|
|
}
|
|
|
|
<ToolSelectionField Component="Components.CHAT" SelectedToolIds="@this.ToolIds" SelectedToolIdsChanged="@this.SetToolIds" Label="@T("Tools (Optional)")" Help="@T("These tools are preselected when the chat opens. Users can change the selection in the chat, and every tool has to meet the confidence requirements of the provider in use.")"/>
|
|
|
|
@if (this.SelectedChatTemplate.ToolIds is not null)
|
|
{
|
|
<MudText Typo="Typo.body2" Class="mud-text-secondary">
|
|
@T("The chosen chat template brings tools of its own, and those win over a selection made here.")
|
|
</MudText>
|
|
} |