Skip to content

ReplState interface

Home > streplts > ReplState

Data store monitoring cursor tracking, buffer inputs, and selection state offsets inside an active session.

Signature:

export interface ReplState

Property

Modifiers

Type

Description

candidates

string[]

Filtered selection match results populated to generate prompt suggestion interfaces.

completionIdx

number

Selection index tracking the actively focused list entry within the drop UI structure.

cursor

number

Numeric absolute offset index indicating where the text input insertion caret resides.

drawnDropdownLines

number

Total calculated lines populated during the previous repaint cycle to ensure precise cursor rewinds.

input

string

The current unmodified textual contents visible inside the text entry editor line.

jsCandidates

string[]

Filtered matching keys computed against global targets while operating inside JavaScript Evaluation modes.

jsReplaceLen

number

The text span character length intended for removal upon picking a JavaScript candidate selection.

searchMode?

boolean

(Optional) Boolean flag for history search mode.

searchQuery?

string

(Optional) The current search query string used to filter command history entries when operating in search mode.

selectChoices?

string[]

(Optional) The list of choices to display in the select menu.

selectionAnchor

number | null

The starting index offset marker where an highlighted block selection range commences.

selectMode?

boolean

(Optional) Boolean flag for user made select menus.

selectPrompt?

string

(Optional) The select menu prompt string.