@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/headless.cjs +57 -4
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +11 -7
- package/dist/headless.d.cts.map +1 -1
- package/dist/headless.d.mts +11 -7
- package/dist/headless.d.mts.map +1 -1
- package/dist/headless.mjs +59 -6
- package/dist/headless.mjs.map +1 -1
- package/dist/index.cjs +97 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +116 -112
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +116 -112
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +88 -34
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +97 -31
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.d.cts +4 -0
- package/dist/v2/index.d.mts +4 -0
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -715,9 +715,18 @@ function useToolCallRendererNames() {
|
|
|
715
715
|
* Hook that returns a function to render tool calls based on the render functions
|
|
716
716
|
* defined in CopilotKitProvider.
|
|
717
717
|
*
|
|
718
|
+
* @param removedArguments - None. In 1.x, `useRenderToolCall(tool, deps)`
|
|
719
|
+
* registered a renderer for a tool. That call throws a
|
|
720
|
+
* `CopilotKitRemovedApiError` in 2.0: register a renderer with `useRenderTool`.
|
|
721
|
+
* See https://docs.copilotkit.ai/migrate/removed-apis-2.0#userendertoolcall-with-arguments
|
|
718
722
|
* @returns A function that takes a tool call and optional tool message and returns the rendered component
|
|
719
723
|
*/
|
|
720
|
-
function useRenderToolCall() {
|
|
724
|
+
function useRenderToolCall(...removedArguments) {
|
|
725
|
+
if (removedArguments.length > 0) throw new _copilotkit_shared.CopilotKitRemovedApiError({
|
|
726
|
+
what: "\"useRenderToolCall(tool, deps)\"",
|
|
727
|
+
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.",
|
|
728
|
+
docs: "/migrate/removed-apis-2.0#userendertoolcall-with-arguments"
|
|
729
|
+
});
|
|
721
730
|
const { copilotkit, executingToolCallIds } = (0, _copilotkit_react_core_context.useCopilotKit)();
|
|
722
731
|
const agentId = (0, _copilotkit_core.ɵresolveToolCallAgentId)(require_chat.useCopilotChatConfiguration()?.agentId, void 0);
|
|
723
732
|
const unrenderedToolNames = (0, react.useRef)(/* @__PURE__ */ new Set());
|
|
@@ -805,7 +814,7 @@ function ɵuseOwnedCore(ref, create) {
|
|
|
805
814
|
|
|
806
815
|
//#endregion
|
|
807
816
|
//#region package.json
|
|
808
|
-
var version$1 = "2.0.0-rc.
|
|
817
|
+
var version$1 = "2.0.0-rc.66";
|
|
809
818
|
|
|
810
819
|
//#endregion
|
|
811
820
|
//#region src/components/CopilotKitInspector.tsx
|
|
@@ -1335,7 +1344,8 @@ function useStableArrayProp(prop, name) {
|
|
|
1335
1344
|
return value;
|
|
1336
1345
|
}
|
|
1337
1346
|
/** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
|
|
1338
|
-
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 }) => {
|
|
1347
|
+
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 }) => {
|
|
1348
|
+
(0, _copilotkit_core.ɵcheckRemovedProviderProps)(otherProps);
|
|
1339
1349
|
const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
|
|
1340
1350
|
const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
|
|
1341
1351
|
const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
|
|
@@ -1829,6 +1839,7 @@ function useDepsVersion(deps) {
|
|
|
1829
1839
|
* ```
|
|
1830
1840
|
*/
|
|
1831
1841
|
function useFrontendTool(tool, deps) {
|
|
1842
|
+
(0, _copilotkit_core.ɵcheckToolParameters)("useFrontendTool", tool.parameters);
|
|
1832
1843
|
const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
|
|
1833
1844
|
const depsVersion = useDepsVersion(deps);
|
|
1834
1845
|
(0, react.useLayoutEffect)(() => {
|
|
@@ -2561,6 +2572,7 @@ function DefaultToolCallRenderer({ name, toolCallId, parameters, status, result
|
|
|
2561
2572
|
//#endregion
|
|
2562
2573
|
//#region src/hooks/use-human-in-the-loop.tsx
|
|
2563
2574
|
function useHumanInTheLoop(tool, deps) {
|
|
2575
|
+
(0, _copilotkit_core.ɵcheckToolParameters)("useHumanInTheLoop", tool.parameters);
|
|
2564
2576
|
const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
|
|
2565
2577
|
const registry = copilotkit.ɵhumanInTheLoop;
|
|
2566
2578
|
const RenderComponent = (0, react.useCallback)((props) => react.default.createElement(tool.render, (0, _copilotkit_core.ɵhitlRenderProps)(props, tool, registry)), [
|
|
@@ -2900,6 +2912,11 @@ function useInterrupt(config) {
|
|
|
2900
2912
|
* `deleteThread`) return promises that resolve once the platform confirms the
|
|
2901
2913
|
* operation and reject with an `Error` on failure.
|
|
2902
2914
|
*
|
|
2915
|
+
* In 1.x, `useThreads()` returned the current thread. A call without
|
|
2916
|
+
* arguments throws a `CopilotKitRemovedApiError`, and so does a read of
|
|
2917
|
+
* `threadId`, `setThreadId`, or `isThreadIdExplicit` on the result. Read the
|
|
2918
|
+
* current thread from `useCopilotChatConfiguration()`.
|
|
2919
|
+
*
|
|
2903
2920
|
* @param input - Agent identifier and optional list controls.
|
|
2904
2921
|
* @returns Thread list state and stable mutation callbacks.
|
|
2905
2922
|
*
|
|
@@ -2928,7 +2945,9 @@ function useInterrupt(config) {
|
|
|
2928
2945
|
* }
|
|
2929
2946
|
* ```
|
|
2930
2947
|
*/
|
|
2931
|
-
function useThreads(
|
|
2948
|
+
function useThreads(input) {
|
|
2949
|
+
checkThreadsInput(input);
|
|
2950
|
+
const { agentId, includeArchived, limit, enabled = true } = input;
|
|
2932
2951
|
const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
|
|
2933
2952
|
const [controller] = (0, react.useState)(() => new _copilotkit_core.ɵThreadsController((0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }), {
|
|
2934
2953
|
core: copilotkit,
|
|
@@ -2962,7 +2981,7 @@ function useThreads({ agentId, includeArchived, limit, enabled = true }) {
|
|
|
2962
2981
|
copilotkit.threadEndpoints?.mutations
|
|
2963
2982
|
]);
|
|
2964
2983
|
const { fetchMoreThreads, refetchThreads, startNewThread, renameThread, archiveThread, unarchiveThread, deleteThread } = controller;
|
|
2965
|
-
return {
|
|
2984
|
+
return withRemovedThreadFields({
|
|
2966
2985
|
threads,
|
|
2967
2986
|
isLoading,
|
|
2968
2987
|
error,
|
|
@@ -2978,7 +2997,42 @@ function useThreads({ agentId, includeArchived, limit, enabled = true }) {
|
|
|
2978
2997
|
archiveThread,
|
|
2979
2998
|
unarchiveThread,
|
|
2980
2999
|
deleteThread
|
|
2981
|
-
};
|
|
3000
|
+
});
|
|
3001
|
+
}
|
|
3002
|
+
const USE_THREADS_SECTION = "/migrate/removed-apis-2.0#usethreads";
|
|
3003
|
+
/** Throws for the 1.x call `useThreads()`, which has no input. */
|
|
3004
|
+
function checkThreadsInput(input) {
|
|
3005
|
+
if (input !== void 0) return;
|
|
3006
|
+
throw new _copilotkit_shared.CopilotKitRemovedApiError({
|
|
3007
|
+
what: "\"useThreads()\" without arguments",
|
|
3008
|
+
use: "useThreads({ agentId }) lists the threads of an agent. To read or set the current thread, use useCopilotChatConfiguration() from @copilotkit/react-core.",
|
|
3009
|
+
docs: USE_THREADS_SECTION
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
/** The fields of the 1.x `useThreads()` result, and what to use in 2.0. */
|
|
3013
|
+
const REMOVED_THREAD_FIELDS = {
|
|
3014
|
+
threadId: "Read threadId from useCopilotChatConfiguration() of @copilotkit/react-core.",
|
|
3015
|
+
setThreadId: "Call setActiveThreadId(threadId) on useCopilotChatConfiguration() of @copilotkit/react-core.",
|
|
3016
|
+
isThreadIdExplicit: "Read hasExplicitThreadId from useCopilotChatConfiguration() of @copilotkit/react-core."
|
|
3017
|
+
};
|
|
3018
|
+
/**
|
|
3019
|
+
* Adds a getter that throws a `CopilotKitRemovedApiError` for each field of
|
|
3020
|
+
* the 1.x result. The getters are not enumerable, so a spread, a JSON copy,
|
|
3021
|
+
* or devtools do not call them.
|
|
3022
|
+
*/
|
|
3023
|
+
function withRemovedThreadFields(result) {
|
|
3024
|
+
const fields = Object.entries(REMOVED_THREAD_FIELDS);
|
|
3025
|
+
for (const [field, use] of fields) Object.defineProperty(result, field, {
|
|
3026
|
+
enumerable: false,
|
|
3027
|
+
get() {
|
|
3028
|
+
throw new _copilotkit_shared.CopilotKitRemovedApiError({
|
|
3029
|
+
what: `"${field}" from useThreads`,
|
|
3030
|
+
use: `${use} useThreads({ agentId }) lists the threads of an agent.`,
|
|
3031
|
+
docs: USE_THREADS_SECTION
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
});
|
|
3035
|
+
return result;
|
|
2982
3036
|
}
|
|
2983
3037
|
|
|
2984
3038
|
//#endregion
|
|
@@ -8121,151 +8175,151 @@ const WildcardToolCallRender = require_chat.defineToolCallRenderer({
|
|
|
8121
8175
|
|
|
8122
8176
|
//#endregion
|
|
8123
8177
|
//#region src/removed-exports.ts
|
|
8124
|
-
/** @deprecated "CoAgentStateRendersProvider" was removed in CopilotKit 2.0. Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component. Run `npx
|
|
8178
|
+
/** @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 */
|
|
8125
8179
|
const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8126
8180
|
name: "CoAgentStateRendersProvider",
|
|
8127
8181
|
use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
|
|
8128
8182
|
docs: "/migrate/v2#hook-mapping"
|
|
8129
8183
|
});
|
|
8130
|
-
/** @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
|
|
8184
|
+
/** @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 */
|
|
8131
8185
|
const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8132
8186
|
name: "CopilotTask",
|
|
8133
8187
|
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.",
|
|
8134
8188
|
docs: "/programmatic-control#sending-a-message-from-code"
|
|
8135
8189
|
});
|
|
8136
|
-
/** @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
|
|
8190
|
+
/** @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 */
|
|
8137
8191
|
const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8138
8192
|
name: "createA2UIMessageRenderer",
|
|
8139
8193
|
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.",
|
|
8140
8194
|
docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
|
|
8141
8195
|
});
|
|
8142
|
-
/** @deprecated "shouldShowDevConsole" was removed in CopilotKit 2.0. Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider. Run `npx
|
|
8196
|
+
/** @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 */
|
|
8143
8197
|
const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8144
8198
|
name: "shouldShowDevConsole",
|
|
8145
8199
|
use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
|
|
8146
8200
|
docs: "/migrate/removed-apis-2.0#showdevconsole"
|
|
8147
8201
|
});
|
|
8148
|
-
/** @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
|
|
8202
|
+
/** @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 */
|
|
8149
8203
|
const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8150
8204
|
name: "ThreadsProvider",
|
|
8151
8205
|
use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
|
|
8152
8206
|
docs: "/migrate/chat-2.0#thread-lists"
|
|
8153
8207
|
});
|
|
8154
|
-
/** @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
|
|
8208
|
+
/** @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 */
|
|
8155
8209
|
const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8156
8210
|
name: "useCoAgent",
|
|
8157
8211
|
use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
|
|
8158
8212
|
docs: "/migrate/v2#hook-mapping"
|
|
8159
8213
|
});
|
|
8160
|
-
/** @deprecated "useCoAgentStateRender" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx
|
|
8214
|
+
/** @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 */
|
|
8161
8215
|
const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8162
8216
|
name: "useCoAgentStateRender",
|
|
8163
8217
|
use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
|
|
8164
8218
|
docs: "/migrate/v2#hook-mapping"
|
|
8165
8219
|
});
|
|
8166
|
-
/** @deprecated "useCoAgentStateRenders" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx
|
|
8220
|
+
/** @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 */
|
|
8167
8221
|
const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8168
8222
|
name: "useCoAgentStateRenders",
|
|
8169
8223
|
use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
|
|
8170
8224
|
docs: "/migrate/v2#hook-mapping"
|
|
8171
8225
|
});
|
|
8172
|
-
/** @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
|
|
8226
|
+
/** @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 */
|
|
8173
8227
|
const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8174
8228
|
name: "useCopilotAction",
|
|
8175
8229
|
use: "Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user.",
|
|
8176
8230
|
docs: "/migrate/v2#hook-mapping"
|
|
8177
8231
|
});
|
|
8178
|
-
/** @deprecated "useCopilotAdditionalInstructions" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core to give the agent the instructions. Run `npx
|
|
8232
|
+
/** @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 */
|
|
8179
8233
|
const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8180
8234
|
name: "useCopilotAdditionalInstructions",
|
|
8181
8235
|
use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
|
|
8182
8236
|
docs: "/migrate/v2#hook-mapping"
|
|
8183
8237
|
});
|
|
8184
|
-
/** @deprecated "useCopilotAuthenticatedAction_c" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core, and check the user in its handler. Run `npx
|
|
8238
|
+
/** @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 */
|
|
8185
8239
|
const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8186
8240
|
name: "useCopilotAuthenticatedAction_c",
|
|
8187
8241
|
use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
|
|
8188
8242
|
docs: "/migrate/v2#hook-mapping"
|
|
8189
8243
|
});
|
|
8190
|
-
/** @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
|
|
8244
|
+
/** @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 */
|
|
8191
8245
|
const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8192
8246
|
name: "useCopilotChat",
|
|
8193
8247
|
use: "Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI.",
|
|
8194
8248
|
docs: "/migrate/v2#hook-mapping"
|
|
8195
8249
|
});
|
|
8196
|
-
/** @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
|
|
8250
|
+
/** @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 */
|
|
8197
8251
|
const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8198
8252
|
name: "useCopilotChatHeadless_c",
|
|
8199
8253
|
use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
|
|
8200
8254
|
docs: "/migrate/v2#hook-mapping"
|
|
8201
8255
|
});
|
|
8202
|
-
/** @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
|
|
8256
|
+
/** @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 */
|
|
8203
8257
|
const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8204
8258
|
name: "useCopilotChatInternal",
|
|
8205
8259
|
use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
|
|
8206
8260
|
docs: "/migrate/v2#hook-mapping"
|
|
8207
8261
|
});
|
|
8208
|
-
/** @deprecated "useCopilotChatSuggestions" was removed in CopilotKit 2.0. Use useConfigureSuggestions from @copilotkit/react-core. Run `npx
|
|
8262
|
+
/** @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 */
|
|
8209
8263
|
const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8210
8264
|
name: "useCopilotChatSuggestions",
|
|
8211
8265
|
use: "Use useConfigureSuggestions from @copilotkit/react-core.",
|
|
8212
8266
|
docs: "/migrate/v2#hook-mapping"
|
|
8213
8267
|
});
|
|
8214
|
-
/** @deprecated "useCopilotContext" was removed in CopilotKit 2.0. Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core. Run `npx
|
|
8268
|
+
/** @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 */
|
|
8215
8269
|
const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8216
8270
|
name: "useCopilotContext",
|
|
8217
8271
|
use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
|
|
8218
8272
|
docs: "/programmatic-control#sending-a-message-from-code"
|
|
8219
8273
|
});
|
|
8220
|
-
/** @deprecated "useCopilotMessagesContext" was removed in CopilotKit 2.0. Read agent.messages from useAgent from @copilotkit/react-core. Run `npx
|
|
8274
|
+
/** @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 */
|
|
8221
8275
|
const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8222
8276
|
name: "useCopilotMessagesContext",
|
|
8223
8277
|
use: "Read agent.messages from useAgent from @copilotkit/react-core.",
|
|
8224
8278
|
docs: "/migrate/v2#hook-mapping"
|
|
8225
8279
|
});
|
|
8226
|
-
/** @deprecated "useCopilotReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core. Run `npx
|
|
8280
|
+
/** @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 */
|
|
8227
8281
|
const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8228
8282
|
name: "useCopilotReadable",
|
|
8229
8283
|
use: "Use useAgentContext from @copilotkit/react-core.",
|
|
8230
8284
|
docs: "/migrate/v2#hook-mapping"
|
|
8231
8285
|
});
|
|
8232
|
-
/** @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
|
|
8286
|
+
/** @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 */
|
|
8233
8287
|
const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8234
8288
|
name: "useCopilotRuntimeClient",
|
|
8235
8289
|
use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
|
|
8236
8290
|
docs: "/migrate/v2#update-the-runtime"
|
|
8237
8291
|
});
|
|
8238
|
-
/** @deprecated "useDefaultTool" was removed in CopilotKit 2.0. Use useDefaultRenderTool from @copilotkit/react-core. Run `npx
|
|
8292
|
+
/** @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 */
|
|
8239
8293
|
const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8240
8294
|
name: "useDefaultTool",
|
|
8241
8295
|
use: "Use useDefaultRenderTool from @copilotkit/react-core.",
|
|
8242
8296
|
docs: "/migrate/v2#hook-mapping"
|
|
8243
8297
|
});
|
|
8244
|
-
/** @deprecated "useLangGraphInterrupt" was removed in CopilotKit 2.0. Use useInterrupt from @copilotkit/react-core. Run `npx
|
|
8298
|
+
/** @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 */
|
|
8245
8299
|
const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8246
8300
|
name: "useLangGraphInterrupt",
|
|
8247
8301
|
use: "Use useInterrupt from @copilotkit/react-core.",
|
|
8248
8302
|
docs: "/migrate/v2#hook-mapping"
|
|
8249
8303
|
});
|
|
8250
|
-
/** @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
|
|
8304
|
+
/** @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 */
|
|
8251
8305
|
const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8252
8306
|
name: "useLazyToolRenderer",
|
|
8253
8307
|
use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
|
|
8254
8308
|
docs: "/migrate/v2#gotchas"
|
|
8255
8309
|
});
|
|
8256
|
-
/** @deprecated "useLearningContainers" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx
|
|
8310
|
+
/** @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 */
|
|
8257
8311
|
const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8258
8312
|
name: "useLearningContainers",
|
|
8259
8313
|
use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
|
|
8260
8314
|
docs: "/migrate/chat-2.0#removed-exports"
|
|
8261
8315
|
});
|
|
8262
|
-
/** @deprecated "useLearningContainersInCurrentThread" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx
|
|
8316
|
+
/** @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 */
|
|
8263
8317
|
const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8264
8318
|
name: "useLearningContainersInCurrentThread",
|
|
8265
8319
|
use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
|
|
8266
8320
|
docs: "/migrate/chat-2.0#removed-exports"
|
|
8267
8321
|
});
|
|
8268
|
-
/** @deprecated "useMakeCopilotDocumentReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core, with the document text as the value. Run `npx
|
|
8322
|
+
/** @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 */
|
|
8269
8323
|
const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
|
|
8270
8324
|
name: "useMakeCopilotDocumentReadable",
|
|
8271
8325
|
use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
|
|
@@ -10267,6 +10321,18 @@ Object.defineProperty(exports, 'ɵcanPreviewDocument', {
|
|
|
10267
10321
|
return _copilotkit_core.ɵcanPreviewDocument;
|
|
10268
10322
|
}
|
|
10269
10323
|
});
|
|
10324
|
+
Object.defineProperty(exports, 'ɵcheckRemovedProviderProps', {
|
|
10325
|
+
enumerable: true,
|
|
10326
|
+
get: function () {
|
|
10327
|
+
return _copilotkit_core.ɵcheckRemovedProviderProps;
|
|
10328
|
+
}
|
|
10329
|
+
});
|
|
10330
|
+
Object.defineProperty(exports, 'ɵcheckToolParameters', {
|
|
10331
|
+
enumerable: true,
|
|
10332
|
+
get: function () {
|
|
10333
|
+
return _copilotkit_core.ɵcheckToolParameters;
|
|
10334
|
+
}
|
|
10335
|
+
});
|
|
10270
10336
|
Object.defineProperty(exports, 'ɵclampSlashIndex', {
|
|
10271
10337
|
enumerable: true,
|
|
10272
10338
|
get: function () {
|