import * as vscode from "vscode" ; export async function preview ( uri , column , tabTitle ) { const html = await getHTML ( uri ) ; const w = vscode . window . createWebviewPanel ( 'vsk8s-preview' , tabTitle , column , { retainContextWhenHidden : false , enableScripts : false , } ) ; w . webview . html = html ; w . reveal ( ) ; } async function getHTML ( uri ) { const doc = await vscode . workspace . openTextDocument ( uri ) ; return doc . getText ( ) ; } export async function openHelmGeneratedValuesFile ( uri ) { return vscode . workspace . openTextDocument ( uri ) . then ( ( document ) => { if ( document ) { vscode . window . showTextDocument ( document ) ; } } , ( err ) => vscode . window . showErrorMessage ( `Error loading document: ${ err }` ) ) ; }