From 45a9f5789fa6eaacca9a39cb96cc2a8e3ebe649c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 14 Mar 2025 12:20:41 -0400
Subject: simplified anchorMenu to just have an AskAI button .. then updated
 GPtPopup's summaryBox to have a flashcard option.

---
 src/client/views/StyleProviderQuiz.tsx | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

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

diff --git a/src/client/views/StyleProviderQuiz.tsx b/src/client/views/StyleProviderQuiz.tsx
index acda38dd7..f9ee8d3db 100644
--- a/src/client/views/StyleProviderQuiz.tsx
+++ b/src/client/views/StyleProviderQuiz.tsx
@@ -9,7 +9,7 @@ import { DocData } from '../../fields/DocSymbols';
 import { List } from '../../fields/List';
 import { NumCast, StrCast } from '../../fields/Types';
 import { Networking } from '../Network';
-import { GPTCallType, gptAPICall, gptImageLabel } from '../apis/gpt/GPT';
+import { GPTCallType, gptAPICall } from '../apis/gpt/GPT';
 import { Docs } from '../documents/Documents';
 import { ContextMenu } from './ContextMenu';
 import { ContextMenuProps } from './ContextMenuItem';
@@ -110,20 +110,21 @@ export namespace styleProviderQuiz {
         const blob = await ImageUtility.canvasToBlob(canvas);
         return selectUrlToBase64(blob);
     }
-    /**
-     * Create flashcards from an image.
-     */
-    async function makeFlashcardsForImage(img: ImageBox) {
-        img.Loading = true;
-        try {
-            const hrefBase64 = await createCanvas(img);
-            const response = await gptImageLabel(hrefBase64, 'Make flashcards out of this image with each question and answer labeled as "question" and "answer". Do not label each flashcard and do not include asterisks: ');
-            AnchorMenu.Instance.transferToFlashcard(response, NumCast(img.layoutDoc.x), NumCast(img.layoutDoc.y));
-        } catch (error) {
-            console.log('Error', error);
-        }
-        img.Loading = false;
-    }
+
+    // /**
+    //  * Create flashcards from an image.
+    //  */
+    // async function makeFlashcardsForImage(img: ImageBox) {
+    //     img.Loading = true;
+    //     try {
+    //         const hrefBase64 = await createCanvas(img);
+    //         const response = await gptImageLabel(hrefBase64, 'Make flashcards out of this image with each question and answer labeled as "question" and "answer". Do not label each flashcard and do not include asterisks: ');
+    //         AnchorMenu.Instance.transferToFlashcard(response, NumCast(img.layoutDoc.x), NumCast(img.layoutDoc.y));
+    //     } catch (error) {
+    //         console.log('Error', error);
+    //     }
+    //     img.Loading = false;
+    // }
 
     /**
      * Calls the createCanvas and pushInfo methods to convert the
-- 
cgit v1.2.3-70-g09d2

