Ensure tests will always use the current client name and version
This commit is contained in:
parent
0d202ee47b
commit
ae7d745d5e
1 changed files with 13 additions and 10 deletions
|
|
@ -35,7 +35,7 @@ import { RequestOptions } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|||
import { useEffect, useState } from "react";
|
||||
import { useToast } from "@/lib/hooks/useToast";
|
||||
import { z } from "zod";
|
||||
import { ConnectionStatus } from "../constants";
|
||||
import { ConnectionStatus, CLIENT_IDENTITY } from "../constants";
|
||||
import { Notification } from "../notificationTypes";
|
||||
import {
|
||||
auth,
|
||||
|
|
@ -47,7 +47,6 @@ import {
|
|||
saveClientInformationToSessionStorage,
|
||||
discoverScopes,
|
||||
} from "../auth";
|
||||
import packageJson from "../../../package.json";
|
||||
import {
|
||||
getMCPProxyAddress,
|
||||
getMCPServerRequestMaxTotalTimeout,
|
||||
|
|
@ -347,10 +346,6 @@ export function useConnection({
|
|||
};
|
||||
|
||||
const connect = async (_e?: unknown, retryCount: number = 0) => {
|
||||
const [, name = packageJson.name] = packageJson.name.split("/");
|
||||
const version = packageJson.version;
|
||||
const clientIdentity = { name, version };
|
||||
|
||||
const clientCapabilities = {
|
||||
capabilities: {
|
||||
sampling: {},
|
||||
|
|
@ -362,7 +357,7 @@ export function useConnection({
|
|||
};
|
||||
|
||||
const client = new Client<Request, Notification, Result>(
|
||||
clientIdentity,
|
||||
CLIENT_IDENTITY,
|
||||
clientCapabilities,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue