Improved chat options by moving it to the chat interface (#473)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-05-21 20:23:44 +02:00
1 parent 206706f77a
commit 35eebc08a5
13 files changed
+288 -233

No files matched your search

@@ -1,8 +1,10 @@
using AIStudio.Chat;
using AIStudio.Components;
using AIStudio.Dialogs.Settings;
using AIStudio.Settings.DataModel;
using Microsoft.AspNetCore.Components;
using DialogOptions = AIStudio.Dialogs.DialogOptions;
using Timer = System.Timers.Timer;
@@ -15,6 +17,9 @@ public partial class Chat : MSGComponentBase
{
private const Placement TOOLBAR_TOOLTIP_PLACEMENT = Placement.Bottom;
[Inject]
private IDialogService DialogService { get; init; } = null!;
private ChatThread? chatThread;
private AIStudio.Settings.Provider providerSettings;
private bool workspaceOverlayVisible;
@@ -80,6 +85,13 @@ public partial class Chat : MSGComponentBase
this.StateHasChanged();
}
private async Task OpenSettingsDialog()
{
var dialogParameters = new DialogParameters();
await this.DialogService.ShowAsync<SettingsDialogChat>(T("Open Chat Options"), dialogParameters, DialogOptions.FULLSCREEN);
}
#region Overrides of MSGComponentBase
protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default