mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-08 12:49:40 +00:00
Hardened background work against disconnected circuits (#937)
This commit is contained in:
1 parent
99089f853e
commit
f03c2d1c88
44 files changed
+500
-126
No files matched your search
@@ -132,12 +132,12 @@ public partial class ReadFileContent : MSGComponentBase
|
||||
private void OnMediaImportStateChanged(MediaImportOwner owner)
|
||||
{
|
||||
if (owner == this.EffectiveImportOwner)
|
||||
_ = this.InvokeAsync(async () =>
|
||||
this.InvokeAsync(async () =>
|
||||
{
|
||||
await this.SyncCompletedMediaTextAsync();
|
||||
await this.ConsumeStandaloneMediaOutcomeAsync();
|
||||
this.StateHasChanged();
|
||||
});
|
||||
}).Observe($"{nameof(ReadFileContent)}: syncing transcribed text");
|
||||
}
|
||||
|
||||
/// <summary>Consumes outcomes for dialog-local controls that have no assistant owner surface.</summary>
|
||||
@@ -195,7 +195,7 @@ public partial class ReadFileContent : MSGComponentBase
|
||||
// Release the drop area. Without this, drop areas below this one would count this component
|
||||
// forever and would stop catching dropped files:
|
||||
if (this.EnableDragDrop)
|
||||
_ = this.MessageBus.SendMessage(this, Event.UNREGISTER_FILE_DROP_AREA, this.Layer);
|
||||
this.MessageBus.SendMessage(this, Event.UNREGISTER_FILE_DROP_AREA, this.Layer).Observe($"{nameof(ReadFileContent)}: releasing the drop area");
|
||||
|
||||
base.DisposeResources();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user