@ai-me-chat/react 0.0.1 → 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 +74 -0
- package/package.json +18 -4
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @ai-me-chat/react
|
|
2
|
+
|
|
3
|
+
Drop-in React UI components for AI-Me — chat panel, command palette, confirmation dialog, and hooks.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ai-me-chat/react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
"use client";
|
|
15
|
+
|
|
16
|
+
import { AIMeProvider, AIMeChat } from "@ai-me-chat/react";
|
|
17
|
+
|
|
18
|
+
export function Providers({ children }: { children: React.ReactNode }) {
|
|
19
|
+
return (
|
|
20
|
+
<AIMeProvider endpoint="/api/ai-me">
|
|
21
|
+
{children}
|
|
22
|
+
<AIMeChat
|
|
23
|
+
suggestedPrompts={[
|
|
24
|
+
"Show me all projects",
|
|
25
|
+
"Create a new project",
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
</AIMeProvider>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Components
|
|
34
|
+
|
|
35
|
+
- **`<AIMeProvider>`** — context provider, connects to your AI-Me backend
|
|
36
|
+
- **`<AIMeChat>`** — floating chat panel with toggle (Cmd+.)
|
|
37
|
+
- **`<AIMeCommandPalette>`** — Cmd+K command palette
|
|
38
|
+
- **`<AIMeConfirm>`** — confirmation dialog for destructive actions
|
|
39
|
+
|
|
40
|
+
## Hooks
|
|
41
|
+
|
|
42
|
+
- **`useAIMe()`** — full chat state (messages, input, submit) for custom UIs
|
|
43
|
+
- **`useAIMeContext()`** — access provider context
|
|
44
|
+
|
|
45
|
+
## Theming
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<AIMeChat
|
|
49
|
+
theme={{
|
|
50
|
+
primaryColor: "#e11d48",
|
|
51
|
+
backgroundColor: "#0f172a",
|
|
52
|
+
textColor: "#f8fafc",
|
|
53
|
+
borderRadius: "8px",
|
|
54
|
+
fontFamily: "'Inter', sans-serif",
|
|
55
|
+
}}
|
|
56
|
+
/>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Peer Dependencies
|
|
60
|
+
|
|
61
|
+
| Package | Version |
|
|
62
|
+
|---------|---------|
|
|
63
|
+
| `@ai-sdk/react` | ^3.0.0 |
|
|
64
|
+
| `ai` | ^6.0.0 |
|
|
65
|
+
| `react` | ^19.0.0 |
|
|
66
|
+
| `react-dom` | ^19.0.0 |
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
Full setup guide and API reference: [github.com/aselims/ai-me-chat](https://github.com/aselims/ai-me-chat)
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-me-chat/react",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "AI-Me React UI components — chat panel, command palette, confirmation dialog",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ai",
|
|
8
|
+
"copilot",
|
|
9
|
+
"chatbot",
|
|
10
|
+
"react",
|
|
11
|
+
"chat-widget",
|
|
12
|
+
"command-palette",
|
|
13
|
+
"ai-assistant",
|
|
14
|
+
"vercel-ai-sdk"
|
|
15
|
+
],
|
|
6
16
|
"repository": {
|
|
7
17
|
"type": "git",
|
|
8
18
|
"url": "https://github.com/aselims/ai-me-chat",
|
|
9
19
|
"directory": "packages/react"
|
|
10
20
|
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20"
|
|
23
|
+
},
|
|
11
24
|
"type": "module",
|
|
12
25
|
"main": "./dist/index.cjs",
|
|
13
26
|
"module": "./dist/index.js",
|
|
@@ -20,7 +33,8 @@
|
|
|
20
33
|
}
|
|
21
34
|
},
|
|
22
35
|
"files": [
|
|
23
|
-
"dist"
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md"
|
|
24
38
|
],
|
|
25
39
|
"sideEffects": false,
|
|
26
40
|
"peerDependencies": {
|
|
@@ -30,10 +44,10 @@
|
|
|
30
44
|
"react-dom": "^19.0.0"
|
|
31
45
|
},
|
|
32
46
|
"dependencies": {
|
|
33
|
-
"@ai-
|
|
34
|
-
"@ai-me-chat/core": "0.0.1"
|
|
47
|
+
"@ai-me-chat/core": "0.1.0"
|
|
35
48
|
},
|
|
36
49
|
"devDependencies": {
|
|
50
|
+
"@ai-sdk/react": "^3.0.118",
|
|
37
51
|
"@testing-library/react": "^16.1.0",
|
|
38
52
|
"@types/react": "^19.0.0",
|
|
39
53
|
"@types/react-dom": "^19.0.0",
|