@agno-hq/chat-react 0.3.3 → 0.3.4

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.
Files changed (33) hide show
  1. package/README.md +46 -0
  2. package/dist/chat/index.cjs +90 -86
  3. package/dist/chat/index.d.cts +55 -43
  4. package/dist/chat/index.d.ts +55 -43
  5. package/dist/chat/index.js +2 -2
  6. package/dist/{chunk-RE7ZT73K.js → chunk-5QKU7OPE.js} +2 -2
  7. package/dist/{chunk-RE7ZT73K.js.map → chunk-5QKU7OPE.js.map} +1 -1
  8. package/dist/{chunk-6V2YIPHF.js → chunk-BCVKAMSO.js} +22 -4
  9. package/dist/chunk-BCVKAMSO.js.map +1 -0
  10. package/dist/{chunk-3IEYJIYJ.cjs → chunk-ESV52ERB.cjs} +620 -318
  11. package/dist/chunk-ESV52ERB.cjs.map +1 -0
  12. package/dist/{chunk-2WM3CCFE.cjs → chunk-HBSF434L.cjs} +2 -2
  13. package/dist/{chunk-2WM3CCFE.cjs.map → chunk-HBSF434L.cjs.map} +1 -1
  14. package/dist/{chunk-E4CFQ457.js → chunk-OGDPK4Z3.js} +586 -285
  15. package/dist/chunk-OGDPK4Z3.js.map +1 -0
  16. package/dist/{chunk-55HQJGLP.cjs → chunk-Y34YRC5T.cjs} +22 -3
  17. package/dist/chunk-Y34YRC5T.cjs.map +1 -0
  18. package/dist/{client-DUyVqxU9.d.cts → client-Dwk6ThnW.d.cts} +24 -12
  19. package/dist/{client-DUyVqxU9.d.ts → client-Dwk6ThnW.d.ts} +24 -12
  20. package/dist/core/index.cjs +23 -23
  21. package/dist/core/index.d.cts +2 -2
  22. package/dist/core/index.d.ts +2 -2
  23. package/dist/core/index.js +2 -2
  24. package/dist/index.cjs +113 -109
  25. package/dist/index.d.cts +2 -2
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.js +3 -3
  28. package/dist/styles.css +22 -15
  29. package/package.json +11 -9
  30. package/dist/chunk-3IEYJIYJ.cjs.map +0 -1
  31. package/dist/chunk-55HQJGLP.cjs.map +0 -1
  32. package/dist/chunk-6V2YIPHF.js.map +0 -1
  33. package/dist/chunk-E4CFQ457.js.map +0 -1
package/README.md CHANGED
@@ -118,6 +118,52 @@ function Chat() {
118
118
  `entity.type` is `'agent' | 'team' | 'workflow'` and `entity.id` is the
119
119
  agent/team/workflow id — the same hook drives all three.
120
120
 
121
+ ### Buffered streaming
122
+
123
+ Plain text is batched so the answer reveals in smooth steps instead of one
124
+ character at a time. The first text of an answer is shown immediately; after
125
+ that, text accumulates for 150 ms and each flush fades in as one batch. Tool
126
+ calls, media, pauses, errors and completion are never delayed: each one flushes
127
+ the pending text ahead of it, so the transcript always stays in order.
128
+
129
+ ```tsx
130
+ <AgnoChat
131
+ baseUrl="http://localhost:7777"
132
+ streaming={{ flushIntervalMs: 150, maxBufferEvents: 100, maxBufferChars: 16_384 }}
133
+ />
134
+ ```
135
+
136
+ The same `streaming` prop works on `useAgnoChat` and `<ChatProvider>`.
137
+
138
+ | Option | Default | Effect |
139
+ |---|---|---|
140
+ | `enabled` | `true` | `false` delivers every event as it arrives. |
141
+ | `flushIntervalMs` | `150` | How long text accumulates before a flush. `0` disables buffering. |
142
+ | `maxBufferEvents` | `100` | Flush early once this many events are pending. |
143
+ | `maxBufferChars` | `16384` | Flush early once this many characters are pending. |
144
+
145
+ Settings are read when a run or continuation starts, so changing the prop
146
+ affects the next one. A hidden tab flushes immediately, since nothing is
147
+ painting. Invalid values fall back to the defaults. `DEFAULT_STREAMING_OPTIONS`
148
+ and `StreamingOptions` are exported from the root and `/chat` entry points.
149
+
150
+ What stays immediate:
151
+
152
+ - `onEvent` receives every raw event as it arrives, unbuffered.
153
+ - `events`, `currentEvent` and each message's event log update per batch, with
154
+ every original event preserved in order.
155
+ - Cancelling keeps the text already received. Switching sessions keeps the
156
+ buffer with its run; deleting the session or unmounting discards it.
157
+ - `AgnoClient` and `streamRun` are never buffered.
158
+
159
+ Each batch fades in through Streamdown's own animation, with every word of a
160
+ batch starting together. Fenced code stays plain until the run completes, then
161
+ highlights. Reduced motion turns the fade off. Pass `animated` in `options` on
162
+ `<Markdown>` to change or disable it.
163
+
164
+ Try **Streaming / Buffered** in Storybook to compare the defaults, a longer
165
+ buffer and per-event updates.
166
+
121
167
  ### What the hook returns
122
168
 
123
169
  | Value | Type | Description |
@@ -1,346 +1,350 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
- var chunk3IEYJIYJ_cjs = require('../chunk-3IEYJIYJ.cjs');
5
- require('../chunk-55HQJGLP.cjs');
4
+ var chunkESV52ERB_cjs = require('../chunk-ESV52ERB.cjs');
5
+ require('../chunk-Y34YRC5T.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "AgnoChat", {
10
10
  enumerable: true,
11
- get: function () { return chunk3IEYJIYJ_cjs.AgnoChat; }
11
+ get: function () { return chunkESV52ERB_cjs.AgnoChat; }
12
12
  });
13
13
  Object.defineProperty(exports, "AgnoMark", {
14
14
  enumerable: true,
15
- get: function () { return chunk3IEYJIYJ_cjs.AgnoMark; }
15
+ get: function () { return chunkESV52ERB_cjs.AgnoMark; }
16
16
  });
17
17
  Object.defineProperty(exports, "ArrowUp", {
18
18
  enumerable: true,
19
- get: function () { return chunk3IEYJIYJ_cjs.ArrowUp; }
19
+ get: function () { return chunkESV52ERB_cjs.ArrowUp; }
20
20
  });
21
21
  Object.defineProperty(exports, "BehindTheScenes", {
22
22
  enumerable: true,
23
- get: function () { return chunk3IEYJIYJ_cjs.BehindTheScenes; }
23
+ get: function () { return chunkESV52ERB_cjs.BehindTheScenes; }
24
24
  });
25
25
  Object.defineProperty(exports, "BookOpen", {
26
26
  enumerable: true,
27
- get: function () { return chunk3IEYJIYJ_cjs.BookOpen; }
27
+ get: function () { return chunkESV52ERB_cjs.BookOpen; }
28
28
  });
29
29
  Object.defineProperty(exports, "Box", {
30
30
  enumerable: true,
31
- get: function () { return chunk3IEYJIYJ_cjs.Box; }
31
+ get: function () { return chunkESV52ERB_cjs.Box; }
32
32
  });
33
33
  Object.defineProperty(exports, "Brain", {
34
34
  enumerable: true,
35
- get: function () { return chunk3IEYJIYJ_cjs.Brain; }
35
+ get: function () { return chunkESV52ERB_cjs.Brain; }
36
36
  });
37
37
  Object.defineProperty(exports, "ChatBubble", {
38
38
  enumerable: true,
39
- get: function () { return chunk3IEYJIYJ_cjs.ChatBubble; }
39
+ get: function () { return chunkESV52ERB_cjs.ChatBubble; }
40
40
  });
41
41
  Object.defineProperty(exports, "ChatInput", {
42
42
  enumerable: true,
43
- get: function () { return chunk3IEYJIYJ_cjs.ChatInput; }
43
+ get: function () { return chunkESV52ERB_cjs.ChatInput; }
44
44
  });
45
45
  Object.defineProperty(exports, "ChatLauncher", {
46
46
  enumerable: true,
47
- get: function () { return chunk3IEYJIYJ_cjs.ChatLauncher; }
47
+ get: function () { return chunkESV52ERB_cjs.ChatLauncher; }
48
48
  });
49
49
  Object.defineProperty(exports, "ChatProvider", {
50
50
  enumerable: true,
51
- get: function () { return chunk3IEYJIYJ_cjs.ChatProvider; }
51
+ get: function () { return chunkESV52ERB_cjs.ChatProvider; }
52
52
  });
53
53
  Object.defineProperty(exports, "ChatWindow", {
54
54
  enumerable: true,
55
- get: function () { return chunk3IEYJIYJ_cjs.ChatWindow; }
55
+ get: function () { return chunkESV52ERB_cjs.ChatWindow; }
56
56
  });
57
57
  Object.defineProperty(exports, "Check", {
58
58
  enumerable: true,
59
- get: function () { return chunk3IEYJIYJ_cjs.Check; }
59
+ get: function () { return chunkESV52ERB_cjs.Check; }
60
60
  });
61
61
  Object.defineProperty(exports, "ChevronDown", {
62
62
  enumerable: true,
63
- get: function () { return chunk3IEYJIYJ_cjs.ChevronDown; }
63
+ get: function () { return chunkESV52ERB_cjs.ChevronDown; }
64
64
  });
65
65
  Object.defineProperty(exports, "Citations", {
66
66
  enumerable: true,
67
- get: function () { return chunk3IEYJIYJ_cjs.Citations; }
67
+ get: function () { return chunkESV52ERB_cjs.Citations; }
68
68
  });
69
69
  Object.defineProperty(exports, "Close", {
70
70
  enumerable: true,
71
- get: function () { return chunk3IEYJIYJ_cjs.Close; }
71
+ get: function () { return chunkESV52ERB_cjs.Close; }
72
72
  });
73
73
  Object.defineProperty(exports, "Copy", {
74
74
  enumerable: true,
75
- get: function () { return chunk3IEYJIYJ_cjs.Copy; }
75
+ get: function () { return chunkESV52ERB_cjs.Copy; }
76
76
  });
77
77
  Object.defineProperty(exports, "CopyButton", {
78
78
  enumerable: true,
79
- get: function () { return chunk3IEYJIYJ_cjs.CopyButton; }
79
+ get: function () { return chunkESV52ERB_cjs.CopyButton; }
80
+ });
81
+ Object.defineProperty(exports, "DEFAULT_STREAMING_OPTIONS", {
82
+ enumerable: true,
83
+ get: function () { return chunkESV52ERB_cjs.DEFAULT_STREAMING_OPTIONS; }
80
84
  });
81
85
  Object.defineProperty(exports, "EntityBadge", {
82
86
  enumerable: true,
83
- get: function () { return chunk3IEYJIYJ_cjs.EntityBadge; }
87
+ get: function () { return chunkESV52ERB_cjs.EntityBadge; }
84
88
  });
85
89
  Object.defineProperty(exports, "EntitySelector", {
86
90
  enumerable: true,
87
- get: function () { return chunk3IEYJIYJ_cjs.EntitySelector; }
91
+ get: function () { return chunkESV52ERB_cjs.EntitySelector; }
88
92
  });
89
93
  Object.defineProperty(exports, "EventLog", {
90
94
  enumerable: true,
91
- get: function () { return chunk3IEYJIYJ_cjs.EventLog; }
95
+ get: function () { return chunkESV52ERB_cjs.EventLog; }
92
96
  });
93
97
  Object.defineProperty(exports, "Favicon", {
94
98
  enumerable: true,
95
- get: function () { return chunk3IEYJIYJ_cjs.Favicon; }
99
+ get: function () { return chunkESV52ERB_cjs.Favicon; }
96
100
  });
97
101
  Object.defineProperty(exports, "FileAudio", {
98
102
  enumerable: true,
99
- get: function () { return chunk3IEYJIYJ_cjs.FileAudio; }
103
+ get: function () { return chunkESV52ERB_cjs.FileAudio; }
100
104
  });
101
105
  Object.defineProperty(exports, "FileIcon", {
102
106
  enumerable: true,
103
- get: function () { return chunk3IEYJIYJ_cjs.FileIcon; }
107
+ get: function () { return chunkESV52ERB_cjs.FileIcon; }
104
108
  });
105
109
  Object.defineProperty(exports, "FilePreview", {
106
110
  enumerable: true,
107
- get: function () { return chunk3IEYJIYJ_cjs.FilePreview; }
111
+ get: function () { return chunkESV52ERB_cjs.FilePreview; }
108
112
  });
109
113
  Object.defineProperty(exports, "FileType", {
110
114
  enumerable: true,
111
- get: function () { return chunk3IEYJIYJ_cjs.FileType; }
115
+ get: function () { return chunkESV52ERB_cjs.FileType; }
112
116
  });
113
117
  Object.defineProperty(exports, "FileVideo", {
114
118
  enumerable: true,
115
- get: function () { return chunk3IEYJIYJ_cjs.FileVideo; }
119
+ get: function () { return chunkESV52ERB_cjs.FileVideo; }
116
120
  });
117
121
  Object.defineProperty(exports, "Followups", {
118
122
  enumerable: true,
119
- get: function () { return chunk3IEYJIYJ_cjs.Followups; }
123
+ get: function () { return chunkESV52ERB_cjs.Followups; }
120
124
  });
121
125
  Object.defineProperty(exports, "Globe", {
122
126
  enumerable: true,
123
- get: function () { return chunk3IEYJIYJ_cjs.Globe; }
127
+ get: function () { return chunkESV52ERB_cjs.Globe; }
124
128
  });
125
129
  Object.defineProperty(exports, "GridLoader", {
126
130
  enumerable: true,
127
- get: function () { return chunk3IEYJIYJ_cjs.GridLoader; }
131
+ get: function () { return chunkESV52ERB_cjs.GridLoader; }
128
132
  });
129
133
  Object.defineProperty(exports, "HoverPreview", {
130
134
  enumerable: true,
131
- get: function () { return chunk3IEYJIYJ_cjs.HoverPreview; }
135
+ get: function () { return chunkESV52ERB_cjs.HoverPreview; }
132
136
  });
133
137
  Object.defineProperty(exports, "HumanInput", {
134
138
  enumerable: true,
135
- get: function () { return chunk3IEYJIYJ_cjs.HumanInput; }
139
+ get: function () { return chunkESV52ERB_cjs.HumanInput; }
136
140
  });
137
141
  Object.defineProperty(exports, "LinkIcon", {
138
142
  enumerable: true,
139
- get: function () { return chunk3IEYJIYJ_cjs.LinkIcon; }
143
+ get: function () { return chunkESV52ERB_cjs.LinkIcon; }
140
144
  });
141
145
  Object.defineProperty(exports, "LinkPreviewCard", {
142
146
  enumerable: true,
143
- get: function () { return chunk3IEYJIYJ_cjs.LinkPreviewCard; }
147
+ get: function () { return chunkESV52ERB_cjs.LinkPreviewCard; }
144
148
  });
145
149
  Object.defineProperty(exports, "Markdown", {
146
150
  enumerable: true,
147
- get: function () { return chunk3IEYJIYJ_cjs.Markdown; }
151
+ get: function () { return chunkESV52ERB_cjs.Markdown; }
148
152
  });
149
153
  Object.defineProperty(exports, "MemberResponses", {
150
154
  enumerable: true,
151
- get: function () { return chunk3IEYJIYJ_cjs.MemberResponses; }
155
+ get: function () { return chunkESV52ERB_cjs.MemberResponses; }
152
156
  });
153
157
  Object.defineProperty(exports, "Memory", {
154
158
  enumerable: true,
155
- get: function () { return chunk3IEYJIYJ_cjs.Memory; }
159
+ get: function () { return chunkESV52ERB_cjs.Memory; }
156
160
  });
157
161
  Object.defineProperty(exports, "Message", {
158
162
  enumerable: true,
159
- get: function () { return chunk3IEYJIYJ_cjs.Message; }
163
+ get: function () { return chunkESV52ERB_cjs.Message; }
160
164
  });
161
165
  Object.defineProperty(exports, "MessageActions", {
162
166
  enumerable: true,
163
- get: function () { return chunk3IEYJIYJ_cjs.MessageActions; }
167
+ get: function () { return chunkESV52ERB_cjs.MessageActions; }
164
168
  });
165
169
  Object.defineProperty(exports, "MessageList", {
166
170
  enumerable: true,
167
- get: function () { return chunk3IEYJIYJ_cjs.MessageList; }
171
+ get: function () { return chunkESV52ERB_cjs.MessageList; }
168
172
  });
169
173
  Object.defineProperty(exports, "Multimedia", {
170
174
  enumerable: true,
171
- get: function () { return chunk3IEYJIYJ_cjs.Multimedia; }
175
+ get: function () { return chunkESV52ERB_cjs.Multimedia; }
172
176
  });
173
177
  Object.defineProperty(exports, "Paperclip", {
174
178
  enumerable: true,
175
- get: function () { return chunk3IEYJIYJ_cjs.Paperclip; }
179
+ get: function () { return chunkESV52ERB_cjs.Paperclip; }
176
180
  });
177
181
  Object.defineProperty(exports, "Plus", {
178
182
  enumerable: true,
179
- get: function () { return chunk3IEYJIYJ_cjs.Plus; }
183
+ get: function () { return chunkESV52ERB_cjs.Plus; }
180
184
  });
181
185
  Object.defineProperty(exports, "Pulse", {
182
186
  enumerable: true,
183
- get: function () { return chunk3IEYJIYJ_cjs.Pulse; }
187
+ get: function () { return chunkESV52ERB_cjs.Pulse; }
184
188
  });
185
189
  Object.defineProperty(exports, "QuickPrompts", {
186
190
  enumerable: true,
187
- get: function () { return chunk3IEYJIYJ_cjs.QuickPrompts; }
191
+ get: function () { return chunkESV52ERB_cjs.QuickPrompts; }
188
192
  });
189
193
  Object.defineProperty(exports, "Reasoning", {
190
194
  enumerable: true,
191
- get: function () { return chunk3IEYJIYJ_cjs.Reasoning; }
195
+ get: function () { return chunkESV52ERB_cjs.Reasoning; }
192
196
  });
193
197
  Object.defineProperty(exports, "Rerun", {
194
198
  enumerable: true,
195
- get: function () { return chunk3IEYJIYJ_cjs.Rerun; }
199
+ get: function () { return chunkESV52ERB_cjs.Rerun; }
196
200
  });
197
201
  Object.defineProperty(exports, "SessionList", {
198
202
  enumerable: true,
199
- get: function () { return chunk3IEYJIYJ_cjs.SessionList; }
203
+ get: function () { return chunkESV52ERB_cjs.SessionList; }
200
204
  });
201
205
  Object.defineProperty(exports, "SourceCard", {
202
206
  enumerable: true,
203
- get: function () { return chunk3IEYJIYJ_cjs.SourceCard; }
207
+ get: function () { return chunkESV52ERB_cjs.SourceCard; }
204
208
  });
205
209
  Object.defineProperty(exports, "SourcesProvider", {
206
210
  enumerable: true,
207
- get: function () { return chunk3IEYJIYJ_cjs.SourcesProvider; }
211
+ get: function () { return chunkESV52ERB_cjs.SourcesProvider; }
208
212
  });
209
213
  Object.defineProperty(exports, "Spinner", {
210
214
  enumerable: true,
211
- get: function () { return chunk3IEYJIYJ_cjs.Spinner; }
215
+ get: function () { return chunkESV52ERB_cjs.Spinner; }
212
216
  });
213
217
  Object.defineProperty(exports, "StatusIndicator", {
214
218
  enumerable: true,
215
- get: function () { return chunk3IEYJIYJ_cjs.StatusIndicator; }
219
+ get: function () { return chunkESV52ERB_cjs.StatusIndicator; }
216
220
  });
217
221
  Object.defineProperty(exports, "Stop", {
218
222
  enumerable: true,
219
- get: function () { return chunk3IEYJIYJ_cjs.Stop; }
223
+ get: function () { return chunkESV52ERB_cjs.Stop; }
220
224
  });
221
225
  Object.defineProperty(exports, "TeamGlyph", {
222
226
  enumerable: true,
223
- get: function () { return chunk3IEYJIYJ_cjs.TeamGlyph; }
227
+ get: function () { return chunkESV52ERB_cjs.TeamGlyph; }
224
228
  });
225
229
  Object.defineProperty(exports, "ToolCalls", {
226
230
  enumerable: true,
227
- get: function () { return chunk3IEYJIYJ_cjs.ToolCalls; }
231
+ get: function () { return chunkESV52ERB_cjs.ToolCalls; }
228
232
  });
229
233
  Object.defineProperty(exports, "Trash", {
230
234
  enumerable: true,
231
- get: function () { return chunk3IEYJIYJ_cjs.Trash; }
235
+ get: function () { return chunkESV52ERB_cjs.Trash; }
232
236
  });
233
237
  Object.defineProperty(exports, "WorkflowSteps", {
234
238
  enumerable: true,
235
- get: function () { return chunk3IEYJIYJ_cjs.WorkflowSteps; }
239
+ get: function () { return chunkESV52ERB_cjs.WorkflowSteps; }
236
240
  });
237
241
  Object.defineProperty(exports, "Wrench", {
238
242
  enumerable: true,
239
- get: function () { return chunk3IEYJIYJ_cjs.Wrench; }
243
+ get: function () { return chunkESV52ERB_cjs.Wrench; }
240
244
  });
241
245
  Object.defineProperty(exports, "admitFiles", {
242
246
  enumerable: true,
243
- get: function () { return chunk3IEYJIYJ_cjs.admitFiles; }
247
+ get: function () { return chunkESV52ERB_cjs.admitFiles; }
244
248
  });
245
249
  Object.defineProperty(exports, "behindTheScenesItems", {
246
250
  enumerable: true,
247
- get: function () { return chunk3IEYJIYJ_cjs.behindTheScenesItems; }
251
+ get: function () { return chunkESV52ERB_cjs.behindTheScenesItems; }
248
252
  });
249
253
  Object.defineProperty(exports, "behindTheScenesLabel", {
250
254
  enumerable: true,
251
- get: function () { return chunk3IEYJIYJ_cjs.behindTheScenesLabel; }
255
+ get: function () { return chunkESV52ERB_cjs.behindTheScenesLabel; }
252
256
  });
253
257
  Object.defineProperty(exports, "collectSources", {
254
258
  enumerable: true,
255
- get: function () { return chunk3IEYJIYJ_cjs.collectSources; }
259
+ get: function () { return chunkESV52ERB_cjs.collectSources; }
256
260
  });
257
261
  Object.defineProperty(exports, "displayUrl", {
258
262
  enumerable: true,
259
- get: function () { return chunk3IEYJIYJ_cjs.displayUrl; }
263
+ get: function () { return chunkESV52ERB_cjs.displayUrl; }
260
264
  });
261
265
  Object.defineProperty(exports, "faviconFallbacks", {
262
266
  enumerable: true,
263
- get: function () { return chunk3IEYJIYJ_cjs.faviconFallbacks; }
267
+ get: function () { return chunkESV52ERB_cjs.faviconFallbacks; }
264
268
  });
265
269
  Object.defineProperty(exports, "faviconUrl", {
266
270
  enumerable: true,
267
- get: function () { return chunk3IEYJIYJ_cjs.faviconUrl; }
271
+ get: function () { return chunkESV52ERB_cjs.faviconUrl; }
268
272
  });
269
273
  Object.defineProperty(exports, "fileAccepted", {
270
274
  enumerable: true,
271
- get: function () { return chunk3IEYJIYJ_cjs.fileAccepted; }
275
+ get: function () { return chunkESV52ERB_cjs.fileAccepted; }
272
276
  });
273
277
  Object.defineProperty(exports, "getProviderIcon", {
274
278
  enumerable: true,
275
- get: function () { return chunk3IEYJIYJ_cjs.getProviderIcon; }
279
+ get: function () { return chunkESV52ERB_cjs.getProviderIcon; }
276
280
  });
277
281
  Object.defineProperty(exports, "hasBehindTheScenes", {
278
282
  enumerable: true,
279
- get: function () { return chunk3IEYJIYJ_cjs.hasBehindTheScenes; }
283
+ get: function () { return chunkESV52ERB_cjs.hasBehindTheScenes; }
280
284
  });
281
285
  Object.defineProperty(exports, "linkCitations", {
282
286
  enumerable: true,
283
- get: function () { return chunk3IEYJIYJ_cjs.linkCitations; }
287
+ get: function () { return chunkESV52ERB_cjs.linkCitations; }
284
288
  });
285
289
  Object.defineProperty(exports, "normalizeFollowups", {
286
290
  enumerable: true,
287
- get: function () { return chunk3IEYJIYJ_cjs.normalizeFollowups; }
291
+ get: function () { return chunkESV52ERB_cjs.normalizeFollowups; }
288
292
  });
289
293
  Object.defineProperty(exports, "quickPromptLabel", {
290
294
  enumerable: true,
291
- get: function () { return chunk3IEYJIYJ_cjs.quickPromptLabel; }
295
+ get: function () { return chunkESV52ERB_cjs.quickPromptLabel; }
292
296
  });
293
297
  Object.defineProperty(exports, "quickPromptText", {
294
298
  enumerable: true,
295
- get: function () { return chunk3IEYJIYJ_cjs.quickPromptText; }
299
+ get: function () { return chunkESV52ERB_cjs.quickPromptText; }
296
300
  });
297
301
  Object.defineProperty(exports, "sourceHost", {
298
302
  enumerable: true,
299
- get: function () { return chunk3IEYJIYJ_cjs.sourceHost; }
303
+ get: function () { return chunkESV52ERB_cjs.sourceHost; }
300
304
  });
301
305
  Object.defineProperty(exports, "sourcesFromMarkdown", {
302
306
  enumerable: true,
303
- get: function () { return chunk3IEYJIYJ_cjs.sourcesFromMarkdown; }
307
+ get: function () { return chunkESV52ERB_cjs.sourcesFromMarkdown; }
304
308
  });
305
309
  Object.defineProperty(exports, "useAgnoChat", {
306
310
  enumerable: true,
307
- get: function () { return chunk3IEYJIYJ_cjs.useAgnoChat; }
311
+ get: function () { return chunkESV52ERB_cjs.useAgnoChat; }
308
312
  });
309
313
  Object.defineProperty(exports, "useChatContext", {
310
314
  enumerable: true,
311
- get: function () { return chunk3IEYJIYJ_cjs.useChatContext; }
315
+ get: function () { return chunkESV52ERB_cjs.useChatContext; }
312
316
  });
313
317
  Object.defineProperty(exports, "useLinkComponent", {
314
318
  enumerable: true,
315
- get: function () { return chunk3IEYJIYJ_cjs.useLinkComponent; }
319
+ get: function () { return chunkESV52ERB_cjs.useLinkComponent; }
316
320
  });
317
321
  Object.defineProperty(exports, "useLinkPreview", {
318
322
  enumerable: true,
319
- get: function () { return chunk3IEYJIYJ_cjs.useLinkPreview; }
323
+ get: function () { return chunkESV52ERB_cjs.useLinkPreview; }
320
324
  });
321
325
  Object.defineProperty(exports, "useOptionalChatContext", {
322
326
  enumerable: true,
323
- get: function () { return chunk3IEYJIYJ_cjs.useOptionalChatContext; }
327
+ get: function () { return chunkESV52ERB_cjs.useOptionalChatContext; }
324
328
  });
325
329
  Object.defineProperty(exports, "useResolvedChat", {
326
330
  enumerable: true,
327
- get: function () { return chunk3IEYJIYJ_cjs.useResolvedChat; }
331
+ get: function () { return chunkESV52ERB_cjs.useResolvedChat; }
328
332
  });
329
333
  Object.defineProperty(exports, "useResolvedClassNames", {
330
334
  enumerable: true,
331
- get: function () { return chunk3IEYJIYJ_cjs.useResolvedClassNames; }
335
+ get: function () { return chunkESV52ERB_cjs.useResolvedClassNames; }
332
336
  });
333
337
  Object.defineProperty(exports, "useSources", {
334
338
  enumerable: true,
335
- get: function () { return chunk3IEYJIYJ_cjs.useSources; }
339
+ get: function () { return chunkESV52ERB_cjs.useSources; }
336
340
  });
337
341
  Object.defineProperty(exports, "withoutSourcesLine", {
338
342
  enumerable: true,
339
- get: function () { return chunk3IEYJIYJ_cjs.withoutSourcesLine; }
343
+ get: function () { return chunkESV52ERB_cjs.withoutSourcesLine; }
340
344
  });
341
345
  Object.defineProperty(exports, "writeClipboard", {
342
346
  enumerable: true,
343
- get: function () { return chunk3IEYJIYJ_cjs.writeClipboard; }
347
+ get: function () { return chunkESV52ERB_cjs.writeClipboard; }
344
348
  });
345
349
  //# sourceMappingURL=index.cjs.map
346
350
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,19 @@
1
- import { C as ChatMessage, l as RunEventData, e as ChatStatus, g as EntityType, q as ToolExecution, m as RunRequirement, S as SessionEntry, A as AgnoClient, E as Entity, j as ReferenceData, f as Citations$1, R as ReasoningStep, o as SubRun, r as WorkflowStep, I as ImageData, V as VideoData, c as AudioData } from '../client-DUyVqxU9.cjs';
1
+ import { C as ChatMessage, l as RunEventData, e as ChatStatus, g as EntityType, s as ToolExecution, m as RunRequirement, S as SessionEntry, n as RunResolution, A as AgnoClient, E as Entity, j as ReferenceData, f as Citations$1, R as ReasoningStep, q as SubRun, t as WorkflowStep, I as ImageData, V as VideoData, c as AudioData } from '../client-Dwk6ThnW.cjs';
2
2
  import React$1 from 'react';
3
3
  import { StreamdownProps } from 'streamdown';
4
4
 
5
+ interface StreamingOptions {
6
+ /** Buffer plain text updates. Set false for immediate per-event updates. */
7
+ enabled?: boolean;
8
+ /** How long text accumulates before a flush, in ms. Zero disables buffering. */
9
+ flushIntervalMs?: number;
10
+ /** Flush when this many original events are pending. */
11
+ maxBufferEvents?: number;
12
+ /** Flush when this many UTF-16 characters are pending. */
13
+ maxBufferChars?: number;
14
+ }
15
+ declare const DEFAULT_STREAMING_OPTIONS: Readonly<Required<StreamingOptions>>;
16
+
5
17
  /**
6
18
  * useAgnoChat — a headless React hook for running any Agno agent, team or
7
19
  * workflow against an AgentOS backend and consuming its streamed output.
@@ -30,7 +42,9 @@ interface UseAgnoChatOptions {
30
42
  sessionId?: string;
31
43
  /** Pre-seed the transcript (e.g. when restoring a session). */
32
44
  initialMessages?: ChatMessage[];
33
- /** Called with every raw run event, for logging/telemetry. */
45
+ /** Plain-text buffering settings, captured when a run or continuation starts. */
46
+ streaming?: StreamingOptions;
47
+ /** Called immediately with every raw run event, for logging/telemetry. */
34
48
  onEvent?: (event: RunEventData) => void;
35
49
  /** Called when the session id changes (e.g. first run of a new session). */
36
50
  onSessionId?: (sessionId: string) => void;
@@ -76,10 +90,7 @@ interface UseAgnoChat {
76
90
  /** Stop the active run. */
77
91
  cancel: () => Promise<void>;
78
92
  /** Continue a paused run with explicitly resolved requirements. */
79
- continueRun: (resolution: {
80
- tools?: ToolExecution[];
81
- stepRequirements?: unknown[];
82
- }) => Promise<void>;
93
+ continueRun: (resolution: RunResolution) => Promise<void>;
83
94
  /** Approve or reject all pending tool confirmations, then continue. */
84
95
  respondToConfirmation: (approve: boolean) => Promise<void>;
85
96
  /** Provide values for pending tool user-input fields, then continue. */
@@ -364,36 +375,6 @@ declare const SourcesProvider: React$1.Provider<Source[]>;
364
375
  /** The sources of the surrounding message; empty outside one. */
365
376
  declare function useSources(): Source[];
366
377
 
367
- /**
368
- * The copy control — one component wherever something can be copied: the
369
- * header of a fenced code block, the action row under an answer, a host's own
370
- * surface. It owns the "copied" flash and the clipboard fallbacks, so every
371
- * copy affordance in a transcript behaves the same way.
372
- */
373
-
374
- /**
375
- * Copy text, by whichever route the browser allows.
376
- *
377
- * The async Clipboard API is the right one, but it rejects on an insecure
378
- * origin and whenever the document isn't focused — so a selection-based copy
379
- * stands behind it. Returns whether anything was actually copied: the button
380
- * should not claim success it didn't have.
381
- *
382
- * Exported because a host building its own copy affordance wants the same
383
- * fallbacks, and because the failure paths are worth testing.
384
- */
385
- declare function writeClipboard(text: string): Promise<boolean>;
386
- interface CopyButtonProps {
387
- /** What to copy — a string, or a function for text that is costly to build. */
388
- text: string | (() => string);
389
- /** Accessible name and tooltip. Defaults to "Copy". */
390
- label?: string;
391
- /** Icon size, in px. */
392
- size?: number;
393
- className?: string;
394
- }
395
- declare function CopyButton({ text, label, size, className }: CopyButtonProps): React$1.ReactElement;
396
-
397
378
  /**
398
379
  * Markdown for a chat transcript, rendered by [Streamdown](https://streamdown.ai).
399
380
  *
@@ -411,6 +392,8 @@ declare function CopyButton({ text, label, size, className }: CopyButtonProps):
411
392
  * this one entirely.
412
393
  */
413
394
 
395
+ /** Everything a host may pass straight through to Streamdown. */
396
+ type StreamdownOptions = Omit<StreamdownProps, 'children' | 'className' | 'components'>;
414
397
  interface MarkdownProps {
415
398
  content: string;
416
399
  className?: string;
@@ -435,11 +418,41 @@ interface MarkdownProps {
435
418
  */
436
419
  linkComponent?: LinkComponent;
437
420
  /** Escape hatch onto Streamdown itself — anything not set here. */
438
- options?: Omit<StreamdownProps, 'children' | 'className' | 'components'>;
421
+ options?: StreamdownOptions;
439
422
  }
440
- declare function Markdown({ content, className, sources, streaming, codeCopy, linkComponent, options, }: MarkdownProps): React$1.ReactElement;
423
+ declare function Markdown({ content, className, sources, streaming, codeCopy, linkComponent, options }: MarkdownProps): React$1.ReactElement;
441
424
  type RenderMarkdown = (content: string) => React$1.ReactNode;
442
425
 
426
+ /**
427
+ * The copy control — one component wherever something can be copied: the
428
+ * header of a fenced code block, the action row under an answer, a host's own
429
+ * surface. It owns the "copied" flash and the clipboard fallbacks, so every
430
+ * copy affordance in a transcript behaves the same way.
431
+ */
432
+
433
+ /**
434
+ * Copy text, by whichever route the browser allows.
435
+ *
436
+ * The async Clipboard API is the right one, but it rejects on an insecure
437
+ * origin and whenever the document isn't focused — so a selection-based copy
438
+ * stands behind it. Returns whether anything was actually copied: the button
439
+ * should not claim success it didn't have.
440
+ *
441
+ * Exported because a host building its own copy affordance wants the same
442
+ * fallbacks, and because the failure paths are worth testing.
443
+ */
444
+ declare function writeClipboard(text: string): Promise<boolean>;
445
+ interface CopyButtonProps {
446
+ /** What to copy — a string, or a function for text that is costly to build. */
447
+ text: string | (() => string);
448
+ /** Accessible name and tooltip. Defaults to "Copy". */
449
+ label?: string;
450
+ /** Icon size, in px. */
451
+ size?: number;
452
+ className?: string;
453
+ }
454
+ declare function CopyButton({ text, label, size, className }: CopyButtonProps): React$1.ReactElement;
455
+
443
456
  /**
444
457
  * `<ChatProvider>` runs a chat and shares it with everything below it, so the
445
458
  * layout is entirely yours:
@@ -623,6 +636,8 @@ interface AgnoChatProps {
623
636
  client?: AgnoClient;
624
637
  headers?: Record<string, string>;
625
638
  userId?: string;
639
+ /** Override the default bounded plain-text buffering. */
640
+ streaming?: StreamingOptions;
626
641
  /**
627
642
  * The selected agent/team/workflow. Pass it to own the selection — the embed
628
643
  * then only displays it, the way AgentOS drives the chat from its breadcrumb.
@@ -1235,10 +1250,7 @@ interface HumanInputProps {
1235
1250
  entityType?: EntityType;
1236
1251
  busy?: boolean;
1237
1252
  /** Continue the run with the resolved tools (agent/team) or step requirements (workflow). */
1238
- onResolve: (resolution: {
1239
- tools?: ToolExecution[];
1240
- stepRequirements?: unknown[];
1241
- }) => void;
1253
+ onResolve: (resolution: RunResolution) => void;
1242
1254
  className?: string;
1243
1255
  }
1244
1256
  declare function HumanInput({ message, entityType, busy, onResolve, className, }: HumanInputProps): React$1.ReactElement | null;
@@ -1387,4 +1399,4 @@ declare function GridLoader({ className }: {
1387
1399
  className?: string;
1388
1400
  }): React$1.ReactElement;
1389
1401
 
1390
- export { AgnoChat, type AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, type BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, type ChatClassNames, type ChatContextValue, ChatInput, type ChatInputProps, ChatLauncher, type ChatLauncherProps, ChatProvider, type ChatProviderProps, type ChatTextareaProps, ChatWindow, type ChatWindowProps, Check, ChevronDown, Citations, type CitationsProps, Close, Copy, CopyButton, type CopyButtonProps, EntityBadge, type EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, type FileLimits, FilePreview, type FilePreviewProps, FileType, FileVideo, Followups, type FollowupsProps, Globe, GridLoader, HoverPreview, type HoverPreviewProps, HumanInput, type HumanInputProps, type LauncherPanel, type LauncherPosition, type LinkComponent, LinkIcon, type LinkPreview, LinkPreviewCard, type LinkPreviewCardProps, Markdown, type MarkdownProps, MemberResponses, Memory, Message, MessageActions, type MessageActionsProps, MessageList, type MessageListProps, type MessageProps, Multimedia, Paperclip, Plus, Pulse, type QuickPrompt, QuickPrompts, type QuickPromptsProps, Reasoning, type RenderMarkdown, Rerun, type ResolveLinkPreview, type SendOptions, SessionList, type SessionListProps, type Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, type UseAgnoChat, type UseAgnoChatOptions, WorkflowSteps, Wrench, admitFiles, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconFallbacks, faviconUrl, fileAccepted, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkComponent, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };
1402
+ export { AgnoChat, type AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, type BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, type ChatClassNames, type ChatContextValue, ChatInput, type ChatInputProps, ChatLauncher, type ChatLauncherProps, ChatProvider, type ChatProviderProps, type ChatTextareaProps, ChatWindow, type ChatWindowProps, Check, ChevronDown, Citations, type CitationsProps, Close, Copy, CopyButton, type CopyButtonProps, DEFAULT_STREAMING_OPTIONS, EntityBadge, type EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, type FileLimits, FilePreview, type FilePreviewProps, FileType, FileVideo, Followups, type FollowupsProps, Globe, GridLoader, HoverPreview, type HoverPreviewProps, HumanInput, type HumanInputProps, type LauncherPanel, type LauncherPosition, type LinkComponent, LinkIcon, type LinkPreview, LinkPreviewCard, type LinkPreviewCardProps, Markdown, type MarkdownProps, MemberResponses, Memory, Message, MessageActions, type MessageActionsProps, MessageList, type MessageListProps, type MessageProps, Multimedia, Paperclip, Plus, Pulse, type QuickPrompt, QuickPrompts, type QuickPromptsProps, Reasoning, type RenderMarkdown, Rerun, type ResolveLinkPreview, type SendOptions, SessionList, type SessionListProps, type Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, type StreamingOptions, TeamGlyph, ToolCalls, Trash, type UseAgnoChat, type UseAgnoChatOptions, WorkflowSteps, Wrench, admitFiles, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconFallbacks, faviconUrl, fileAccepted, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkComponent, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };