From 6913400a92d518989e831926567429c31703e4b4 Mon Sep 17 00:00:00 2001
From: Sophie Zhang <sophie_zhang@brown.edu>
Date: Fri, 18 Aug 2023 18:46:27 -0400
Subject: cleanup

---
 .../views/nodes/formattedText/FormattedTextBox.tsx   | 20 --------------------
 1 file changed, 20 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 2562c48e4..da277826a 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -907,7 +907,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
     animateRes = (resIndex: number, newText: string) => {
         if (resIndex < newText.length) {
             const marks = this._editorView?.state.storedMarks ?? [];
-            // if (!marks) return;
             this._editorView?.dispatch(this._editorView.state.tr.setStoredMarks(marks).insertText(newText[resIndex]).setStoredMarks(marks));
             setTimeout(() => {
                 this.animateRes(resIndex + 1, newText);
@@ -915,19 +914,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
         }
     };
 
-    // breakupdictiation for reference
-    // prepareForTyping
-    // stored marks - userMark and timestamp, setStoredMarks
-    // the._editorView.dispatch(state.tr.setSelection(updated).insertText('\n, to))
-
     askGPT = action(async () => {
-        // const state = this._editorView?.state;
-        // if (!state) return;
-        // const to = state.selection.to;
-        // const updated = TextSelection.create(state.doc, to, to);
-        // this._editorView?.dispatch(state.tr.setSelection(updated).insertText('\n', to));
-        // this._editorView?.dispatch(this._editorView.state.tr.setStoredMarks(marks).insertText('\nTesting').setStoredMarks(marks));
-        // console.log('After ', this._editorView?.state.storedMarks);
         try {
             let res = await gptAPICall((this.dataDoc.text as RichTextField)?.Text, GPTCallType.COMPLETION);
             if (!res) {
@@ -1243,13 +1230,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
                     RichTextMenu.Instance?.updateMenu(this._editorView, undefined, this.props);
                     setTimeout(this.autoLink, 20);
                 }
-                // // Accessing editor and text doc for gpt assisted text edits
-                // if (this._editorView && selected) {
-                //     console.log('Setting');
-                //     GPTPopup.Instance?.setTextAnchor(this.getAnchor(false));
-                //     // AnchorMenu.Instance?.setEditorView(this._editorView);
-                //     // AnchorMenu.Instance?.setTextDoc(this.dataDoc);
-                // }
             }),
             { fireImmediately: true }
         );
-- 
cgit v1.2.3-70-g09d2

