Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.contentFactory || ConsolePanel.defaultContentFactory);
let count = Private.count++;
if (!path) {
path = `${basePath || ''}/console-${count}-${UUID.uuid4()}`;
}
let session = (this._session = new ClientSession({
manager: manager.sessions,
path,
name: name || `Console ${count}`,
type: 'console',
kernelPreference: options.kernelPreference,
setBusy: options.setBusy
}));
let resolver = new RenderMimeRegistry.UrlResolver({
session,
contents: manager.contents
});
rendermime = rendermime.clone({ resolver });
this.console = contentFactory.createConsole({
rendermime,
session,
mimeTypeService,
contentFactory
});
this.addWidget(this.console);
void session.initialize().then(() => {
this._connected = new Date();
this._updateTitle();
return this._populatedPromise.promise;
});
let ext = PathExt.extname(this._path);
this.session = new ClientSession({
manager: manager.sessions,
path: this._path,
type: ext === '.ipynb' ? 'notebook' : 'file',
name: PathExt.basename(localPath),
kernelPreference: options.kernelPreference || { shouldStart: false },
setBusy: options.setBusy
});
this.session.propertyChanged.connect(this._onSessionChanged, this);
manager.contents.fileChanged.connect(this._onFileChanged, this);
this.urlResolver = new RenderMimeRegistry.UrlResolver({
session: this.session,
contents: manager.contents
});
}
options.contentFactory || ConsolePanel.defaultContentFactory);
let count = Private.count++;
if (!path) {
path = `${basePath || ''}/console-${count}-${UUID.uuid4()}`;
}
let session = (this._session = new ClientSession({
manager: manager.sessions,
path,
name: name || `Console ${count}`,
type: 'console',
kernelPreference: options.kernelPreference,
setBusy: options.setBusy
}));
let resolver = new RenderMimeRegistry.UrlResolver({
session,
contents: manager.contents
});
rendermime = rendermime.clone({ resolver });
this.console = contentFactory.createConsole({
rendermime,
session,
mimeTypeService,
contentFactory,
modelFactory
});
this.addWidget(this.console);
void session.initialize().then(() => {
this._connected = new Date();
return this._populatedPromise.promise;
});
let ext = PathExt.extname(this._path);
this.session = new ClientSession({
manager: manager.sessions,
path: this._path,
type: ext === '.ipynb' ? 'notebook' : 'file',
name: PathExt.basename(localPath),
kernelPreference: options.kernelPreference || { shouldStart: false },
setBusy: options.setBusy
});
this.session.propertyChanged.connect(this._onSessionChanged, this);
manager.contents.fileChanged.connect(this._onFileChanged, this);
this.urlResolver = new RenderMimeRegistry.UrlResolver({
session: this.session,
contents: manager.contents
});
}
path: this._path,
type: ext === '.ipynb' ? 'notebook' : 'file',
name: PathExt.basename(localPath),
kernelPreference: options.kernelPreference || { shouldStart: false },
setBusy: options.setBusy
});
this.session.propertyChanged.connect(
this._onSessionChanged,
this
);
manager.contents.fileChanged.connect(
this._onFileChanged,
this
);
this.urlResolver = new RenderMimeRegistry.UrlResolver({
session: this.session,
contents: manager.contents
});
}