This commit is contained in:
elijah 2024-10-24 16:39:31 +02:00
parent de5b5c373a
commit 464a17008e

View File

@ -77,10 +77,10 @@ const createOverlay = (text) => {
loadSettings().then((settings) => {
overlay.style.cssText = `
position: absolute;
padding: 10px;
padding: 5px;
z-index: 2147483647;
color: rgba(0, 0, 0, ${settings.textOpacity / 100});
font-size: 14px;
font-size: 16px;
max-width: 600px;
white-space: pre-wrap;
pointer-events: none;
@ -104,6 +104,7 @@ const positionOverlay = () => {
const rect = range.getBoundingClientRect();
// Get scroll positions
// this is deprecated but currently the only way thank you mr mozilla
const scrollX = window.pageXOffset || document.documentElement.scrollLeft;
const scrollY = window.pageYOffset || document.documentElement.scrollTop;
@ -314,12 +315,8 @@ const modifyNearestInput = async () => {
}
try {
const oldPlaceholder = nearestInput.placeholder;
nearestInput.placeholder = "Processing...";
const llmResponse = await queryLLM(selectedText);
nearestInput.value = llmResponse;
// replace the placeholder again so we do not interefere with the users ability to solve
nearestInput.placeholder = oldPlaceholder;
} catch (error) {
console.error("Error:", error);
nearestInput.value = "Error processing request";