mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 01:47:21 +00:00
Upgraded to MudBlazor 9 (#1137)
This commit is contained in:
1 parent
e0337a99bc
commit
aeba1fbccc
625 files changed
+408
-882
No files matched your search
@@ -60,10 +60,10 @@ public partial class DirectChatLauncherForm : MSGComponentBase
|
||||
/// The data sources the chat starts with. An empty selection keeps the normal chat defaults.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public IEnumerable<string> DataSourceIds { get; set; } = [];
|
||||
public IReadOnlyCollection<string> DataSourceIds { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<IEnumerable<string>> DataSourceIdsChanged { get; set; }
|
||||
public EventCallback<IReadOnlyCollection<string>> DataSourceIdsChanged { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The tools preselected for the chat. An empty selection keeps the normal chat defaults.
|
||||
@@ -102,29 +102,29 @@ public partial class DirectChatLauncherForm : MSGComponentBase
|
||||
await this.WorkspaceNameChanged.InvokeAsync(workspaceName);
|
||||
}
|
||||
|
||||
private async Task SetProviderId(string providerId)
|
||||
private async Task SetProviderId(string? providerId)
|
||||
{
|
||||
this.ProviderId = providerId;
|
||||
await this.ProviderIdChanged.InvokeAsync(providerId);
|
||||
this.ProviderId = providerId ?? string.Empty;
|
||||
await this.ProviderIdChanged.InvokeAsync(this.ProviderId);
|
||||
}
|
||||
|
||||
private async Task SetProfileId(string profileId)
|
||||
private async Task SetProfileId(string? profileId)
|
||||
{
|
||||
this.ProfileId = profileId;
|
||||
await this.ProfileIdChanged.InvokeAsync(profileId);
|
||||
this.ProfileId = profileId ?? string.Empty;
|
||||
await this.ProfileIdChanged.InvokeAsync(this.ProfileId);
|
||||
}
|
||||
|
||||
private async Task SetChatTemplateId(string chatTemplateId)
|
||||
private async Task SetChatTemplateId(string? chatTemplateId)
|
||||
{
|
||||
this.ChatTemplateId = chatTemplateId;
|
||||
await this.ChatTemplateIdChanged.InvokeAsync(chatTemplateId);
|
||||
this.ChatTemplateId = chatTemplateId ?? string.Empty;
|
||||
await this.ChatTemplateIdChanged.InvokeAsync(this.ChatTemplateId);
|
||||
}
|
||||
|
||||
//
|
||||
// MudSelect hands out its selection as a lazy sequence of nullable strings. We materialize it
|
||||
// once and drop empty entries, so the host always receives a stable list of usable IDs:
|
||||
// MudSelect hands out its selection as a collection of nullable strings. We copy it and drop
|
||||
// empty entries, so the host always receives a stable list of usable IDs:
|
||||
//
|
||||
private async Task SetDataSourceIds(IEnumerable<string?>? dataSourceIds)
|
||||
private async Task SetDataSourceIds(IReadOnlyCollection<string?>? dataSourceIds)
|
||||
{
|
||||
var selectedDataSourceIds = dataSourceIds is null ? [] : dataSourceIds.Where(id => !string.IsNullOrWhiteSpace(id)).Select(id => id!).ToArray();
|
||||
|
||||
@@ -138,7 +138,7 @@ public partial class DirectChatLauncherForm : MSGComponentBase
|
||||
await this.ToolIdsChanged.InvokeAsync(toolIds);
|
||||
}
|
||||
|
||||
private string GetSelectedDataSourceText(List<string?>? selectedValues)
|
||||
private string GetSelectedDataSourceText(IReadOnlyList<string?>? selectedValues)
|
||||
{
|
||||
if (selectedValues is null || selectedValues.Count == 0)
|
||||
return T("Use the normal chat data source defaults");
|
||||
|
||||
Reference in new issue
Block a user