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 @@ -91,7 +91,7 @@ export function useConnection({
9191 const [ requestHistory , setRequestHistory ] = useState <
9292 { request : string ; response ?: string } [ ]
9393 > ( [ ] ) ;
94- const [ completionsSupported , setCompletionsSupported ] = useState ( true ) ;
94+ const [ completionsSupported , setCompletionsSupported ] = useState ( false ) ;
9595
9696 const pushHistory = ( request : object , response ?: object ) => {
9797 setRequestHistory ( ( prev ) => [
@@ -505,7 +505,7 @@ export function useConnection({
505505 throw error ;
506506 }
507507 setServerCapabilities ( capabilities ?? null ) ;
508- setCompletionsSupported ( true ) ; // Reset completions support on new connection
508+ setCompletionsSupported ( capabilities ?. completions !== undefined ) ;
509509
510510 if ( onPendingRequest ) {
511511 client . setRequestHandler ( CreateMessageRequestSchema , ( request ) => {
You can’t perform that action at this time.
0 commit comments