File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function useConnection({
86
86
const [ requestHistory , setRequestHistory ] = useState <
87
87
{ request : string ; response ?: string } [ ]
88
88
> ( [ ] ) ;
89
- const [ completionsSupported , setCompletionsSupported ] = useState ( true ) ;
89
+ const [ completionsSupported , setCompletionsSupported ] = useState ( false ) ;
90
90
91
91
const pushHistory = ( request : object , response ?: object ) => {
92
92
setRequestHistory ( ( prev ) => [
@@ -443,7 +443,7 @@ export function useConnection({
443
443
throw error ;
444
444
}
445
445
setServerCapabilities ( capabilities ?? null ) ;
446
- setCompletionsSupported ( true ) ; // Reset completions support on new connection
446
+ setCompletionsSupported ( capabilities ?. completions !== undefined ) ;
447
447
448
448
if ( onPendingRequest ) {
449
449
client . setRequestHandler ( CreateMessageRequestSchema , ( request ) => {
You can’t perform that action at this time.
0 commit comments