@copilotkit/react-core 1.10.5-next.0 → 1.10.5-next.10
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 +74 -0
- package/dist/{chunk-6INCKUL6.mjs → chunk-3N4MVKFZ.mjs} +32 -18
- package/dist/chunk-3N4MVKFZ.mjs.map +1 -0
- package/dist/{chunk-CLQLVMW4.mjs → chunk-3WUDRJTT.mjs} +2 -2
- package/dist/{chunk-AGP7SAEE.mjs → chunk-7LTRT3IV.mjs} +4 -4
- package/dist/{chunk-CXDK6XA5.mjs → chunk-BBUQMG45.mjs} +2 -2
- package/dist/{chunk-G2GQX4FI.mjs → chunk-CUWOXXM5.mjs} +3 -3
- package/dist/{chunk-YHT6CWIY.mjs → chunk-EUX2P2E7.mjs} +5 -3
- package/dist/{chunk-YHT6CWIY.mjs.map → chunk-EUX2P2E7.mjs.map} +1 -1
- package/dist/{chunk-4JBVPOHK.mjs → chunk-GIGUZ2OK.mjs} +3 -3
- package/dist/{chunk-36FJAVOF.mjs → chunk-HDOG2RTM.mjs} +2 -2
- package/dist/{chunk-AR7HJPGU.mjs → chunk-HI6SPUOX.mjs} +2 -2
- package/dist/{chunk-FCRODLLL.mjs → chunk-HYJUBYMU.mjs} +5 -5
- package/dist/{chunk-7D4OASUM.mjs → chunk-IHV5PTID.mjs} +2 -2
- package/dist/{chunk-7LZXD5RJ.mjs → chunk-ITDKIB5E.mjs} +30 -23
- package/dist/chunk-ITDKIB5E.mjs.map +1 -0
- package/dist/{chunk-KA3NCZEJ.mjs → chunk-JBACWIFW.mjs} +2 -2
- package/dist/{chunk-HHLBUGRA.mjs → chunk-JCHRWCYH.mjs} +3 -3
- package/dist/{chunk-NALRM7KT.mjs → chunk-L5MS4UDD.mjs} +11 -5
- package/dist/chunk-L5MS4UDD.mjs.map +1 -0
- package/dist/{chunk-MY2BUA6F.mjs → chunk-M37URBJS.mjs} +2 -2
- package/dist/{chunk-MZ37BAAE.mjs → chunk-MGWRDFBE.mjs} +2 -2
- package/dist/{chunk-23SOG4FI.mjs → chunk-TUTNHDM3.mjs} +2 -2
- package/dist/{chunk-QF3Q5LUN.mjs → chunk-ZVOLWJCY.mjs} +5 -5
- package/dist/chunk-ZVOLWJCY.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.js +4 -2
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +2 -2
- package/dist/components/copilot-provider/copilotkit-props.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.js +30 -21
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +5 -5
- package/dist/components/copilot-provider/index.d.ts +1 -1
- package/dist/components/copilot-provider/index.js +30 -21
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +5 -5
- package/dist/components/dev-console/console-trigger.js +4 -2
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +3 -3
- package/dist/components/dev-console/developer-console-modal.js +4 -2
- package/dist/components/dev-console/developer-console-modal.js.map +1 -1
- package/dist/components/dev-console/developer-console-modal.mjs +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +30 -21
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/context/copilot-context.d.ts +1 -1
- package/dist/context/copilot-context.js +4 -2
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/copilot-messages-context.d.ts +2 -2
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +4 -2
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{copilot-context-59740e82.d.ts → copilot-context-cf9de848.d.ts} +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +44 -22
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +18 -18
- package/dist/hooks/use-chat.d.ts +1 -1
- package/dist/hooks/use-chat.js +33 -17
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +2 -2
- package/dist/hooks/use-coagent-state-render.js +4 -2
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +2 -2
- package/dist/hooks/use-coagent.d.ts +1 -1
- package/dist/hooks/use-coagent.js +36 -20
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +9 -9
- package/dist/hooks/use-copilot-action.js +4 -2
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +2 -2
- package/dist/hooks/use-copilot-additional-instructions.js +4 -2
- package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
- package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js +4 -2
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
- package/dist/hooks/use-copilot-chat-headless_c.d.ts +2 -2
- package/dist/hooks/use-copilot-chat-headless_c.js +36 -20
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +9 -9
- package/dist/hooks/use-copilot-chat.d.ts +2 -2
- package/dist/hooks/use-copilot-chat.js +36 -20
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +9 -9
- package/dist/hooks/use-copilot-chat_internal.d.ts +2 -2
- package/dist/hooks/use-copilot-chat_internal.js +36 -20
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +8 -8
- package/dist/hooks/use-copilot-readable.js +4 -2
- package/dist/hooks/use-copilot-readable.js.map +1 -1
- package/dist/hooks/use-copilot-readable.mjs +2 -2
- package/dist/hooks/use-langgraph-interrupt-render.js +7 -5
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +2 -2
- package/dist/hooks/use-langgraph-interrupt.d.ts +1 -1
- package/dist/hooks/use-langgraph-interrupt.js +44 -22
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +9 -9
- package/dist/hooks/use-make-copilot-document-readable.js +4 -2
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
- package/dist/{index-d1743abe.d.ts → index-1f5b66ac.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +70 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -19
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +6 -6
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/types/interrupt-action.d.ts +1 -1
- package/dist/types/interrupt-action.js.map +1 -1
- package/dist/utils/extract.d.ts +2 -2
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +5 -5
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +5 -5
- package/dist/utils/suggestions.d.ts +2 -2
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +5 -5
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit.tsx +27 -17
- package/src/context/copilot-context.tsx +3 -3
- package/src/hooks/use-chat.ts +27 -11
- package/src/hooks/use-langgraph-interrupt-render.ts +4 -3
- package/src/hooks/use-langgraph-interrupt.ts +8 -3
- package/src/types/interrupt-action.ts +4 -1
- package/dist/chunk-6INCKUL6.mjs.map +0 -1
- package/dist/chunk-7LZXD5RJ.mjs.map +0 -1
- package/dist/chunk-NALRM7KT.mjs.map +0 -1
- package/dist/chunk-QF3Q5LUN.mjs.map +0 -1
- /package/dist/{chunk-CLQLVMW4.mjs.map → chunk-3WUDRJTT.mjs.map} +0 -0
- /package/dist/{chunk-AGP7SAEE.mjs.map → chunk-7LTRT3IV.mjs.map} +0 -0
- /package/dist/{chunk-CXDK6XA5.mjs.map → chunk-BBUQMG45.mjs.map} +0 -0
- /package/dist/{chunk-G2GQX4FI.mjs.map → chunk-CUWOXXM5.mjs.map} +0 -0
- /package/dist/{chunk-4JBVPOHK.mjs.map → chunk-GIGUZ2OK.mjs.map} +0 -0
- /package/dist/{chunk-36FJAVOF.mjs.map → chunk-HDOG2RTM.mjs.map} +0 -0
- /package/dist/{chunk-AR7HJPGU.mjs.map → chunk-HI6SPUOX.mjs.map} +0 -0
- /package/dist/{chunk-FCRODLLL.mjs.map → chunk-HYJUBYMU.mjs.map} +0 -0
- /package/dist/{chunk-7D4OASUM.mjs.map → chunk-IHV5PTID.mjs.map} +0 -0
- /package/dist/{chunk-KA3NCZEJ.mjs.map → chunk-JBACWIFW.mjs.map} +0 -0
- /package/dist/{chunk-HHLBUGRA.mjs.map → chunk-JCHRWCYH.mjs.map} +0 -0
- /package/dist/{chunk-MY2BUA6F.mjs.map → chunk-M37URBJS.mjs.map} +0 -0
- /package/dist/{chunk-MZ37BAAE.mjs.map → chunk-MGWRDFBE.mjs.map} +0 -0
- /package/dist/{chunk-23SOG4FI.mjs.map → chunk-TUTNHDM3.mjs.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopilotChatHeadless_c
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JCHRWCYH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultSystemMessage
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-HYJUBYMU.mjs";
|
|
7
|
+
import "../chunk-ZVOLWJCY.mjs";
|
|
8
8
|
import "../chunk-YPSGKPDA.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ITDKIB5E.mjs";
|
|
10
10
|
import "../chunk-L3I57GMV.mjs";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-M37URBJS.mjs";
|
|
12
|
+
import "../chunk-CUWOXXM5.mjs";
|
|
13
|
+
import "../chunk-TUTNHDM3.mjs";
|
|
14
14
|
import "../chunk-PIF5KJYI.mjs";
|
|
15
15
|
import "../chunk-2IDV5OHF.mjs";
|
|
16
16
|
import "../chunk-PMAFHQ7P.mjs";
|
|
@@ -18,13 +18,13 @@ import "../chunk-5FHSUKQL.mjs";
|
|
|
18
18
|
import "../chunk-RKTVJRK7.mjs";
|
|
19
19
|
import "../chunk-ZLQVRPDS.mjs";
|
|
20
20
|
import "../chunk-6ZLPNY7X.mjs";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-3N4MVKFZ.mjs";
|
|
22
22
|
import "../chunk-4CEQJ2X6.mjs";
|
|
23
23
|
import "../chunk-N4WEHORG.mjs";
|
|
24
24
|
import "../chunk-O7ARI5CV.mjs";
|
|
25
25
|
import "../chunk-Q3MCVRO3.mjs";
|
|
26
26
|
import "../chunk-ICIK2BSB.mjs";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-EUX2P2E7.mjs";
|
|
28
28
|
import "../chunk-EFL5OBKN.mjs";
|
|
29
29
|
import "../chunk-SKC7AJIV.mjs";
|
|
30
30
|
export {
|
|
@@ -4,14 +4,14 @@ import '@copilotkit/runtime-client-gql';
|
|
|
4
4
|
import '@copilotkit/shared';
|
|
5
5
|
import './use-chat.js';
|
|
6
6
|
import 'react';
|
|
7
|
-
import '../copilot-context-
|
|
7
|
+
import '../copilot-context-cf9de848.js';
|
|
8
8
|
import '../types/frontend-action.js';
|
|
9
9
|
import './use-tree.js';
|
|
10
10
|
import '../types/document-pointer.js';
|
|
11
11
|
import '../types/chat-suggestion-configuration.js';
|
|
12
12
|
import '../types/coagent-action.js';
|
|
13
13
|
import '../types/coagent-state.js';
|
|
14
|
-
import '../index-
|
|
14
|
+
import '../index-1f5b66ac.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* `useCopilotChat` is a lightweight React hook for headless chat interactions.
|
|
@@ -158,8 +158,10 @@ var emptyCopilotContext = {
|
|
|
158
158
|
setExtensions: () => {
|
|
159
159
|
},
|
|
160
160
|
langGraphInterruptAction: null,
|
|
161
|
-
setLangGraphInterruptAction: () =>
|
|
162
|
-
|
|
161
|
+
setLangGraphInterruptAction: () => {
|
|
162
|
+
},
|
|
163
|
+
removeLangGraphInterruptAction: () => {
|
|
164
|
+
},
|
|
163
165
|
onError: () => {
|
|
164
166
|
},
|
|
165
167
|
bannerError: null,
|
|
@@ -532,7 +534,18 @@ function useChat(options) {
|
|
|
532
534
|
const runChatCompletionRef = (0, import_react6.useRef)();
|
|
533
535
|
const addErrorToast = useErrorToast();
|
|
534
536
|
const { setBannerError } = useToast();
|
|
535
|
-
const { onError } = useCopilotContext();
|
|
537
|
+
const { onError, showDevConsole, getAllContext } = useCopilotContext();
|
|
538
|
+
const copilotReadableContext = getAllContext();
|
|
539
|
+
const context = (0, import_react6.useMemo)(
|
|
540
|
+
() => copilotReadableContext.map((contextItem) => {
|
|
541
|
+
const [description, ...valueParts] = contextItem.value.split(":");
|
|
542
|
+
return {
|
|
543
|
+
description: description.trim(),
|
|
544
|
+
value: valueParts.join(":").trim()
|
|
545
|
+
};
|
|
546
|
+
}),
|
|
547
|
+
[copilotReadableContext]
|
|
548
|
+
);
|
|
536
549
|
const traceUIError = (error, originalError) => __async(this, null, function* () {
|
|
537
550
|
try {
|
|
538
551
|
const traceEvent = {
|
|
@@ -566,7 +579,6 @@ function useChat(options) {
|
|
|
566
579
|
extensionsRef.current = extensions;
|
|
567
580
|
const publicApiKey = copilotConfig.publicApiKey;
|
|
568
581
|
const headers = __spreadValues(__spreadValues({}, copilotConfig.headers || {}), publicApiKey ? { [import_shared4.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
|
|
569
|
-
const { showDevConsole } = useCopilotContext();
|
|
570
582
|
const runtimeClient = useCopilotRuntimeClient({
|
|
571
583
|
url: copilotConfig.chatApiEndpoint,
|
|
572
584
|
publicApiKey: copilotConfig.publicApiKey,
|
|
@@ -647,7 +659,8 @@ function useChat(options) {
|
|
|
647
659
|
}
|
|
648
660
|
return stateObject;
|
|
649
661
|
}),
|
|
650
|
-
forwardedParameters: options.forwardedParameters || {}
|
|
662
|
+
forwardedParameters: options.forwardedParameters || {},
|
|
663
|
+
context
|
|
651
664
|
}),
|
|
652
665
|
properties: finalProperties,
|
|
653
666
|
signal: (_e = chatAbortControllerRef.current) == null ? void 0 : _e.signal
|
|
@@ -691,7 +704,7 @@ function useChat(options) {
|
|
|
691
704
|
if (ev.name === import_runtime_client_gql3.MetaEventName.LangGraphInterruptEvent) {
|
|
692
705
|
let eventValue = (0, import_runtime_client_gql3.langGraphInterruptEvent)(ev).value;
|
|
693
706
|
eventValue = (0, import_shared4.parseJson)(eventValue, eventValue);
|
|
694
|
-
setLangGraphInterruptAction({
|
|
707
|
+
setLangGraphInterruptAction(threadId, {
|
|
695
708
|
event: __spreadProps(__spreadValues({}, (0, import_runtime_client_gql3.langGraphInterruptEvent)(ev)), {
|
|
696
709
|
value: eventValue
|
|
697
710
|
})
|
|
@@ -754,7 +767,7 @@ function useChat(options) {
|
|
|
754
767
|
preservedStructure: !!originalCode
|
|
755
768
|
});
|
|
756
769
|
setIsLoading(false);
|
|
757
|
-
|
|
770
|
+
throw new Error(structuredError.message);
|
|
758
771
|
} else if (messages2.length > 0) {
|
|
759
772
|
newMessages = [...messages2];
|
|
760
773
|
for (const message of messages2) {
|
|
@@ -875,8 +888,8 @@ function useChat(options) {
|
|
|
875
888
|
}
|
|
876
889
|
const currentResultMessagePairedFeAction = message.isResultMessage() ? getPairedFeAction(actions, message) : null;
|
|
877
890
|
if (action && message.isActionExecutionMessage()) {
|
|
878
|
-
const
|
|
879
|
-
const alreadyProcessed =
|
|
891
|
+
const pairedFeAction = getPairedFeAction(actions, message);
|
|
892
|
+
const alreadyProcessed = !pairedFeAction && finalMessages.some(
|
|
880
893
|
(fm) => fm.isResultMessage() && fm.actionExecutionId === message.id
|
|
881
894
|
);
|
|
882
895
|
if (alreadyProcessed) {
|
|
@@ -885,16 +898,16 @@ function useChat(options) {
|
|
|
885
898
|
action,
|
|
886
899
|
message
|
|
887
900
|
);
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
901
|
+
const pairedFeAction2 = getPairedFeAction(actions, resultMessage);
|
|
902
|
+
if (pairedFeAction2) {
|
|
890
903
|
const newExecutionMessage = new import_runtime_client_gql3.ActionExecutionMessage({
|
|
891
|
-
name:
|
|
904
|
+
name: pairedFeAction2.name,
|
|
892
905
|
arguments: (0, import_shared4.parseJson)(resultMessage.result, resultMessage.result),
|
|
893
906
|
status: message.status,
|
|
894
907
|
createdAt: message.createdAt,
|
|
895
908
|
parentMessageId: message.parentMessageId
|
|
896
909
|
});
|
|
897
|
-
yield executeActionFromMessage(
|
|
910
|
+
yield executeActionFromMessage(pairedFeAction2, newExecutionMessage);
|
|
898
911
|
}
|
|
899
912
|
}
|
|
900
913
|
} else if (message.isResultMessage() && currentResultMessagePairedFeAction) {
|
|
@@ -959,7 +972,8 @@ function useChat(options) {
|
|
|
959
972
|
coagentStatesRef,
|
|
960
973
|
agentSession,
|
|
961
974
|
setAgentSession,
|
|
962
|
-
disableSystemMessage
|
|
975
|
+
disableSystemMessage,
|
|
976
|
+
context
|
|
963
977
|
]
|
|
964
978
|
);
|
|
965
979
|
runChatCompletionRef.current = runChatCompletion;
|
|
@@ -988,7 +1002,7 @@ function useChat(options) {
|
|
|
988
1002
|
switch (event.name) {
|
|
989
1003
|
case import_runtime_client_gql3.MetaEventName.LangGraphInterruptEvent:
|
|
990
1004
|
if (event.response) {
|
|
991
|
-
setLangGraphInterruptAction(null);
|
|
1005
|
+
setLangGraphInterruptAction(threadId, null);
|
|
992
1006
|
const value = event.value;
|
|
993
1007
|
return [
|
|
994
1008
|
...acc,
|
|
@@ -1038,8 +1052,8 @@ function useChat(options) {
|
|
|
1038
1052
|
console.warn(`Regenerate cannot be performed on ${reloadMessageRole} role`);
|
|
1039
1053
|
return;
|
|
1040
1054
|
}
|
|
1041
|
-
let historyCutoff = [];
|
|
1042
|
-
if (messages.length > 2) {
|
|
1055
|
+
let historyCutoff = [messages[0]];
|
|
1056
|
+
if (messages.length > 2 && reloadMessageIndex !== 0) {
|
|
1043
1057
|
const lastUserMessageBeforeRegenerate = messages.slice(0, reloadMessageIndex).reverse().find(
|
|
1044
1058
|
(msg) => (
|
|
1045
1059
|
// @ts-expect-error -- message has role
|
|
@@ -1050,6 +1064,8 @@ function useChat(options) {
|
|
|
1050
1064
|
(msg) => msg.id === lastUserMessageBeforeRegenerate.id
|
|
1051
1065
|
);
|
|
1052
1066
|
historyCutoff = messages.slice(0, indexOfLastUserMessageBeforeRegenerate + 1);
|
|
1067
|
+
} else if (messages.length > 2 && reloadMessageIndex === 0) {
|
|
1068
|
+
historyCutoff = [messages[0], messages[1]];
|
|
1053
1069
|
}
|
|
1054
1070
|
setMessages(historyCutoff);
|
|
1055
1071
|
return runChatCompletionAndHandleFunctionCall(historyCutoff);
|
|
@@ -1442,16 +1458,16 @@ var InterruptRenderer = ({ event, result, render, resolve }) => {
|
|
|
1442
1458
|
return render({ event, result, resolve });
|
|
1443
1459
|
};
|
|
1444
1460
|
function useLangGraphInterruptRender() {
|
|
1445
|
-
const { langGraphInterruptAction, setLangGraphInterruptAction, agentSession } = useCopilotContext();
|
|
1461
|
+
const { langGraphInterruptAction, setLangGraphInterruptAction, agentSession, threadId } = useCopilotContext();
|
|
1446
1462
|
const responseRef = import_react8.default.useRef();
|
|
1447
1463
|
const resolveInterrupt = (0, import_react8.useCallback)(
|
|
1448
1464
|
(response) => {
|
|
1449
1465
|
responseRef.current = response;
|
|
1450
1466
|
setTimeout(() => {
|
|
1451
|
-
setLangGraphInterruptAction({ event: { response } });
|
|
1467
|
+
setLangGraphInterruptAction(threadId, { event: { response } });
|
|
1452
1468
|
}, 0);
|
|
1453
1469
|
},
|
|
1454
|
-
[setLangGraphInterruptAction]
|
|
1470
|
+
[setLangGraphInterruptAction, threadId]
|
|
1455
1471
|
);
|
|
1456
1472
|
if (!langGraphInterruptAction || !langGraphInterruptAction.event || !langGraphInterruptAction.render)
|
|
1457
1473
|
return null;
|