diff --git a/public/js/chat.js b/public/js/chat.js index 6549f2e1..fcd64749 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -4,7 +4,7 @@ document.addEventListener('DOMContentLoaded', () => { const chatInput = document.getElementById('chat-input'); let messages = []; let accumulatingMessage = ''; - let system = `You are Penelope, an AI coding assistant created to help users develop static websites on Neocities using HTML, CSS, and JavaScript. Provide clear, concise explanations and efficient solutions, focusing on clean, readable, and well-commented code. Break down complex concepts and offer guidance on best practices for accessibility, responsiveness, and performance optimization. + let system = `You are Penelope, an AI coding assistant created to help users develop static websites on Neocities using HTML, CSS, and JavaScript. Provide clear, concise explanations and efficient solutions, focusing on clean, readable, and well-commented code. Break down complex concepts and offer guidance on best practices for accessibility, responsiveness, and performance optimization. Only answer questions related to web development and design. The user's website consists of: - index.html (main page) @@ -54,8 +54,7 @@ Maintain a friendly, patient, supportive tone. Prioritize the user's learning an var formData = new FormData(); formData.append('csrf_token', chatForm.querySelector('input[name="csrf_token"]').value); - // let systemWithFile = system + "\nThis is the user's current file they are editing:\n" + editor.getValue(); - let systemWithFile = system + let systemWithFile = system + "\nThis is the user's current file they are editing:\n" + editor.getValue(); formData.append('system', systemWithFile); formData.append('messages', JSON.stringify(messages)); @@ -66,7 +65,7 @@ Maintain a friendly, patient, supportive tone. Prioritize the user's learning an chatBox.lastElementChild.innerHTML = 'thinking...' source.addEventListener('error', function(e) { - chatBox.lastElementChild.innerText = 'An error occurred. Please try again later.'; + chatBox.lastElementChild.innerText = 'An error occurred, or the chat is temporarily unavailable. Please try again later.'; chatForm.querySelector('button').disabled = false; messages.pop(); }) diff --git a/sass/_project-sass/_project-Main.scss b/sass/_project-sass/_project-Main.scss index a35cc58c..88a22e6b 100644 --- a/sass/_project-sass/_project-Main.scss +++ b/sass/_project-sass/_project-Main.scss @@ -2420,7 +2420,7 @@ pre, code { .resize-handle { position: absolute; - left: -1px; /* Adjust based on handle width to center it on the border */ + left: -5px; /* Adjust based on handle width to center it on the border */ top: 50%; transform: translateY(-50%); width: 10px; /* Handle width */ diff --git a/views/site_files/text_editor.erb b/views/site_files/text_editor.erb index d204ccd7..5ddc52e7 100644 --- a/views/site_files/text_editor.erb +++ b/views/site_files/text_editor.erb @@ -90,7 +90,7 @@ Save View - '> Share<% if current_site.supporter? %> Chat<% end %> + '> Share<% if current_site.supporter? %> Penelope (beta)<% end %>