@oyehello/chat 0.1.1 → 0.3.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 +18 -2
- package/dist/index.cjs +858 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.global.js +3797 -182
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +854 -121
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# @oyehello/chat
|
|
2
2
|
|
|
3
|
-
Framework-agnostic embeddable chat for oyehello agents — a `<oyehello-chat>` web component
|
|
3
|
+
Framework-agnostic embeddable chat for oyehello agents — a `<oyehello-chat>` web component that renders a **floating chat launcher** (bottom-right; click to open a chat window), plus a headless `createChatClient()` for custom UIs. Zero framework dependencies.
|
|
4
|
+
|
|
5
|
+
The widget connects lazily (a session opens the first time the visitor opens the panel), renders assistant replies as **markdown** (sanitized), and has a full launcher → panel experience: an unread badge, expand/maximize, an emoji picker, file attach, a jump-to-latest control, smart auto-scroll, an optional teaser nudge, quick-reply suggestions, and a privacy footer. It follows the visitor's OS light/dark theme by default. Theme the accent with the `--oc-accent` CSS variable. Just drop the tag anywhere on the page; it positions itself as a floating launcher.
|
|
6
|
+
|
|
7
|
+
### Attributes
|
|
8
|
+
|
|
9
|
+
| Attribute | Required | What it is |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `api-key` | yes | Publishable key (`ohk_pub_…`) |
|
|
12
|
+
| `agent-id` | yes | The chat agent (`agt_…`) |
|
|
13
|
+
| `base-url` | yes | API origin, e.g. `https://api.oyehello.ai` |
|
|
14
|
+
| `title` | no | Header title (defaults to the agent's name) |
|
|
15
|
+
| `theme` | no | `auto` (default, follows the OS), `light`, or `dark` |
|
|
16
|
+
| `teaser` | no | Text for a one-time nudge bubble; omit to disable |
|
|
17
|
+
| `suggestions` | no | Comma-separated quick-reply chips, e.g. `"Book a demo, Pricing"` |
|
|
18
|
+
| `privacy-url` | no | Shows a Privacy-Policy footer linking here |
|
|
19
|
+
| `--oc-accent` (CSS var) | no | Brand accent (default `#096DD9`) |
|
|
4
20
|
|
|
5
21
|
## Install
|
|
6
22
|
```bash
|
|
@@ -75,5 +91,5 @@ Register handlers BEFORE `start()` — only tools registered at open are offered
|
|
|
75
91
|
|
|
76
92
|
## Requirements
|
|
77
93
|
- `api-key` is a **publishable** key (`ohk_pub_…`) created in the oyehello console.
|
|
78
|
-
- The agent must
|
|
94
|
+
- The agent must be a **chat-channel agent** (the channel is chosen when the agent is created; a call agent can't answer chat).
|
|
79
95
|
- The page's origin must be on the publishable key's **allowlist**.
|