The VS Code API lets an extension connect editor interactions to custom behavior. A coding copilot uses it to read highlighted code, call an LLM service, and return ghost-text suggestions. section 10.3
Selected-code coding copilot
A user highlights code and presses Alt+S. The provider reads the selection, posts it to a local generation endpoint, and places the returned text after the selection for preview and acceptance. section 10.3
