You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let prompts and resource templates define their own completions #1312
In the modern server, completion is a single function for the whole server. It receives every completion/complete request, so whoever writes it has to know about every prompt and resource template and decide what each one's arguments should complete to. Completion logic for unrelated prompts and templates ends up in one place, separate from the definitions it belongs to.
Instead, each prompt and resource template would define how its own arguments are completed, and the server would route each request to the prompt or template it refers to. With routing in place:
A prompt's suggestions stay next to its definition, and so do a template's.
References to unknown prompts or templates, and arguments they don't declare, are rejected by the server, the same way prompts/get and resources/read already handle unknown names.
Template variables can be completed, because a template can be looked up by its URI template.
Custom features can complete their own references.
This brings completions in line with the rest of the modern feature model, where each feature is responsible for its own primitives.
Activity