@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.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_copilotkit = require('./copilotkit-CtXcs1ea.cjs');
4
+ const require_copilotkit = require('./copilotkit-Drw-g6zA.cjs');
5
5
  let react = require("react");
6
6
  react = require_copilotkit.__toESM(react);
7
7
  let _copilotkit_core = require("@copilotkit/core");
@@ -338,80 +338,6 @@ function useLegacyCoagentRenderer({ copilotkit, agent, agentId, threadId }) {
338
338
  //#endregion
339
339
  //#region src/hooks/use-copilot-chat.ts
340
340
  /**
341
- * `useCopilotChat` is a lightweight React hook for headless chat interactions.
342
- * Perfect for controlling the prebuilt chat components programmatically.
343
- *
344
- * **Open Source Friendly** - Works without requiring a free public license key.
345
- *
346
- * <Callout title="Looking for fully headless UI?">
347
- * Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/v1/hooks/useCopilotChatHeadless_c).
348
- * </Callout>
349
- *
350
- * ## Use Cases
351
- *
352
- * - **Programmatic Messaging**: Send messages without displaying chat UI
353
- * - **Programmatic control**: Control prebuilt component programmatically
354
- * - **Background Operations**: Trigger AI interactions in the background
355
- * - **Fire-and-Forget**: Send messages without needing to read responses
356
- *
357
- * ## Usage
358
- *
359
- * ```tsx
360
- * import { TextMessage, MessageRole } from "@copilotkit/runtime-client-gql";
361
- *
362
- * const { appendMessage } = useCopilotChat();
363
- *
364
- * // Example usage without naming conflicts
365
- * const handleSendMessage = async (content: string) => {
366
- * await appendMessage(
367
- * new TextMessage({
368
- * role: MessageRole.User,
369
- * content,
370
- * })
371
- * );
372
- * };
373
- * ```
374
- *
375
- * ## Return Values
376
- * The following properties are returned from the hook:
377
- *
378
- * <PropertyReference name="visibleMessages" type="DeprecatedGqlMessage[]" deprecated>
379
- * Array of messages in old non-AG-UI format, use for compatibility only
380
- * </PropertyReference>
381
- *
382
- * <PropertyReference name="appendMessage" type="(message: DeprecatedGqlMessage, options?) => Promise<void>" deprecated>
383
- * Append message using old format, use `sendMessage` instead
384
- * </PropertyReference>
385
- *
386
- * <PropertyReference name="reloadMessages" type="(messageId: string) => Promise<void>">
387
- * Regenerate the response for a specific message by ID
388
- * </PropertyReference>
389
- *
390
- * <PropertyReference name="stopGeneration" type="() => void">
391
- * Stop the current message generation process
392
- * </PropertyReference>
393
- *
394
- * <PropertyReference name="reset" type="() => void">
395
- * Clear all messages and reset chat state completely
396
- * </PropertyReference>
397
- *
398
- * <PropertyReference name="isLoading" type="boolean">
399
- * Whether the chat is currently generating a response
400
- * </PropertyReference>
401
- *
402
- * <PropertyReference name="runChatCompletion" type="() => Promise<Message[]>">
403
- * Manually trigger chat completion for advanced usage
404
- * </PropertyReference>
405
- *
406
- * <PropertyReference name="mcpServers" type="MCPServerConfig[]">
407
- * Array of Model Context Protocol server configurations
408
- * </PropertyReference>
409
- *
410
- * <PropertyReference name="setMcpServers" type="(servers: MCPServerConfig[]) => void">
411
- * Update MCP server configurations for enhanced context
412
- * </PropertyReference>
413
- */
414
- /**
415
341
  * A lightweight React hook for headless chat interactions.
416
342
  * Perfect for programmatic messaging, background operations, and custom UI implementations.
417
343
  *
@@ -1028,7 +954,7 @@ function useCopilotAction(action, dependencies) {
1028
954
  * useful for showing intermediate state or progress during Agentic Copilot operations.
1029
955
  * To get started using rendering intermediate state through this hook, checkout the documentation.
1030
956
  *
1031
- * https://docs.copilotkit.ai/coagents/shared-state/predictive-state-updates
957
+ * https://docs.copilotkit.ai/langgraph-python/shared-state/predictive-state-updates
1032
958
  */
1033
959
  function useCoAgentStateRender(action, dependencies) {
1034
960
  const { chatComponentsCache, availableAgents } = (0, react.useContext)(require_copilotkit.CopilotContext);
@@ -1337,7 +1263,7 @@ function useAgentNodeName(agentName) {
1337
1263
  * This hook is used to integrate an agent into your application. With its use, you can
1338
1264
  * render and update the state of the agent, allowing for a dynamic and interactive experience.
1339
1265
  * We call these shared state experiences "agentic copilots". To get started using agentic copilots, which
1340
- * we refer to as CoAgents, checkout the documentation at https://docs.copilotkit.ai/coagents/quickstart/langgraph.
1266
+ * we refer to as CoAgents, checkout the documentation at https://docs.copilotkit.ai/langgraph-python/quickstart.
1341
1267
  */
1342
1268
  function useCoAgent(options) {
1343
1269
  const { agent } = require_copilotkit.useAgent({ agentId: options.name });