The VS Code search view, and the findTextInFiles API, should be able to request the small portion of the search preview that it is able to display.
export interface TextSearchPreviewOptions {
maxLines: number;
leadingChars: number;
totalChars: number;
}