@copilotkit/react-core 1.57.4 → 1.58.0

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/dist/index.umd.js CHANGED
@@ -4147,7 +4147,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4147
4147
  switch (error.code) {
4148
4148
  case _copilotkit_shared.CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR: return { primary: {
4149
4149
  label: "Show me how",
4150
- onClick: () => window.open("https://docs.copilotkit.ai/premium#how-do-i-get-access-to-premium-features", "_blank", "noopener,noreferrer")
4150
+ onClick: () => window.open("https://docs.copilotkit.ai/premium/overview#getting-access", "_blank", "noopener,noreferrer")
4151
4151
  } };
4152
4152
  case _copilotkit_shared.CopilotKitErrorCode.UPGRADE_REQUIRED_ERROR: return { primary: {
4153
4153
  label: "Upgrade",
@@ -5733,80 +5733,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
5733
5733
  //#endregion
5734
5734
  //#region src/hooks/use-copilot-chat.ts
5735
5735
  /**
5736
- * `useCopilotChat` is a lightweight React hook for headless chat interactions.
5737
- * Perfect for controlling the prebuilt chat components programmatically.
5738
- *
5739
- * **Open Source Friendly** - Works without requiring a free public license key.
5740
- *
5741
- * <Callout title="Looking for fully headless UI?">
5742
- * Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/v1/hooks/useCopilotChatHeadless_c).
5743
- * </Callout>
5744
- *
5745
- * ## Use Cases
5746
- *
5747
- * - **Programmatic Messaging**: Send messages without displaying chat UI
5748
- * - **Programmatic control**: Control prebuilt component programmatically
5749
- * - **Background Operations**: Trigger AI interactions in the background
5750
- * - **Fire-and-Forget**: Send messages without needing to read responses
5751
- *
5752
- * ## Usage
5753
- *
5754
- * ```tsx
5755
- * import { TextMessage, MessageRole } from "@copilotkit/runtime-client-gql";
5756
- *
5757
- * const { appendMessage } = useCopilotChat();
5758
- *
5759
- * // Example usage without naming conflicts
5760
- * const handleSendMessage = async (content: string) => {
5761
- * await appendMessage(
5762
- * new TextMessage({
5763
- * role: MessageRole.User,
5764
- * content,
5765
- * })
5766
- * );
5767
- * };
5768
- * ```
5769
- *
5770
- * ## Return Values
5771
- * The following properties are returned from the hook:
5772
- *
5773
- * <PropertyReference name="visibleMessages" type="DeprecatedGqlMessage[]" deprecated>
5774
- * Array of messages in old non-AG-UI format, use for compatibility only
5775
- * </PropertyReference>
5776
- *
5777
- * <PropertyReference name="appendMessage" type="(message: DeprecatedGqlMessage, options?) => Promise<void>" deprecated>
5778
- * Append message using old format, use `sendMessage` instead
5779
- * </PropertyReference>
5780
- *
5781
- * <PropertyReference name="reloadMessages" type="(messageId: string) => Promise<void>">
5782
- * Regenerate the response for a specific message by ID
5783
- * </PropertyReference>
5784
- *
5785
- * <PropertyReference name="stopGeneration" type="() => void">
5786
- * Stop the current message generation process
5787
- * </PropertyReference>
5788
- *
5789
- * <PropertyReference name="reset" type="() => void">
5790
- * Clear all messages and reset chat state completely
5791
- * </PropertyReference>
5792
- *
5793
- * <PropertyReference name="isLoading" type="boolean">
5794
- * Whether the chat is currently generating a response
5795
- * </PropertyReference>
5796
- *
5797
- * <PropertyReference name="runChatCompletion" type="() => Promise<Message[]>">
5798
- * Manually trigger chat completion for advanced usage
5799
- * </PropertyReference>
5800
- *
5801
- * <PropertyReference name="mcpServers" type="MCPServerConfig[]">
5802
- * Array of Model Context Protocol server configurations
5803
- * </PropertyReference>
5804
- *
5805
- * <PropertyReference name="setMcpServers" type="(servers: MCPServerConfig[]) => void">
5806
- * Update MCP server configurations for enhanced context
5807
- * </PropertyReference>
5808
- */
5809
- /**
5810
5736
  * A lightweight React hook for headless chat interactions.
5811
5737
  * Perfect for programmatic messaging, background operations, and custom UI implementations.
5812
5738
  *
@@ -6429,7 +6355,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6429
6355
  * useful for showing intermediate state or progress during Agentic Copilot operations.
6430
6356
  * To get started using rendering intermediate state through this hook, checkout the documentation.
6431
6357
  *
6432
- * https://docs.copilotkit.ai/coagents/shared-state/predictive-state-updates
6358
+ * https://docs.copilotkit.ai/langgraph-python/shared-state/predictive-state-updates
6433
6359
  */
6434
6360
  function useCoAgentStateRender(action, dependencies) {
6435
6361
  const { chatComponentsCache, availableAgents } = (0, react.useContext)(CopilotContext);
@@ -6738,7 +6664,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
6738
6664
  * This hook is used to integrate an agent into your application. With its use, you can
6739
6665
  * render and update the state of the agent, allowing for a dynamic and interactive experience.
6740
6666
  * We call these shared state experiences "agentic copilots". To get started using agentic copilots, which
6741
- * we refer to as CoAgents, checkout the documentation at https://docs.copilotkit.ai/coagents/quickstart/langgraph.
6667
+ * we refer to as CoAgents, checkout the documentation at https://docs.copilotkit.ai/langgraph-python/quickstart.
6742
6668
  */
6743
6669
  function useCoAgent(options) {
6744
6670
  const { agent } = useAgent({ agentId: options.name });