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
Decide how an agent write reports unsaved editor edits before it publishes #2776
Context: PR #1408 review thread on src/integrations/editor/DiffViewProvider.ts (unresolved at 15940326f6).
Today the order is assertWithinCanonicalRoot -> createDirectoriesForFile -> guardedWrite publish -> (only when openFile === false) openTextDocument; the comment above the last step records that a dirty editor buffer is deliberately not saved. The review asks for the step before the publish: notice that the buffer holds unsaved user edits and tell the model, so an agent write cannot silently sit on top of them.
Three answers with different user-visible cost:
refuse the publish while the buffer is dirty (an agent write then blocks on a human buffer),
publish and warn, publish order unchanged,
publish and report the dirty edits in the tool result (smallest change; matches the review's wording 'report its edits to the model').
Direction chosen by the lane owner: the third, as a separate unit. The earlier deferral to "split unit 3" is stale - that unit's content landed on #1408 through 478c10750d, 94ca5fcf47 and fa49239842.
Activity