Skip to content

Commit 4e6c7f9

Browse files
Set completion support to false by default
1 parent ec24f7b commit 4e6c7f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/lib/hooks/useConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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) => {

0 commit comments

Comments
 (0)