How we built context management for tab completion
5 days ago
- #Code Editors
- #NES
- #Context Management
- Introduction to NES Series Part 2 focusing on real-time context management in code editors.
- Context management is crucial for making NES 'intent-aware' by providing the right context at the right moment.
- Three types of context provided to NES: File Context, Edit History, and Additional Context from other files.
- File Context involves determining the 'live' region of code (~10 lines around the cursor) to keep latency low.
- Edit History tracks meaningful edit steps by grouping raw text-change events into undo-redo scale units.
- Special handling for Git checkout events to avoid polluting the model with non-user-intended changes.
- Additional Context uses language server APIs to pull relevant definitions or declarations from other files.
- Each NES request combines editable region, edit history, and additional context tokens for reliable predictions.
- Upcoming Part 3 will cover Request Management to ensure model responses align with the latest user intent.