thesys-generative-ui
将 TheSys C1 Generative UI API 集成到 React 应用程序中的生产就绪技能。在构建人工智能驱动的界面时应使用此技能,该界面可传输交互式组件(表单、图表、表格)而不是纯文本响应。涵盖 Vite+React、Next.js 和 Cloudflare Workers 与 OpenAI、Anthropic Claude 和 Cloudflare Workers AI 的完整集成模式。包括使用 Zod 架构、主题、线程管理和生产部署的工具调用。防止超过 12 个常见集成错误,并为聊天界面、数据可视化和动态表单提供工作模板。在实现对话式 UI、AI 助手、搜索界面或任何需要具有流式 LLM 响应的实时生成用户界面的应用程序时,请使用此技能。关键词:TheSys C1、TheSys 生成式 UI、@thesysai/genui-sdk、生成式 UI、AI UI、流式 UI 组件、交互式组件、AI 表单、AI 图表、AI 表格、会话式 UI、AI 助手 UI、React 生成式 UI、V
📖 中文导读:将 TheSys C1 Generative UI API 集成到 React 应用程序中的生产就绪技能。在构建人工智能驱动的界面时应使用此技能,该界面可传输交互式组件(表单、图表、表格)而不是纯文本响应。涵盖 Vite+React、Next.js 和 Cloudflare Workers 与 OpenAI、Anthropic Claude 和 Cloudflare Workers AI 的完整集成模式。包括使用 Zod 架构、主题、线程管理和生产部署的工具调用。防止超过 12 个常见集成错误,并为聊天界面、数据可视化和动态表单提供工作模板。在实现对话式 UI、AI 助手、搜索界面或任何需要具有流式 LLM 响应的实时生成用户界面的应用程序时,请使用此技能。关键词:TheSys C1、TheSys 生成式 UI、@thesysai/genui-sdk、生成式 UI、AI UI、流式 UI 组件、交互式组件、AI 表单、AI 图表、AI 表格、会话式 UI、AI 助手 UI、React 生成式 UI、V 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: thesys-generative-ui description: AI-powered generative UI with Thesys - create React components from natural language. license: MIT
Thesys Generative UI
Last Updated: 2025-11-10
Quick Start
import { generateUI } from 'thesys';
const ui = await generateUI({
prompt: 'Create a user profile card with avatar, name, and email',
schema: {
type: 'component',
props: ['name', 'email', 'avatar']
}
});
export default function Profile() {
return <div>{ui}</div>;
}
Core Features
- Natural Language: Describe UI in plain English
- Schema-Driven: Type-safe component generation
- React Components: Generate production-ready components
- AI-Powered: Uses LLMs for intelligent design
Example
const form = await generateUI({
prompt: 'Create a contact form with name, email, and message fields',
theme: 'modern'
});
Resources
Core Documentation
references/what-is-thesys.md- What is TheSys C1, success metrics, getting startedreferences/use-cases-examples.md- When to use, 12 errors prevented, all templates catalogreferences/tool-calling.md- Complete tool calling guide with Zod schemasreferences/integration-guide.md- Complete setup for Vite, Next.js, Cloudflare Workers
Additional References
references/component-api.md- Complete component prop referencereferences/ai-provider-setup.md- OpenAI, Anthropic, Cloudflare Workers AI setupreferences/tool-calling-guide.md- Tool calling patternsreferences/theme-customization.md- Theme system deep divereferences/common-errors.md- Expanded error catalog
Templates (15+ files)
- Vite + React:
basic-chat.tsx,custom-component.tsx,tool-calling.tsx,theme-dark-mode.tsx - Next.js:
app/page.tsx,app/api/chat/route.ts,tool-calling-route.ts - Cloudflare Workers:
worker-backend.ts,frontend-setup.tsx - Utilities:
theme-config.ts,tool-schemas.ts,streaming-utils.ts
Official Docs: https://docs.thesys.dev | Playground: https://console.thesys.dev/playground