From ad2f3695ddfb4a7bec17ddbdf6e7011862936bc4 Mon Sep 17 00:00:00 2001
From: Sophie Zhang <sophie_zhang@brown.edu>
Date: Fri, 18 Aug 2023 17:41:51 -0400
Subject: added gen_fill_children field

---
 .../views/nodes/formattedText/FormattedTextBox.tsx | 37 ----------------------
 1 file changed, 37 deletions(-)

(limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')

diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index fd30c43d7..daf8719eb 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -946,46 +946,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
         console.log('Generate image from text: ', (this.dataDoc.text as RichTextField)?.Text);
         GPTPopup.Instance?.setTextAnchor(this.getAnchor(false));
         GPTPopup.Instance?.setImgTargetDoc(this.rootDoc);
-        // GPTPopup.Instance.setImgUrls([]);
-        // GPTPopup.Instance.setMode(GPTPopupMode.IMAGE);
-        // GPTPopup.Instance.setVisible(true);
         GPTPopup.Instance.addToCollection = this.props.addDocument;
-        // GPTPopup.Instance.setLoading(true);
         GPTPopup.Instance.setImgDesc((this.dataDoc.text as RichTextField)?.Text);
         GPTPopup.Instance.generateImage();
-
-        // try {
-        //     // make this support multiple images
-        //     let image_urls = await gptImageCall((this.dataDoc.text as RichTextField)?.Text);
-        //     console.log(image_urls);
-        //     if (image_urls) {
-        //         const [result] = await Networking.PostToServer('/uploadRemoteImage', { sources: [image_urls[0]] });
-        //         const source = Utils.prepend(result.accessPaths.agnostic.client);
-        //         GPTPopup.Instance.setImgUrls([source]);
-
-        //         // const newDoc = Docs.Create.ImageDocument(source, {
-        //         //     x: NumCast(this.rootDoc.x) + NumCast(this.layoutDoc._width) + 10,
-        //         //     y: NumCast(this.rootDoc.y),
-        //         //     _height: 200,
-        //         //     _width: 200,
-        //         //     data_nativeWidth: result.nativeWidth,
-        //         //     data_nativeHeight: result.nativeHeight,
-        //         // });
-        //         // if (Doc.IsInMyOverlay(this.rootDoc)) {
-        //         //     newDoc.overlayX = this.rootDoc.x;
-        //         //     newDoc.overlayY = NumCast(this.rootDoc.y) + NumCast(this.rootDoc._height);
-        //         //     Doc.AddToMyOverlay(newDoc);
-        //         // } else {
-        //         //     this.props.addDocument?.(newDoc);
-        //         // }
-        //         // // Create link between prompt and image
-        //         // DocUtils.MakeLink(this.rootDoc, newDoc, { link_relationship: 'Image Prompt' });
-        //     }
-        // } catch (err) {
-        //     console.log(err);
-        //     return '';
-        // }
-        // GPTPopup.Instance.setLoading(false);
     };
 
     breakupDictation = () => {
-- 
cgit v1.2.3-70-g09d2

