@copilotkit/react-core 1.10.4-next.1 → 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 +9 -0
- package/dist/{chunk-FXREPC7Q.mjs → chunk-2MGJO3FY.mjs} +2 -2
- package/dist/{chunk-GEKWHETN.mjs → chunk-2QZSAQTX.mjs} +2 -2
- package/dist/{chunk-6EKLRL7B.mjs → chunk-36FJAVOF.mjs} +2 -2
- package/dist/{chunk-SDKNRQYW.mjs → chunk-5KVEE73R.mjs} +2 -2
- package/dist/{chunk-PV2YCDIS.mjs → chunk-6WTWBXEJ.mjs} +49 -8
- package/dist/chunk-6WTWBXEJ.mjs.map +1 -0
- package/dist/{chunk-QE7Z6LQR.mjs → chunk-AALETENN.mjs} +3 -3
- package/dist/{chunk-3BVVJLD6.mjs → chunk-CLAHAV6J.mjs} +5 -5
- package/dist/{chunk-CLMDRYEN.mjs → chunk-CXDK6XA5.mjs} +2 -2
- package/dist/{chunk-A2ORBLCP.mjs → chunk-DSDAZA3B.mjs} +2 -2
- package/dist/{chunk-GRGZ7U67.mjs → chunk-EBSAU46C.mjs} +3 -3
- package/dist/{chunk-VCDX2QJC.mjs → chunk-HWM2Z3J3.mjs} +2 -2
- package/dist/{chunk-RSPMGHVC.mjs → chunk-ID5JRMGN.mjs} +3 -3
- package/dist/{chunk-OPRDTF4S.mjs → chunk-JEMBA7PE.mjs} +2 -2
- package/dist/{chunk-K4HXT453.mjs → chunk-KWS75AOU.mjs} +3 -3
- package/dist/{chunk-HD3F6XVZ.mjs → chunk-LLLCUHOO.mjs} +5 -6
- package/dist/chunk-LLLCUHOO.mjs.map +1 -0
- package/dist/{chunk-3RHHNUVV.mjs → chunk-MZ37BAAE.mjs} +2 -2
- 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-YFDFLCHH.mjs → chunk-QNJNOZH3.mjs} +8 -7
- 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 +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 +51 -6
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +6 -6
- 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 +6 -6
- 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/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 +6 -6
- 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 +1 -1
- 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 +19 -19
- 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 +3 -3
- 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 +10 -10
- 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 +10 -10
- 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 +10 -10
- 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 +9 -9
- 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 +10 -10
- 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 +20 -20
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +7 -7
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- 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 +6 -6
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +6 -6
- package/dist/utils/suggestions.d.ts +2 -2
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +6 -6
- 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-FAUNHSQU.mjs.map +0 -1
- package/dist/chunk-HD3F6XVZ.mjs.map +0 -1
- package/dist/chunk-PV2YCDIS.mjs.map +0 -1
- package/dist/chunk-YFDFLCHH.mjs.map +0 -1
- /package/dist/{chunk-FXREPC7Q.mjs.map → chunk-2MGJO3FY.mjs.map} +0 -0
- /package/dist/{chunk-GEKWHETN.mjs.map → chunk-2QZSAQTX.mjs.map} +0 -0
- /package/dist/{chunk-6EKLRL7B.mjs.map → chunk-36FJAVOF.mjs.map} +0 -0
- /package/dist/{chunk-SDKNRQYW.mjs.map → chunk-5KVEE73R.mjs.map} +0 -0
- /package/dist/{chunk-QE7Z6LQR.mjs.map → chunk-AALETENN.mjs.map} +0 -0
- /package/dist/{chunk-3BVVJLD6.mjs.map → chunk-CLAHAV6J.mjs.map} +0 -0
- /package/dist/{chunk-CLMDRYEN.mjs.map → chunk-CXDK6XA5.mjs.map} +0 -0
- /package/dist/{chunk-A2ORBLCP.mjs.map → chunk-DSDAZA3B.mjs.map} +0 -0
- /package/dist/{chunk-GRGZ7U67.mjs.map → chunk-EBSAU46C.mjs.map} +0 -0
- /package/dist/{chunk-VCDX2QJC.mjs.map → chunk-HWM2Z3J3.mjs.map} +0 -0
- /package/dist/{chunk-RSPMGHVC.mjs.map → chunk-ID5JRMGN.mjs.map} +0 -0
- /package/dist/{chunk-OPRDTF4S.mjs.map → chunk-JEMBA7PE.mjs.map} +0 -0
- /package/dist/{chunk-K4HXT453.mjs.map → chunk-KWS75AOU.mjs.map} +0 -0
- /package/dist/{chunk-3RHHNUVV.mjs.map → chunk-MZ37BAAE.mjs.map} +0 -0
- /package/dist/{chunk-IN7GE4NO.mjs.map → chunk-QF3Q5LUN.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import "../chunk-KDAZGZ24.mjs";
|
|
2
2
|
import {
|
|
3
3
|
useCopilotReadable
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-36FJAVOF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useLangGraphInterrupt
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-EBSAU46C.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useMakeCopilotDocumentReadable
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-CXDK6XA5.mjs";
|
|
11
11
|
import {
|
|
12
12
|
useCoAgentStateRender
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-2QZSAQTX.mjs";
|
|
14
14
|
import {
|
|
15
15
|
runAgent,
|
|
16
16
|
startAgent,
|
|
17
17
|
stopAgent,
|
|
18
18
|
useCoAgent
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-QNJNOZH3.mjs";
|
|
20
20
|
import {
|
|
21
21
|
useCopilotAdditionalInstructions
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-MZ37BAAE.mjs";
|
|
23
23
|
import {
|
|
24
24
|
useCopilotAuthenticatedAction_c
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-KWS75AOU.mjs";
|
|
26
26
|
import {
|
|
27
27
|
useCopilotAction
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-JEMBA7PE.mjs";
|
|
29
29
|
import {
|
|
30
30
|
useCopilotChatHeadless_c
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-ID5JRMGN.mjs";
|
|
32
32
|
import {
|
|
33
33
|
useCopilotChat as useCopilotChat2
|
|
34
|
-
} from "../chunk-
|
|
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-
|
|
40
|
+
} from "../chunk-QF3Q5LUN.mjs";
|
|
41
|
+
import "../chunk-LLLCUHOO.mjs";
|
|
42
42
|
import "../chunk-4CEQJ2X6.mjs";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-6WTWBXEJ.mjs";
|
|
44
44
|
import "../chunk-N4VN2B5S.mjs";
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-2MGJO3FY.mjs";
|
|
46
|
+
import "../chunk-AALETENN.mjs";
|
|
47
|
+
import "../chunk-DSDAZA3B.mjs";
|
|
48
48
|
import "../chunk-PIF5KJYI.mjs";
|
|
49
49
|
import "../chunk-2IDV5OHF.mjs";
|
|
50
50
|
import "../chunk-PMAFHQ7P.mjs";
|
|
@@ -52,14 +52,14 @@ import "../chunk-5FHSUKQL.mjs";
|
|
|
52
52
|
import "../chunk-RKTVJRK7.mjs";
|
|
53
53
|
import {
|
|
54
54
|
useCopilotRuntimeClient
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-Q3MCVRO3.mjs";
|
|
56
56
|
import "../chunk-ICIK2BSB.mjs";
|
|
57
57
|
import "../chunk-N4WEHORG.mjs";
|
|
58
58
|
import "../chunk-O7ARI5CV.mjs";
|
|
59
59
|
import "../chunk-EFL5OBKN.mjs";
|
|
60
60
|
import "../chunk-6ZLPNY7X.mjs";
|
|
61
61
|
import "../chunk-YPSGKPDA.mjs";
|
|
62
|
-
import "../chunk-
|
|
62
|
+
import "../chunk-YHT6CWIY.mjs";
|
|
63
63
|
import "../chunk-ZLQVRPDS.mjs";
|
|
64
64
|
import "../chunk-SKC7AJIV.mjs";
|
|
65
65
|
export {
|
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(
|