-
Notifications
You must be signed in to change notification settings - Fork 44
Add request display mode functionality to AppRenderer and McpClientApp #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add request display mode functionality to AppRenderer and McpClientApp #38
Conversation
|
thanks Gabe! I think this is perfect. could you please rebase/resolve branch conflicts so we can ship this? |
a7e2ce2 to
40897df
Compare
Add ui/request-display-mode JSON-RPC method that allows apps to request display mode changes from the host. - Add McpUiRequestDisplayModeRequest and McpUiRequestDisplayModeResult types - Add requestDisplayMode() method to App class for guest UI - Add onrequestdisplaymode handler to AppBridge for host-side handling - Update specification documentation with new JSON-RPC method - Regenerate schemas
40897df to
b51ccef
Compare
Hello @antonpk1, i updated the PR 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @gabe4coding, great work! 🙏
I left a comment on the spec. I think we should enforce the return value so app developers would be able to rely on it. Thoughts?
commit: |
Co-authored-by: Ido Salomon <idosalomon@gmail.com>
LGTM @idosal, this indeed would make the apps logic more clean and robust, relying on it |
Thanks @gabe4coding ! I see @martinalong also proposed a method to implement it in #152. I quite like the idea of simply returning the current state in the response (though I think it should be mandated as |
|
So sorry @gabe4coding , didn't realize you already had a PR out for this when I made #152. I'm new to this whole open source thing haha. Hope ya don't mind that we merged that one to unblock some ppl! Feel free to lmk if there's any suggestions you have for it |
|
Hello @martinalong no worry, as soon as we have the feature there, i don't mind! Great work! I will close this |
Introduce functionality for requesting and handling display mode changes in the AppRenderer and McpClientApp components.
Motivation and Context
This change allows the guest UI to request different display modes (inline, fullscreen, pip, carousel) from the host, enhancing user experience and flexibility in UI presentation.
This feature is part of OpenAI Apps SDK.
How Has This Been Tested?
Tested in a development environment by simulating display mode requests and verifying the responses and state updates in the UI.
Breaking Changes
No breaking changes are introduced.
Types of changes
Checklist
Additional context
The implementation includes a new request handler in the AppBridge for display mode changes and updates to the UI components to reflect the current display mode. Documentation for the new JSON-RPC method has also been added.