From 58e97fd9a8c85c7e4df75aed17d914498680c190 Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Tue, 29 Oct 2024 16:25:30 -0400
Subject: no compile errors but probably 100 logical ones

---
 .../nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx      | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx')

diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx
index 890bc6f73..d47ae802c 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu/TemplateManager.tsx
@@ -17,6 +17,18 @@ export class TemplateManager {
         return initializedTemplates;
     }
 
+    /**
+     * Provides a text summary of content currently filled into a template, formatted for GPT analysis.
+     * @param template the template to be summarized
+     */
+    getContentSummary = (template: Template) => {
+        let summary: string = '';
+        template.contentFields.forEach(field => {
+            summary += `--- Field #${field.getID} (title: ${field.getTitle()}): ${field.getContent() ?? ''} ---`;
+        });
+        return summary;
+    }
+
     getValidTemplates = (cols: Col[]): Template[] => {
         return this.templates.filter(template => template.isValidTemplate(cols));
     }
-- 
cgit v1.2.3-70-g09d2

