ue-mcp 1.3.8-beta.8 → 1.3.8-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,6 @@
33
33
  },
34
34
  "nativeToolsets": 0,
35
35
  "nativeToolActions": 0,
36
- "generatedAt": "2026-09-09T18:22:43.944Z",
37
- "version": "1.3.8-beta.8"
36
+ "generatedAt": "2026-09-09T20:02:10.507Z",
37
+ "version": "1.3.8-beta.9"
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ue-mcp",
3
- "version": "1.3.8-beta.8",
3
+ "version": "1.3.8-beta.9",
4
4
  "description": "Unreal Engine MCP server - 26 tools, 1930+ actions for AI-driven editor control",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -599,6 +599,65 @@ TSharedPtr<FJsonValue> FDialogHandlers::GetDialogPolicy(const TSharedPtr<FJsonOb
599
599
  return MCPResult(Result);
600
600
  }
601
601
 
602
+ // A NAMED namespace: this module is a unity build, so an anonymous one here
603
+ // would merge with whatever other .cpp shares the blob.
604
+ namespace MCPDialogWindows
605
+ {
606
+ /**
607
+ * Every window the editor is holding the user with, gathered recursively.
608
+ *
609
+ * A REGULAR window that is either on the modal stack or parented to another
610
+ * window is something the editor put up and is waiting on. Menus, tooltips
611
+ * and notifications are not regular windows, so they are not mistaken for
612
+ * questions.
613
+ *
614
+ * Visibility is deliberately NOT consulted. A window that is up but undrawn,
615
+ * or drawn behind the editor, still holds whatever raised it, and "the user
616
+ * cannot see it" is the worst possible reason to let a quit through.
617
+ */
618
+ static void Gather(const TArray<TSharedRef<SWindow>>& Roots, TArray<TSharedPtr<SWindow>>& Out)
619
+ {
620
+ for (const TSharedRef<SWindow>& Window : Roots)
621
+ {
622
+ const bool bBlocks = Window->IsRegularWindow()
623
+ && (Window->IsModalWindow() || Window->GetParentWindow().IsValid());
624
+ if (bBlocks)
625
+ {
626
+ Out.AddUnique(TSharedPtr<SWindow>(Window));
627
+ }
628
+ Gather(Window->GetChildWindows(), Out);
629
+ }
630
+ }
631
+
632
+ /**
633
+ * The window blocking the editor, by every route it can be blocked.
634
+ *
635
+ * GetActiveModalWindow leads, because a window on the modal stack is one
636
+ * Slate itself calls blocking. It is NOT the whole answer and never was: it
637
+ * reports only what was pushed with AddModalWindow, so a dialog raised any
638
+ * other way came back as no dialog at all. Every layer above then read that
639
+ * as "the screen is clear" and sent a quit at an editor sitting on a save
640
+ * prompt, while the same editor had the window on screen. One narrow
641
+ * detector was the whole system's eyes, and absence of evidence from it was
642
+ * being reported as evidence of absence.
643
+ */
644
+ static TSharedPtr<SWindow> FindBlocking()
645
+ {
646
+ if (!FSlateApplication::IsInitialized())
647
+ {
648
+ return nullptr;
649
+ }
650
+ FSlateApplication& Slate = FSlateApplication::Get();
651
+ TArray<TSharedPtr<SWindow>> Found;
652
+ if (TSharedPtr<SWindow> Modal = Slate.GetActiveModalWindow())
653
+ {
654
+ Found.AddUnique(Modal);
655
+ }
656
+ Gather(Slate.GetInteractiveTopLevelWindows(), Found);
657
+ return Found.Num() > 0 ? Found[0] : nullptr;
658
+ }
659
+ }
660
+
602
661
  TSharedPtr<SWindow> FDialogHandlers::CollectActiveModal(FString& OutTitle, FString& OutMessage, TArray<FModalButton>& OutButtons)
603
662
  {
604
663
  OutTitle.Empty();
@@ -610,7 +669,7 @@ TSharedPtr<SWindow> FDialogHandlers::CollectActiveModal(FString& OutTitle, FStri
610
669
  return nullptr;
611
670
  }
612
671
 
613
- TSharedPtr<SWindow> ActiveModal = FSlateApplication::Get().GetActiveModalWindow();
672
+ TSharedPtr<SWindow> ActiveModal = MCPDialogWindows::FindBlocking();
614
673
  if (!ActiveModal.IsValid())
615
674
  {
616
675
  return nullptr;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "FileVersion": 3,
3
3
  "Version": 1,
4
- "VersionName": "1.3.8-beta.8",
4
+ "VersionName": "1.3.8-beta.9",
5
5
  "FriendlyName": "UE MCP Bridge",
6
6
  "Description": "C++ WebSocket bridge for UE-MCP, providing 1869+ editor actions over the MCP protocol",
7
7
  "Category": "Developer Tools",