@copilotkit/react-core 0.18.0-alpha.0 → 0.18.0-alpha.2
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/.turbo/turbo-build.log +179 -117
- package/CHANGELOG.md +25 -1
- package/dist/{chunk-6A4PCNMZ.mjs → chunk-4CFJ6A6A.mjs} +4 -10
- package/dist/chunk-4CFJ6A6A.mjs.map +1 -0
- package/dist/{chunk-SFQOMKM2.mjs → chunk-5GS7FQPW.mjs} +13 -9
- package/dist/chunk-5GS7FQPW.mjs.map +1 -0
- package/dist/{chunk-FP4EXCGS.mjs → chunk-DGUVNY3V.mjs} +2 -2
- package/dist/chunk-DGUVNY3V.mjs.map +1 -0
- package/dist/{chunk-QTET3FBV.mjs → chunk-GBZZPQ5X.mjs} +11 -38
- package/dist/chunk-GBZZPQ5X.mjs.map +1 -0
- package/dist/chunk-IQEWY7P4.mjs +102 -0
- package/dist/chunk-IQEWY7P4.mjs.map +1 -0
- package/dist/{chunk-7P4OYNP3.mjs → chunk-IQH5AQQC.mjs} +2 -2
- package/dist/chunk-UAKLDQMP.mjs +61 -0
- package/dist/chunk-UAKLDQMP.mjs.map +1 -0
- package/dist/{chunk-TU4DNDO7.mjs → chunk-VP2EU4US.mjs} +3 -3
- package/dist/{chunk-HW5IH6PV.mjs → chunk-YOXWT7I6.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit-props.d.ts +39 -0
- package/dist/components/copilot-provider/copilotkit-props.js +4 -0
- package/dist/components/copilot-provider/copilotkit-props.mjs +3 -0
- package/dist/components/copilot-provider/{copilot-provider.d.ts → copilotkit.d.ts} +9 -15
- package/dist/components/copilot-provider/copilotkit.js +426 -0
- package/dist/components/copilot-provider/copilotkit.js.map +1 -0
- package/dist/components/copilot-provider/copilotkit.mjs +8 -0
- package/dist/components/copilot-provider/index.d.ts +2 -8
- package/dist/components/copilot-provider/index.js +426 -0
- package/dist/components/copilot-provider/index.js.map +1 -0
- package/dist/components/copilot-provider/index.mjs +2 -2
- package/dist/components/copilot-provider/standard-copilot-api-config.d.ts +2 -4
- package/dist/components/copilot-provider/standard-copilot-api-config.js +15 -0
- package/dist/components/copilot-provider/standard-copilot-api-config.js.map +1 -0
- package/dist/components/index.d.ts +2 -8
- package/dist/components/index.js +426 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +2 -2
- package/dist/context/copilot-context.d.ts +3 -5
- package/dist/context/copilot-context.js +47 -0
- package/dist/context/copilot-context.js.map +1 -0
- package/dist/context/copilot-context.mjs +1 -1
- package/dist/context/index.d.ts +2 -4
- package/dist/context/index.js +47 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/index.mjs +1 -1
- package/dist/hooks/index.d.ts +3 -4
- package/dist/hooks/index.js +358 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +8 -9
- package/dist/hooks/use-chat.d.ts +2 -4
- package/dist/hooks/use-chat.js +186 -0
- package/dist/hooks/use-chat.js.map +1 -0
- package/dist/hooks/use-chat.mjs +2 -3
- package/dist/hooks/use-copilot-chat.d.ts +7 -7
- package/dist/hooks/use-copilot-chat.js +313 -0
- package/dist/hooks/use-copilot-chat.js.map +1 -0
- package/dist/hooks/use-copilot-chat.mjs +5 -6
- package/dist/hooks/use-flat-category-store.js +72 -0
- package/dist/hooks/use-flat-category-store.js.map +1 -0
- package/dist/hooks/use-make-copilot-actionable.d.ts +1 -1
- package/dist/hooks/use-make-copilot-actionable.js +67 -0
- package/dist/hooks/use-make-copilot-actionable.js.map +1 -0
- package/dist/hooks/use-make-copilot-actionable.mjs +2 -2
- package/dist/hooks/use-make-copilot-document-readable.js +61 -0
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -0
- package/dist/hooks/use-make-copilot-document-readable.mjs +2 -2
- package/dist/hooks/use-make-copilot-readable.js +61 -0
- package/dist/hooks/use-make-copilot-readable.js.map +1 -0
- package/dist/hooks/use-make-copilot-readable.mjs +2 -2
- package/dist/hooks/use-tree.js +155 -0
- package/dist/hooks/use-tree.js.map +1 -0
- package/dist/index.d.ts +5 -9
- package/dist/index.js +838 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +9 -12
- package/dist/openai-assistants/hooks/index.js +225 -0
- package/dist/openai-assistants/hooks/index.js.map +1 -0
- package/dist/openai-assistants/hooks/index.mjs +3 -3
- package/dist/openai-assistants/hooks/use-assistants.js +129 -0
- package/dist/openai-assistants/hooks/use-assistants.js.map +1 -0
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.js +226 -0
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.js.map +1 -0
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.mjs +3 -3
- package/dist/openai-assistants/index.js +226 -0
- package/dist/openai-assistants/index.js.map +1 -0
- package/dist/openai-assistants/index.mjs +3 -3
- package/dist/openai-assistants/utils/index.js +49 -0
- package/dist/openai-assistants/utils/index.js.map +1 -0
- package/dist/openai-assistants/utils/process-message-stream.js +49 -0
- package/dist/openai-assistants/utils/process-message-stream.js.map +1 -0
- package/dist/types/document-pointer.js +4 -0
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.js +4 -0
- package/dist/types/system-message.d.ts +3 -0
- package/dist/types/system-message.js +4 -0
- package/dist/types/system-message.mjs +3 -0
- package/dist/utils/fetch-chat-completion.d.ts +28 -0
- package/dist/utils/fetch-chat-completion.js +103 -0
- package/dist/utils/fetch-chat-completion.js.map +1 -0
- package/dist/utils/fetch-chat-completion.mjs +4 -0
- package/dist/utils/utils.js +4 -0
- package/dist/utils/utils.test.js +10 -0
- package/dist/utils/utils.test.js.map +1 -0
- package/package.json +8 -8
- package/src/components/copilot-provider/copilotkit-props.tsx +42 -0
- package/src/components/copilot-provider/{copilot-provider.tsx → copilotkit.tsx} +22 -57
- package/src/components/copilot-provider/index.ts +2 -6
- package/src/context/copilot-context.tsx +5 -13
- package/src/hooks/use-chat.ts +54 -72
- package/src/hooks/use-copilot-chat.ts +16 -9
- package/src/hooks/use-make-copilot-actionable.ts +1 -1
- package/src/index.tsx +6 -1
- package/src/types/index.ts +1 -3
- package/src/types/system-message.ts +4 -0
- package/src/utils/fetch-chat-completion.ts +95 -0
- package/tsup.config.ts +1 -2
- package/dist/chunk-6A4PCNMZ.mjs.map +0 -1
- package/dist/chunk-6SOQYBNX.mjs +0 -44
- package/dist/chunk-6SOQYBNX.mjs.map +0 -1
- package/dist/chunk-FP4EXCGS.mjs.map +0 -1
- package/dist/chunk-LMZN4NSM.mjs +0 -113
- package/dist/chunk-LMZN4NSM.mjs.map +0 -1
- package/dist/chunk-PUFR5OAI.mjs +0 -3
- package/dist/chunk-QTET3FBV.mjs.map +0 -1
- package/dist/chunk-SFQOMKM2.mjs.map +0 -1
- package/dist/chunk-TKXPMMND.mjs +0 -177
- package/dist/chunk-TKXPMMND.mjs.map +0 -1
- package/dist/chunk-VK25FIML.mjs +0 -144
- package/dist/chunk-VK25FIML.mjs.map +0 -1
- package/dist/components/copilot-provider/copilot-provider-props.d.ts +0 -50
- package/dist/components/copilot-provider/copilot-provider-props.mjs +0 -3
- package/dist/components/copilot-provider/copilot-provider.mjs +0 -8
- package/dist/openai/chat-completion-client.d.ts +0 -52
- package/dist/openai/chat-completion-client.mjs +0 -5
- package/dist/openai/chat-completion-stream.d.ts +0 -21
- package/dist/openai/chat-completion-stream.mjs +0 -5
- package/dist/openai/chat-completion-transport.d.ts +0 -38
- package/dist/openai/chat-completion-transport.mjs +0 -4
- package/dist/openai/index.d.ts +0 -10
- package/dist/openai/index.mjs +0 -6
- package/dist/types/annotated-function.d.ts +0 -24
- package/dist/types/annotated-function.mjs +0 -3
- package/dist/types/base.d.ts +0 -56
- package/dist/types/base.mjs +0 -3
- package/dist/types/message.d.ts +0 -2
- package/dist/types/message.mjs +0 -3
- package/dist/types/message.mjs.map +0 -1
- package/src/components/copilot-provider/copilot-provider-props.tsx +0 -50
- package/src/openai/chat-completion-client.ts +0 -229
- package/src/openai/chat-completion-stream.ts +0 -54
- package/src/openai/chat-completion-transport.ts +0 -186
- package/src/openai/index.tsx +0 -5
- package/src/types/annotated-function.ts +0 -27
- package/src/types/base.ts +0 -61
- package/src/types/message.ts +0 -0
- /package/dist/{chunk-7P4OYNP3.mjs.map → chunk-IQH5AQQC.mjs.map} +0 -0
- /package/dist/{chunk-TU4DNDO7.mjs.map → chunk-VP2EU4US.mjs.map} +0 -0
- /package/dist/{chunk-HW5IH6PV.mjs.map → chunk-YOXWT7I6.mjs.map} +0 -0
- /package/dist/{chunk-PUFR5OAI.mjs.map → components/copilot-provider/copilotkit-props.js.map} +0 -0
- /package/dist/components/copilot-provider/{copilot-provider-props.mjs.map → copilotkit-props.mjs.map} +0 -0
- /package/dist/components/copilot-provider/{copilot-provider.mjs.map → copilotkit.mjs.map} +0 -0
- /package/dist/{openai/chat-completion-client.mjs.map → types/document-pointer.js.map} +0 -0
- /package/dist/{openai/chat-completion-stream.mjs.map → types/index.js.map} +0 -0
- /package/dist/{openai/chat-completion-transport.mjs.map → types/system-message.js.map} +0 -0
- /package/dist/{openai/index.mjs.map → types/system-message.mjs.map} +0 -0
- /package/dist/{types/annotated-function.mjs.map → utils/fetch-chat-completion.mjs.map} +0 -0
- /package/dist/{types/base.mjs.map → utils/utils.js.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,185 +1,247 @@
|
|
|
1
1
|
|
|
2
|
-
> @copilotkit/react-core@0.
|
|
3
|
-
> tsup --treeshake
|
|
2
|
+
> @copilotkit/react-core@0.18.0-alpha.0 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core
|
|
3
|
+
> tsup --treeshake --clean
|
|
4
4
|
|
|
5
|
-
CLI Building entry: src/index.tsx, src/
|
|
5
|
+
CLI Building entry: src/index.tsx, src/components/index.ts, src/context/copilot-context.tsx, src/context/index.ts, src/hooks/index.ts, src/hooks/use-chat.ts, src/hooks/use-copilot-chat.ts, src/hooks/use-flat-category-store.ts, src/hooks/use-make-copilot-actionable.ts, src/hooks/use-make-copilot-document-readable.ts, src/hooks/use-make-copilot-readable.ts, src/hooks/use-tree.ts, src/openai-assistants/index.ts, src/types/document-pointer.ts, src/types/index.ts, src/types/system-message.ts, src/utils/fetch-chat-completion.ts, src/utils/utils.test.ts, src/utils/utils.ts, src/components/copilot-provider/copilotkit-props.tsx, src/components/copilot-provider/copilotkit.tsx, src/components/copilot-provider/index.ts, src/components/copilot-provider/standard-copilot-api-config.tsx, src/openai-assistants/hooks/index.ts, src/openai-assistants/hooks/use-assistants.ts, src/openai-assistants/hooks/use-copilot-chat-v2.ts, src/openai-assistants/utils/index.ts, src/openai-assistants/utils/process-message-stream.ts
|
|
6
6
|
CLI Using tsconfig: tsconfig.json
|
|
7
7
|
CLI tsup v6.7.0
|
|
8
8
|
CLI Using tsup config: /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core/tsup.config.ts
|
|
9
9
|
CLI Target: es6
|
|
10
10
|
CLI Cleaning output folder
|
|
11
11
|
ESM Build start
|
|
12
|
-
|
|
13
|
-
Module level directives cause errors when bundled, "use client" in "dist/components/copilot-provider/copilot-provider.mjs" was ignored.
|
|
12
|
+
CJS Build start
|
|
14
13
|
Module level directives cause errors when bundled, "use client" in "dist/openai-assistants/hooks/use-assistants.mjs" was ignored.
|
|
14
|
+
Module level directives cause errors when bundled, "use client" in "dist/components/copilot-provider/copilotkit-props.mjs" was ignored.
|
|
15
|
+
Module level directives cause errors when bundled, "use client" in "dist/components/copilot-provider/copilotkit.mjs" was ignored.
|
|
15
16
|
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-actionable.mjs" was ignored.
|
|
16
17
|
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-document-readable.mjs" was ignored.
|
|
17
18
|
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-readable.mjs" was ignored.
|
|
18
19
|
Module level directives cause errors when bundled, "use client" in "dist/context/copilot-context.mjs" was ignored.
|
|
19
|
-
Generated an empty chunk: "copilot-provider-props".
|
|
20
|
-
Generated an empty chunk: "annotated-function".
|
|
21
|
-
Generated an empty chunk: "base".
|
|
22
|
-
Generated an empty chunk: "document-pointer".
|
|
23
|
-
Generated an empty chunk: "message".
|
|
24
20
|
Generated an empty chunk: "utils".
|
|
21
|
+
Generated an empty chunk: "copilotkit-props".
|
|
22
|
+
Generated an empty chunk: "document-pointer".
|
|
23
|
+
Generated an empty chunk: "system-message".
|
|
25
24
|
Generated an empty chunk: "chunk-7GFKOIO7".
|
|
26
25
|
Generated an empty chunk: "chunk-BABVSMJR".
|
|
27
26
|
Generated an empty chunk: "chunk-FRAKUJWH".
|
|
28
27
|
Generated an empty chunk: "chunk-EFZPSZWO".
|
|
29
|
-
Generated an empty chunk: "chunk-PUFR5OAI".
|
|
30
28
|
Generated an empty chunk: "chunk-VNRDQJXW".
|
|
31
29
|
Generated an empty chunk: "chunk-5UGLWBZJ".
|
|
32
30
|
Generated an empty chunk: "chunk-JD7BAH7U".
|
|
33
31
|
Generated an empty chunk: "chunk-SPCZTZCY".
|
|
32
|
+
Module level directives cause errors when bundled, "use client" in "dist/context/copilot-context.js" was ignored.
|
|
33
|
+
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-actionable.js" was ignored.
|
|
34
|
+
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-document-readable.js" was ignored.
|
|
35
|
+
Module level directives cause errors when bundled, "use client" in "dist/hooks/use-make-copilot-readable.js" was ignored.
|
|
36
|
+
Module level directives cause errors when bundled, "use client" in "dist/components/copilot-provider/copilotkit-props.js" was ignored.
|
|
37
|
+
Module level directives cause errors when bundled, "use client" in "dist/components/copilot-provider/copilotkit.js" was ignored.
|
|
38
|
+
Module level directives cause errors when bundled, "use client" in "dist/openai-assistants/hooks/use-assistants.js" was ignored.
|
|
39
|
+
"useCallback" is imported from external module "react" but never used in "dist/hooks/index.js".
|
|
40
|
+
"decodeChatCompletionAsText" and "annotatedFunctionToChatCompletionFunction" are imported from external module "@copilotkit/shared" but never used in "dist/hooks/index.js".
|
|
41
|
+
"jsx" is imported from external module "react/jsx-runtime" but never used in "dist/hooks/index.js".
|
|
42
|
+
"decodeChatCompletionAsText" is imported from external module "@copilotkit/shared" but never used in "dist/hooks/use-chat.js".
|
|
43
|
+
"useCallback" is imported from external module "react" but never used in "dist/hooks/use-copilot-chat.js".
|
|
44
|
+
"decodeChatCompletionAsText" and "annotatedFunctionToChatCompletionFunction" are imported from external module "@copilotkit/shared" but never used in "dist/hooks/use-copilot-chat.js".
|
|
45
|
+
"jsx" is imported from external module "react/jsx-runtime" but never used in "dist/hooks/use-copilot-chat.js".
|
|
46
|
+
"useCallback" is imported from external module "react" but never used in "dist/openai-assistants/index.js".
|
|
47
|
+
"annotatedFunctionToChatCompletionFunction" is imported from external module "@copilotkit/shared" but never used in "dist/openai-assistants/index.js".
|
|
48
|
+
"jsx" is imported from external module "react/jsx-runtime" but never used in "dist/openai-assistants/index.js".
|
|
49
|
+
"useCallback" is imported from external module "react" but never used in "dist/openai-assistants/hooks/index.js".
|
|
50
|
+
"annotatedFunctionToChatCompletionFunction" is imported from external module "@copilotkit/shared" but never used in "dist/openai-assistants/hooks/index.js".
|
|
51
|
+
"jsx" is imported from external module "react/jsx-runtime" but never used in "dist/openai-assistants/hooks/index.js".
|
|
52
|
+
"useCallback" is imported from external module "react" but never used in "dist/openai-assistants/hooks/use-copilot-chat-v2.js".
|
|
53
|
+
"annotatedFunctionToChatCompletionFunction" is imported from external module "@copilotkit/shared" but never used in "dist/openai-assistants/hooks/use-copilot-chat-v2.js".
|
|
54
|
+
"jsx" is imported from external module "react/jsx-runtime" but never used in "dist/openai-assistants/hooks/use-copilot-chat-v2.js".
|
|
55
|
+
Generated an empty chunk: "document-pointer".
|
|
56
|
+
Generated an empty chunk: "index".
|
|
57
|
+
Generated an empty chunk: "system-message".
|
|
58
|
+
Generated an empty chunk: "utils".
|
|
59
|
+
Generated an empty chunk: "copilotkit-props".
|
|
60
|
+
DTS Build start
|
|
61
|
+
CJS dist/components/copilot-provider/standard-copilot-api-config.js 486.00 B
|
|
62
|
+
CJS dist/openai-assistants/utils/index.js 1.32 KB
|
|
63
|
+
CJS dist/openai-assistants/hooks/index.js 7.32 KB
|
|
64
|
+
CJS dist/types/document-pointer.js 91.00 B
|
|
65
|
+
CJS dist/types/system-message.js 89.00 B
|
|
66
|
+
CJS dist/utils/utils.test.js 216.00 B
|
|
67
|
+
CJS dist/components/copilot-provider/copilotkit-props.js 91.00 B
|
|
68
|
+
CJS dist/utils/utils.js 80.00 B
|
|
69
|
+
CJS dist/index.js 27.19 KB
|
|
70
|
+
CJS dist/context/copilot-context.js 1.39 KB
|
|
71
|
+
CJS dist/context/index.js 1.38 KB
|
|
72
|
+
CJS dist/hooks/index.js 12.22 KB
|
|
73
|
+
CJS dist/hooks/use-chat.js 6.22 KB
|
|
74
|
+
CJS dist/openai-assistants/utils/process-message-stream.js 1.34 KB
|
|
75
|
+
CJS dist/hooks/use-copilot-chat.js 10.52 KB
|
|
76
|
+
CJS dist/hooks/use-make-copilot-actionable.js 2.15 KB
|
|
77
|
+
CJS dist/hooks/use-flat-category-store.js 1.91 KB
|
|
78
|
+
CJS dist/hooks/use-make-copilot-readable.js 1.87 KB
|
|
79
|
+
CJS dist/types/index.js 80.00 B
|
|
80
|
+
CJS dist/hooks/use-make-copilot-document-readable.js 1.94 KB
|
|
81
|
+
CJS dist/hooks/use-tree.js 4.68 KB
|
|
82
|
+
CJS dist/utils/fetch-chat-completion.js 3.74 KB
|
|
83
|
+
CJS dist/components/copilot-provider/index.js 12.86 KB
|
|
84
|
+
CJS dist/components/copilot-provider/copilotkit.js 12.87 KB
|
|
85
|
+
CJS dist/openai-assistants/hooks/use-assistants.js 3.66 KB
|
|
86
|
+
CJS dist/openai-assistants/index.js 7.37 KB
|
|
87
|
+
CJS dist/components/index.js 12.86 KB
|
|
88
|
+
CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js 7.39 KB
|
|
89
|
+
CJS dist/components/copilot-provider/standard-copilot-api-config.js.map 1.12 KB
|
|
90
|
+
CJS dist/openai-assistants/utils/index.js.map 1.28 KB
|
|
91
|
+
CJS dist/openai-assistants/hooks/index.js.map 20.01 KB
|
|
92
|
+
CJS dist/types/document-pointer.js.map 51.00 B
|
|
93
|
+
CJS dist/types/system-message.js.map 51.00 B
|
|
94
|
+
CJS dist/utils/utils.test.js.map 351.00 B
|
|
95
|
+
CJS dist/components/copilot-provider/copilotkit-props.js.map 51.00 B
|
|
96
|
+
CJS dist/utils/utils.js.map 51.00 B
|
|
97
|
+
CJS dist/index.js.map 56.50 KB
|
|
98
|
+
CJS dist/context/index.js.map 4.06 KB
|
|
99
|
+
CJS dist/context/copilot-context.js.map 4.06 KB
|
|
100
|
+
CJS dist/hooks/use-chat.js.map 11.51 KB
|
|
101
|
+
CJS dist/hooks/index.js.map 31.39 KB
|
|
102
|
+
CJS dist/openai-assistants/utils/process-message-stream.js.map 1.28 KB
|
|
103
|
+
CJS dist/hooks/use-copilot-chat.js.map 26.91 KB
|
|
104
|
+
CJS dist/hooks/use-make-copilot-actionable.js.map 5.66 KB
|
|
105
|
+
CJS dist/hooks/use-flat-category-store.js.map 4.21 KB
|
|
106
|
+
CJS dist/types/index.js.map 51.00 B
|
|
107
|
+
CJS dist/hooks/use-make-copilot-readable.js.map 5.46 KB
|
|
108
|
+
CJS dist/hooks/use-make-copilot-document-readable.js.map 5.42 KB
|
|
109
|
+
CJS dist/hooks/use-tree.js.map 8.28 KB
|
|
110
|
+
CJS dist/utils/fetch-chat-completion.js.map 4.03 KB
|
|
111
|
+
CJS dist/components/copilot-provider/index.js.map 26.82 KB
|
|
112
|
+
CJS dist/components/copilot-provider/copilotkit.js.map 26.82 KB
|
|
113
|
+
CJS dist/openai-assistants/hooks/use-assistants.js.map 5.88 KB
|
|
114
|
+
CJS dist/openai-assistants/index.js.map 20.00 KB
|
|
115
|
+
CJS dist/components/index.js.map 26.80 KB
|
|
116
|
+
CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 20.01 KB
|
|
117
|
+
CJS ⚡️ Build success in 295ms
|
|
34
118
|
ESM dist/chunk-7GFKOIO7.mjs 76.00 B
|
|
119
|
+
ESM dist/utils/fetch-chat-completion.mjs 241.00 B
|
|
120
|
+
ESM dist/hooks/use-make-copilot-actionable.mjs 218.00 B
|
|
35
121
|
ESM dist/openai-assistants/index.mjs 570.00 B
|
|
36
|
-
ESM dist/openai/chat-completion-client.mjs 209.00 B
|
|
37
|
-
ESM dist/context/copilot-context.mjs 164.00 B
|
|
38
|
-
ESM dist/components/index.mjs 380.00 B
|
|
39
122
|
ESM dist/types/index.mjs 98.00 B
|
|
40
|
-
ESM dist/
|
|
41
|
-
ESM dist/
|
|
42
|
-
ESM dist/chunk-
|
|
123
|
+
ESM dist/components/index.mjs 375.00 B
|
|
124
|
+
ESM dist/context/copilot-context.mjs 164.00 B
|
|
125
|
+
ESM dist/chunk-5UGLWBZJ.mjs 76.00 B
|
|
43
126
|
ESM dist/chunk-FRAKUJWH.mjs 76.00 B
|
|
44
|
-
ESM dist/chunk-
|
|
127
|
+
ESM dist/chunk-F2JIAPZQ.mjs 435.00 B
|
|
45
128
|
ESM dist/chunk-VNRDQJXW.mjs 76.00 B
|
|
46
|
-
ESM dist/chunk-5UGLWBZJ.mjs 76.00 B
|
|
47
|
-
ESM dist/chunk-JD7BAH7U.mjs 76.00 B
|
|
48
129
|
ESM dist/chunk-SPCZTZCY.mjs 76.00 B
|
|
49
130
|
ESM dist/chunk-MRXNTQOX.mjs 1.92 KB
|
|
50
|
-
ESM dist/
|
|
131
|
+
ESM dist/hooks/use-tree.mjs 170.00 B
|
|
51
132
|
ESM dist/hooks/use-make-copilot-document-readable.mjs 231.00 B
|
|
133
|
+
ESM dist/chunk-JD7BAH7U.mjs 76.00 B
|
|
52
134
|
ESM dist/hooks/use-make-copilot-readable.mjs 214.00 B
|
|
53
|
-
ESM dist/openai/chat-completion-stream.mjs 209.00 B
|
|
54
|
-
ESM dist/chunk-TU4DNDO7.mjs 4.33 KB
|
|
55
|
-
ESM dist/index.mjs 1.11 KB
|
|
56
135
|
ESM dist/chunk-MZ5UN3BY.mjs 830.00 B
|
|
57
|
-
ESM dist/
|
|
58
|
-
ESM dist/
|
|
59
|
-
ESM dist/
|
|
60
|
-
ESM dist/
|
|
61
|
-
ESM dist/
|
|
62
|
-
ESM dist/
|
|
63
|
-
ESM dist/chunk-
|
|
64
|
-
ESM dist/chunk-
|
|
65
|
-
ESM dist/chunk-
|
|
66
|
-
ESM dist/
|
|
67
|
-
ESM dist/chunk-
|
|
68
|
-
ESM dist/chunk-
|
|
69
|
-
ESM dist/chunk-VK25FIML.mjs 4.48 KB
|
|
136
|
+
ESM dist/hooks/index.mjs 676.00 B
|
|
137
|
+
ESM dist/index.mjs 1.08 KB
|
|
138
|
+
ESM dist/chunk-DGUVNY3V.mjs 954.00 B
|
|
139
|
+
ESM dist/hooks/use-chat.mjs 182.00 B
|
|
140
|
+
ESM dist/hooks/use-copilot-chat.mjs 475.00 B
|
|
141
|
+
ESM dist/chunk-5GS7FQPW.mjs 2.88 KB
|
|
142
|
+
ESM dist/chunk-YOXWT7I6.mjs 626.00 B
|
|
143
|
+
ESM dist/chunk-GBZZPQ5X.mjs 4.41 KB
|
|
144
|
+
ESM dist/chunk-4CFJ6A6A.mjs 1.24 KB
|
|
145
|
+
ESM dist/chunk-IQEWY7P4.mjs 3.33 KB
|
|
146
|
+
ESM dist/chunk-VUY2K2DI.mjs 3.89 KB
|
|
147
|
+
ESM dist/chunk-UAKLDQMP.mjs 2.35 KB
|
|
70
148
|
ESM dist/hooks/use-flat-category-store.mjs 200.00 B
|
|
71
149
|
ESM dist/chunk-YULKJPY3.mjs 1.87 KB
|
|
72
|
-
ESM dist/
|
|
73
|
-
ESM dist/chunk-
|
|
74
|
-
ESM dist/
|
|
75
|
-
ESM dist/
|
|
76
|
-
ESM dist/
|
|
150
|
+
ESM dist/context/index.mjs 186.00 B
|
|
151
|
+
ESM dist/chunk-BABVSMJR.mjs 76.00 B
|
|
152
|
+
ESM dist/chunk-IQH5AQQC.mjs 677.00 B
|
|
153
|
+
ESM dist/chunk-EFZPSZWO.mjs 76.00 B
|
|
154
|
+
ESM dist/chunk-VP2EU4US.mjs 4.33 KB
|
|
77
155
|
ESM dist/utils/utils.test.mjs 202.00 B
|
|
78
|
-
ESM dist/
|
|
156
|
+
ESM dist/types/document-pointer.mjs 78.00 B
|
|
157
|
+
ESM dist/types/system-message.mjs 76.00 B
|
|
158
|
+
ESM dist/openai-assistants/hooks/use-assistants.mjs 2.55 KB
|
|
159
|
+
ESM dist/openai-assistants/utils/index.mjs 201.00 B
|
|
79
160
|
ESM dist/openai-assistants/utils/process-message-stream.mjs 183.00 B
|
|
161
|
+
ESM dist/components/copilot-provider/copilotkit.mjs 334.00 B
|
|
80
162
|
ESM dist/openai-assistants/hooks/index.mjs 547.00 B
|
|
81
|
-
ESM dist/
|
|
82
|
-
ESM dist/
|
|
83
|
-
ESM dist/utils/utils.mjs 67.00 B
|
|
84
|
-
ESM dist/types/base.mjs 66.00 B
|
|
85
|
-
ESM dist/components/copilot-provider/copilot-provider.mjs 345.00 B
|
|
163
|
+
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 548.00 B
|
|
164
|
+
ESM dist/components/copilot-provider/index.mjs 364.00 B
|
|
86
165
|
ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 192.00 B
|
|
87
|
-
ESM dist/
|
|
88
|
-
ESM dist/components/copilot-provider/
|
|
89
|
-
ESM dist/openai-assistants/utils/index.mjs 201.00 B
|
|
90
|
-
ESM dist/openai-assistants/hooks/use-assistants.mjs 2.55 KB
|
|
166
|
+
ESM dist/utils/utils.mjs 67.00 B
|
|
167
|
+
ESM dist/components/copilot-provider/copilotkit-props.mjs 78.00 B
|
|
91
168
|
ESM dist/chunk-7GFKOIO7.mjs.map 51.00 B
|
|
92
|
-
ESM dist/
|
|
93
|
-
ESM dist/
|
|
169
|
+
ESM dist/utils/fetch-chat-completion.mjs.map 51.00 B
|
|
170
|
+
ESM dist/hooks/use-make-copilot-actionable.mjs.map 51.00 B
|
|
94
171
|
ESM dist/openai-assistants/index.mjs.map 51.00 B
|
|
95
|
-
ESM dist/
|
|
172
|
+
ESM dist/types/index.mjs.map 51.00 B
|
|
96
173
|
ESM dist/components/index.mjs.map 51.00 B
|
|
97
|
-
ESM dist/
|
|
98
|
-
ESM dist/chunk-BABVSMJR.mjs.map 51.00 B
|
|
99
|
-
ESM dist/chunk-PUFR5OAI.mjs.map 51.00 B
|
|
100
|
-
ESM dist/chunk-FRAKUJWH.mjs.map 51.00 B
|
|
101
|
-
ESM dist/chunk-EFZPSZWO.mjs.map 51.00 B
|
|
102
|
-
ESM dist/chunk-VNRDQJXW.mjs.map 51.00 B
|
|
174
|
+
ESM dist/context/copilot-context.mjs.map 51.00 B
|
|
103
175
|
ESM dist/chunk-5UGLWBZJ.mjs.map 51.00 B
|
|
176
|
+
ESM dist/chunk-FRAKUJWH.mjs.map 51.00 B
|
|
104
177
|
ESM dist/chunk-SPCZTZCY.mjs.map 51.00 B
|
|
105
|
-
ESM dist/chunk-
|
|
106
|
-
ESM dist/hooks/use-make-copilot-readable.mjs.map
|
|
107
|
-
ESM dist/openai/chat-completion-stream.mjs.map 51.00 B
|
|
108
|
-
ESM dist/chunk-TU4DNDO7.mjs.map 7.90 KB
|
|
109
|
-
ESM dist/index.mjs.map 51.00 B
|
|
178
|
+
ESM dist/chunk-VNRDQJXW.mjs.map 51.00 B
|
|
179
|
+
ESM dist/hooks/use-make-copilot-document-readable.mjs.map 51.00 B
|
|
110
180
|
ESM dist/chunk-MZ5UN3BY.mjs.map 1.26 KB
|
|
111
|
-
ESM dist/
|
|
112
|
-
ESM dist/
|
|
113
|
-
ESM dist/chunk-
|
|
181
|
+
ESM dist/hooks/index.mjs.map 51.00 B
|
|
182
|
+
ESM dist/index.mjs.map 51.00 B
|
|
183
|
+
ESM dist/chunk-DGUVNY3V.mjs.map 1.66 KB
|
|
114
184
|
ESM dist/hooks/use-chat.mjs.map 51.00 B
|
|
185
|
+
ESM dist/hooks/use-copilot-chat.mjs.map 51.00 B
|
|
186
|
+
ESM dist/chunk-5GS7FQPW.mjs.map 4.59 KB
|
|
187
|
+
ESM dist/chunk-YOXWT7I6.mjs.map 1.47 KB
|
|
188
|
+
ESM dist/chunk-GBZZPQ5X.mjs.map 9.29 KB
|
|
189
|
+
ESM dist/chunk-4CFJ6A6A.mjs.map 4.04 KB
|
|
115
190
|
ESM dist/hooks/use-tree.mjs.map 51.00 B
|
|
116
|
-
ESM dist/chunk-
|
|
117
|
-
ESM dist/chunk-
|
|
118
|
-
ESM dist/context/index.mjs.map 51.00 B
|
|
119
|
-
ESM dist/chunk-LMZN4NSM.mjs.map 8.47 KB
|
|
120
|
-
ESM dist/chunk-TKXPMMND.mjs.map 9.93 KB
|
|
121
|
-
ESM dist/chunk-VK25FIML.mjs.map 7.84 KB
|
|
191
|
+
ESM dist/chunk-IQEWY7P4.mjs.map 7.81 KB
|
|
192
|
+
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
122
193
|
ESM dist/hooks/use-flat-category-store.mjs.map 51.00 B
|
|
194
|
+
ESM dist/chunk-UAKLDQMP.mjs.map 3.99 KB
|
|
195
|
+
ESM dist/context/index.mjs.map 51.00 B
|
|
196
|
+
ESM dist/chunk-BABVSMJR.mjs.map 51.00 B
|
|
197
|
+
ESM dist/chunk-IQH5AQQC.mjs.map 1.42 KB
|
|
198
|
+
ESM dist/chunk-JD7BAH7U.mjs.map 51.00 B
|
|
123
199
|
ESM dist/chunk-YULKJPY3.mjs.map 4.21 KB
|
|
124
|
-
ESM dist/
|
|
125
|
-
ESM dist/
|
|
126
|
-
ESM dist/hooks/use-make-copilot-
|
|
200
|
+
ESM dist/chunk-EFZPSZWO.mjs.map 51.00 B
|
|
201
|
+
ESM dist/chunk-VP2EU4US.mjs.map 7.90 KB
|
|
202
|
+
ESM dist/hooks/use-make-copilot-readable.mjs.map 51.00 B
|
|
203
|
+
ESM dist/chunk-F2JIAPZQ.mjs.map 1.12 KB
|
|
127
204
|
ESM dist/chunk-VUY2K2DI.mjs.map 8.27 KB
|
|
128
|
-
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
129
|
-
ESM dist/hooks/index.mjs.map 51.00 B
|
|
130
|
-
ESM dist/chunk-6A4PCNMZ.mjs.map 4.26 KB
|
|
131
|
-
ESM dist/openai/chat-completion-transport.mjs.map 51.00 B
|
|
132
|
-
ESM dist/chunk-HW5IH6PV.mjs.map 1.47 KB
|
|
133
|
-
ESM dist/openai/index.mjs.map 51.00 B
|
|
134
205
|
ESM dist/utils/utils.test.mjs.map 351.00 B
|
|
135
|
-
ESM dist/
|
|
136
|
-
ESM dist/openai-assistants/utils/process-message-stream.mjs.map 51.00 B
|
|
137
|
-
ESM dist/chunk-JD7BAH7U.mjs.map 51.00 B
|
|
138
|
-
ESM dist/types/annotated-function.mjs.map 51.00 B
|
|
139
|
-
ESM dist/types/message.mjs.map 51.00 B
|
|
140
|
-
ESM dist/utils/utils.mjs.map 51.00 B
|
|
141
|
-
ESM dist/types/base.mjs.map 51.00 B
|
|
142
|
-
ESM dist/components/copilot-provider/copilot-provider.mjs.map 51.00 B
|
|
143
|
-
ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 51.00 B
|
|
206
|
+
ESM dist/types/system-message.mjs.map 51.00 B
|
|
144
207
|
ESM dist/types/document-pointer.mjs.map 51.00 B
|
|
145
208
|
ESM dist/openai-assistants/utils/index.mjs.map 51.00 B
|
|
146
209
|
ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.67 KB
|
|
210
|
+
ESM dist/components/copilot-provider/copilotkit.mjs.map 51.00 B
|
|
211
|
+
ESM dist/openai-assistants/utils/process-message-stream.mjs.map 51.00 B
|
|
147
212
|
ESM dist/openai-assistants/hooks/index.mjs.map 51.00 B
|
|
148
|
-
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 51.00 B
|
|
149
213
|
ESM dist/components/copilot-provider/index.mjs.map 51.00 B
|
|
150
|
-
ESM
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
DTS
|
|
156
|
-
DTS dist/
|
|
157
|
-
DTS dist/
|
|
158
|
-
DTS dist/
|
|
214
|
+
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 51.00 B
|
|
215
|
+
ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 51.00 B
|
|
216
|
+
ESM dist/components/copilot-provider/copilotkit-props.mjs.map 51.00 B
|
|
217
|
+
ESM dist/utils/utils.mjs.map 51.00 B
|
|
218
|
+
ESM ⚡️ Build success in 297ms
|
|
219
|
+
DTS ⚡️ Build success in 2566ms
|
|
220
|
+
DTS dist/index.d.ts 1.32 KB
|
|
221
|
+
DTS dist/components/copilot-provider/copilotkit.d.ts 1.26 KB
|
|
222
|
+
DTS dist/components/copilot-provider/copilotkit-props.d.ts 749.00 B
|
|
223
|
+
DTS dist/context/copilot-context.d.ts 1.85 KB
|
|
224
|
+
DTS dist/hooks/use-copilot-chat.d.ts 1.01 KB
|
|
225
|
+
DTS dist/hooks/use-make-copilot-actionable.d.ts 243.00 B
|
|
159
226
|
DTS dist/hooks/use-make-copilot-readable.d.ts 598.00 B
|
|
160
227
|
DTS dist/hooks/use-make-copilot-document-readable.d.ts 516.00 B
|
|
161
|
-
DTS dist/hooks/use-chat.d.ts 2.
|
|
162
|
-
DTS dist/types/annotated-function.d.ts 767.00 B
|
|
228
|
+
DTS dist/hooks/use-chat.d.ts 2.68 KB
|
|
163
229
|
DTS dist/types/document-pointer.d.ts 181.00 B
|
|
164
|
-
DTS dist/types/
|
|
230
|
+
DTS dist/types/system-message.d.ts 132.00 B
|
|
165
231
|
DTS dist/openai-assistants/hooks/use-copilot-chat-v2.d.ts 1.41 KB
|
|
166
232
|
DTS dist/openai-assistants/utils/process-message-stream.d.ts 196.00 B
|
|
167
|
-
DTS dist/
|
|
168
|
-
DTS dist/openai/chat-completion-transport.d.ts 1.26 KB
|
|
233
|
+
DTS dist/utils/fetch-chat-completion.d.ts 1.34 KB
|
|
169
234
|
DTS dist/hooks/use-tree.d.ts 543.00 B
|
|
170
|
-
DTS dist/
|
|
171
|
-
DTS dist/
|
|
172
|
-
DTS dist/hooks/index.d.ts
|
|
235
|
+
DTS dist/components/index.d.ts 186.00 B
|
|
236
|
+
DTS dist/context/index.d.ts 210.00 B
|
|
237
|
+
DTS dist/hooks/index.d.ts 574.00 B
|
|
173
238
|
DTS dist/hooks/use-flat-category-store.d.ts 424.00 B
|
|
174
|
-
DTS dist/openai/chat-completion-client.d.ts 1.44 KB
|
|
175
|
-
DTS dist/openai/index.d.ts 438.00 B
|
|
176
239
|
DTS dist/openai-assistants/index.d.ts 262.00 B
|
|
177
|
-
DTS dist/types/index.d.ts
|
|
178
|
-
DTS dist/types/message.d.ts 12.00 B
|
|
240
|
+
DTS dist/types/index.d.ts 118.00 B
|
|
179
241
|
DTS dist/utils/utils.test.d.ts 12.00 B
|
|
180
242
|
DTS dist/utils/utils.d.ts 12.00 B
|
|
181
|
-
DTS dist/components/copilot-provider/index.d.ts
|
|
182
|
-
DTS dist/components/copilot-provider/standard-copilot-api-config.d.ts
|
|
243
|
+
DTS dist/components/copilot-provider/index.d.ts 152.00 B
|
|
244
|
+
DTS dist/components/copilot-provider/standard-copilot-api-config.d.ts 834.00 B
|
|
183
245
|
DTS dist/openai-assistants/hooks/index.d.ts 182.00 B
|
|
184
246
|
DTS dist/openai-assistants/hooks/use-assistants.d.ts 551.00 B
|
|
185
247
|
DTS dist/openai-assistants/utils/index.d.ts 68.00 B
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 0.18.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- .2
|
|
8
|
+
- .3
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @copilotkit/shared@0.2.0-alpha.1
|
|
15
|
+
|
|
16
|
+
## 0.18.0-alpha.1
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- build naming refactor
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @copilotkit/shared@0.2.0-alpha.0
|
|
26
|
+
|
|
3
27
|
## 0.18.0-alpha.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
6
30
|
|
|
7
|
-
-
|
|
31
|
+
- New Copilot ui
|
|
8
32
|
|
|
9
33
|
## 0.17.1
|
|
10
34
|
|
|
@@ -19,14 +19,10 @@ var emptyCopilotContext = {
|
|
|
19
19
|
},
|
|
20
20
|
copilotApiConfig: new class {
|
|
21
21
|
get chatApiEndpoint() {
|
|
22
|
-
throw new Error(
|
|
23
|
-
"Remember to wrap your app in a `<CopilotProvider> {...} </CopilotProvider>` !!!"
|
|
24
|
-
);
|
|
22
|
+
throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
|
|
25
23
|
}
|
|
26
24
|
get chatApiEndpointV2() {
|
|
27
|
-
throw new Error(
|
|
28
|
-
"Remember to wrap your app in a `<CopilotProvider> {...} </CopilotProvider>` !!!"
|
|
29
|
-
);
|
|
25
|
+
throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
|
|
30
26
|
}
|
|
31
27
|
get headers() {
|
|
32
28
|
return {};
|
|
@@ -38,11 +34,9 @@ var emptyCopilotContext = {
|
|
|
38
34
|
};
|
|
39
35
|
var CopilotContext = React.createContext(emptyCopilotContext);
|
|
40
36
|
function returnAndThrowInDebug(value) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
"Remember to wrap your app in a `<CopilotProvider> {...} </CopilotProvider>` !!!"
|
|
43
|
-
);
|
|
37
|
+
throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
|
|
44
38
|
}
|
|
45
39
|
|
|
46
40
|
export { CopilotContext };
|
|
47
41
|
//# sourceMappingURL=out.js.map
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-4CFJ6A6A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context/copilot-context.tsx"],"names":[],"mappings":";;;;;AAGA,OAAO,WAAW;AAiElB,IAAM,sBAA4C;AAAA,EAChD,aAAa,CAAC;AAAA,EACd,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,uCAAuC,MAAM,sBAAsB,CAAC,CAAC;AAAA,EACrE,wBAAwB,MAAM,sBAAsB,MAAY;AAAA,EAAC,EAAC;AAAA,EAElE,kBAAkB,CAAC,WAA8B,eAC/C,sBAAsB,EAAE;AAAA,EAC1B,YAAY,MAAM;AAAA,EAClB,eAAe,MAAM;AAAA,EAAC;AAAA,EAEtB,qBAAqB,CAAC,eAAyB,sBAAsB,CAAC,CAAC;AAAA,EACvE,oBAAoB,MAAM,sBAAsB,EAAE;AAAA,EAClD,uBAAuB,MAAM;AAAA,EAAC;AAAA,EAE9B,kBAAkB,IAAK,MAAkC;AAAA,IACvD,IAAI,kBAA0B;AAC5B,YAAM,IAAI,MAAM,uEAAuE;AAAA,IACzF;AAAA,IACA,IAAI,oBAA4B;AAC9B,YAAM,IAAI,MAAM,uEAAuE;AAAA,IACzF;AAAA,IACA,IAAI,UAAkC;AACpC,aAAO,CAAC;AAAA,IACV;AAAA,IACA,IAAI,OAA4B;AAC9B,aAAO,CAAC;AAAA,IACV;AAAA,EACF,EAAG;AACL;AAEO,IAAM,iBAAiB,MAAM,cAAoC,mBAAmB;AAE3F,SAAS,sBAAyB,OAAa;AAC7C,QAAM,IAAI,MAAM,uEAAuE;AACvF,SAAO;AACT","sourcesContent":["\"use client\";\n\nimport { FunctionCallHandler, AnnotatedFunction, Function } from \"@copilotkit/shared\";\nimport React from \"react\";\nimport { TreeNodeId } from \"../hooks/use-tree\";\nimport { DocumentPointer } from \"../types\";\n\n/**\n * Interface for the configuration of the Copilot API.\n */\nexport interface CopilotApiConfig {\n /**\n * The endpoint for the chat API.\n */\n chatApiEndpoint: string;\n\n /**\n * The endpoint for the chat API v2.\n */\n chatApiEndpointV2: string;\n\n /**\n * additional headers to be sent with the request\n * @default {}\n * @example\n * ```\n * {\n * 'Authorization': 'Bearer your_token_here'\n * }\n * ```\n */\n headers: Record<string, string>;\n\n /**\n * Additional body params to be sent with the request\n * @default {}\n * @example\n * ```\n * {\n * 'message': 'Hello, world!'\n * }\n * ```\n */\n body: Record<string, any>;\n}\n\nexport interface CopilotContextParams {\n // function-calling\n entryPoints: Record<string, AnnotatedFunction<any[]>>;\n setEntryPoint: (id: string, entryPoint: AnnotatedFunction<any[]>) => void;\n removeEntryPoint: (id: string) => void;\n getChatCompletionFunctionDescriptions: () => Function[];\n getFunctionCallHandler: () => FunctionCallHandler;\n\n // text context\n addContext: (context: string, parentId?: string, categories?: string[]) => TreeNodeId;\n removeContext: (id: TreeNodeId) => void;\n getContextString: (documents: DocumentPointer[], categories: string[]) => string;\n\n // document context\n addDocumentContext: (documentPointer: DocumentPointer, categories?: string[]) => TreeNodeId;\n removeDocumentContext: (documentId: string) => void;\n getDocumentsContext: (categories: string[]) => DocumentPointer[];\n\n // api endpoints\n copilotApiConfig: CopilotApiConfig;\n}\n\nconst emptyCopilotContext: CopilotContextParams = {\n entryPoints: {},\n setEntryPoint: () => {},\n removeEntryPoint: () => {},\n getChatCompletionFunctionDescriptions: () => returnAndThrowInDebug([]),\n getFunctionCallHandler: () => returnAndThrowInDebug(async () => {}),\n\n getContextString: (documents: DocumentPointer[], categories: string[]) =>\n returnAndThrowInDebug(\"\"),\n addContext: () => \"\",\n removeContext: () => {},\n\n getDocumentsContext: (categories: string[]) => returnAndThrowInDebug([]),\n addDocumentContext: () => returnAndThrowInDebug(\"\"),\n removeDocumentContext: () => {},\n\n copilotApiConfig: new (class implements CopilotApiConfig {\n get chatApiEndpoint(): string {\n throw new Error(\"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!\");\n }\n get chatApiEndpointV2(): string {\n throw new Error(\"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!\");\n }\n get headers(): Record<string, string> {\n return {};\n }\n get body(): Record<string, any> {\n return {};\n }\n })(),\n};\n\nexport const CopilotContext = React.createContext<CopilotContextParams>(emptyCopilotContext);\n\nfunction returnAndThrowInDebug<T>(value: T): T {\n throw new Error(\"Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!\");\n return value;\n}\n"]}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defaultCopilotContextCategories } from './chunk-
|
|
2
|
-
import { CopilotContext } from './chunk-
|
|
3
|
-
import { useChat } from './chunk-
|
|
1
|
+
import { defaultCopilotContextCategories } from './chunk-GBZZPQ5X.mjs';
|
|
2
|
+
import { CopilotContext } from './chunk-4CFJ6A6A.mjs';
|
|
3
|
+
import { useChat } from './chunk-IQEWY7P4.mjs';
|
|
4
4
|
import { __objRest, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
5
5
|
import { useContext, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
function useCopilotChat(_a) {
|
|
8
8
|
var _b = _a, {
|
|
9
|
-
makeSystemMessage
|
|
9
|
+
makeSystemMessage,
|
|
10
|
+
additionalInstructions
|
|
10
11
|
} = _b, options = __objRest(_b, [
|
|
11
|
-
"makeSystemMessage"
|
|
12
|
+
"makeSystemMessage",
|
|
13
|
+
"additionalInstructions"
|
|
12
14
|
]);
|
|
13
15
|
const {
|
|
14
16
|
getContextString,
|
|
@@ -21,7 +23,7 @@ function useCopilotChat(_a) {
|
|
|
21
23
|
const contextString = getContextString([], defaultCopilotContextCategories);
|
|
22
24
|
return {
|
|
23
25
|
id: "system",
|
|
24
|
-
content: systemMessageMaker(contextString),
|
|
26
|
+
content: systemMessageMaker(contextString, additionalInstructions),
|
|
25
27
|
role: "system"
|
|
26
28
|
};
|
|
27
29
|
}, [getContextString, makeSystemMessage]);
|
|
@@ -50,7 +52,7 @@ function useCopilotChat(_a) {
|
|
|
50
52
|
setInput
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
|
-
function defaultSystemMessage(contextString) {
|
|
55
|
+
function defaultSystemMessage(contextString, additionalInstructions) {
|
|
54
56
|
return `
|
|
55
57
|
Please act as an efficient, competent, conscientious, and industrious professional assistant.
|
|
56
58
|
|
|
@@ -69,9 +71,11 @@ Please assist them as best you can.
|
|
|
69
71
|
You can ask them for clarifying questions if needed, but don't be annoying about it. If you can reasonably 'fill in the blanks' yourself, do so.
|
|
70
72
|
|
|
71
73
|
If you would like to call a function, call it without saying anything else.
|
|
72
|
-
|
|
74
|
+
` + (additionalInstructions ? `
|
|
75
|
+
|
|
76
|
+
${additionalInstructions}` : "");
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
export { defaultSystemMessage, useCopilotChat };
|
|
76
80
|
//# sourceMappingURL=out.js.map
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-5GS7FQPW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-chat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,SAAS,kBAAkB;AAsB7B,SAAS,eAAe,IAIiB;AAJjB,eAC7B;AAAA;AAAA,IACA;AAAA,EAxBF,IAsB+B,IAG1B,oBAH0B,IAG1B;AAAA,IAFH;AAAA,IACA;AAAA;AAGA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,cAAc;AAE7B,QAAM,gBAAyB,QAAQ,MAAM;AAC3C,UAAM,qBAAqB,qBAAqB;AAChD,UAAM,gBAAgB,iBAAiB,CAAC,GAAG,+BAA+B;AAE1E,WAAO;AAAA,MACL,IAAI;AAAA,MACJ,SAAS,mBAAmB,eAAe,sBAAsB;AAAA,MACjE,MAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,kBAAkB,iBAAiB,CAAC;AAExC,QAAM,uBAAmC,QAAQ,MAAM;AACrD,WAAO,sCAAsC;AAAA,EAC/C,GAAG,CAAC,qCAAqC,CAAC;AAE1C,QAAM,EAAE,UAAU,QAAQ,QAAQ,MAAM,WAAW,OAAO,SAAS,IAAI,QAAQ,iCAC1E,UAD0E;AAAA,IAE7E,eAAe;AAAA,IACf,IAAI,QAAQ;AAAA,IACZ,iBAAiB,CAAC,aAAa,EAAE,OAAO,QAAQ,mBAAmB,CAAC,CAAC;AAAA,IACrE,WAAW;AAAA,IACX,gBAAgB,uBAAuB;AAAA,IACvC,SAAS,mBAAK,QAAQ;AAAA,IACtB,MAAM,mBACD,QAAQ;AAAA,EAEf,EAAC;AAED,QAAM,kBAAkB,SAAS;AAAA,IAC/B,CAAC,YAAY,QAAQ,SAAS,UAAU,QAAQ,SAAS;AAAA,EAC3D;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,qBACd,eACA,wBACQ;AACR,SACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAUG,yBAAyB;AAAA;AAAA,EAAO,2BAA2B;AAEhE","sourcesContent":["import { useMemo, useContext } from \"react\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { Message, Function } from \"@copilotkit/shared\";\nimport { SystemMessageFunction } from \"../types\";\nimport { UseChatOptions, useChat } from \"./use-chat\";\nimport { defaultCopilotContextCategories } from \"../components\";\n\nexport interface UseCopilotChatOptions extends UseChatOptions {\n makeSystemMessage?: SystemMessageFunction;\n additionalInstructions?: string;\n}\n\nexport interface UseCopilotChatReturn {\n visibleMessages: Message[];\n append: (message: Message) => Promise<void>;\n reload: () => Promise<void>;\n stop: () => void;\n isLoading: boolean;\n input: string;\n setInput: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport function useCopilotChat({\n makeSystemMessage,\n additionalInstructions,\n ...options\n}: UseCopilotChatOptions): UseCopilotChatReturn {\n const {\n getContextString,\n getChatCompletionFunctionDescriptions,\n getFunctionCallHandler,\n copilotApiConfig,\n } = useContext(CopilotContext);\n\n const systemMessage: Message = useMemo(() => {\n const systemMessageMaker = makeSystemMessage || defaultSystemMessage;\n const contextString = getContextString([], defaultCopilotContextCategories); // TODO: make the context categories configurable\n\n return {\n id: \"system\",\n content: systemMessageMaker(contextString, additionalInstructions),\n role: \"system\",\n };\n }, [getContextString, makeSystemMessage]);\n\n const functionDescriptions: Function[] = useMemo(() => {\n return getChatCompletionFunctionDescriptions();\n }, [getChatCompletionFunctionDescriptions]);\n\n const { messages, append, reload, stop, isLoading, input, setInput } = useChat({\n ...options,\n copilotConfig: copilotApiConfig,\n id: options.id,\n initialMessages: [systemMessage].concat(options.initialMessages || []),\n functions: functionDescriptions,\n onFunctionCall: getFunctionCallHandler(),\n headers: { ...options.headers },\n body: {\n ...options.body,\n },\n });\n\n const visibleMessages = messages.filter(\n (message) => message.role === \"user\" || message.role === \"assistant\",\n );\n\n return {\n visibleMessages,\n append,\n reload,\n stop,\n isLoading,\n input,\n setInput,\n };\n}\n\nexport function defaultSystemMessage(\n contextString: string,\n additionalInstructions?: string,\n): string {\n return (\n `\nPlease act as an efficient, competent, conscientious, and industrious professional assistant.\n\nHelp the user achieve their goals, and you do so in a way that is as efficient as possible, without unnecessary fluff, but also without sacrificing professionalism.\nAlways be polite and respectful, and prefer brevity over verbosity.\n\nThe user has provided you with the following context:\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n\nThey have also provided you with functions you can call to initiate actions on their behalf, or functions you can call to receive more information.\n\nPlease assist them as best you can.\n\nYou can ask them for clarifying questions if needed, but don't be annoying about it. If you can reasonably 'fill in the blanks' yourself, do so.\n\nIf you would like to call a function, call it without saying anything else.\n` + (additionalInstructions ? `\\n\\n${additionalInstructions}` : \"\")\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CopilotContext } from './chunk-
|
|
1
|
+
import { CopilotContext } from './chunk-4CFJ6A6A.mjs';
|
|
2
2
|
import { useRef, useContext, useMemo, useEffect } from 'react';
|
|
3
3
|
import { nanoid } from 'nanoid';
|
|
4
4
|
|
|
@@ -24,4 +24,4 @@ function useMakeCopilotActionable(annotatedFunction, dependencies) {
|
|
|
24
24
|
|
|
25
25
|
export { useMakeCopilotActionable };
|
|
26
26
|
//# sourceMappingURL=out.js.map
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-DGUVNY3V.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-make-copilot-actionable.ts"],"names":[],"mappings":";;;;;AAEA,SAAS,QAAQ,YAAY,WAAW,eAAe;AAGvD,SAAS,cAAc;AAEhB,SAAS,yBACd,mBACA,cACA;AACA,QAAM,QAAQ,OAAO,OAAO,CAAC;AAC7B,QAAM,EAAE,eAAe,iBAAiB,IAAI,WAAW,cAAc;AAErE,QAAM,4BAA4D;AAAA,IAChE,OAAO;AAAA,MACL,MAAM,kBAAkB;AAAA,MACxB,aAAa,kBAAkB;AAAA,MAC/B,qBAAqB,kBAAkB;AAAA,MACvC,gBAAgB,kBAAkB;AAAA,IACpC;AAAA,IACA;AAAA,EACF;AAEA,YAAU,MAAM;AACd,kBAAc,MAAM,SAAS,yBAAqD;AAElF,WAAO,MAAM;AACX,uBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,EACF,GAAG,CAAC,2BAA2B,eAAe,gBAAgB,CAAC;AACjE","sourcesContent":["\"use client\";\n\nimport { useRef, useContext, useEffect, useMemo } from \"react\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { AnnotatedFunction } from \"@copilotkit/shared\";\nimport { nanoid } from \"nanoid\";\n\nexport function useMakeCopilotActionable<ActionInput extends any[]>(\n annotatedFunction: AnnotatedFunction<ActionInput>,\n dependencies: any[],\n) {\n const idRef = useRef(nanoid()); // generate a unique id\n const { setEntryPoint, removeEntryPoint } = useContext(CopilotContext);\n\n const memoizedAnnotatedFunction: AnnotatedFunction<ActionInput> = useMemo(\n () => ({\n name: annotatedFunction.name,\n description: annotatedFunction.description,\n argumentAnnotations: annotatedFunction.argumentAnnotations,\n implementation: annotatedFunction.implementation,\n }),\n dependencies,\n );\n\n useEffect(() => {\n setEntryPoint(idRef.current, memoizedAnnotatedFunction as AnnotatedFunction<any[]>);\n\n return () => {\n removeEntryPoint(idRef.current);\n };\n }, [memoizedAnnotatedFunction, setEntryPoint, removeEntryPoint]);\n}\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { StandardCopilotApiConfig } from './chunk-F2JIAPZQ.mjs';
|
|
2
2
|
import { use_tree_default } from './chunk-VUY2K2DI.mjs';
|
|
3
|
-
import { CopilotContext } from './chunk-
|
|
3
|
+
import { CopilotContext } from './chunk-4CFJ6A6A.mjs';
|
|
4
4
|
import { use_flat_category_store_default } from './chunk-YULKJPY3.mjs';
|
|
5
5
|
import { __objRest, __spreadProps, __spreadValues, __async } from './chunk-MRXNTQOX.mjs';
|
|
6
6
|
import { useState, useCallback } from 'react';
|
|
7
|
+
import { annotatedFunctionToChatCompletionFunction } from '@copilotkit/shared';
|
|
7
8
|
import { jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
|
-
function
|
|
10
|
+
function CopilotKit(_a) {
|
|
10
11
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
11
12
|
const [entryPoints, setEntryPoints] = useState({});
|
|
12
13
|
const { addElement, removeElement, printTree } = use_tree_default();
|
|
@@ -78,17 +79,12 @@ ${nonDocumentStrings}`;
|
|
|
78
79
|
},
|
|
79
80
|
[removeDocument]
|
|
80
81
|
);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{}
|
|
88
|
-
);
|
|
89
|
-
} else {
|
|
90
|
-
copilotApiConfig = props.chatApiConfig;
|
|
91
|
-
}
|
|
82
|
+
const copilotApiConfig = new StandardCopilotApiConfig(
|
|
83
|
+
props.url,
|
|
84
|
+
`${props.url}/v2`,
|
|
85
|
+
props.headers || {},
|
|
86
|
+
props.body || {}
|
|
87
|
+
);
|
|
92
88
|
return /* @__PURE__ */ jsx(
|
|
93
89
|
CopilotContext.Provider,
|
|
94
90
|
{
|
|
@@ -136,30 +132,7 @@ function entryPointsToFunctionCallHandler(entryPoints) {
|
|
|
136
132
|
function entryPointsToChatCompletionFunctions(entryPoints) {
|
|
137
133
|
return entryPoints.map(annotatedFunctionToChatCompletionFunction);
|
|
138
134
|
}
|
|
139
|
-
function annotatedFunctionToChatCompletionFunction(annotatedFunction) {
|
|
140
|
-
let parameters = {};
|
|
141
|
-
for (let arg of annotatedFunction.argumentAnnotations) {
|
|
142
|
-
let _a = arg, forwardedArgs = __objRest(_a, ["name", "required"]);
|
|
143
|
-
parameters[arg.name] = forwardedArgs;
|
|
144
|
-
}
|
|
145
|
-
let requiredParameterNames = [];
|
|
146
|
-
for (let arg of annotatedFunction.argumentAnnotations) {
|
|
147
|
-
if (arg.required) {
|
|
148
|
-
requiredParameterNames.push(arg.name);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
let chatCompletionFunction = {
|
|
152
|
-
name: annotatedFunction.name,
|
|
153
|
-
description: annotatedFunction.description,
|
|
154
|
-
parameters: {
|
|
155
|
-
type: "object",
|
|
156
|
-
properties: parameters,
|
|
157
|
-
required: requiredParameterNames
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
return chatCompletionFunction;
|
|
161
|
-
}
|
|
162
135
|
|
|
163
|
-
export {
|
|
136
|
+
export { CopilotKit, defaultCopilotContextCategories };
|
|
164
137
|
//# sourceMappingURL=out.js.map
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
//# sourceMappingURL=chunk-GBZZPQ5X.mjs.map
|