@copilotkit/react-core 1.10.4 → 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 +16 -0
- package/dist/{chunk-AALETENN.mjs → chunk-FRXYSJGZ.mjs} +64 -3
- package/dist/chunk-FRXYSJGZ.mjs.map +1 -0
- package/dist/{chunk-QNJNOZH3.mjs → chunk-O73FZGSU.mjs} +2 -2
- package/dist/{chunk-CLAHAV6J.mjs → chunk-OLXYK6PP.mjs} +3 -3
- package/dist/{chunk-ID5JRMGN.mjs → chunk-RLT4KZR4.mjs} +2 -2
- package/dist/{chunk-5KVEE73R.mjs → chunk-UPQPBCUW.mjs} +2 -2
- package/dist/{chunk-LLLCUHOO.mjs → chunk-WBBJMOZI.mjs} +18 -6
- package/dist/chunk-WBBJMOZI.mjs.map +1 -0
- package/dist/{chunk-EBSAU46C.mjs → chunk-WRPXFDFL.mjs} +2 -2
- package/dist/{chunk-HWM2Z3J3.mjs → chunk-XFJNMZ6X.mjs} +2 -2
- package/dist/{chunk-6WTWBXEJ.mjs → chunk-ZRDV3MVW.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit.js +63 -2
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +2 -2
- package/dist/components/copilot-provider/index.js +63 -2
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +2 -2
- package/dist/components/dev-console/console-trigger.js +63 -2
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +1 -1
- package/dist/components/index.js +63 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/index.js +16 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +8 -8
- package/dist/hooks/use-chat.js +16 -4
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +1 -1
- package/dist/hooks/use-coagent.js +16 -4
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +4 -4
- 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 +5 -5
- package/dist/index.js +79 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/lib/copilot-task.mjs +3 -3
- package/dist/lib/index.mjs +3 -3
- package/dist/utils/extract.mjs +2 -2
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/suggestions.mjs +2 -2
- package/package.json +3 -3
- package/src/components/dev-console/console-trigger.tsx +66 -2
- package/src/hooks/use-chat.ts +18 -4
- package/dist/chunk-AALETENN.mjs.map +0 -1
- package/dist/chunk-LLLCUHOO.mjs.map +0 -1
- /package/dist/{chunk-QNJNOZH3.mjs.map → chunk-O73FZGSU.mjs.map} +0 -0
- /package/dist/{chunk-CLAHAV6J.mjs.map → chunk-OLXYK6PP.mjs.map} +0 -0
- /package/dist/{chunk-ID5JRMGN.mjs.map → chunk-RLT4KZR4.mjs.map} +0 -0
- /package/dist/{chunk-5KVEE73R.mjs.map → chunk-UPQPBCUW.mjs.map} +0 -0
- /package/dist/{chunk-EBSAU46C.mjs.map → chunk-WRPXFDFL.mjs.map} +0 -0
- /package/dist/{chunk-HWM2Z3J3.mjs.map → chunk-XFJNMZ6X.mjs.map} +0 -0
- /package/dist/{chunk-6WTWBXEJ.mjs.map → chunk-ZRDV3MVW.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-36FJAVOF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useLangGraphInterrupt
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-WRPXFDFL.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useMakeCopilotDocumentReadable
|
|
10
10
|
} from "../chunk-CXDK6XA5.mjs";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
startAgent,
|
|
17
17
|
stopAgent,
|
|
18
18
|
useCoAgent
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-O73FZGSU.mjs";
|
|
20
20
|
import {
|
|
21
21
|
useCopilotAdditionalInstructions
|
|
22
22
|
} from "../chunk-MZ37BAAE.mjs";
|
|
@@ -28,22 +28,22 @@ import {
|
|
|
28
28
|
} from "../chunk-JEMBA7PE.mjs";
|
|
29
29
|
import {
|
|
30
30
|
useCopilotChatHeadless_c
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-RLT4KZR4.mjs";
|
|
32
32
|
import {
|
|
33
33
|
useCopilotChat as useCopilotChat2
|
|
34
|
-
} from "../chunk-
|
|
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-
|
|
41
|
+
import "../chunk-WBBJMOZI.mjs";
|
|
42
42
|
import "../chunk-4CEQJ2X6.mjs";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-ZRDV3MVW.mjs";
|
|
44
44
|
import "../chunk-N4VN2B5S.mjs";
|
|
45
45
|
import "../chunk-2MGJO3FY.mjs";
|
|
46
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-FRXYSJGZ.mjs";
|
|
47
47
|
import "../chunk-DSDAZA3B.mjs";
|
|
48
48
|
import "../chunk-PIF5KJYI.mjs";
|
|
49
49
|
import "../chunk-2IDV5OHF.mjs";
|
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;
|