File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ def __init__(
101101 logging_callback : LoggingFnT | None = None ,
102102 message_handler : MessageHandlerFnT | None = None ,
103103 client_info : types .Implementation | None = None ,
104+ support_roots_list_changed : bool = False ,
104105 ) -> None :
105106 super ().__init__ (
106107 read_stream ,
@@ -114,6 +115,7 @@ def __init__(
114115 self ._list_roots_callback = list_roots_callback or _default_list_roots_callback
115116 self ._logging_callback = logging_callback or _default_logging_callback
116117 self ._message_handler = message_handler or _default_message_handler
118+ self ._support_roots_list_changed = support_roots_list_changed
117119
118120 async def initialize (self ) -> types .InitializeResult :
119121 sampling = (
@@ -122,10 +124,7 @@ async def initialize(self) -> types.InitializeResult:
122124 else None
123125 )
124126 roots = (
125- # TODO: Should this be based on whether we
126- # _will_ send notifications, or only whether
127- # they're supported?
128- types .RootsCapability (listChanged = True )
127+ types .RootsCapability (listChanged = self ._support_roots_list_changed )
129128 if self ._list_roots_callback is not _default_list_roots_callback
130129 else None
131130 )
You can’t perform that action at this time.
0 commit comments