A console history manager object.

Implements

Constructors

Properties

_cursor: number = 0
_editor: null | CodeEditor.IEditor = null
_filtered: string[] = []
_hasSession: boolean = false
_history: string[] = []
_isDisposed: boolean = false
_placeholder: string = ''
_setByHistory: boolean = false
sessionContext: null | ISessionContext

The client session used by the foreign handler.

Accessors

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.

  • 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.

  • 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

  • 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

  • Set the filter data.

    Parameters

    • filterStr: string = ''

      The string to use when filtering the data.

    Returns void