-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Client sampling and roots capabilities set to None if not implemented #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
c4ec56d
8afaefd
e1203df
de2fcfb
75475f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,13 +116,20 @@ def __init__( | |
self._message_handler = message_handler or _default_message_handler | ||
|
||
async def initialize(self) -> types.InitializeResult: | ||
sampling = types.SamplingCapability() | ||
roots = types.RootsCapability( | ||
# TODO: Should this be based on whether we | ||
# _will_ send notifications, or only whether | ||
# they're supported? | ||
listChanged=True, | ||
sampling = ( | ||
types.SamplingCapability() | ||
if self._sampling_callback is not _default_sampling_callback | ||
else None | ||
) | ||
if self._list_roots_callback is _default_list_roots_callback: | ||
roots = None | ||
else: | ||
roots = types.RootsCapability( | ||
# TODO: Should this be based on whether we | ||
|
||
# _will_ send notifications, or only whether | ||
# they're supported? | ||
listChanged=True, | ||
) | ||
|
||
result = await self.send_request( | ||
types.ClientRequest( | ||
|
Uh oh!
There was an error while loading. Please reload this page.