@copilotkit/react-core 1.10.5-next.0 → 1.10.5-next.1
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 +8 -0
- package/dist/{chunk-MY2BUA6F.mjs → chunk-2MGJO3FY.mjs} +6 -6
- package/dist/{chunk-CLQLVMW4.mjs → chunk-2QZSAQTX.mjs} +4 -4
- package/dist/{chunk-23SOG4FI.mjs → chunk-DSDAZA3B.mjs} +4 -4
- package/dist/{chunk-G2GQX4FI.mjs → chunk-FRXYSJGZ.mjs} +2 -2
- package/dist/{chunk-AR7HJPGU.mjs → chunk-JEMBA7PE.mjs} +4 -4
- package/dist/{chunk-4JBVPOHK.mjs → chunk-KWS75AOU.mjs} +2 -2
- package/dist/{chunk-L3I57GMV.mjs → chunk-N4VN2B5S.mjs} +4 -4
- package/dist/{chunk-AGP7SAEE.mjs → chunk-O73FZGSU.mjs} +8 -8
- package/dist/{chunk-FCRODLLL.mjs → chunk-OLXYK6PP.mjs} +8 -8
- package/dist/{chunk-HHLBUGRA.mjs → chunk-RLT4KZR4.mjs} +2 -2
- package/dist/{chunk-7D4OASUM.mjs → chunk-UPQPBCUW.mjs} +4 -4
- package/dist/{chunk-6INCKUL6.mjs → chunk-WBBJMOZI.mjs} +23 -11
- package/dist/chunk-WBBJMOZI.mjs.map +1 -0
- package/dist/{chunk-NALRM7KT.mjs → chunk-WRPXFDFL.mjs} +5 -5
- package/dist/{chunk-KA3NCZEJ.mjs → chunk-XFJNMZ6X.mjs} +2 -2
- package/dist/{chunk-7LZXD5RJ.mjs → chunk-ZRDV3MVW.mjs} +11 -11
- package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
- package/dist/components/copilot-provider/copilotkit.mjs +10 -10
- package/dist/components/copilot-provider/index.mjs +10 -10
- package/dist/components/dev-console/console-trigger.mjs +3 -3
- package/dist/components/dev-console/developer-console-modal.mjs +2 -2
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.mjs +10 -10
- package/dist/context/index.mjs +4 -4
- package/dist/hooks/index.js +16 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +31 -31
- package/dist/hooks/use-chat.js +16 -4
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +4 -4
- package/dist/hooks/use-coagent-state-render.mjs +2 -2
- package/dist/hooks/use-coagent.js +16 -4
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +15 -15
- package/dist/hooks/use-copilot-action.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
- package/dist/hooks/use-copilot-chat-headless_c.js +16 -4
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +15 -15
- package/dist/hooks/use-copilot-chat.js +16 -4
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +15 -15
- package/dist/hooks/use-copilot-chat_internal.js +16 -4
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +14 -14
- package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
- package/dist/hooks/use-langgraph-interrupt.js +16 -4
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +15 -15
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -35
- package/dist/lib/copilot-task.mjs +12 -12
- package/dist/lib/index.mjs +12 -12
- package/dist/utils/extract.mjs +10 -10
- package/dist/utils/index.mjs +10 -10
- package/dist/utils/suggestions.mjs +10 -10
- package/package.json +3 -3
- package/src/hooks/use-chat.ts +18 -4
- package/dist/chunk-6INCKUL6.mjs.map +0 -1
- /package/dist/{chunk-MY2BUA6F.mjs.map → chunk-2MGJO3FY.mjs.map} +0 -0
- /package/dist/{chunk-CLQLVMW4.mjs.map → chunk-2QZSAQTX.mjs.map} +0 -0
- /package/dist/{chunk-23SOG4FI.mjs.map → chunk-DSDAZA3B.mjs.map} +0 -0
- /package/dist/{chunk-G2GQX4FI.mjs.map → chunk-FRXYSJGZ.mjs.map} +0 -0
- /package/dist/{chunk-AR7HJPGU.mjs.map → chunk-JEMBA7PE.mjs.map} +0 -0
- /package/dist/{chunk-4JBVPOHK.mjs.map → chunk-KWS75AOU.mjs.map} +0 -0
- /package/dist/{chunk-L3I57GMV.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
- /package/dist/{chunk-AGP7SAEE.mjs.map → chunk-O73FZGSU.mjs.map} +0 -0
- /package/dist/{chunk-FCRODLLL.mjs.map → chunk-OLXYK6PP.mjs.map} +0 -0
- /package/dist/{chunk-HHLBUGRA.mjs.map → chunk-RLT4KZR4.mjs.map} +0 -0
- /package/dist/{chunk-7D4OASUM.mjs.map → chunk-UPQPBCUW.mjs.map} +0 -0
- /package/dist/{chunk-NALRM7KT.mjs.map → chunk-WRPXFDFL.mjs.map} +0 -0
- /package/dist/{chunk-KA3NCZEJ.mjs.map → chunk-XFJNMZ6X.mjs.map} +0 -0
- /package/dist/{chunk-7LZXD5RJ.mjs.map → chunk-ZRDV3MVW.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import "../chunk-KDAZGZ24.mjs";
|
|
2
|
+
import {
|
|
3
|
+
useCopilotReadable
|
|
4
|
+
} from "../chunk-36FJAVOF.mjs";
|
|
2
5
|
import {
|
|
3
6
|
useLangGraphInterrupt
|
|
4
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-WRPXFDFL.mjs";
|
|
5
8
|
import {
|
|
6
9
|
useMakeCopilotDocumentReadable
|
|
7
10
|
} from "../chunk-CXDK6XA5.mjs";
|
|
11
|
+
import {
|
|
12
|
+
useCoAgentStateRender
|
|
13
|
+
} from "../chunk-2QZSAQTX.mjs";
|
|
14
|
+
import {
|
|
15
|
+
runAgent,
|
|
16
|
+
startAgent,
|
|
17
|
+
stopAgent,
|
|
18
|
+
useCoAgent
|
|
19
|
+
} from "../chunk-O73FZGSU.mjs";
|
|
8
20
|
import {
|
|
9
21
|
useCopilotAdditionalInstructions
|
|
10
22
|
} from "../chunk-MZ37BAAE.mjs";
|
|
11
23
|
import {
|
|
12
24
|
useCopilotAuthenticatedAction_c
|
|
13
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-KWS75AOU.mjs";
|
|
14
26
|
import {
|
|
15
27
|
useCopilotAction
|
|
16
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-JEMBA7PE.mjs";
|
|
17
29
|
import {
|
|
18
30
|
useCopilotChatHeadless_c
|
|
19
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-RLT4KZR4.mjs";
|
|
20
32
|
import {
|
|
21
33
|
useCopilotChat as useCopilotChat2
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import {
|
|
24
|
-
useCopilotReadable
|
|
25
|
-
} from "../chunk-36FJAVOF.mjs";
|
|
26
|
-
import {
|
|
27
|
-
useCoAgentStateRender
|
|
28
|
-
} from "../chunk-CLQLVMW4.mjs";
|
|
29
|
-
import {
|
|
30
|
-
runAgent,
|
|
31
|
-
startAgent,
|
|
32
|
-
stopAgent,
|
|
33
|
-
useCoAgent
|
|
34
|
-
} from "../chunk-AGP7SAEE.mjs";
|
|
34
|
+
} from "../chunk-XFJNMZ6X.mjs";
|
|
35
35
|
import {
|
|
36
36
|
useCopilotChat
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-OLXYK6PP.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useLangGraphInterruptRender
|
|
40
40
|
} from "../chunk-QF3Q5LUN.mjs";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-WBBJMOZI.mjs";
|
|
42
|
+
import "../chunk-4CEQJ2X6.mjs";
|
|
43
|
+
import "../chunk-ZRDV3MVW.mjs";
|
|
44
|
+
import "../chunk-N4VN2B5S.mjs";
|
|
45
|
+
import "../chunk-2MGJO3FY.mjs";
|
|
46
|
+
import "../chunk-FRXYSJGZ.mjs";
|
|
47
|
+
import "../chunk-DSDAZA3B.mjs";
|
|
47
48
|
import "../chunk-PIF5KJYI.mjs";
|
|
48
49
|
import "../chunk-2IDV5OHF.mjs";
|
|
49
50
|
import "../chunk-PMAFHQ7P.mjs";
|
|
50
51
|
import "../chunk-5FHSUKQL.mjs";
|
|
51
52
|
import "../chunk-RKTVJRK7.mjs";
|
|
52
|
-
import "../chunk-ZLQVRPDS.mjs";
|
|
53
|
-
import "../chunk-6ZLPNY7X.mjs";
|
|
54
|
-
import "../chunk-6INCKUL6.mjs";
|
|
55
|
-
import "../chunk-4CEQJ2X6.mjs";
|
|
56
|
-
import "../chunk-N4WEHORG.mjs";
|
|
57
|
-
import "../chunk-O7ARI5CV.mjs";
|
|
58
53
|
import {
|
|
59
54
|
useCopilotRuntimeClient
|
|
60
55
|
} from "../chunk-Q3MCVRO3.mjs";
|
|
61
56
|
import "../chunk-ICIK2BSB.mjs";
|
|
62
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-N4WEHORG.mjs";
|
|
58
|
+
import "../chunk-O7ARI5CV.mjs";
|
|
63
59
|
import "../chunk-EFL5OBKN.mjs";
|
|
60
|
+
import "../chunk-6ZLPNY7X.mjs";
|
|
61
|
+
import "../chunk-YPSGKPDA.mjs";
|
|
62
|
+
import "../chunk-YHT6CWIY.mjs";
|
|
63
|
+
import "../chunk-ZLQVRPDS.mjs";
|
|
64
64
|
import "../chunk-SKC7AJIV.mjs";
|
|
65
65
|
export {
|
|
66
66
|
runAgent,
|
package/dist/hooks/use-chat.js
CHANGED
|
@@ -507,7 +507,18 @@ function useChat(options) {
|
|
|
507
507
|
const runChatCompletionRef = (0, import_react5.useRef)();
|
|
508
508
|
const addErrorToast = useErrorToast();
|
|
509
509
|
const { setBannerError } = useToast();
|
|
510
|
-
const { onError } = useCopilotContext();
|
|
510
|
+
const { onError, showDevConsole, getAllContext } = useCopilotContext();
|
|
511
|
+
const copilotReadableContext = getAllContext();
|
|
512
|
+
const context = (0, import_react5.useMemo)(
|
|
513
|
+
() => copilotReadableContext.map((contextItem) => {
|
|
514
|
+
const [description, ...valueParts] = contextItem.value.split(":");
|
|
515
|
+
return {
|
|
516
|
+
description: description.trim(),
|
|
517
|
+
value: valueParts.join(":").trim()
|
|
518
|
+
};
|
|
519
|
+
}),
|
|
520
|
+
[copilotReadableContext]
|
|
521
|
+
);
|
|
511
522
|
const traceUIError = (error, originalError) => __async(this, null, function* () {
|
|
512
523
|
try {
|
|
513
524
|
const traceEvent = {
|
|
@@ -541,7 +552,6 @@ function useChat(options) {
|
|
|
541
552
|
extensionsRef.current = extensions;
|
|
542
553
|
const publicApiKey = copilotConfig.publicApiKey;
|
|
543
554
|
const headers = __spreadValues(__spreadValues({}, copilotConfig.headers || {}), publicApiKey ? { [import_shared4.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
|
|
544
|
-
const { showDevConsole } = useCopilotContext();
|
|
545
555
|
const runtimeClient = useCopilotRuntimeClient({
|
|
546
556
|
url: copilotConfig.chatApiEndpoint,
|
|
547
557
|
publicApiKey: copilotConfig.publicApiKey,
|
|
@@ -622,7 +632,8 @@ function useChat(options) {
|
|
|
622
632
|
}
|
|
623
633
|
return stateObject;
|
|
624
634
|
}),
|
|
625
|
-
forwardedParameters: options.forwardedParameters || {}
|
|
635
|
+
forwardedParameters: options.forwardedParameters || {},
|
|
636
|
+
context
|
|
626
637
|
}),
|
|
627
638
|
properties: finalProperties,
|
|
628
639
|
signal: (_e = chatAbortControllerRef.current) == null ? void 0 : _e.signal
|
|
@@ -934,7 +945,8 @@ function useChat(options) {
|
|
|
934
945
|
coagentStatesRef,
|
|
935
946
|
agentSession,
|
|
936
947
|
setAgentSession,
|
|
937
|
-
disableSystemMessage
|
|
948
|
+
disableSystemMessage,
|
|
949
|
+
context
|
|
938
950
|
]
|
|
939
951
|
);
|
|
940
952
|
runChatCompletionRef.current = runChatCompletion;
|