@copilotkit/react-ui 0.17.0-demofixes.2 → 0.17.0-tools.1

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 (69) hide show
  1. package/.turbo/turbo-build.log +115 -119
  2. package/CHANGELOG.md +4 -16
  3. package/dist/{chunk-HPFHUPN6.mjs → chunk-FA66IWQ6.mjs} +2 -2
  4. package/dist/{chunk-K5V5Q2AF.mjs → chunk-KDHWN43O.mjs} +2 -2
  5. package/dist/{chunk-73OGJ3WL.mjs → chunk-Q7SIB42Y.mjs} +3 -1
  6. package/dist/chunk-Q7SIB42Y.mjs.map +1 -0
  7. package/dist/components/chat/Button.mjs +6 -30
  8. package/dist/components/chat/Button.mjs.map +1 -1
  9. package/dist/components/chat/Chat.d.ts +5 -1
  10. package/dist/components/chat/Chat.js +2 -0
  11. package/dist/components/chat/Chat.js.map +1 -1
  12. package/dist/components/chat/Chat.mjs +16 -830
  13. package/dist/components/chat/Chat.mjs.map +1 -1
  14. package/dist/components/chat/ChatContext.mjs +7 -214
  15. package/dist/components/chat/ChatContext.mjs.map +1 -1
  16. package/dist/components/chat/CodeBlock.mjs +8 -202
  17. package/dist/components/chat/CodeBlock.mjs.map +1 -1
  18. package/dist/components/chat/Header.mjs +6 -23
  19. package/dist/components/chat/Header.mjs.map +1 -1
  20. package/dist/components/chat/Icons.mjs +14 -218
  21. package/dist/components/chat/Icons.mjs.map +1 -1
  22. package/dist/components/chat/Input.mjs +7 -110
  23. package/dist/components/chat/Input.mjs.map +1 -1
  24. package/dist/components/chat/Markdown.mjs +7 -253
  25. package/dist/components/chat/Markdown.mjs.map +1 -1
  26. package/dist/components/chat/Messages.mjs +9 -329
  27. package/dist/components/chat/Messages.mjs.map +1 -1
  28. package/dist/components/chat/Popup.js +2 -0
  29. package/dist/components/chat/Popup.js.map +1 -1
  30. package/dist/components/chat/Popup.mjs +17 -839
  31. package/dist/components/chat/Popup.mjs.map +1 -1
  32. package/dist/components/chat/Response.mjs +6 -23
  33. package/dist/components/chat/Response.mjs.map +1 -1
  34. package/dist/components/chat/Sidebar.js +2 -0
  35. package/dist/components/chat/Sidebar.js.map +1 -1
  36. package/dist/components/chat/Sidebar.mjs +17 -853
  37. package/dist/components/chat/Sidebar.mjs.map +1 -1
  38. package/dist/components/chat/Textarea.mjs +4 -48
  39. package/dist/components/chat/Textarea.mjs.map +1 -1
  40. package/dist/components/chat/Window.mjs +4 -105
  41. package/dist/components/chat/Window.mjs.map +1 -1
  42. package/dist/components/chat/index.js +2 -0
  43. package/dist/components/chat/index.js.map +1 -1
  44. package/dist/components/chat/index.mjs +22 -860
  45. package/dist/components/chat/index.mjs.map +1 -1
  46. package/dist/components/chat/props.mjs +1 -0
  47. package/dist/components/index.js +2 -0
  48. package/dist/components/index.js.map +1 -1
  49. package/dist/components/index.mjs +23 -860
  50. package/dist/components/index.mjs.map +1 -1
  51. package/dist/context/index.mjs +1 -0
  52. package/dist/hooks/index.mjs +1 -0
  53. package/dist/hooks/use-copy-to-clipboard.mjs +4 -22
  54. package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -1
  55. package/dist/index.css +9 -2
  56. package/dist/index.css.map +1 -1
  57. package/dist/index.js +2 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.mjs +26 -860
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/lib/utils.mjs +3 -20
  62. package/dist/lib/utils.mjs.map +1 -1
  63. package/dist/types/index.mjs +1 -0
  64. package/package.json +6 -6
  65. package/src/components/chat/Chat.tsx +7 -0
  66. package/src/css/markdown.css +10 -2
  67. package/dist/chunk-73OGJ3WL.mjs.map +0 -1
  68. /package/dist/{chunk-HPFHUPN6.mjs.map → chunk-FA66IWQ6.mjs.map} +0 -0
  69. /package/dist/{chunk-K5V5Q2AF.mjs.map → chunk-KDHWN43O.mjs.map} +0 -0
@@ -1,9 +1,7 @@
1
- Debugger attached.
2
1
 
3
- > @copilotkit/react-ui@0.17.0-demofixes.1 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-ui
2
+ > @copilotkit/react-ui@0.17.0-tools.0 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-ui
4
3
  > tsup --clean
5
4
 
6
- Debugger attached.
7
5
  CLI Building entry: src/index.tsx, src/components/index.ts, src/context/index.ts, src/hooks/index.ts, src/hooks/use-copy-to-clipboard.tsx, src/lib/utils.test.ts, src/lib/utils.ts, src/types/index.ts, src/types/types.ts, src/components/chat/Button.tsx, src/components/chat/Chat.tsx, src/components/chat/ChatContext.tsx, src/components/chat/CodeBlock.tsx, src/components/chat/Header.tsx, src/components/chat/Icons.tsx, src/components/chat/Input.tsx, src/components/chat/Markdown.tsx, src/components/chat/Messages.tsx, src/components/chat/Popup.tsx, src/components/chat/Response.tsx, src/components/chat/Sidebar.tsx, src/components/chat/Textarea.tsx, src/components/chat/Window.tsx, src/components/chat/index.tsx, src/components/chat/props.ts
8
6
  CLI Using tsconfig: tsconfig.json
9
7
  CLI tsup v6.7.0
@@ -15,163 +13,163 @@ CJS Build start
15
13
  Browserslist: caniuse-lite is outdated. Please run:
16
14
  npx update-browserslist-db@latest
17
15
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
18
- ESM dist/components/chat/Messages.mjs 325.00 B
19
- ESM dist/components/chat/Sidebar.mjs 616.00 B
20
- ESM dist/components/chat/Textarea.mjs 177.00 B
21
- ESM dist/components/chat/Window.mjs 144.00 B
22
- ESM dist/components/chat/Popup.mjs 610.00 B
23
- ESM dist/components/chat/Response.mjs 232.00 B
24
- ESM dist/components/chat/index.mjs 759.00 B
25
- ESM dist/types/types.mjs 34.00 B
26
- ESM dist/components/chat/Chat.mjs 572.00 B
27
- ESM dist/components/chat/Icons.mjs 439.00 B
28
- ESM dist/components/chat/Header.mjs 214.00 B
29
- ESM dist/components/chat/props.mjs 69.00 B
30
- ESM dist/components/chat/CodeBlock.mjs 333.00 B
31
- ESM dist/components/chat/Input.mjs 246.00 B
32
- ESM dist/components/chat/ChatContext.mjs 276.00 B
33
- ESM dist/components/chat/Button.mjs 214.00 B
34
- ESM dist/index.mjs 811.00 B
16
+ DTS Build start
35
17
  ESM dist/components/index.mjs 737.00 B
18
+ ESM dist/hooks/index.mjs 66.00 B
19
+ ESM dist/types/index.mjs 66.00 B
20
+ ESM dist/lib/utils.test.mjs 168.00 B
21
+ ESM dist/index.mjs 811.00 B
36
22
  ESM dist/chunk-JD7BAH7U.mjs 43.00 B
37
- ESM dist/chunk-WB3YULQ4.mjs 43.00 B
38
- ESM dist/chunk-P4GBO6MW.mjs 43.00 B
39
- ESM dist/chunk-73OGJ3WL.mjs 2.41 KB
40
- ESM dist/chunk-HPFHUPN6.mjs 1.01 KB
41
- ESM dist/chunk-GWGHQNRI.mjs 1.84 KB
23
+ ESM dist/chunk-KDHWN43O.mjs 528.00 B
24
+ ESM dist/chunk-FA66IWQ6.mjs 1.01 KB
25
+ ESM dist/chunk-Q7SIB42Y.mjs 2.49 KB
42
26
  ESM dist/chunk-3M4HWSE7.mjs 2.31 KB
43
27
  ESM dist/chunk-Z34F3WLK.mjs 613.00 B
44
28
  ESM dist/chunk-B7DNOYVQ.mjs 3.80 KB
45
- ESM dist/chunk-NYLOXKYT.mjs 1.63 KB
46
- ESM dist/chunk-WM6BS77F.mjs 1.54 KB
47
- ESM dist/chunk-DPRH4HX3.mjs 3.55 KB
48
- ESM dist/chunk-UWPFPWAW.mjs 566.00 B
49
- ESM dist/chunk-K5V5Q2AF.mjs 528.00 B
50
29
  ESM dist/chunk-5O2MCJZ2.mjs 825.00 B
30
+ ESM dist/chunk-UWPFPWAW.mjs 566.00 B
31
+ ESM dist/chunk-NYLOXKYT.mjs 1.63 KB
51
32
  ESM dist/chunk-OF66AL5Z.mjs 1.73 KB
33
+ ESM dist/chunk-GWGHQNRI.mjs 1.84 KB
52
34
  ESM dist/chunk-IU3WTXLQ.mjs 43.00 B
53
- ESM dist/components/chat/Markdown.mjs 255.00 B
35
+ ESM dist/chunk-WM6BS77F.mjs 1.54 KB
54
36
  ESM dist/chunk-7YXG7D47.mjs 6.52 KB
55
- ESM dist/context/index.mjs 66.00 B
56
- ESM dist/chunk-H4VKQGVU.mjs 43.00 B
57
- ESM dist/hooks/index.mjs 66.00 B
58
- ESM dist/lib/utils.test.mjs 168.00 B
59
37
  ESM dist/hooks/use-copy-to-clipboard.mjs 191.00 B
60
38
  ESM dist/chunk-POVINPXX.mjs 675.00 B
61
- ESM dist/lib/utils.mjs 885.00 B
62
- ESM dist/types/index.mjs 66.00 B
63
39
  ESM dist/chunk-MRXNTQOX.mjs 1.89 KB
40
+ ESM dist/chunk-H4VKQGVU.mjs 43.00 B
64
41
  ESM dist/chunk-7NSRDJ5C.mjs 43.00 B
65
- ESM dist/index.css 19.37 KB
66
- ESM dist/components/chat/Messages.mjs.map 71.00 B
67
- ESM dist/components/chat/Window.mjs.map 71.00 B
68
- ESM dist/components/chat/Textarea.mjs.map 71.00 B
69
- ESM dist/components/chat/Response.mjs.map 71.00 B
70
- ESM dist/types/types.mjs.map 71.00 B
71
- ESM dist/components/chat/Sidebar.mjs.map 71.00 B
72
- ESM dist/components/chat/index.mjs.map 71.00 B
73
- ESM dist/components/chat/Popup.mjs.map 71.00 B
74
- ESM dist/components/chat/props.mjs.map 71.00 B
75
- ESM dist/components/chat/Icons.mjs.map 71.00 B
76
- ESM dist/components/chat/ChatContext.mjs.map 71.00 B
77
- ESM dist/components/chat/CodeBlock.mjs.map 71.00 B
78
- ESM dist/components/chat/Button.mjs.map 71.00 B
42
+ ESM dist/index.css 19.65 KB
43
+ ESM dist/context/index.mjs 66.00 B
44
+ ESM dist/chunk-DPRH4HX3.mjs 3.55 KB
45
+ ESM dist/lib/utils.mjs 885.00 B
46
+ ESM dist/chunk-P4GBO6MW.mjs 43.00 B
47
+ ESM dist/chunk-WB3YULQ4.mjs 43.00 B
48
+ ESM dist/components/chat/props.mjs 69.00 B
49
+ ESM dist/components/chat/Messages.mjs 325.00 B
50
+ ESM dist/components/chat/Response.mjs 232.00 B
51
+ ESM dist/components/chat/Markdown.mjs 255.00 B
52
+ ESM dist/components/chat/Button.mjs 214.00 B
53
+ ESM dist/components/chat/Chat.mjs 572.00 B
54
+ ESM dist/components/chat/Header.mjs 214.00 B
55
+ ESM dist/types/types.mjs 34.00 B
56
+ ESM dist/components/chat/ChatContext.mjs 276.00 B
57
+ ESM dist/components/chat/index.mjs 759.00 B
58
+ ESM dist/components/chat/CodeBlock.mjs 333.00 B
59
+ ESM dist/components/chat/Icons.mjs 439.00 B
60
+ ESM dist/components/chat/Window.mjs 144.00 B
61
+ ESM dist/components/chat/Input.mjs 246.00 B
79
62
  ESM dist/components/index.mjs.map 71.00 B
63
+ ESM dist/hooks/index.mjs.map 71.00 B
64
+ ESM dist/types/index.mjs.map 71.00 B
65
+ ESM dist/components/chat/Sidebar.mjs 616.00 B
80
66
  ESM dist/index.mjs.map 71.00 B
81
67
  ESM dist/chunk-JD7BAH7U.mjs.map 71.00 B
82
- ESM dist/chunk-WB3YULQ4.mjs.map 71.00 B
83
- ESM dist/chunk-P4GBO6MW.mjs.map 71.00 B
84
- ESM dist/chunk-73OGJ3WL.mjs.map 6.53 KB
85
- ESM dist/chunk-HPFHUPN6.mjs.map 1.36 KB
68
+ ESM dist/chunk-KDHWN43O.mjs.map 549.00 B
69
+ ESM dist/chunk-FA66IWQ6.mjs.map 1.36 KB
70
+ ESM dist/chunk-Q7SIB42Y.mjs.map 6.73 KB
86
71
  ESM dist/chunk-3M4HWSE7.mjs.map 5.04 KB
87
- ESM dist/components/chat/Chat.mjs.map 71.00 B
72
+ ESM dist/chunk-Z34F3WLK.mjs.map 854.00 B
88
73
  ESM dist/chunk-B7DNOYVQ.mjs.map 6.70 KB
89
- ESM dist/chunk-GWGHQNRI.mjs.map 2.76 KB
90
- ESM dist/chunk-NYLOXKYT.mjs.map 2.53 KB
91
- ESM dist/chunk-DPRH4HX3.mjs.map 5.67 KB
92
- ESM dist/chunk-WM6BS77F.mjs.map 2.80 KB
93
74
  ESM dist/chunk-5O2MCJZ2.mjs.map 1.26 KB
94
- ESM dist/components/chat/Input.mjs.map 71.00 B
95
- ESM dist/chunk-K5V5Q2AF.mjs.map 549.00 B
96
- ESM dist/components/chat/Markdown.mjs.map 71.00 B
97
- ESM dist/chunk-7YXG7D47.mjs.map 8.44 KB
98
- ESM dist/context/index.mjs.map 71.00 B
75
+ ESM dist/chunk-NYLOXKYT.mjs.map 2.53 KB
99
76
  ESM dist/chunk-OF66AL5Z.mjs.map 4.97 KB
100
- ESM dist/chunk-IU3WTXLQ.mjs.map 71.00 B
101
- ESM dist/hooks/index.mjs.map 71.00 B
77
+ ESM dist/chunk-GWGHQNRI.mjs.map 2.76 KB
78
+ ESM dist/chunk-UWPFPWAW.mjs.map 773.00 B
79
+ ESM dist/lib/utils.test.mjs.map 350.00 B
102
80
  ESM dist/hooks/use-copy-to-clipboard.mjs.map 71.00 B
103
- ESM dist/lib/utils.mjs.map 1.49 KB
104
- ESM dist/index.css.map 30.37 KB
105
- ESM dist/chunk-H4VKQGVU.mjs.map 71.00 B
81
+ ESM dist/chunk-IU3WTXLQ.mjs.map 71.00 B
82
+ ESM dist/chunk-7YXG7D47.mjs.map 8.44 KB
83
+ ESM dist/chunk-POVINPXX.mjs.map 1.18 KB
84
+ ESM dist/chunk-WM6BS77F.mjs.map 2.80 KB
106
85
  ESM dist/chunk-7NSRDJ5C.mjs.map 71.00 B
107
- ESM dist/lib/utils.test.mjs.map 350.00 B
86
+ ESM dist/chunk-H4VKQGVU.mjs.map 71.00 B
87
+ ESM dist/index.css.map 30.69 KB
108
88
  ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
109
- ESM dist/chunk-POVINPXX.mjs.map 1.18 KB
110
- ESM dist/types/index.mjs.map 71.00 B
111
- ESM dist/chunk-Z34F3WLK.mjs.map 854.00 B
89
+ ESM dist/components/chat/Textarea.mjs 177.00 B
90
+ ESM dist/lib/utils.mjs.map 1.49 KB
91
+ ESM dist/chunk-P4GBO6MW.mjs.map 71.00 B
92
+ ESM dist/context/index.mjs.map 71.00 B
93
+ ESM dist/chunk-WB3YULQ4.mjs.map 71.00 B
94
+ ESM dist/components/chat/props.mjs.map 71.00 B
95
+ ESM dist/chunk-DPRH4HX3.mjs.map 5.67 KB
96
+ ESM dist/components/chat/Popup.mjs 610.00 B
97
+ ESM dist/components/chat/Messages.mjs.map 71.00 B
98
+ ESM dist/components/chat/Response.mjs.map 71.00 B
99
+ ESM dist/components/chat/Markdown.mjs.map 71.00 B
100
+ ESM dist/components/chat/Chat.mjs.map 71.00 B
112
101
  ESM dist/components/chat/Header.mjs.map 71.00 B
113
- ESM dist/chunk-UWPFPWAW.mjs.map 773.00 B
114
- ESM ⚡️ Build success in 1024ms
115
- CJS dist/index.css 19.37 KB
116
- CJS dist/index.js 32.93 KB
117
- CJS dist/components/index.js 32.96 KB
118
- CJS dist/hooks/index.js 797.00 B
119
- CJS dist/hooks/use-copy-to-clipboard.js 2.32 KB
120
- CJS dist/lib/utils.test.js 182.00 B
121
- CJS dist/types/types.js 797.00 B
102
+ ESM dist/components/chat/index.mjs.map 71.00 B
103
+ ESM dist/components/chat/Icons.mjs.map 71.00 B
104
+ ESM dist/types/types.mjs.map 71.00 B
105
+ ESM dist/components/chat/Window.mjs.map 71.00 B
106
+ ESM dist/components/chat/ChatContext.mjs.map 71.00 B
107
+ ESM dist/components/chat/CodeBlock.mjs.map 71.00 B
108
+ ESM dist/components/chat/Input.mjs.map 71.00 B
109
+ ESM dist/components/chat/Button.mjs.map 71.00 B
110
+ ESM dist/components/chat/Textarea.mjs.map 71.00 B
111
+ ESM dist/components/chat/Sidebar.mjs.map 71.00 B
112
+ ESM dist/components/chat/Popup.mjs.map 71.00 B
113
+ ESM ⚡️ Build success in 489ms
114
+ CJS dist/context/index.js 803.00 B
115
+ CJS dist/index.js 33.02 KB
122
116
  CJS dist/lib/utils.js 2.40 KB
117
+ CJS dist/lib/utils.test.js 182.00 B
118
+ CJS dist/types/index.js 797.00 B
123
119
  CJS dist/components/chat/Button.js 2.91 KB
124
- CJS dist/components/chat/CodeBlock.js 9.21 KB
120
+ CJS dist/components/chat/Chat.js 31.68 KB
125
121
  CJS dist/components/chat/ChatContext.js 9.01 KB
126
- CJS dist/components/chat/Header.js 2.63 KB
127
- CJS dist/components/chat/Icons.js 9.51 KB
122
+ CJS dist/index.css 19.65 KB
128
123
  CJS dist/components/chat/Input.js 5.26 KB
129
- CJS dist/components/chat/Markdown.js 11.00 KB
130
- CJS dist/context/index.js 803.00 B
124
+ CJS dist/hooks/index.js 797.00 B
131
125
  CJS dist/components/chat/Messages.js 13.97 KB
132
- CJS dist/components/chat/Sidebar.js 32.55 KB
133
- CJS dist/components/chat/Popup.js 32.00 KB
134
126
  CJS dist/components/chat/Response.js 2.67 KB
135
- CJS dist/components/chat/Textarea.js 2.51 KB
127
+ CJS dist/hooks/use-copy-to-clipboard.js 2.32 KB
136
128
  CJS dist/components/chat/Window.js 5.46 KB
129
+ CJS dist/components/chat/Header.js 2.63 KB
130
+ CJS dist/components/chat/Sidebar.js 32.63 KB
131
+ CJS dist/components/chat/index.js 33.03 KB
137
132
  CJS dist/components/chat/props.js 807.00 B
138
- CJS dist/components/chat/index.js 32.95 KB
139
- CJS dist/components/chat/Chat.js 31.60 KB
140
- CJS dist/types/index.js 797.00 B
141
- CJS dist/index.css.map 30.37 KB
142
- CJS dist/index.js.map 51.22 KB
143
- CJS dist/components/index.js.map 51.15 KB
144
- CJS dist/hooks/index.js.map 137.00 B
145
- CJS dist/hooks/use-copy-to-clipboard.js.map 1.23 KB
146
- CJS dist/lib/utils.test.js.map 352.00 B
147
- CJS dist/types/types.js.map 478.00 B
133
+ CJS dist/components/chat/Popup.js 32.08 KB
134
+ CJS dist/components/index.js 33.05 KB
135
+ CJS dist/components/chat/Textarea.js 2.51 KB
136
+ CJS dist/components/chat/CodeBlock.js 9.21 KB
137
+ CJS dist/components/chat/Markdown.js 11.00 KB
138
+ CJS dist/components/chat/Icons.js 9.51 KB
139
+ CJS dist/types/types.js 797.00 B
140
+ CJS dist/context/index.js.map 139.00 B
148
141
  CJS dist/lib/utils.js.map 1.55 KB
142
+ CJS dist/types/index.js.map 137.00 B
149
143
  CJS dist/components/chat/Button.js.map 5.70 KB
150
- CJS dist/components/chat/ChatContext.js.map 12.69 KB
151
- CJS dist/components/chat/CodeBlock.js.map 13.35 KB
152
- CJS dist/components/chat/Icons.js.map 8.55 KB
153
144
  CJS dist/components/chat/Input.js.map 9.75 KB
154
- CJS dist/components/chat/Header.js.map 5.19 KB
145
+ CJS dist/components/chat/ChatContext.js.map 12.69 KB
146
+ CJS dist/hooks/index.js.map 137.00 B
147
+ CJS dist/components/chat/Chat.js.map 49.50 KB
155
148
  CJS dist/components/chat/Messages.js.map 25.57 KB
156
- CJS dist/context/index.js.map 139.00 B
157
- CJS dist/components/chat/Sidebar.js.map 50.62 KB
158
- CJS dist/components/chat/Window.js.map 6.76 KB
159
149
  CJS dist/components/chat/Response.js.map 5.27 KB
150
+ CJS dist/hooks/use-copy-to-clipboard.js.map 1.23 KB
151
+ CJS dist/lib/utils.test.js.map 352.00 B
152
+ CJS dist/components/chat/Header.js.map 5.19 KB
153
+ CJS dist/components/chat/Sidebar.js.map 50.83 KB
154
+ CJS dist/components/chat/index.js.map 51.49 KB
155
+ CJS dist/components/chat/Window.js.map 6.76 KB
156
+ CJS dist/index.js.map 51.42 KB
157
+ CJS dist/index.css.map 30.69 KB
158
+ CJS dist/components/chat/props.js.map 884.00 B
160
159
  CJS dist/components/chat/Textarea.js.map 2.83 KB
160
+ CJS dist/components/index.js.map 51.35 KB
161
+ CJS dist/components/chat/CodeBlock.js.map 13.35 KB
162
+ CJS dist/components/chat/Popup.js.map 50.00 KB
161
163
  CJS dist/components/chat/Markdown.js.map 16.13 KB
162
- CJS dist/components/chat/Popup.js.map 49.80 KB
163
- CJS dist/components/chat/props.js.map 884.00 B
164
- CJS dist/components/chat/index.js.map 51.29 KB
165
- CJS dist/components/chat/Chat.js.map 49.30 KB
166
- CJS dist/types/index.js.map 137.00 B
167
- CJS ⚡️ Build success in 1026ms
168
- DTS Build start
169
- DTS ⚡️ Build success in 2872ms
164
+ CJS dist/types/types.js.map 478.00 B
165
+ CJS dist/components/chat/Icons.js.map 8.55 KB
166
+ CJS ⚡️ Build success in 520ms
167
+ DTS ⚡️ Build success in 2819ms
170
168
  DTS dist/index.d.ts 411.00 B
171
169
  DTS dist/components/chat/props.d.ts 794.00 B
172
170
  DTS dist/components/chat/Popup.d.ts 269.00 B
173
171
  DTS dist/components/chat/Sidebar.d.ts 378.00 B
174
- DTS dist/components/chat/Chat.d.ts 3.36 KB
172
+ DTS dist/components/chat/Chat.d.ts 3.51 KB
175
173
  DTS dist/components/chat/ChatContext.d.ts 2.73 KB
176
174
  DTS dist/components/index.d.ts 356.00 B
177
175
  DTS dist/context/index.d.ts 12.00 B
@@ -192,5 +190,3 @@ DTS dist/components/chat/Response.d.ts 201.00 B
192
190
  DTS dist/components/chat/Textarea.d.ts 490.00 B
193
191
  DTS dist/components/chat/Window.d.ts 223.00 B
194
192
  DTS dist/components/chat/index.d.ts 331.00 B
195
- Waiting for the debugger to disconnect...
196
- Waiting for the debugger to disconnect...
package/CHANGELOG.md CHANGED
@@ -1,28 +1,16 @@
1
1
  # ui
2
2
 
3
- ## 0.17.0-demofixes.2
3
+ ## 0.17.0-tools.1
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - presentation demo supports ai audio
7
+ - function return
8
8
 
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies
12
- - @copilotkit/react-core@0.20.0-demofixes.2
13
- - @copilotkit/shared@0.4.0-demofixes.2
14
-
15
- ## 0.17.0-demofixes.1
16
-
17
- ### Minor Changes
18
-
19
- - helloworld to presentation, refactor audio gen to util
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies
24
- - @copilotkit/react-core@0.20.0-demofixes.1
25
- - @copilotkit/shared@0.4.0-demofixes.1
12
+ - @copilotkit/react-core@0.20.0-tools.1
13
+ - @copilotkit/shared@0.4.0-tools.1
26
14
 
27
15
  ## 0.17.0-tools.0
28
16
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotChat
3
- } from "./chunk-73OGJ3WL.mjs";
3
+ } from "./chunk-Q7SIB42Y.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -30,4 +30,4 @@ var CopilotSidebar = (props) => {
30
30
  export {
31
31
  CopilotSidebar
32
32
  };
33
- //# sourceMappingURL=chunk-HPFHUPN6.mjs.map
33
+ //# sourceMappingURL=chunk-FA66IWQ6.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CopilotChat
3
- } from "./chunk-73OGJ3WL.mjs";
3
+ } from "./chunk-Q7SIB42Y.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -18,4 +18,4 @@ var CopilotPopup = (props) => {
18
18
  export {
19
19
  CopilotPopup
20
20
  };
21
- //# sourceMappingURL=chunk-K5V5Q2AF.mjs.map
21
+ //# sourceMappingURL=chunk-KDHWN43O.mjs.map
@@ -34,6 +34,7 @@ var CopilotChat = ({
34
34
  clickOutsideToClose = true,
35
35
  hitEscapeToClose = true,
36
36
  onSetOpen,
37
+ onSubmitMessage,
37
38
  shortcut = "e",
38
39
  icons,
39
40
  labels,
@@ -58,6 +59,7 @@ var CopilotChat = ({
58
59
  setOpenState(open);
59
60
  };
60
61
  const sendMessage = (message) => __async(void 0, null, function* () {
62
+ onSubmitMessage == null ? void 0 : onSubmitMessage(message);
61
63
  append({
62
64
  id: nanoid(),
63
65
  content: message,
@@ -87,4 +89,4 @@ var CopilotChat = ({
87
89
  export {
88
90
  CopilotChat
89
91
  };
90
- //# sourceMappingURL=chunk-73OGJ3WL.mjs.map
92
+ //# sourceMappingURL=chunk-Q7SIB42Y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/chat/Chat.tsx"],"sourcesContent":["import React from \"react\";\nimport { CopilotChatIcons, ChatContextProvider, CopilotChatLabels } from \"./ChatContext\";\nimport { SystemMessageFunction, useCopilotChat } from \"@copilotkit/react-core\";\nimport {\n ButtonProps,\n HeaderProps,\n WindowProps,\n MessagesProps,\n InputProps,\n ResponseButtonProps,\n} from \"./props\";\nimport { Window as DefaultWindow } from \"./Window\";\nimport { Button as DefaultButton } from \"./Button\";\nimport { Header as DefaultHeader } from \"./Header\";\nimport { Messages as DefaultMessages } from \"./Messages\";\nimport { Input as DefaultInput } from \"./Input\";\nimport { nanoid } from \"nanoid\";\nimport { ResponseButton as DefaultResponseButton } from \"./Response\";\n\n/**\n * Props for CopilotChat component.\n */\nexport interface CopilotChatProps {\n /**\n * Custom instructions to be added to the system message. Use this property to\n * provide additional context or guidance to the language model, influencing\n * its responses. These instructions can include specific directions,\n * preferences, or criteria that the model should consider when generating\n * its output, thereby tailoring the conversation more precisely to the\n * user's needs or the application's requirements.\n */\n instructions?: string;\n\n /**\n * Whether the chat window should be open by default.\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * If the chat window should close when the user clicks outside of it.\n * @default true\n */\n clickOutsideToClose?: boolean;\n\n /**\n * If the chat window should close when the user hits the Escape key.\n * @default true\n */\n hitEscapeToClose?: boolean;\n\n /**\n * A callback that gets called when the chat window opens or closes.\n */\n onSetOpen?: (open: boolean) => void;\n\n /**\n * A callback that gets called when a new message it submitted.\n */\n onSubmitMessage?: (message: string) => void;\n\n /**\n * The shortcut key to open the chat window.\n * Uses Command-<shortcut> on a Mac and Ctrl-<shortcut> on Windows.\n * @default \"e\"\n */\n shortcut?: string;\n\n /**\n * Icons can be used to set custom icons for the chat window.\n */\n icons?: CopilotChatIcons;\n\n /**\n * Labels can be used to set custom labels for the chat window.\n */\n labels?: CopilotChatLabels;\n\n /**\n * A function that takes in context string and instructions and returns\n * the system message to include in the chat request.\n * Use this to completely override the system message, when providing\n * instructions is not enough.\n */\n makeSystemMessage?: SystemMessageFunction;\n\n /**\n * Whether to show the response button.\n * @default true\n */\n showResponseButton?: boolean;\n\n /**\n * A custom Window component to use instead of the default.\n */\n Window?: React.ComponentType<WindowProps>;\n\n /**\n * A custom Button component to use instead of the default.\n */\n Button?: React.ComponentType<ButtonProps>;\n\n /**\n * A custom Header component to use instead of the default.\n */\n Header?: React.ComponentType<HeaderProps>;\n\n /**\n * A custom Messages component to use instead of the default.\n */\n Messages?: React.ComponentType<MessagesProps>;\n\n /**\n * A custom Input component to use instead of the default.\n */\n Input?: React.ComponentType<InputProps>;\n\n /**\n * A custom ResponseButton component to use instead of the default.\n */\n ResponseButton?: React.ComponentType<ResponseButtonProps>;\n\n /**\n * A class name to apply to the root element.\n */\n className?: string;\n}\n\nexport const CopilotChat = ({\n instructions,\n defaultOpen = false,\n clickOutsideToClose = true,\n hitEscapeToClose = true,\n onSetOpen,\n onSubmitMessage,\n shortcut = \"e\",\n icons,\n labels,\n makeSystemMessage,\n showResponseButton = true,\n Window = DefaultWindow,\n Button = DefaultButton,\n Header = DefaultHeader,\n Messages = DefaultMessages,\n Input = DefaultInput,\n ResponseButton = DefaultResponseButton,\n className,\n}: CopilotChatProps) => {\n const { visibleMessages, append, reload, stop, isLoading, input, setInput } = useCopilotChat({\n id: nanoid(),\n makeSystemMessage,\n additionalInstructions: instructions,\n });\n\n const [openState, setOpenState] = React.useState(defaultOpen);\n\n const setOpen = (open: boolean) => {\n onSetOpen?.(open);\n setOpenState(open);\n };\n\n const sendMessage = async (message: string) => {\n onSubmitMessage?.(message);\n append({\n id: nanoid(),\n content: message,\n role: \"user\",\n });\n };\n\n return (\n <ChatContextProvider icons={icons} labels={labels}>\n <div className={className}>\n <Button open={openState} setOpen={setOpen}></Button>\n <Window\n open={openState}\n setOpen={setOpen}\n clickOutsideToClose={clickOutsideToClose}\n shortcut={shortcut}\n hitEscapeToClose={hitEscapeToClose}\n >\n <Header open={openState} setOpen={setOpen} />\n <Messages messages={visibleMessages} inProgress={isLoading} />\n <Input inProgress={isLoading} onSend={sendMessage}>\n {showResponseButton && visibleMessages.length > 0 && (\n <ResponseButton onClick={isLoading ? stop : reload} inProgress={isLoading} />\n )}\n </Input>\n </Window>\n </div>\n </ChatContextProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAElB,SAAgC,sBAAsB;AActD,SAAS,cAAc;AA6Jf,cACA,YADA;AA7CD,IAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB,QAAAA,UAAS;AAAA,EACT,QAAAC,UAAS;AAAA,EACT,QAAAC,UAAS;AAAA,EACT,UAAAC,YAAW;AAAA,EACX,OAAAC,SAAQ;AAAA,EACR,gBAAAC,kBAAiB;AAAA,EACjB;AACF,MAAwB;AACtB,QAAM,EAAE,iBAAiB,QAAQ,QAAQ,MAAM,WAAW,OAAO,SAAS,IAAI,eAAe;AAAA,IAC3F,IAAI,OAAO;AAAA,IACX;AAAA,IACA,wBAAwB;AAAA,EAC1B,CAAC;AAED,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAS,WAAW;AAE5D,QAAM,UAAU,CAAC,SAAkB;AACjC,2CAAY;AACZ,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,cAAc,CAAO,YAAoB;AAC7C,uDAAkB;AAClB,WAAO;AAAA,MACL,IAAI,OAAO;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAEA,SACE,oBAAC,uBAAoB,OAAc,QACjC,+BAAC,SAAI,WACH;AAAA,wBAACJ,SAAA,EAAO,MAAM,WAAW,SAAkB;AAAA,IAC3C;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,8BAACE,SAAA,EAAO,MAAM,WAAW,SAAkB;AAAA,UAC3C,oBAACC,WAAA,EAAS,UAAU,iBAAiB,YAAY,WAAW;AAAA,UAC5D,oBAACC,QAAA,EAAM,YAAY,WAAW,QAAQ,aACnC,gCAAsB,gBAAgB,SAAS,KAC9C,oBAACC,iBAAA,EAAe,SAAS,YAAY,OAAO,QAAQ,YAAY,WAAW,GAE/E;AAAA;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;","names":["Window","Button","Header","Messages","Input","ResponseButton"]}
@@ -1,33 +1,9 @@
1
- // src/components/chat/ChatContext.tsx
2
- import React, { useMemo } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
- var ChatContext = React.createContext(void 0);
5
- function useChatContext() {
6
- const context = React.useContext(ChatContext);
7
- if (context === void 0) {
8
- throw new Error(
9
- "Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?"
10
- );
11
- }
12
- return context;
13
- }
14
-
15
- // src/components/chat/Button.tsx
16
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
17
- var Button = ({ open, setOpen }) => {
18
- const context = useChatContext();
19
- return /* @__PURE__ */ jsx2("div", { onClick: () => setOpen(!open), children: /* @__PURE__ */ jsxs(
20
- "button",
21
- {
22
- className: `copilotKitButton ${open ? "open" : ""}`,
23
- "aria-label": open ? "Close Chat" : "Open Chat",
24
- children: [
25
- /* @__PURE__ */ jsx2("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children: context.icons.openIcon }),
26
- /* @__PURE__ */ jsx2("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children: context.icons.closeIcon })
27
- ]
28
- }
29
- ) });
30
- };
1
+ import {
2
+ Button
3
+ } from "../../chunk-5O2MCJZ2.mjs";
4
+ import "../../chunk-OF66AL5Z.mjs";
5
+ import "../../chunk-7YXG7D47.mjs";
6
+ import "../../chunk-MRXNTQOX.mjs";
31
7
  export {
32
8
  Button
33
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/chat/ChatContext.tsx","../../../src/components/chat/Button.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n /**\n * The icon to use for the open chat button.\n * @default <OpenIcon />\n */\n openIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button.\n * @default <CloseIcon />\n */\n closeIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button in the header.\n * @default <HeaderCloseIcon />\n */\n headerCloseIcon?: React.ReactNode;\n\n /**\n * The icon to use for the send button.\n * @default <SendIcon />\n */\n sendIcon?: React.ReactNode;\n\n /**\n * The icon to use for the activity indicator.\n * @default <ActivityIcon />\n */\n activityIcon?: React.ReactNode;\n\n /**\n * The icon to use for the spinner.\n * @default <SpinnerIcon />\n */\n spinnerIcon?: React.ReactNode;\n\n /**\n * The icon to use for the stop button.\n * @default <StopIcon />\n */\n stopIcon?: React.ReactNode;\n\n /**\n * The icon to use for the regenerate button.\n * @default <RegenerateIcon />\n */\n regenerateIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n /**\n * The initial message(s) to display in the chat window.\n */\n initial?: string | string[];\n\n /**\n * The title to display in the header.\n * @default \"CopilotKit\"\n */\n title?: string;\n\n /**\n * The placeholder to display in the input.\n * @default \"Type a message...\"\n */\n placeholder?: string;\n\n /**\n * The message to display while the chat GPT is \"thinking\".\n * @default \"Thinking...\"\n */\n thinking?: string;\n\n /**\n * The message to display when the chat is done executing a function.\n * @default \"✅ Done\"\n */\n done?: string;\n\n /**\n * The message to display when an error occurs.\n * @default \"❌ An error occurred. Please try again.\"\n */\n error?: string;\n\n /**\n * The label to display on the stop button.\n * @default \"Stop generating\"\n */\n stopGenerating?: string;\n\n /**\n * The label to display on the regenerate button.\n * @default \"Regenerate response\"\n */\n regenerateResponse?: string;\n}\n\ninterface ChatContext {\n labels: Required<CopilotChatLabels>;\n icons: Required<CopilotChatIcons>;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(undefined);\n\nexport function useChatContext(): ChatContext {\n const context = React.useContext(ChatContext);\n if (context === undefined) {\n throw new Error(\n \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n );\n }\n return context;\n}\n\ninterface ChatContextProps {\n // temperature?: number;\n // instructions?: string;\n // maxFeedback?: number;\n labels?: CopilotChatLabels;\n icons?: CopilotChatIcons;\n children?: React.ReactNode;\n}\n\nexport const ChatContextProvider = ({\n // temperature,\n // instructions,\n // maxFeedback,\n labels,\n icons,\n children,\n}: ChatContextProps) => {\n const context = useMemo(\n () => ({\n labels: {\n ...{\n initial: \"\",\n title: \"CopilotKit\",\n placeholder: \"Type a message...\",\n thinking: \"Thinking...\",\n done: \"✅ Done\",\n error: \"❌ An error occurred. Please try again.\",\n stopGenerating: \"Stop generating\",\n regenerateResponse: \"Regenerate response\",\n },\n ...labels,\n },\n\n icons: {\n ...{\n openIcon: DefaultIcons.OpenIcon,\n closeIcon: DefaultIcons.CloseIcon,\n headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n sendIcon: DefaultIcons.SendIcon,\n activityIcon: DefaultIcons.ActivityIcon,\n spinnerIcon: DefaultIcons.SpinnerIcon,\n stopIcon: DefaultIcons.StopIcon,\n regenerateIcon: DefaultIcons.RegenerateIcon,\n },\n icons,\n },\n }),\n [labels, icons],\n );\n return <ChatContext.Provider value={context}>{children}</ChatContext.Provider>;\n};\n","import { ButtonProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\n\nexport const Button = ({ open, setOpen }: ButtonProps) => {\n const context = useChatContext();\n // To ensure that the mouse handler fires even when the button is scaled down\n // we wrap the button in a div and attach the handler to the div\n return (\n <div onClick={() => setOpen(!open)}>\n <button\n className={`copilotKitButton ${open ? \"open\" : \"\"}`}\n aria-label={open ? \"Close Chat\" : \"Open Chat\"}\n >\n <div className=\"copilotKitButtonIcon copilotKitButtonIconOpen\">\n {context.icons.openIcon}\n </div>\n <div className=\"copilotKitButtonIcon copilotKitButtonIconClose\">\n {context.icons.closeIcon}\n </div>\n </button>\n </div>\n );\n};\n"],"mappings":";AAAA,OAAO,SAAS,eAAe;AA8KtB;AA7DF,IAAM,cAAc,MAAM,cAAuC,MAAS;AAE1E,SAAS,iBAA8B;AAC5C,QAAM,UAAU,MAAM,WAAW,WAAW;AAC5C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AClHM,SAIE,OAAAA,MAJF;AANC,IAAM,SAAS,CAAC,EAAE,MAAM,QAAQ,MAAmB;AACxD,QAAM,UAAU,eAAe;AAG/B,SACE,gBAAAA,KAAC,SAAI,SAAS,MAAM,QAAQ,CAAC,IAAI,GAC/B;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,oBAAoB,OAAO,SAAS;AAAA,MAC/C,cAAY,OAAO,eAAe;AAAA,MAElC;AAAA,wBAAAA,KAAC,SAAI,WAAU,iDACZ,kBAAQ,MAAM,UACjB;AAAA,QACA,gBAAAA,KAAC,SAAI,WAAU,kDACZ,kBAAQ,MAAM,WACjB;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":["jsx"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -36,6 +36,10 @@ interface CopilotChatProps {
36
36
  * A callback that gets called when the chat window opens or closes.
37
37
  */
38
38
  onSetOpen?: (open: boolean) => void;
39
+ /**
40
+ * A callback that gets called when a new message it submitted.
41
+ */
42
+ onSubmitMessage?: (message: string) => void;
39
43
  /**
40
44
  * The shortcut key to open the chat window.
41
45
  * Uses Command-<shortcut> on a Mac and Ctrl-<shortcut> on Windows.
@@ -91,6 +95,6 @@ interface CopilotChatProps {
91
95
  */
92
96
  className?: string;
93
97
  }
94
- declare const CopilotChat: ({ instructions, defaultOpen, clickOutsideToClose, hitEscapeToClose, onSetOpen, shortcut, icons, labels, makeSystemMessage, showResponseButton, Window, Button, Header, Messages, Input, ResponseButton, className, }: CopilotChatProps) => JSX.Element;
98
+ declare const CopilotChat: ({ instructions, defaultOpen, clickOutsideToClose, hitEscapeToClose, onSetOpen, onSubmitMessage, shortcut, icons, labels, makeSystemMessage, showResponseButton, Window, Button, Header, Messages, Input, ResponseButton, className, }: CopilotChatProps) => JSX.Element;
95
99
 
96
100
  export { CopilotChat, CopilotChatProps };
@@ -810,6 +810,7 @@ var CopilotChat = ({
810
810
  clickOutsideToClose = true,
811
811
  hitEscapeToClose = true,
812
812
  onSetOpen,
813
+ onSubmitMessage,
813
814
  shortcut = "e",
814
815
  icons,
815
816
  labels,
@@ -834,6 +835,7 @@ var CopilotChat = ({
834
835
  setOpenState(open);
835
836
  };
836
837
  const sendMessage = (message) => __async(void 0, null, function* () {
838
+ onSubmitMessage == null ? void 0 : onSubmitMessage(message);
837
839
  append({
838
840
  id: (0, import_nanoid2.nanoid)(),
839
841
  content: message,