You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a small plugin to generate text into the editor using ai. When I update the text in the editor it flickers. It looks like the text appears several times. This happens until the text generation is stopped and no more text is inserted, then the editor will display the final text as intended.
Any idea what could be the cause?
I tried to wait until I have 50 characters in the buffer and it makes the problem a bit less obvious, but it's still there.
try {
textBuffer += content;
// Only update when we have accumulated enough characters
if (textBuffer.length >= 50) {
carta.input?.insertAt(position, textBuffer);
position += textBuffer.length;
carta.input?.update();
textBuffer = ''; // Reset the text buffer
}
}
} catch (e) {
console.warn('Failed to parse line:', line);
continue;
}
Skarminspelning.2024-11-05.kl.19.59.35.mov
The text was updated successfully, but these errors were encountered:
Hi!
I'm writing a small plugin to generate text into the editor using ai. When I update the text in the editor it flickers. It looks like the text appears several times. This happens until the text generation is stopped and no more text is inserted, then the editor will display the final text as intended.
Any idea what could be the cause?
I tried to wait until I have 50 characters in the buffer and it makes the problem a bit less obvious, but it's still there.
Skarminspelning.2024-11-05.kl.19.59.35.mov
The text was updated successfully, but these errors were encountered: