I’m curious about the technical process behind inline suggestions in editors like Cursor, especially when characters are both added and removed dynamically.
My question isn’t about the editor’s capabilities but rather the implementation details: how does the editor determine precisely which characters to delete or add, and how is this conveyed visually? Specifically, I’m wondering if the LLM itself returns a complete, modified string (suggestion) and then Cursor’s editor performs a diff operation internally to highlight additions (in green) and deletions (in red) based on character differences.
Or, does the LLM return a set of operations specifying where and how to apply changes, including each character’s action (delete
or add
) along with its position (line and column)?
Understanding this workflow would help clarify how such fine-grained, visually marked suggestions can be achieved. Thanks in advance for any insights into how Cursor may handle this