1.5 KiB
1.5 KiB
Component API Reference
Complete prop reference for all TheSys C1 components.
<C1Chat>
Pre-built chat component with state management.
import { C1Chat } from "@thesysai/genui-sdk";
<C1Chat
apiUrl="/api/chat"
agentName="Assistant"
logoUrl="https://..."
theme={themeObject}
threadManager={threadManager}
threadListManager={threadListManager}
customizeC1={{ ... }}
/>
Props:
apiUrl(required): Backend API endpointagentName: Display name for AIlogoUrl: Avatar image URLtheme: Theme configuration objectthreadManager: For multi-thread supportthreadListManager: For thread list UIcustomizeC1: Custom components object
<C1Component>
Low-level renderer for custom integration.
import { C1Component } from "@thesysai/genui-sdk";
<C1Component
c1Response={response}
isStreaming={boolean}
updateMessage={(msg) => setResponse(msg)}
onAction={({ llmFriendlyMessage, rawAction }) => {...}}
/>
Props:
c1Response(required): C1 API response stringisStreaming: Shows loading indicatorupdateMessage: Callback for response updatesonAction: Handle user interactions
<ThemeProvider>
Theme wrapper component.
import { ThemeProvider } from "@thesysai/genui-sdk";
<ThemeProvider theme={customTheme} mode="dark">
<C1Component {...} />
</ThemeProvider>
Props:
theme: Theme objectmode: "light" | "dark" | "system"children: React nodes to wrap
For complete details, see SKILL.md.