@agents24/chat-react 0.1.2 → 0.1.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.
- package/README.md +12 -3
- package/dist/index.cjs +388 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -22
- package/dist/index.d.ts +124 -22
- package/dist/index.js +370 -137
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
# Agents24 Chat React
|
|
2
2
|
|
|
3
|
-
Last Updated: 2026-06-
|
|
3
|
+
Last Updated: 2026-06-14
|
|
4
4
|
|
|
5
5
|
Headless React primitives for Agents24 chat surfaces.
|
|
6
6
|
|
|
7
|
-
The package owns thread hydration, older-page pagination, stream/reattach state, active run cancellation, normalized message
|
|
7
|
+
The package owns thread hydration, older-page pagination, stream/reattach state, active run cancellation, normalized message parts, and latest-thread viewport behavior. Hosts provide transport routes, cache storage, product rendering, source handling, and styling.
|
|
8
8
|
|
|
9
9
|
## Public API
|
|
10
10
|
|
|
11
11
|
- `useAgents24ChatController(options)`
|
|
12
12
|
- `useLatestThreadViewport(options)`
|
|
13
13
|
- `LatestThreadViewport`
|
|
14
|
+
- `useStreamingText(options)`
|
|
15
|
+
- `getActiveStreamingTextPartId(message, streamingMessageId)`
|
|
16
|
+
- `isActiveStreamingTextPart(message, part, streamingMessageId)`
|
|
14
17
|
- `createFetchChatTransport(options)`
|
|
15
18
|
- `consumeSseResponse(response, onEvent)`
|
|
16
|
-
- normalized chat message,
|
|
19
|
+
- normalized chat message, part, transport, and storage types
|
|
20
|
+
- `partsFromResponseBlocks(blocks, fallbackText)`
|
|
21
|
+
- `renderChatPart(part, message, renderOptions)`
|
|
22
|
+
|
|
23
|
+
`ChatMessage.parts` is the only render model. Backend `response_blocks` are normalized into ordered parts such as `text`, `tool-get_meteo`, `ui-blocks`, `reasoning`, `approval`, `error`, and `data`. Tool UI is client-owned through `renderPart`, `toolRenderers`, and `fallbackToolRenderer`; the package does not infer English tool labels or group tool rows.
|
|
24
|
+
|
|
25
|
+
`useStreamingText` owns reusable visual pacing for active assistant text. It returns `displayedText`, `isAnimating`, `mode`, and `parseIncompleteMarkdown` so host renderers can pass those values into their markdown component without the package depending on any markdown/UI library. The package only chooses text timing, cache behavior, reduced-motion handling, and active text-part helpers.
|
|
17
26
|
|
|
18
27
|
Network access is always injected by the host. This browser package never requires platform API keys.
|