@copilotz/chat-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @copilotz/chat-ui
2
+
3
+ Reusable Copilotz chat UI components (React + TypeScript).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @copilotz/chat-ui
9
+ ```
10
+
11
+ ## Styles
12
+
13
+ This package ships a compiled stylesheet. Import it once in your app:
14
+
15
+ ```ts
16
+ import '@copilotz/chat-ui/styles.css';
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```tsx
22
+ import { ChatUI, defaultChatConfig } from '@copilotz/chat-ui';
23
+
24
+ export function Example() {
25
+ return (
26
+ <ChatUI
27
+ config={defaultChatConfig}
28
+ user={{ id: 'user-1', name: 'User' }}
29
+ assistant={{ name: 'Assistant' }}
30
+ callbacks={{
31
+ onSendMessage: (content, attachments) => {
32
+ console.log(content, attachments);
33
+ }
34
+ }}
35
+ />
36
+ );
37
+ }
38
+ ```