fix: change size-changed to be in correct tense (#83)

* fix: change size-changed to be in correct tense

* sdk changes
This commit is contained in:
Liad Yosef 2025-12-08 13:14:56 +02:00 • committed by GitHub
commit ba1a27e465
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ import {
import {
type McpUiSandboxResourceReadyNotification,
type McpUiSizeChangeNotification,
type McpUiSizeChangedNotification,
type McpUiToolInputNotification,
type McpUiToolInputPartialNotification,
type McpUiToolResultNotification,
@ -57,7 +57,7 @@ import {
McpUiResourceTeardownResultSchema,
McpUiSandboxProxyReadyNotification,
McpUiSandboxProxyReadyNotificationSchema,
McpUiSizeChangeNotificationSchema,
McpUiSizeChangedNotificationSchema,
} from "./types";
export * from "./types";
export { PostMessageTransport } from "./message-transport";
@ -265,12 +265,12 @@ export class AppBridge extends Protocol<Request, Notification, Result> {
/**
* Register a handler for size change notifications from the Guest UI.
*
* The Guest UI sends `ui/notifications/size-change` when its rendered content
* The Guest UI sends `ui/notifications/size-changed` when its rendered content
* size changes, typically via ResizeObserver. Set this callback to dynamically
* adjust the iframe container dimensions based on the Guest UI's content.
*
* Note: This is for Guest UI → Host communication. To notify the Guest UI of
* host viewport changes, use {@link app.App.sendSizeChange}.
* host viewport changes, use {@link app.App.sendSizeChanged}.
*
* @example
* ```typescript
@ -284,13 +284,13 @@ export class AppBridge extends Protocol<Request, Notification, Result> {
* };
* ```
*
* @see {@link McpUiSizeChangeNotification} for the notification type
* @see {@link app.App.sendSizeChange} for Host → Guest UI size notifications
* @see {@link McpUiSizeChangedNotification} for the notification type
* @see {@link app.App.sendSizeChanged} for Host → Guest UI size notifications
*/
set onsizechange(
callback: (params: McpUiSizeChangeNotification["params"]) => void,
callback: (params: McpUiSizeChangedNotification["params"]) => void,
) {
this.setNotificationHandler(McpUiSizeChangeNotificationSchema, (n) =>
this.setNotificationHandler(McpUiSizeChangedNotificationSchema, (n) =>
callback(n.params),
);
}