mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-14 13:08:27 +00:00
Send to chat (#77)
This commit is contained in:
1 parent
8aeeda5dca
commit
f8e06faea5
26 files changed
+384
-121
No files matched your search
@@ -32,20 +32,36 @@ public partial class AssistantIconFinder : AssistantBaseCore
|
||||
[
|
||||
new SendToButton
|
||||
{
|
||||
Self = SendToAssistant.ICON_FINDER_ASSISTANT,
|
||||
Self = SendTo.ICON_FINDER_ASSISTANT,
|
||||
},
|
||||
];
|
||||
|
||||
#region Overrides of ComponentBase
|
||||
protected override void ResetFrom()
|
||||
{
|
||||
this.inputContext = string.Empty;
|
||||
if (!this.MightPreselectValues())
|
||||
{
|
||||
this.selectedIconSource = IconSources.GENERIC;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
protected override bool MightPreselectValues()
|
||||
{
|
||||
if (this.SettingsManager.ConfigurationData.IconFinder.PreselectOptions)
|
||||
{
|
||||
this.selectedIconSource = this.SettingsManager.ConfigurationData.IconFinder.PreselectedSource;
|
||||
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.IconFinder.PreselectedProvider);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Overrides of ComponentBase
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.MightPreselectValues();
|
||||
var deferredContent = MessageBus.INSTANCE.CheckDeferredMessages<string>(Event.SEND_TO_ICON_FINDER_ASSISTANT).FirstOrDefault();
|
||||
if (deferredContent is not null)
|
||||
this.inputContext = deferredContent;
|
||||
|
||||
Reference in new issue
Block a user