@copilotkit/react-core 1.51.4-next.2 → 1.51.4-next.3
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 +11 -0
- package/dist/{chunk-LO4RRITI.mjs → chunk-KNJHRVKW.mjs} +5 -3
- package/dist/chunk-KNJHRVKW.mjs.map +1 -0
- package/dist/{chunk-XZFIJ7XF.mjs → chunk-MA3CUMCY.mjs} +2 -2
- package/dist/{chunk-NXHQDCZF.mjs → chunk-QDES5PDW.mjs} +2 -2
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3 -3
- package/dist/hooks/use-copilot-chat-headless_c.js +4 -2
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +2 -2
- package/dist/hooks/use-copilot-chat.js +4 -2
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +2 -2
- package/dist/hooks/use-copilot-chat_internal.js +4 -2
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/hooks/use-copilot-chat_internal.ts +3 -3
- package/dist/chunk-LO4RRITI.mjs.map +0 -1
- /package/dist/{chunk-XZFIJ7XF.mjs.map → chunk-MA3CUMCY.mjs.map} +0 -0
- /package/dist/{chunk-NXHQDCZF.mjs.map → chunk-QDES5PDW.mjs.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopilotChatHeadless_c
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-MA3CUMCY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultSystemMessage
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-KNJHRVKW.mjs";
|
|
7
7
|
import "../chunk-ZVF5Q6IH.mjs";
|
|
8
8
|
import "../chunk-VV56AVPB.mjs";
|
|
9
9
|
import "../chunk-I76HKHPJ.mjs";
|
|
@@ -974,8 +974,10 @@ function useCopilotChatInternal({
|
|
|
974
974
|
const reload = useAsyncCallback(
|
|
975
975
|
(reloadMessageId) => __async(this, null, function* () {
|
|
976
976
|
var _a2;
|
|
977
|
+
if (!agent)
|
|
978
|
+
return;
|
|
977
979
|
const messages = (_a2 = agent == null ? void 0 : agent.messages) != null ? _a2 : [];
|
|
978
|
-
const isLoading =
|
|
980
|
+
const isLoading = agent.isRunning;
|
|
979
981
|
if (isLoading || messages.length === 0) {
|
|
980
982
|
return;
|
|
981
983
|
}
|
|
@@ -1013,7 +1015,7 @@ function useCopilotChatInternal({
|
|
|
1013
1015
|
}
|
|
1014
1016
|
return;
|
|
1015
1017
|
}),
|
|
1016
|
-
[agent == null ? void 0 : agent.setMessages, copilotkit == null ? void 0 : copilotkit.runAgent]
|
|
1018
|
+
[agent == null ? void 0 : agent.messages.length, agent == null ? void 0 : agent.isRunning, agent == null ? void 0 : agent.setMessages, copilotkit == null ? void 0 : copilotkit.runAgent]
|
|
1017
1019
|
);
|
|
1018
1020
|
const latestSendMessageFunc = useAsyncCallback(
|
|
1019
1021
|
(message, options) => __async(this, null, function* () {
|