How to use the @jupyterlab/running.CONSOLE_REGEX.test function in @jupyterlab/running

To help you get started, we’ve selected a few @jupyterlab/running examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / src / running-extension / src / index.ts View on Github external
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 });
    }

  });

@jupyterlab/running

JupyterLab - Running Sessions Panel

BSD-3-Clause
Latest version published 5 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages