The artifact editing engine in LibreChat was rearchitected to parse artifact boundaries with code-fence awareness, preventing internal `:::`-like content from prematurely terminating artifacts. A queue-and-replay mechanism was added so rapid consecutive edits do not replay against wrong original content or corrupt artifact markers.
Refactored artifact parsing and edit-saving logic into a dedicated module with code-fence-aware boundary detection and a scoped edit queue, preventing two classes of artifact corruption caused by internal delimiter-like content or overlapping rapid user edits.
Users who edit AI-generated artifacts in LibreChat can now edit rapidly or include code fences and delimiter-like text without silently corrupting the artifacts or losing updates. The fix eliminates a bug that could cause lost work or garbled content when editing near artifact boundaries. Operators should monitor for edge cases where very long artifact streams with deeply nested fences might still trigger race conditions under extreme concurrency.