From f13fc85d2129d6f7581c50f78ff0c1cf34732c56 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Tue, 1 Jul 2025 10:27:52 -0400 Subject: [PATCH] Fix: Remove system message display from file upload functionality --- src/file-upload.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/file-upload.js b/src/file-upload.js index 628ee5e..7da1b02 100644 --- a/src/file-upload.js +++ b/src/file-upload.js @@ -83,18 +83,8 @@ export async function integrateMegafarceResponse(response) { // Add a system message with the uploaded content to provide context chatHistory.push({ role: "system", content: `Uploaded Context: ${content}` }); - // Display the uploaded content in the chat box - const chatBox = document.getElementById('chat-box'); - const systemMessage = document.createElement('p'); - systemMessage.innerHTML = `System: ${marked.parse(content)}`; - - // Apply syntax highlighting to any code blocks - systemMessage.querySelectorAll('pre code').forEach((block) => { - hljs.highlightElement(block); - }); - - chatBox.appendChild(systemMessage); - chatBox.scrollTop = chatBox.scrollHeight; + // Note: System message is added to chat history for context but not displayed to user + // The uploaded content context is available to the AI without showing it in the chat // Add Generate TTS button for the uploaded content const generateTTSButton = document.createElement('button');