Sometimes the Prettier runs before the AI generation is actually finished. This happens because the response comes back first, then the ShareDB ops, and this often results in a Prettier error.
It's a race condition. We could "solve" this by introducing an arbitrary delay, maybe .5 seconds.
Sometimes the Prettier runs before the AI generation is actually finished. This happens because the response comes back first, then the ShareDB ops, and this often results in a Prettier error.
It's a race condition. We could "solve" this by introducing an arbitrary delay, maybe .5 seconds.