MCPcopy Index your code
hub / github.com/microsoft/vscode / getOrCreateApplication

Method getOrCreateApplication

test/mcp/src/application.ts:287–306  ·  view source on GitHub ↗
({ recordVideo, workspacePath }: { recordVideo?: boolean; workspacePath?: string } = {})

Source from the content-addressed store, hash-verified

285 }
286
287 async getOrCreateApplication({ recordVideo, workspacePath }: { recordVideo?: boolean; workspacePath?: string } = {}): Promise<Application> {
288 if (this._closing) {
289 await this._closing;
290 }
291 if (!this._application) {
292 this._application = await getApplication({ recordVideo, workspacePath });
293 this._application.code.driver.currentPage.on('close', () => {
294 this._closing = (async () => {
295 if (this._application) {
296 this._application.code.driver.browserContext.removeAllListeners();
297 await this._application.stop();
298 this._application = undefined;
299 await this._runAllListeners();
300 }
301 })();
302 });
303 await this._runAllListeners();
304 }
305 return this._application;
306 }
307
308 private async _runAllListeners() {
309 for (const listener of this._listeners) {

Callers 15

stdio.tsFile · 0.80
getServerFunction · 0.80
applyTerminalToolsFunction · 0.80
applyExtensionsToolsFunction · 0.80
applyTaskToolsFunction · 0.80
applyProblemsToolsFunction · 0.80
applyEditorToolsFunction · 0.80
applyQuickAccessToolsFunction · 0.80
applyChatToolsFunction · 0.80
applySCMToolsFunction · 0.80
applyCoreToolsFunction · 0.80
applyNotebookToolsFunction · 0.80

Calls 5

_runAllListenersMethod · 0.95
getApplicationFunction · 0.85
onMethod · 0.65
removeAllListenersMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected