@copilotkit/react-core 0.25.0-mme-cloud.4 → 0.25.0-mme-cloud.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.turbo/turbo-build.log +118 -111
  2. package/CHANGELOG.md +43 -11
  3. package/dist/{chunk-MESZST5T.mjs → chunk-4NNFSZOY.mjs} +11 -1
  4. package/dist/chunk-4NNFSZOY.mjs.map +1 -0
  5. package/dist/{chunk-SFV4PSJM.mjs → chunk-6VF626RG.mjs} +3 -3
  6. package/dist/{chunk-IR5I4Q6R.mjs → chunk-72BJ3A3S.mjs} +1 -1
  7. package/dist/chunk-72BJ3A3S.mjs.map +1 -0
  8. package/dist/{chunk-VYD7RO32.mjs → chunk-7LVVZQRG.mjs} +3 -3
  9. package/dist/chunk-7LVVZQRG.mjs.map +1 -0
  10. package/dist/chunk-EYKDJBDE.mjs +1 -0
  11. package/dist/{chunk-NQKBX6UJ.mjs → chunk-KTUNGBJF.mjs} +1 -1
  12. package/dist/chunk-KTUNGBJF.mjs.map +1 -0
  13. package/dist/{chunk-DW3HRHJB.mjs → chunk-M6WULIFO.mjs} +2 -2
  14. package/dist/{chunk-UNYZRMB2.mjs → chunk-OWBDHSLH.mjs} +5 -5
  15. package/dist/chunk-OWBDHSLH.mjs.map +1 -0
  16. package/dist/chunk-ZIR7KCEA.mjs +28 -0
  17. package/dist/chunk-ZIR7KCEA.mjs.map +1 -0
  18. package/dist/components/copilot-provider/copilotkit-props.d.ts +6 -2
  19. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  20. package/dist/components/copilot-provider/copilotkit.d.ts +1 -1
  21. package/dist/components/copilot-provider/copilotkit.js +2 -2
  22. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  23. package/dist/components/copilot-provider/copilotkit.mjs +1 -1
  24. package/dist/components/copilot-provider/index.js +2 -2
  25. package/dist/components/copilot-provider/index.js.map +1 -1
  26. package/dist/components/copilot-provider/index.mjs +1 -1
  27. package/dist/components/index.js +2 -2
  28. package/dist/components/index.js.map +1 -1
  29. package/dist/components/index.mjs +1 -1
  30. package/dist/hooks/index.d.ts +1 -0
  31. package/dist/hooks/index.js +32 -0
  32. package/dist/hooks/index.js.map +1 -1
  33. package/dist/hooks/index.mjs +10 -6
  34. package/dist/hooks/use-chat.js +10 -0
  35. package/dist/hooks/use-chat.js.map +1 -1
  36. package/dist/hooks/use-chat.mjs +1 -1
  37. package/dist/hooks/use-copilot-action.js.map +1 -1
  38. package/dist/hooks/use-copilot-action.mjs +1 -1
  39. package/dist/hooks/use-copilot-chat.js +10 -0
  40. package/dist/hooks/use-copilot-chat.js.map +1 -1
  41. package/dist/hooks/use-copilot-chat.mjs +3 -3
  42. package/dist/hooks/use-copilot-readable.d.ts +33 -0
  43. package/dist/hooks/use-copilot-readable.js +123 -0
  44. package/dist/hooks/use-copilot-readable.js.map +1 -0
  45. package/dist/hooks/use-copilot-readable.mjs +9 -0
  46. package/dist/hooks/use-copilot-readable.mjs.map +1 -0
  47. package/dist/hooks/use-make-copilot-readable.d.ts +1 -5
  48. package/dist/hooks/use-make-copilot-readable.js.map +1 -1
  49. package/dist/hooks/use-make-copilot-readable.mjs +1 -1
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +45 -13
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.mjs +16 -12
  54. package/dist/lib/copilot-task.d.ts +7 -2
  55. package/dist/lib/copilot-task.js +3 -3
  56. package/dist/lib/copilot-task.js.map +1 -1
  57. package/dist/lib/copilot-task.mjs +2 -2
  58. package/dist/lib/index.js +3 -3
  59. package/dist/lib/index.js.map +1 -1
  60. package/dist/lib/index.mjs +2 -2
  61. package/dist/openai-assistants/hooks/index.js.map +1 -1
  62. package/dist/openai-assistants/hooks/index.mjs +2 -2
  63. package/dist/openai-assistants/hooks/use-copilot-chat-v2.js.map +1 -1
  64. package/dist/openai-assistants/hooks/use-copilot-chat-v2.mjs +2 -2
  65. package/dist/openai-assistants/index.js.map +1 -1
  66. package/dist/openai-assistants/index.mjs +2 -2
  67. package/package.json +4 -4
  68. package/src/components/copilot-provider/copilotkit-props.tsx +7 -2
  69. package/src/components/copilot-provider/copilotkit.tsx +3 -3
  70. package/src/hooks/index.ts +1 -0
  71. package/src/hooks/use-chat.ts +10 -0
  72. package/src/hooks/use-copilot-action.ts +2 -2
  73. package/src/hooks/use-copilot-readable.ts +60 -0
  74. package/src/hooks/use-make-copilot-readable.ts +1 -5
  75. package/src/lib/copilot-task.ts +12 -5
  76. package/dist/chunk-IOP6JX34.mjs +0 -1
  77. package/dist/chunk-IR5I4Q6R.mjs.map +0 -1
  78. package/dist/chunk-MESZST5T.mjs.map +0 -1
  79. package/dist/chunk-NQKBX6UJ.mjs.map +0 -1
  80. package/dist/chunk-UNYZRMB2.mjs.map +0 -1
  81. package/dist/chunk-VYD7RO32.mjs.map +0 -1
  82. /package/dist/{chunk-SFV4PSJM.mjs.map → chunk-6VF626RG.mjs.map} +0 -0
  83. /package/dist/{chunk-IOP6JX34.mjs.map → chunk-EYKDJBDE.mjs.map} +0 -0
  84. /package/dist/{chunk-DW3HRHJB.mjs.map → chunk-M6WULIFO.mjs.map} +0 -0
@@ -1,8 +1,8 @@
1
1
 
2
- > @copilotkit/react-core@0.25.0-mme-cloud.4 build /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core
2
+ > @copilotkit/react-core@0.25.0-mme-cloud.6 build /home/runner/work/CopilotKit/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-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/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-action.ts, src/hooks/use-copilot-chat.ts, src/hooks/use-copilot-readable.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/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: /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core/tsup.config.ts
@@ -10,203 +10,210 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 40.06 KB
14
- CJS dist/components/index.js 15.87 KB
15
- CJS dist/context/copilot-context.js 3.71 KB
16
- CJS dist/hooks/index.js 20.11 KB
17
- CJS dist/lib/copilot-task.js 7.45 KB
18
- CJS dist/openai-assistants/index.js 9.41 KB
13
+ CJS dist/lib/copilot-task.js 7.49 KB
19
14
  CJS dist/types/document-pointer.js 841.00 B
20
15
  CJS dist/utils/fetch-chat-completion.js 5.03 KB
21
16
  CJS dist/components/copilot-provider/copilotkit-props.js 864.00 B
22
- CJS dist/openai-assistants/hooks/index.js 9.31 KB
23
17
  CJS dist/openai-assistants/utils/index.js 2.30 KB
18
+ CJS dist/index.js 41.26 KB
19
+ CJS dist/components/index.js 15.91 KB
20
+ CJS dist/context/copilot-context.js 3.71 KB
24
21
  CJS dist/context/index.js 3.70 KB
25
- CJS dist/hooks/use-chat.js 11.51 KB
22
+ CJS dist/hooks/index.js 21.23 KB
23
+ CJS dist/hooks/use-chat.js 11.76 KB
26
24
  CJS dist/hooks/use-copilot-action.js 5.00 KB
27
- CJS dist/hooks/use-copilot-chat.js 16.36 KB
25
+ CJS dist/hooks/use-copilot-chat.js 16.61 KB
26
+ CJS dist/hooks/use-copilot-readable.js 4.42 KB
28
27
  CJS dist/hooks/use-flat-category-store.js 2.87 KB
29
28
  CJS dist/hooks/use-make-copilot-actionable.js 4.68 KB
30
29
  CJS dist/hooks/use-make-copilot-document-readable.js 4.31 KB
31
30
  CJS dist/hooks/use-make-copilot-readable.js 4.19 KB
32
31
  CJS dist/hooks/use-tree.js 5.53 KB
33
- CJS dist/lib/index.js 7.41 KB
32
+ CJS dist/lib/index.js 7.45 KB
33
+ CJS dist/openai-assistants/index.js 9.41 KB
34
34
  CJS dist/types/frontend-action.js 837.00 B
35
35
  CJS dist/types/index.js 797.00 B
36
36
  CJS dist/types/system-message.js 833.00 B
37
37
  CJS dist/utils/utils.test.js 184.00 B
38
38
  CJS dist/utils/utils.js 797.00 B
39
- CJS dist/components/copilot-provider/copilotkit.js 15.85 KB
40
- CJS dist/components/copilot-provider/index.js 15.91 KB
39
+ CJS dist/components/copilot-provider/copilotkit.js 15.89 KB
40
+ CJS dist/components/copilot-provider/index.js 15.95 KB
41
+ CJS dist/openai-assistants/hooks/index.js 9.31 KB
41
42
  CJS dist/openai-assistants/hooks/use-assistants.js 4.81 KB
42
43
  CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js 9.40 KB
43
44
  CJS dist/openai-assistants/utils/process-message-stream.js 2.33 KB
44
- CJS dist/index.js.map 75.09 KB
45
- CJS dist/components/index.js.map 28.00 KB
46
- CJS dist/context/copilot-context.js.map 5.39 KB
47
- CJS dist/hooks/index.js.map 44.93 KB
48
- CJS dist/lib/copilot-task.js.map 17.28 KB
49
- CJS dist/openai-assistants/index.js.map 21.64 KB
45
+ CJS dist/lib/copilot-task.js.map 17.56 KB
50
46
  CJS dist/types/document-pointer.js.map 292.00 B
51
47
  CJS dist/utils/fetch-chat-completion.js.map 4.90 KB
52
- CJS dist/components/copilot-provider/copilotkit-props.js.map 1.34 KB
53
- CJS dist/openai-assistants/hooks/index.js.map 21.94 KB
48
+ CJS dist/components/copilot-provider/copilotkit-props.js.map 1.44 KB
54
49
  CJS dist/openai-assistants/utils/index.js.map 1.44 KB
50
+ CJS dist/index.js.map 77.77 KB
51
+ CJS dist/components/index.js.map 28.06 KB
52
+ CJS dist/context/copilot-context.js.map 5.39 KB
55
53
  CJS dist/context/index.js.map 5.62 KB
56
- CJS dist/hooks/use-chat.js.map 18.43 KB
57
- CJS dist/hooks/use-copilot-action.js.map 9.54 KB
58
- CJS dist/hooks/use-copilot-chat.js.map 35.53 KB
54
+ CJS dist/hooks/index.js.map 47.41 KB
55
+ CJS dist/hooks/use-chat.js.map 18.82 KB
56
+ CJS dist/hooks/use-copilot-action.js.map 9.56 KB
57
+ CJS dist/hooks/use-copilot-chat.js.map 35.96 KB
58
+ CJS dist/hooks/use-copilot-readable.js.map 7.66 KB
59
59
  CJS dist/hooks/use-flat-category-store.js.map 4.25 KB
60
60
  CJS dist/hooks/use-make-copilot-actionable.js.map 7.14 KB
61
61
  CJS dist/hooks/use-make-copilot-document-readable.js.map 6.68 KB
62
- CJS dist/hooks/use-make-copilot-readable.js.map 6.73 KB
62
+ CJS dist/hooks/use-make-copilot-readable.js.map 6.36 KB
63
63
  CJS dist/hooks/use-tree.js.map 8.32 KB
64
- CJS dist/lib/index.js.map 17.34 KB
64
+ CJS dist/lib/index.js.map 17.63 KB
65
+ CJS dist/openai-assistants/index.js.map 21.68 KB
65
66
  CJS dist/types/frontend-action.js.map 1.77 KB
66
67
  CJS dist/types/index.js.map 338.00 B
67
68
  CJS dist/types/system-message.js.map 249.00 B
68
69
  CJS dist/utils/utils.test.js.map 354.00 B
69
70
  CJS dist/utils/utils.js.map 137.00 B
70
- CJS dist/components/copilot-provider/copilotkit.js.map 27.93 KB
71
- CJS dist/components/copilot-provider/index.js.map 28.13 KB
71
+ CJS dist/components/copilot-provider/copilotkit.js.map 28.00 KB
72
+ CJS dist/components/copilot-provider/index.js.map 28.19 KB
73
+ CJS dist/openai-assistants/hooks/index.js.map 21.98 KB
72
74
  CJS dist/openai-assistants/hooks/use-assistants.js.map 5.90 KB
73
- CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 21.56 KB
75
+ CJS dist/openai-assistants/hooks/use-copilot-chat-v2.js.map 21.60 KB
74
76
  CJS dist/openai-assistants/utils/process-message-stream.js.map 1.33 KB
75
- CJS ⚡️ Build success in 238ms
76
- ESM dist/components/copilot-provider/copilotkit.mjs 331.00 B
77
- ESM dist/components/copilot-provider/index.mjs 361.00 B
78
- ESM dist/openai-assistants/hooks/index.mjs 513.00 B
79
- ESM dist/openai-assistants/hooks/use-assistants.mjs 2.57 KB
80
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 540.00 B
81
- ESM dist/openai-assistants/utils/index.mjs 206.00 B
82
- ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
83
- ESM dist/types/document-pointer.mjs 45.00 B
84
- ESM dist/types/frontend-action.mjs 44.00 B
85
- ESM dist/types/index.mjs 66.00 B
86
- ESM dist/types/system-message.mjs 43.00 B
87
- ESM dist/utils/fetch-chat-completion.mjs 319.00 B
88
- ESM dist/utils/utils.test.mjs 170.00 B
89
- ESM dist/utils/utils.mjs 34.00 B
90
- ESM dist/components/copilot-provider/copilotkit-props.mjs 45.00 B
91
- ESM dist/hooks/use-flat-category-store.mjs 216.00 B
92
- ESM dist/hooks/use-make-copilot-actionable.mjs 227.00 B
93
- ESM dist/hooks/use-make-copilot-document-readable.mjs 246.00 B
94
- ESM dist/hooks/use-make-copilot-readable.mjs 221.00 B
95
- ESM dist/hooks/use-tree.mjs 171.00 B
96
- ESM dist/lib/copilot-task.mjs 378.00 B
97
- ESM dist/lib/index.mjs 403.00 B
98
- ESM dist/openai-assistants/index.mjs 565.00 B
99
- ESM dist/index.mjs 1.58 KB
100
- ESM dist/chunk-EFZPSZWO.mjs 43.00 B
101
- ESM dist/chunk-LUGEI4YQ.mjs 43.00 B
102
- ESM dist/chunk-UNYZRMB2.mjs 3.17 KB
77
+ CJS ⚡️ Build success in 182ms
78
+ ESM dist/index.mjs 1.67 KB
79
+ ESM dist/components/index.mjs 375.00 B
80
+ ESM dist/context/copilot-context.mjs 205.00 B
81
+ ESM dist/hooks/index.mjs 901.00 B
103
82
  ESM dist/chunk-7GFKOIO7.mjs 43.00 B
104
83
  ESM dist/chunk-BABVSMJR.mjs 43.00 B
105
- ESM dist/chunk-DW3HRHJB.mjs 4.39 KB
84
+ ESM dist/chunk-M6WULIFO.mjs 4.39 KB
106
85
  ESM dist/chunk-FRAKUJWH.mjs 43.00 B
86
+ ESM dist/chunk-EFZPSZWO.mjs 43.00 B
107
87
  ESM dist/chunk-MZ5UN3BY.mjs 802.00 B
108
- ESM dist/components/index.mjs 375.00 B
109
- ESM dist/context/copilot-context.mjs 205.00 B
88
+ ESM dist/chunk-LUGEI4YQ.mjs 43.00 B
89
+ ESM dist/chunk-OWBDHSLH.mjs 3.21 KB
110
90
  ESM dist/context/index.mjs 227.00 B
111
91
  ESM dist/chunk-VNRDQJXW.mjs 43.00 B
112
- ESM dist/hooks/index.mjs 817.00 B
113
- ESM dist/chunk-IOP6JX34.mjs 43.00 B
92
+ ESM dist/chunk-EYKDJBDE.mjs 43.00 B
93
+ ESM dist/chunk-ZIR7KCEA.mjs 909.00 B
114
94
  ESM dist/chunk-6ARSX7BW.mjs 1.06 KB
115
95
  ESM dist/chunk-PC6FY3LD.mjs 700.00 B
116
- ESM dist/chunk-NQKBX6UJ.mjs 640.00 B
96
+ ESM dist/chunk-KTUNGBJF.mjs 640.00 B
117
97
  ESM dist/hooks/use-chat.mjs 174.00 B
118
98
  ESM dist/hooks/use-copilot-action.mjs 202.00 B
119
- ESM dist/chunk-IR5I4Q6R.mjs 1.46 KB
99
+ ESM dist/chunk-72BJ3A3S.mjs 1.46 KB
120
100
  ESM dist/hooks/use-copilot-chat.mjs 468.00 B
121
- ESM dist/chunk-SFV4PSJM.mjs 3.00 KB
101
+ ESM dist/chunk-6VF626RG.mjs 3.00 KB
122
102
  ESM dist/chunk-JD7BAH7U.mjs 43.00 B
123
103
  ESM dist/chunk-SPCZTZCY.mjs 43.00 B
124
- ESM dist/chunk-VYD7RO32.mjs 5.42 KB
104
+ ESM dist/chunk-7LVVZQRG.mjs 5.46 KB
125
105
  ESM dist/chunk-YULKJPY3.mjs 1.84 KB
126
106
  ESM dist/chunk-VUY2K2DI.mjs 3.89 KB
127
- ESM dist/chunk-MESZST5T.mjs 6.49 KB
107
+ ESM dist/chunk-4NNFSZOY.mjs 6.73 KB
128
108
  ESM dist/chunk-CGT3AVYT.mjs 2.77 KB
129
109
  ESM dist/chunk-O35YOIHC.mjs 1.52 KB
130
110
  ESM dist/chunk-MRXNTQOX.mjs 1.89 KB
131
- ESM dist/components/copilot-provider/copilotkit.mjs.map 71.00 B
132
- ESM dist/components/copilot-provider/index.mjs.map 71.00 B
133
- ESM dist/openai-assistants/hooks/index.mjs.map 71.00 B
134
- ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.65 KB
135
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 71.00 B
136
- ESM dist/openai-assistants/utils/index.mjs.map 71.00 B
137
- ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
138
- ESM dist/types/document-pointer.mjs.map 71.00 B
139
- ESM dist/types/frontend-action.mjs.map 71.00 B
140
- ESM dist/types/index.mjs.map 71.00 B
141
- ESM dist/types/system-message.mjs.map 71.00 B
142
- ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
143
- ESM dist/utils/utils.test.mjs.map 352.00 B
144
- ESM dist/utils/utils.mjs.map 71.00 B
145
- ESM dist/components/copilot-provider/copilotkit-props.mjs.map 71.00 B
146
- ESM dist/hooks/use-flat-category-store.mjs.map 71.00 B
147
- ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
148
- ESM dist/hooks/use-make-copilot-document-readable.mjs.map 71.00 B
149
- ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
150
- ESM dist/hooks/use-tree.mjs.map 71.00 B
151
- ESM dist/lib/copilot-task.mjs.map 71.00 B
152
- ESM dist/lib/index.mjs.map 71.00 B
153
- ESM dist/openai-assistants/index.mjs.map 71.00 B
111
+ ESM dist/openai-assistants/hooks/index.mjs 513.00 B
112
+ ESM dist/components/copilot-provider/copilotkit-props.mjs 45.00 B
113
+ ESM dist/components/copilot-provider/copilotkit.mjs 331.00 B
114
+ ESM dist/components/copilot-provider/index.mjs 361.00 B
115
+ ESM dist/openai-assistants/hooks/use-assistants.mjs 2.57 KB
116
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 540.00 B
117
+ ESM dist/openai-assistants/utils/index.mjs 206.00 B
118
+ ESM dist/openai-assistants/utils/process-message-stream.mjs 188.00 B
119
+ ESM dist/openai-assistants/index.mjs 565.00 B
120
+ ESM dist/types/frontend-action.mjs 44.00 B
121
+ ESM dist/types/document-pointer.mjs 45.00 B
122
+ ESM dist/types/index.mjs 66.00 B
123
+ ESM dist/types/system-message.mjs 43.00 B
124
+ ESM dist/utils/fetch-chat-completion.mjs 319.00 B
125
+ ESM dist/utils/utils.test.mjs 170.00 B
126
+ ESM dist/hooks/use-copilot-readable.mjs 208.00 B
127
+ ESM dist/hooks/use-flat-category-store.mjs 216.00 B
128
+ ESM dist/utils/utils.mjs 34.00 B
129
+ ESM dist/hooks/use-make-copilot-actionable.mjs 227.00 B
130
+ ESM dist/hooks/use-make-copilot-document-readable.mjs 246.00 B
131
+ ESM dist/hooks/use-make-copilot-readable.mjs 221.00 B
132
+ ESM dist/hooks/use-tree.mjs 171.00 B
133
+ ESM dist/lib/copilot-task.mjs 378.00 B
134
+ ESM dist/lib/index.mjs 403.00 B
154
135
  ESM dist/index.mjs.map 71.00 B
155
- ESM dist/chunk-EFZPSZWO.mjs.map 71.00 B
156
- ESM dist/chunk-LUGEI4YQ.mjs.map 71.00 B
157
- ESM dist/chunk-UNYZRMB2.mjs.map 5.57 KB
136
+ ESM dist/components/index.mjs.map 71.00 B
137
+ ESM dist/context/copilot-context.mjs.map 71.00 B
138
+ ESM dist/hooks/index.mjs.map 71.00 B
158
139
  ESM dist/chunk-7GFKOIO7.mjs.map 71.00 B
159
140
  ESM dist/chunk-BABVSMJR.mjs.map 71.00 B
160
- ESM dist/chunk-DW3HRHJB.mjs.map 7.90 KB
141
+ ESM dist/chunk-M6WULIFO.mjs.map 7.90 KB
161
142
  ESM dist/chunk-FRAKUJWH.mjs.map 71.00 B
143
+ ESM dist/chunk-EFZPSZWO.mjs.map 71.00 B
162
144
  ESM dist/chunk-MZ5UN3BY.mjs.map 1.26 KB
163
- ESM dist/components/index.mjs.map 71.00 B
164
- ESM dist/context/copilot-context.mjs.map 71.00 B
145
+ ESM dist/chunk-LUGEI4YQ.mjs.map 71.00 B
146
+ ESM dist/chunk-OWBDHSLH.mjs.map 5.81 KB
165
147
  ESM dist/context/index.mjs.map 71.00 B
166
148
  ESM dist/chunk-VNRDQJXW.mjs.map 71.00 B
167
- ESM dist/hooks/index.mjs.map 71.00 B
168
- ESM dist/chunk-IOP6JX34.mjs.map 71.00 B
149
+ ESM dist/chunk-EYKDJBDE.mjs.map 71.00 B
150
+ ESM dist/chunk-ZIR7KCEA.mjs.map 2.38 KB
169
151
  ESM dist/chunk-6ARSX7BW.mjs.map 1.87 KB
170
152
  ESM dist/chunk-PC6FY3LD.mjs.map 1.40 KB
171
- ESM dist/chunk-NQKBX6UJ.mjs.map 1.45 KB
153
+ ESM dist/chunk-KTUNGBJF.mjs.map 1.08 KB
172
154
  ESM dist/hooks/use-chat.mjs.map 71.00 B
173
155
  ESM dist/hooks/use-copilot-action.mjs.map 71.00 B
174
- ESM dist/chunk-IR5I4Q6R.mjs.map 4.27 KB
175
156
  ESM dist/hooks/use-copilot-chat.mjs.map 71.00 B
176
- ESM dist/chunk-SFV4PSJM.mjs.map 4.77 KB
157
+ ESM dist/chunk-72BJ3A3S.mjs.map 4.28 KB
158
+ ESM dist/chunk-6VF626RG.mjs.map 4.77 KB
177
159
  ESM dist/chunk-JD7BAH7U.mjs.map 71.00 B
178
160
  ESM dist/chunk-SPCZTZCY.mjs.map 71.00 B
179
- ESM dist/chunk-VYD7RO32.mjs.map 10.23 KB
161
+ ESM dist/chunk-7LVVZQRG.mjs.map 10.29 KB
180
162
  ESM dist/chunk-YULKJPY3.mjs.map 4.21 KB
181
163
  ESM dist/chunk-VUY2K2DI.mjs.map 8.27 KB
182
- ESM dist/chunk-MESZST5T.mjs.map 13.84 KB
164
+ ESM dist/chunk-4NNFSZOY.mjs.map 14.23 KB
183
165
  ESM dist/chunk-CGT3AVYT.mjs.map 4.86 KB
184
166
  ESM dist/chunk-O35YOIHC.mjs.map 5.30 KB
185
167
  ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
186
- ESM ⚡️ Build success in 248ms
168
+ ESM dist/openai-assistants/hooks/index.mjs.map 71.00 B
169
+ ESM dist/components/copilot-provider/copilotkit-props.mjs.map 71.00 B
170
+ ESM dist/components/copilot-provider/copilotkit.mjs.map 71.00 B
171
+ ESM dist/components/copilot-provider/index.mjs.map 71.00 B
172
+ ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.65 KB
173
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 71.00 B
174
+ ESM dist/openai-assistants/utils/index.mjs.map 71.00 B
175
+ ESM dist/openai-assistants/utils/process-message-stream.mjs.map 71.00 B
176
+ ESM dist/openai-assistants/index.mjs.map 71.00 B
177
+ ESM dist/types/frontend-action.mjs.map 71.00 B
178
+ ESM dist/types/document-pointer.mjs.map 71.00 B
179
+ ESM dist/types/index.mjs.map 71.00 B
180
+ ESM dist/types/system-message.mjs.map 71.00 B
181
+ ESM dist/utils/fetch-chat-completion.mjs.map 71.00 B
182
+ ESM dist/utils/utils.test.mjs.map 352.00 B
183
+ ESM dist/hooks/use-copilot-readable.mjs.map 71.00 B
184
+ ESM dist/hooks/use-flat-category-store.mjs.map 71.00 B
185
+ ESM dist/utils/utils.mjs.map 71.00 B
186
+ ESM dist/hooks/use-make-copilot-actionable.mjs.map 71.00 B
187
+ ESM dist/hooks/use-make-copilot-document-readable.mjs.map 71.00 B
188
+ ESM dist/hooks/use-make-copilot-readable.mjs.map 71.00 B
189
+ ESM dist/hooks/use-tree.mjs.map 71.00 B
190
+ ESM dist/lib/copilot-task.mjs.map 71.00 B
191
+ ESM dist/lib/index.mjs.map 71.00 B
192
+ ESM ⚡️ Build success in 188ms
187
193
  DTS Build start
188
- DTS ⚡️ Build success in 6420ms
189
- DTS dist/index.d.ts 1.56 KB
194
+ DTS ⚡️ Build success in 5887ms
195
+ DTS dist/index.d.ts 1.63 KB
190
196
  DTS dist/components/copilot-provider/copilotkit.d.ts 1017.00 B
191
- DTS dist/components/copilot-provider/copilotkit-props.d.ts 1.24 KB
197
+ DTS dist/components/copilot-provider/copilotkit-props.d.ts 1.33 KB
192
198
  DTS dist/context/copilot-context.d.ts 2.83 KB
193
199
  DTS dist/hooks/use-copilot-chat.d.ts 1.05 KB
194
200
  DTS dist/hooks/use-make-copilot-actionable.d.ts 309.00 B
195
201
  DTS dist/hooks/use-copilot-action.d.ts 286.00 B
196
- DTS dist/hooks/use-make-copilot-readable.d.ts 598.00 B
202
+ DTS dist/hooks/use-make-copilot-readable.d.ts 228.00 B
197
203
  DTS dist/hooks/use-make-copilot-document-readable.d.ts 516.00 B
198
204
  DTS dist/hooks/use-chat.d.ts 2.90 KB
205
+ DTS dist/hooks/use-copilot-readable.d.ts 1.10 KB
199
206
  DTS dist/types/document-pointer.d.ts 181.00 B
200
207
  DTS dist/types/system-message.d.ts 132.00 B
201
208
  DTS dist/types/frontend-action.d.ts 1.62 KB
202
209
  DTS dist/openai-assistants/hooks/use-copilot-chat-v2.d.ts 1.41 KB
203
210
  DTS dist/openai-assistants/utils/process-message-stream.d.ts 196.00 B
204
- DTS dist/lib/copilot-task.d.ts 1.03 KB
211
+ DTS dist/lib/copilot-task.d.ts 1.21 KB
205
212
  DTS dist/utils/fetch-chat-completion.d.ts 1.38 KB
206
213
  DTS dist/hooks/use-tree.d.ts 543.00 B
207
214
  DTS dist/components/index.d.ts 186.00 B
208
215
  DTS dist/context/index.d.ts 267.00 B
209
- DTS dist/hooks/index.d.ts 672.00 B
216
+ DTS dist/hooks/index.d.ts 736.00 B
210
217
  DTS dist/hooks/use-flat-category-store.d.ts 424.00 B
211
218
  DTS dist/lib/index.d.ts 261.00 B
212
219
  DTS dist/openai-assistants/index.d.ts 262.00 B
package/CHANGELOG.md CHANGED
@@ -1,10 +1,32 @@
1
1
  # ui
2
2
 
3
+ ## 0.25.0-mme-cloud.6
4
+
5
+ ### Minor Changes
6
+
7
+ - Upgrade langchain
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @copilotkit/shared@0.9.0-mme-cloud.6
13
+
14
+ ## 0.25.0-mme-cloud.5
15
+
16
+ ### Minor Changes
17
+
18
+ - Update comments
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @copilotkit/shared@0.9.0-mme-cloud.5
24
+
3
25
  ## 0.25.0-mme-cloud.4
4
26
 
5
27
  ### Minor Changes
6
28
 
7
- - Include reason in guardrails response
29
+ - Update comments
8
30
 
9
31
  ### Patch Changes
10
32
 
@@ -15,45 +37,55 @@
15
37
 
16
38
  ### Minor Changes
17
39
 
18
- - Retrieve public API key
40
+ - 85c029b: streamline cloud configuration
41
+ - Rename
42
+ - a5ade3b: Support input guardrails (cloud)
43
+ - 12ff590: Unify api key handling
44
+ - f0c4745: Include reason in guardrails response
45
+ - 17f4b1b: Retrieve public API key
19
46
 
20
47
  ### Patch Changes
21
48
 
49
+ - Updated dependencies [85c029b]
22
50
  - Updated dependencies
51
+ - Updated dependencies [a5ade3b]
52
+ - Updated dependencies [12ff590]
53
+ - Updated dependencies [f0c4745]
54
+ - Updated dependencies [17f4b1b]
23
55
  - @copilotkit/shared@0.9.0-mme-cloud.3
24
56
 
25
- ## 0.25.0-mme-cloud.2
57
+ ## 0.25.0-function-calling-fixes.2
26
58
 
27
59
  ### Minor Changes
28
60
 
29
- - streamline cloud configuration
61
+ - fix backend function calling return values
30
62
 
31
63
  ### Patch Changes
32
64
 
33
65
  - Updated dependencies
34
- - @copilotkit/shared@0.9.0-mme-cloud.2
66
+ - @copilotkit/shared@0.9.0-function-calling-fixes.2
35
67
 
36
- ## 0.25.0-mme-cloud.1
68
+ ## 0.25.0-function-calling-fixes.1
37
69
 
38
70
  ### Minor Changes
39
71
 
40
- - Unify api key handling
72
+ - gpt-4-turbo-april-2024 function calling fixes
41
73
 
42
74
  ### Patch Changes
43
75
 
44
76
  - Updated dependencies
45
- - @copilotkit/shared@0.9.0-mme-cloud.1
77
+ - @copilotkit/shared@0.9.0-function-calling-fixes.1
46
78
 
47
- ## 0.25.0-mme-cloud.0
79
+ ## 0.25.0-alpha.0
48
80
 
49
81
  ### Minor Changes
50
82
 
51
- - Support input guardrails (cloud)
83
+ - gpt-4-turbo-april-2024
52
84
 
53
85
  ### Patch Changes
54
86
 
55
87
  - Updated dependencies
56
- - @copilotkit/shared@0.9.0-mme-cloud.0
88
+ - @copilotkit/shared@0.9.0-alpha.0
57
89
 
58
90
  ## 0.24.0
59
91
 
@@ -59,6 +59,16 @@ function useChat(options) {
59
59
  runIdRef.current = response.headers.get("runid");
60
60
  }
61
61
  if (!response.events) {
62
+ setMessages([
63
+ ...messages2,
64
+ {
65
+ id: nanoid(),
66
+ createdAt: /* @__PURE__ */ new Date(),
67
+ content: response.statusText,
68
+ role: "assistant"
69
+ }
70
+ ]);
71
+ setIsLoading(false);
62
72
  throw new Error("Failed to fetch chat completion");
63
73
  }
64
74
  const reader = response.events.getReader();
@@ -194,4 +204,4 @@ function useChat(options) {
194
204
  export {
195
205
  useChat
196
206
  };
197
- //# sourceMappingURL=chunk-MESZST5T.mjs.map
207
+ //# sourceMappingURL=chunk-4NNFSZOY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-chat.ts"],"sourcesContent":["import { useRef, useState } from \"react\";\nimport {\n Message,\n ToolDefinition,\n FunctionCallHandler,\n encodeResult,\n FunctionCall,\n COPILOT_CLOUD_PUBLIC_API_KEY_HEADER,\n} from \"@copilotkit/shared\";\n\nimport { nanoid } from \"nanoid\";\nimport { fetchAndDecodeChatCompletion } from \"../utils/fetch-chat-completion\";\nimport { CopilotApiConfig } from \"../context\";\nimport untruncateJson from \"untruncate-json\";\n\nexport type UseChatOptions = {\n /**\n * The API endpoint that accepts a `{ messages: Message[] }` object and returns\n * a stream of tokens of the AI chat response. Defaults to `/api/chat`.\n */\n api?: string;\n /**\n * A unique identifier for the chat. If not provided, a random one will be\n * generated. When provided, the `useChat` hook with the same `id` will\n * have shared states across components.\n */\n id?: string;\n /**\n * System messages of the chat. Defaults to an empty array.\n */\n initialMessages?: Message[];\n /**\n * Callback function to be called when a function call is received.\n * If the function returns a `ChatRequest` object, the request will be sent\n * automatically to the API and will be used to update the chat.\n */\n onFunctionCall?: FunctionCallHandler;\n /**\n * HTTP headers to be sent with the API request.\n */\n headers?: Record<string, string> | Headers;\n /**\n * Extra body object to be sent with the API request.\n * @example\n * Send a `sessionId` to the API along with the messages.\n * ```js\n * useChat({\n * body: {\n * sessionId: '123',\n * }\n * })\n * ```\n */\n body?: object;\n /**\n * Function definitions to be sent to the API.\n */\n tools?: ToolDefinition[];\n};\n\nexport type UseChatHelpers = {\n /**\n * Append a user message to the chat list. This triggers the API call to fetch\n * the assistant's response.\n * @param message The message to append\n */\n append: (message: Message) => Promise<void>;\n /**\n * Reload the last AI chat response for the given chat history. If the last\n * message isn't from the assistant, it will request the API to generate a\n * new response.\n */\n reload: () => Promise<void>;\n /**\n * Abort the current request immediately, keep the generated tokens if any.\n */\n stop: () => void;\n /** The current value of the input */\n input: string;\n /** setState-powered method to update the input value */\n setInput: React.Dispatch<React.SetStateAction<string>>;\n /** Whether the API request is in progress */\n isLoading: boolean;\n};\n\nexport type UseChatOptionsWithCopilotConfig = UseChatOptions & {\n copilotConfig: CopilotApiConfig;\n /**\n * The current list of messages in the chat.\n */\n messages: Message[];\n /**\n * The setState-powered method to update the chat messages.\n */\n setMessages: React.Dispatch<React.SetStateAction<Message[]>>;\n};\n\nexport function useChat(options: UseChatOptionsWithCopilotConfig): UseChatHelpers {\n const { messages, setMessages } = options;\n const [input, setInput] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const abortControllerRef = useRef<AbortController>();\n const threadIdRef = useRef<string | null>(null);\n const runIdRef = useRef<string | null>(null);\n const publicApiKey = options.copilotConfig.publicApiKey;\n const headers = {\n ...(options.headers || {}),\n ...(publicApiKey ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {}),\n };\n\n const runChatCompletion = async (messages: Message[]): Promise<Message[]> => {\n setIsLoading(true);\n\n const newMessages: Message[] = [\n {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n },\n ];\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n\n setMessages([...messages, ...newMessages]);\n\n // add threadId and runId to the body if it exists\n const copilotConfigBody = options.copilotConfig.body || {};\n if (threadIdRef.current) {\n copilotConfigBody.threadId = threadIdRef.current;\n }\n if (runIdRef.current) {\n copilotConfigBody.runId = runIdRef.current;\n }\n\n const messagesWithContext = [...(options.initialMessages || []), ...messages];\n const response = await fetchAndDecodeChatCompletion({\n copilotConfig: { ...options.copilotConfig, body: copilotConfigBody },\n messages: messagesWithContext,\n tools: options.tools,\n headers: headers,\n signal: abortController.signal,\n });\n\n if (response.headers.get(\"threadid\")) {\n threadIdRef.current = response.headers.get(\"threadid\");\n }\n\n if (response.headers.get(\"runid\")) {\n runIdRef.current = response.headers.get(\"runid\");\n }\n\n if (!response.events) {\n setMessages([\n ...messages,\n {\n id: nanoid(),\n createdAt: new Date(),\n content: response.statusText,\n role: \"assistant\",\n },\n ]);\n setIsLoading(false);\n throw new Error(\"Failed to fetch chat completion\");\n }\n\n const reader = response.events.getReader();\n\n // Whether to feed back the new messages to GPT\n let feedback = false;\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n\n if (done) {\n break;\n }\n\n let currentMessage = Object.assign({}, newMessages[newMessages.length - 1]);\n\n if (value.type === \"content\") {\n if (currentMessage.function_call || currentMessage.role === \"function\") {\n // Create a new message if the previous one is a function call or result\n currentMessage = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n newMessages.push(currentMessage);\n }\n currentMessage.content += value.content;\n newMessages[newMessages.length - 1] = currentMessage;\n setMessages([...messages, ...newMessages]);\n } else if (value.type === \"result\") {\n // When we get a result message, it is already complete\n currentMessage = {\n id: nanoid(),\n role: \"function\",\n content: value.content,\n name: value.name,\n };\n newMessages.push(currentMessage);\n setMessages([...messages, ...newMessages]);\n\n // After receiving a result, feed back the new messages to GPT\n feedback = true;\n } else if (value.type === \"function\" || value.type === \"partial\") {\n // Create a new message if the previous one is not empty\n if (\n currentMessage.content != \"\" ||\n currentMessage.function_call ||\n currentMessage.role == \"function\"\n ) {\n currentMessage = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n newMessages.push(currentMessage);\n }\n if (value.type === \"function\") {\n currentMessage.function_call = {\n name: value.name,\n arguments: JSON.stringify(value.arguments),\n scope: value.scope,\n };\n } else if (value.type === \"partial\") {\n let partialArguments: any = {};\n try {\n partialArguments = JSON.parse(untruncateJson(value.arguments));\n } catch (e) {}\n\n currentMessage.partialFunctionCall = {\n name: value.name,\n arguments: partialArguments,\n };\n }\n\n newMessages[newMessages.length - 1] = currentMessage;\n setMessages([...messages, ...newMessages]);\n\n if (value.type === \"function\") {\n // Execute the function call\n try {\n if (options.onFunctionCall && value.scope === \"client\") {\n const result = await options.onFunctionCall(\n messages,\n currentMessage.function_call as FunctionCall,\n );\n\n currentMessage = {\n id: nanoid(),\n role: \"function\",\n content: encodeResult(result),\n name: (currentMessage.function_call! as FunctionCall).name!,\n };\n newMessages.push(currentMessage);\n setMessages([...messages, ...newMessages]);\n\n // After a function call, feed back the new messages to GPT\n feedback = true;\n }\n } catch (error) {\n console.error(\"Failed to execute function call\", error);\n // TODO: Handle error\n // this should go to the message itself\n }\n }\n }\n }\n\n // If we want feedback, run the completion again and return the results\n if (feedback) {\n return await runChatCompletion([...messages, ...newMessages]);\n }\n // otherwise, return the new messages\n else {\n return newMessages.slice();\n }\n } finally {\n setIsLoading(false);\n }\n };\n\n const runChatCompletionAndHandleFunctionCall = async (messages: Message[]): Promise<void> => {\n await runChatCompletion(messages);\n };\n\n const append = async (message: Message): Promise<void> => {\n if (isLoading) {\n return;\n }\n const newMessages = [...messages, message];\n setMessages(newMessages);\n return runChatCompletionAndHandleFunctionCall(newMessages);\n };\n\n const reload = async (): Promise<void> => {\n if (isLoading || messages.length === 0) {\n return;\n }\n let newMessages = [...messages];\n const lastMessage = messages[messages.length - 1];\n\n if (lastMessage.role === \"assistant\") {\n newMessages = newMessages.slice(0, -1);\n }\n setMessages(newMessages);\n\n return runChatCompletionAndHandleFunctionCall(newMessages);\n };\n\n const stop = (): void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  useChat
6
- } from "./chunk-MESZST5T.mjs";
6
+ } from "./chunk-4NNFSZOY.mjs";
7
7
  import {
8
8
  CopilotContext
9
9
  } from "./chunk-O35YOIHC.mjs";
@@ -95,4 +95,4 @@ export {
95
95
  useCopilotChat,
96
96
  defaultSystemMessage
97
97
  };
98
- //# sourceMappingURL=chunk-SFV4PSJM.mjs.map
98
+ //# sourceMappingURL=chunk-6VF626RG.mjs.map
@@ -44,4 +44,4 @@ function useCopilotAction(action, dependencies) {
44
44
  export {
45
45
  useCopilotAction
46
46
  };
47
- //# sourceMappingURL=chunk-IR5I4Q6R.mjs.map
47
+ //# sourceMappingURL=chunk-72BJ3A3S.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-copilot-action.ts"],"sourcesContent":["import { useRef, useContext, useEffect } from \"react\";\nimport { FrontendAction } from \"../types/frontend-action\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { nanoid } from \"nanoid\";\nimport { Parameter } from \"@copilotkit/shared\";\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 useCopilotAction<const T extends Parameter[] | [] = []>(\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 as any;\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 as any);\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\n// Usage Example:\n// useCopilotAction({\n// name: \"myAction\",\n// parameters: [\n// { name: \"arg1\", type: \"string\", enum: [\"option1\", \"option2\", \"option3\"], required: false },\n// { name: \"arg2\", type: \"number\" },\n// {\n// name: \"arg3\",\n// type: \"object\",\n// attributes: [\n// { name: \"nestedArg1\", type: \"boolean\" },\n// { name: \"xyz\", required: false },\n// ],\n// },\n// { name: \"arg4\", type: \"number[]\" },\n// ],\n// handler: ({ arg1, arg2, arg3, arg4 }) => {\n// const x = arg3.nestedArg1;\n// const z = arg3.xyz;\n// console.log(arg1, arg2, arg3);\n// },\n// });\n\n// useCopilotAction({\n// name: \"myAction\",\n// handler: () => {\n// console.log(\"No parameters provided.\");\n// },\n// });\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,YAAY,iBAAiB;AAG9C,SAAS,cAAc;AAYhB,SAAS,iBACd,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,MAAa;AAC1C,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":[]}
@@ -24,10 +24,10 @@ import { jsx } from "react/jsx-runtime";
24
24
  function CopilotKit(_a) {
25
25
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
26
26
  var _a2, _b2;
27
- if (!props.url && !props.publicApiKey) {
27
+ if (!props.runtimeUrl && !props.url && !props.publicApiKey) {
28
28
  throw new Error("Please provide either a url or a publicApiKey to the CopilotKit component.");
29
29
  }
30
- const chatApiEndpoint = props.url || COPILOT_CLOUD_CHAT_URL;
30
+ const chatApiEndpoint = props.runtimeUrl || props.url || COPILOT_CLOUD_CHAT_URL;
31
31
  const [entryPoints, setEntryPoints] = useState({});
32
32
  const chatComponentsCache = useRef({});
33
33
  const { addElement, removeElement, printTree } = use_tree_default();
@@ -184,4 +184,4 @@ export {
184
184
  CopilotKit,
185
185
  defaultCopilotContextCategories
186
186
  };
187
- //# sourceMappingURL=chunk-VYD7RO32.mjs.map
187
+ //# sourceMappingURL=chunk-7LVVZQRG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/copilot-provider/copilotkit.tsx"],"sourcesContent":["import { Ref, useCallback, useRef, useState } from \"react\";\nimport {\n CopilotContext,\n CopilotApiConfig,\n InChatRenderFunction,\n} from \"../../context/copilot-context\";\nimport useTree from \"../../hooks/use-tree\";\nimport { DocumentPointer } from \"../../types\";\nimport {\n COPILOT_CLOUD_CHAT_URL,\n CopilotCloudConfig,\n FunctionCallHandler,\n Message,\n actionToChatCompletionFunction,\n} from \"@copilotkit/shared\";\nimport { FrontendAction } from \"../../types/frontend-action\";\nimport useFlatCategoryStore from \"../../hooks/use-flat-category-store\";\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-Runtime: https://docs.copilotkit.ai/getting-started/quickstart-runtime\n *\n * Example usage:\n * ```\n * <CopilotKit url=\"https://your.copilotkit.api\">\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 if (!props.runtimeUrl && !props.url && !props.publicApiKey) {\n throw new Error(\"Please provide either a url or a publicApiKey to the CopilotKit component.\");\n }\n\n const chatApiEndpoint = props.runtimeUrl || props.url || COPILOT_CLOUD_CHAT_URL;\n\n const [entryPoints, setEntryPoints] = useState<Record<string, FrontendAction<any>>>({});\n const chatComponentsCache = useRef<Record<string, InChatRenderFunction | string>>({});\n const { addElement, removeElement, printTree } = useTree();\n const [messages, setMessages] = useState<Message[]>([]);\n\n const {\n addElement: addDocument,\n removeElement: removeDocument,\n allElements: allDocuments,\n } = useFlatCategoryStore<DocumentPointer>();\n\n const setEntryPoint = useCallback((id: string, entryPoint: FrontendAction<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, FrontendAction<any>>) => {\n return entryPointsToChatCompletionFunctions(Object.values(customEntryPoints || entryPoints));\n },\n [entryPoints],\n );\n\n const getFunctionCallHandler = useCallback(\n (customEntryPoints?: Record<string, FrontendAction<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 if (!props.publicApiKey) {\n if (props.cloudRestrictToTopic) {\n throw new Error(\n \"To use the cloudRestrictToTopic feature, please sign up at https://copilotkit.ai and provide a publicApiKey.\",\n );\n }\n }\n\n let cloud: CopilotCloudConfig | undefined = undefined;\n if (props.publicApiKey) {\n cloud = {\n guardrails: {\n input: {\n restrictToTopic: {\n enabled: props.cloudRestrictToTopic ? true : false,\n validTopics: props.cloudRestrictToTopic?.validTopics || [],\n invalidTopics: props.cloudRestrictToTopic?.invalidTopics || [],\n },\n },\n },\n };\n }\n\n // get the appropriate CopilotApiConfig from the props\n const copilotApiConfig: CopilotApiConfig = {\n publicApiKey: props.publicApiKey,\n ...(cloud ? { cloud } : {}),\n chatApiEndpoint: chatApiEndpoint,\n chatApiEndpointV2: `${props.url}/v2`,\n headers: props.headers || {},\n body: {\n ...props.body,\n ...props.backendOnlyProps,\n },\n };\n\n return (\n <CopilotContext.Provider\n value={{\n entryPoints,\n chatComponentsCache,\n getChatCompletionFunctionDescriptions,\n getFunctionCallHandler,\n setEntryPoint,\n removeEntryPoint,\n getContextString,\n addContext,\n removeContext,\n getDocumentsContext,\n addDocumentContext,\n removeDocumentContext,\n copilotApiConfig: copilotApiConfig,\n messages,\n setMessages,\n }}\n >\n {children}\n </CopilotContext.Provider>\n );\n}\n\nexport const defaultCopilotContextCategories = [\"global\"];\n\nfunction entryPointsToChatCompletionFunctions(actions: FrontendAction<any>[]): ToolDefinition[] {\n return actions.map(actionToChatCompletionFunction);\n}\n\nfunction entryPointsToFunctionCallHandler(actions: FrontendAction<any>[]): FunctionCallHandler {\n return async (chatMessages, functionCall) => {\n let actionsByFunctionName: Record<string, FrontendAction<any>> = {};\n for (let action of actions) {\n actionsByFunctionName[action.name] = action;\n }\n\n const action = actionsByFunctionName[functionCall.name || \"\"];\n if (action) {\n let functionCallArguments: Record<string, any>[] = [];\n if (functionCall.arguments) {\n functionCallArguments = JSON.parse(functionCall.arguments);\n }\n return await action.handler(functionCallArguments);\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAc,aAAa,QAAQ,gBAAgB;AAQnD;AAAA,EACE;AAAA,EAIA;AAAA,OACK;AAyKH;AA/IG,SAAS,WAAW,IAAyC;AAAzC,eAAE,WAxC7B,IAwC2B,IA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AAA,IAA4B,kBAAiB,CAAC;AAAA,UAC/D;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAGA,QAAM,mBAAqC;AAAA,IACzC,cAAc,MAAM;AAAA,KAChB,QAAQ,EAAE,MAAM,IAAI,CAAC,IAFgB;AAAA,IAGzC;AAAA,IACA,mBAAmB,GAAG,MAAM;AAAA,IAC5B,SAAS,MAAM,WAAW,CAAC;AAAA,IAC3B,MAAM,kCACD,MAAM,OACN,MAAM;AAAA,EAEb;AAEA,SACE;AAAA,IAAC,eAAe;AAAA,IAAf;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,kCAAkC,CAAC,QAAQ;AAExD,SAAS,qCAAqC,SAAkD;AAC9F,SAAO,QAAQ,IAAI,8BAA8B;AACnD;AAEA,SAAS,iCAAiC,SAAqD;AAC7F,SAAO,CAAO,cAAc,iBAAiB;AAC3C,QAAI,wBAA6D,CAAC;AAClE,aAASC,WAAU,SAAS;AAC1B,4BAAsBA,QAAO,IAAI,IAAIA;AAAA,IACvC;AAEA,UAAM,SAAS,sBAAsB,aAAa,QAAQ,EAAE;AAC5D,QAAI,QAAQ;AACV,UAAI,wBAA+C,CAAC;AACpD,UAAI,aAAa,WAAW;AAC1B,gCAAwB,KAAK,MAAM,aAAa,SAAS;AAAA,MAC3D;AACA,aAAO,MAAM,OAAO,QAAQ,qBAAqB;AAAA,IACnD;AAAA,EACF;AACF;","names":["_a","_b","action"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-EYKDJBDE.mjs.map
@@ -20,4 +20,4 @@ function useMakeCopilotReadable(information, parentId, categories) {
20
20
  export {
21
21
  useMakeCopilotReadable
22
22
  };
23
- //# sourceMappingURL=chunk-NQKBX6UJ.mjs.map
23
+ //# sourceMappingURL=chunk-KTUNGBJF.mjs.map