reactbridge-sdk 0.1.0 → 0.1.1
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 +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@ A flexible React SDK for building intelligent conversational interfaces with LLM
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install
|
|
17
|
+
npm install reactbridge-sdk
|
|
18
18
|
# or
|
|
19
|
-
yarn add
|
|
19
|
+
yarn add reactbridge-sdk
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Quick Start
|
|
@@ -24,7 +24,7 @@ yarn add @reactbridge/sdk
|
|
|
24
24
|
### 1. Wrap your app with the Provider
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
|
-
import { ReactBridgeProvider } from '
|
|
27
|
+
import { ReactBridgeProvider } from 'reactbridge-sdk';
|
|
28
28
|
|
|
29
29
|
function App() {
|
|
30
30
|
return (
|
|
@@ -38,7 +38,7 @@ function App() {
|
|
|
38
38
|
### 2. Use the Chatbox Component
|
|
39
39
|
|
|
40
40
|
```tsx
|
|
41
|
-
import { ReactBridgeChatbox } from '
|
|
41
|
+
import { ReactBridgeChatbox } from 'reactbridge-sdk';
|
|
42
42
|
|
|
43
43
|
function ChatPage() {
|
|
44
44
|
const handleAction = async (toolCall) => {
|
|
@@ -160,7 +160,7 @@ interface UseReactBridgeReturn {
|
|
|
160
160
|
**Example:**
|
|
161
161
|
|
|
162
162
|
```tsx
|
|
163
|
-
import { useReactBridge } from '
|
|
163
|
+
import { useReactBridge } from 'reactbridge-sdk';
|
|
164
164
|
|
|
165
165
|
function CustomChat() {
|
|
166
166
|
const { messages, isLoading, sendChatQuery } = useReactBridge({
|
|
@@ -182,7 +182,7 @@ function CustomChat() {
|
|
|
182
182
|
### Built-in Themes
|
|
183
183
|
|
|
184
184
|
```tsx
|
|
185
|
-
import { lightTheme, darkTheme } from '
|
|
185
|
+
import { lightTheme, darkTheme } from 'reactbridge-sdk';
|
|
186
186
|
|
|
187
187
|
<ReactBridgeProvider theme={darkTheme}>
|
|
188
188
|
<App />
|
|
@@ -192,7 +192,7 @@ import { lightTheme, darkTheme } from '@reactbridge/sdk';
|
|
|
192
192
|
### Custom Theme
|
|
193
193
|
|
|
194
194
|
```tsx
|
|
195
|
-
import { createCustomTheme, lightTheme } from '
|
|
195
|
+
import { createCustomTheme, lightTheme } from 'reactbridge-sdk';
|
|
196
196
|
|
|
197
197
|
const myTheme = createCustomTheme(lightTheme, {
|
|
198
198
|
colors: {
|
|
@@ -370,7 +370,7 @@ import type {
|
|
|
370
370
|
InterfaceState,
|
|
371
371
|
ChatMessage,
|
|
372
372
|
Theme
|
|
373
|
-
} from '
|
|
373
|
+
} from 'reactbridge-sdk';
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
## Examples
|
package/package.json
CHANGED