@copilotkit/react-core 1.10.0-next.0 → 1.10.0-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 +94 -0
- package/dist/{chunk-YVBDAURK.mjs → chunk-2TSNHEIS.mjs} +6 -6
- package/dist/chunk-2TSNHEIS.mjs.map +1 -0
- package/dist/{chunk-DF4YG4PF.mjs → chunk-3RHHNUVV.mjs} +2 -2
- package/dist/{chunk-LNAQ7JG3.mjs → chunk-6EKLRL7B.mjs} +2 -2
- package/dist/{chunk-O5KV32S5.mjs → chunk-ADZDXHVC.mjs} +2 -2
- package/dist/{chunk-4CFY3CON.mjs → chunk-CLMDRYEN.mjs} +2 -2
- package/dist/{chunk-G35QHAQ6.mjs → chunk-COEUPDRL.mjs} +20 -21
- package/dist/chunk-COEUPDRL.mjs.map +1 -0
- package/dist/{chunk-RGKZCCPA.mjs → chunk-DLEXVOQE.mjs} +5 -5
- package/dist/{chunk-YAF2LATQ.mjs → chunk-EFL5OBKN.mjs} +1 -1
- package/dist/chunk-EFL5OBKN.mjs.map +1 -0
- package/dist/{chunk-JWAXDYOW.mjs → chunk-FAUNHSQU.mjs} +3 -3
- package/dist/chunk-ICIK2BSB.mjs +17 -0
- package/dist/chunk-ICIK2BSB.mjs.map +1 -0
- package/dist/chunk-IHAZJF3V.mjs +34 -0
- package/dist/chunk-IHAZJF3V.mjs.map +1 -0
- package/dist/{chunk-Q6FZZJ5A.mjs → chunk-IN7GE4NO.mjs} +2 -2
- package/dist/{chunk-YSQ5I2AE.mjs → chunk-JBLMXZ3O.mjs} +7 -7
- package/dist/{chunk-PZXTDFMX.mjs → chunk-JJDXTTEN.mjs} +3 -3
- package/dist/chunk-KDAZGZ24.mjs +1 -0
- package/dist/{chunk-LIGLZ53V.mjs → chunk-L6HQIJ74.mjs} +29 -13
- package/dist/chunk-L6HQIJ74.mjs.map +1 -0
- package/dist/{chunk-NAM55D5I.mjs → chunk-LVWV62JZ.mjs} +39 -26
- package/dist/chunk-LVWV62JZ.mjs.map +1 -0
- package/dist/{chunk-3OQM3NEK.mjs → chunk-N4WEHORG.mjs} +2 -2
- package/dist/chunk-OKRZF3DD.mjs +225 -0
- package/dist/chunk-OKRZF3DD.mjs.map +1 -0
- package/dist/{chunk-SJJNFYGQ.mjs → chunk-Q42NJFXR.mjs} +9 -14
- package/dist/chunk-Q42NJFXR.mjs.map +1 -0
- package/dist/chunk-QGE7U4NV.mjs +85 -0
- package/dist/chunk-QGE7U4NV.mjs.map +1 -0
- package/dist/{chunk-XGRBCWK6.mjs → chunk-TEMLWRRT.mjs} +3 -3
- package/dist/chunk-TEMLWRRT.mjs.map +1 -0
- package/dist/{chunk-YBDRISKO.mjs → chunk-TWYUYC4F.mjs} +43 -9
- package/dist/chunk-TWYUYC4F.mjs.map +1 -0
- package/dist/{chunk-LU5JPZ24.mjs → chunk-X2DNXTME.mjs} +6 -6
- package/dist/chunk-X2DNXTME.mjs.map +1 -0
- package/dist/{chunk-DCTJZ742.mjs → chunk-ZLQVRPDS.mjs} +5 -2
- package/dist/chunk-ZLQVRPDS.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.d.ts +17 -1
- package/dist/components/copilot-provider/copilot-messages.js +46 -7
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +11 -7
- package/dist/components/copilot-provider/copilotkit-props.d.ts +5 -3
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -2
- package/dist/components/copilot-provider/copilotkit.js +337 -555
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +11 -11
- package/dist/components/copilot-provider/index.d.ts +1 -2
- package/dist/components/copilot-provider/index.js +337 -555
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +11 -11
- package/dist/components/error-boundary/error-boundary.js +176 -323
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +4 -4
- package/dist/components/error-boundary/error-utils.js.map +1 -1
- package/dist/components/error-boundary/error-utils.mjs +2 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +337 -555
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -11
- package/dist/components/toast/toast-provider.js.map +1 -1
- package/dist/components/toast/toast-provider.mjs +1 -1
- package/dist/components/usage-banner.d.ts +10 -4
- package/dist/components/usage-banner.js +176 -302
- package/dist/components/usage-banner.js.map +1 -1
- package/dist/components/usage-banner.mjs +3 -1
- package/dist/context/copilot-context.d.ts +1 -2
- package/dist/context/copilot-context.js +2 -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 +11 -15
- package/dist/context/copilot-messages-context.js +4 -1
- package/dist/context/copilot-messages-context.js.map +1 -1
- package/dist/context/copilot-messages-context.mjs +1 -1
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +6 -3
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +2 -2
- package/dist/{copilot-context-bd88d30d.d.ts → copilot-context-256f9020.d.ts} +4 -22
- package/dist/hooks/index.d.ts +7 -5
- package/dist/hooks/index.js +250 -122
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +32 -24
- package/dist/hooks/use-chat.d.ts +1 -2
- package/dist/hooks/use-chat.js +11 -3
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +6 -6
- package/dist/hooks/use-coagent-state-render.js +2 -2
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +3 -3
- package/dist/hooks/use-coagent.d.ts +4 -5
- package/dist/hooks/use-coagent.js +114 -81
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +15 -15
- package/dist/hooks/use-copilot-action.d.ts +1 -1
- package/dist/hooks/use-copilot-action.js +2 -2
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +4 -4
- package/dist/hooks/use-copilot-additional-instructions.js +2 -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 +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +5 -5
- package/dist/hooks/use-copilot-chat-headless_c.d.ts +33 -0
- package/dist/hooks/use-copilot-chat-headless_c.js +1837 -0
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs +31 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat.d.ts +52 -82
- package/dist/hooks/use-copilot-chat.js +60 -13
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +15 -16
- package/dist/hooks/use-copilot-chat_internal.d.ts +177 -0
- package/dist/hooks/use-copilot-chat_internal.js +1770 -0
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -0
- package/dist/hooks/use-copilot-chat_internal.mjs +29 -0
- package/dist/hooks/use-copilot-chat_internal.mjs.map +1 -0
- package/dist/hooks/use-copilot-readable.js +2 -2
- 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.js +9 -1
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +3 -3
- package/dist/hooks/use-langgraph-interrupt-render.js +2 -2
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +3 -3
- package/dist/hooks/use-langgraph-interrupt.d.ts +3 -4
- package/dist/hooks/use-langgraph-interrupt.js +32 -11
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +15 -15
- package/dist/hooks/use-make-copilot-document-readable.js +2 -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-08c43df1.d.ts +36 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +460 -471
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -26
- package/dist/lib/copilot-task.d.ts +1 -2
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +12 -12
- package/dist/lib/index.d.ts +1 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +12 -12
- package/dist/types/interrupt-action.d.ts +2 -3
- package/dist/utils/dev-console.d.ts +1 -1
- package/dist/utils/dev-console.js +9 -1
- package/dist/utils/dev-console.js.map +1 -1
- package/dist/utils/dev-console.mjs +1 -1
- package/dist/utils/extract.d.ts +2 -2
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +11 -11
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +9 -1
- 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 +11 -11
- package/package.json +3 -3
- package/src/components/copilot-provider/copilot-messages.tsx +57 -1
- package/src/components/copilot-provider/copilotkit-props.tsx +4 -1
- package/src/components/copilot-provider/copilotkit.tsx +20 -10
- package/src/components/error-boundary/error-boundary.tsx +5 -15
- package/src/components/toast/toast-provider.tsx +1 -3
- package/src/components/usage-banner.tsx +193 -316
- package/src/context/copilot-context.tsx +12 -6
- package/src/context/copilot-messages-context.tsx +7 -1
- package/src/hooks/__tests__/use-coagent-config.test.ts +8 -1
- package/src/hooks/index.ts +7 -2
- package/src/hooks/use-coagent.ts +18 -20
- package/src/hooks/use-copilot-action.ts +1 -1
- package/src/hooks/use-copilot-chat-headless_c.ts +187 -0
- package/src/hooks/use-copilot-chat.ts +64 -495
- package/src/hooks/use-copilot-chat_internal.ts +543 -0
- package/src/hooks/use-langgraph-interrupt.ts +1 -1
- package/src/utils/dev-console.ts +18 -2
- package/dist/chunk-57K2ZJ5F.mjs +0 -348
- package/dist/chunk-57K2ZJ5F.mjs.map +0 -1
- package/dist/chunk-CQPYJIBH.mjs +0 -1
- package/dist/chunk-DCTJZ742.mjs.map +0 -1
- package/dist/chunk-G35QHAQ6.mjs.map +0 -1
- package/dist/chunk-GFJW4RIM.mjs +0 -9
- package/dist/chunk-GFJW4RIM.mjs.map +0 -1
- package/dist/chunk-LIGLZ53V.mjs.map +0 -1
- package/dist/chunk-LU5JPZ24.mjs.map +0 -1
- package/dist/chunk-NAM55D5I.mjs.map +0 -1
- package/dist/chunk-SJJNFYGQ.mjs.map +0 -1
- package/dist/chunk-XGRBCWK6.mjs.map +0 -1
- package/dist/chunk-YAF2LATQ.mjs.map +0 -1
- package/dist/chunk-YBDRISKO.mjs.map +0 -1
- package/dist/chunk-YVBDAURK.mjs.map +0 -1
- /package/dist/{chunk-DF4YG4PF.mjs.map → chunk-3RHHNUVV.mjs.map} +0 -0
- /package/dist/{chunk-LNAQ7JG3.mjs.map → chunk-6EKLRL7B.mjs.map} +0 -0
- /package/dist/{chunk-O5KV32S5.mjs.map → chunk-ADZDXHVC.mjs.map} +0 -0
- /package/dist/{chunk-4CFY3CON.mjs.map → chunk-CLMDRYEN.mjs.map} +0 -0
- /package/dist/{chunk-RGKZCCPA.mjs.map → chunk-DLEXVOQE.mjs.map} +0 -0
- /package/dist/{chunk-JWAXDYOW.mjs.map → chunk-FAUNHSQU.mjs.map} +0 -0
- /package/dist/{chunk-Q6FZZJ5A.mjs.map → chunk-IN7GE4NO.mjs.map} +0 -0
- /package/dist/{chunk-YSQ5I2AE.mjs.map → chunk-JBLMXZ3O.mjs.map} +0 -0
- /package/dist/{chunk-PZXTDFMX.mjs.map → chunk-JJDXTTEN.mjs.map} +0 -0
- /package/dist/{chunk-CQPYJIBH.mjs.map → chunk-KDAZGZ24.mjs.map} +0 -0
- /package/dist/{chunk-3OQM3NEK.mjs.map → chunk-N4WEHORG.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,57 +1,63 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-KDAZGZ24.mjs";
|
|
2
2
|
import {
|
|
3
3
|
useLangGraphInterrupt
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2TSNHEIS.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useMakeCopilotDocumentReadable
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-CLMDRYEN.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useCopilotAdditionalInstructions
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-3RHHNUVV.mjs";
|
|
11
11
|
import {
|
|
12
12
|
useCopilotAuthenticatedAction_c
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-JJDXTTEN.mjs";
|
|
14
14
|
import {
|
|
15
15
|
useCopilotAction
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-X2DNXTME.mjs";
|
|
17
|
+
import {
|
|
18
|
+
useCopilotChatHeadless_c
|
|
19
|
+
} from "../chunk-QGE7U4NV.mjs";
|
|
20
|
+
import {
|
|
21
|
+
useCopilotChat as useCopilotChat2
|
|
22
|
+
} from "../chunk-IHAZJF3V.mjs";
|
|
17
23
|
import {
|
|
18
24
|
useCopilotReadable
|
|
19
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-6EKLRL7B.mjs";
|
|
20
26
|
import {
|
|
21
27
|
useCoAgentStateRender
|
|
22
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-DLEXVOQE.mjs";
|
|
23
29
|
import {
|
|
24
30
|
runAgent,
|
|
25
31
|
startAgent,
|
|
26
32
|
stopAgent,
|
|
27
33
|
useCoAgent
|
|
28
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-COEUPDRL.mjs";
|
|
29
35
|
import {
|
|
30
36
|
useCopilotChat
|
|
31
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-L6HQIJ74.mjs";
|
|
32
38
|
import {
|
|
33
39
|
useLangGraphInterruptRender
|
|
34
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-IN7GE4NO.mjs";
|
|
35
41
|
import "../chunk-YPSGKPDA.mjs";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-LVWV62JZ.mjs";
|
|
43
|
+
import "../chunk-TWYUYC4F.mjs";
|
|
44
|
+
import "../chunk-Q42NJFXR.mjs";
|
|
39
45
|
import "../chunk-2IDV5OHF.mjs";
|
|
40
46
|
import "../chunk-PMAFHQ7P.mjs";
|
|
41
|
-
import "../chunk-RKTVJRK7.mjs";
|
|
42
47
|
import "../chunk-5FHSUKQL.mjs";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-RKTVJRK7.mjs";
|
|
49
|
+
import "../chunk-ZLQVRPDS.mjs";
|
|
50
|
+
import "../chunk-OKRZF3DD.mjs";
|
|
51
|
+
import "../chunk-JBLMXZ3O.mjs";
|
|
46
52
|
import "../chunk-4CEQJ2X6.mjs";
|
|
47
|
-
import "../chunk-
|
|
53
|
+
import "../chunk-N4WEHORG.mjs";
|
|
48
54
|
import "../chunk-O7ARI5CV.mjs";
|
|
49
55
|
import {
|
|
50
56
|
useCopilotRuntimeClient
|
|
51
|
-
} from "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
54
|
-
import "../chunk-
|
|
57
|
+
} from "../chunk-FAUNHSQU.mjs";
|
|
58
|
+
import "../chunk-ICIK2BSB.mjs";
|
|
59
|
+
import "../chunk-TEMLWRRT.mjs";
|
|
60
|
+
import "../chunk-EFL5OBKN.mjs";
|
|
55
61
|
import "../chunk-SKC7AJIV.mjs";
|
|
56
62
|
export {
|
|
57
63
|
runAgent,
|
|
@@ -62,7 +68,9 @@ export {
|
|
|
62
68
|
useCopilotAction,
|
|
63
69
|
useCopilotAdditionalInstructions,
|
|
64
70
|
useCopilotAuthenticatedAction_c,
|
|
65
|
-
useCopilotChat,
|
|
71
|
+
useCopilotChat2 as useCopilotChat,
|
|
72
|
+
useCopilotChatHeadless_c,
|
|
73
|
+
useCopilotChat as useCopilotChatInternal,
|
|
66
74
|
useCopilotReadable,
|
|
67
75
|
useCopilotRuntimeClient,
|
|
68
76
|
useLangGraphInterrupt,
|
package/dist/hooks/use-chat.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
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-256f9020.js';
|
|
5
5
|
import { FrontendAction } from '../types/frontend-action.js';
|
|
6
6
|
import { CoagentState } from '../types/coagent-state.js';
|
|
7
|
-
import '../context/copilot-messages-context.js';
|
|
8
7
|
import './use-tree.js';
|
|
9
8
|
import '../types/document-pointer.js';
|
|
10
9
|
import '../types/chat-suggestion-configuration.js';
|
package/dist/hooks/use-chat.js
CHANGED
|
@@ -187,8 +187,8 @@ var emptyCopilotContext = {
|
|
|
187
187
|
setLangGraphInterruptAction: () => null,
|
|
188
188
|
removeLangGraphInterruptAction: () => null,
|
|
189
189
|
onError: void 0,
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
bannerError: null,
|
|
191
|
+
setBannerError: () => {
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
var CopilotContext = import_react.default.createContext(emptyCopilotContext);
|
|
@@ -224,8 +224,16 @@ var import_react3 = require("react");
|
|
|
224
224
|
var import_shared3 = require("@copilotkit/shared");
|
|
225
225
|
|
|
226
226
|
// src/utils/dev-console.ts
|
|
227
|
+
function isLocalhost() {
|
|
228
|
+
if (typeof window === "undefined")
|
|
229
|
+
return false;
|
|
230
|
+
return window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname === "0.0.0.0";
|
|
231
|
+
}
|
|
227
232
|
function shouldShowDevConsole(showDevConsole) {
|
|
228
|
-
|
|
233
|
+
if (showDevConsole !== void 0) {
|
|
234
|
+
return showDevConsole;
|
|
235
|
+
}
|
|
236
|
+
return isLocalhost();
|
|
229
237
|
}
|
|
230
238
|
|
|
231
239
|
// src/hooks/use-copilot-runtime-client.ts
|