vizhub-core / vzcode

Mob Programming Code Editor
MIT License
55 stars 13 forks source link

Prettier After AI: Introduce a Delay #622

Closed curran closed 3 months ago

curran commented 3 months ago

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.