@copilotkit/react-ui 1.3.13 → 1.3.14
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/CHANGELOG.md +10 -0
- package/dist/{chunk-47OPG5FM.mjs → chunk-3EYL2DRG.mjs} +3 -3
- package/dist/{chunk-KCAVDFB6.mjs → chunk-3JNDMHS4.mjs} +2 -2
- package/dist/{chunk-JTINVYPK.mjs → chunk-4LUMV4YO.mjs} +11 -2
- package/dist/{chunk-JTINVYPK.mjs.map → chunk-4LUMV4YO.mjs.map} +1 -1
- package/dist/{chunk-SWADR6EH.mjs → chunk-AX7CAT7V.mjs} +2 -2
- package/dist/{chunk-3KBQXU44.mjs → chunk-NLIDKNNS.mjs} +5 -5
- package/dist/{chunk-6BL5C56L.mjs → chunk-OMTPWC7T.mjs} +10 -2
- package/dist/chunk-OMTPWC7T.mjs.map +1 -0
- package/dist/{chunk-KFQYJ5R5.mjs → chunk-RJCZRKTV.mjs} +3 -3
- package/dist/chunk-RJCZRKTV.mjs.map +1 -0
- package/dist/chunk-RU73BEZM.mjs +41 -0
- package/dist/chunk-RU73BEZM.mjs.map +1 -0
- package/dist/components/chat/Chat.js +39 -6
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +5 -5
- package/dist/components/chat/Input.js +10 -1
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Modal.js +39 -6
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +6 -6
- package/dist/components/chat/Popup.js +39 -6
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +7 -7
- package/dist/components/chat/Sidebar.js +39 -6
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +7 -7
- package/dist/components/chat/Suggestion.js +2 -2
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +1 -1
- package/dist/components/chat/index.js +39 -6
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +8 -8
- package/dist/components/chat/messages/RenderActionExecutionMessage.js +9 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +1 -1
- package/dist/components/chat/messages/RenderTextMessage.js +18 -2
- package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderTextMessage.mjs +1 -1
- package/dist/components/index.js +39 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +8 -8
- package/dist/index.js +39 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/package.json +7 -7
- package/src/components/chat/Input.tsx +6 -1
- package/src/components/chat/Suggestion.tsx +7 -3
- package/src/components/chat/messages/RenderActionExecutionMessage.tsx +5 -1
- package/src/components/chat/messages/RenderTextMessage.tsx +10 -2
- package/dist/chunk-6BL5C56L.mjs.map +0 -1
- package/dist/chunk-KFQYJ5R5.mjs.map +0 -1
- package/dist/chunk-WYMTXCQU.mjs +0 -25
- package/dist/chunk-WYMTXCQU.mjs.map +0 -1
- /package/dist/{chunk-47OPG5FM.mjs.map → chunk-3EYL2DRG.mjs.map} +0 -0
- /package/dist/{chunk-KCAVDFB6.mjs.map → chunk-3JNDMHS4.mjs.map} +0 -0
- /package/dist/{chunk-SWADR6EH.mjs.map → chunk-AX7CAT7V.mjs.map} +0 -0
- /package/dist/{chunk-3KBQXU44.mjs.map → chunk-NLIDKNNS.mjs.map} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotPopup
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-AX7CAT7V.mjs";
|
|
4
|
+
import "../../chunk-3EYL2DRG.mjs";
|
|
5
5
|
import "../../chunk-YAGE7RCE.mjs";
|
|
6
6
|
import "../../chunk-VEC45H6Q.mjs";
|
|
7
7
|
import "../../chunk-RQNJNK2W.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-NLIDKNNS.mjs";
|
|
9
9
|
import "../../chunk-V7W6IM2V.mjs";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-OMTPWC7T.mjs";
|
|
11
11
|
import "../../chunk-ZABXREBH.mjs";
|
|
12
12
|
import "../../chunk-6INMITFA.mjs";
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-RU73BEZM.mjs";
|
|
14
|
+
import "../../chunk-RJCZRKTV.mjs";
|
|
15
15
|
import "../../chunk-RS6UPR5N.mjs";
|
|
16
16
|
import "../../chunk-4FIGRRFS.mjs";
|
|
17
17
|
import "../../chunk-OTPAZXVR.mjs";
|
|
18
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-4LUMV4YO.mjs";
|
|
19
19
|
import "../../chunk-YQFVRDNC.mjs";
|
|
20
20
|
import "../../chunk-YQ3D5IQV.mjs";
|
|
21
21
|
import "../../chunk-CPMIEVKK.mjs";
|
|
@@ -857,7 +857,16 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
|
|
|
857
857
|
children: context.icons.pushToTalkIcon
|
|
858
858
|
}
|
|
859
859
|
),
|
|
860
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
861
|
+
"button",
|
|
862
|
+
{
|
|
863
|
+
disabled: sendDisabled,
|
|
864
|
+
onClick: send,
|
|
865
|
+
"data-copilotkit-in-progress": !!inProgress,
|
|
866
|
+
"data-testid": inProgress ? "copilot-chat-request-in-progress" : void 0,
|
|
867
|
+
children: sendIcon
|
|
868
|
+
}
|
|
869
|
+
)
|
|
861
870
|
] })
|
|
862
871
|
] });
|
|
863
872
|
};
|
|
@@ -1347,9 +1356,25 @@ function RenderTextMessage(props) {
|
|
|
1347
1356
|
const { icons } = useChatContext();
|
|
1348
1357
|
if (message.isTextMessage()) {
|
|
1349
1358
|
if (message.role === "user") {
|
|
1350
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1360
|
+
"div",
|
|
1361
|
+
{
|
|
1362
|
+
"data-message-role": "user",
|
|
1363
|
+
className: "copilotKitMessage copilotKitUserMessage",
|
|
1364
|
+
children: message.content
|
|
1365
|
+
},
|
|
1366
|
+
index
|
|
1367
|
+
);
|
|
1351
1368
|
} else if (message.role == "assistant") {
|
|
1352
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1370
|
+
"div",
|
|
1371
|
+
{
|
|
1372
|
+
"data-message-role": "assistant",
|
|
1373
|
+
className: `copilotKitMessage copilotKitAssistantMessage`,
|
|
1374
|
+
children: isCurrentMessage && inProgress && !message.content ? icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message.content })
|
|
1375
|
+
},
|
|
1376
|
+
index
|
|
1377
|
+
);
|
|
1353
1378
|
}
|
|
1354
1379
|
}
|
|
1355
1380
|
}
|
|
@@ -1399,7 +1424,15 @@ function RenderActionExecutionMessage(props) {
|
|
|
1399
1424
|
toRender
|
|
1400
1425
|
] }, index);
|
|
1401
1426
|
} else {
|
|
1402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1428
|
+
"div",
|
|
1429
|
+
{
|
|
1430
|
+
"data-message-type": "action-render",
|
|
1431
|
+
className: "copilotKitCustomAssistantMessage",
|
|
1432
|
+
children: toRender
|
|
1433
|
+
},
|
|
1434
|
+
index
|
|
1435
|
+
);
|
|
1403
1436
|
}
|
|
1404
1437
|
} catch (e) {
|
|
1405
1438
|
console.error(`Error executing render function for action ${message.name}: ${e}`);
|
|
@@ -1526,8 +1559,8 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
1526
1559
|
const numOfSuggestionsInstructions = config.minSuggestions === 0 ? `Produce up to ${config.maxSuggestions} suggestions. If there are no highly relevant suggestions you can think of, provide an empty array.` : `Produce between ${config.minSuggestions} and ${config.maxSuggestions} suggestions.`;
|
|
1527
1560
|
const result = yield (0, import_react_core5.extract)({
|
|
1528
1561
|
context,
|
|
1529
|
-
instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. "
|
|
1530
|
-
data: "
|
|
1562
|
+
instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. ",
|
|
1563
|
+
data: config.instructions + "\n\n" + numOfSuggestionsInstructions + "\n\nAvailable tools: " + tools + "\n\n",
|
|
1531
1564
|
requestType: import_runtime_client_gql3.CopilotRequestType.Task,
|
|
1532
1565
|
parameters: [
|
|
1533
1566
|
{
|