@copilotkitnext/react 0.0.9-alpha.1 → 0.0.9-alpha.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/index.d.mts +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.js +5 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1130,8 +1130,7 @@ function useRenderToolCall() {
|
|
|
1130
1130
|
const renderToolCall = useCallback(
|
|
1131
1131
|
({
|
|
1132
1132
|
toolCall,
|
|
1133
|
-
toolMessage
|
|
1134
|
-
isRunning
|
|
1133
|
+
toolMessage
|
|
1135
1134
|
}) => {
|
|
1136
1135
|
const exactMatches = currentRenderToolCalls.filter(
|
|
1137
1136
|
(rc) => rc.name === toolCall.function.name
|
|
@@ -1165,7 +1164,7 @@ function useRenderToolCall() {
|
|
|
1165
1164
|
},
|
|
1166
1165
|
toolCall.id
|
|
1167
1166
|
);
|
|
1168
|
-
} else
|
|
1167
|
+
} else {
|
|
1169
1168
|
return /* @__PURE__ */ jsx8(
|
|
1170
1169
|
RenderComponent,
|
|
1171
1170
|
{
|
|
@@ -1176,17 +1175,6 @@ function useRenderToolCall() {
|
|
|
1176
1175
|
},
|
|
1177
1176
|
toolCall.id
|
|
1178
1177
|
);
|
|
1179
|
-
} else {
|
|
1180
|
-
return /* @__PURE__ */ jsx8(
|
|
1181
|
-
RenderComponent,
|
|
1182
|
-
{
|
|
1183
|
-
name: toolName,
|
|
1184
|
-
args,
|
|
1185
|
-
status: ToolCallStatus.Complete,
|
|
1186
|
-
result: ""
|
|
1187
|
-
},
|
|
1188
|
-
toolCall.id
|
|
1189
|
-
);
|
|
1190
1178
|
}
|
|
1191
1179
|
},
|
|
1192
1180
|
[currentRenderToolCalls, executingToolCallIds, agentId]
|
|
@@ -1383,8 +1371,7 @@ import React7 from "react";
|
|
|
1383
1371
|
import { Fragment as Fragment2, jsx as jsx9 } from "react/jsx-runtime";
|
|
1384
1372
|
function CopilotChatToolCallsView({
|
|
1385
1373
|
message,
|
|
1386
|
-
messages = []
|
|
1387
|
-
isRunning = false
|
|
1374
|
+
messages = []
|
|
1388
1375
|
}) {
|
|
1389
1376
|
const renderToolCall = useRenderToolCall();
|
|
1390
1377
|
if (!message.toolCalls || message.toolCalls.length === 0) {
|
|
@@ -1396,8 +1383,7 @@ function CopilotChatToolCallsView({
|
|
|
1396
1383
|
);
|
|
1397
1384
|
return /* @__PURE__ */ jsx9(React7.Fragment, { children: renderToolCall({
|
|
1398
1385
|
toolCall,
|
|
1399
|
-
toolMessage
|
|
1400
|
-
isRunning
|
|
1386
|
+
toolMessage
|
|
1401
1387
|
}) }, toolCall.id);
|
|
1402
1388
|
}) });
|
|
1403
1389
|
}
|
|
@@ -1496,8 +1482,7 @@ function CopilotChatAssistantMessage({
|
|
|
1496
1482
|
CopilotChatToolCallsView_default,
|
|
1497
1483
|
{
|
|
1498
1484
|
message,
|
|
1499
|
-
messages
|
|
1500
|
-
isRunning
|
|
1485
|
+
messages
|
|
1501
1486
|
}
|
|
1502
1487
|
);
|
|
1503
1488
|
const hasContent = !!(message.content && message.content.trim().length > 0);
|