@copilotkit/react-core 1.60.0 → 1.60.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/dist/{copilotkit-BTHcCAVQ.cjs → copilotkit-CP5uyB2h.cjs} +43 -133
- package/dist/copilotkit-CP5uyB2h.cjs.map +1 -0
- package/dist/{copilotkit-C9ptuh-b.d.cts → copilotkit-CyL6ZsLP.d.cts} +7 -7
- package/dist/{copilotkit-DvbI8G0d.d.mts.map → copilotkit-CyL6ZsLP.d.cts.map} +1 -1
- package/dist/{copilotkit-CV519nFv.mjs → copilotkit-DheptEiV.mjs} +43 -133
- package/dist/copilotkit-DheptEiV.mjs.map +1 -0
- package/dist/{copilotkit-DvbI8G0d.d.mts → copilotkit-UaQ7KSUq.d.mts} +7 -7
- package/dist/{copilotkit-C9ptuh-b.d.cts.map → copilotkit-UaQ7KSUq.d.mts.map} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +44 -129
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/context.cjs +8 -3
- package/dist/v2/context.cjs.map +1 -1
- package/dist/v2/context.d.cts.map +1 -1
- package/dist/v2/context.d.mts.map +1 -1
- package/dist/v2/context.mjs +8 -3
- package/dist/v2/context.mjs.map +1 -1
- package/dist/v2/headless.cjs +15 -8
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +3 -3
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +3 -3
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +15 -8
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +1 -1
- package/dist/v2/index.d.mts +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +42 -132
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/skills/react-core/references/chat-components.md +18 -11
- package/dist/copilotkit-BTHcCAVQ.cjs.map +0 -1
- package/dist/copilotkit-CV519nFv.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/react-core",
|
|
3
|
-
"version": "1.60.
|
|
3
|
+
"version": "1.60.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@ag-ui/client": "0.0.
|
|
62
|
-
"@ag-ui/core": "0.0.
|
|
61
|
+
"@ag-ui/client": "0.0.57",
|
|
62
|
+
"@ag-ui/core": "0.0.57",
|
|
63
63
|
"@jetbrains/websandbox": "^1.1.3",
|
|
64
64
|
"@lit-labs/react": "^2.0.2",
|
|
65
65
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"untruncate-json": "^0.0.1",
|
|
80
80
|
"use-stick-to-bottom": "^1.1.1",
|
|
81
81
|
"zod-to-json-schema": "^3.24.5",
|
|
82
|
-
"@copilotkit/a2ui-renderer": "1.60.
|
|
83
|
-
"@copilotkit/core": "1.60.
|
|
84
|
-
"@copilotkit/runtime-client-gql": "1.60.
|
|
85
|
-
"@copilotkit/shared": "1.60.
|
|
86
|
-
"@copilotkit/web-inspector": "1.60.
|
|
82
|
+
"@copilotkit/a2ui-renderer": "1.60.2",
|
|
83
|
+
"@copilotkit/core": "1.60.2",
|
|
84
|
+
"@copilotkit/runtime-client-gql": "1.60.2",
|
|
85
|
+
"@copilotkit/shared": "1.60.2",
|
|
86
|
+
"@copilotkit/web-inspector": "1.60.2"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@tailwindcss/cli": "^4.1.11",
|
|
@@ -31,7 +31,7 @@ suggestions internally via `useAgent`. You do not pass `messages` or
|
|
|
31
31
|
```tsx
|
|
32
32
|
import { CopilotPopup } from "@copilotkit/react-core/v2";
|
|
33
33
|
|
|
34
|
-
<CopilotPopup agentId="default"
|
|
34
|
+
<CopilotPopup agentId="default" defaultOpen={false} />;
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Persistent sidebar
|
|
@@ -53,8 +53,6 @@ want to manage `messages`/`isRunning` yourself.
|
|
|
53
53
|
```tsx
|
|
54
54
|
import {
|
|
55
55
|
CopilotChatView,
|
|
56
|
-
CopilotChatInput,
|
|
57
|
-
CopilotChatMessageView,
|
|
58
56
|
useAgent,
|
|
59
57
|
useCopilotKit,
|
|
60
58
|
} from "@copilotkit/react-core/v2";
|
|
@@ -67,7 +65,7 @@ export function HeadlessChat() {
|
|
|
67
65
|
<CopilotChatView
|
|
68
66
|
messages={agent.messages}
|
|
69
67
|
isRunning={agent.isRunning}
|
|
70
|
-
|
|
68
|
+
onSubmitMessage={async (text) => {
|
|
71
69
|
agent.addMessage({
|
|
72
70
|
id: crypto.randomUUID(),
|
|
73
71
|
role: "user",
|
|
@@ -76,8 +74,12 @@ export function HeadlessChat() {
|
|
|
76
74
|
await copilotkit.runAgent({ agent });
|
|
77
75
|
}}
|
|
78
76
|
>
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
{({ messageView, input }) => (
|
|
78
|
+
<>
|
|
79
|
+
{messageView}
|
|
80
|
+
{input}
|
|
81
|
+
</>
|
|
82
|
+
)}
|
|
81
83
|
</CopilotChatView>
|
|
82
84
|
);
|
|
83
85
|
}
|
|
@@ -90,7 +92,7 @@ export function HeadlessChat() {
|
|
|
90
92
|
agentId="default"
|
|
91
93
|
labels={{
|
|
92
94
|
chatInputPlaceholder: "Ask about the data…",
|
|
93
|
-
|
|
95
|
+
welcomeMessageText: "What would you like to analyze?",
|
|
94
96
|
}}
|
|
95
97
|
/>
|
|
96
98
|
```
|
|
@@ -158,14 +160,19 @@ Correct:
|
|
|
158
160
|
// CopilotChat manages messages and isRunning internally.
|
|
159
161
|
<CopilotChat agentId="default" />
|
|
160
162
|
|
|
161
|
-
// For manual control, drop down to headless CopilotChatView
|
|
163
|
+
// For manual control, drop down to headless CopilotChatView. Its `children`
|
|
164
|
+
// is a render prop that receives the bound slot elements:
|
|
162
165
|
<CopilotChatView
|
|
163
166
|
messages={myMessages}
|
|
164
167
|
isRunning={busy}
|
|
165
|
-
|
|
168
|
+
onSubmitMessage={handleSubmit}
|
|
166
169
|
>
|
|
167
|
-
|
|
168
|
-
|
|
170
|
+
{({ messageView, input }) => (
|
|
171
|
+
<>
|
|
172
|
+
{messageView}
|
|
173
|
+
{input}
|
|
174
|
+
</>
|
|
175
|
+
)}
|
|
169
176
|
</CopilotChatView>
|
|
170
177
|
```
|
|
171
178
|
|