@agentic-kit/react 0.10.0 → 0.11.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/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/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.0",
|
|
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.0",
|
|
33
|
+
"@agentic-kit/chat": "1.11.0"
|
|
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": "31f7cd3d3cc28cf069056eae5b2a0d4198d154a1"
|
|
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);
|