@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
|
@@ -2,28 +2,28 @@ import "../chunk-JD7BAH7U.mjs";
|
|
|
2
2
|
import "../chunk-MRFF7GSQ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-3JNDMHS4.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-AX7CAT7V.mjs";
|
|
10
|
+
import "../chunk-3EYL2DRG.mjs";
|
|
11
11
|
import "../chunk-YAGE7RCE.mjs";
|
|
12
12
|
import "../chunk-VEC45H6Q.mjs";
|
|
13
13
|
import "../chunk-RQNJNK2W.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CopilotChat
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-NLIDKNNS.mjs";
|
|
17
17
|
import "../chunk-V7W6IM2V.mjs";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-OMTPWC7T.mjs";
|
|
19
19
|
import "../chunk-ZABXREBH.mjs";
|
|
20
20
|
import "../chunk-6INMITFA.mjs";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-RU73BEZM.mjs";
|
|
22
|
+
import "../chunk-RJCZRKTV.mjs";
|
|
23
23
|
import "../chunk-RS6UPR5N.mjs";
|
|
24
24
|
import "../chunk-4FIGRRFS.mjs";
|
|
25
25
|
import "../chunk-OTPAZXVR.mjs";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-4LUMV4YO.mjs";
|
|
27
27
|
import "../chunk-YQFVRDNC.mjs";
|
|
28
28
|
import "../chunk-YQ3D5IQV.mjs";
|
|
29
29
|
import "../chunk-CPMIEVKK.mjs";
|
package/dist/index.js
CHANGED
|
@@ -861,7 +861,16 @@ var Input = ({ inProgress, onSend, isVisible = false }) => {
|
|
|
861
861
|
children: context.icons.pushToTalkIcon
|
|
862
862
|
}
|
|
863
863
|
),
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
865
|
+
"button",
|
|
866
|
+
{
|
|
867
|
+
disabled: sendDisabled,
|
|
868
|
+
onClick: send,
|
|
869
|
+
"data-copilotkit-in-progress": !!inProgress,
|
|
870
|
+
"data-testid": inProgress ? "copilot-chat-request-in-progress" : void 0,
|
|
871
|
+
children: sendIcon
|
|
872
|
+
}
|
|
873
|
+
)
|
|
865
874
|
] })
|
|
866
875
|
] });
|
|
867
876
|
};
|
|
@@ -1351,9 +1360,25 @@ function RenderTextMessage(props) {
|
|
|
1351
1360
|
const { icons } = useChatContext();
|
|
1352
1361
|
if (message.isTextMessage()) {
|
|
1353
1362
|
if (message.role === "user") {
|
|
1354
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1364
|
+
"div",
|
|
1365
|
+
{
|
|
1366
|
+
"data-message-role": "user",
|
|
1367
|
+
className: "copilotKitMessage copilotKitUserMessage",
|
|
1368
|
+
children: message.content
|
|
1369
|
+
},
|
|
1370
|
+
index
|
|
1371
|
+
);
|
|
1355
1372
|
} else if (message.role == "assistant") {
|
|
1356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1374
|
+
"div",
|
|
1375
|
+
{
|
|
1376
|
+
"data-message-role": "assistant",
|
|
1377
|
+
className: `copilotKitMessage copilotKitAssistantMessage`,
|
|
1378
|
+
children: isCurrentMessage && inProgress && !message.content ? icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message.content })
|
|
1379
|
+
},
|
|
1380
|
+
index
|
|
1381
|
+
);
|
|
1357
1382
|
}
|
|
1358
1383
|
}
|
|
1359
1384
|
}
|
|
@@ -1403,7 +1428,15 @@ function RenderActionExecutionMessage(props) {
|
|
|
1403
1428
|
toRender
|
|
1404
1429
|
] }, index);
|
|
1405
1430
|
} else {
|
|
1406
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1432
|
+
"div",
|
|
1433
|
+
{
|
|
1434
|
+
"data-message-type": "action-render",
|
|
1435
|
+
className: "copilotKitCustomAssistantMessage",
|
|
1436
|
+
children: toRender
|
|
1437
|
+
},
|
|
1438
|
+
index
|
|
1439
|
+
);
|
|
1407
1440
|
}
|
|
1408
1441
|
} catch (e) {
|
|
1409
1442
|
console.error(`Error executing render function for action ${message.name}: ${e}`);
|
|
@@ -1530,8 +1563,8 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
1530
1563
|
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.`;
|
|
1531
1564
|
const result = yield (0, import_react_core5.extract)({
|
|
1532
1565
|
context,
|
|
1533
|
-
instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. "
|
|
1534
|
-
data: "
|
|
1566
|
+
instructions: "Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. ",
|
|
1567
|
+
data: config.instructions + "\n\n" + numOfSuggestionsInstructions + "\n\nAvailable tools: " + tools + "\n\n",
|
|
1535
1568
|
requestType: import_runtime_client_gql3.CopilotRequestType.Task,
|
|
1536
1569
|
parameters: [
|
|
1537
1570
|
{
|