@mcp-use/client 2.3.3-canary.0 → 2.3.3

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.
@@ -128,7 +128,7 @@ var Logger = class {
128
128
  var logger = Logger.get();
129
129
 
130
130
  // src/utils/version.ts
131
- var VERSION = "2.3.3-canary.0";
131
+ var VERSION = "2.3.3";
132
132
  function getPackageVersion() {
133
133
  return VERSION;
134
134
  }
package/dist/index.js CHANGED
@@ -1559,7 +1559,7 @@ init_connector_telemetry();
1559
1559
  init_logging();
1560
1560
 
1561
1561
  // src/utils/version.ts
1562
- var VERSION = "2.3.3-canary.0";
1562
+ var VERSION = "2.3.3";
1563
1563
  function getPackageVersion() {
1564
1564
  return VERSION;
1565
1565
  }
@@ -1880,7 +1880,7 @@ var HttpConnector = class extends BaseConnector {
1880
1880
  };
1881
1881
 
1882
1882
  // src/utils/version.ts
1883
- var VERSION = "2.3.3-canary.0";
1883
+ var VERSION = "2.3.3";
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
- return Promise.resolve();
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 });
@@ -9431,6 +9448,7 @@ function ViewRendererBase({
9431
9448
  {
9432
9449
  ref: iframeRef,
9433
9450
  title: `MCP App: ${toolName}`,
9451
+ style: { colorScheme: "normal" },
9434
9452
  className: showHostBorder ? "w-full h-full bg-transparent border border-border rounded-xl" : "w-full h-full bg-transparent border-0"
9435
9453
  }
9436
9454
  )