@copilotkit/react-core 0.21.0-mme-pre-release.3 → 0.21.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @copilotkit/react-core@0.21.0-mme-pre-release.3 build /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core
2
+ > @copilotkit/react-core@0.21.0 build /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core
3
3
  > tsup --clean
4
4
 
5
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-action-implementation.ts, src/hooks/use-copilot-action.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/frontend-action.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
@@ -10,10 +10,99 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
+ CJS dist/index.js 39.08 KB
14
+ CJS dist/components/index.js 15.02 KB
15
+ CJS dist/context/copilot-context.js 3.66 KB
16
+ CJS dist/hooks/index.js 19.93 KB
17
+ CJS dist/lib/copilot-task.js 7.38 KB
18
+ CJS dist/openai-assistants/index.js 9.35 KB
19
+ CJS dist/types/document-pointer.js 841.00 B
20
+ CJS dist/utils/fetch-chat-completion.js 4.95 KB
21
+ CJS dist/components/copilot-provider/copilotkit-props.js 878.00 B
22
+ CJS dist/openai-assistants/hooks/index.js 9.25 KB
23
+ CJS dist/openai-assistants/utils/index.js 2.30 KB
24
+ CJS dist/context/index.js 3.64 KB
25
+ CJS dist/hooks/use-chat.js 11.27 KB
26
+ CJS dist/hooks/use-copilot-action-implementation.js 5.09 KB
27
+ CJS dist/hooks/use-copilot-action.js 5.17 KB
28
+ CJS dist/hooks/use-copilot-chat.js 16.00 KB
29
+ CJS dist/hooks/use-flat-category-store.js 2.87 KB
30
+ CJS dist/hooks/use-make-copilot-actionable.js 4.63 KB
31
+ CJS dist/hooks/use-make-copilot-document-readable.js 4.26 KB
32
+ CJS dist/hooks/use-make-copilot-readable.js 4.14 KB
33
+ CJS dist/hooks/use-tree.js 5.53 KB
34
+ CJS dist/lib/index.js 7.34 KB
35
+ CJS dist/types/frontend-action.js 837.00 B
36
+ CJS dist/types/index.js 797.00 B
37
+ CJS dist/types/system-message.js 833.00 B
38
+ CJS dist/utils/utils.test.js 184.00 B
39
+ CJS dist/utils/utils.js 797.00 B
40
+ CJS dist/components/copilot-provider/copilotkit.js 15.01 KB
41
+ CJS dist/components/copilot-provider/index.js 15.06 KB
42
+ CJS dist/components/copilot-provider/standard-copilot-api-config.js 1.48 KB
43
+ CJS dist/openai-assistants/hooks/use-assistants.js 4.82 KB
44
+ CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js 9.34 KB
45
+ CJS dist/openai-assistants/utils/process-message-stream.js 2.33 KB
46
+ CJS dist/index.js.map 74.40 KB
47
+ CJS dist/components/index.js.map 27.07 KB
48
+ CJS dist/context/copilot-context.js.map 4.86 KB
49
+ CJS dist/hooks/index.js.map 43.87 KB
50
+ CJS dist/lib/copilot-task.js.map 16.37 KB
51
+ CJS dist/openai-assistants/index.js.map 20.32 KB
52
+ CJS dist/types/document-pointer.js.map 292.00 B
53
+ CJS dist/utils/fetch-chat-completion.js.map 4.79 KB
54
+ CJS dist/components/copilot-provider/copilotkit-props.js.map 1.12 KB
55
+ CJS dist/openai-assistants/hooks/index.js.map 20.62 KB
56
+ CJS dist/openai-assistants/utils/index.js.map 1.44 KB
57
+ CJS dist/context/index.js.map 5.09 KB
58
+ CJS dist/hooks/use-chat.js.map 17.88 KB
59
+ CJS dist/hooks/use-copilot-action-implementation.js.map 8.27 KB
60
+ CJS dist/hooks/use-copilot-action.js.map 9.86 KB
61
+ CJS dist/hooks/use-copilot-chat.js.map 33.57 KB
62
+ CJS dist/hooks/use-flat-category-store.js.map 4.25 KB
63
+ CJS dist/hooks/use-make-copilot-actionable.js.map 6.63 KB
64
+ CJS dist/hooks/use-make-copilot-document-readable.js.map 6.17 KB
65
+ CJS dist/hooks/use-make-copilot-readable.js.map 6.22 KB
66
+ CJS dist/hooks/use-tree.js.map 8.32 KB
67
+ CJS dist/lib/index.js.map 16.43 KB
68
+ CJS dist/types/frontend-action.js.map 1.70 KB
69
+ CJS dist/types/index.js.map 253.00 B
70
+ CJS dist/types/system-message.js.map 249.00 B
71
+ CJS dist/utils/utils.test.js.map 354.00 B
72
+ CJS dist/utils/utils.js.map 137.00 B
73
+ CJS dist/components/copilot-provider/copilotkit.js.map 27.01 KB
74
+ CJS dist/components/copilot-provider/index.js.map 27.20 KB
75
+ CJS dist/components/copilot-provider/standard-copilot-api-config.js.map 1.17 KB
76
+ CJS dist/openai-assistants/hooks/use-assistants.js.map 5.92 KB
77
+ CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 20.23 KB
78
+ CJS dist/openai-assistants/utils/process-message-stream.js.map 1.33 KB
79
+ CJS ⚡️ Build success in 265ms
80
+ ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
81
+ ESM dist/components/copilot-provider/copilotkit-props.mjs 59.00 B
82
+ ESM dist/components/copilot-provider/copilotkit.mjs 380.00 B
83
+ ESM dist/components/copilot-provider/index.mjs 396.00 B
84
+ ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 201.00 B
85
+ ESM dist/openai-assistants/hooks/index.mjs 548.00 B
86
+ ESM dist/openai-assistants/hooks/use-assistants.mjs 2.59 KB
87
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 575.00 B
88
+ ESM dist/openai-assistants/utils/index.mjs 206.00 B
89
+ ESM dist/openai-assistants/index.mjs 597.00 B
90
+ ESM dist/types/document-pointer.mjs 45.00 B
91
+ ESM dist/types/frontend-action.mjs 44.00 B
92
+ ESM dist/types/index.mjs 66.00 B
93
+ ESM dist/types/system-message.mjs 43.00 B
94
+ ESM dist/utils/fetch-chat-completion.mjs 319.00 B
95
+ ESM dist/utils/utils.test.mjs 170.00 B
96
+ ESM dist/utils/utils.mjs 34.00 B
97
+ ESM dist/hooks/use-copilot-chat.mjs 500.00 B
98
+ ESM dist/hooks/use-flat-category-store.mjs 216.00 B
99
+ ESM dist/hooks/use-make-copilot-actionable.mjs 241.00 B
100
+ ESM dist/hooks/use-make-copilot-document-readable.mjs 260.00 B
101
+ ESM dist/hooks/use-make-copilot-readable.mjs 235.00 B
102
+ ESM dist/hooks/use-tree.mjs 171.00 B
103
+ ESM dist/lib/copilot-task.mjs 410.00 B
104
+ ESM dist/lib/index.mjs 435.00 B
13
105
  ESM dist/index.mjs 1.63 KB
14
- ESM dist/components/index.mjs 407.00 B
15
- ESM dist/context/copilot-context.mjs 219.00 B
16
- ESM dist/hooks/index.mjs 881.00 B
17
106
  ESM dist/chunk-7GFKOIO7.mjs 43.00 B
18
107
  ESM dist/chunk-BABVSMJR.mjs 43.00 B
19
108
  ESM dist/chunk-XDKLZEPZ.mjs 4.39 KB
@@ -22,11 +111,14 @@
22
111
  ESM dist/chunk-EFZPSZWO.mjs 43.00 B
23
112
  ESM dist/chunk-LUGEI4YQ.mjs 43.00 B
24
113
  ESM dist/chunk-OSQO6ASW.mjs 3.17 KB
114
+ ESM dist/components/index.mjs 407.00 B
115
+ ESM dist/context/copilot-context.mjs 219.00 B
25
116
  ESM dist/context/index.mjs 227.00 B
26
117
  ESM dist/chunk-VNRDQJXW.mjs 43.00 B
118
+ ESM dist/hooks/index.mjs 881.00 B
27
119
  ESM dist/chunk-IOP6JX34.mjs 43.00 B
28
120
  ESM dist/chunk-NUQYMU4U.mjs 2.95 KB
29
- ESM dist/chunk-NNUIXO74.mjs 1.07 KB
121
+ ESM dist/chunk-JECDOVIL.mjs 1.06 KB
30
122
  ESM dist/chunk-ZAB22RCR.mjs 700.00 B
31
123
  ESM dist/chunk-4VUJYN3U.mjs 640.00 B
32
124
  ESM dist/chunk-JD7BAH7U.mjs 43.00 B
@@ -38,41 +130,38 @@
38
130
  ESM dist/hooks/use-chat.mjs 174.00 B
39
131
  ESM dist/chunk-AEUR5JBT.mjs 6.28 KB
40
132
  ESM dist/chunk-3WKJ25L3.mjs 2.69 KB
41
- ESM dist/hooks/use-copilot-action-implementation.mjs 317.00 B
133
+ ESM dist/hooks/use-copilot-action-implementation.mjs 259.00 B
42
134
  ESM dist/hooks/use-copilot-action.mjs 248.00 B
43
- ESM dist/chunk-WCI6UGKK.mjs 299.00 B
44
- ESM dist/chunk-UQKARKHD.mjs 2.92 KB
135
+ ESM dist/chunk-PO5VE42C.mjs 299.00 B
136
+ ESM dist/chunk-K3HLWC4F.mjs 1.50 KB
45
137
  ESM dist/chunk-DVLYNQG4.mjs 1.46 KB
46
138
  ESM dist/chunk-MRXNTQOX.mjs 1.89 KB
47
- ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
48
- ESM dist/components/copilot-provider/copilotkit-props.mjs 59.00 B
49
- ESM dist/openai-assistants/hooks/index.mjs 548.00 B
50
- ESM dist/types/document-pointer.mjs 45.00 B
51
- ESM dist/utils/fetch-chat-completion.mjs 319.00 B
52
- ESM dist/lib/copilot-task.mjs 410.00 B
53
- ESM dist/components/copilot-provider/copilotkit.mjs 380.00 B
54
- ESM dist/components/copilot-provider/index.mjs 396.00 B
55
- ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 201.00 B
56
- ESM dist/openai-assistants/hooks/use-assistants.mjs 2.59 KB
57
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 575.00 B
58
- ESM dist/openai-assistants/utils/index.mjs 206.00 B
59
- ESM dist/openai-assistants/index.mjs 597.00 B
60
- ESM dist/types/frontend-action.mjs 44.00 B
61
- ESM dist/types/index.mjs 66.00 B
62
- ESM dist/types/system-message.mjs 43.00 B
63
- ESM dist/utils/utils.test.mjs 170.00 B
64
- ESM dist/utils/utils.mjs 34.00 B
65
- ESM dist/hooks/use-copilot-chat.mjs 500.00 B
66
- ESM dist/hooks/use-flat-category-store.mjs 216.00 B
67
- ESM dist/hooks/use-make-copilot-actionable.mjs 273.00 B
68
- ESM dist/hooks/use-make-copilot-document-readable.mjs 260.00 B
69
- ESM dist/hooks/use-make-copilot-readable.mjs 235.00 B
70
- ESM dist/hooks/use-tree.mjs 171.00 B
71
- ESM dist/lib/index.mjs 435.00 B
139
+ ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
140
+ ESM dist/components/copilot-provider/copilotkit-props.mjs.map 71.00 B
141
+ ESM dist/components/copilot-provider/copilotkit.mjs.map 71.00 B
142
+ ESM dist/components/copilot-provider/index.mjs.map 71.00 B
143
+ ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 71.00 B
144
+ ESM dist/openai-assistants/hooks/index.mjs.map 71.00 B
145
+ ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.67 KB
146
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 71.00 B
147
+ ESM dist/openai-assistants/utils/index.mjs.map 71.00 B
148
+ ESM dist/openai-assistants/index.mjs.map 71.00 B
149
+ ESM dist/types/document-pointer.mjs.map 71.00 B
150
+ ESM dist/types/frontend-action.mjs.map 71.00 B
151
+ ESM dist/types/index.mjs.map 71.00 B
152
+ ESM dist/types/system-message.mjs.map 71.00 B
153
+ ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
154
+ ESM dist/utils/utils.test.mjs.map 352.00 B
155
+ ESM dist/utils/utils.mjs.map 71.00 B
156
+ ESM dist/hooks/use-copilot-chat.mjs.map 71.00 B
157
+ ESM dist/hooks/use-flat-category-store.mjs.map 71.00 B
158
+ ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
159
+ ESM dist/hooks/use-make-copilot-document-readable.mjs.map 71.00 B
160
+ ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
161
+ ESM dist/hooks/use-tree.mjs.map 71.00 B
162
+ ESM dist/lib/copilot-task.mjs.map 71.00 B
163
+ ESM dist/lib/index.mjs.map 71.00 B
72
164
  ESM dist/index.mjs.map 71.00 B
73
- ESM dist/components/index.mjs.map 71.00 B
74
- ESM dist/context/copilot-context.mjs.map 71.00 B
75
- ESM dist/hooks/index.mjs.map 71.00 B
76
165
  ESM dist/chunk-7GFKOIO7.mjs.map 71.00 B
77
166
  ESM dist/chunk-BABVSMJR.mjs.map 71.00 B
78
167
  ESM dist/chunk-XDKLZEPZ.mjs.map 7.90 KB
@@ -81,11 +170,14 @@
81
170
  ESM dist/chunk-EFZPSZWO.mjs.map 71.00 B
82
171
  ESM dist/chunk-LUGEI4YQ.mjs.map 71.00 B
83
172
  ESM dist/chunk-OSQO6ASW.mjs.map 5.57 KB
173
+ ESM dist/components/index.mjs.map 71.00 B
174
+ ESM dist/context/copilot-context.mjs.map 71.00 B
84
175
  ESM dist/context/index.mjs.map 71.00 B
85
176
  ESM dist/chunk-VNRDQJXW.mjs.map 71.00 B
177
+ ESM dist/hooks/index.mjs.map 71.00 B
86
178
  ESM dist/chunk-IOP6JX34.mjs.map 71.00 B
87
179
  ESM dist/chunk-NUQYMU4U.mjs.map 4.68 KB
88
- ESM dist/chunk-NNUIXO74.mjs.map 1.89 KB
180
+ ESM dist/chunk-JECDOVIL.mjs.map 1.89 KB
89
181
  ESM dist/chunk-ZAB22RCR.mjs.map 1.42 KB
90
182
  ESM dist/chunk-4VUJYN3U.mjs.map 1.47 KB
91
183
  ESM dist/chunk-JD7BAH7U.mjs.map 71.00 B
@@ -99,105 +191,13 @@
99
191
  ESM dist/chunk-3WKJ25L3.mjs.map 4.75 KB
100
192
  ESM dist/hooks/use-copilot-action-implementation.mjs.map 71.00 B
101
193
  ESM dist/hooks/use-copilot-action.mjs.map 71.00 B
102
- ESM dist/chunk-WCI6UGKK.mjs.map 1.66 KB
103
- ESM dist/chunk-UQKARKHD.mjs.map 5.94 KB
194
+ ESM dist/chunk-PO5VE42C.mjs.map 1.66 KB
195
+ ESM dist/chunk-K3HLWC4F.mjs.map 3.52 KB
104
196
  ESM dist/chunk-DVLYNQG4.mjs.map 4.77 KB
105
197
  ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
106
- ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
107
- ESM dist/components/copilot-provider/copilotkit-props.mjs.map 71.00 B
108
- ESM dist/openai-assistants/hooks/index.mjs.map 71.00 B
109
- ESM dist/types/document-pointer.mjs.map 71.00 B
110
- ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
111
- ESM dist/lib/copilot-task.mjs.map 71.00 B
112
- ESM dist/components/copilot-provider/copilotkit.mjs.map 71.00 B
113
- ESM dist/components/copilot-provider/index.mjs.map 71.00 B
114
- ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 71.00 B
115
- ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.67 KB
116
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 71.00 B
117
- ESM dist/openai-assistants/utils/index.mjs.map 71.00 B
118
- ESM dist/openai-assistants/index.mjs.map 71.00 B
119
- ESM dist/types/frontend-action.mjs.map 71.00 B
120
- ESM dist/types/index.mjs.map 71.00 B
121
- ESM dist/types/system-message.mjs.map 71.00 B
122
- ESM dist/utils/utils.test.mjs.map 352.00 B
123
- ESM dist/utils/utils.mjs.map 71.00 B
124
- ESM dist/hooks/use-copilot-chat.mjs.map 71.00 B
125
- ESM dist/hooks/use-flat-category-store.mjs.map 71.00 B
126
- ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
127
- ESM dist/hooks/use-make-copilot-document-readable.mjs.map 71.00 B
128
- ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
129
- ESM dist/hooks/use-tree.mjs.map 71.00 B
130
- ESM dist/lib/index.mjs.map 71.00 B
131
- ESM ⚡️ Build success in 186ms
132
- CJS dist/index.js 40.44 KB
133
- CJS dist/components/index.js 15.02 KB
134
- CJS dist/context/copilot-context.js 3.66 KB
135
- CJS dist/context/index.js 3.64 KB
136
- CJS dist/hooks/index.js 21.29 KB
137
- CJS dist/hooks/use-chat.js 11.27 KB
138
- CJS dist/hooks/use-copilot-action-implementation.js 6.57 KB
139
- CJS dist/hooks/use-copilot-action.js 5.17 KB
140
- CJS dist/hooks/use-copilot-chat.js 16.00 KB
141
- CJS dist/hooks/use-flat-category-store.js 2.87 KB
142
- CJS dist/hooks/use-make-copilot-actionable.js 6.12 KB
143
- CJS dist/hooks/use-make-copilot-document-readable.js 4.26 KB
144
- CJS dist/hooks/use-make-copilot-readable.js 4.14 KB
145
- CJS dist/hooks/use-tree.js 5.53 KB
146
- CJS dist/lib/copilot-task.js 7.38 KB
147
- CJS dist/lib/index.js 7.34 KB
148
- CJS dist/openai-assistants/index.js 9.35 KB
149
- CJS dist/types/document-pointer.js 841.00 B
150
- CJS dist/types/frontend-action.js 837.00 B
151
- CJS dist/types/index.js 797.00 B
152
- CJS dist/types/system-message.js 833.00 B
153
- CJS dist/utils/fetch-chat-completion.js 4.95 KB
154
- CJS dist/utils/utils.test.js 184.00 B
155
- CJS dist/utils/utils.js 797.00 B
156
- CJS dist/components/copilot-provider/copilotkit-props.js 878.00 B
157
- CJS dist/components/copilot-provider/copilotkit.js 15.01 KB
158
- CJS dist/components/copilot-provider/index.js 15.06 KB
159
- CJS dist/components/copilot-provider/standard-copilot-api-config.js 1.48 KB
160
- CJS dist/openai-assistants/hooks/index.js 9.25 KB
161
- CJS dist/openai-assistants/hooks/use-assistants.js 4.82 KB
162
- CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js 9.34 KB
163
- CJS dist/openai-assistants/utils/index.js 2.30 KB
164
- CJS dist/openai-assistants/utils/process-message-stream.js 2.33 KB
165
- CJS dist/index.js.map 76.80 KB
166
- CJS dist/components/index.js.map 27.07 KB
167
- CJS dist/context/copilot-context.js.map 4.86 KB
168
- CJS dist/context/index.js.map 5.09 KB
169
- CJS dist/hooks/index.js.map 46.27 KB
170
- CJS dist/hooks/use-chat.js.map 17.88 KB
171
- CJS dist/hooks/use-copilot-action-implementation.js.map 10.69 KB
172
- CJS dist/hooks/use-copilot-action.js.map 11.43 KB
173
- CJS dist/hooks/use-copilot-chat.js.map 33.57 KB
174
- CJS dist/hooks/use-flat-category-store.js.map 4.25 KB
175
- CJS dist/hooks/use-make-copilot-actionable.js.map 11.82 KB
176
- CJS dist/hooks/use-make-copilot-document-readable.js.map 6.17 KB
177
- CJS dist/hooks/use-make-copilot-readable.js.map 6.22 KB
178
- CJS dist/hooks/use-tree.js.map 8.32 KB
179
- CJS dist/lib/copilot-task.js.map 16.37 KB
180
- CJS dist/lib/index.js.map 16.43 KB
181
- CJS dist/openai-assistants/index.js.map 20.32 KB
182
- CJS dist/types/document-pointer.js.map 292.00 B
183
- CJS dist/types/frontend-action.js.map 1.70 KB
184
- CJS dist/types/index.js.map 253.00 B
185
- CJS dist/types/system-message.js.map 249.00 B
186
- CJS dist/utils/fetch-chat-completion.js.map 4.79 KB
187
- CJS dist/utils/utils.test.js.map 354.00 B
188
- CJS dist/utils/utils.js.map 137.00 B
189
- CJS dist/components/copilot-provider/copilotkit-props.js.map 1.12 KB
190
- CJS dist/components/copilot-provider/copilotkit.js.map 27.01 KB
191
- CJS dist/components/copilot-provider/index.js.map 27.20 KB
192
- CJS dist/components/copilot-provider/standard-copilot-api-config.js.map 1.17 KB
193
- CJS dist/openai-assistants/hooks/index.js.map 20.62 KB
194
- CJS dist/openai-assistants/hooks/use-assistants.js.map 5.92 KB
195
- CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 20.23 KB
196
- CJS dist/openai-assistants/utils/index.js.map 1.44 KB
197
- CJS dist/openai-assistants/utils/process-message-stream.js.map 1.33 KB
198
- CJS ⚡️ Build success in 217ms
198
+ ESM ⚡️ Build success in 272ms
199
199
  DTS Build start
200
- DTS ⚡️ Build success in 5862ms
200
+ DTS ⚡️ Build success in 6127ms
201
201
  DTS dist/index.d.ts 1.51 KB
202
202
  DTS dist/components/copilot-provider/copilotkit.d.ts 1.26 KB
203
203
  DTS dist/components/copilot-provider/copilotkit-props.d.ts 1007.00 B
@@ -219,7 +219,7 @@
219
219
  DTS dist/components/index.d.ts 186.00 B
220
220
  DTS dist/context/index.d.ts 267.00 B
221
221
  DTS dist/hooks/index.d.ts 672.00 B
222
- DTS dist/hooks/use-copilot-action-implementation.d.ts 447.00 B
222
+ DTS dist/hooks/use-copilot-action-implementation.d.ts 283.00 B
223
223
  DTS dist/hooks/use-flat-category-store.d.ts 424.00 B
224
224
  DTS dist/lib/index.d.ts 261.00 B
225
225
  DTS dist/openai-assistants/index.d.ts 262.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # ui
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c4010e7: Pre Release
8
+ - be00d61: Alpha
9
+ - ec8481c: Alpha
10
+ - 3fbee5d: OpenAIAdapter-getter
11
+ - e09dc44: Test backward compatibility of AnnotatedFunction on the backend
12
+ - 3f5ad60: OpenAIAdapter: make openai instance gettable
13
+ - 0dd6180: QA
14
+ - 225812d: QA new action type
15
+ - New actions: custom chat components, and typed arguments
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [c4010e7]
20
+ - Updated dependencies [be00d61]
21
+ - Updated dependencies [ec8481c]
22
+ - Updated dependencies [3fbee5d]
23
+ - Updated dependencies [e09dc44]
24
+ - Updated dependencies [3f5ad60]
25
+ - Updated dependencies [0dd6180]
26
+ - Updated dependencies [225812d]
27
+ - Updated dependencies
28
+ - @copilotkit/shared@0.5.0
29
+
30
+ ## 0.21.0-mme-deprecate-annotated-function.4
31
+
32
+ ### Minor Changes
33
+
34
+ - Test backward compatibility of AnnotatedFunction on the backend
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies
39
+ - @copilotkit/shared@0.5.0-mme-deprecate-annotated-function.4
40
+
3
41
  ## 0.21.0-mme-pre-release.3
4
42
 
5
43
  ### Minor Changes
@@ -1,6 +1,3 @@
1
- import {
2
- annotatedFunctionToAction
3
- } from "./chunk-UQKARKHD.mjs";
4
1
  import {
5
2
  CopilotContext
6
3
  } from "./chunk-DVLYNQG4.mjs";
@@ -8,6 +5,7 @@ import {
8
5
  // src/hooks/use-make-copilot-actionable.ts
9
6
  import { useRef, useContext, useEffect, useMemo } from "react";
10
7
  import { nanoid } from "nanoid";
8
+ import { annotatedFunctionToAction } from "@copilotkit/shared";
11
9
  function useMakeCopilotActionable(annotatedFunction, dependencies) {
12
10
  const idRef = useRef(nanoid());
13
11
  const { setEntryPoint, removeEntryPoint } = useContext(CopilotContext);
@@ -32,4 +30,4 @@ function useMakeCopilotActionable(annotatedFunction, dependencies) {
32
30
  export {
33
31
  useMakeCopilotActionable
34
32
  };
35
- //# sourceMappingURL=chunk-NNUIXO74.mjs.map
33
+ //# sourceMappingURL=chunk-JECDOVIL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-make-copilot-actionable.ts"],"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\";\nimport { annotatedFunctionToAction } from \"@copilotkit/shared\";\n\n/**\n * @deprecated Use the useCopilotAction function instead.\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 const action = annotatedFunctionToAction(memoizedAnnotatedFunction as AnnotatedFunction<any[]>);\n setEntryPoint(idRef.current, action);\n\n return () => {\n removeEntryPoint(idRef.current);\n };\n }, [memoizedAnnotatedFunction, setEntryPoint, removeEntryPoint]);\n}\n"],"mappings":";;;;;AAEA,SAAS,QAAQ,YAAY,WAAW,eAAe;AAGvD,SAAS,cAAc;AACvB,SAAS,iCAAiC;AAKnC,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,UAAM,SAAS,0BAA0B,yBAAqD;AAC9F,kBAAc,MAAM,SAAS,MAAM;AAEnC,WAAO,MAAM;AACX,uBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,EACF,GAAG,CAAC,2BAA2B,eAAe,gBAAgB,CAAC;AACjE;","names":[]}
@@ -0,0 +1,47 @@
1
+ import {
2
+ CopilotContext
3
+ } from "./chunk-DVLYNQG4.mjs";
4
+
5
+ // src/hooks/use-copilot-action-implementation.ts
6
+ import { useRef, useContext, useEffect } from "react";
7
+ import { nanoid } from "nanoid";
8
+ function useCopilotActionImplementation(action, dependencies) {
9
+ const { setEntryPoint, removeEntryPoint, entryPoints, chatComponentsCache } = useContext(CopilotContext);
10
+ const idRef = useRef(nanoid());
11
+ if (dependencies === void 0) {
12
+ if (entryPoints[idRef.current]) {
13
+ entryPoints[idRef.current].handler = action.handler;
14
+ if (typeof action.render === "function") {
15
+ if (chatComponentsCache.current !== null) {
16
+ chatComponentsCache.current[action.name] = action.render;
17
+ }
18
+ }
19
+ }
20
+ }
21
+ useEffect(() => {
22
+ setEntryPoint(idRef.current, action);
23
+ if (chatComponentsCache.current !== null && action.render !== void 0) {
24
+ chatComponentsCache.current[action.name] = action.render;
25
+ }
26
+ return () => {
27
+ removeEntryPoint(idRef.current);
28
+ };
29
+ }, [
30
+ setEntryPoint,
31
+ removeEntryPoint,
32
+ action.description,
33
+ action.name,
34
+ // This should be faster than deep equality checking
35
+ // In addition, all major JS engines guarantee the order of object keys
36
+ JSON.stringify(action.parameters),
37
+ // include render only if it's a string
38
+ typeof action.render === "string" ? action.render : void 0,
39
+ // dependencies set by the developer
40
+ ...dependencies || []
41
+ ]);
42
+ }
43
+
44
+ export {
45
+ useCopilotActionImplementation
46
+ };
47
+ //# sourceMappingURL=chunk-K3HLWC4F.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-copilot-action-implementation.ts"],"sourcesContent":["\"use client\";\n\nimport { Action, AnnotatedFunction, Parameter } from \"@copilotkit/shared\";\nimport { useRef, useContext, useEffect } from \"react\";\nimport { FrontendAction } from \"../types/frontend-action\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { nanoid } from \"nanoid\";\n\n// We implement useCopilotActionImplementation dependency handling so that\n// the developer has the option to not provide any dependencies.\n// In this case, we assume they want to update the handler on each rerender.\n// To avoid getting stuck in an infinite loop, we update the handler directly,\n// skipping React state updates.\n// This is ok in this case, because the handler is not part of any UI that\n// needs to be updated.\n// useCallback, useMemo or other memoization techniques are not suitable here,\n// because they will cause a infinite rerender loop.\nexport function useCopilotActionImplementation<T extends Array<any> = []>(\n action: FrontendAction<T>,\n dependencies?: any[],\n): void {\n const { setEntryPoint, removeEntryPoint, entryPoints, chatComponentsCache } =\n useContext(CopilotContext);\n const idRef = useRef<string>(nanoid());\n\n // If the developer doesn't provide dependencies, we assume they want to\n // update handler and render function when the action object changes.\n // This ensures that any captured variables in the handler are up to date.\n if (dependencies === undefined) {\n if (entryPoints[idRef.current]) {\n entryPoints[idRef.current].handler = action.handler;\n if (typeof action.render === \"function\") {\n if (chatComponentsCache.current !== null) {\n chatComponentsCache.current[action.name] = action.render;\n }\n }\n }\n }\n\n useEffect(() => {\n setEntryPoint(idRef.current, action);\n if (chatComponentsCache.current !== null && action.render !== undefined) {\n chatComponentsCache.current[action.name] = action.render;\n }\n return () => {\n // NOTE: For now, we don't remove the chatComponentsCache entry when the action is removed.\n // This is because we currently don't have access to the messages array in CopilotContext.\n removeEntryPoint(idRef.current);\n };\n }, [\n setEntryPoint,\n removeEntryPoint,\n action.description,\n action.name,\n // This should be faster than deep equality checking\n // In addition, all major JS engines guarantee the order of object keys\n JSON.stringify(action.parameters),\n // include render only if it's a string\n typeof action.render === \"string\" ? action.render : undefined,\n // dependencies set by the developer\n ...(dependencies || []),\n ]);\n}\n"],"mappings":";;;;;AAGA,SAAS,QAAQ,YAAY,iBAAiB;AAG9C,SAAS,cAAc;AAWhB,SAAS,+BACd,QACA,cACM;AACN,QAAM,EAAE,eAAe,kBAAkB,aAAa,oBAAoB,IACxE,WAAW,cAAc;AAC3B,QAAM,QAAQ,OAAe,OAAO,CAAC;AAKrC,MAAI,iBAAiB,QAAW;AAC9B,QAAI,YAAY,MAAM,OAAO,GAAG;AAC9B,kBAAY,MAAM,OAAO,EAAE,UAAU,OAAO;AAC5C,UAAI,OAAO,OAAO,WAAW,YAAY;AACvC,YAAI,oBAAoB,YAAY,MAAM;AACxC,8BAAoB,QAAQ,OAAO,IAAI,IAAI,OAAO;AAAA,QACpD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,YAAU,MAAM;AACd,kBAAc,MAAM,SAAS,MAAM;AACnC,QAAI,oBAAoB,YAAY,QAAQ,OAAO,WAAW,QAAW;AACvE,0BAAoB,QAAQ,OAAO,IAAI,IAAI,OAAO;AAAA,IACpD;AACA,WAAO,MAAM;AAGX,uBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA;AAAA;AAAA,IAGP,KAAK,UAAU,OAAO,UAAU;AAAA;AAAA,IAEhC,OAAO,OAAO,WAAW,WAAW,OAAO,SAAS;AAAA;AAAA,IAEpD,GAAI,gBAAgB,CAAC;AAAA,EACvB,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotActionImplementation
3
- } from "./chunk-UQKARKHD.mjs";
3
+ } from "./chunk-K3HLWC4F.mjs";
4
4
 
5
5
  // src/hooks/use-copilot-action.ts
6
6
  function useCopilotAction(action, dependencies) {
@@ -10,4 +10,4 @@ function useCopilotAction(action, dependencies) {
10
10
  export {
11
11
  useCopilotAction
12
12
  };
13
- //# sourceMappingURL=chunk-WCI6UGKK.mjs.map
13
+ //# sourceMappingURL=chunk-PO5VE42C.mjs.map
@@ -451,15 +451,36 @@ ${additionalInstructions}` : "");
451
451
  }
452
452
 
453
453
  // src/hooks/use-make-copilot-actionable.ts
454
- var import_react6 = require("react");
455
- var import_nanoid3 = require("nanoid");
456
-
457
- // src/hooks/use-copilot-action-implementation.ts
458
454
  var import_react5 = require("react");
459
455
  var import_nanoid2 = require("nanoid");
460
- function useCopilotActionImplementation(action, dependencies) {
461
- const { setEntryPoint, removeEntryPoint, entryPoints, chatComponentsCache } = (0, import_react5.useContext)(CopilotContext);
456
+ var import_shared4 = require("@copilotkit/shared");
457
+ function useMakeCopilotActionable(annotatedFunction, dependencies) {
462
458
  const idRef = (0, import_react5.useRef)((0, import_nanoid2.nanoid)());
459
+ const { setEntryPoint, removeEntryPoint } = (0, import_react5.useContext)(CopilotContext);
460
+ const memoizedAnnotatedFunction = (0, import_react5.useMemo)(
461
+ () => ({
462
+ name: annotatedFunction.name,
463
+ description: annotatedFunction.description,
464
+ argumentAnnotations: annotatedFunction.argumentAnnotations,
465
+ implementation: annotatedFunction.implementation
466
+ }),
467
+ dependencies
468
+ );
469
+ (0, import_react5.useEffect)(() => {
470
+ const action = (0, import_shared4.annotatedFunctionToAction)(memoizedAnnotatedFunction);
471
+ setEntryPoint(idRef.current, action);
472
+ return () => {
473
+ removeEntryPoint(idRef.current);
474
+ };
475
+ }, [memoizedAnnotatedFunction, setEntryPoint, removeEntryPoint]);
476
+ }
477
+
478
+ // src/hooks/use-copilot-action-implementation.ts
479
+ var import_react6 = require("react");
480
+ var import_nanoid3 = require("nanoid");
481
+ function useCopilotActionImplementation(action, dependencies) {
482
+ const { setEntryPoint, removeEntryPoint, entryPoints, chatComponentsCache } = (0, import_react6.useContext)(CopilotContext);
483
+ const idRef = (0, import_react6.useRef)((0, import_nanoid3.nanoid)());
463
484
  if (dependencies === void 0) {
464
485
  if (entryPoints[idRef.current]) {
465
486
  entryPoints[idRef.current].handler = action.handler;
@@ -470,7 +491,7 @@ function useCopilotActionImplementation(action, dependencies) {
470
491
  }
471
492
  }
472
493
  }
473
- (0, import_react5.useEffect)(() => {
494
+ (0, import_react6.useEffect)(() => {
474
495
  setEntryPoint(idRef.current, action);
475
496
  if (chatComponentsCache.current !== null && action.render !== void 0) {
476
497
  chatComponentsCache.current[action.name] = action.render;
@@ -492,75 +513,6 @@ function useCopilotActionImplementation(action, dependencies) {
492
513
  ...dependencies || []
493
514
  ]);
494
515
  }
495
- function annotatedFunctionToAction(annotatedFunction) {
496
- const parameters = annotatedFunction.argumentAnnotations.map((annotation) => {
497
- switch (annotation.type) {
498
- case "string":
499
- case "number":
500
- case "boolean":
501
- case "object":
502
- return {
503
- name: annotation.name,
504
- description: annotation.description,
505
- type: annotation.type,
506
- required: annotation.required
507
- };
508
- case "array":
509
- let type;
510
- if (annotation.items.type === "string") {
511
- type = "string[]";
512
- } else if (annotation.items.type === "number") {
513
- type = "number[]";
514
- } else if (annotation.items.type === "boolean") {
515
- type = "boolean[]";
516
- } else if (annotation.items.type === "object") {
517
- type = "object[]";
518
- } else {
519
- type = "string[]";
520
- }
521
- return {
522
- name: annotation.name,
523
- description: annotation.description,
524
- type,
525
- required: annotation.required
526
- };
527
- }
528
- });
529
- return {
530
- name: annotatedFunction.name,
531
- description: annotatedFunction.description,
532
- parameters,
533
- handler: (args) => {
534
- const paramsInCorrectOrder = [];
535
- for (let arg of annotatedFunction.argumentAnnotations) {
536
- paramsInCorrectOrder.push(args[arg.name]);
537
- }
538
- return annotatedFunction.implementation(...paramsInCorrectOrder);
539
- }
540
- };
541
- }
542
-
543
- // src/hooks/use-make-copilot-actionable.ts
544
- function useMakeCopilotActionable(annotatedFunction, dependencies) {
545
- const idRef = (0, import_react6.useRef)((0, import_nanoid3.nanoid)());
546
- const { setEntryPoint, removeEntryPoint } = (0, import_react6.useContext)(CopilotContext);
547
- const memoizedAnnotatedFunction = (0, import_react6.useMemo)(
548
- () => ({
549
- name: annotatedFunction.name,
550
- description: annotatedFunction.description,
551
- argumentAnnotations: annotatedFunction.argumentAnnotations,
552
- implementation: annotatedFunction.implementation
553
- }),
554
- dependencies
555
- );
556
- (0, import_react6.useEffect)(() => {
557
- const action = annotatedFunctionToAction(memoizedAnnotatedFunction);
558
- setEntryPoint(idRef.current, action);
559
- return () => {
560
- removeEntryPoint(idRef.current);
561
- };
562
- }, [memoizedAnnotatedFunction, setEntryPoint, removeEntryPoint]);
563
- }
564
516
 
565
517
  // src/hooks/use-copilot-action.ts
566
518
  function useCopilotAction(action, dependencies) {