CompleteRequest

A parsed completion/complete request, as received by a server. Per server/utilities/completion §"Data Types > CompleteRequest" a client sends a ref (a ref/prompt or ref/resource reference), an argument ({name, value}) naming the argument being completed and its partial value, and an optional context.arguments map of previously-resolved argument values. Use fromJson to parse the raw params handed to a completion handler.

Members

Functions

isPrompt
bool isPrompt()

true if this request targets a prompt argument (ref/prompt).

isResource
bool isResource()

true if this request targets a resource template (ref/resource).

Static functions

fromJson
CompleteRequest fromJson(Json params)

Parse the raw completion/complete params object.

Variables

argumentName
string argumentName;

Name of the argument being completed.

argumentValue
string argumentValue;

Partial value typed so far for that argument.

context
string[string] context;

Previously-resolved argument values (context.arguments), if supplied.

reference
CompletionReference reference;

What is being completed (a prompt or a resource template).