@copilotkit/react-core 0.19.0-alpha.1 → 0.20.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 +127 -113
- package/CHANGELOG.md +48 -0
- package/dist/{chunk-VP2EU4US.mjs → chunk-4LKP4DMT.mjs} +3 -3
- package/dist/{chunk-4CFJ6A6A.mjs → chunk-4OWTRVNI.mjs} +6 -2
- package/dist/chunk-4OWTRVNI.mjs.map +1 -0
- package/dist/{chunk-5GS7FQPW.mjs → chunk-AVLJ3AWG.mjs} +5 -5
- package/dist/chunk-AVLJ3AWG.mjs.map +1 -0
- package/dist/{chunk-YOXWT7I6.mjs → chunk-CPEUPJQJ.mjs} +2 -2
- package/dist/{chunk-UAKLDQMP.mjs → chunk-JIKWSWIX.mjs} +4 -4
- package/dist/chunk-JIKWSWIX.mjs.map +1 -0
- package/dist/{chunk-DGUVNY3V.mjs → chunk-K2LVBFRY.mjs} +2 -2
- package/dist/{chunk-GBZZPQ5X.mjs → chunk-KAZJPE2I.mjs} +14 -8
- package/dist/chunk-KAZJPE2I.mjs.map +1 -0
- package/dist/chunk-LUGEI4YQ.mjs +1 -0
- package/dist/chunk-LUGEI4YQ.mjs.map +1 -0
- package/dist/chunk-NW27C3BV.mjs +158 -0
- package/dist/chunk-NW27C3BV.mjs.map +1 -0
- package/dist/chunk-TZPIY754.mjs +102 -0
- package/dist/chunk-TZPIY754.mjs.map +1 -0
- package/dist/{chunk-IQH5AQQC.mjs → chunk-XBLCD24W.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit.js +12 -6
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +2 -2
- package/dist/components/copilot-provider/index.js +12 -6
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +2 -2
- package/dist/components/index.js +12 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/context/copilot-context.d.ts +5 -4
- package/dist/context/copilot-context.js +7 -2
- package/dist/context/copilot-context.js.map +1 -1
- package/dist/context/copilot-context.mjs +5 -3
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +7 -2
- package/dist/context/index.js.map +1 -1
- package/dist/context/index.mjs +5 -3
- package/dist/hooks/index.js +81 -31
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +8 -8
- package/dist/hooks/use-chat.d.ts +2 -2
- package/dist/hooks/use-chat.js +79 -29
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +2 -2
- package/dist/hooks/use-copilot-chat.js +81 -31
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +5 -5
- package/dist/hooks/use-make-copilot-actionable.js.map +1 -1
- package/dist/hooks/use-make-copilot-actionable.mjs +2 -2
- 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/hooks/use-make-copilot-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-readable.mjs +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +189 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -11
- package/dist/lib/copilot-task.d.ts +34 -0
- package/dist/lib/copilot-task.js +206 -0
- package/dist/lib/copilot-task.js.map +1 -0
- package/dist/lib/copilot-task.mjs +16 -0
- package/dist/lib/copilot-task.mjs.map +1 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.js +206 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/index.mjs +17 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/openai-assistants/hooks/index.js.map +1 -1
- package/dist/openai-assistants/hooks/index.mjs +3 -3
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.js.map +1 -1
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.mjs +3 -3
- package/dist/openai-assistants/index.js.map +1 -1
- package/dist/openai-assistants/index.mjs +3 -3
- package/dist/utils/fetch-chat-completion.d.ts +3 -3
- package/dist/utils/fetch-chat-completion.js +3 -3
- package/dist/utils/fetch-chat-completion.js.map +1 -1
- package/dist/utils/fetch-chat-completion.mjs +1 -1
- package/package.json +4 -4
- package/src/components/copilot-provider/copilotkit.tsx +17 -8
- package/src/context/copilot-context.tsx +11 -3
- package/src/context/index.ts +1 -1
- package/src/hooks/use-chat.ts +102 -29
- package/src/hooks/use-copilot-chat.ts +3 -3
- package/src/index.tsx +1 -0
- package/src/lib/copilot-task.ts +131 -0
- package/src/lib/index.ts +1 -0
- package/src/utils/fetch-chat-completion.ts +6 -6
- package/dist/chunk-4CFJ6A6A.mjs.map +0 -1
- package/dist/chunk-5GS7FQPW.mjs.map +0 -1
- package/dist/chunk-GBZZPQ5X.mjs.map +0 -1
- package/dist/chunk-IQEWY7P4.mjs +0 -109
- package/dist/chunk-IQEWY7P4.mjs.map +0 -1
- package/dist/chunk-UAKLDQMP.mjs.map +0 -1
- /package/dist/{chunk-VP2EU4US.mjs.map → chunk-4LKP4DMT.mjs.map} +0 -0
- /package/dist/{chunk-YOXWT7I6.mjs.map → chunk-CPEUPJQJ.mjs.map} +0 -0
- /package/dist/{chunk-DGUVNY3V.mjs.map → chunk-K2LVBFRY.mjs.map} +0 -0
- /package/dist/{chunk-IQH5AQQC.mjs.map → chunk-XBLCD24W.mjs.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @copilotkit/react-core@0.
|
|
2
|
+
> @copilotkit/react-core@0.20.0-tools.0 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core
|
|
3
3
|
> tsup --clean
|
|
4
4
|
|
|
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
|
|
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/lib/copilot-task.ts, src/lib/index.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
|
|
@@ -10,185 +10,199 @@ CLI Target: es6
|
|
|
10
10
|
CLI Cleaning output folder
|
|
11
11
|
ESM Build start
|
|
12
12
|
CJS Build start
|
|
13
|
+
CJS dist/utils/fetch-chat-completion.js 4.78 KB
|
|
13
14
|
CJS dist/types/document-pointer.js 841.00 B
|
|
15
|
+
CJS dist/lib/copilot-task.js 7.17 KB
|
|
14
16
|
CJS dist/openai-assistants/index.js 9.31 KB
|
|
15
|
-
CJS dist/utils/fetch-chat-completion.js 4.80 KB
|
|
16
|
-
CJS dist/openai-assistants/hooks/use-assistants.js 4.82 KB
|
|
17
17
|
CJS dist/components/copilot-provider/copilotkit-props.js 878.00 B
|
|
18
|
+
CJS dist/openai-assistants/hooks/index.js 9.21 KB
|
|
18
19
|
CJS dist/openai-assistants/utils/index.js 2.30 KB
|
|
19
|
-
CJS dist/index.js
|
|
20
|
-
CJS dist/
|
|
21
|
-
CJS dist/context/copilot-context.js 3.
|
|
22
|
-
CJS dist/
|
|
23
|
-
CJS dist/hooks/use-flat-category-store.js 2.87 KB
|
|
20
|
+
CJS dist/context/index.js 3.60 KB
|
|
21
|
+
CJS dist/index.js 35.75 KB
|
|
22
|
+
CJS dist/context/copilot-context.js 3.62 KB
|
|
23
|
+
CJS dist/components/index.js 15.12 KB
|
|
24
24
|
CJS dist/hooks/use-make-copilot-actionable.js 4.47 KB
|
|
25
|
-
CJS dist/hooks/
|
|
26
|
-
CJS dist/hooks/use-
|
|
27
|
-
CJS dist/
|
|
28
|
-
CJS dist/hooks/use-chat.js 7.23 KB
|
|
29
|
-
CJS dist/types/system-message.js 833.00 B
|
|
25
|
+
CJS dist/hooks/use-copilot-chat.js 14.25 KB
|
|
26
|
+
CJS dist/hooks/use-chat.js 9.02 KB
|
|
27
|
+
CJS dist/hooks/index.js 16.42 KB
|
|
30
28
|
CJS dist/hooks/use-make-copilot-readable.js 4.10 KB
|
|
29
|
+
CJS dist/lib/index.js 7.13 KB
|
|
30
|
+
CJS dist/hooks/use-make-copilot-document-readable.js 4.22 KB
|
|
31
31
|
CJS dist/hooks/use-tree.js 5.53 KB
|
|
32
|
-
CJS dist/
|
|
33
|
-
CJS dist/utils/utils.test.js 184.00 B
|
|
32
|
+
CJS dist/types/system-message.js 833.00 B
|
|
34
33
|
CJS dist/utils/utils.js 797.00 B
|
|
35
|
-
CJS dist/
|
|
34
|
+
CJS dist/utils/utils.test.js 184.00 B
|
|
36
35
|
CJS dist/components/copilot-provider/standard-copilot-api-config.js 1.48 KB
|
|
37
|
-
CJS dist/
|
|
36
|
+
CJS dist/types/index.js 797.00 B
|
|
37
|
+
CJS dist/components/copilot-provider/index.js 15.16 KB
|
|
38
|
+
CJS dist/openai-assistants/hooks/use-assistants.js 4.82 KB
|
|
39
|
+
CJS dist/hooks/use-flat-category-store.js 2.87 KB
|
|
40
|
+
CJS dist/components/copilot-provider/copilotkit.js 15.11 KB
|
|
41
|
+
CJS dist/openai-assistants/utils/process-message-stream.js 2.33 KB
|
|
38
42
|
CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js 9.30 KB
|
|
39
|
-
CJS dist/
|
|
40
|
-
CJS dist/
|
|
43
|
+
CJS dist/utils/fetch-chat-completion.js.map 4.03 KB
|
|
44
|
+
CJS dist/lib/copilot-task.js.map 16.40 KB
|
|
41
45
|
CJS dist/types/document-pointer.js.map 292.00 B
|
|
42
|
-
CJS dist/openai-assistants/index.js.map 20.17 KB
|
|
43
|
-
CJS dist/utils/fetch-chat-completion.js.map 4.05 KB
|
|
44
|
-
CJS dist/openai-assistants/hooks/use-assistants.js.map 5.92 KB
|
|
45
46
|
CJS dist/components/copilot-provider/copilotkit-props.js.map 894.00 B
|
|
47
|
+
CJS dist/openai-assistants/index.js.map 20.70 KB
|
|
48
|
+
CJS dist/openai-assistants/hooks/index.js.map 21.00 KB
|
|
46
49
|
CJS dist/openai-assistants/utils/index.js.map 1.44 KB
|
|
47
|
-
CJS dist/index.js.map
|
|
48
|
-
CJS dist/
|
|
49
|
-
CJS dist/
|
|
50
|
-
CJS dist/hooks/use-
|
|
51
|
-
CJS dist/
|
|
52
|
-
CJS dist/hooks/index.js.map
|
|
53
|
-
CJS dist/
|
|
54
|
-
CJS dist/hooks/use-
|
|
55
|
-
CJS dist/hooks/use-make-copilot-readable.js.map
|
|
56
|
-
CJS dist/types/index.js.map 253.00 B
|
|
57
|
-
CJS dist/hooks/use-tree.js.map 8.32 KB
|
|
58
|
-
CJS dist/hooks/use-chat.js.map 11.51 KB
|
|
59
|
-
CJS dist/utils/utils.test.js.map 354.00 B
|
|
50
|
+
CJS dist/context/index.js.map 4.67 KB
|
|
51
|
+
CJS dist/context/copilot-context.js.map 4.44 KB
|
|
52
|
+
CJS dist/index.js.map 66.55 KB
|
|
53
|
+
CJS dist/hooks/use-make-copilot-actionable.js.map 5.98 KB
|
|
54
|
+
CJS dist/components/index.js.map 27.51 KB
|
|
55
|
+
CJS dist/hooks/index.js.map 35.91 KB
|
|
56
|
+
CJS dist/hooks/use-copilot-chat.js.map 31.00 KB
|
|
57
|
+
CJS dist/hooks/use-chat.js.map 15.00 KB
|
|
58
|
+
CJS dist/hooks/use-make-copilot-document-readable.js.map 5.75 KB
|
|
60
59
|
CJS dist/types/system-message.js.map 249.00 B
|
|
60
|
+
CJS dist/hooks/use-tree.js.map 8.32 KB
|
|
61
|
+
CJS dist/utils/utils.js.map 137.00 B
|
|
62
|
+
CJS dist/lib/index.js.map 16.46 KB
|
|
61
63
|
CJS dist/components/copilot-provider/standard-copilot-api-config.js.map 1.17 KB
|
|
64
|
+
CJS dist/hooks/use-make-copilot-readable.js.map 5.79 KB
|
|
65
|
+
CJS dist/utils/utils.test.js.map 354.00 B
|
|
66
|
+
CJS dist/types/index.js.map 253.00 B
|
|
67
|
+
CJS dist/openai-assistants/hooks/use-assistants.js.map 5.92 KB
|
|
68
|
+
CJS dist/components/copilot-provider/index.js.map 27.64 KB
|
|
69
|
+
CJS dist/hooks/use-flat-category-store.js.map 4.25 KB
|
|
62
70
|
CJS dist/openai-assistants/utils/process-message-stream.js.map 1.33 KB
|
|
63
|
-
CJS dist/
|
|
64
|
-
CJS dist/
|
|
65
|
-
CJS
|
|
66
|
-
|
|
67
|
-
CJS dist/components/copilot-provider/index.js.map 27.06 KB
|
|
68
|
-
CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 20.08 KB
|
|
69
|
-
CJS ⚡️ Build success in 35ms
|
|
70
|
-
ESM dist/context/index.mjs 185.00 B
|
|
71
|
-
ESM dist/index.mjs 1.39 KB
|
|
71
|
+
CJS dist/components/copilot-provider/copilotkit.js.map 27.45 KB
|
|
72
|
+
CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 20.61 KB
|
|
73
|
+
CJS ⚡️ Build success in 36ms
|
|
74
|
+
ESM dist/index.mjs 1.52 KB
|
|
72
75
|
ESM dist/components/index.mjs 407.00 B
|
|
76
|
+
ESM dist/context/index.mjs 227.00 B
|
|
73
77
|
ESM dist/hooks/index.mjs 769.00 B
|
|
74
|
-
ESM dist/chunk-
|
|
78
|
+
ESM dist/chunk-4LKP4DMT.mjs 4.39 KB
|
|
79
|
+
ESM dist/chunk-LUGEI4YQ.mjs 43.00 B
|
|
80
|
+
ESM dist/chunk-MZ5UN3BY.mjs 802.00 B
|
|
75
81
|
ESM dist/chunk-FRAKUJWH.mjs 43.00 B
|
|
82
|
+
ESM dist/context/copilot-context.mjs 219.00 B
|
|
76
83
|
ESM dist/chunk-7GFKOIO7.mjs 43.00 B
|
|
77
|
-
ESM dist/chunk-MZ5UN3BY.mjs 802.00 B
|
|
78
|
-
ESM dist/chunk-DGUVNY3V.mjs 970.00 B
|
|
79
84
|
ESM dist/chunk-VNRDQJXW.mjs 43.00 B
|
|
80
|
-
ESM dist/chunk-
|
|
81
|
-
ESM dist/chunk-
|
|
82
|
-
ESM dist/chunk-
|
|
83
|
-
ESM dist/hooks/use-chat.mjs 174.00 B
|
|
84
|
-
ESM dist/chunk-5GS7FQPW.mjs 2.90 KB
|
|
85
|
-
ESM dist/chunk-YOXWT7I6.mjs 640.00 B
|
|
86
|
-
ESM dist/context/copilot-context.mjs 177.00 B
|
|
85
|
+
ESM dist/chunk-XBLCD24W.mjs 700.00 B
|
|
86
|
+
ESM dist/chunk-TZPIY754.mjs 3.17 KB
|
|
87
|
+
ESM dist/chunk-CPEUPJQJ.mjs 640.00 B
|
|
87
88
|
ESM dist/hooks/use-copilot-chat.mjs 500.00 B
|
|
88
|
-
ESM dist/chunk-
|
|
89
|
+
ESM dist/chunk-K2LVBFRY.mjs 970.00 B
|
|
89
90
|
ESM dist/chunk-EFZPSZWO.mjs 43.00 B
|
|
90
|
-
ESM dist/chunk-
|
|
91
|
+
ESM dist/chunk-AVLJ3AWG.mjs 2.89 KB
|
|
92
|
+
ESM dist/hooks/use-chat.mjs 174.00 B
|
|
93
|
+
ESM dist/chunk-KAZJPE2I.mjs 4.55 KB
|
|
94
|
+
ESM dist/chunk-SPCZTZCY.mjs 43.00 B
|
|
91
95
|
ESM dist/chunk-F2JIAPZQ.mjs 405.00 B
|
|
92
|
-
ESM dist/chunk-
|
|
93
|
-
ESM dist/chunk-
|
|
94
|
-
ESM dist/chunk-
|
|
96
|
+
ESM dist/chunk-VUY2K2DI.mjs 3.89 KB
|
|
97
|
+
ESM dist/chunk-BABVSMJR.mjs 43.00 B
|
|
98
|
+
ESM dist/chunk-4OWTRVNI.mjs 1.42 KB
|
|
99
|
+
ESM dist/chunk-JIKWSWIX.mjs 2.35 KB
|
|
100
|
+
ESM dist/chunk-5UGLWBZJ.mjs 43.00 B
|
|
101
|
+
ESM dist/chunk-YULKJPY3.mjs 1.84 KB
|
|
95
102
|
ESM dist/hooks/use-flat-category-store.mjs 216.00 B
|
|
103
|
+
ESM dist/chunk-JD7BAH7U.mjs 43.00 B
|
|
104
|
+
ESM dist/chunk-NW27C3BV.mjs 5.04 KB
|
|
96
105
|
ESM dist/chunk-MRXNTQOX.mjs 1.89 KB
|
|
97
|
-
ESM dist/
|
|
98
|
-
ESM dist/
|
|
99
|
-
ESM dist/
|
|
106
|
+
ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 201.00 B
|
|
107
|
+
ESM dist/openai-assistants/hooks/index.mjs 548.00 B
|
|
108
|
+
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 575.00 B
|
|
109
|
+
ESM dist/types/index.mjs 66.00 B
|
|
110
|
+
ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
|
|
100
111
|
ESM dist/openai-assistants/hooks/use-assistants.mjs 2.59 KB
|
|
112
|
+
ESM dist/utils/utils.mjs 34.00 B
|
|
101
113
|
ESM dist/utils/utils.test.mjs 170.00 B
|
|
102
|
-
ESM dist/openai-assistants/utils/index.mjs 206.00 B
|
|
103
|
-
ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
|
|
104
|
-
ESM dist/components/copilot-provider/copilotkit-props.mjs 59.00 B
|
|
105
|
-
ESM dist/components/copilot-provider/copilotkit.mjs 380.00 B
|
|
106
114
|
ESM dist/components/copilot-provider/index.mjs 396.00 B
|
|
107
|
-
ESM dist/
|
|
108
|
-
ESM dist/
|
|
115
|
+
ESM dist/types/system-message.mjs 43.00 B
|
|
116
|
+
ESM dist/openai-assistants/utils/index.mjs 206.00 B
|
|
117
|
+
ESM dist/hooks/use-make-copilot-readable.mjs 235.00 B
|
|
118
|
+
ESM dist/openai-assistants/index.mjs 597.00 B
|
|
109
119
|
ESM dist/hooks/use-make-copilot-actionable.mjs 241.00 B
|
|
120
|
+
ESM dist/lib/copilot-task.mjs 410.00 B
|
|
121
|
+
ESM dist/components/copilot-provider/copilotkit.mjs 380.00 B
|
|
122
|
+
ESM dist/components/copilot-provider/copilotkit-props.mjs 59.00 B
|
|
110
123
|
ESM dist/types/document-pointer.mjs 45.00 B
|
|
111
|
-
ESM dist/
|
|
124
|
+
ESM dist/utils/fetch-chat-completion.mjs 319.00 B
|
|
112
125
|
ESM dist/hooks/use-make-copilot-document-readable.mjs 260.00 B
|
|
126
|
+
ESM dist/lib/index.mjs 435.00 B
|
|
113
127
|
ESM dist/hooks/use-tree.mjs 171.00 B
|
|
114
|
-
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 575.00 B
|
|
115
|
-
ESM dist/utils/fetch-chat-completion.mjs 319.00 B
|
|
116
|
-
ESM dist/types/system-message.mjs 43.00 B
|
|
117
|
-
ESM dist/utils/utils.mjs 34.00 B
|
|
118
|
-
ESM dist/types/index.mjs 66.00 B
|
|
119
|
-
ESM dist/openai-assistants/index.mjs 597.00 B
|
|
120
|
-
ESM dist/context/index.mjs.map 71.00 B
|
|
121
|
-
ESM dist/index.mjs.map 71.00 B
|
|
122
128
|
ESM dist/components/index.mjs.map 71.00 B
|
|
129
|
+
ESM dist/index.mjs.map 71.00 B
|
|
130
|
+
ESM dist/context/index.mjs.map 71.00 B
|
|
123
131
|
ESM dist/hooks/index.mjs.map 71.00 B
|
|
132
|
+
ESM dist/chunk-LUGEI4YQ.mjs.map 71.00 B
|
|
133
|
+
ESM dist/chunk-4LKP4DMT.mjs.map 7.90 KB
|
|
124
134
|
ESM dist/chunk-7GFKOIO7.mjs.map 71.00 B
|
|
125
|
-
ESM dist/chunk-MZ5UN3BY.mjs.map 1.26 KB
|
|
126
|
-
ESM dist/chunk-DGUVNY3V.mjs.map 1.66 KB
|
|
127
|
-
ESM dist/chunk-5UGLWBZJ.mjs.map 71.00 B
|
|
128
|
-
ESM dist/chunk-BABVSMJR.mjs.map 71.00 B
|
|
129
|
-
ESM dist/chunk-IQH5AQQC.mjs.map 1.42 KB
|
|
130
|
-
ESM dist/hooks/use-chat.mjs.map 71.00 B
|
|
131
|
-
ESM dist/chunk-YOXWT7I6.mjs.map 1.47 KB
|
|
132
135
|
ESM dist/context/copilot-context.mjs.map 71.00 B
|
|
133
|
-
ESM dist/chunk-
|
|
136
|
+
ESM dist/chunk-MZ5UN3BY.mjs.map 1.26 KB
|
|
137
|
+
ESM dist/chunk-TZPIY754.mjs.map 5.55 KB
|
|
138
|
+
ESM dist/chunk-CPEUPJQJ.mjs.map 1.47 KB
|
|
134
139
|
ESM dist/chunk-VNRDQJXW.mjs.map 71.00 B
|
|
135
140
|
ESM dist/hooks/use-copilot-chat.mjs.map 71.00 B
|
|
136
|
-
ESM dist/chunk-
|
|
141
|
+
ESM dist/chunk-XBLCD24W.mjs.map 1.42 KB
|
|
142
|
+
ESM dist/chunk-K2LVBFRY.mjs.map 1.66 KB
|
|
137
143
|
ESM dist/chunk-FRAKUJWH.mjs.map 71.00 B
|
|
138
|
-
ESM dist/chunk-
|
|
144
|
+
ESM dist/chunk-SPCZTZCY.mjs.map 71.00 B
|
|
145
|
+
ESM dist/chunk-VUY2K2DI.mjs.map 8.27 KB
|
|
139
146
|
ESM dist/chunk-F2JIAPZQ.mjs.map 1.12 KB
|
|
140
|
-
ESM dist/chunk-
|
|
147
|
+
ESM dist/chunk-KAZJPE2I.mjs.map 9.62 KB
|
|
141
148
|
ESM dist/chunk-EFZPSZWO.mjs.map 71.00 B
|
|
142
|
-
ESM dist/chunk-
|
|
149
|
+
ESM dist/chunk-JIKWSWIX.mjs.map 3.98 KB
|
|
150
|
+
ESM dist/chunk-BABVSMJR.mjs.map 71.00 B
|
|
151
|
+
ESM dist/chunk-AVLJ3AWG.mjs.map 4.59 KB
|
|
152
|
+
ESM dist/chunk-5UGLWBZJ.mjs.map 71.00 B
|
|
153
|
+
ESM dist/chunk-4OWTRVNI.mjs.map 4.35 KB
|
|
143
154
|
ESM dist/hooks/use-flat-category-store.mjs.map 71.00 B
|
|
144
|
-
ESM dist/
|
|
145
|
-
ESM dist/chunk-
|
|
146
|
-
ESM dist/chunk-SPCZTZCY.mjs.map 71.00 B
|
|
147
|
-
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
148
|
-
ESM dist/chunk-GBZZPQ5X.mjs.map 9.29 KB
|
|
155
|
+
ESM dist/hooks/use-chat.mjs.map 71.00 B
|
|
156
|
+
ESM dist/chunk-JD7BAH7U.mjs.map 71.00 B
|
|
149
157
|
ESM dist/chunk-YULKJPY3.mjs.map 4.21 KB
|
|
158
|
+
ESM dist/chunk-NW27C3BV.mjs.map 11.29 KB
|
|
159
|
+
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
160
|
+
ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 71.00 B
|
|
161
|
+
ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 71.00 B
|
|
162
|
+
ESM dist/utils/utils.mjs.map 71.00 B
|
|
150
163
|
ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.67 KB
|
|
164
|
+
ESM dist/utils/utils.test.mjs.map 352.00 B
|
|
165
|
+
ESM dist/components/copilot-provider/index.mjs.map 71.00 B
|
|
151
166
|
ESM dist/openai-assistants/utils/index.mjs.map 71.00 B
|
|
167
|
+
ESM dist/openai-assistants/index.mjs.map 71.00 B
|
|
168
|
+
ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
|
|
169
|
+
ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
|
|
152
170
|
ESM dist/components/copilot-provider/copilotkit-props.mjs.map 71.00 B
|
|
171
|
+
ESM dist/types/system-message.mjs.map 71.00 B
|
|
172
|
+
ESM dist/lib/copilot-task.mjs.map 71.00 B
|
|
153
173
|
ESM dist/components/copilot-provider/copilotkit.mjs.map 71.00 B
|
|
154
|
-
ESM dist/
|
|
174
|
+
ESM dist/types/index.mjs.map 71.00 B
|
|
155
175
|
ESM dist/openai-assistants/hooks/index.mjs.map 71.00 B
|
|
176
|
+
ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
|
|
177
|
+
ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
|
|
178
|
+
ESM dist/lib/index.mjs.map 71.00 B
|
|
156
179
|
ESM dist/types/document-pointer.mjs.map 71.00 B
|
|
157
|
-
ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
|
|
158
180
|
ESM dist/hooks/use-make-copilot-document-readable.mjs.map 71.00 B
|
|
159
|
-
ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
|
|
160
181
|
ESM dist/hooks/use-tree.mjs.map 71.00 B
|
|
161
|
-
ESM
|
|
162
|
-
ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
|
|
163
|
-
ESM dist/types/system-message.mjs.map 71.00 B
|
|
164
|
-
ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
|
|
165
|
-
ESM dist/components/copilot-provider/index.mjs.map 71.00 B
|
|
166
|
-
ESM dist/utils/utils.test.mjs.map 352.00 B
|
|
167
|
-
ESM dist/types/index.mjs.map 71.00 B
|
|
168
|
-
ESM dist/utils/utils.mjs.map 71.00 B
|
|
169
|
-
ESM dist/openai-assistants/index.mjs.map 71.00 B
|
|
170
|
-
ESM ⚡️ Build success in 37ms
|
|
182
|
+
ESM ⚡️ Build success in 39ms
|
|
171
183
|
DTS Build start
|
|
172
|
-
DTS ⚡️ Build success in
|
|
173
|
-
DTS dist/index.d.ts 1.
|
|
184
|
+
DTS ⚡️ Build success in 2680ms
|
|
185
|
+
DTS dist/index.d.ts 1.41 KB
|
|
174
186
|
DTS dist/components/copilot-provider/copilotkit.d.ts 1.26 KB
|
|
175
187
|
DTS dist/components/copilot-provider/copilotkit-props.d.ts 749.00 B
|
|
176
|
-
DTS dist/context/copilot-context.d.ts
|
|
188
|
+
DTS dist/context/copilot-context.d.ts 2.06 KB
|
|
177
189
|
DTS dist/hooks/use-copilot-chat.d.ts 1.01 KB
|
|
178
190
|
DTS dist/hooks/use-make-copilot-actionable.d.ts 243.00 B
|
|
179
191
|
DTS dist/hooks/use-make-copilot-readable.d.ts 598.00 B
|
|
180
192
|
DTS dist/hooks/use-make-copilot-document-readable.d.ts 516.00 B
|
|
181
|
-
DTS dist/hooks/use-chat.d.ts 2.
|
|
193
|
+
DTS dist/hooks/use-chat.d.ts 2.69 KB
|
|
182
194
|
DTS dist/types/document-pointer.d.ts 181.00 B
|
|
183
195
|
DTS dist/types/system-message.d.ts 132.00 B
|
|
184
196
|
DTS dist/openai-assistants/hooks/use-copilot-chat-v2.d.ts 1.41 KB
|
|
185
197
|
DTS dist/openai-assistants/utils/process-message-stream.d.ts 196.00 B
|
|
198
|
+
DTS dist/lib/copilot-task.d.ts 1.01 KB
|
|
186
199
|
DTS dist/utils/fetch-chat-completion.d.ts 1.34 KB
|
|
187
200
|
DTS dist/hooks/use-tree.d.ts 543.00 B
|
|
188
201
|
DTS dist/components/index.d.ts 186.00 B
|
|
189
|
-
DTS dist/context/index.d.ts
|
|
202
|
+
DTS dist/context/index.d.ts 229.00 B
|
|
190
203
|
DTS dist/hooks/index.d.ts 574.00 B
|
|
191
204
|
DTS dist/hooks/use-flat-category-store.d.ts 424.00 B
|
|
205
|
+
DTS dist/lib/index.d.ts 223.00 B
|
|
192
206
|
DTS dist/openai-assistants/index.d.ts 262.00 B
|
|
193
207
|
DTS dist/types/index.d.ts 118.00 B
|
|
194
208
|
DTS dist/utils/utils.test.d.ts 12.00 B
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 0.20.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- function return values support
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @copilotkit/shared@0.4.0-alpha.2
|
|
13
|
+
|
|
14
|
+
## 0.20.0-tools.1
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- function return
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @copilotkit/shared@0.4.0-tools.1
|
|
24
|
+
|
|
25
|
+
## 0.20.0-tools.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- Test the tools API
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @copilotkit/shared@0.4.0-tools.0
|
|
35
|
+
|
|
36
|
+
## 0.19.0
|
|
37
|
+
|
|
38
|
+
### Minor Changes
|
|
39
|
+
|
|
40
|
+
- node CopilotBackend support
|
|
41
|
+
- 58a8524: clean node example impl
|
|
42
|
+
- a34a226: node-native backend support
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
- Updated dependencies [58a8524]
|
|
48
|
+
- Updated dependencies [a34a226]
|
|
49
|
+
- @copilotkit/shared@0.3.0
|
|
50
|
+
|
|
3
51
|
## 0.19.0-alpha.1
|
|
4
52
|
|
|
5
53
|
### Minor Changes
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-MZ5UN3BY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultCopilotContextCategories
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KAZJPE2I.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4OWTRVNI.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__async,
|
|
12
12
|
__spreadValues
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
useCopilotChatV2,
|
|
135
135
|
defaultSystemMessage
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-4LKP4DMT.mjs.map
|
|
@@ -37,12 +37,16 @@ var emptyCopilotContext = {
|
|
|
37
37
|
}()
|
|
38
38
|
};
|
|
39
39
|
var CopilotContext = React.createContext(emptyCopilotContext);
|
|
40
|
+
function useCopilotContext() {
|
|
41
|
+
return React.useContext(CopilotContext);
|
|
42
|
+
}
|
|
40
43
|
function returnAndThrowInDebug(value) {
|
|
41
44
|
throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!");
|
|
42
45
|
return value;
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
export {
|
|
46
|
-
CopilotContext
|
|
49
|
+
CopilotContext,
|
|
50
|
+
useCopilotContext
|
|
47
51
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-4OWTRVNI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context/copilot-context.tsx"],"sourcesContent":["\"use client\";\n\nimport { FunctionCallHandler, AnnotatedFunction, ToolDefinition } 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: (\n customEntryPoints?: Record<string, AnnotatedFunction<any[]>>,\n ) => ToolDefinition[];\n getFunctionCallHandler: (\n customEntryPoints?: Record<string, AnnotatedFunction<any[]>>,\n ) => 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\nexport function useCopilotContext(): CopilotContextParams {\n return React.useContext(CopilotContext);\n}\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"],"mappings":";;;;;AAGA,OAAO,WAAW;AAqElB,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;AAEpF,SAAS,oBAA0C;AACxD,SAAO,MAAM,WAAW,cAAc;AACxC;AAEA,SAAS,sBAAyB,OAAa;AAC7C,QAAM,IAAI,MAAM,uEAAuE;AACvF,SAAO;AACT;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultCopilotContextCategories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KAZJPE2I.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CopilotContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4OWTRVNI.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useChat
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NW27C3BV.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__objRest,
|
|
12
12
|
__spreadProps,
|
|
@@ -45,7 +45,7 @@ function useCopilotChat(_a) {
|
|
|
45
45
|
copilotConfig: copilotApiConfig,
|
|
46
46
|
id: options.id,
|
|
47
47
|
initialMessages: [systemMessage].concat(options.initialMessages || []),
|
|
48
|
-
|
|
48
|
+
tools: functionDescriptions,
|
|
49
49
|
onFunctionCall: getFunctionCallHandler(),
|
|
50
50
|
headers: __spreadValues({}, options.headers),
|
|
51
51
|
body: __spreadValues({}, options.body)
|
|
@@ -91,4 +91,4 @@ export {
|
|
|
91
91
|
useCopilotChat,
|
|
92
92
|
defaultSystemMessage
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-AVLJ3AWG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-chat.ts"],"sourcesContent":["import { useMemo, useContext } from \"react\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { Message, ToolDefinition } 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: ToolDefinition[] = 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 tools: 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"],"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,uBAAyC,QAAQ,MAAM;AAC3D,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,OAAO;AAAA,IACP,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;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4OWTRVNI.mjs";
|
|
4
4
|
|
|
5
5
|
// src/hooks/use-make-copilot-readable.ts
|
|
6
6
|
import { useContext, useEffect, useRef } from "react";
|
|
@@ -20,4 +20,4 @@ function useMakeCopilotReadable(information, parentId, categories) {
|
|
|
20
20
|
export {
|
|
21
21
|
useMakeCopilotReadable
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-CPEUPJQJ.mjs.map
|
|
@@ -15,14 +15,14 @@ function fetchChatCompletion(_0) {
|
|
|
15
15
|
copilotConfig,
|
|
16
16
|
model,
|
|
17
17
|
messages,
|
|
18
|
-
|
|
18
|
+
tools,
|
|
19
19
|
temperature,
|
|
20
20
|
headers,
|
|
21
21
|
body,
|
|
22
22
|
signal
|
|
23
23
|
}) {
|
|
24
24
|
temperature || (temperature = 0.5);
|
|
25
|
-
|
|
25
|
+
tools || (tools = []);
|
|
26
26
|
const cleanedMessages = messages.map((message) => {
|
|
27
27
|
const { content, role, name, function_call } = message;
|
|
28
28
|
return { content, role, name, function_call };
|
|
@@ -36,7 +36,7 @@ function fetchChatCompletion(_0) {
|
|
|
36
36
|
model,
|
|
37
37
|
messages: cleanedMessages,
|
|
38
38
|
stream: true
|
|
39
|
-
},
|
|
39
|
+
}, tools.length ? { tools } : {}), temperature ? { temperature } : {}), tools.length != 0 ? { tool_choice: "auto" } : {}), copilotConfig.body), body ? __spreadValues({}, body) : {})),
|
|
40
40
|
signal
|
|
41
41
|
});
|
|
42
42
|
return response;
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
fetchAndDecodeChatCompletion,
|
|
71
71
|
fetchAndDecodeChatCompletionAsText
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-JIKWSWIX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/fetch-chat-completion.ts"],"sourcesContent":["import {\n Message,\n ToolDefinition,\n ChatCompletionEvent,\n decodeChatCompletion,\n parseChatCompletion,\n decodeChatCompletionAsText,\n} from \"@copilotkit/shared\";\nimport { CopilotApiConfig } from \"../context\";\n\nexport interface FetchChatCompletionParams {\n copilotConfig: CopilotApiConfig;\n model?: string;\n messages: Message[];\n tools?: ToolDefinition[];\n temperature?: number;\n maxTokens?: number;\n headers?: Record<string, string> | Headers;\n body?: object;\n signal?: AbortSignal;\n}\n\nexport async function fetchChatCompletion({\n copilotConfig,\n model,\n messages,\n tools,\n temperature,\n headers,\n body,\n signal,\n}: FetchChatCompletionParams): Promise<Response> {\n temperature ||= 0.5;\n tools ||= [];\n\n // clean up any extra properties from messages\n const cleanedMessages = messages.map((message) => {\n const { content, role, name, function_call } = message;\n return { content, role, name, function_call };\n });\n\n const response = await fetch(copilotConfig.chatApiEndpoint, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...copilotConfig.headers,\n ...(headers ? { ...headers } : {}),\n },\n body: JSON.stringify({\n model,\n messages: cleanedMessages,\n stream: true,\n ...(tools.length ? { tools } : {}),\n ...(temperature ? { temperature } : {}),\n ...(tools.length != 0 ? { tool_choice: \"auto\" } : {}),\n ...copilotConfig.body,\n ...(body ? { ...body } : {}),\n }),\n signal,\n });\n\n return response;\n}\n\nexport interface DecodedChatCompletionResponse extends Response {\n events: ReadableStream<ChatCompletionEvent> | null;\n}\n\nexport async function fetchAndDecodeChatCompletion(\n params: FetchChatCompletionParams,\n): Promise<DecodedChatCompletionResponse> {\n const response = await fetchChatCompletion(params);\n if (!response.ok || !response.body) {\n return { ...response, events: null };\n }\n const events = await decodeChatCompletion(parseChatCompletion(response.body));\n return { ...response, events };\n}\n\nexport interface DecodedChatCompletionResponseAsText extends Response {\n events: ReadableStream<string> | null;\n}\n\nexport async function fetchAndDecodeChatCompletionAsText(\n params: FetchChatCompletionParams,\n): Promise<DecodedChatCompletionResponseAsText> {\n const response = await fetchChatCompletion(params);\n if (!response.ok || !response.body) {\n return { ...response, events: null };\n }\n const events = await decodeChatCompletionAsText(\n decodeChatCompletion(parseChatCompletion(response.body)),\n );\n return { ...response, events };\n}\n"],"mappings":";;;;;;;AAAA;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAeP,SAAsB,oBAAoB,IASO;AAAA,6CATP;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAiD;AAC/C,kCAAgB;AAChB,sBAAU,CAAC;AAGX,UAAM,kBAAkB,SAAS,IAAI,CAAC,YAAY;AAChD,YAAM,EAAE,SAAS,MAAM,MAAM,cAAc,IAAI;AAC/C,aAAO,EAAE,SAAS,MAAM,MAAM,cAAc;AAAA,IAC9C,CAAC;AAED,UAAM,WAAW,MAAM,MAAM,cAAc,iBAAiB;AAAA,MAC1D,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,gBAAgB;AAAA,SACb,cAAc,UACb,UAAU,mBAAK,WAAY,CAAC;AAAA,MAElC,MAAM,KAAK,UAAU;AAAA,QACnB;AAAA,QACA,UAAU;AAAA,QACV,QAAQ;AAAA,SACJ,MAAM,SAAS,EAAE,MAAM,IAAI,CAAC,IAC5B,cAAc,EAAE,YAAY,IAAI,CAAC,IACjC,MAAM,UAAU,IAAI,EAAE,aAAa,OAAO,IAAI,CAAC,IAChD,cAAc,OACb,OAAO,mBAAK,QAAS,CAAC,EAC3B;AAAA,MACD;AAAA,IACF,CAAC;AAED,WAAO;AAAA,EACT;AAAA;AAMA,SAAsB,6BACpB,QACwC;AAAA;AACxC,UAAM,WAAW,MAAM,oBAAoB,MAAM;AACjD,QAAI,CAAC,SAAS,MAAM,CAAC,SAAS,MAAM;AAClC,aAAO,iCAAK,WAAL,EAAe,QAAQ,KAAK;AAAA,IACrC;AACA,UAAM,SAAS,MAAM,qBAAqB,oBAAoB,SAAS,IAAI,CAAC;AAC5E,WAAO,iCAAK,WAAL,EAAe,OAAO;AAAA,EAC/B;AAAA;AAMA,SAAsB,mCACpB,QAC8C;AAAA;AAC9C,UAAM,WAAW,MAAM,oBAAoB,MAAM;AACjD,QAAI,CAAC,SAAS,MAAM,CAAC,SAAS,MAAM;AAClC,aAAO,iCAAK,WAAL,EAAe,QAAQ,KAAK;AAAA,IACrC;AACA,UAAM,SAAS,MAAM;AAAA,MACnB,qBAAqB,oBAAoB,SAAS,IAAI,CAAC;AAAA,IACzD;AACA,WAAO,iCAAK,WAAL,EAAe,OAAO;AAAA,EAC/B;AAAA;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4OWTRVNI.mjs";
|
|
4
4
|
|
|
5
5
|
// src/hooks/use-make-copilot-actionable.ts
|
|
6
6
|
import { useRef, useContext, useEffect, useMemo } from "react";
|
|
@@ -28,4 +28,4 @@ function useMakeCopilotActionable(annotatedFunction, dependencies) {
|
|
|
28
28
|
export {
|
|
29
29
|
useMakeCopilotActionable
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-K2LVBFRY.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-VUY2K2DI.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4OWTRVNI.mjs";
|
|
10
10
|
import {
|
|
11
11
|
use_flat_category_store_default
|
|
12
12
|
} from "./chunk-YULKJPY3.mjs";
|
|
@@ -71,12 +71,18 @@ ${nonDocumentStrings}`;
|
|
|
71
71
|
},
|
|
72
72
|
[removeElement]
|
|
73
73
|
);
|
|
74
|
-
const getChatCompletionFunctionDescriptions = useCallback(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
const getChatCompletionFunctionDescriptions = useCallback(
|
|
75
|
+
(customEntryPoints) => {
|
|
76
|
+
return entryPointsToChatCompletionFunctions(Object.values(customEntryPoints || entryPoints));
|
|
77
|
+
},
|
|
78
|
+
[entryPoints]
|
|
79
|
+
);
|
|
80
|
+
const getFunctionCallHandler = useCallback(
|
|
81
|
+
(customEntryPoints) => {
|
|
82
|
+
return entryPointsToFunctionCallHandler(Object.values(customEntryPoints || entryPoints));
|
|
83
|
+
},
|
|
84
|
+
[entryPoints]
|
|
85
|
+
);
|
|
80
86
|
const getDocumentsContext = useCallback(
|
|
81
87
|
(categories) => {
|
|
82
88
|
return allDocuments(categories);
|
|
@@ -153,4 +159,4 @@ export {
|
|
|
153
159
|
CopilotKit,
|
|
154
160
|
defaultCopilotContextCategories
|
|
155
161
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-KAZJPE2I.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/copilot-provider/copilotkit.tsx"],"sourcesContent":["\"use client\";\n\nimport { FunctionDefinition } from \"@copilotkit/shared\";\nimport { useCallback, useState } from \"react\";\nimport { CopilotContext, CopilotApiConfig } from \"../../context/copilot-context\";\nimport useTree from \"../../hooks/use-tree\";\nimport { DocumentPointer } from \"../../types\";\nimport {\n FunctionCallHandler,\n AnnotatedFunction,\n annotatedFunctionToChatCompletionFunction,\n} from \"@copilotkit/shared\";\nimport useFlatCategoryStore from \"../../hooks/use-flat-category-store\";\nimport { StandardCopilotApiConfig } from \"./standard-copilot-api-config\";\nimport { CopilotKitProps } from \"./copilotkit-props\";\nimport { ToolDefinition } from \"@copilotkit/shared\";\n\n/**\n * The CopilotKit component.\n * This component provides the Copilot context to its children.\n * It can be configured either with a chat API endpoint or a CopilotApiConfig.\n *\n * NOTE: The backend can use OpenAI, or you can bring your own LLM.\n * For examples of the backend api implementation, see `examples/next-openai` usage (under `src/api/copilotkit`),\n * or read the documentation at https://docs.copilotkit.ai\n * In particular, Getting-Started > Quickstart-Backend: https://docs.copilotkit.ai/getting-started/quickstart-backend\n *\n * Example usage:\n * ```\n * <CopilotKit url=\"https://your.copilotkit.api\">\n * <App />\n * </CopilotKit>\n * ```\n *\n * or\n *\n * ```\n * const copilotApiConfig = new StandardCopilotApiConfig(\n * \"https://your.copilotkit.api/v1\",\n * \"https://your.copilotkit.api/v2\",\n * {},\n * {}\n * );\n *\n * // ...\n *\n * <CopilotKit chatApiConfig={copilotApiConfig}>\n * <App />\n * </CopilotKit>\n * ```\n *\n * @param props - The props for the component.\n * @returns The CopilotKit component.\n */\nexport function CopilotKit({ children, ...props }: CopilotKitProps) {\n // Compute all the functions and properties that we need to pass\n // to the CopilotContext.\n\n const [entryPoints, setEntryPoints] = useState<Record<string, AnnotatedFunction<any[]>>>({});\n\n const { addElement, removeElement, printTree } = useTree();\n\n const {\n addElement: addDocument,\n removeElement: removeDocument,\n allElements: allDocuments,\n } = useFlatCategoryStore<DocumentPointer>();\n\n const setEntryPoint = useCallback((id: string, entryPoint: AnnotatedFunction<any[]>) => {\n setEntryPoints((prevPoints) => {\n return {\n ...prevPoints,\n [id]: entryPoint,\n };\n });\n }, []);\n\n const removeEntryPoint = useCallback((id: string) => {\n setEntryPoints((prevPoints) => {\n const newPoints = { ...prevPoints };\n delete newPoints[id];\n return newPoints;\n });\n }, []);\n\n const getContextString = useCallback(\n (documents: DocumentPointer[], categories: string[]) => {\n const documentsString = documents\n .map((document) => {\n return `${document.name} (${document.sourceApplication}):\\n${document.getContents()}`;\n })\n .join(\"\\n\\n\");\n\n const nonDocumentStrings = printTree(categories);\n\n return `${documentsString}\\n\\n${nonDocumentStrings}`;\n },\n [printTree],\n );\n\n const addContext = useCallback(\n (\n context: string,\n parentId?: string,\n categories: string[] = defaultCopilotContextCategories,\n ) => {\n return addElement(context, categories, parentId);\n },\n [addElement],\n );\n\n const removeContext = useCallback(\n (id: string) => {\n removeElement(id);\n },\n [removeElement],\n );\n\n const getChatCompletionFunctionDescriptions = useCallback(\n (customEntryPoints?: Record<string, AnnotatedFunction<any[]>>) => {\n return entryPointsToChatCompletionFunctions(Object.values(customEntryPoints || entryPoints));\n },\n [entryPoints],\n );\n\n const getFunctionCallHandler = useCallback(\n (customEntryPoints?: Record<string, AnnotatedFunction<any[]>>) => {\n return entryPointsToFunctionCallHandler(Object.values(customEntryPoints || entryPoints));\n },\n [entryPoints],\n );\n\n const getDocumentsContext = useCallback(\n (categories: string[]) => {\n return allDocuments(categories);\n },\n [allDocuments],\n );\n\n const addDocumentContext = useCallback(\n (documentPointer: DocumentPointer, categories: string[] = defaultCopilotContextCategories) => {\n return addDocument(documentPointer, categories);\n },\n [addDocument],\n );\n\n const removeDocumentContext = useCallback(\n (documentId: string) => {\n removeDocument(documentId);\n },\n [removeDocument],\n );\n\n // get the appropriate CopilotApiConfig from the props\n const copilotApiConfig: CopilotApiConfig = new StandardCopilotApiConfig(\n props.url,\n `${props.url}/v2`,\n props.headers || {},\n props.body || {},\n );\n\n return (\n <CopilotContext.Provider\n value={{\n entryPoints,\n getChatCompletionFunctionDescriptions,\n getFunctionCallHandler,\n setEntryPoint,\n removeEntryPoint,\n getContextString,\n addContext,\n removeContext,\n getDocumentsContext,\n addDocumentContext,\n removeDocumentContext,\n copilotApiConfig: copilotApiConfig,\n }}\n >\n {children}\n </CopilotContext.Provider>\n );\n}\n\nexport const defaultCopilotContextCategories = [\"global\"];\n\nfunction entryPointsToFunctionCallHandler(\n entryPoints: AnnotatedFunction<any[]>[],\n): FunctionCallHandler {\n return async (chatMessages, functionCall) => {\n let entrypointsByFunctionName: Record<string, AnnotatedFunction<any[]>> = {};\n for (let entryPoint of entryPoints) {\n entrypointsByFunctionName[entryPoint.name] = entryPoint;\n }\n\n const entryPointFunction = entrypointsByFunctionName[functionCall.name || \"\"];\n if (entryPointFunction) {\n let functionCallArguments: Record<string, any>[] = [];\n if (functionCall.arguments) {\n functionCallArguments = JSON.parse(functionCall.arguments);\n }\n\n const paramsInCorrectOrder: any[] = [];\n for (let arg of entryPointFunction.argumentAnnotations) {\n paramsInCorrectOrder.push(\n functionCallArguments[arg.name as keyof typeof functionCallArguments],\n );\n }\n\n await entryPointFunction.implementation(...paramsInCorrectOrder);\n\n // commented out becasue for now we don't want to return anything\n // const result = await entryPointFunction.implementation(\n // ...parsedFunctionCallArguments\n // );\n // const functionResponse: ChatRequest = {\n // messages: [\n // ...chatMessages,\n // {\n // id: nanoid(),\n // name: functionCall.name,\n // role: 'function' as const,\n // content: JSON.stringify(result),\n // },\n // ],\n // };\n\n // return functionResponse;\n }\n };\n}\n\nfunction entryPointsToChatCompletionFunctions(\n entryPoints: AnnotatedFunction<any[]>[],\n): ToolDefinition[] {\n return entryPoints.map(annotatedFunctionToChatCompletionFunction);\n}\n"],"mappings":"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","names":[]}
|