@copilotkit/react-core 1.10.0-next.3 → 1.10.0-next.4
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-VOMGRGWT.mjs → chunk-2JAX6WE6.mjs} +7 -7
- package/dist/chunk-2JAX6WE6.mjs.map +1 -0
- package/dist/{chunk-WUORFPJ7.mjs → chunk-2WYJIO6D.mjs} +4 -4
- package/dist/chunk-373NOCJI.mjs +79 -0
- package/dist/chunk-373NOCJI.mjs.map +1 -0
- package/dist/{chunk-XGRBCWK6.mjs → chunk-47GMU44Z.mjs} +4 -1
- package/dist/chunk-47GMU44Z.mjs.map +1 -0
- package/dist/{chunk-DF4YG4PF.mjs → chunk-57MBVQPX.mjs} +2 -2
- package/dist/{chunk-JZQOCH4A.mjs → chunk-5JL5ELUS.mjs} +2 -2
- package/dist/{chunk-LNAQ7JG3.mjs → chunk-AC2GVFW6.mjs} +2 -2
- package/dist/{chunk-RGKZCCPA.mjs → chunk-AVMA2MCW.mjs} +3 -3
- package/dist/chunk-AWFAFFO5.mjs +221 -0
- package/dist/chunk-AWFAFFO5.mjs.map +1 -0
- package/dist/{chunk-4XVBXDCX.mjs → chunk-BBK7LXZ6.mjs} +5 -5
- package/dist/{chunk-YAF2LATQ.mjs → chunk-EFL5OBKN.mjs} +1 -1
- package/dist/chunk-EFL5OBKN.mjs.map +1 -0
- package/dist/{chunk-4CFY3CON.mjs → chunk-EQQSE6KM.mjs} +2 -2
- package/dist/{chunk-JWAXDYOW.mjs → chunk-FAUNHSQU.mjs} +3 -3
- package/dist/{chunk-NXCJELW7.mjs → chunk-G7J6NY5J.mjs} +3 -3
- package/dist/chunk-ICIK2BSB.mjs +17 -0
- package/dist/chunk-ICIK2BSB.mjs.map +1 -0
- package/dist/{chunk-PYULBXCD.mjs → chunk-JLQZVKFX.mjs} +4 -4
- package/dist/chunk-KDAZGZ24.mjs +1 -0
- package/dist/{chunk-OMVNJ7S3.mjs → chunk-L7CWMU4O.mjs} +34 -19
- package/dist/chunk-L7CWMU4O.mjs.map +1 -0
- package/dist/{chunk-3OQM3NEK.mjs → chunk-N4WEHORG.mjs} +2 -2
- package/dist/{chunk-Q6FZZJ5A.mjs → chunk-OL3VRQKU.mjs} +2 -2
- package/dist/chunk-PQ5IXT4Z.mjs +18 -0
- package/dist/chunk-PQ5IXT4Z.mjs.map +1 -0
- package/dist/{chunk-VM7CVIET.mjs → chunk-PRKL7T7P.mjs} +6 -6
- package/dist/chunk-PRKL7T7P.mjs.map +1 -0
- package/dist/{chunk-KV25ZRMH.mjs → chunk-XIHAYU6C.mjs} +4 -4
- package/dist/chunk-XIHAYU6C.mjs.map +1 -0
- package/dist/{chunk-SGF6C7I6.mjs → chunk-ZTZJIDRJ.mjs} +9 -14
- package/dist/chunk-ZTZJIDRJ.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.js +12 -1
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +4 -4
- 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 +307 -550
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +9 -9
- package/dist/components/copilot-provider/index.d.ts +1 -1
- package/dist/components/copilot-provider/index.js +307 -550
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +9 -9
- package/dist/components/error-boundary/error-boundary.js +172 -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 -1
- package/dist/components/index.js +307 -550
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -9
- 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 +8 -3
- package/dist/components/usage-banner.js +172 -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 -1
- package/dist/context/copilot-context.js +3 -0
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +3 -0
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{copilot-context-bd88d30d.d.ts → copilot-context-78fc727c.d.ts} +3 -1
- package/dist/hooks/index.d.ts +5 -3
- package/dist/hooks/index.js +143 -57
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +32 -24
- package/dist/hooks/use-chat.d.ts +1 -1
- package/dist/hooks/use-chat.js +12 -1
- 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 +3 -0
- 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 +1 -1
- package/dist/hooks/use-coagent.js +15 -4
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +13 -13
- package/dist/hooks/use-copilot-action.js +3 -0
- 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 +3 -0
- 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 +3 -0
- 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-light.d.ts +211 -0
- package/dist/hooks/use-copilot-chat-light.js +1770 -0
- package/dist/hooks/use-copilot-chat-light.js.map +1 -0
- package/dist/hooks/use-copilot-chat-light.mjs +28 -0
- package/dist/hooks/use-copilot-chat-light.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat.d.ts +9 -81
- package/dist/hooks/use-copilot-chat.js +77 -5
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +15 -13
- package/dist/hooks/use-copilot-chat_internal.d.ts +91 -0
- package/dist/hooks/use-copilot-chat_internal.js +1760 -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 +3 -0
- 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 +3 -0
- 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 +15 -4
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +13 -13
- package/dist/hooks/use-make-copilot-document-readable.js +3 -0
- 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.d.ts +4 -2
- package/dist/index.js +384 -449
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -26
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +10 -10
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +10 -10
- package/dist/types/interrupt-action.d.ts +1 -1
- 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 +1 -1
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +9 -9
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +9 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +9 -9
- package/dist/utils/suggestions.d.ts +1 -1
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +9 -9
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit.tsx +16 -5
- 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 +187 -315
- package/src/context/copilot-context.tsx +12 -1
- package/src/hooks/__tests__/use-coagent-config.test.ts +1 -1
- package/src/hooks/index.ts +6 -0
- package/src/hooks/use-coagent.ts +1 -1
- package/src/hooks/use-copilot-chat-light.ts +219 -0
- package/src/hooks/use-copilot-chat.ts +89 -430
- package/src/hooks/use-copilot-chat_internal.ts +437 -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-GFJW4RIM.mjs +0 -9
- package/dist/chunk-GFJW4RIM.mjs.map +0 -1
- package/dist/chunk-KV25ZRMH.mjs.map +0 -1
- package/dist/chunk-OMVNJ7S3.mjs.map +0 -1
- package/dist/chunk-SGF6C7I6.mjs.map +0 -1
- package/dist/chunk-VM7CVIET.mjs.map +0 -1
- package/dist/chunk-VOMGRGWT.mjs.map +0 -1
- package/dist/chunk-XGRBCWK6.mjs.map +0 -1
- package/dist/chunk-YAF2LATQ.mjs.map +0 -1
- /package/dist/{chunk-WUORFPJ7.mjs.map → chunk-2WYJIO6D.mjs.map} +0 -0
- /package/dist/{chunk-DF4YG4PF.mjs.map → chunk-57MBVQPX.mjs.map} +0 -0
- /package/dist/{chunk-JZQOCH4A.mjs.map → chunk-5JL5ELUS.mjs.map} +0 -0
- /package/dist/{chunk-LNAQ7JG3.mjs.map → chunk-AC2GVFW6.mjs.map} +0 -0
- /package/dist/{chunk-RGKZCCPA.mjs.map → chunk-AVMA2MCW.mjs.map} +0 -0
- /package/dist/{chunk-4XVBXDCX.mjs.map → chunk-BBK7LXZ6.mjs.map} +0 -0
- /package/dist/{chunk-4CFY3CON.mjs.map → chunk-EQQSE6KM.mjs.map} +0 -0
- /package/dist/{chunk-JWAXDYOW.mjs.map → chunk-FAUNHSQU.mjs.map} +0 -0
- /package/dist/{chunk-NXCJELW7.mjs.map → chunk-G7J6NY5J.mjs.map} +0 -0
- /package/dist/{chunk-PYULBXCD.mjs.map → chunk-JLQZVKFX.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/{chunk-Q6FZZJ5A.mjs.map → chunk-OL3VRQKU.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,56 +1,62 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-KDAZGZ24.mjs";
|
|
2
|
+
import {
|
|
3
|
+
useCopilotReadable
|
|
4
|
+
} from "../chunk-AC2GVFW6.mjs";
|
|
2
5
|
import {
|
|
3
6
|
useLangGraphInterrupt
|
|
4
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-XIHAYU6C.mjs";
|
|
5
8
|
import {
|
|
6
9
|
useMakeCopilotDocumentReadable
|
|
7
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-EQQSE6KM.mjs";
|
|
8
11
|
import {
|
|
9
12
|
useCoAgentStateRender
|
|
10
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-AVMA2MCW.mjs";
|
|
11
14
|
import {
|
|
12
15
|
runAgent,
|
|
13
16
|
startAgent,
|
|
14
17
|
stopAgent,
|
|
15
18
|
useCoAgent
|
|
16
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-PRKL7T7P.mjs";
|
|
17
20
|
import {
|
|
18
21
|
useCopilotAdditionalInstructions
|
|
19
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-57MBVQPX.mjs";
|
|
20
23
|
import {
|
|
21
24
|
useCopilotAuthenticatedAction_c
|
|
22
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-G7J6NY5J.mjs";
|
|
23
26
|
import {
|
|
24
27
|
useCopilotAction
|
|
25
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-2WYJIO6D.mjs";
|
|
29
|
+
import {
|
|
30
|
+
useCopilotChatLight
|
|
31
|
+
} from "../chunk-PQ5IXT4Z.mjs";
|
|
32
|
+
import {
|
|
33
|
+
useCopilotChat as useCopilotChat2
|
|
34
|
+
} from "../chunk-373NOCJI.mjs";
|
|
26
35
|
import {
|
|
27
36
|
useCopilotChat
|
|
28
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-2JAX6WE6.mjs";
|
|
29
38
|
import {
|
|
30
39
|
useLangGraphInterruptRender
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import "../chunk-
|
|
40
|
+
} from "../chunk-OL3VRQKU.mjs";
|
|
41
|
+
import "../chunk-BBK7LXZ6.mjs";
|
|
33
42
|
import "../chunk-4CEQJ2X6.mjs";
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import "../chunk-OMVNJ7S3.mjs";
|
|
38
|
-
import "../chunk-PYULBXCD.mjs";
|
|
39
|
-
import "../chunk-SGF6C7I6.mjs";
|
|
43
|
+
import "../chunk-L7CWMU4O.mjs";
|
|
44
|
+
import "../chunk-JLQZVKFX.mjs";
|
|
45
|
+
import "../chunk-ZTZJIDRJ.mjs";
|
|
40
46
|
import "../chunk-2IDV5OHF.mjs";
|
|
41
47
|
import "../chunk-PMAFHQ7P.mjs";
|
|
42
48
|
import "../chunk-5FHSUKQL.mjs";
|
|
43
49
|
import "../chunk-RKTVJRK7.mjs";
|
|
44
50
|
import {
|
|
45
51
|
useCopilotRuntimeClient
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
52
|
+
} from "../chunk-FAUNHSQU.mjs";
|
|
53
|
+
import "../chunk-ICIK2BSB.mjs";
|
|
54
|
+
import "../chunk-N4WEHORG.mjs";
|
|
49
55
|
import "../chunk-O7ARI5CV.mjs";
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-EFL5OBKN.mjs";
|
|
57
|
+
import "../chunk-AWFAFFO5.mjs";
|
|
52
58
|
import "../chunk-YPSGKPDA.mjs";
|
|
53
|
-
import "../chunk-
|
|
59
|
+
import "../chunk-47GMU44Z.mjs";
|
|
54
60
|
import "../chunk-DCTJZ742.mjs";
|
|
55
61
|
import "../chunk-SKC7AJIV.mjs";
|
|
56
62
|
export {
|
|
@@ -62,7 +68,9 @@ export {
|
|
|
62
68
|
useCopilotAction,
|
|
63
69
|
useCopilotAdditionalInstructions,
|
|
64
70
|
useCopilotAuthenticatedAction_c,
|
|
65
|
-
useCopilotChat,
|
|
71
|
+
useCopilotChat2 as useCopilotChat,
|
|
72
|
+
useCopilotChat as useCopilotChatInternal,
|
|
73
|
+
useCopilotChatLight,
|
|
66
74
|
useCopilotReadable,
|
|
67
75
|
useCopilotRuntimeClient,
|
|
68
76
|
useLangGraphInterrupt,
|
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-78fc727c.js';
|
|
5
5
|
import { FrontendAction } from '../types/frontend-action.js';
|
|
6
6
|
import { CoagentState } from '../types/coagent-state.js';
|
|
7
7
|
import '../context/copilot-messages-context.js';
|
package/dist/hooks/use-chat.js
CHANGED
|
@@ -188,6 +188,9 @@ var emptyCopilotContext = {
|
|
|
188
188
|
removeLangGraphInterruptAction: () => null,
|
|
189
189
|
onError: void 0,
|
|
190
190
|
suggestions: [],
|
|
191
|
+
bannerError: null,
|
|
192
|
+
setBannerError: () => {
|
|
193
|
+
},
|
|
191
194
|
setSuggestions: () => {
|
|
192
195
|
}
|
|
193
196
|
};
|
|
@@ -224,8 +227,16 @@ var import_react3 = require("react");
|
|
|
224
227
|
var import_shared3 = require("@copilotkit/shared");
|
|
225
228
|
|
|
226
229
|
// src/utils/dev-console.ts
|
|
230
|
+
function isLocalhost() {
|
|
231
|
+
if (typeof window === "undefined")
|
|
232
|
+
return false;
|
|
233
|
+
return window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname === "0.0.0.0";
|
|
234
|
+
}
|
|
227
235
|
function shouldShowDevConsole(showDevConsole) {
|
|
228
|
-
|
|
236
|
+
if (showDevConsole !== void 0) {
|
|
237
|
+
return showDevConsole;
|
|
238
|
+
}
|
|
239
|
+
return isLocalhost();
|
|
229
240
|
}
|
|
230
241
|
|
|
231
242
|
// src/hooks/use-copilot-runtime-client.ts
|