This message was generated using {message.usage.total_tokens} tokens ~= - ${(message.usage.total_tokens * token_price).toFixed(6)} + ${(message.usage.total_tokens * tokenPrice).toFixed(6)}
{/if} @@ -433,15 +433,15 @@ rows="1" on:keydown={(e) => { // Only send if Enter is pressed, not Shift+Enter - if (e.key === "Enter" && !e.shiftKey) { - submitForm(); - e.preventDefault(); + if (e.key === 'Enter' && !e.shiftKey) { + submitForm() + e.preventDefault() } }} on:input={(e) => { // Resize the textarea to fit the content - auto is important to reset the height after deleting content - input.style.height = "auto"; - input.style.height = input.scrollHeight + "px"; + input.style.height = 'auto' + input.style.height = input.scrollHeight + 'px' }} bind:this={input} /> @@ -461,8 +461,8 @@