@mcpjam/widget-react 0.2.0 → 0.2.1
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3337,7 +3337,7 @@ function MCPAppsRendererSurface({
|
|
|
3337
3337
|
locale,
|
|
3338
3338
|
timeZone,
|
|
3339
3339
|
platform: baseHostContext.platform === "web" || baseHostContext.platform === "desktop" || baseHostContext.platform === "mobile" ? baseHostContext.platform : hostStyleDefinition.mcp.platform,
|
|
3340
|
-
userAgent: navigator.userAgent,
|
|
3340
|
+
userAgent: typeof baseHostContext.userAgent === "string" && baseHostContext.userAgent.length > 0 ? baseHostContext.userAgent : navigator.userAgent,
|
|
3341
3341
|
deviceCapabilities,
|
|
3342
3342
|
safeAreaInsets,
|
|
3343
3343
|
styles: mergedStyles
|
|
@@ -3926,11 +3926,11 @@ function MCPAppsRendererSurface({
|
|
|
3926
3926
|
}
|
|
3927
3927
|
} : {},
|
|
3928
3928
|
onUpdateModelContext: (ctxToolCallId, { content, structuredContent }) => {
|
|
3929
|
-
|
|
3929
|
+
onModelContextUpdateRef.current?.(ctxToolCallId, {
|
|
3930
3930
|
content,
|
|
3931
3931
|
structuredContent
|
|
3932
3932
|
});
|
|
3933
|
-
|
|
3933
|
+
setWidgetModelContextRef.current(ctxToolCallId, {
|
|
3934
3934
|
content,
|
|
3935
3935
|
structuredContent
|
|
3936
3936
|
});
|