@copilotkit/react-core 2.0.0-rc.19 → 2.0.0-rc.20
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/{MarkdownSurfaces-kfFfyx5V.mjs → MarkdownSurfaces-Bt7TD_U1.mjs} +5 -30
- package/dist/MarkdownSurfaces-Bt7TD_U1.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-Ci0E7XKw.cjs → MarkdownSurfaces-CoUoPhR9.cjs} +6 -37
- package/dist/MarkdownSurfaces-CoUoPhR9.cjs.map +1 -0
- package/dist/generative-ui.cjs +1 -1
- package/dist/generative-ui.mjs +1 -1
- package/dist/headless.cjs +3 -6
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.mjs +4 -7
- package/dist/headless.mjs.map +1 -1
- package/dist/index.cjs +509 -786
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +172 -707
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +513 -815
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/dist/MarkdownSurfaces-Ci0E7XKw.cjs.map +0 -1
- package/dist/MarkdownSurfaces-kfFfyx5V.mjs.map +0 -1
package/dist/headless.mjs
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { CopilotKitContext, CopilotKitCoreReact, useCopilotKit, useCopilotKit as useCopilotKit$1, useDefaultAgentId } from "@copilotkit/react-core/context";
|
|
2
2
|
import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { DEFAULT_AGENT_ID, partialJSONParse, randomUUID, ɵanySchema } from "@copilotkit/shared";
|
|
4
|
-
import { CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCoreRuntimeConnectionStatus, INTERRUPT_EVENT_NAME, ProxiedCopilotRuntimeAgent, ToolCallStatus, ɵInterruptState, ɵclearAgentInterruptState, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisHttpAgent, ɵresolveToolCallRenderer, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading } from "@copilotkit/core";
|
|
4
|
+
import { CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCoreRuntimeConnectionStatus, INTERRUPT_EVENT_NAME, ProxiedCopilotRuntimeAgent, ToolCallStatus, ɵInterruptState, ɵclearAgentInterruptState, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisHttpAgent, ɵresolveToolCallRenderer, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵshallowEqualRecord } from "@copilotkit/core";
|
|
5
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
6
|
import { randomUUID as randomUUID$1 } from "@ag-ui/client";
|
|
7
7
|
import { contentToText } from "@ag-ui/core";
|
|
8
8
|
|
|
9
9
|
//#region src/lib/shallow-stable-ref.ts
|
|
10
10
|
/**
|
|
11
|
-
* Shallow equality comparison for objects
|
|
11
|
+
* Shallow equality comparison for objects: same own keys, each holding the
|
|
12
|
+
* same value (`Object.is`). Core's `ɵshallowEqualRecord` holds the rule.
|
|
12
13
|
*/
|
|
13
14
|
function shallowEqual(obj1, obj2) {
|
|
14
|
-
|
|
15
|
-
const keys2 = Object.keys(obj2);
|
|
16
|
-
if (keys1.length !== keys2.length) return false;
|
|
17
|
-
for (const key of keys1) if (obj1[key] !== obj2[key]) return false;
|
|
18
|
-
return true;
|
|
15
|
+
return ɵshallowEqualRecord(obj1, obj2);
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* Returns true only for plain JS objects (`{}`), excluding arrays, Dates,
|