diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 0b5536c5..679eb657 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -2,6 +2,8 @@ ## Connection Errors +Make sure you have the **latest version of Ollama** installed before proceeding with the installation. You can find the latest version of Ollama at [https://ollama.ai/](https://ollama.ai/). + If you encounter difficulties connecting to the Ollama server, please follow these steps to diagnose and resolve the issue: **1. Verify Ollama Server Configuration** @@ -43,5 +45,6 @@ docker run --platform linux/amd64 -d -p 3000:8080 -e OLLAMA_API_BASE_URL=http:// ``` ## References + [Change Docker Desktop Settings on Mac](https://docs.docker.com/desktop/settings/mac/) Search for "x86" in that page. [Run x86 (Intel) and ARM based images on Apple Silicon (M1) Macs?](https://forums.docker.com/t/run-x86-intel-and-arm-based-images-on-apple-silicon-m1-macs/117123) diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 36fc6ce3..aa7bde72 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -162,7 +162,15 @@ const editMessageHandler = async (messageId) => { // let editMessage = history.messages[messageId]; history.messages[messageId].edit = true; + history.messages[messageId].originalContent = history.messages[messageId].content; history.messages[messageId].editedContent = history.messages[messageId].content; + + await tick(); + + const editElement = document.getElementById(`message-edit-${messageId}`); + + editElement.style.height = ''; + editElement.style.height = `${editElement.scrollHeight}px`; }; const confirmEditMessage = async (messageId) => { @@ -195,6 +203,11 @@ await sendPrompt(userPrompt, userMessageId, $chatId); }; + const confirmEditResponseMessage = async (messageId) => { + history.messages[messageId].edit = false; + history.messages[messageId].content = history.messages[messageId].editedContent; + }; + const cancelEditMessage = (messageId) => { history.messages[messageId].edit = false; history.messages[messageId].editedContent = undefined; @@ -415,19 +428,15 @@ {#if message?.edit === true}