How to use the @jupyterlab/chatbox.Chatbox.ContentFactory function in @jupyterlab/chatbox

To help you get started, we’ve selected a few @jupyterlab/chatbox 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 / test / src / chatbox / chatbox.spec.ts View on Github external
import {
  ModelDB, ObservableMap, ObservableList, ICollaborator
} from '@jupyterlab/coreutils';

import {
  defaultRenderMime
} from '../utils';


/**
 * Factory stuff.
 */
const editorFactory = editorServices.factoryService.newInlineEditor.bind(
    editorServices.factoryService);
const contentFactory = new Chatbox.ContentFactory({ editorFactory });
const rendermime = defaultRenderMime();

/**
 * Create a dummy collaborator map.
 */
class DummyCollaboratorMap extends ObservableMap {
  type: 'Map';

  readonly localCollaborator: ICollaborator = {
    userId: '1234',
    sessionId: '5678',
    displayName: 'A. U. Thor',
    color: '#00FF33',
    shortName: 'AU'
  }
}

@jupyterlab/chatbox

JupyterLab - Chatbox

BSD-3-Clause
Latest version published 7 years ago

Package Health Score

67 / 100
Full package analysis

Similar packages