Class ConsoleHistory

A console history manager object.

Hierarchy

  • ConsoleHistory

Implements

Constructors

Properties

_cursor: any
_editor: any
_filtered: any
_handleKernel: any

Handle the current kernel changing.

_hasSession: any
_history: any
_isDisposed: any
_placeholder: any
_setByHistory: any
sessionContext: ISessionContext

The client session used by the foreign handler.

Accessors

  • get editor(): IEditor
  • The current editor used by the history manager.

    Returns IEditor

  • set editor(value): void
  • The current editor used by the history widget.

    Parameters

    • value: IEditor

    Returns void

  • get isDisposed(): boolean
  • Get whether the console history manager is disposed.

    Returns boolean

  • get placeholder(): string
  • The placeholder text that a history session began with.

    Returns string

Methods

  • Get the previous item in the console history.

    Parameters

    • placeholder: string

      The placeholder string that gets temporarily added to the history only for the duration of one history session. If multiple placeholders are sent within a session, only the first one is accepted.

    Returns Promise<string>

    A Promise for console command text or undefined if unavailable.

  • Dispose of the resources held by the console history manager.

    Returns void

  • Get the next item in the console history.

    Parameters

    • placeholder: string

      The placeholder string that gets temporarily added to the history only for the duration of one history session. If multiple placeholders are sent within a session, only the first one is accepted.

    Returns Promise<string>

    A Promise for console command text or undefined if unavailable.

  • Handle an edge requested signal.

    Parameters

    • editor: IEditor
    • location: EdgeLocation

    Returns void

  • Populate the history collection on history reply from a kernel.

    Parameters

    • value: IHistoryReplyMsg

      The kernel message history reply.

      Notes

      History entries have the shape: [session: number, line: number, input: string] Contiguous duplicates are stripped out of the API response.

    Returns void

  • Handle a text change signal from the editor.

    Returns void

  • Add a new item to the bottom of history.

    Parameters

    • item: string

      The item being added to the bottom of history.

      Notes

      If the item being added is undefined or empty, it is ignored. If the item being added is the same as the last item in history, it is ignored as well so that the console's history will consist of no contiguous repetitions.

    Returns void

  • Reset the history navigation state, i.e., start a new history session.

    Returns void

  • Set the filter data.

    Parameters

    • Optional filterStr: string

      The string to use when filtering the data.

    Returns void

Generated using TypeDoc