-
Notifications
You must be signed in to change notification settings - Fork 112
docs(rfd): Add next edit suggestions RFD #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs(rfd): Add next edit suggestions RFD #325
Conversation
Propose a new subsystem for proactive edit suggestions (tab-completions) that allows agents to suggest edits based on context, recent changes, and cursor position.
Major revision incorporating technical details from Cursor Tab, GitHub Copilot NES, Supermaven, and Sourcegraph Cody implementations: - Add navigation suggestions (cursor jumps) alongside edit suggestions - Add streaming support for ghost text UX - Add partial acceptance tracking (word-by-word, line-by-line) - Add retention tracking for learning (kept/modified/deleted) - Add suggestion invalidation mechanism - Expand EditContext with languageId, documentVersion, selectedText - Add chained suggestions (hasFollowUp) for tab-tab-tab flow - Add latency guidelines (<200ms first token, <500ms complete) - Add comprehensive FAQ covering LSP differences, streaming rationale
|
@scotteveritt wow! you're reading our minds! Thanks for the contribution! |
|
Thanks for putting this proposal together! It’s a solid start, though given the size of this feature space, there are naturally quite a few details we'll need to sort out before moving forward. A few initial thoughts:
Partial Results: Making partial results a strict requirement might not be realistic. Depending on how a "nes agent" represents outputs internally, mapping them to incremental file changes isn't always technically feasible. Suggestion Responses: These feel a bit restrictive, though it might be a reasonable starting point. We can likely assume that some client/agent pairs will end up needing non-standard additional suggestion types anyway. Streaming: This is the biggest area for improvement. Streaming in UI in the editor is very distracting, somewhat of a proof of this is that no vendor on the market currently does it this and Supermaven backtracked on this UX very quickly after the initial release. It is also unclear how streaming deletions or modifications would work. Mandating this assumes specific internal representations, which severely constrains how "nes agents" can be built. Invalidation: There is a potential issue here regarding state management. If clients act on assumptions about what invalidates the agent (e.g., treating any typing as a cancellation), it forces agents to maintain complex internal caching, likely duplicating effort across implementations. |
Major changes based on community feedback from @olegtaratuhin: - Remove streaming support entirely (no production NES tools use it) - Make EditContext fields more optional/flexible - Clarify client-owned invalidation via documentVersion - Add extensibility patterns (x- prefix, metadata field) - Update FAQ to explain streaming removal rationale
|
Thanks @olegtaratuhin for the detailed feedback. I've taken a couple days to try and address your comments and landed on the following: Streaming (Removed):
I've removed streaming entirely from this RFD. Suggestions are now returned as complete responses. This simplifies the protocol and aligns with how production implementations actually work. EditContext:
Invalidation:
Suggestion Types:
Let me know if these changes address your concerns, or if there are other aspects you'd like to discuss. |
Summary
This RFD proposes adding support for next edit suggestions (tab-completions / predictive edits) to ACP. The proposal enables agents to proactively suggest:
Key Features
hasFollowUpfor tab-tab-tab flowdocumentVersionx-prefix) and metadata fieldNew Protocol Methods
editContext/didChange- Context updates (Client → Agent)suggestions/request- Request suggestions (Client → Agent)suggestions/accept/reject/dismiss- User actions (Client → Agent)suggestions/retained- Retention tracking (Client → Agent)suggestions/offer/invalidate- Proactive suggestions (Agent → Client)Research
Based on technical analysis of:
Changelog
2025-12-11: Major revision based on community feedback (@olegtaratuhin)
Streaming Removed:
suggestions/streamandsuggestions/streamEndmethods entirelyEditContext Made More Flexible:
uri,documentVersion, andselectionsare now requiredlanguageId,visibleRange,recentFiles,recentEdits) are optionalextensionsfield for agent-specific context needsInvalidation Clarified (Client-Owned):
documentVersionvalidForDocumentVersionfield to suggestionssuggestions/invalidateis now advisory, not requiredExtensibility Added:
x-prefix pattern for customEditSuggestionKindvaluesmetadatafield toEditSuggestionfor agent-specific dataTest plan