diff --git a/frontend/src/components/Chatbot.css b/frontend/src/components/Chatbot.css index 869ef1d..7e27b9d 100644 --- a/frontend/src/components/Chatbot.css +++ b/frontend/src/components/Chatbot.css @@ -98,12 +98,12 @@ h1 { } #send-button:disabled, #query-button:disabled { - background-color: #808080; + background-color: #8386a8; cursor: not-allowed; } #send-button:disabled:hover, #query-button:disabled:hover { - background-color: #808080; /* Hover color for disabled state */ + background-color: #8386a8; /* Hover color for disabled state */ } #send-button:not(:disabled):hover, #query-button:not(:disabled):hover { diff --git a/frontend/src/interface.js b/frontend/src/interface.js index 6dee641..3c6fa2b 100644 --- a/frontend/src/interface.js +++ b/frontend/src/interface.js @@ -10,7 +10,7 @@ export async function downloadCodebase() { const apiURL = "https://syntaxsorcerer-backend.fly.dev"; const url = document.getElementById("codebase-url").value; - const response = await fetch(`${apiURL}/api/download`, { + const response = await fetch(`${local}/api/download`, { method: "POST", headers: { "Content-Type": "application/json", @@ -32,7 +32,7 @@ export async function deleteCodebase() { const local = "http://localhost:3000"; const apiURL = "https://syntaxsorcerer-backend.fly.dev"; - const response = await fetch(`${apiURL}/api/delete`, { + const response = await fetch(`${local}/api/delete`, { method: "POST", headers: { "Content-Type": "application/json", @@ -75,7 +75,7 @@ export async function sendFiles(files, userInput) { request = request.concat(files[i] + "\n"); } - request = request.concat(userInput); + request = request.concat('I have a question about this code (if what follows does not seem like a reasonable question, prompt me to enter my question again): ' + userInput); await fetchChatGPTResponse(request); } @@ -135,7 +135,7 @@ export async function fetchChatGPTResponse(userInput) { const apiURL = "https://syntaxsorcerer-backend.fly.dev"; const codebasePath = "../../codebases"; - const response = await fetch(`${apiURL}/api/chatgpt`, { + const response = await fetch(`${local}/api/chatgpt`, { method: "POST", headers: { "Content-Type": "application/json", @@ -157,7 +157,7 @@ export async function fetchPineconeResponse(userInput) { const local = "http://localhost:3000"; const apiURL = "https://syntaxsorcerer-backend.fly.dev"; - const response = await fetch(`${apiURL}/api/pinecone`, { + const response = await fetch(`${local}/api/pinecone`, { method: "POST", headers: { "Content-Type": "application/json",