Skip to content

ArgumentPreprocessingContext

Read-only input for an argument adapter. Callbacks must filter external actions by mode.

public sealed class ArgumentPreprocessingContext

Gets each effective argument’s range in the original text, or null for an unmapped argument.

public IReadOnlyList<InputSourceRange?> ArgumentOrigins { get; }

IReadOnlyList<InputSourceRange>

Gets arguments produced by the preceding adapter.

public IReadOnlyList<string> Arguments { get; }

IReadOnlyList<string>

Gets the cursor position in the original text when available.

public int? Cursor { get; }

int?

Gets the processing mode; only Execution denotes submission.

public InputProcessingMode Mode { get; }

InputProcessingMode

Gets arguments before any adapter ran.

public IReadOnlyList<string> OriginalArguments { get; }

IReadOnlyList<string>

Gets the intent recognizable from the current arguments.

public InputPurpose Purpose { get; }

InputPurpose

Gets the interactive scope, which is separate from the editable arguments.

public IReadOnlyList<string> ScopeTokens { get; }

IReadOnlyList<string>

Gets original editor text when available.

public string? Text { get; }

string