@copilotkit/react-core 1.51.3-next.5 → 1.51.3-next.6
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 +9 -0
- package/dist/{chunk-HZWTHNXL.mjs → chunk-3G4VFRVV.mjs} +2 -2
- package/dist/{chunk-K2GJI3PT.mjs → chunk-4RRUJHCI.mjs} +2 -2
- package/dist/{chunk-BVBFFI7K.mjs → chunk-6PUNP7CD.mjs} +3 -3
- package/dist/chunk-6PUNP7CD.mjs.map +1 -0
- package/dist/{chunk-THCOOWDH.mjs → chunk-GIU66J37.mjs} +2 -2
- package/dist/{chunk-3HJ2O2MN.mjs → chunk-HBMPXNW2.mjs} +2 -2
- package/dist/{chunk-FJEI7IBX.mjs → chunk-LHERIF3L.mjs} +2 -2
- package/dist/{chunk-KINHFG63.mjs → chunk-MF2ZSLBV.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit.mjs +3 -3
- package/dist/components/copilot-provider/index.mjs +3 -3
- package/dist/components/error-boundary/error-boundary.js +2 -2
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/error-boundary/error-utils.js +12 -2
- package/dist/components/error-boundary/error-utils.js.map +1 -1
- package/dist/components/error-boundary/error-utils.mjs +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +4 -4
- package/dist/hooks/use-copilot-chat-headless_c.js +2 -2
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +3 -3
- package/dist/hooks/use-copilot-chat.js +2 -2
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +3 -3
- package/dist/hooks/use-copilot-chat_internal.js +2 -2
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/lib/copilot-task.mjs +4 -4
- package/dist/lib/index.mjs +4 -4
- package/jest.config.js +1 -1
- package/package.json +6 -6
- package/src/components/error-boundary/error-utils.tsx +2 -2
- package/dist/chunk-BVBFFI7K.mjs.map +0 -1
- /package/dist/{chunk-HZWTHNXL.mjs.map → chunk-3G4VFRVV.mjs.map} +0 -0
- /package/dist/{chunk-K2GJI3PT.mjs.map → chunk-4RRUJHCI.mjs.map} +0 -0
- /package/dist/{chunk-THCOOWDH.mjs.map → chunk-GIU66J37.mjs.map} +0 -0
- /package/dist/{chunk-3HJ2O2MN.mjs.map → chunk-HBMPXNW2.mjs.map} +0 -0
- /package/dist/{chunk-FJEI7IBX.mjs.map → chunk-LHERIF3L.mjs.map} +0 -0
- /package/dist/{chunk-KINHFG63.mjs.map → chunk-MF2ZSLBV.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import "./chunk-36KQV2NA.mjs";
|
|
|
5
5
|
import "./chunk-LUGEI4YQ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
CopilotTask
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4RRUJHCI.mjs";
|
|
9
9
|
import "./chunk-4CEQJ2X6.mjs";
|
|
10
10
|
import "./chunk-A6NKSGH3.mjs";
|
|
11
11
|
import {
|
|
@@ -40,16 +40,16 @@ import {
|
|
|
40
40
|
} from "./chunk-7DTB7S5V.mjs";
|
|
41
41
|
import {
|
|
42
42
|
useCopilotChatHeadless_c
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MF2ZSLBV.mjs";
|
|
44
44
|
import {
|
|
45
45
|
useCopilotChatSuggestions
|
|
46
46
|
} from "./chunk-XDFVCQD3.mjs";
|
|
47
47
|
import {
|
|
48
48
|
useCopilotChat
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-3G4VFRVV.mjs";
|
|
50
50
|
import {
|
|
51
51
|
useCopilotChatInternal
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-HBMPXNW2.mjs";
|
|
53
53
|
import {
|
|
54
54
|
useLangGraphInterruptRender
|
|
55
55
|
} from "./chunk-VV56AVPB.mjs";
|
|
@@ -71,8 +71,8 @@ import "./chunk-SPCZTZCY.mjs";
|
|
|
71
71
|
import {
|
|
72
72
|
CopilotKit,
|
|
73
73
|
defaultCopilotContextCategories
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
74
|
+
} from "./chunk-GIU66J37.mjs";
|
|
75
|
+
import "./chunk-LHERIF3L.mjs";
|
|
76
76
|
import "./chunk-CYDWEPFL.mjs";
|
|
77
77
|
import {
|
|
78
78
|
SUGGESTION_RETRY_CONFIG
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
import "./chunk-RKTVJRK7.mjs";
|
|
85
85
|
import "./chunk-PMAFHQ7P.mjs";
|
|
86
86
|
import "./chunk-YYN33GSG.mjs";
|
|
87
|
-
import "./chunk-
|
|
87
|
+
import "./chunk-6PUNP7CD.mjs";
|
|
88
88
|
import "./chunk-O7ARI5CV.mjs";
|
|
89
89
|
import "./chunk-3X3I7OJV.mjs";
|
|
90
90
|
import "./chunk-NB2FKV2V.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotTask
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4RRUJHCI.mjs";
|
|
4
4
|
import "../chunk-4CEQJ2X6.mjs";
|
|
5
5
|
import "../chunk-JD7BAH7U.mjs";
|
|
6
6
|
import "../chunk-SPCZTZCY.mjs";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-GIU66J37.mjs";
|
|
8
|
+
import "../chunk-LHERIF3L.mjs";
|
|
9
9
|
import "../chunk-CYDWEPFL.mjs";
|
|
10
10
|
import "../chunk-2IDV5OHF.mjs";
|
|
11
11
|
import "../chunk-HE22TZMF.mjs";
|
|
@@ -13,7 +13,7 @@ import "../chunk-ICIK2BSB.mjs";
|
|
|
13
13
|
import "../chunk-RKTVJRK7.mjs";
|
|
14
14
|
import "../chunk-PMAFHQ7P.mjs";
|
|
15
15
|
import "../chunk-YYN33GSG.mjs";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-6PUNP7CD.mjs";
|
|
17
17
|
import "../chunk-O7ARI5CV.mjs";
|
|
18
18
|
import "../chunk-3X3I7OJV.mjs";
|
|
19
19
|
import "../chunk-NB2FKV2V.mjs";
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../chunk-LUGEI4YQ.mjs";
|
|
2
2
|
import {
|
|
3
3
|
CopilotTask
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4RRUJHCI.mjs";
|
|
5
5
|
import "../chunk-4CEQJ2X6.mjs";
|
|
6
6
|
import "../chunk-JD7BAH7U.mjs";
|
|
7
7
|
import "../chunk-SPCZTZCY.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-GIU66J37.mjs";
|
|
9
|
+
import "../chunk-LHERIF3L.mjs";
|
|
10
10
|
import "../chunk-CYDWEPFL.mjs";
|
|
11
11
|
import "../chunk-2IDV5OHF.mjs";
|
|
12
12
|
import "../chunk-HE22TZMF.mjs";
|
|
@@ -14,7 +14,7 @@ import "../chunk-ICIK2BSB.mjs";
|
|
|
14
14
|
import "../chunk-RKTVJRK7.mjs";
|
|
15
15
|
import "../chunk-PMAFHQ7P.mjs";
|
|
16
16
|
import "../chunk-YYN33GSG.mjs";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-6PUNP7CD.mjs";
|
|
18
18
|
import "../chunk-O7ARI5CV.mjs";
|
|
19
19
|
import "../chunk-3X3I7OJV.mjs";
|
|
20
20
|
import "../chunk-NB2FKV2V.mjs";
|
package/jest.config.js
CHANGED
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
12
12
|
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
|
|
13
13
|
},
|
|
14
14
|
transformIgnorePatterns: [
|
|
15
|
-
"node_modules/(?!(streamdown|@copilotkitnext)/)",
|
|
15
|
+
"node_modules/(?!(react-markdown|streamdown|@copilotkitnext)/)",
|
|
16
16
|
],
|
|
17
17
|
transform: {
|
|
18
18
|
"^.+\\.(ts|tsx)$": "ts-jest",
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.51.3-next.
|
|
12
|
+
"version": "1.51.3-next.6",
|
|
13
13
|
"sideEffects": [
|
|
14
14
|
"**/*.css"
|
|
15
15
|
],
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@ag-ui/client": "^0.0.43",
|
|
59
59
|
"@scarf/scarf": "^1.3.0",
|
|
60
|
-
"
|
|
60
|
+
"react-markdown": "^8.0.7",
|
|
61
61
|
"untruncate-json": "^0.0.1",
|
|
62
|
-
"@copilotkit/runtime-client-gql": "1.51.3-next.
|
|
63
|
-
"@copilotkit/shared": "1.51.3-next.
|
|
64
|
-
"@copilotkitnext/core": "1.51.3-next.
|
|
65
|
-
"@copilotkitnext/react": "1.51.3-next.
|
|
62
|
+
"@copilotkit/runtime-client-gql": "1.51.3-next.6",
|
|
63
|
+
"@copilotkit/shared": "1.51.3-next.6",
|
|
64
|
+
"@copilotkitnext/core": "1.51.3-next.6",
|
|
65
|
+
"@copilotkitnext/react": "1.51.3-next.6"
|
|
66
66
|
},
|
|
67
67
|
"keywords": [
|
|
68
68
|
"copilotkit",
|
|
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
import { GraphQLError } from "@copilotkit/runtime-client-gql";
|
|
3
3
|
import { useToast } from "../toast/toast-provider";
|
|
4
4
|
import { ExclamationMarkIcon } from "../toast/exclamation-mark-icon";
|
|
5
|
-
import
|
|
5
|
+
import ReactMarkdown from "react-markdown";
|
|
6
6
|
|
|
7
7
|
interface OriginalError {
|
|
8
8
|
message?: string;
|
|
@@ -37,7 +37,7 @@ export function ErrorToast({ errors }: { errors: (Error | GraphQLError)[] }) {
|
|
|
37
37
|
<span style={{ fontFamily: "monospace", fontWeight: "normal" }}>{code}</span>
|
|
38
38
|
</div>
|
|
39
39
|
)}
|
|
40
|
-
<
|
|
40
|
+
<ReactMarkdown>{message}</ReactMarkdown>
|
|
41
41
|
</div>
|
|
42
42
|
);
|
|
43
43
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/error-boundary/error-utils.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { GraphQLError } from \"@copilotkit/runtime-client-gql\";\nimport { useToast } from \"../toast/toast-provider\";\nimport { ExclamationMarkIcon } from \"../toast/exclamation-mark-icon\";\nimport { Streamdown } from \"streamdown\";\n\ninterface OriginalError {\n message?: string;\n stack?: string;\n}\n\nexport function ErrorToast({ errors }: { errors: (Error | GraphQLError)[] }) {\n const errorsToRender = errors.map((error, idx) => {\n const originalError =\n \"extensions\" in error ? (error.extensions?.originalError as undefined | OriginalError) : {};\n const message = originalError?.message ?? error.message;\n const code = \"extensions\" in error ? (error.extensions?.code as string) : null;\n\n return (\n <div\n key={idx}\n style={{\n marginTop: idx === 0 ? 0 : 10,\n marginBottom: 14,\n }}\n >\n <ExclamationMarkIcon style={{ marginBottom: 4 }} />\n\n {code && (\n <div\n style={{\n fontWeight: \"600\",\n marginBottom: 4,\n }}\n >\n Copilot Runtime Error:{\" \"}\n <span style={{ fontFamily: \"monospace\", fontWeight: \"normal\" }}>{code}</span>\n </div>\n )}\n <Streamdown>{message}</Streamdown>\n </div>\n );\n });\n return (\n <div\n style={{\n fontSize: \"13px\",\n maxWidth: \"600px\",\n }}\n >\n {errorsToRender}\n <div style={{ fontSize: \"11px\", opacity: 0.75 }}>\n NOTE: This error only displays during local development.\n </div>\n </div>\n );\n}\n\nexport function useErrorToast() {\n const { addToast } = useToast();\n\n return useCallback(\n (errors: (Error | GraphQLError)[]) => {\n const errorId = errors\n .map((err) => {\n const message =\n \"extensions\" in err\n ? (err.extensions?.originalError as any)?.message || err.message\n : err.message;\n const stack = err.stack || \"\";\n return btoa(message + stack).slice(0, 32); // Create hash from message + stack\n })\n .join(\"|\");\n\n addToast({\n type: \"error\",\n id: errorId, // Toast libraries typically dedupe by id\n message: <ErrorToast errors={errors} />,\n });\n },\n [addToast],\n );\n}\n\nexport function useAsyncCallback<T extends (...args: any[]) => Promise<any>>(\n callback: T,\n deps: Parameters<typeof useCallback>[1],\n) {\n const addErrorToast = useErrorToast();\n return useCallback(async (...args: Parameters<T>) => {\n try {\n return await callback(...args);\n } catch (error) {\n console.error(\"Error in async callback:\", error);\n // @ts-ignore\n addErrorToast([error]);\n throw error;\n }\n }, deps);\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAgB,mBAAmB;AAInC,SAAS,kBAAkB;AAsBnB,cAGE,YAHF;AAfD,SAAS,WAAW,EAAE,OAAO,GAAyC;AAC3E,QAAM,iBAAiB,OAAO,IAAI,CAAC,OAAO,QAAQ;AAZpD;AAaI,UAAM,gBACJ,gBAAgB,SAAS,WAAM,eAAN,mBAAkB,gBAA8C,CAAC;AAC5F,UAAM,WAAU,oDAAe,YAAf,YAA0B,MAAM;AAChD,UAAM,OAAO,gBAAgB,SAAS,WAAM,eAAN,mBAAkB,OAAkB;AAE1E,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO;AAAA,UACL,WAAW,QAAQ,IAAI,IAAI;AAAA,UAC3B,cAAc;AAAA,QAChB;AAAA,QAEA;AAAA,8BAAC,uBAAoB,OAAO,EAAE,cAAc,EAAE,GAAG;AAAA,UAEhD,QACC;AAAA,YAAC;AA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AAC,KAAK,CAAC;AACrB,YAAM;AAAA,IACR;AAAA,EACF,IAAG,IAAI;AACT;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|