@copilotkit/react-core 2.0.0-rc.62 → 2.0.0-rc.64

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
@@ -1377,7 +1377,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1377
1377
 
1378
1378
  //#endregion
1379
1379
  //#region package.json
1380
- var version$1 = "2.0.0-rc.62";
1380
+ var version$1 = "2.0.0-rc.64";
1381
1381
 
1382
1382
  //#endregion
1383
1383
  //#region src/components/CopilotKitInspector.tsx
@@ -16216,6 +16216,159 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16216
16216
  render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultToolCallRenderer, { ...adaptRendererProps(props) })
16217
16217
  });
16218
16218
 
16219
+ //#endregion
16220
+ //#region src/removed-exports.ts
16221
+ /** @deprecated "CoAgentStateRendersProvider" was removed in CopilotKit 2.0. Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16222
+ const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16223
+ name: "CoAgentStateRendersProvider",
16224
+ use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
16225
+ docs: "/migrate/v2#hook-mapping"
16226
+ });
16227
+ /** @deprecated "CopilotTask" was removed in CopilotKit 2.0. Run the agent from code: add a message with agent.addMessage from useAgent, then call copilotkit.runAgent({ agent }) from useCopilotKit, both from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
16228
+ const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16229
+ name: "CopilotTask",
16230
+ use: "Run the agent from code: add a message with agent.addMessage from useAgent, then call copilotkit.runAgent({ agent }) from useCopilotKit, both from @copilotkit/react-core.",
16231
+ docs: "/programmatic-control#sending-a-message-from-code"
16232
+ });
16233
+ /** @deprecated "createA2UIMessageRenderer" was removed in CopilotKit 2.0. The A2UI v0.9 renderer was removed, and CopilotKitProvider renders A2UI with generative UI. Pass generativeUI={{ ui }} with a UI from createGenerativeUI in @copilotkit/react-core/generative-ui. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/generative-ui-2.0#a2ui-v09-renderer */
16234
+ const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16235
+ name: "createA2UIMessageRenderer",
16236
+ use: "The A2UI v0.9 renderer was removed, and CopilotKitProvider renders A2UI with generative UI. Pass generativeUI={{ ui }} with a UI from createGenerativeUI in @copilotkit/react-core/generative-ui.",
16237
+ docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
16238
+ });
16239
+ /** @deprecated "shouldShowDevConsole" was removed in CopilotKit 2.0. Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/removed-apis-2.0#showdevconsole */
16240
+ const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16241
+ name: "shouldShowDevConsole",
16242
+ use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
16243
+ docs: "/migrate/removed-apis-2.0#showdevconsole"
16244
+ });
16245
+ /** @deprecated "ThreadsProvider" was removed in CopilotKit 2.0. Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#thread-lists */
16246
+ const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16247
+ name: "ThreadsProvider",
16248
+ use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
16249
+ docs: "/migrate/chat-2.0#thread-lists"
16250
+ });
16251
+ /** @deprecated "useCoAgent" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16252
+ const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16253
+ name: "useCoAgent",
16254
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16255
+ docs: "/migrate/v2#hook-mapping"
16256
+ });
16257
+ /** @deprecated "useCoAgentStateRender" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16258
+ const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16259
+ name: "useCoAgentStateRender",
16260
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16261
+ docs: "/migrate/v2#hook-mapping"
16262
+ });
16263
+ /** @deprecated "useCoAgentStateRenders" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16264
+ const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16265
+ name: "useCoAgentStateRenders",
16266
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16267
+ docs: "/migrate/v2#hook-mapping"
16268
+ });
16269
+ /** @deprecated "useCopilotAction" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16270
+ const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16271
+ name: "useCopilotAction",
16272
+ use: "Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user.",
16273
+ docs: "/migrate/v2#hook-mapping"
16274
+ });
16275
+ /** @deprecated "useCopilotAdditionalInstructions" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core to give the agent the instructions. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16276
+ const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16277
+ name: "useCopilotAdditionalInstructions",
16278
+ use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
16279
+ docs: "/migrate/v2#hook-mapping"
16280
+ });
16281
+ /** @deprecated "useCopilotAuthenticatedAction_c" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core, and check the user in its handler. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16282
+ const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16283
+ name: "useCopilotAuthenticatedAction_c",
16284
+ use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
16285
+ docs: "/migrate/v2#hook-mapping"
16286
+ });
16287
+ /** @deprecated "useCopilotChat" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16288
+ const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16289
+ name: "useCopilotChat",
16290
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI.",
16291
+ docs: "/migrate/v2#hook-mapping"
16292
+ });
16293
+ /** @deprecated "useCopilotChatHeadless_c" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16294
+ const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16295
+ name: "useCopilotChatHeadless_c",
16296
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16297
+ docs: "/migrate/v2#hook-mapping"
16298
+ });
16299
+ /** @deprecated "useCopilotChatInternal" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16300
+ const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16301
+ name: "useCopilotChatInternal",
16302
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16303
+ docs: "/migrate/v2#hook-mapping"
16304
+ });
16305
+ /** @deprecated "useCopilotChatSuggestions" was removed in CopilotKit 2.0. Use useConfigureSuggestions from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16306
+ const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16307
+ name: "useCopilotChatSuggestions",
16308
+ use: "Use useConfigureSuggestions from @copilotkit/react-core.",
16309
+ docs: "/migrate/v2#hook-mapping"
16310
+ });
16311
+ /** @deprecated "useCopilotContext" was removed in CopilotKit 2.0. Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
16312
+ const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16313
+ name: "useCopilotContext",
16314
+ use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
16315
+ docs: "/programmatic-control#sending-a-message-from-code"
16316
+ });
16317
+ /** @deprecated "useCopilotMessagesContext" was removed in CopilotKit 2.0. Read agent.messages from useAgent from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16318
+ const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16319
+ name: "useCopilotMessagesContext",
16320
+ use: "Read agent.messages from useAgent from @copilotkit/react-core.",
16321
+ docs: "/migrate/v2#hook-mapping"
16322
+ });
16323
+ /** @deprecated "useCopilotReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16324
+ const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16325
+ name: "useCopilotReadable",
16326
+ use: "Use useAgentContext from @copilotkit/react-core.",
16327
+ docs: "/migrate/v2#hook-mapping"
16328
+ });
16329
+ /** @deprecated "useCopilotRuntimeClient" was removed in CopilotKit 2.0. CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#update-the-runtime */
16330
+ const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16331
+ name: "useCopilotRuntimeClient",
16332
+ use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
16333
+ docs: "/migrate/v2#update-the-runtime"
16334
+ });
16335
+ /** @deprecated "useDefaultTool" was removed in CopilotKit 2.0. Use useDefaultRenderTool from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16336
+ const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16337
+ name: "useDefaultTool",
16338
+ use: "Use useDefaultRenderTool from @copilotkit/react-core.",
16339
+ docs: "/migrate/v2#hook-mapping"
16340
+ });
16341
+ /** @deprecated "useLangGraphInterrupt" was removed in CopilotKit 2.0. Use useInterrupt from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16342
+ const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16343
+ name: "useLangGraphInterrupt",
16344
+ use: "Use useInterrupt from @copilotkit/react-core.",
16345
+ docs: "/migrate/v2#hook-mapping"
16346
+ });
16347
+ /** @deprecated "useLazyToolRenderer" was removed in CopilotKit 2.0. Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#gotchas */
16348
+ const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16349
+ name: "useLazyToolRenderer",
16350
+ use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
16351
+ docs: "/migrate/v2#gotchas"
16352
+ });
16353
+ /** @deprecated "useLearningContainers" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
16354
+ const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16355
+ name: "useLearningContainers",
16356
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16357
+ docs: "/migrate/chat-2.0#removed-exports"
16358
+ });
16359
+ /** @deprecated "useLearningContainersInCurrentThread" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
16360
+ const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16361
+ name: "useLearningContainersInCurrentThread",
16362
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16363
+ docs: "/migrate/chat-2.0#removed-exports"
16364
+ });
16365
+ /** @deprecated "useMakeCopilotDocumentReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core, with the document text as the value. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16366
+ const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16367
+ name: "useMakeCopilotDocumentReadable",
16368
+ use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
16369
+ docs: "/migrate/v2#hook-mapping"
16370
+ });
16371
+
16219
16372
  //#endregion
16220
16373
  Object.defineProperty(exports, 'A2UI_FENCE_LANGUAGE', {
16221
16374
  enumerable: true,
@@ -16367,6 +16520,7 @@ Object.defineProperty(exports, 'BaseMessageSchema', {
16367
16520
  return _ag_ui_core_schemas.BaseMessageSchema;
16368
16521
  }
16369
16522
  });
16523
+ exports.CoAgentStateRendersProvider = CoAgentStateRendersProvider;
16370
16524
  Object.defineProperty(exports, 'CompatibilityBoundary', {
16371
16525
  enumerable: true,
16372
16526
  get: function () {
@@ -16470,6 +16624,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
16470
16624
  return CopilotSidebarView;
16471
16625
  }
16472
16626
  });
16627
+ exports.CopilotTask = CopilotTask;
16473
16628
  exports.CopilotThreadsDrawer = CopilotThreadsDrawer;
16474
16629
  Object.defineProperty(exports, 'CopyOperationSchema', {
16475
16630
  enumerable: true,
@@ -17119,6 +17274,7 @@ Object.defineProperty(exports, 'TextPartSchema', {
17119
17274
  return _ag_ui_core_schemas.TextPartSchema;
17120
17275
  }
17121
17276
  });
17277
+ exports.ThreadsProvider = ThreadsProvider;
17122
17278
  Object.defineProperty(exports, 'TokenUsageSchema', {
17123
17279
  enumerable: true,
17124
17280
  get: function () {
@@ -17295,6 +17451,7 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
17295
17451
  return _ag_ui_client.convertToLegacyEvents;
17296
17452
  }
17297
17453
  });
17454
+ exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
17298
17455
  Object.defineProperty(exports, 'createActionGroup', {
17299
17456
  enumerable: true,
17300
17457
  get: function () {
@@ -17581,6 +17738,7 @@ Object.defineProperty(exports, 'select', {
17581
17738
  return _copilotkit_core.select;
17582
17739
  }
17583
17740
  });
17741
+ exports.shouldShowDevConsole = shouldShowDevConsole;
17584
17742
  Object.defineProperty(exports, 'splitA2UIMarkdown', {
17585
17743
  enumerable: true,
17586
17744
  get: function () {
@@ -17621,18 +17779,38 @@ exports.useAgent = useAgent;
17621
17779
  exports.useAgentContext = useAgentContext;
17622
17780
  exports.useAttachments = useAttachments;
17623
17781
  exports.useCapabilities = useCapabilities;
17782
+ exports.useCoAgent = useCoAgent;
17783
+ exports.useCoAgentStateRender = useCoAgentStateRender;
17784
+ exports.useCoAgentStateRenders = useCoAgentStateRenders;
17624
17785
  exports.useComponent = useComponent;
17625
17786
  exports.useConfigureSuggestions = useConfigureSuggestions;
17787
+ exports.useCopilotAction = useCopilotAction;
17788
+ exports.useCopilotAdditionalInstructions = useCopilotAdditionalInstructions;
17789
+ exports.useCopilotAuthenticatedAction_c = useCopilotAuthenticatedAction_c;
17790
+ exports.useCopilotChat = useCopilotChat;
17626
17791
  exports.useCopilotChatConfiguration = useCopilotChatConfiguration;
17792
+ exports.useCopilotChatHeadless_c = useCopilotChatHeadless_c;
17793
+ exports.useCopilotChatInternal = useCopilotChatInternal;
17794
+ exports.useCopilotChatSuggestions = useCopilotChatSuggestions;
17795
+ exports.useCopilotContext = useCopilotContext;
17627
17796
  exports.useCopilotKit = useCopilotKit;
17797
+ exports.useCopilotMessagesContext = useCopilotMessagesContext;
17798
+ exports.useCopilotReadable = useCopilotReadable;
17799
+ exports.useCopilotRuntimeClient = useCopilotRuntimeClient;
17628
17800
  exports.useDefaultRenderTool = useDefaultRenderTool;
17801
+ exports.useDefaultTool = useDefaultTool;
17629
17802
  exports.useFrontendTool = useFrontendTool;
17630
17803
  exports.useFrontendTools = useFrontendTools;
17631
17804
  exports.useHumanInTheLoop = useHumanInTheLoop;
17632
17805
  exports.useInterrupt = useInterrupt;
17806
+ exports.useLangGraphInterrupt = useLangGraphInterrupt;
17807
+ exports.useLazyToolRenderer = useLazyToolRenderer;
17633
17808
  exports.useLearnFromUserAction = useLearnFromUserAction;
17634
17809
  exports.useLearnFromUserActionInCurrentThread = useLearnFromUserActionInCurrentThread;
17810
+ exports.useLearningContainers = useLearningContainers;
17811
+ exports.useLearningContainersInCurrentThread = useLearningContainersInCurrentThread;
17635
17812
  exports.useLicenseContext = useLicenseContext;
17813
+ exports.useMakeCopilotDocumentReadable = useMakeCopilotDocumentReadable;
17636
17814
  exports.useMarkdownRenderer = useMarkdownRenderer;
17637
17815
  exports.useMemories = useMemories;
17638
17816
  exports.useRenderActivityMessage = useRenderActivityMessage;