@copilotkit/react-core 1.51.4-next.1 → 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 +20 -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
package/dist/hooks/index.mjs
CHANGED
|
@@ -37,16 +37,16 @@ import {
|
|
|
37
37
|
} from "../chunk-7DTB7S5V.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useCopilotChatHeadless_c
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-MA3CUMCY.mjs";
|
|
41
41
|
import {
|
|
42
42
|
useCopilotChatSuggestions
|
|
43
43
|
} from "../chunk-XDFVCQD3.mjs";
|
|
44
44
|
import {
|
|
45
45
|
useCopilotChat
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-QDES5PDW.mjs";
|
|
47
47
|
import {
|
|
48
48
|
useCopilotChatInternal
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-KNJHRVKW.mjs";
|
|
50
50
|
import {
|
|
51
51
|
useLazyToolRenderer
|
|
52
52
|
} from "../chunk-ZVF5Q6IH.mjs";
|
|
@@ -976,8 +976,10 @@ function useCopilotChatInternal({
|
|
|
976
976
|
const reload = useAsyncCallback(
|
|
977
977
|
(reloadMessageId) => __async(this, null, function* () {
|
|
978
978
|
var _a2;
|
|
979
|
+
if (!agent)
|
|
980
|
+
return;
|
|
979
981
|
const messages = (_a2 = agent == null ? void 0 : agent.messages) != null ? _a2 : [];
|
|
980
|
-
const isLoading =
|
|
982
|
+
const isLoading = agent.isRunning;
|
|
981
983
|
if (isLoading || messages.length === 0) {
|
|
982
984
|
return;
|
|
983
985
|
}
|
|
@@ -1015,7 +1017,7 @@ function useCopilotChatInternal({
|
|
|
1015
1017
|
}
|
|
1016
1018
|
return;
|
|
1017
1019
|
}),
|
|
1018
|
-
[agent == null ? void 0 : agent.setMessages, copilotkit == null ? void 0 : copilotkit.runAgent]
|
|
1020
|
+
[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]
|
|
1019
1021
|
);
|
|
1020
1022
|
const latestSendMessageFunc = useAsyncCallback(
|
|
1021
1023
|
(message, options) => __async(this, null, function* () {
|