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

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
@@ -1287,9 +1287,18 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1287
1287
  * Hook that returns a function to render tool calls based on the render functions
1288
1288
  * defined in CopilotKitProvider.
1289
1289
  *
1290
+ * @param removedArguments - None. In 1.x, `useRenderToolCall(tool, deps)`
1291
+ * registered a renderer for a tool. That call throws a
1292
+ * `CopilotKitRemovedApiError` in 2.0: register a renderer with `useRenderTool`.
1293
+ * See https://docs.copilotkit.ai/migrate/removed-apis-2.0#userendertoolcall-with-arguments
1290
1294
  * @returns A function that takes a tool call and optional tool message and returns the rendered component
1291
1295
  */
1292
- function useRenderToolCall() {
1296
+ function useRenderToolCall(...removedArguments) {
1297
+ if (removedArguments.length > 0) throw new _copilotkit_shared.CopilotKitRemovedApiError({
1298
+ what: "\"useRenderToolCall(tool, deps)\"",
1299
+ use: "To register a renderer for a tool, use useRenderTool from @copilotkit/react-core. useRenderToolCall() takes no arguments: it returns a function that renders a tool call.",
1300
+ docs: "/migrate/removed-apis-2.0#userendertoolcall-with-arguments"
1301
+ });
1293
1302
  const { copilotkit, executingToolCallIds } = useCopilotKit();
1294
1303
  const agentId = (0, _copilotkit_core.ɵresolveToolCallAgentId)(useCopilotChatConfiguration()?.agentId, void 0);
1295
1304
  const unrenderedToolNames = (0, react.useRef)(/* @__PURE__ */ new Set());
@@ -1377,7 +1386,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1377
1386
 
1378
1387
  //#endregion
1379
1388
  //#region package.json
1380
- var version$1 = "2.0.0-rc.64";
1389
+ var version$1 = "2.0.0-rc.66";
1381
1390
 
1382
1391
  //#endregion
1383
1392
  //#region src/components/CopilotKitInspector.tsx
@@ -9259,7 +9268,8 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9259
9268
  return value;
9260
9269
  }
9261
9270
  /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
9262
- const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, generativeUI, a2ui, mcpApps, defaultThrottleMs, debug, learning }) => {
9271
+ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, generativeUI, a2ui, mcpApps, defaultThrottleMs, debug, learning, ...otherProps }) => {
9272
+ (0, _copilotkit_core.ɵcheckRemovedProviderProps)(otherProps);
9263
9273
  const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
9264
9274
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
9265
9275
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
@@ -9753,6 +9763,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9753
9763
  * ```
9754
9764
  */
9755
9765
  function useFrontendTool(tool, deps) {
9766
+ (0, _copilotkit_core.ɵcheckToolParameters)("useFrontendTool", tool.parameters);
9756
9767
  const { copilotkit } = useCopilotKit();
9757
9768
  const depsVersion = useDepsVersion(deps);
9758
9769
  (0, react.useLayoutEffect)(() => {
@@ -10488,6 +10499,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10488
10499
  //#endregion
10489
10500
  //#region src/hooks/use-human-in-the-loop.tsx
10490
10501
  function useHumanInTheLoop(tool, deps) {
10502
+ (0, _copilotkit_core.ɵcheckToolParameters)("useHumanInTheLoop", tool.parameters);
10491
10503
  const { copilotkit } = useCopilotKit();
10492
10504
  const registry = copilotkit.ɵhumanInTheLoop;
10493
10505
  const RenderComponent = (0, react.useCallback)((props) => react.default.createElement(tool.render, (0, _copilotkit_core.ɵhitlRenderProps)(props, tool, registry)), [
@@ -10827,6 +10839,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10827
10839
  * `deleteThread`) return promises that resolve once the platform confirms the
10828
10840
  * operation and reject with an `Error` on failure.
10829
10841
  *
10842
+ * In 1.x, `useThreads()` returned the current thread. A call without
10843
+ * arguments throws a `CopilotKitRemovedApiError`, and so does a read of
10844
+ * `threadId`, `setThreadId`, or `isThreadIdExplicit` on the result. Read the
10845
+ * current thread from `useCopilotChatConfiguration()`.
10846
+ *
10830
10847
  * @param input - Agent identifier and optional list controls.
10831
10848
  * @returns Thread list state and stable mutation callbacks.
10832
10849
  *
@@ -10855,7 +10872,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10855
10872
  * }
10856
10873
  * ```
10857
10874
  */
10858
- function useThreads({ agentId, includeArchived, limit, enabled = true }) {
10875
+ function useThreads(input) {
10876
+ checkThreadsInput(input);
10877
+ const { agentId, includeArchived, limit, enabled = true } = input;
10859
10878
  const { copilotkit } = useCopilotKit();
10860
10879
  const [controller] = (0, react.useState)(() => new _copilotkit_core.ɵThreadsController((0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }), {
10861
10880
  core: copilotkit,
@@ -10889,7 +10908,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10889
10908
  copilotkit.threadEndpoints?.mutations
10890
10909
  ]);
10891
10910
  const { fetchMoreThreads, refetchThreads, startNewThread, renameThread, archiveThread, unarchiveThread, deleteThread } = controller;
10892
- return {
10911
+ return withRemovedThreadFields({
10893
10912
  threads,
10894
10913
  isLoading,
10895
10914
  error,
@@ -10905,7 +10924,42 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10905
10924
  archiveThread,
10906
10925
  unarchiveThread,
10907
10926
  deleteThread
10908
- };
10927
+ });
10928
+ }
10929
+ const USE_THREADS_SECTION = "/migrate/removed-apis-2.0#usethreads";
10930
+ /** Throws for the 1.x call `useThreads()`, which has no input. */
10931
+ function checkThreadsInput(input) {
10932
+ if (input !== void 0) return;
10933
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
10934
+ what: "\"useThreads()\" without arguments",
10935
+ use: "useThreads({ agentId }) lists the threads of an agent. To read or set the current thread, use useCopilotChatConfiguration() from @copilotkit/react-core.",
10936
+ docs: USE_THREADS_SECTION
10937
+ });
10938
+ }
10939
+ /** The fields of the 1.x `useThreads()` result, and what to use in 2.0. */
10940
+ const REMOVED_THREAD_FIELDS = {
10941
+ threadId: "Read threadId from useCopilotChatConfiguration() of @copilotkit/react-core.",
10942
+ setThreadId: "Call setActiveThreadId(threadId) on useCopilotChatConfiguration() of @copilotkit/react-core.",
10943
+ isThreadIdExplicit: "Read hasExplicitThreadId from useCopilotChatConfiguration() of @copilotkit/react-core."
10944
+ };
10945
+ /**
10946
+ * Adds a getter that throws a `CopilotKitRemovedApiError` for each field of
10947
+ * the 1.x result. The getters are not enumerable, so a spread, a JSON copy,
10948
+ * or devtools do not call them.
10949
+ */
10950
+ function withRemovedThreadFields(result) {
10951
+ const fields = Object.entries(REMOVED_THREAD_FIELDS);
10952
+ for (const [field, use] of fields) Object.defineProperty(result, field, {
10953
+ enumerable: false,
10954
+ get() {
10955
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
10956
+ what: `"${field}" from useThreads`,
10957
+ use: `${use} useThreads({ agentId }) lists the threads of an agent.`,
10958
+ docs: USE_THREADS_SECTION
10959
+ });
10960
+ }
10961
+ });
10962
+ return result;
10909
10963
  }
10910
10964
 
10911
10965
  //#endregion
@@ -16218,151 +16272,151 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16218
16272
 
16219
16273
  //#endregion
16220
16274
  //#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 */
16275
+ /** @deprecated "CoAgentStateRendersProvider" was removed in CopilotKit 2.0. Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16222
16276
  const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16223
16277
  name: "CoAgentStateRendersProvider",
16224
16278
  use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
16225
16279
  docs: "/migrate/v2#hook-mapping"
16226
16280
  });
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 */
16281
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
16228
16282
  const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16229
16283
  name: "CopilotTask",
16230
16284
  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
16285
  docs: "/programmatic-control#sending-a-message-from-code"
16232
16286
  });
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 */
16287
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/generative-ui-2.0#a2ui-v09-renderer */
16234
16288
  const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16235
16289
  name: "createA2UIMessageRenderer",
16236
16290
  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
16291
  docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
16238
16292
  });
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 */
16293
+ /** @deprecated "shouldShowDevConsole" was removed in CopilotKit 2.0. Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/removed-apis-2.0#showdevconsole */
16240
16294
  const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16241
16295
  name: "shouldShowDevConsole",
16242
16296
  use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
16243
16297
  docs: "/migrate/removed-apis-2.0#showdevconsole"
16244
16298
  });
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 */
16299
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#thread-lists */
16246
16300
  const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16247
16301
  name: "ThreadsProvider",
16248
16302
  use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
16249
16303
  docs: "/migrate/chat-2.0#thread-lists"
16250
16304
  });
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 */
16305
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16252
16306
  const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16253
16307
  name: "useCoAgent",
16254
16308
  use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16255
16309
  docs: "/migrate/v2#hook-mapping"
16256
16310
  });
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 */
16311
+ /** @deprecated "useCoAgentStateRender" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16258
16312
  const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16259
16313
  name: "useCoAgentStateRender",
16260
16314
  use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16261
16315
  docs: "/migrate/v2#hook-mapping"
16262
16316
  });
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 */
16317
+ /** @deprecated "useCoAgentStateRenders" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16264
16318
  const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16265
16319
  name: "useCoAgentStateRenders",
16266
16320
  use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16267
16321
  docs: "/migrate/v2#hook-mapping"
16268
16322
  });
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 */
16323
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16270
16324
  const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16271
16325
  name: "useCopilotAction",
16272
16326
  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
16327
  docs: "/migrate/v2#hook-mapping"
16274
16328
  });
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 */
16329
+ /** @deprecated "useCopilotAdditionalInstructions" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core to give the agent the instructions. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16276
16330
  const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16277
16331
  name: "useCopilotAdditionalInstructions",
16278
16332
  use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
16279
16333
  docs: "/migrate/v2#hook-mapping"
16280
16334
  });
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 */
16335
+ /** @deprecated "useCopilotAuthenticatedAction_c" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core, and check the user in its handler. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16282
16336
  const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16283
16337
  name: "useCopilotAuthenticatedAction_c",
16284
16338
  use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
16285
16339
  docs: "/migrate/v2#hook-mapping"
16286
16340
  });
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 */
16341
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16288
16342
  const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16289
16343
  name: "useCopilotChat",
16290
16344
  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
16345
  docs: "/migrate/v2#hook-mapping"
16292
16346
  });
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 */
16347
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16294
16348
  const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16295
16349
  name: "useCopilotChatHeadless_c",
16296
16350
  use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16297
16351
  docs: "/migrate/v2#hook-mapping"
16298
16352
  });
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 */
16353
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16300
16354
  const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16301
16355
  name: "useCopilotChatInternal",
16302
16356
  use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16303
16357
  docs: "/migrate/v2#hook-mapping"
16304
16358
  });
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 */
16359
+ /** @deprecated "useCopilotChatSuggestions" was removed in CopilotKit 2.0. Use useConfigureSuggestions from @copilotkit/react-core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16306
16360
  const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16307
16361
  name: "useCopilotChatSuggestions",
16308
16362
  use: "Use useConfigureSuggestions from @copilotkit/react-core.",
16309
16363
  docs: "/migrate/v2#hook-mapping"
16310
16364
  });
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 */
16365
+ /** @deprecated "useCopilotContext" was removed in CopilotKit 2.0. Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
16312
16366
  const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16313
16367
  name: "useCopilotContext",
16314
16368
  use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
16315
16369
  docs: "/programmatic-control#sending-a-message-from-code"
16316
16370
  });
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 */
16371
+ /** @deprecated "useCopilotMessagesContext" was removed in CopilotKit 2.0. Read agent.messages from useAgent from @copilotkit/react-core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16318
16372
  const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16319
16373
  name: "useCopilotMessagesContext",
16320
16374
  use: "Read agent.messages from useAgent from @copilotkit/react-core.",
16321
16375
  docs: "/migrate/v2#hook-mapping"
16322
16376
  });
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 */
16377
+ /** @deprecated "useCopilotReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16324
16378
  const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16325
16379
  name: "useCopilotReadable",
16326
16380
  use: "Use useAgentContext from @copilotkit/react-core.",
16327
16381
  docs: "/migrate/v2#hook-mapping"
16328
16382
  });
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 */
16383
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#update-the-runtime */
16330
16384
  const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16331
16385
  name: "useCopilotRuntimeClient",
16332
16386
  use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
16333
16387
  docs: "/migrate/v2#update-the-runtime"
16334
16388
  });
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 */
16389
+ /** @deprecated "useDefaultTool" was removed in CopilotKit 2.0. Use useDefaultRenderTool from @copilotkit/react-core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16336
16390
  const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16337
16391
  name: "useDefaultTool",
16338
16392
  use: "Use useDefaultRenderTool from @copilotkit/react-core.",
16339
16393
  docs: "/migrate/v2#hook-mapping"
16340
16394
  });
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 */
16395
+ /** @deprecated "useLangGraphInterrupt" was removed in CopilotKit 2.0. Use useInterrupt from @copilotkit/react-core. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16342
16396
  const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16343
16397
  name: "useLangGraphInterrupt",
16344
16398
  use: "Use useInterrupt from @copilotkit/react-core.",
16345
16399
  docs: "/migrate/v2#hook-mapping"
16346
16400
  });
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 */
16401
+ /** @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 copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#gotchas */
16348
16402
  const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16349
16403
  name: "useLazyToolRenderer",
16350
16404
  use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
16351
16405
  docs: "/migrate/v2#gotchas"
16352
16406
  });
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 */
16407
+ /** @deprecated "useLearningContainers" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
16354
16408
  const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16355
16409
  name: "useLearningContainers",
16356
16410
  use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16357
16411
  docs: "/migrate/chat-2.0#removed-exports"
16358
16412
  });
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 */
16413
+ /** @deprecated "useLearningContainersInCurrentThread" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
16360
16414
  const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16361
16415
  name: "useLearningContainersInCurrentThread",
16362
16416
  use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16363
16417
  docs: "/migrate/chat-2.0#removed-exports"
16364
16418
  });
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 */
16419
+ /** @deprecated "useMakeCopilotDocumentReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core, with the document text as the value. Run `npx copilotkit@latest migrate` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
16366
16420
  const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16367
16421
  name: "useMakeCopilotDocumentReadable",
16368
16422
  use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
@@ -18354,6 +18408,18 @@ Object.defineProperty(exports, 'ɵcanPreviewDocument', {
18354
18408
  return _copilotkit_core.ɵcanPreviewDocument;
18355
18409
  }
18356
18410
  });
18411
+ Object.defineProperty(exports, 'ɵcheckRemovedProviderProps', {
18412
+ enumerable: true,
18413
+ get: function () {
18414
+ return _copilotkit_core.ɵcheckRemovedProviderProps;
18415
+ }
18416
+ });
18417
+ Object.defineProperty(exports, 'ɵcheckToolParameters', {
18418
+ enumerable: true,
18419
+ get: function () {
18420
+ return _copilotkit_core.ɵcheckToolParameters;
18421
+ }
18422
+ });
18357
18423
  Object.defineProperty(exports, 'ɵclampSlashIndex', {
18358
18424
  enumerable: true,
18359
18425
  get: function () {