Assistant send result (#75)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-08-18 12:32:18 +02:00
1 parent ea0ead58f8
commit 909fbe89bb
36 files changed
+400 -63

No files matched your search

@@ -1,4 +1,4 @@
@page "/assistant/summarizer"
@attribute [Route(Path.ASSISTANT_SUMMARIZER)]
@using AIStudio.Tools
@inherits AssistantBaseCore
@@ -23,6 +23,14 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
a summary with the requested complexity. In any case, do not add any information.
""";
protected override IReadOnlyList<IButtonData> FooterButtons =>
[
new SendToButton
{
Self = SendToAssistant.TEXT_SUMMARIZER_ASSISTANT,
},
];
private string inputText = string.Empty;
private bool isAgentRunning;
private CommonLanguages selectedTargetLanguage;
@@ -43,6 +51,10 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
this.providerSettings = this.SettingsManager.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedProvider);
}
var deferredContent = MessageBus.INSTANCE.CheckDeferredMessages<string>(Event.SEND_TO_TEXT_SUMMARIZER_ASSISTANT).FirstOrDefault();
if (deferredContent is not null)
this.inputText = deferredContent;
await base.OnInitializedAsync();
}