Hopefully?
This commit is contained in:
@@ -150,6 +150,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<script src="/ui/script.js"></script>
|
<script src="/ui/script.js?v=2"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
14
ui/script.js
14
ui/script.js
@@ -66,7 +66,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
|
|
||||||
isFetching = true;
|
isFetching = true;
|
||||||
status.textContent = "Thinking...";
|
status.textContent = "Thinking...";
|
||||||
statusIndicator.classList.add("fetching");
|
if (statusIndicator) statusIndicator.classList.add("fetching");
|
||||||
|
|
||||||
const n = parseInt(nGramSelect.value);
|
const n = parseInt(nGramSelect.value);
|
||||||
const temperature = parseFloat(tempInput.value);
|
const temperature = parseFloat(tempInput.value);
|
||||||
@@ -95,7 +95,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
} finally {
|
} finally {
|
||||||
isFetching = false;
|
isFetching = false;
|
||||||
status.textContent = "Idle";
|
status.textContent = "Idle";
|
||||||
statusIndicator.classList.remove("fetching");
|
if (statusIndicator) statusIndicator.classList.remove("fetching");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -167,10 +167,12 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
generateBtn.addEventListener("click", () => {
|
if (generateBtn) {
|
||||||
fetchPrediction(editor.value, 50);
|
generateBtn.addEventListener("click", () => {
|
||||||
closeSidebarOnMobile();
|
fetchPrediction(editor.value, 50);
|
||||||
});
|
closeSidebarOnMobile();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Sync scroll
|
// Sync scroll
|
||||||
editor.addEventListener("scroll", () => {
|
editor.addEventListener("scroll", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user