OMG FINALY WORKING LIVE TEXT

This commit is contained in:
YasinOnm08 2024-09-24 10:58:14 +02:00
parent d037439b4c
commit 37177a7856
3 changed files with 6 additions and 2 deletions

View file

@ -90,11 +90,15 @@ const InputOutputBackend: React.FC = () => {
if (getWorkerRef.current) {
getWorkerRef.current.postMessage({action:"terminate"})
getWorkerRef.current.terminate()
getWorkerRef.current = null
console.log(messages);
}
}
const editLastMessage = (newContent: string) => {
if (newContent == "") {
newContent = "Loading..."
}
setMessages((prevMessages) => {
const updatedMessages = prevMessages.slice(); // Create a shallow copy of the current messages
if (updatedMessages.length > 0) {