function initLocalRunService()

in vscode/qodana/src/extension.ts [208:228]


function initLocalRunService(context: vscode.ExtensionContext) {
	context.subscriptions.push(
		vscode.commands.registerCommand(COMMAND_OPEN_LOCAL_REPORT, async () => {
			extensionInstance.localRunService?.openLocalReportAction();
		})
	);
	context.subscriptions.push(
		vscode.commands.registerCommand(COMMAND_CLOSE_REPORT, async () => {
			let isLocal = await context.workspaceState.get(WS_REPORT_ID) === LOCAL_REPORT;
			if (isLocal) {
				await extensionInstance.closeReport();
			} else {
				await extensionInstance.linkService?.unlinkProject();
			}
		})
	);
	const runLocallyView = new RunLocallyView(context.extensionUri);
	context.subscriptions.push(
		vscode.window.registerWebviewViewProvider(RunLocallyView.viewType, runLocallyView)
	);
}