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({
91
91
const [ requestHistory , setRequestHistory ] = useState <
92
92
{ request : string ; response ?: string } [ ]
93
93
> ( [ ] ) ;
94
- const [ completionsSupported , setCompletionsSupported ] = useState ( true ) ;
94
+ const [ completionsSupported , setCompletionsSupported ] = useState ( false ) ;
95
95
96
96
const pushHistory = ( request : object , response ?: object ) => {
97
97
setRequestHistory ( ( prev ) => [
@@ -505,7 +505,7 @@ export function useConnection({
505
505
throw error ;
506
506
}
507
507
setServerCapabilities ( capabilities ?? null ) ;
508
- setCompletionsSupported ( true ) ; // Reset completions support on new connection
508
+ setCompletionsSupported ( capabilities ?. completions !== undefined ) ;
509
509
510
510
if ( onPendingRequest ) {
511
511
client . setRequestHandler ( CreateMessageRequestSchema , ( request ) => {
You can’t perform that action at this time.
0 commit comments