Ghost text is provisional text rendered inline at the cursor as a preview of a generated completion. Users can accept it with Tab or reject it through another editor action, keeping suggestions visible without inserting them immediately. section 10.3
In a coding copilot, a VS Code inline completion provider supplies the preview. It receives the document, cursor position, invocation context, and cancellation token, then can return one or more completion items. A practical implementation limits generation to manual triggers, sends selected text to an LLM service, and returns the response at the selection’s end. section 10.3
Manual code suggestion
A user highlights code, presses Alt+S, and previews the LLM-generated continuation as inline text. The extension returns one suggestion and registers the provider for Python files or broader language patterns. section 10.3
