diff --git a/packages/logconsole-extension/package.json b/packages/logconsole-extension/package.json index 2ecafd56dba1..ff6f9990f4af 100644 --- a/packages/logconsole-extension/package.json +++ b/packages/logconsole-extension/package.json @@ -40,7 +40,6 @@ "@jupyterlab/mainmenu": "^2.0.0-alpha.1", "@jupyterlab/notebook": "^2.0.0-alpha.1", "@jupyterlab/rendermime": "^2.0.0-alpha.1", - "@jupyterlab/services": "^5.0.0-alpha.1", "@jupyterlab/statusbar": "^2.0.0-alpha.1", "@jupyterlab/ui-components": "^2.0.0-alpha.1", "@phosphor/signaling": "^1.3.0", diff --git a/packages/logconsole-extension/src/index.tsx b/packages/logconsole-extension/src/index.tsx index 6b99cac73a6b..e9ccf7f2321f 100644 --- a/packages/logconsole-extension/src/index.tsx +++ b/packages/logconsole-extension/src/index.tsx @@ -274,6 +274,4 @@ function activateLogConsole( return loggerRegistry; } -// TODO: delete the nboutput widget, or at least make it a non-default option? -import { logNotebookOutput } from './nboutput'; -export default [logConsolePlugin, logNotebookOutput]; +export default [logConsolePlugin]; diff --git a/packages/logconsole-extension/src/nboutput.ts b/packages/logconsole-extension/src/nboutput.ts deleted file mode 100644 index ee1e2732e2e0..000000000000 --- a/packages/logconsole-extension/src/nboutput.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Jupyter Development Team. -// Distributed under the terms of the Modified BSD License. - -import { - JupyterFrontEnd, - JupyterFrontEndPlugin -} from '@jupyterlab/application'; - -import { nbformat } from '@jupyterlab/coreutils'; - -import { ILoggerRegistry } from '@jupyterlab/logconsole'; - -import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook'; - -import { KernelMessage } from '@jupyterlab/services'; - -/** - * The Log Console extension. - */ -export const logNotebookOutput: JupyterFrontEndPlugin = { - activate: activateNBOutput, - id: 'logconsole:nboutput', - requires: [ILoggerRegistry, INotebookTracker], - autoStart: true -}; - -function activateNBOutput( - app: JupyterFrontEnd, - loggerRegistry: ILoggerRegistry, - nbtracker: INotebookTracker -) { - function registerNB(nb: NotebookPanel) { - nb.context.session.iopubMessage.connect( - (_, msg: KernelMessage.IIOPubMessage) => { - if ( - KernelMessage.isDisplayDataMsg(msg) || - KernelMessage.isStreamMsg(msg) || - KernelMessage.isErrorMsg(msg) || - KernelMessage.isExecuteResultMsg(msg) - ) { - const logger = loggerRegistry.getLogger(nb.context.path); - logger.rendermime = nb.content.rendermime; - const data: nbformat.IOutput = { - ...msg.content, - output_type: msg.header.msg_type - }; - logger.log({ type: 'output', data }); - } - } - ); - } - nbtracker.forEach(nb => registerNB(nb)); - nbtracker.widgetAdded.connect((_, nb) => registerNB(nb)); -} diff --git a/packages/logconsole-extension/tsconfig.json b/packages/logconsole-extension/tsconfig.json index 4a1e948b1b25..01b2d1daa7a2 100644 --- a/packages/logconsole-extension/tsconfig.json +++ b/packages/logconsole-extension/tsconfig.json @@ -27,9 +27,6 @@ { "path": "../rendermime" }, - { - "path": "../services" - }, { "path": "../statusbar" },