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
{{ message }}
Repository navigation
[upstream #15911] Give artifact edits a revision instead of content-matching the original #211
Artifact edits use the replaced text as their only concurrency check: POST /api/messages/artifact/:messageId accepts { index, original, updated } and refuses the save when original is no longer in the artifact. The client therefore has to decide from content alone whether the registry is lagging behind its own save or was changed elsewhere.
LibreChat-AI#15911 records each save in a per-artifact ledger (EditorContextsavedContent) and treats only values the registry has not yet passed as lag. One case stays ambiguous by construction: another writer restoring exactly the pre-save value before the registry has shown this tab's save. The tab then rebases on its own save, and the next edit is refused (400) until the registry changes again. Nothing is lost, but the user sees a refusal.
A revision (or updatedAt) on the artifact, returned by the edit endpoint and carried on the message, would let the client compare revisions instead of text and let the server refuse on revision mismatch.
Activity