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({
8686 const [ requestHistory , setRequestHistory ] = useState <
8787 { request : string ; response ?: string } [ ]
8888 > ( [ ] ) ;
89- const [ completionsSupported , setCompletionsSupported ] = useState ( true ) ;
89+ const [ completionsSupported , setCompletionsSupported ] = useState ( false ) ;
9090
9191 const pushHistory = ( request : object , response ?: object ) => {
9292 setRequestHistory ( ( prev ) => [
@@ -443,7 +443,7 @@ export function useConnection({
443443 throw error ;
444444 }
445445 setServerCapabilities ( capabilities ?? null ) ;
446- setCompletionsSupported ( true ) ; // Reset completions support on new connection
446+ setCompletionsSupported ( capabilities ?. completions !== undefined ) ;
447447
448448 if ( onPendingRequest ) {
449449 client . setRequestHandler ( CreateMessageRequestSchema , ( request ) => {
You can’t perform that action at this time.
0 commit comments