Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
running.sessionOpenRequested.connect((sender, model) => {
let path = model.notebook.path;
let name = path.split('/').pop();
if (CONSOLE_REGEX.test(name)) {
app.commands.execute('console:open', { id: model.id });
} else {
app.commands.execute('file-operations:open', { path });
}
});