@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.
Files changed (73) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-Q573EMPD.mjs → chunk-2GRWTU7W.mjs} +2 -2
  3. package/dist/{chunk-2PL3WCKM.mjs → chunk-5P46WS5M.mjs} +17 -12
  4. package/dist/chunk-5P46WS5M.mjs.map +1 -0
  5. package/dist/{chunk-OKRZF3DD.mjs → chunk-6ZLPNY7X.mjs} +2 -2
  6. package/dist/{chunk-OKRZF3DD.mjs.map → chunk-6ZLPNY7X.mjs.map} +1 -1
  7. package/dist/{chunk-OGXCE54J.mjs → chunk-BEFEBKKI.mjs} +2 -2
  8. package/dist/{chunk-MO2BUFJD.mjs → chunk-F26O2HTO.mjs} +3 -3
  9. package/dist/chunk-F26O2HTO.mjs.map +1 -0
  10. package/dist/{chunk-7TFJCTYY.mjs → chunk-JY3STRON.mjs} +2 -2
  11. package/dist/{chunk-IKWGQG5V.mjs → chunk-N4VN2B5S.mjs} +2 -2
  12. package/dist/{chunk-BVRWKRDI.mjs → chunk-NTH42BY5.mjs} +2 -2
  13. package/dist/{chunk-PYPPRFZ6.mjs → chunk-YIBUNEBN.mjs} +2 -2
  14. package/dist/chunk-YIBUNEBN.mjs.map +1 -0
  15. package/dist/components/copilot-provider/copilotkit-props.d.ts +9 -1
  16. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  17. package/dist/components/copilot-provider/copilotkit.js +15 -10
  18. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  19. package/dist/components/copilot-provider/copilotkit.mjs +3 -3
  20. package/dist/components/copilot-provider/index.js +15 -10
  21. package/dist/components/copilot-provider/index.js.map +1 -1
  22. package/dist/components/copilot-provider/index.mjs +3 -3
  23. package/dist/components/error-boundary/error-boundary.js +1 -1
  24. package/dist/components/error-boundary/error-boundary.js.map +1 -1
  25. package/dist/components/error-boundary/error-boundary.mjs +2 -2
  26. package/dist/components/index.js +15 -10
  27. package/dist/components/index.js.map +1 -1
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/components/usage-banner.js +1 -1
  30. package/dist/components/usage-banner.js.map +1 -1
  31. package/dist/components/usage-banner.mjs +1 -1
  32. package/dist/hooks/index.js +1 -1
  33. package/dist/hooks/index.js.map +1 -1
  34. package/dist/hooks/index.mjs +8 -8
  35. package/dist/hooks/use-coagent.js.map +1 -1
  36. package/dist/hooks/use-coagent.mjs +5 -5
  37. package/dist/hooks/use-copilot-chat-headless_c.js +1 -1
  38. package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
  39. package/dist/hooks/use-copilot-chat-headless_c.mjs +5 -5
  40. package/dist/hooks/use-copilot-chat.d.ts +42 -3
  41. package/dist/hooks/use-copilot-chat.js.map +1 -1
  42. package/dist/hooks/use-copilot-chat.mjs +5 -5
  43. package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
  44. package/dist/hooks/use-copilot-chat_internal.mjs +4 -4
  45. package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
  46. package/dist/hooks/use-langgraph-interrupt.mjs +5 -5
  47. package/dist/index.js +16 -11
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.mjs +9 -9
  50. package/dist/lib/copilot-task.js.map +1 -1
  51. package/dist/lib/copilot-task.mjs +4 -4
  52. package/dist/lib/index.js.map +1 -1
  53. package/dist/lib/index.mjs +4 -4
  54. package/dist/utils/extract.js.map +1 -1
  55. package/dist/utils/extract.mjs +3 -3
  56. package/dist/utils/index.js.map +1 -1
  57. package/dist/utils/index.mjs +3 -3
  58. package/dist/utils/suggestions.js.map +1 -1
  59. package/dist/utils/suggestions.mjs +3 -3
  60. package/package.json +3 -3
  61. package/src/components/copilot-provider/copilotkit-props.tsx +10 -1
  62. package/src/components/copilot-provider/copilotkit.tsx +20 -10
  63. package/src/components/usage-banner.tsx +1 -1
  64. package/src/hooks/use-copilot-chat-headless_c.ts +79 -9
  65. package/src/hooks/use-copilot-chat.ts +42 -3
  66. package/dist/chunk-2PL3WCKM.mjs.map +0 -1
  67. package/dist/chunk-MO2BUFJD.mjs.map +0 -1
  68. package/dist/chunk-PYPPRFZ6.mjs.map +0 -1
  69. /package/dist/{chunk-Q573EMPD.mjs.map → chunk-2GRWTU7W.mjs.map} +0 -0
  70. /package/dist/{chunk-OGXCE54J.mjs.map → chunk-BEFEBKKI.mjs.map} +0 -0
  71. /package/dist/{chunk-7TFJCTYY.mjs.map → chunk-JY3STRON.mjs.map} +0 -0
  72. /package/dist/{chunk-IKWGQG5V.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
  73. /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-MO2BUFJD.mjs";
3
+ } from "../chunk-F26O2HTO.mjs";
4
4
  import {
5
5
  defaultSystemMessage
6
- } from "../chunk-7TFJCTYY.mjs";
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-2PL3WCKM.mjs";
11
- import "../chunk-IKWGQG5V.mjs";
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-OKRZF3DD.mjs";
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 subscription key.
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">;