@cagent/chat-embedding-core 0.0.1 → 0.0.2
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/AGENTS.md +13 -13
- package/README.md +10 -10
- package/bun.lock +1548 -0
- package/dist/queries/sendMessageQuery.d.ts +1 -1
- package/dist/web.js +1 -1
- package/docs/chart-rendering-implementation-plan.md +2 -2
- package/package.json +5 -7
package/AGENTS.md
CHANGED
|
@@ -142,16 +142,16 @@
|
|
|
142
142
|
|
|
143
143
|
#### Validation Commands
|
|
144
144
|
|
|
145
|
-
- **Lint Fix Command:** `
|
|
146
|
-
- **Type Check Command:** `
|
|
147
|
-
- **Combined Command:** `
|
|
145
|
+
- **Lint Fix Command:** `bun run lint-fix`
|
|
146
|
+
- **Type Check Command:** `bun run type-check`
|
|
147
|
+
- **Combined Command:** `bun run lint-fix && bun run type-check`
|
|
148
148
|
|
|
149
149
|
#### Required Workflow
|
|
150
150
|
|
|
151
151
|
| Step | Action | Description |
|
|
152
152
|
| ---- | --------------- | -------------------------------------------------- |
|
|
153
153
|
| 1 | Write/Edit Code | Make your code changes |
|
|
154
|
-
| 2 | Run Validation | Execute `
|
|
154
|
+
| 2 | Run Validation | Execute `bun run lint-fix && bun run type-check` |
|
|
155
155
|
| 3 | Review Results | Check for any remaining errors |
|
|
156
156
|
| 4 | Fix Errors | Address all lint and type errors |
|
|
157
157
|
| 5 | Repeat | Run validation again until all errors are resolved |
|
|
@@ -169,16 +169,16 @@
|
|
|
169
169
|
|
|
170
170
|
#### Required Package Manager
|
|
171
171
|
|
|
172
|
-
- **Rule:** Use `
|
|
173
|
-
- **Requirement:** All package installations and script executions must use `
|
|
174
|
-
- **Prohibited:** Do NOT use `npm`, `pnpm`, or `
|
|
172
|
+
- **Rule:** Use `bun` as the package manager for this project
|
|
173
|
+
- **Requirement:** All package installations and script executions must use `bun`
|
|
174
|
+
- **Prohibited:** Do NOT use `npm`, `pnpm`, or `yarn`
|
|
175
175
|
- **Priority:** Critical
|
|
176
176
|
|
|
177
177
|
#### Examples
|
|
178
178
|
|
|
179
|
-
| Action | Correct
|
|
180
|
-
| -------------------- |
|
|
181
|
-
| Install dependencies | `
|
|
182
|
-
| Add package | `
|
|
183
|
-
| Run script | `
|
|
184
|
-
| Remove package | `
|
|
179
|
+
| Action | Correct | Incorrect |
|
|
180
|
+
| -------------------- | ---------------------- | ----------------------------- |
|
|
181
|
+
| Install dependencies | `bun install` | `npm install`, `yarn install` |
|
|
182
|
+
| Add package | `bun add <package>` | `npm install <package>` |
|
|
183
|
+
| Run script | `bun run <script>` | `npm run <script>` |
|
|
184
|
+
| Remove package | `bun remove <package>` | `npm uninstall <package>` |
|
package/README.md
CHANGED
|
@@ -7,13 +7,13 @@ Javascript library to display the Agent Studio chatbot on your website
|
|
|
7
7
|
Install:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
bun install --frozen-lockfile
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Dev:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
bun run dev
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to your backend:
|
|
@@ -32,7 +32,7 @@ A development server will be running on http://localhost:5678 automatically. Upd
|
|
|
32
32
|
Build:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
bun run build
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Embed in your HTML
|
|
@@ -41,7 +41,7 @@ yarn build
|
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
43
|
<script type="module">
|
|
44
|
-
import Chatbot from 'https://cdn.jsdelivr.net/npm/
|
|
44
|
+
import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
|
|
45
45
|
Chatbot.init({
|
|
46
46
|
chatflowid: '<chatflowid>',
|
|
47
47
|
apiHost: 'http://localhost:3000',
|
|
@@ -53,7 +53,7 @@ yarn build
|
|
|
53
53
|
|
|
54
54
|
```html
|
|
55
55
|
<script type="module">
|
|
56
|
-
import Chatbot from 'https://cdn.jsdelivr.net/npm/
|
|
56
|
+
import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
|
|
57
57
|
Chatbot.initFull({
|
|
58
58
|
chatflowid: '<chatflowid>',
|
|
59
59
|
apiHost: 'http://localhost:3000',
|
|
@@ -67,7 +67,7 @@ To enable full screen, add `margin: 0` to <code>body</code> style, and confirm y
|
|
|
67
67
|
```html
|
|
68
68
|
<body style="margin: 0">
|
|
69
69
|
<script type="module">
|
|
70
|
-
import Chatbot from 'https://cdn.jsdelivr.net/npm/
|
|
70
|
+
import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
|
|
71
71
|
Chatbot.initFull({
|
|
72
72
|
chatflowid: '<chatflowid>',
|
|
73
73
|
apiHost: 'http://localhost:3000',
|
|
@@ -88,7 +88,7 @@ You can also customize chatbot with different configuration
|
|
|
88
88
|
|
|
89
89
|
```html
|
|
90
90
|
<script type="module">
|
|
91
|
-
import Chatbot from 'https://cdn.jsdelivr.net/npm/
|
|
91
|
+
import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core/dist/web.js';
|
|
92
92
|
Chatbot.init({
|
|
93
93
|
chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f',
|
|
94
94
|
apiHost: 'http://localhost:3000',
|
|
@@ -153,16 +153,16 @@ agent1=xyz789-uvw456,https://sales.example.com
|
|
|
153
153
|
helpdesk=ghi123-jkl456,https://help.example.com,https://support.example.com
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
2. Install dependencies: (assuming you did not run `
|
|
156
|
+
2. Install dependencies: (assuming you did not run `bun install` yet)
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
|
-
|
|
159
|
+
bun install
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
3. Start proxy server:
|
|
163
163
|
|
|
164
164
|
```bash
|
|
165
|
-
|
|
165
|
+
bun run start
|
|
166
166
|
# Server will be available at:
|
|
167
167
|
# - Local: http://localhost:3001
|
|
168
168
|
# - Cloud: [Your Platform URL]
|