@@ -31,7 +31,7 @@ import {
3131 McpUiMessageResultSchema ,
3232 McpUiOpenLinkRequest ,
3333 McpUiOpenLinkResultSchema ,
34- McpUiSizeChangeNotification ,
34+ McpUiSizeChangedNotification ,
3535 McpUiToolInputNotification ,
3636 McpUiToolInputNotificationSchema ,
3737 McpUiToolInputPartialNotification ,
@@ -707,18 +707,18 @@ export class App extends Protocol<Request, Notification, Result> {
707707 *
708708 * @example Manually notify host of size change
709709 * ```typescript
710- * app.sendSizeChange ({
710+ * app.sendSizeChanged ({
711711 * width: 400,
712712 * height: 600
713713 * });
714714 * ```
715715 *
716716 * @returns Promise that resolves when the notification is sent
717717 *
718- * @see {@link McpUiSizeChangeNotification } for notification structure
718+ * @see {@link McpUiSizeChangedNotification } for notification structure
719719 */
720- sendSizeChange ( params : McpUiSizeChangeNotification [ "params" ] ) {
721- return this . notification ( < McpUiSizeChangeNotification > {
720+ sendSizeChanged ( params : McpUiSizeChangedNotification [ "params" ] ) {
721+ return this . notification ( < McpUiSizeChangedNotification > {
722722 method : "ui/notifications/size-changed" ,
723723 params,
724724 } ) ;
@@ -743,18 +743,18 @@ export class App extends Protocol<Request, Notification, Result> {
743743 * await app.connect(transport);
744744 *
745745 * // Later, enable auto-resize manually
746- * const cleanup = app.setupSizeChangeNotifications ();
746+ * const cleanup = app.setupSizeChangedNotifications ();
747747 *
748748 * // Clean up when done
749749 * cleanup();
750750 * ```
751751 */
752- setupSizeChangeNotifications ( ) {
752+ setupSizeChangedNotifications ( ) {
753753 let scheduled = false ;
754754 let lastWidth = 0 ;
755755 let lastHeight = 0 ;
756756
757- const sendBodySizeChange = ( ) => {
757+ const sendBodySizeChanged = ( ) => {
758758 if ( scheduled ) {
759759 return ;
760760 }
@@ -785,14 +785,14 @@ export class App extends Protocol<Request, Notification, Result> {
785785 if ( width !== lastWidth || height !== lastHeight ) {
786786 lastWidth = width ;
787787 lastHeight = height ;
788- this . sendSizeChange ( { width, height } ) ;
788+ this . sendSizeChanged ( { width, height } ) ;
789789 }
790790 } ) ;
791791 } ;
792792
793- sendBodySizeChange ( ) ;
793+ sendBodySizeChanged ( ) ;
794794
795- const resizeObserver = new ResizeObserver ( sendBodySizeChange ) ;
795+ const resizeObserver = new ResizeObserver ( sendBodySizeChanged ) ;
796796 // Observe both html and body to catch all size changes
797797 resizeObserver . observe ( document . documentElement ) ;
798798 resizeObserver . observe ( document . body ) ;
@@ -808,7 +808,7 @@ export class App extends Protocol<Request, Notification, Result> {
808808 * 2. Sends `ui/initialize` request with app info and capabilities
809809 * 3. Receives host capabilities and context in response
810810 * 4. Sends `ui/notifications/initialized` notification
811- * 5. Sets up auto-resize using {@link setupSizeChangeNotifications } if enabled (default)
811+ * 5. Sets up auto-resize using {@link setupSizeChangedNotifications } if enabled (default)
812812 *
813813 * If initialization fails, the connection is automatically closed and an error
814814 * is thrown.
@@ -869,7 +869,7 @@ export class App extends Protocol<Request, Notification, Result> {
869869 } ) ;
870870
871871 if ( this . options ?. autoResize ) {
872- this . setupSizeChangeNotifications ( ) ;
872+ this . setupSizeChangedNotifications ( ) ;
873873 }
874874 } catch ( error ) {
875875 // Disconnect if initialization fails.
0 commit comments