Merge pull request #441 from fredericbarthelet/completion-support-default

Set completion support to false by default
This commit is contained in:
Ola Hungerford 2025-07-11 20:32:22 -07:00 • committed by GitHub
commit 56ef795d86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,7 @@ export function useConnection({
const [requestHistory, setRequestHistory] = useState<
{ request: string; response?: string }[]
>([]);
const [completionsSupported, setCompletionsSupported] = useState(true);
const [completionsSupported, setCompletionsSupported] = useState(false);
const pushHistory = (request: object, response?: object) => {
setRequestHistory((prev) => [
@ -505,7 +505,7 @@ export function useConnection({
throw error;
}
setServerCapabilities(capabilities ?? null);
setCompletionsSupported(true); // Reset completions support on new connection
setCompletionsSupported(capabilities?.completions !== undefined);
if (onPendingRequest) {
client.setRequestHandler(CreateMessageRequestSchema, (request) => {