KetraTerm
API · DevelopmentAll versions

TerminalCompletionCandidate

data class TerminalCompletionCandidate @JvmOverloads constructor(val replacementText: String, val replacementStartOffset: Int, val replacementEndOffset: Int, val source: String, val kind: TerminalCompletionCandidateKind, val displayText: String = replacementText, val detail: String = "", val score: Int = 0, val valueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, val matchedRanges: TerminalCompletionMatchRanges = TerminalCompletionMatchRanges.EMPTY, val feedbackToken: Any? = null)

Immutable completion candidate returned by TerminalCompletionEngine.

Throws

if text/source fields are empty, replacement offsets do not form a nonnegative ordered range, or matchedRanges do not address displayText.

Constructors

Link copied to clipboard
constructor(replacementText: String, replacementStartOffset: Int, replacementEndOffset: Int, source: String, kind: TerminalCompletionCandidateKind, displayText: String = replacementText, detail: String = "", score: Int = 0, valueDomain: TerminalCompletionValueDomain = TerminalCompletionValueDomain.NONE, matchedRanges: TerminalCompletionMatchRanges = TerminalCompletionMatchRanges.EMPTY, feedbackToken: Any? = null)

Properties

Link copied to clipboard

optional secondary text explaining the candidate.

Link copied to clipboard

primary text shown in suggestion UI.

Link copied to clipboard

optional provider-owned runtime token for correlating feedback with a native provider and item. The engine does not interpret it for ranking or outcome equivalence. Fusion preserves the token of the chosen presentation candidate, and copy preserves its reference by default.

Link copied to clipboard

semantic candidate category.

Link copied to clipboard

immutable ordered UTF-16 intervals relative to displayText used by UI components to highlight matching fragments.

Link copied to clipboard

exclusive UTF-16 replacement end offset in the original request command line.

Link copied to clipboard

inclusive UTF-16 replacement start offset in the original request command line.

Link copied to clipboard
Link copied to clipboard
val score: Int

source-local relevance before merging and the final fused ranking score after the merged engine returns the candidate; larger values are better in either scope.

Link copied to clipboard

compact source label, such as spec, learned, or path.

Link copied to clipboard

dynamic value domain for argument candidates supplied by host-owned providers.