Merge branch 'main' into routing-fragment-cleanup

This commit is contained in:
Ola Hungerford 2025-07-26 10:48:10 -07:00 • committed by GitHub
commit 098a0e5a79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 45 additions and 26 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-cli",
"version": "0.16.1",
"version": "0.16.2",
"description": "CLI for the Model Context Protocol inspector",
"license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)",
@ -21,7 +21,7 @@
},
"devDependencies": {},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.13.1",
"@modelcontextprotocol/sdk": "^1.17.0",
"commander": "^13.1.0",
"spawn-rx": "^5.1.2"
}

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-client",
"version": "0.16.1",
"version": "0.16.2",
"description": "Client-side application for the Model Context Protocol inspector",
"license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)",
@ -25,7 +25,7 @@
"cleanup:e2e": "node e2e/global-teardown.js"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.14.0",
"@modelcontextprotocol/sdk": "^1.17.0",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-dialog": "^1.1.3",
"@radix-ui/react-icons": "^1.3.0",

View file

@ -48,6 +48,7 @@ const PromptsTab = ({
ref: PromptReference | ResourceReference,
argName: string,
value: string,
context?: Record<string, string>,
) => Promise<string[]>;
completionsSupported: boolean;
promptContent: string;
@ -73,6 +74,7 @@ const PromptsTab = ({
},
argName,
value,
promptArgs,
);
}
};

View file

@ -52,6 +52,7 @@ const ResourcesTab = ({
ref: ResourceReference | PromptReference,
argName: string,
value: string,
context?: Record<string, string>,
) => Promise<string[]>;
completionsSupported: boolean;
resourceContent: string;
@ -94,6 +95,7 @@ const ResourcesTab = ({
},
key,
value,
templateValues,
);
}
};

View file

@ -28,6 +28,7 @@ export function useCompletionState(
ref: ResourceReference | PromptReference,
argName: string,
value: string,
context?: Record<string, string>,
signal?: AbortSignal,
) => Promise<string[]>,
completionsSupported: boolean = true,
@ -66,6 +67,7 @@ export function useCompletionState(
ref: ResourceReference | PromptReference,
argName: string,
value: string,
context?: Record<string, string>,
) => {
if (!completionsSupported) {
return;
@ -82,10 +84,15 @@ export function useCompletionState(
}));
try {
if (context !== undefined) {
delete context[argName];
}
const values = await handleCompletion(
ref,
argName,
value,
context,
abortController.signal,
);
@ -97,6 +104,7 @@ export function useCompletionState(
}));
}
} catch {
console.error("completion failed");
if (!abortController.signal.aborted) {
setState((prev) => ({
...prev,

View file

@ -198,6 +198,7 @@ export function useConnection({
ref: ResourceReference | PromptReference,
argName: string,
value: string,
context?: Record<string, string>,
signal?: AbortSignal,
): Promise<string[]> => {
if (!mcpClient || !completionsSupported) {
@ -215,6 +216,12 @@ export function useConnection({
},
};
if (context) {
request["params"]["context"] = {
arguments: context,
};
}
try {
const response = await makeRequest(request, CompleteResultSchema, {
signal,

30
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "@modelcontextprotocol/inspector",
"version": "0.16.1",
"version": "0.16.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@modelcontextprotocol/inspector",
"version": "0.16.1",
"version": "0.16.2",
"license": "MIT",
"workspaces": [
"client",
@ -14,10 +14,10 @@
"cli"
],
"dependencies": {
"@modelcontextprotocol/inspector-cli": "^0.16.1",
"@modelcontextprotocol/inspector-client": "^0.16.1",
"@modelcontextprotocol/inspector-server": "^0.16.1",
"@modelcontextprotocol/sdk": "^1.14.0",
"@modelcontextprotocol/inspector-cli": "^0.16.2",
"@modelcontextprotocol/inspector-client": "^0.16.2",
"@modelcontextprotocol/inspector-server": "^0.16.2",
"@modelcontextprotocol/sdk": "^1.17.0",
"concurrently": "^9.0.1",
"open": "^10.1.0",
"shell-quote": "^1.8.2",
@ -44,10 +44,10 @@
},
"cli": {
"name": "@modelcontextprotocol/inspector-cli",
"version": "0.16.1",
"version": "0.16.2",
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.13.1",
"@modelcontextprotocol/sdk": "^1.17.0",
"commander": "^13.1.0",
"spawn-rx": "^5.1.2"
},
@ -67,10 +67,10 @@
},
"client": {
"name": "@modelcontextprotocol/inspector-client",
"version": "0.16.1",
"version": "0.16.2",
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.14.0",
"@modelcontextprotocol/sdk": "^1.17.0",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-dialog": "^1.1.3",
"@radix-ui/react-icons": "^1.3.0",
@ -2009,9 +2009,9 @@
"link": true
},
"node_modules/@modelcontextprotocol/sdk": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.15.0.tgz",
"integrity": "sha512-67hnl/ROKdb03Vuu0YOr+baKTvf1/5YBHBm9KnZdjdAh8hjt4FRCPD5ucwxGB237sBpzlqQsLy1PFu7z/ekZ9Q==",
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.0.tgz",
"integrity": "sha512-qFfbWFA7r1Sd8D697L7GkTd36yqDuTkvz0KfOGkgXR8EUhQn3/EDNIR/qUdQNMT8IjmasBvHWuXeisxtXTQT2g==",
"license": "MIT",
"dependencies": {
"ajv": "^6.12.6",
@ -10989,10 +10989,10 @@
},
"server": {
"name": "@modelcontextprotocol/inspector-server",
"version": "0.16.1",
"version": "0.16.2",
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.13.1",
"@modelcontextprotocol/sdk": "^1.17.0",
"cors": "^2.8.5",
"express": "^5.1.0",
"ws": "^8.18.0",

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector",
"version": "0.16.1",
"version": "0.16.2",
"description": "Model Context Protocol inspector",
"license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)",
@ -47,10 +47,10 @@
"check-version": "node scripts/check-version-consistency.js"
},
"dependencies": {
"@modelcontextprotocol/inspector-cli": "^0.16.1",
"@modelcontextprotocol/inspector-client": "^0.16.1",
"@modelcontextprotocol/inspector-server": "^0.16.1",
"@modelcontextprotocol/sdk": "^1.14.0",
"@modelcontextprotocol/inspector-cli": "^0.16.2",
"@modelcontextprotocol/inspector-client": "^0.16.2",
"@modelcontextprotocol/inspector-server": "^0.16.2",
"@modelcontextprotocol/sdk": "^1.17.0",
"concurrently": "^9.0.1",
"open": "^10.1.0",
"shell-quote": "^1.8.2",

View file

@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/inspector-server",
"version": "0.16.1",
"version": "0.16.2",
"description": "Server-side application for the Model Context Protocol inspector",
"license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)",
@ -27,7 +27,7 @@
"typescript": "^5.6.2"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.13.1",
"@modelcontextprotocol/sdk": "^1.17.0",
"cors": "^2.8.5",
"express": "^5.1.0",
"ws": "^8.18.0",