Fix: Remove system message display from file upload functionality
This commit is contained in:
parent
b9d52dc727
commit
f13fc85d21
1 changed files with 2 additions and 12 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue