How does Cap UI work in Nuwa?
You can build the UI with all the frontend framework and tech stacks you are fimiliar with. You UI will eventually be embeded via iframe in the Nuwa Client to the user. To enable more functions, you can use@nuwa-ai/ui-kit to interact with the Nuwa Client, such as making an AI streaming request, sending a prompt, or saving UI state. The communication between the UI and the Nuwa Client is done via postMessage function, ensuring security.
Currently, there are two types of UI you can build for your Cap: Artifact UI and MCP UI.
MCP UI

Artifact UI

@nuwa-ai/ui-kit but also can expose customized functions to the AI via MCP tools defined directly in the frontend.

