Merge branch 'main' into feat-support-enter-oauth-client-information-manually

This commit is contained in:
Xiao Yijun 2025-07-14 17:24:38 +08:00 • committed by GitHub
commit 91aacba85d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,7 +95,7 @@ export function useConnection({
const [requestHistory, setRequestHistory] = useState<
{ request: string; response?: string }[]
>([]);
const [completionsSupported, setCompletionsSupported] = useState(true);
const [completionsSupported, setCompletionsSupported] = useState(false);
useEffect(() => {
if (!oauthClientId) {
@ -530,7 +530,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) => {