interface MappedEditsProvider {
    provideMappedEdits(document, codeBlocks, context, token): Promise<WorkspaceEdit>;
}

Methods

  • Provider maps code blocks from the chat into a workspace edit.

    Parameters

    • document: ITextModel

      The document to provide mapped edits for.

    • codeBlocks: string[]

      Code blocks that come from an LLM's reply. "Apply in Editor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.

    • context: MappedEditsContext

      The context for providing mapped edits.

    • token: CancellationToken

      A cancellation token.

    Returns Promise<WorkspaceEdit>

    A provider result of text edits.