From 0e7ae057264445ece675e4b5d2380893ea124112 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 28 Feb 2025 15:40:51 -0500
Subject: fixed gptpopup disappearing in overlayView.  added creation of images
 based on selection image in gptpopup.

---
 src/client/views/OverlayView.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src/client/views/OverlayView.tsx')

diff --git a/src/client/views/OverlayView.tsx b/src/client/views/OverlayView.tsx
index 20931fc3d..6686a162e 100644
--- a/src/client/views/OverlayView.tsx
+++ b/src/client/views/OverlayView.tsx
@@ -19,6 +19,7 @@ import './OverlayView.scss';
 import { DefaultStyleProvider, returnEmptyDocViewList } from './StyleProvider';
 import { DocumentView, DocumentViewInternal } from './nodes/DocumentView';
 import { SnappingManager } from '../util/SnappingManager';
+import { GPTPopup } from './pdf/GPTPopup/GPTPopup';
 
 export type OverlayDisposer = () => void;
 
@@ -126,6 +127,16 @@ export class OverlayView extends ObservableReactComponent<object> {
         makeObservable(this);
         if (!OverlayView.Instance) {
             OverlayView.Instance = this;
+            this.addWindow(<GPTPopup />, {
+                x: 400,
+                y: 200,
+                width: 500,
+                height: 400,
+                title: 'GPT', //
+                backgroundColor: 'transparent',
+                isHidden: () => !SnappingManager.ChatVisible,
+                onClick: () => SnappingManager.SetChatVisible(false),
+            });
             new ResizeObserver(
                 action(entries => {
                     Array.from(entries).forEach(entry => {
-- 
cgit v1.2.3-70-g09d2

