mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 16:58:00 +00:00
Give the profile and template dialogs their own drop zones
This commit is contained in:
6 files changed
+45
-8
No files matched your search
@@ -266,9 +266,21 @@ public partial class AttachDocuments : MSGComponentBase
|
||||
/// </summary>
|
||||
private void ClaimDefaultZoneRole()
|
||||
{
|
||||
if (!this.CatchAllDocuments || this.Scope is null)
|
||||
if (!this.CatchAllDocuments)
|
||||
return;
|
||||
|
||||
if (this.Scope is null)
|
||||
{
|
||||
//
|
||||
// There is nothing to claim: the surrounding page, assistant, or dialog is not a drop
|
||||
// area at all. The flag would then do nothing, and silently -- which is how a zone ends
|
||||
// up promising a behaviour it cannot deliver. So say it out loud: either the area needs
|
||||
// a DropZoneScope, or the flag does not belong here.
|
||||
//
|
||||
this.Logger.LogWarning("The attachment zone '{Name}' wants to be the default target of its area, but it does not live in a drop zone scope. Dropping next to this zone will do nothing.", this.Name);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isDefaultZone = this.Scope.TryBecomeDefaultZone(this);
|
||||
if (!this.isDefaultZone)
|
||||
this.Logger.LogDebug("The attachment zone '{Name}' asked to be the default target of its area, which another zone already is. It now takes only the drops aimed at itself.", this.Name);
|
||||
|
||||
Reference in new issue
Block a user