Closed GregoMac1 closed 2 weeks ago
@fmaclen I found the problem. This bug is happening because handleCompletion sets isCompletionInProgress to true, which makes the ... message visible:
handleCompletion
isCompletionInProgress
true
...
{#if isCompletionInProgress} <Article message={{ role: 'assistant', content: completion || '...' }} /> {/if}
It seems that this render occurs after the scrollToBottom invocation.
scrollToBottom
I fixed it by using the requestAnimationFrame function, which schedules the scroll action to occur in the next frame after the browser has completed its current rendering tasks.
requestAnimationFrame
:tada: This PR is included in version 0.10.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
@fmaclen I found the problem. This bug is happening because
handleCompletion
setsisCompletionInProgress
totrue
, which makes the...
message visible:It seems that this render occurs after the
scrollToBottom
invocation.I fixed it by using the
requestAnimationFrame
function, which schedules the scroll action to occur in the next frame after the browser has completed its current rendering tasks.