@agentic-kit/react 0.10.0 → 0.11.1
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 +5 -4
- package/esm/use-chat.d.ts +1 -1
- package/esm/use-chat.js +1 -1
- package/package.json +4 -4
- package/use-chat.d.ts +1 -1
- package/use-chat.js +2 -2
package/README.md
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center" width="100%">
|
|
8
|
-
<a href="https://github.com/constructive-io/
|
|
9
|
-
<img height="20" src="https://github.com/constructive-io/
|
|
8
|
+
<a href="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml">
|
|
9
|
+
<img height="20" src="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml/badge.svg" />
|
|
10
10
|
</a>
|
|
11
|
-
<a href="https://github.com/constructive-io/
|
|
12
|
-
<a href="https://www.npmjs.com/package/@agentic-kit/react"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/
|
|
11
|
+
<a href="https://github.com/constructive-io/constructive/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/@agentic-kit/react"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/constructive?filename=agentic%2Freact%2Fpackage.json"/></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
Headless React bindings for `@agentic-kit/agent`. Exposes a single hook —
|
|
@@ -188,6 +188,7 @@ Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
|
188
188
|
### 🧪 Testing
|
|
189
189
|
|
|
190
190
|
* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/postgres/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
|
|
191
|
+
* [pglite-test](https://github.com/constructive-io/constructive/tree/main/postgres/pglite-test): **🪶 Drop-in pgsql-test replacement backed by PGlite** — in-process Postgres, no server required, instance-per-suite isolation.
|
|
191
192
|
* [pgsql-seed](https://github.com/constructive-io/constructive/tree/main/postgres/pgsql-seed): **🌱 PostgreSQL seeding utilities** for CSV, JSON, SQL data loading, and pgpm deployment.
|
|
192
193
|
* [supabase-test](https://github.com/constructive-io/constructive/tree/main/postgres/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
|
|
193
194
|
* [graphile-test](https://github.com/constructive-io/constructive/tree/main/graphile/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
|
package/esm/use-chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentEvent, AgentToolResult } from '@agentic-kit/agent';
|
|
2
|
-
import type { AssistantMessage, Message, Usage } from 'agentic-kit';
|
|
2
|
+
import type { AssistantMessage, Message, Usage } from '@agentic-kit/chat';
|
|
3
3
|
export type ToolDecisionPendingEvent = Extract<AgentEvent, {
|
|
4
4
|
type: 'tool_decision_pending';
|
|
5
5
|
}>;
|
package/esm/use-chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseSSEStream } from '@agentic-kit/agent';
|
|
2
|
-
import { createUserMessage } from 'agentic-kit';
|
|
2
|
+
import { createUserMessage } from '@agentic-kit/chat';
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Compute the pendingDecisions map from a messages array. A toolCall counts as
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-kit/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "React bindings for agentic-kit (useChat hook)",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agentic-kit/agent": "0.
|
|
33
|
-
"agentic-kit": "1.
|
|
32
|
+
"@agentic-kit/agent": "0.12.1",
|
|
33
|
+
"@agentic-kit/chat": "1.11.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=18",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-dom": "19.2.5"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [],
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "6f85eefed51d88b3a857ff36d20da44b7ebb47c9"
|
|
50
50
|
}
|
package/use-chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentEvent, AgentToolResult } from '@agentic-kit/agent';
|
|
2
|
-
import type { AssistantMessage, Message, Usage } from 'agentic-kit';
|
|
2
|
+
import type { AssistantMessage, Message, Usage } from '@agentic-kit/chat';
|
|
3
3
|
export type ToolDecisionPendingEvent = Extract<AgentEvent, {
|
|
4
4
|
type: 'tool_decision_pending';
|
|
5
5
|
}>;
|
package/use-chat.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useChat = useChat;
|
|
4
4
|
const agent_1 = require("@agentic-kit/agent");
|
|
5
|
-
const
|
|
5
|
+
const chat_1 = require("@agentic-kit/chat");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
/**
|
|
8
8
|
* Compute the pendingDecisions map from a messages array. A toolCall counts as
|
|
@@ -229,7 +229,7 @@ function useChat(options) {
|
|
|
229
229
|
await runStream(msgs, null);
|
|
230
230
|
}, [runStream]);
|
|
231
231
|
const send = (0, react_1.useCallback)(async (input) => {
|
|
232
|
-
const userMessage = typeof input === 'string' ? (0,
|
|
232
|
+
const userMessage = typeof input === 'string' ? (0, chat_1.createUserMessage)(input) : input;
|
|
233
233
|
const requestMessages = [...messagesRef.current, userMessage];
|
|
234
234
|
messagesRef.current = requestMessages;
|
|
235
235
|
await runStream(requestMessages, userMessage);
|