mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 07:07:21 +00:00
Added a Send to menu to every chat message and kept restrictions when sending content on (#1124)
This commit is contained in:
1 parent
d06688ca08
commit
bf54b8cd0d
73 files changed
+1923
-390
No files matched your search
@@ -40,7 +40,8 @@ public partial class AssistantSWOTAnalysis
|
||||
if (token.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
// The research runs in a thread of its own, which has read nothing yet:
|
||||
// The research runs in a thread of its own, which has read nothing yet. A text sent to this
|
||||
// assistant may still demand more, and GetRunnableToolIds holds the research to that:
|
||||
var runnableToolIds = this.GetRunnableToolIds(OutboundDataRestriction.UNRESTRICTED);
|
||||
if (runnableToolIds.Count > 0)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Tools.AssistantLaunch;
|
||||
using AIStudio.Tools.AssistantSessions;
|
||||
using AIStudio.Tools.Security;
|
||||
using AIStudio.Tools.Services;
|
||||
@@ -160,16 +161,9 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore<SettingsDialogSWO
|
||||
state.Restore(SHARED_RESEARCH_CONTEXT_STATE_KEY, value => this.sharedResearchContext = value);
|
||||
}
|
||||
|
||||
#region Overrides of ComponentBase
|
||||
#region Overrides of AssistantBase
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var deferredContent = MessageBus.INSTANCE.TakeDeferredMessages<string>(Event.SEND_TO_SWOT_ANALYSIS_ASSISTANT).LastOrDefault();
|
||||
if (deferredContent is not null)
|
||||
this.inputText = deferredContent;
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
protected override void ApplyTextLaunchPayload(TextLaunchPayload payload) => this.inputText = payload.Text;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in new issue
Block a user