Update OpenUI Cloud ShadCN example#741
Open
AbhinRustagi wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rebuild examples/shadcn-chat as the OpenUI Cloud reference example. Instead of calling OpenAI directly with a build-time-generated system prompt, the example now sends its shadcn component library to Thesys backend per-request via
createResponsesInstructions({ componentLibrary })— Thesys backend generates the component system prompt server-side, validates model output against the library's schema. The demo shows the full cloud surface: conversation threads, frontend tokens, artifacts (slides/report), server-side search tools, and an app-side function-tool loop.Changes
api/chat/route.ts— swapped chat-completions + runTools against OpenAI for the Responses API against Thesys API (/v1/embed) with conversation threads andstore: true. Instructions carry the componentLibrary config block (shadcnLibraryConfig from lib/shadcn-genui/server).page.tsx— AgentInterface wired with the cloud llm transport, artifact renderers/categories..env.example(THESYS_API_KEY, OPENUI_MODEL, DEMO_USER_ID), lib/env.ts helpers; package.json gains @openuidev/thesys-server + openai.Test Plan
Checklist