@mcp-use/client 2.3.3-canary.1 → 2.3.4-canary.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/index-browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +23 -13
- package/dist/react/index.js.map +1 -1
- package/dist/react/view/ViewRenderer.d.ts.map +1 -1
- package/dist/react/view/inject-openai-file-apis.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index-browser.js
CHANGED
package/dist/index.js
CHANGED
package/dist/react/index.js
CHANGED
|
@@ -1880,7 +1880,7 @@ var HttpConnector = class extends BaseConnector {
|
|
|
1880
1880
|
};
|
|
1881
1881
|
|
|
1882
1882
|
// src/utils/version.ts
|
|
1883
|
-
var VERSION = "2.3.
|
|
1883
|
+
var VERSION = "2.3.4-canary.0";
|
|
1884
1884
|
function getPackageVersion() {
|
|
1885
1885
|
return VERSION;
|
|
1886
1886
|
}
|
|
@@ -8021,12 +8021,29 @@ var OPENAI_COMPATIBILITY_BRIDGE_SCRIPT = `<script>
|
|
|
8021
8021
|
api.requestDisplayMode = api.requestDisplayMode || function (request) {
|
|
8022
8022
|
return sendRequest("ui/request-display-mode", { mode: request.mode });
|
|
8023
8023
|
};
|
|
8024
|
+
function modelContextParams(modelContent) {
|
|
8025
|
+
if (typeof modelContent === "string") {
|
|
8026
|
+
return modelContent ? { content: [{ type: "text", text: modelContent }] } : undefined;
|
|
8027
|
+
}
|
|
8028
|
+
if (modelContent && typeof modelContent === "object" && !Array.isArray(modelContent)) {
|
|
8029
|
+
return { structuredContent: modelContent };
|
|
8030
|
+
}
|
|
8031
|
+
return undefined;
|
|
8032
|
+
}
|
|
8024
8033
|
api.setWidgetState = api.setWidgetState || function (state) {
|
|
8025
8034
|
dispatchGlobals({ widgetState: state });
|
|
8026
8035
|
// The Apps SDK setter is promise-based. Keep the local state update
|
|
8027
8036
|
// synchronous, but return a promise so legacy useWidget() code can safely
|
|
8028
8037
|
// await or chain .catch() on the compatibility API.
|
|
8029
|
-
|
|
8038
|
+
// Only modelContent is model-visible in ChatGPT; privateContent and
|
|
8039
|
+
// imageIds stay in the view. Surfaces without model context reject the
|
|
8040
|
+
// request, which must not reject the setter.
|
|
8041
|
+
var params = modelContextParams(state && state.modelContent);
|
|
8042
|
+
if (!params) return Promise.resolve();
|
|
8043
|
+
return sendRequest("ui/update-model-context", params).then(
|
|
8044
|
+
function () {},
|
|
8045
|
+
function () {}
|
|
8046
|
+
);
|
|
8030
8047
|
};
|
|
8031
8048
|
api.notifyIntrinsicHeight = api.notifyIntrinsicHeight || function (height) {
|
|
8032
8049
|
sendNotification("ui/notifications/size-changed", { height: height });
|
|
@@ -9088,17 +9105,10 @@ function ViewRendererBase({
|
|
|
9088
9105
|
const conn = connectionRef.current;
|
|
9089
9106
|
if (!conn) throw new Error("Server connection not available");
|
|
9090
9107
|
assertAppCanCallTool(conn.tools, name);
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
});
|
|
9096
|
-
} catch (error) {
|
|
9097
|
-
bridge?.sendToolCancelled({
|
|
9098
|
-
reason: error instanceof Error ? error.message : String(error)
|
|
9099
|
-
});
|
|
9100
|
-
throw error;
|
|
9101
|
-
}
|
|
9108
|
+
return await conn.callTool(name, args || {}, {
|
|
9109
|
+
timeout: toolCallTimeout,
|
|
9110
|
+
resetTimeoutOnProgress: true
|
|
9111
|
+
});
|
|
9102
9112
|
});
|
|
9103
9113
|
}
|
|
9104
9114
|
if (capabilities.serverResources) {
|