@copilotkit/react-core 1.10.0-next.12 → 1.10.0-next.13
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 +7 -0
- package/dist/{chunk-Q573EMPD.mjs → chunk-2GRWTU7W.mjs} +2 -2
- package/dist/{chunk-2PL3WCKM.mjs → chunk-5P46WS5M.mjs} +17 -12
- package/dist/chunk-5P46WS5M.mjs.map +1 -0
- package/dist/{chunk-OKRZF3DD.mjs → chunk-6ZLPNY7X.mjs} +2 -2
- package/dist/{chunk-OKRZF3DD.mjs.map → chunk-6ZLPNY7X.mjs.map} +1 -1
- package/dist/{chunk-OGXCE54J.mjs → chunk-BEFEBKKI.mjs} +2 -2
- package/dist/{chunk-MO2BUFJD.mjs → chunk-F26O2HTO.mjs} +3 -3
- package/dist/chunk-F26O2HTO.mjs.map +1 -0
- package/dist/{chunk-7TFJCTYY.mjs → chunk-JY3STRON.mjs} +2 -2
- package/dist/{chunk-IKWGQG5V.mjs → chunk-N4VN2B5S.mjs} +2 -2
- package/dist/{chunk-BVRWKRDI.mjs → chunk-NTH42BY5.mjs} +2 -2
- package/dist/{chunk-PYPPRFZ6.mjs → chunk-YIBUNEBN.mjs} +2 -2
- package/dist/chunk-YIBUNEBN.mjs.map +1 -0
- package/dist/components/copilot-provider/copilotkit-props.d.ts +9 -1
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.js +15 -10
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +3 -3
- package/dist/components/copilot-provider/index.js +15 -10
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +3 -3
- package/dist/components/error-boundary/error-boundary.js +1 -1
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.js +15 -10
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/components/usage-banner.js +1 -1
- package/dist/components/usage-banner.js.map +1 -1
- package/dist/components/usage-banner.mjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +8 -8
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +5 -5
- package/dist/hooks/use-copilot-chat-headless_c.js +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +5 -5
- package/dist/hooks/use-copilot-chat.d.ts +42 -3
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +5 -5
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +4 -4
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +5 -5
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +4 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +3 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +3 -3
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit-props.tsx +10 -1
- package/src/components/copilot-provider/copilotkit.tsx +20 -10
- package/src/components/usage-banner.tsx +1 -1
- package/src/hooks/use-copilot-chat-headless_c.ts +79 -9
- package/src/hooks/use-copilot-chat.ts +42 -3
- package/dist/chunk-2PL3WCKM.mjs.map +0 -1
- package/dist/chunk-MO2BUFJD.mjs.map +0 -1
- package/dist/chunk-PYPPRFZ6.mjs.map +0 -1
- /package/dist/{chunk-Q573EMPD.mjs.map → chunk-2GRWTU7W.mjs.map} +0 -0
- /package/dist/{chunk-OGXCE54J.mjs.map → chunk-BEFEBKKI.mjs.map} +0 -0
- /package/dist/{chunk-7TFJCTYY.mjs.map → chunk-JY3STRON.mjs.map} +0 -0
- /package/dist/{chunk-IKWGQG5V.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
- /package/dist/{chunk-BVRWKRDI.mjs.map → chunk-NTH42BY5.mjs.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopilotChatHeadless_c
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-F26O2HTO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultSystemMessage
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-JY3STRON.mjs";
|
|
7
7
|
import "../chunk-IN7GE4NO.mjs";
|
|
8
8
|
import "../chunk-KH27ZS4Y.mjs";
|
|
9
9
|
import "../chunk-4CEQJ2X6.mjs";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-5P46WS5M.mjs";
|
|
11
|
+
import "../chunk-N4VN2B5S.mjs";
|
|
12
12
|
import "../chunk-MUDXTKXE.mjs";
|
|
13
13
|
import "../chunk-3BASANUO.mjs";
|
|
14
14
|
import "../chunk-WSXTUD36.mjs";
|
|
@@ -22,7 +22,7 @@ import "../chunk-ICIK2BSB.mjs";
|
|
|
22
22
|
import "../chunk-N4WEHORG.mjs";
|
|
23
23
|
import "../chunk-O7ARI5CV.mjs";
|
|
24
24
|
import "../chunk-EFL5OBKN.mjs";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-6ZLPNY7X.mjs";
|
|
26
26
|
import "../chunk-YPSGKPDA.mjs";
|
|
27
27
|
import "../chunk-TEMLWRRT.mjs";
|
|
28
28
|
import "../chunk-ZLQVRPDS.mjs";
|
|
@@ -17,20 +17,20 @@ import '../index-08c43df1.js';
|
|
|
17
17
|
* `useCopilotChat` is a lightweight React hook for headless chat interactions.
|
|
18
18
|
* Perfect for controlling the prebuilt chat components programmatically.
|
|
19
19
|
*
|
|
20
|
-
* **Open Source Friendly** - Works without requiring a free
|
|
20
|
+
* **Open Source Friendly** - Works without requiring a free public license key.
|
|
21
21
|
*
|
|
22
22
|
* <Callout title="Looking for fully headless UI?">
|
|
23
23
|
* Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/hooks/useCopilotChatHeadless_c).
|
|
24
24
|
* </Callout>
|
|
25
25
|
*
|
|
26
|
-
* ## Use Cases
|
|
26
|
+
* ## Use Cases
|
|
27
27
|
*
|
|
28
28
|
* - **Programmatic Messaging**: Send messages without displaying chat UI
|
|
29
29
|
* - **Programmatic control**: Control prebuilt component programmatically
|
|
30
30
|
* - **Background Operations**: Trigger AI interactions in the background
|
|
31
31
|
* - **Fire-and-Forget**: Send messages without needing to read responses
|
|
32
32
|
*
|
|
33
|
-
* ## Usage
|
|
33
|
+
* ## Usage
|
|
34
34
|
*
|
|
35
35
|
* ```tsx
|
|
36
36
|
* import { TextMessage, MessageRole } from "@copilotkit/runtime-client-gql";
|
|
@@ -47,6 +47,45 @@ import '../index-08c43df1.js';
|
|
|
47
47
|
* );
|
|
48
48
|
* };
|
|
49
49
|
* ```
|
|
50
|
+
*
|
|
51
|
+
* ## Return Values
|
|
52
|
+
* The following properties are returned from the hook:
|
|
53
|
+
*
|
|
54
|
+
* <PropertyReference name="visibleMessages" type="DeprecatedGqlMessage[]" deprecated>
|
|
55
|
+
* Array of messages in old non-AG-UI format, use for compatibility only
|
|
56
|
+
* </PropertyReference>
|
|
57
|
+
*
|
|
58
|
+
* <PropertyReference name="appendMessage" type="(message: DeprecatedGqlMessage, options?) => Promise<void>" deprecated>
|
|
59
|
+
* Append message using old format, use `sendMessage` instead
|
|
60
|
+
* </PropertyReference>
|
|
61
|
+
*
|
|
62
|
+
* <PropertyReference name="reloadMessages" type="(messageId: string) => Promise<void>">
|
|
63
|
+
* Regenerate the response for a specific message by ID
|
|
64
|
+
* </PropertyReference>
|
|
65
|
+
*
|
|
66
|
+
* <PropertyReference name="stopGeneration" type="() => void">
|
|
67
|
+
* Stop the current message generation process
|
|
68
|
+
* </PropertyReference>
|
|
69
|
+
*
|
|
70
|
+
* <PropertyReference name="reset" type="() => void">
|
|
71
|
+
* Clear all messages and reset chat state completely
|
|
72
|
+
* </PropertyReference>
|
|
73
|
+
*
|
|
74
|
+
* <PropertyReference name="isLoading" type="boolean">
|
|
75
|
+
* Whether the chat is currently generating a response
|
|
76
|
+
* </PropertyReference>
|
|
77
|
+
*
|
|
78
|
+
* <PropertyReference name="runChatCompletion" type="() => Promise<Message[]>">
|
|
79
|
+
* Manually trigger chat completion for advanced usage
|
|
80
|
+
* </PropertyReference>
|
|
81
|
+
*
|
|
82
|
+
* <PropertyReference name="mcpServers" type="MCPServerConfig[]">
|
|
83
|
+
* Array of Model Context Protocol server configurations
|
|
84
|
+
* </PropertyReference>
|
|
85
|
+
*
|
|
86
|
+
* <PropertyReference name="setMcpServers" type="(servers: MCPServerConfig[]) => void">
|
|
87
|
+
* Update MCP server configurations for enhanced context
|
|
88
|
+
* </PropertyReference>
|
|
50
89
|
*/
|
|
51
90
|
|
|
52
91
|
type UseCopilotChatReturn = Omit<UseCopilotChatReturn$1, "messages" | "sendMessage" | "suggestions" | "setSuggestions" | "generateSuggestions" | "isLoadingSuggestions" | "resetSuggestions" | "interrupt" | "setMessages" | "deleteMessage">;
|