@copilotkit/react-core 1.10.4-next.0 → 1.10.4-next.2
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 +17 -0
- package/dist/{chunk-BKODPOZI.mjs → chunk-2MGJO3FY.mjs} +7 -7
- package/dist/{chunk-DLEXVOQE.mjs → chunk-2QZSAQTX.mjs} +4 -4
- package/dist/{chunk-6EKLRL7B.mjs → chunk-36FJAVOF.mjs} +2 -2
- package/dist/{chunk-TQGWN4FE.mjs → chunk-5KVEE73R.mjs} +4 -4
- package/dist/{chunk-SAWWZBE3.mjs → chunk-6WTWBXEJ.mjs} +56 -15
- package/dist/chunk-6WTWBXEJ.mjs.map +1 -0
- package/dist/{chunk-KOGKA4V5.mjs → chunk-AALETENN.mjs} +3 -3
- package/dist/{chunk-B6ZYKFIA.mjs → chunk-CLAHAV6J.mjs} +10 -10
- package/dist/{chunk-CLMDRYEN.mjs → chunk-CXDK6XA5.mjs} +2 -2
- package/dist/{chunk-QXSEHCPY.mjs → chunk-DSDAZA3B.mjs} +4 -4
- package/dist/{chunk-PI7BDJ6G.mjs → chunk-EBSAU46C.mjs} +5 -5
- package/dist/{chunk-W7W43PPC.mjs → chunk-HWM2Z3J3.mjs} +2 -2
- package/dist/{chunk-FG3FWUVW.mjs → chunk-ID5JRMGN.mjs} +3 -3
- package/dist/{chunk-X2DNXTME.mjs → chunk-JEMBA7PE.mjs} +4 -4
- package/dist/{chunk-JJDXTTEN.mjs → chunk-KWS75AOU.mjs} +3 -3
- package/dist/{chunk-V5PU37CB.mjs → chunk-LLLCUHOO.mjs} +9 -10
- package/dist/chunk-LLLCUHOO.mjs.map +1 -0
- package/dist/{chunk-3RHHNUVV.mjs → chunk-MZ37BAAE.mjs} +2 -2
- package/dist/{chunk-L3I57GMV.mjs → chunk-N4VN2B5S.mjs} +4 -4
- package/dist/{chunk-FAUNHSQU.mjs → chunk-Q3MCVRO3.mjs} +1 -3
- package/dist/chunk-Q3MCVRO3.mjs.map +1 -0
- package/dist/{chunk-IN7GE4NO.mjs → chunk-QF3Q5LUN.mjs} +2 -2
- package/dist/{chunk-2DXYQG42.mjs → chunk-QNJNOZH3.mjs} +12 -11
- package/dist/chunk-QNJNOZH3.mjs.map +1 -0
- package/dist/{chunk-TEMLWRRT.mjs → chunk-YHT6CWIY.mjs} +8 -2
- package/dist/{chunk-TEMLWRRT.mjs.map → chunk-YHT6CWIY.mjs.map} +1 -1
- package/dist/components/copilot-provider/copilot-messages.js +7 -1
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
- 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 +51 -6
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +10 -10
- package/dist/components/copilot-provider/index.d.ts +1 -1
- package/dist/components/copilot-provider/index.js +51 -6
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +10 -10
- package/dist/components/dev-console/console-trigger.js +7 -1
- 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 +7 -1
- 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/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +51 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -10
- package/dist/context/copilot-context.d.ts +1 -1
- package/dist/context/copilot-context.js +7 -1
- 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 +7 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +4 -4
- package/dist/{copilot-context-256f9020.d.ts → copilot-context-59740e82.d.ts} +4 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +12 -8
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +35 -35
- package/dist/hooks/use-chat.d.ts +1 -1
- package/dist/hooks/use-chat.js +9 -6
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +4 -4
- package/dist/hooks/use-coagent-state-render.js +7 -1
- 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 +12 -8
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +16 -16
- package/dist/hooks/use-copilot-action.js +7 -1
- 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 +7 -1
- 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 +7 -1
- 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 +9 -6
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +16 -16
- package/dist/hooks/use-copilot-chat.d.ts +2 -2
- package/dist/hooks/use-copilot-chat.js +9 -6
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +16 -16
- package/dist/hooks/use-copilot-chat_internal.d.ts +2 -2
- package/dist/hooks/use-copilot-chat_internal.js +9 -6
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +15 -15
- package/dist/hooks/use-copilot-readable.js +7 -1
- package/dist/hooks/use-copilot-readable.js.map +1 -1
- package/dist/hooks/use-copilot-readable.mjs +2 -2
- package/dist/hooks/use-copilot-runtime-client.d.ts +1 -1
- package/dist/hooks/use-copilot-runtime-client.js +0 -2
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.js +7 -1
- 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 +9 -6
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +16 -16
- package/dist/hooks/use-make-copilot-document-readable.js +7 -1
- 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-08c43df1.d.ts → index-d1743abe.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +56 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -40
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +12 -12
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +12 -12
- package/dist/types/interrupt-action.d.ts +1 -1
- package/dist/utils/extract.d.ts +2 -2
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +10 -10
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +11 -11
- package/dist/utils/suggestions.d.ts +2 -2
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +10 -10
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit.tsx +55 -2
- package/src/context/copilot-context.tsx +11 -2
- package/src/hooks/use-chat.ts +3 -3
- package/src/hooks/use-coagent.ts +2 -1
- package/src/hooks/use-copilot-runtime-client.ts +4 -4
- package/dist/chunk-2DXYQG42.mjs.map +0 -1
- package/dist/chunk-FAUNHSQU.mjs.map +0 -1
- package/dist/chunk-SAWWZBE3.mjs.map +0 -1
- package/dist/chunk-V5PU37CB.mjs.map +0 -1
- /package/dist/{chunk-BKODPOZI.mjs.map → chunk-2MGJO3FY.mjs.map} +0 -0
- /package/dist/{chunk-DLEXVOQE.mjs.map → chunk-2QZSAQTX.mjs.map} +0 -0
- /package/dist/{chunk-6EKLRL7B.mjs.map → chunk-36FJAVOF.mjs.map} +0 -0
- /package/dist/{chunk-TQGWN4FE.mjs.map → chunk-5KVEE73R.mjs.map} +0 -0
- /package/dist/{chunk-KOGKA4V5.mjs.map → chunk-AALETENN.mjs.map} +0 -0
- /package/dist/{chunk-B6ZYKFIA.mjs.map → chunk-CLAHAV6J.mjs.map} +0 -0
- /package/dist/{chunk-CLMDRYEN.mjs.map → chunk-CXDK6XA5.mjs.map} +0 -0
- /package/dist/{chunk-QXSEHCPY.mjs.map → chunk-DSDAZA3B.mjs.map} +0 -0
- /package/dist/{chunk-PI7BDJ6G.mjs.map → chunk-EBSAU46C.mjs.map} +0 -0
- /package/dist/{chunk-W7W43PPC.mjs.map → chunk-HWM2Z3J3.mjs.map} +0 -0
- /package/dist/{chunk-FG3FWUVW.mjs.map → chunk-ID5JRMGN.mjs.map} +0 -0
- /package/dist/{chunk-X2DNXTME.mjs.map → chunk-JEMBA7PE.mjs.map} +0 -0
- /package/dist/{chunk-JJDXTTEN.mjs.map → chunk-KWS75AOU.mjs.map} +0 -0
- /package/dist/{chunk-3RHHNUVV.mjs.map → chunk-MZ37BAAE.mjs.map} +0 -0
- /package/dist/{chunk-L3I57GMV.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
- /package/dist/{chunk-IN7GE4NO.mjs.map → chunk-QF3Q5LUN.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-EBSAU46C.mjs";
|
|
5
8
|
import {
|
|
6
9
|
useMakeCopilotDocumentReadable
|
|
7
|
-
} from "../chunk-
|
|
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-QNJNOZH3.mjs";
|
|
8
20
|
import {
|
|
9
21
|
useCopilotAdditionalInstructions
|
|
10
|
-
} from "../chunk-
|
|
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-ID5JRMGN.mjs";
|
|
20
32
|
import {
|
|
21
33
|
useCopilotChat as useCopilotChat2
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import {
|
|
24
|
-
useCopilotReadable
|
|
25
|
-
} from "../chunk-6EKLRL7B.mjs";
|
|
26
|
-
import {
|
|
27
|
-
useCoAgentStateRender
|
|
28
|
-
} from "../chunk-DLEXVOQE.mjs";
|
|
29
|
-
import {
|
|
30
|
-
runAgent,
|
|
31
|
-
startAgent,
|
|
32
|
-
stopAgent,
|
|
33
|
-
useCoAgent
|
|
34
|
-
} from "../chunk-2DXYQG42.mjs";
|
|
34
|
+
} from "../chunk-HWM2Z3J3.mjs";
|
|
35
35
|
import {
|
|
36
36
|
useCopilotChat
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-CLAHAV6J.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useLangGraphInterruptRender
|
|
40
|
-
} from "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
40
|
+
} from "../chunk-QF3Q5LUN.mjs";
|
|
41
|
+
import "../chunk-LLLCUHOO.mjs";
|
|
42
|
+
import "../chunk-4CEQJ2X6.mjs";
|
|
43
|
+
import "../chunk-6WTWBXEJ.mjs";
|
|
44
|
+
import "../chunk-N4VN2B5S.mjs";
|
|
45
|
+
import "../chunk-2MGJO3FY.mjs";
|
|
46
|
+
import "../chunk-AALETENN.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-V5PU37CB.mjs";
|
|
55
|
-
import "../chunk-4CEQJ2X6.mjs";
|
|
56
|
-
import "../chunk-N4WEHORG.mjs";
|
|
57
|
-
import "../chunk-O7ARI5CV.mjs";
|
|
58
53
|
import {
|
|
59
54
|
useCopilotRuntimeClient
|
|
60
|
-
} from "../chunk-
|
|
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.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FunctionCallHandler, CoAgentStateRenderHandler } from '@copilotkit/shared';
|
|
3
3
|
import { Message, TextMessage, ForwardedParametersInput, ExtensionsInput } from '@copilotkit/runtime-client-gql';
|
|
4
|
-
import { c as CopilotApiConfig, A as AgentSession, L as LangGraphInterruptAction, d as LangGraphInterruptActionSetter } from '../copilot-context-
|
|
4
|
+
import { c as CopilotApiConfig, A as AgentSession, L as LangGraphInterruptAction, d as LangGraphInterruptActionSetter } from '../copilot-context-59740e82.js';
|
|
5
5
|
import { FrontendAction } from '../types/frontend-action.js';
|
|
6
6
|
import { CoagentState } from '../types/coagent-state.js';
|
|
7
7
|
import './use-tree.js';
|
package/dist/hooks/use-chat.js
CHANGED
|
@@ -186,9 +186,15 @@ var emptyCopilotContext = {
|
|
|
186
186
|
langGraphInterruptAction: null,
|
|
187
187
|
setLangGraphInterruptAction: () => null,
|
|
188
188
|
removeLangGraphInterruptAction: () => null,
|
|
189
|
-
onError:
|
|
189
|
+
onError: () => {
|
|
190
|
+
},
|
|
190
191
|
bannerError: null,
|
|
191
192
|
setBannerError: () => {
|
|
193
|
+
},
|
|
194
|
+
internalErrorHandlers: {},
|
|
195
|
+
setInternalErrorHandler: () => {
|
|
196
|
+
},
|
|
197
|
+
removeInternalErrorHandler: () => {
|
|
192
198
|
}
|
|
193
199
|
};
|
|
194
200
|
var CopilotContext = import_react.default.createContext(emptyCopilotContext);
|
|
@@ -242,8 +248,6 @@ var useCopilotRuntimeClient = (options) => {
|
|
|
242
248
|
const _a = options, { showDevConsole, onError } = _a, runtimeOptions = __objRest(_a, ["showDevConsole", "onError"]);
|
|
243
249
|
const lastStructuredErrorRef = (0, import_react3.useRef)(null);
|
|
244
250
|
const traceUIError = (error, originalError) => __async(void 0, null, function* () {
|
|
245
|
-
if (!onError || !runtimeOptions.publicApiKey)
|
|
246
|
-
return;
|
|
247
251
|
try {
|
|
248
252
|
const errorEvent = {
|
|
249
253
|
type: "error",
|
|
@@ -505,8 +509,6 @@ function useChat(options) {
|
|
|
505
509
|
const { setBannerError } = useToast();
|
|
506
510
|
const { onError } = useCopilotContext();
|
|
507
511
|
const traceUIError = (error, originalError) => __async(this, null, function* () {
|
|
508
|
-
if (!onError || !(copilotConfig == null ? void 0 : copilotConfig.publicApiKey))
|
|
509
|
-
return;
|
|
510
512
|
try {
|
|
511
513
|
const traceEvent = {
|
|
512
514
|
type: "error",
|
|
@@ -545,7 +547,8 @@ function useChat(options) {
|
|
|
545
547
|
publicApiKey: copilotConfig.publicApiKey,
|
|
546
548
|
headers,
|
|
547
549
|
credentials: copilotConfig.credentials,
|
|
548
|
-
showDevConsole
|
|
550
|
+
showDevConsole,
|
|
551
|
+
onError
|
|
549
552
|
});
|
|
550
553
|
const pendingAppendsRef = (0, import_react5.useRef)([]);
|
|
551
554
|
const runChatCompletion = useAsyncCallback(
|