Fix: Remove system message display from file upload functionality

This commit is contained in:
Russell Ballestrini 2025-07-01 10:27:52 -04:00
parent b9d52dc727
commit f13fc85d21

View file

@ -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 = `<strong>System:</strong> ${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');