@mcp-use/client 2.1.5 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/core/session.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/index-browser.js +7 -5
- package/dist/index-browser.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +7 -5
- package/dist/react/index.js.map +1 -1
- package/dist/transport/base.d.ts +2 -1
- package/dist/transport/base.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1250,15 +1250,16 @@ var BaseConnector = class {
|
|
|
1250
1250
|
*
|
|
1251
1251
|
* @param name - Prompt name.
|
|
1252
1252
|
* @param args - Prompt arguments.
|
|
1253
|
+
* @param options - Per-request timeout, cancellation, and progress options.
|
|
1253
1254
|
* @returns The rendered prompt returned by the server.
|
|
1254
1255
|
*/
|
|
1255
|
-
async getPrompt(name, args) {
|
|
1256
|
+
async getPrompt(name, args, options) {
|
|
1256
1257
|
if (!this.client) {
|
|
1257
1258
|
throw new Error("MCP client is not connected");
|
|
1258
1259
|
}
|
|
1259
1260
|
logger.debug(`Getting prompt ${name}`);
|
|
1260
1261
|
return await this.executeRequest(
|
|
1261
|
-
() => this.client.getPrompt({ name, arguments: args })
|
|
1262
|
+
() => this.client.getPrompt({ name, arguments: args }, options)
|
|
1262
1263
|
);
|
|
1263
1264
|
}
|
|
1264
1265
|
/**
|
|
@@ -1900,7 +1901,7 @@ var HttpConnector = class extends BaseConnector {
|
|
|
1900
1901
|
};
|
|
1901
1902
|
|
|
1902
1903
|
// src/utils/version.ts
|
|
1903
|
-
var VERSION = "2.
|
|
1904
|
+
var VERSION = "2.2.0";
|
|
1904
1905
|
function getPackageVersion() {
|
|
1905
1906
|
return VERSION;
|
|
1906
1907
|
}
|
|
@@ -3912,6 +3913,7 @@ var MCPConnection = class {
|
|
|
3912
3913
|
*
|
|
3913
3914
|
* @param name - Name of the prompt to get
|
|
3914
3915
|
* @param args - Arguments for the prompt
|
|
3916
|
+
* @param options - Per-request timeout, cancellation, and progress options
|
|
3915
3917
|
* @returns Prompt result
|
|
3916
3918
|
*
|
|
3917
3919
|
* @example
|
|
@@ -3920,8 +3922,8 @@ var MCPConnection = class {
|
|
|
3920
3922
|
* console.log(prompt.messages);
|
|
3921
3923
|
* ```
|
|
3922
3924
|
*/
|
|
3923
|
-
async getPrompt(name, args) {
|
|
3924
|
-
return this.connector.getPrompt(name, args);
|
|
3925
|
+
async getPrompt(name, args, options) {
|
|
3926
|
+
return this.connector.getPrompt(name, args, options);
|
|
3925
3927
|
}
|
|
3926
3928
|
/**
|
|
3927
3929
|
* Send a raw request through the client.
|