@copilotkit/react-core 1.5.1-next.2 → 1.5.1-next.3
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-LNI2Z45S.mjs → chunk-2KCEHGSI.mjs} +50 -100
- package/dist/chunk-2KCEHGSI.mjs.map +1 -0
- package/dist/{chunk-2KT73RVG.mjs → chunk-6OR25P32.mjs} +19 -75
- package/dist/chunk-6OR25P32.mjs.map +1 -0
- package/dist/{chunk-3GQPEN4M.mjs → chunk-DDVXFNYA.mjs} +32 -66
- package/dist/chunk-DDVXFNYA.mjs.map +1 -0
- package/dist/{chunk-XOQMISG3.mjs → chunk-FXHKK52V.mjs} +13 -14
- package/dist/chunk-FXHKK52V.mjs.map +1 -0
- package/dist/{chunk-HIUT2NLX.mjs → chunk-H4VZMKR6.mjs} +2 -2
- package/dist/{chunk-X36DNILG.mjs → chunk-H7LSKIDK.mjs} +23 -71
- package/dist/chunk-H7LSKIDK.mjs.map +1 -0
- package/dist/chunk-JDQCJCAQ.mjs +295 -0
- package/dist/chunk-JDQCJCAQ.mjs.map +1 -0
- package/dist/chunk-L34MHAXR.mjs +1 -0
- package/dist/{chunk-WXREY7UP.mjs → chunk-LODRWFMB.mjs} +4 -16
- package/dist/chunk-LODRWFMB.mjs.map +1 -0
- package/dist/{chunk-EWKJMQOF.mjs → chunk-MWZO6TUR.mjs} +13 -29
- package/dist/chunk-MWZO6TUR.mjs.map +1 -0
- package/dist/{chunk-6BQVZFNO.mjs → chunk-ODN4H66E.mjs} +2 -6
- package/dist/chunk-ODN4H66E.mjs.map +1 -0
- package/dist/{chunk-FQ53HQYZ.mjs → chunk-QDGDXRRJ.mjs} +2 -2
- package/dist/{chunk-22XKTBPF.mjs → chunk-XINZBP3J.mjs} +3 -15
- package/dist/chunk-XINZBP3J.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.d.ts +0 -9
- package/dist/components/copilot-provider/copilotkit-props.d.ts +0 -21
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +0 -9
- package/dist/components/copilot-provider/copilotkit.js +95 -224
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +8 -9
- package/dist/components/copilot-provider/index.d.ts +0 -9
- package/dist/components/copilot-provider/index.js +95 -224
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +8 -9
- package/dist/components/index.d.ts +0 -9
- package/dist/components/index.js +95 -224
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +8 -9
- package/dist/components/toast/toast-provider.d.ts +1 -2
- package/dist/components/toast/toast-provider.js +63 -77
- package/dist/components/toast/toast-provider.js.map +1 -1
- package/dist/components/toast/toast-provider.mjs +1 -1
- package/dist/context/copilot-context.d.ts +4 -37
- package/dist/context/copilot-context.js +3 -15
- 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 -15
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +4 -4
- package/dist/hooks/index.d.ts +1 -3
- package/dist/hooks/index.js +297 -703
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +23 -35
- package/dist/hooks/use-chat.d.ts +3 -35
- package/dist/hooks/use-chat.js +205 -453
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +3 -4
- package/dist/hooks/use-coagent-state-render.d.ts +2 -2
- package/dist/hooks/use-coagent-state-render.js +8 -43
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +2 -4
- package/dist/hooks/use-coagent.d.ts +1 -14
- package/dist/hooks/use-coagent.js +265 -603
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +12 -20
- package/dist/hooks/use-copilot-action.d.ts +2 -12
- package/dist/hooks/use-copilot-action.js +19 -169
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +2 -4
- package/dist/hooks/use-copilot-chat.d.ts +0 -2
- package/dist/hooks/use-copilot-chat.js +240 -545
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +11 -13
- package/dist/hooks/use-copilot-readable.js +3 -15
- 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 +4 -110
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +2 -2
- package/dist/hooks/use-make-copilot-document-readable.js +3 -15
- 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 +3 -4
- package/dist/index.js +398 -812
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -43
- package/dist/lib/copilot-task.d.ts +1 -6
- package/dist/lib/copilot-task.js +17 -55
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +9 -11
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +17 -55
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +9 -11
- package/dist/types/frontend-action.d.ts +2 -21
- package/dist/types/frontend-action.js +0 -34
- package/dist/types/frontend-action.js.map +1 -1
- package/dist/types/frontend-action.mjs +0 -7
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/extract.d.ts +2 -3
- package/dist/utils/extract.js +3 -21
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +8 -9
- package/dist/utils/index.js +3 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +9 -10
- package/package.json +5 -5
- package/dist/chunk-22XKTBPF.mjs.map +0 -1
- package/dist/chunk-2KT73RVG.mjs.map +0 -1
- package/dist/chunk-3GQPEN4M.mjs.map +0 -1
- package/dist/chunk-6BQVZFNO.mjs.map +0 -1
- package/dist/chunk-EWKJMQOF.mjs.map +0 -1
- package/dist/chunk-LHKIIAUQ.mjs +0 -59
- package/dist/chunk-LHKIIAUQ.mjs.map +0 -1
- package/dist/chunk-LNI2Z45S.mjs.map +0 -1
- package/dist/chunk-NR2BTA6Z.mjs +0 -1
- package/dist/chunk-VGOFRULA.mjs +0 -401
- package/dist/chunk-VGOFRULA.mjs.map +0 -1
- package/dist/chunk-VNTDIJSG.mjs +0 -37
- package/dist/chunk-VNTDIJSG.mjs.map +0 -1
- package/dist/chunk-WXREY7UP.mjs.map +0 -1
- package/dist/chunk-X36DNILG.mjs.map +0 -1
- package/dist/chunk-XERJQUHA.mjs +0 -31
- package/dist/chunk-XERJQUHA.mjs.map +0 -1
- package/dist/chunk-XOQMISG3.mjs.map +0 -1
- package/dist/components/error-boundary/error-boundary.d.ts +0 -22
- package/dist/components/error-boundary/error-boundary.js +0 -183
- package/dist/components/error-boundary/error-boundary.js.map +0 -1
- package/dist/components/error-boundary/error-boundary.mjs +0 -12
- package/dist/components/error-boundary/error-boundary.mjs.map +0 -1
- package/dist/components/error-boundary/error-utils.d.ts +0 -11
- package/dist/components/error-boundary/error-utils.js +0 -177
- package/dist/components/error-boundary/error-utils.js.map +0 -1
- package/dist/components/error-boundary/error-utils.mjs +0 -13
- package/dist/components/error-boundary/error-utils.mjs.map +0 -1
- package/dist/hooks/use-copilot-authenticated-action.d.ts +0 -8
- package/dist/hooks/use-copilot-authenticated-action.js +0 -418
- package/dist/hooks/use-copilot-authenticated-action.js.map +0 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +0 -12
- package/dist/hooks/use-copilot-authenticated-action.mjs.map +0 -1
- /package/dist/{chunk-HIUT2NLX.mjs.map → chunk-H4VZMKR6.mjs.map} +0 -0
- /package/dist/{chunk-NR2BTA6Z.mjs.map → chunk-L34MHAXR.mjs.map} +0 -0
- /package/dist/{chunk-FQ53HQYZ.mjs.map → chunk-QDGDXRRJ.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,53 +1,41 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-L34MHAXR.mjs";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
stopAgent,
|
|
6
|
-
useCoAgent
|
|
7
|
-
} from "../chunk-3GQPEN4M.mjs";
|
|
3
|
+
useCopilotReadable
|
|
4
|
+
} from "../chunk-QDGDXRRJ.mjs";
|
|
8
5
|
import {
|
|
9
|
-
|
|
10
|
-
} from "../chunk-
|
|
6
|
+
useMakeCopilotDocumentReadable
|
|
7
|
+
} from "../chunk-H4VZMKR6.mjs";
|
|
11
8
|
import {
|
|
12
|
-
|
|
13
|
-
} from "../chunk-
|
|
9
|
+
useCoAgentStateRender
|
|
10
|
+
} from "../chunk-XINZBP3J.mjs";
|
|
14
11
|
import {
|
|
15
|
-
|
|
16
|
-
} from "../chunk-
|
|
12
|
+
useCoAgent
|
|
13
|
+
} from "../chunk-DDVXFNYA.mjs";
|
|
17
14
|
import {
|
|
18
|
-
|
|
19
|
-
} from "../chunk-
|
|
15
|
+
useCopilotChat
|
|
16
|
+
} from "../chunk-H7LSKIDK.mjs";
|
|
17
|
+
import "../chunk-JDQCJCAQ.mjs";
|
|
20
18
|
import {
|
|
21
|
-
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-2KT73RVG.mjs";
|
|
24
|
-
import "../chunk-VNTDIJSG.mjs";
|
|
25
|
-
import "../chunk-MLAS4QUR.mjs";
|
|
26
|
-
import "../chunk-XXR4QFAQ.mjs";
|
|
27
|
-
import "../chunk-6U3UH3KO.mjs";
|
|
28
|
-
import "../chunk-5FHSUKQL.mjs";
|
|
19
|
+
useCopilotAction
|
|
20
|
+
} from "../chunk-MWZO6TUR.mjs";
|
|
29
21
|
import "../chunk-YPSGKPDA.mjs";
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-6OR25P32.mjs";
|
|
23
|
+
import "../chunk-5FHSUKQL.mjs";
|
|
24
|
+
import "../chunk-6U3UH3KO.mjs";
|
|
25
|
+
import "../chunk-XXR4QFAQ.mjs";
|
|
33
26
|
import {
|
|
34
27
|
useCopilotRuntimeClient
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import
|
|
37
|
-
useCoAgentStateRender
|
|
38
|
-
} from "../chunk-22XKTBPF.mjs";
|
|
39
|
-
import "../chunk-WXREY7UP.mjs";
|
|
40
|
-
import "../chunk-LNI2Z45S.mjs";
|
|
28
|
+
} from "../chunk-ODN4H66E.mjs";
|
|
29
|
+
import "../chunk-2KCEHGSI.mjs";
|
|
41
30
|
import "../chunk-O7ARI5CV.mjs";
|
|
31
|
+
import "../chunk-LODRWFMB.mjs";
|
|
32
|
+
import "../chunk-DCTJZ742.mjs";
|
|
33
|
+
import "../chunk-MLAS4QUR.mjs";
|
|
42
34
|
import "../chunk-SKC7AJIV.mjs";
|
|
43
35
|
export {
|
|
44
|
-
runAgent,
|
|
45
|
-
startAgent,
|
|
46
|
-
stopAgent,
|
|
47
36
|
useCoAgent,
|
|
48
37
|
useCoAgentStateRender,
|
|
49
38
|
useCopilotAction,
|
|
50
|
-
useCopilotAuthenticatedAction,
|
|
51
39
|
useCopilotChat,
|
|
52
40
|
useCopilotReadable,
|
|
53
41
|
useCopilotRuntimeClient,
|
package/dist/hooks/use-chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionCallHandler, CoAgentStateRenderHandler } from '@copilotkit/shared';
|
|
2
|
-
import { Message, TextMessage
|
|
2
|
+
import { Message, TextMessage } from '@copilotkit/runtime-client-gql';
|
|
3
3
|
import { CopilotApiConfig, AgentSession } from '../context/copilot-context.js';
|
|
4
4
|
import { FrontendAction } from '../types/frontend-action.js';
|
|
5
5
|
import { CoagentState } from '../types/coagent-state.js';
|
|
@@ -55,11 +55,11 @@ type UseChatOptions = {
|
|
|
55
55
|
/**
|
|
56
56
|
* The current list of coagent states.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
coagentStates: Record<string, CoagentState>;
|
|
59
59
|
/**
|
|
60
60
|
* setState-powered method to update the agent states
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
setCoagentStates: React.Dispatch<React.SetStateAction<Record<string, CoagentState>>>;
|
|
63
63
|
/**
|
|
64
64
|
* The current agent session.
|
|
65
65
|
*/
|
|
@@ -68,34 +68,6 @@ type UseChatOptions = {
|
|
|
68
68
|
* setState-powered method to update the agent session
|
|
69
69
|
*/
|
|
70
70
|
setAgentSession: React.Dispatch<React.SetStateAction<AgentSession | null>>;
|
|
71
|
-
/**
|
|
72
|
-
* The forwarded parameters.
|
|
73
|
-
*/
|
|
74
|
-
forwardedParameters?: Pick<ForwardedParametersInput, "temperature">;
|
|
75
|
-
/**
|
|
76
|
-
* The current thread ID.
|
|
77
|
-
*/
|
|
78
|
-
threadId: string | null;
|
|
79
|
-
/**
|
|
80
|
-
* set the current thread ID
|
|
81
|
-
*/
|
|
82
|
-
setThreadId: (threadId: string | null) => void;
|
|
83
|
-
/**
|
|
84
|
-
* The current run ID.
|
|
85
|
-
*/
|
|
86
|
-
runId: string | null;
|
|
87
|
-
/**
|
|
88
|
-
* set the current run ID
|
|
89
|
-
*/
|
|
90
|
-
setRunId: (runId: string | null) => void;
|
|
91
|
-
/**
|
|
92
|
-
* The global chat abort controller.
|
|
93
|
-
*/
|
|
94
|
-
chatAbortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
95
|
-
/**
|
|
96
|
-
* The agent lock.
|
|
97
|
-
*/
|
|
98
|
-
agentLock: string | null;
|
|
99
71
|
};
|
|
100
72
|
type UseChatHelpers = {
|
|
101
73
|
/**
|
|
@@ -114,10 +86,6 @@ type UseChatHelpers = {
|
|
|
114
86
|
* Abort the current request immediately, keep the generated tokens if any.
|
|
115
87
|
*/
|
|
116
88
|
stop: () => void;
|
|
117
|
-
/**
|
|
118
|
-
* Run the chat completion.
|
|
119
|
-
*/
|
|
120
|
-
runChatCompletion: () => Promise<Message[]>;
|
|
121
89
|
};
|
|
122
90
|
declare function useChat(options: UseChatOptions): UseChatHelpers;
|
|
123
91
|
|