@copilotkit/react-core 1.9.2-next.14 → 1.9.2-next.16
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/CHANGELOG.md +16 -0
- package/dist/{chunk-FXK6RQIN.mjs → chunk-44XAHWIU.mjs} +2 -2
- package/dist/{chunk-NQVCZQ5T.mjs → chunk-654Z36FY.mjs} +2 -2
- package/dist/{chunk-GPCFFQHF.mjs → chunk-6V7FSJU5.mjs} +3 -3
- package/dist/{chunk-JPMIAGI6.mjs → chunk-BMHFKVRE.mjs} +2 -2
- package/dist/{chunk-UBNRUXEK.mjs → chunk-ETFA6XAF.mjs} +2 -2
- package/dist/{chunk-XFOTNHYA.mjs → chunk-FIWNDD4G.mjs} +1 -1
- package/dist/{chunk-XFOTNHYA.mjs.map → chunk-FIWNDD4G.mjs.map} +1 -1
- package/dist/{chunk-IF2M6XIO.mjs → chunk-JUEBTQ7Q.mjs} +2 -2
- package/dist/{chunk-UHEKBL6C.mjs → chunk-KPVFLQYE.mjs} +3 -3
- package/dist/{chunk-CMQV4XNY.mjs → chunk-LUZQL376.mjs} +2 -2
- package/dist/{chunk-3YHYWAHK.mjs → chunk-NBSSZHQO.mjs} +2 -2
- package/dist/{chunk-WOGURSAL.mjs → chunk-R7XJ5MBN.mjs} +57 -16
- package/dist/chunk-R7XJ5MBN.mjs.map +1 -0
- package/dist/{chunk-EF5BNM34.mjs → chunk-SFADWQ4P.mjs} +3 -3
- package/dist/{chunk-JDEWNLNP.mjs → chunk-SLNYMYUX.mjs} +2 -2
- package/dist/{chunk-ERXWDCY6.mjs → chunk-T6CEBWGR.mjs} +2 -2
- package/dist/{chunk-ENLPADPJ.mjs → chunk-VUAQ2JRZ.mjs} +4 -4
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -1
- package/dist/components/copilot-provider/copilot-messages.mjs +2 -2
- package/dist/components/copilot-provider/copilotkit-props.d.ts +7 -2
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.js +54 -13
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +3 -3
- package/dist/components/copilot-provider/index.d.ts +1 -1
- package/dist/components/copilot-provider/index.js +54 -13
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +3 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +54 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/context/copilot-context.d.ts +1 -1
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{copilot-context-3da805ab.d.ts → copilot-context-5f835171.d.ts} +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +14 -14
- package/dist/hooks/use-chat.d.ts +1 -1
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +2 -2
- package/dist/hooks/use-coagent-state-render.js.map +1 -1
- package/dist/hooks/use-coagent-state-render.mjs +2 -2
- package/dist/hooks/use-coagent.d.ts +1 -1
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +6 -6
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +2 -2
- package/dist/hooks/use-copilot-additional-instructions.js.map +1 -1
- package/dist/hooks/use-copilot-additional-instructions.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -1
- package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
- package/dist/hooks/use-copilot-chat.d.ts +1 -1
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +5 -5
- package/dist/hooks/use-copilot-readable.js.map +1 -1
- package/dist/hooks/use-copilot-readable.mjs +2 -2
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt-render.mjs +2 -2
- package/dist/hooks/use-langgraph-interrupt.d.ts +1 -1
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +6 -6
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +54 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/lib/copilot-task.d.ts +1 -1
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +4 -4
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- package/dist/types/interrupt-action.d.ts +1 -1
- package/dist/utils/extract.d.ts +1 -1
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +3 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit-props.tsx +6 -1
- package/src/components/copilot-provider/copilotkit.tsx +59 -17
- package/src/context/copilot-context.tsx +1 -1
- package/dist/chunk-WOGURSAL.mjs.map +0 -1
- /package/dist/{chunk-FXK6RQIN.mjs.map → chunk-44XAHWIU.mjs.map} +0 -0
- /package/dist/{chunk-NQVCZQ5T.mjs.map → chunk-654Z36FY.mjs.map} +0 -0
- /package/dist/{chunk-GPCFFQHF.mjs.map → chunk-6V7FSJU5.mjs.map} +0 -0
- /package/dist/{chunk-JPMIAGI6.mjs.map → chunk-BMHFKVRE.mjs.map} +0 -0
- /package/dist/{chunk-UBNRUXEK.mjs.map → chunk-ETFA6XAF.mjs.map} +0 -0
- /package/dist/{chunk-IF2M6XIO.mjs.map → chunk-JUEBTQ7Q.mjs.map} +0 -0
- /package/dist/{chunk-UHEKBL6C.mjs.map → chunk-KPVFLQYE.mjs.map} +0 -0
- /package/dist/{chunk-CMQV4XNY.mjs.map → chunk-LUZQL376.mjs.map} +0 -0
- /package/dist/{chunk-3YHYWAHK.mjs.map → chunk-NBSSZHQO.mjs.map} +0 -0
- /package/dist/{chunk-EF5BNM34.mjs.map → chunk-SFADWQ4P.mjs.map} +0 -0
- /package/dist/{chunk-JDEWNLNP.mjs.map → chunk-SLNYMYUX.mjs.map} +0 -0
- /package/dist/{chunk-ERXWDCY6.mjs.map → chunk-T6CEBWGR.mjs.map} +0 -0
- /package/dist/{chunk-ENLPADPJ.mjs.map → chunk-VUAQ2JRZ.mjs.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotKit,
|
|
3
3
|
defaultCopilotContextCategories
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-R7XJ5MBN.mjs";
|
|
5
5
|
import "../../chunk-SJJNFYGQ.mjs";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-SLNYMYUX.mjs";
|
|
7
7
|
import "../../chunk-5FHSUKQL.mjs";
|
|
8
8
|
import "../../chunk-RKTVJRK7.mjs";
|
|
9
9
|
import "../../chunk-PMAFHQ7P.mjs";
|
|
@@ -14,7 +14,7 @@ import "../../chunk-O7ARI5CV.mjs";
|
|
|
14
14
|
import "../../chunk-55QZ2SVJ.mjs";
|
|
15
15
|
import "../../chunk-GFJW4RIM.mjs";
|
|
16
16
|
import "../../chunk-YAF2LATQ.mjs";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-FIWNDD4G.mjs";
|
|
18
18
|
import "../../chunk-SKC7AJIV.mjs";
|
|
19
19
|
export {
|
|
20
20
|
CopilotKit,
|
|
@@ -3,7 +3,7 @@ export { CopilotKitProps } from './copilot-provider/copilotkit-props.js';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '@copilotkit/runtime-client-gql';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../copilot-context-
|
|
6
|
+
import '../copilot-context-5f835171.js';
|
|
7
7
|
import '@copilotkit/shared';
|
|
8
8
|
import '../types/frontend-action.js';
|
|
9
9
|
import '../hooks/use-tree.js';
|
package/dist/components/index.js
CHANGED
|
@@ -1725,15 +1725,21 @@ ${nonDocumentStrings}`;
|
|
|
1725
1725
|
onTrace: props.onTrace
|
|
1726
1726
|
});
|
|
1727
1727
|
const [chatSuggestionConfiguration, setChatSuggestionConfiguration] = (0, import_react10.useState)({});
|
|
1728
|
-
const addChatSuggestionConfiguration = (
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
setChatSuggestionConfiguration
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1728
|
+
const addChatSuggestionConfiguration = (0, import_react10.useCallback)(
|
|
1729
|
+
(id, suggestion) => {
|
|
1730
|
+
setChatSuggestionConfiguration((prev) => __spreadProps(__spreadValues({}, prev), { [id]: suggestion }));
|
|
1731
|
+
},
|
|
1732
|
+
[setChatSuggestionConfiguration]
|
|
1733
|
+
);
|
|
1734
|
+
const removeChatSuggestionConfiguration = (0, import_react10.useCallback)(
|
|
1735
|
+
(id) => {
|
|
1736
|
+
setChatSuggestionConfiguration((prev) => {
|
|
1737
|
+
const _a2 = prev, { [id]: _ } = _a2, rest = __objRest(_a2, [__restKey(id)]);
|
|
1738
|
+
return rest;
|
|
1739
|
+
});
|
|
1740
|
+
},
|
|
1741
|
+
[setChatSuggestionConfiguration]
|
|
1742
|
+
);
|
|
1737
1743
|
const [availableAgents, setAvailableAgents] = (0, import_react10.useState)([]);
|
|
1738
1744
|
const [coagentStates, setCoagentStates] = (0, import_react10.useState)({});
|
|
1739
1745
|
const coagentStatesRef = (0, import_react10.useRef)({});
|
|
@@ -1813,6 +1819,41 @@ ${nonDocumentStrings}`;
|
|
|
1813
1819
|
setLangGraphInterruptAction(null);
|
|
1814
1820
|
}, []);
|
|
1815
1821
|
const memoizedChildren = (0, import_react10.useMemo)(() => children, [children]);
|
|
1822
|
+
const agentLock = (0, import_react10.useMemo)(() => {
|
|
1823
|
+
var _a2;
|
|
1824
|
+
return (_a2 = props.agent) != null ? _a2 : null;
|
|
1825
|
+
}, [props.agent]);
|
|
1826
|
+
const forwardedParameters = (0, import_react10.useMemo)(
|
|
1827
|
+
() => {
|
|
1828
|
+
var _a2;
|
|
1829
|
+
return (_a2 = props.forwardedParameters) != null ? _a2 : {};
|
|
1830
|
+
},
|
|
1831
|
+
[props.forwardedParameters]
|
|
1832
|
+
);
|
|
1833
|
+
const updateExtensions = (0, import_react10.useCallback)(
|
|
1834
|
+
(newExtensions) => {
|
|
1835
|
+
setExtensions((prev) => {
|
|
1836
|
+
const resolved = typeof newExtensions === "function" ? newExtensions(prev) : newExtensions;
|
|
1837
|
+
const isSameLength = Object.keys(resolved).length === Object.keys(prev).length;
|
|
1838
|
+
const isEqual = isSameLength && // @ts-ignore
|
|
1839
|
+
Object.entries(resolved).every(([key, value]) => prev[key] === value);
|
|
1840
|
+
return isEqual ? prev : resolved;
|
|
1841
|
+
});
|
|
1842
|
+
},
|
|
1843
|
+
[setExtensions]
|
|
1844
|
+
);
|
|
1845
|
+
const updateAuthStates = (0, import_react10.useCallback)(
|
|
1846
|
+
(newAuthStates) => {
|
|
1847
|
+
setAuthStates((prev) => {
|
|
1848
|
+
const resolved = typeof newAuthStates === "function" ? newAuthStates(prev) : newAuthStates;
|
|
1849
|
+
const isSameLength = Object.keys(resolved).length === Object.keys(prev).length;
|
|
1850
|
+
const isEqual = isSameLength && // @ts-ignore
|
|
1851
|
+
Object.entries(resolved).every(([key, value]) => prev[key] === value);
|
|
1852
|
+
return isEqual ? prev : resolved;
|
|
1853
|
+
});
|
|
1854
|
+
},
|
|
1855
|
+
[setAuthStates]
|
|
1856
|
+
);
|
|
1816
1857
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1817
1858
|
CopilotContext.Provider,
|
|
1818
1859
|
{
|
|
@@ -1850,8 +1891,8 @@ ${nonDocumentStrings}`;
|
|
|
1850
1891
|
agentSession,
|
|
1851
1892
|
setAgentSession,
|
|
1852
1893
|
runtimeClient,
|
|
1853
|
-
forwardedParameters
|
|
1854
|
-
agentLock
|
|
1894
|
+
forwardedParameters,
|
|
1895
|
+
agentLock,
|
|
1855
1896
|
threadId: internalThreadId,
|
|
1856
1897
|
setThreadId,
|
|
1857
1898
|
runId,
|
|
@@ -1860,9 +1901,9 @@ ${nonDocumentStrings}`;
|
|
|
1860
1901
|
availableAgents,
|
|
1861
1902
|
authConfig_c: props.authConfig_c,
|
|
1862
1903
|
authStates_c: authStates,
|
|
1863
|
-
setAuthStates_c:
|
|
1904
|
+
setAuthStates_c: updateAuthStates,
|
|
1864
1905
|
extensions,
|
|
1865
|
-
setExtensions,
|
|
1906
|
+
setExtensions: updateExtensions,
|
|
1866
1907
|
langGraphInterruptAction,
|
|
1867
1908
|
setLangGraphInterruptAction,
|
|
1868
1909
|
removeLangGraphInterruptAction,
|