From f71613227f29703bcfe97fc645ed72e385bce9c2 Mon Sep 17 00:00:00 2001 From: Pulkit Sharma Date: Wed, 9 Apr 2025 00:40:42 +0530 Subject: [PATCH] rename --- client/src/App.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index dd7894f..68d67a9 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -275,7 +275,7 @@ const App = () => { setErrors((prev) => ({ ...prev, [tabKey]: null })); }; - const makeConnectionRequest = async ( + const sendMCPRequest = async ( request: ClientRequest, schema: T, tabKey?: keyof typeof errors, @@ -299,7 +299,7 @@ const App = () => { }; const listResources = async () => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "resources/list" as const, params: nextResourceCursor ? { cursor: nextResourceCursor } : {}, @@ -312,7 +312,7 @@ const App = () => { }; const listResourceTemplates = async () => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "resources/templates/list" as const, params: nextResourceTemplateCursor @@ -329,7 +329,7 @@ const App = () => { }; const readResource = async (uri: string) => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "resources/read" as const, params: { uri }, @@ -342,7 +342,7 @@ const App = () => { const subscribeToResource = async (uri: string) => { if (!resourceSubscriptions.has(uri)) { - await makeConnectionRequest( + await sendMCPRequest( { method: "resources/subscribe" as const, params: { uri }, @@ -358,7 +358,7 @@ const App = () => { const unsubscribeFromResource = async (uri: string) => { if (resourceSubscriptions.has(uri)) { - await makeConnectionRequest( + await sendMCPRequest( { method: "resources/unsubscribe" as const, params: { uri }, @@ -373,7 +373,7 @@ const App = () => { }; const listPrompts = async () => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "prompts/list" as const, params: nextPromptCursor ? { cursor: nextPromptCursor } : {}, @@ -386,7 +386,7 @@ const App = () => { }; const getPrompt = async (name: string, args: Record = {}) => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "prompts/get" as const, params: { name, arguments: args }, @@ -398,7 +398,7 @@ const App = () => { }; const listTools = async () => { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "tools/list" as const, params: nextToolCursor ? { cursor: nextToolCursor } : {}, @@ -412,7 +412,7 @@ const App = () => { const callTool = async (name: string, params: Record) => { try { - const response = await makeConnectionRequest( + const response = await sendMCPRequest( { method: "tools/call" as const, params: { @@ -446,7 +446,7 @@ const App = () => { }; const sendLogLevelRequest = async (level: LoggingLevel) => { - await makeConnectionRequest( + await sendMCPRequest( { method: "logging/setLevel" as const, params: { level }, @@ -664,7 +664,7 @@ const App = () => { { - void makeConnectionRequest( + void sendMCPRequest( { method: "ping" as const, },