@copilotkit/react-core 1.60.0 → 1.60.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/react-core",
3
- "version": "1.60.0",
3
+ "version": "1.60.1",
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.56",
62
- "@ag-ui/core": "0.0.56",
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.0",
83
- "@copilotkit/core": "1.60.0",
84
- "@copilotkit/runtime-client-gql": "1.60.0",
85
- "@copilotkit/shared": "1.60.0",
86
- "@copilotkit/web-inspector": "1.60.0"
82
+ "@copilotkit/a2ui-renderer": "1.60.1",
83
+ "@copilotkit/runtime-client-gql": "1.60.1",
84
+ "@copilotkit/shared": "1.60.1",
85
+ "@copilotkit/core": "1.60.1",
86
+ "@copilotkit/web-inspector": "1.60.1"
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" isModalDefaultOpen={false} />;
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
- onSubmitInput={async (text) => {
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
- <CopilotChatMessageView />
80
- <CopilotChatInput />
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
- thinking: "Analyzing…",
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
- onSubmitInput={handleSubmit}
168
+ onSubmitMessage={handleSubmit}
166
169
  >
167
- <CopilotChatMessageView />
168
- <CopilotChatInput />
170
+ {({ messageView, input }) => (
171
+ <>
172
+ {messageView}
173
+ {input}
174
+ </>
175
+ )}
169
176
  </CopilotChatView>
170
177
  ```
171
178