@copilotkit/react-ui 0.14.0-alpha.2 → 0.14.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +102 -98
- package/CHANGELOG.md +35 -6
- package/dist/{chunk-3OM3QBDC.mjs → chunk-C34L4AWW.mjs} +2 -2
- package/dist/{chunk-GC4LE273.mjs → chunk-CF3BK4OX.mjs} +4 -3
- package/dist/chunk-CF3BK4OX.mjs.map +1 -0
- package/dist/{chunk-ITE4RI6K.mjs → chunk-CNQX2VY3.mjs} +2 -2
- package/dist/chunk-CNQX2VY3.mjs.map +1 -0
- package/dist/{chunk-IAFCGDM6.mjs → chunk-INCNMGJ7.mjs} +1 -1
- package/dist/chunk-INCNMGJ7.mjs.map +1 -0
- package/dist/{chunk-Y2LXYPNP.mjs → chunk-OOBQC5H6.mjs} +1 -1
- package/dist/chunk-OOBQC5H6.mjs.map +1 -0
- package/dist/{chunk-7TUGXTHJ.mjs → chunk-RPTRCFSO.mjs} +4 -4
- package/dist/{chunk-L3OH4SEP.mjs → chunk-SEH5PQVW.mjs} +1 -1
- package/dist/chunk-SEH5PQVW.mjs.map +1 -0
- package/dist/{chunk-EJR2J4DR.mjs → chunk-SHOTWRKC.mjs} +2 -2
- package/dist/chunk-SHOTWRKC.mjs.map +1 -0
- package/dist/{chunk-UB4Q6LFN.mjs → chunk-XGUBRIUV.mjs} +2 -2
- package/dist/components/chat-components/chat-list.d.ts +1 -1
- package/dist/components/chat-components/chat-list.mjs +3 -3
- package/dist/components/chat-components/chat-message-actions.d.ts +1 -1
- package/dist/components/chat-components/chat-message-actions.mjs +1 -1
- package/dist/components/chat-components/chat-message.d.ts +1 -1
- package/dist/components/chat-components/chat-message.mjs +2 -2
- package/dist/components/chat-components/chat-panel.d.ts +1 -1
- package/dist/components/chat-components/chat-panel.mjs +2 -2
- package/dist/components/chat-components/clear-history.d.ts +1 -1
- package/dist/components/chat-components/copilot-chat.mjs +7 -7
- package/dist/components/chat-components/default-empty-screen.mjs +1 -1
- package/dist/components/chat-components/prompt-form.d.ts +1 -1
- package/dist/components/chat-components/prompt-form.mjs +1 -1
- package/dist/components/index.mjs +9 -9
- package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs +9 -9
- package/dist/components/sidebar/copilot-sidebar.mjs +8 -8
- package/dist/index.mjs +10 -10
- package/dist/types/types.d.ts +1 -1
- package/package.json +3 -4
- package/src/components/chat-components/chat-list.tsx +1 -1
- package/src/components/chat-components/chat-message-actions.tsx +1 -1
- package/src/components/chat-components/chat-message.tsx +1 -1
- package/src/components/chat-components/chat-panel.tsx +3 -2
- package/src/components/chat-components/default-empty-screen.tsx +0 -1
- package/src/components/chat-components/prompt-form.tsx +1 -1
- package/src/types/types.ts +1 -1
- package/dist/chunk-EJR2J4DR.mjs.map +0 -1
- package/dist/chunk-GC4LE273.mjs.map +0 -1
- package/dist/chunk-IAFCGDM6.mjs.map +0 -1
- package/dist/chunk-ITE4RI6K.mjs.map +0 -1
- package/dist/chunk-L3OH4SEP.mjs.map +0 -1
- package/dist/chunk-Y2LXYPNP.mjs.map +0 -1
- /package/dist/{chunk-3OM3QBDC.mjs.map → chunk-C34L4AWW.mjs.map} +0 -0
- /package/dist/{chunk-7TUGXTHJ.mjs.map → chunk-RPTRCFSO.mjs.map} +0 -0
- /package/dist/{chunk-UB4Q6LFN.mjs.map → chunk-XGUBRIUV.mjs.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
Debugger attached.
|
|
1
2
|
|
|
2
|
-
> @copilotkit/react-ui@0.
|
|
3
|
+
> @copilotkit/react-ui@0.14.0-alpha.3 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-ui
|
|
3
4
|
> tsup --treeshake
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Debugger attached.
|
|
7
|
+
CLI Building entry: src/index.tsx, src/components/index.ts, src/context/index.ts, src/hooks/index.ts, src/hooks/use-at-bottom.tsx, src/hooks/use-copy-to-clipboard.tsx, src/hooks/use-enter-submit.tsx, src/lib/utils.test.ts, src/lib/utils.ts, src/types/index.ts, src/types/types.ts, src/components/chat-components/chat-list.tsx, src/components/chat-components/chat-message-actions.tsx, src/components/chat-components/chat-message.tsx, src/components/chat-components/chat-panel.tsx, src/components/chat-components/chat-scroll-anchor.tsx, src/components/chat-components/clear-history.tsx, src/components/chat-components/copilot-chat.tsx, src/components/chat-components/default-empty-screen.tsx, src/components/chat-components/external-link.tsx, src/components/chat-components/markdown.tsx, src/components/chat-components/prompt-form.tsx, src/components/chat-components/theme-toggle.tsx, src/components/chat-components/toaster.tsx, src/components/sidebar/copilot-sidebar-ui-provider.tsx, src/components/sidebar/copilot-sidebar.tsx, src/components/sidebar/sidebar-context.tsx, src/components/chat-components/ui/alert-dialog.tsx, src/components/chat-components/ui/badge.tsx, src/components/chat-components/ui/button.tsx, src/components/chat-components/ui/codeblock.tsx, src/components/chat-components/ui/dialog.tsx, src/components/chat-components/ui/dropdown-menu.tsx, src/components/chat-components/ui/icons.tsx, src/components/chat-components/ui/input.tsx, src/components/chat-components/ui/label.tsx, src/components/chat-components/ui/select.tsx, src/components/chat-components/ui/separator.tsx, src/components/chat-components/ui/sheet.tsx, src/components/chat-components/ui/switch.tsx, src/components/chat-components/ui/textarea.tsx, src/components/chat-components/ui/tooltip.tsx
|
|
6
8
|
CLI Using tsconfig: tsconfig.json
|
|
7
9
|
CLI tsup v6.7.0
|
|
8
10
|
CLI Using tsup config: /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-ui/tsup.config.ts
|
|
@@ -12,7 +14,6 @@ ESM Build start
|
|
|
12
14
|
Browserslist: caniuse-lite is outdated. Please run:
|
|
13
15
|
npx update-browserslist-db@latest
|
|
14
16
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
15
|
-
DTS Build start
|
|
16
17
|
Module level directives cause errors when bundled, "use client" in "dist/components/chat-components/ui/tooltip.mjs" was ignored.
|
|
17
18
|
Module level directives cause errors when bundled, "use client" in "dist/components/chat-components/ui/dropdown-menu.mjs" was ignored.
|
|
18
19
|
Module level directives cause errors when bundled, "use client" in "dist/components/chat-components/ui/icons.mjs" was ignored.
|
|
@@ -35,152 +36,153 @@ Module level directives cause errors when bundled, "use client" in "dist/hooks/u
|
|
|
35
36
|
Generated an empty chunk: "types".
|
|
36
37
|
Generated an empty chunk: "chunk-7NSRDJ5C".
|
|
37
38
|
Generated an empty chunk: "chunk-U6NJWGTV".
|
|
38
|
-
Generated an empty chunk: "chunk-H4VKQGVU".
|
|
39
39
|
Generated an empty chunk: "chunk-IU3WTXLQ".
|
|
40
|
+
Generated an empty chunk: "chunk-H4VKQGVU".
|
|
40
41
|
ESM dist/index.css 23.69 KB
|
|
41
42
|
ESM dist/index.css.map 35.28 KB
|
|
42
43
|
ESM dist/chunk-7NSRDJ5C.mjs 76.00 B
|
|
43
44
|
ESM dist/chunk-U6NJWGTV.mjs 76.00 B
|
|
44
45
|
ESM dist/chunk-H4VKQGVU.mjs 76.00 B
|
|
45
|
-
ESM dist/chunk-MRXNTQOX.mjs 1.92 KB
|
|
46
46
|
ESM dist/chunk-IU3WTXLQ.mjs 76.00 B
|
|
47
|
-
ESM dist/lib/utils.test.mjs 200.00 B
|
|
48
47
|
ESM dist/types/types.mjs 67.00 B
|
|
48
|
+
ESM dist/chunk-MRXNTQOX.mjs 1.92 KB
|
|
49
49
|
ESM dist/components/chat-components/ui/textarea.mjs 924.00 B
|
|
50
|
-
ESM dist/components/chat-components/ui/dropdown-menu.mjs 4.02 KB
|
|
51
|
-
ESM dist/components/chat-components/ui/icons.mjs 527.00 B
|
|
52
50
|
ESM dist/components/chat-components/ui/tooltip.mjs 248.00 B
|
|
51
|
+
ESM dist/lib/utils.test.mjs 200.00 B
|
|
52
|
+
ESM dist/components/chat-components/ui/dropdown-menu.mjs 4.02 KB
|
|
53
53
|
ESM dist/components/chat-components/ui/label.mjs 810.00 B
|
|
54
|
-
ESM dist/components/chat-components/ui/
|
|
55
|
-
ESM dist/components/chat-components/ui/
|
|
54
|
+
ESM dist/components/chat-components/ui/input.mjs 999.00 B
|
|
55
|
+
ESM dist/components/chat-components/ui/icons.mjs 527.00 B
|
|
56
56
|
ESM dist/components/chat-components/ui/switch.mjs 1.39 KB
|
|
57
|
+
ESM dist/components/chat-components/ui/separator.mjs 203.00 B
|
|
57
58
|
ESM dist/components/chat-components/ui/sheet.mjs 3.85 KB
|
|
59
|
+
ESM dist/components/chat-components/ui/select.mjs 4.14 KB
|
|
60
|
+
ESM dist/components/chat-components/ui/alert-dialog.mjs 404.00 B
|
|
58
61
|
ESM dist/components/sidebar/copilot-sidebar-ui-provider.mjs 927.00 B
|
|
59
|
-
ESM dist/components/chat-components/ui/input.mjs 999.00 B
|
|
60
|
-
ESM dist/components/sidebar/copilot-sidebar.mjs 835.00 B
|
|
61
62
|
ESM dist/components/sidebar/sidebar-context.mjs 177.00 B
|
|
63
|
+
ESM dist/components/chat-components/ui/dialog.mjs 4.18 KB
|
|
62
64
|
ESM dist/components/chat-components/ui/badge.mjs 1.17 KB
|
|
63
|
-
ESM dist/components/
|
|
64
|
-
ESM dist/components/chat-components/
|
|
65
|
-
ESM dist/
|
|
65
|
+
ESM dist/components/sidebar/copilot-sidebar.mjs 835.00 B
|
|
66
|
+
ESM dist/components/chat-components/clear-history.mjs 2.42 KB
|
|
67
|
+
ESM dist/chunk-SRBUGQTM.mjs 4.47 KB
|
|
68
|
+
ESM dist/components/chat-components/copilot-chat.mjs 794.00 B
|
|
66
69
|
ESM dist/components/chat-components/default-empty-screen.mjs 319.00 B
|
|
67
|
-
ESM dist/components/chat-components/ui/
|
|
70
|
+
ESM dist/components/chat-components/ui/button.mjs 213.00 B
|
|
68
71
|
ESM dist/components/chat-components/markdown.mjs 170.00 B
|
|
69
72
|
ESM dist/components/chat-components/external-link.mjs 166.00 B
|
|
70
|
-
ESM dist/components/chat-components/prompt-form.mjs 337.00 B
|
|
71
|
-
ESM dist/components/chat-components/theme-toggle.mjs 1.02 KB
|
|
72
73
|
ESM dist/components/chat-components/toaster.mjs 146.00 B
|
|
73
74
|
ESM dist/types/index.mjs 98.00 B
|
|
74
|
-
ESM dist/components/chat-components/chat-list.mjs 473.00 B
|
|
75
|
-
ESM dist/components/chat-components/chat-message.mjs 409.00 B
|
|
76
75
|
ESM dist/components/chat-components/chat-message-actions.mjs 319.00 B
|
|
77
|
-
ESM dist/
|
|
76
|
+
ESM dist/components/chat-components/chat-message.mjs 409.00 B
|
|
77
|
+
ESM dist/components/chat-components/chat-list.mjs 473.00 B
|
|
78
|
+
ESM dist/components/chat-components/theme-toggle.mjs 1.02 KB
|
|
79
|
+
ESM dist/lib/utils.mjs 171.00 B
|
|
80
|
+
ESM dist/components/chat-components/prompt-form.mjs 337.00 B
|
|
81
|
+
ESM dist/components/chat-components/chat-panel.mjs 370.00 B
|
|
82
|
+
ESM dist/chunk-XGUBRIUV.mjs 2.33 KB
|
|
83
|
+
ESM dist/chunk-MC6KTH4X.mjs 297.00 B
|
|
84
|
+
ESM dist/components/index.mjs 978.00 B
|
|
85
|
+
ESM dist/chunk-C34L4AWW.mjs 1.48 KB
|
|
78
86
|
ESM dist/index.mjs 1.02 KB
|
|
79
87
|
ESM dist/components/chat-components/chat-scroll-anchor.mjs 210.00 B
|
|
80
|
-
ESM dist/
|
|
81
|
-
ESM dist/chunk-
|
|
82
|
-
ESM dist/chunk-
|
|
83
|
-
ESM dist/chunk-7TUGXTHJ.mjs 1.49 KB
|
|
84
|
-
ESM dist/chunk-L3OH4SEP.mjs 2.02 KB
|
|
85
|
-
ESM dist/chunk-5KEDV5VC.mjs 900.00 B
|
|
86
|
-
ESM dist/components/chat-components/chat-panel.mjs 370.00 B
|
|
87
|
-
ESM dist/chunk-EJR2J4DR.mjs 778.00 B
|
|
88
|
+
ESM dist/chunk-RPTRCFSO.mjs 1.49 KB
|
|
89
|
+
ESM dist/chunk-GCOPYGHH.mjs 908.00 B
|
|
90
|
+
ESM dist/chunk-SEH5PQVW.mjs 2.02 KB
|
|
88
91
|
ESM dist/chunk-6LAZQHEB.mjs 4.06 KB
|
|
89
|
-
ESM dist/chunk-
|
|
90
|
-
ESM dist/
|
|
92
|
+
ESM dist/chunk-CNQX2VY3.mjs 2.80 KB
|
|
93
|
+
ESM dist/components/chat-components/ui/codeblock.mjs 361.00 B
|
|
94
|
+
ESM dist/chunk-5KEDV5VC.mjs 900.00 B
|
|
95
|
+
ESM dist/chunk-SHOTWRKC.mjs 778.00 B
|
|
91
96
|
ESM dist/chunk-TEYIQHMK.mjs 403.00 B
|
|
92
|
-
ESM dist/chunk-
|
|
93
|
-
ESM dist/chunk-GCOPYGHH.mjs 908.00 B
|
|
97
|
+
ESM dist/chunk-OOBQC5H6.mjs 1.30 KB
|
|
94
98
|
ESM dist/chunk-M3CZWJI3.mjs 1.83 KB
|
|
95
|
-
ESM dist/chunk-VGX2W5ZB.mjs 1.20 KB
|
|
96
99
|
ESM dist/chunk-2KAF7NKC.mjs 22.15 KB
|
|
97
|
-
ESM dist/chunk-
|
|
98
|
-
ESM dist/
|
|
99
|
-
ESM dist/chunk-Q6YO7LDK.mjs 1.01 KB
|
|
100
|
-
ESM dist/hooks/use-at-bottom.mjs 159.00 B
|
|
100
|
+
ESM dist/chunk-CF3BK4OX.mjs 1.93 KB
|
|
101
|
+
ESM dist/chunk-VGX2W5ZB.mjs 1.20 KB
|
|
101
102
|
ESM dist/chunk-IJLMKBSZ.mjs 802.00 B
|
|
102
|
-
ESM dist/chunk-
|
|
103
|
+
ESM dist/chunk-INCNMGJ7.mjs 2.63 KB
|
|
104
|
+
ESM dist/hooks/use-at-bottom.mjs 159.00 B
|
|
103
105
|
ESM dist/hooks/use-copy-to-clipboard.mjs 174.00 B
|
|
104
|
-
ESM dist/
|
|
105
|
-
ESM dist/context/index.mjs 98.00 B
|
|
106
|
-
ESM dist/components/chat-components/copilot-chat.mjs 794.00 B
|
|
107
|
-
ESM dist/lib/utils.mjs 171.00 B
|
|
106
|
+
ESM dist/hooks/index.mjs 98.00 B
|
|
108
107
|
ESM dist/hooks/use-enter-submit.mjs 165.00 B
|
|
109
|
-
ESM dist/chunk-
|
|
108
|
+
ESM dist/chunk-Q6YO7LDK.mjs 1.01 KB
|
|
109
|
+
ESM dist/chunk-OHWEJUCS.mjs 524.00 B
|
|
110
110
|
ESM dist/chunk-POVINPXX.mjs 706.00 B
|
|
111
|
-
ESM dist/
|
|
111
|
+
ESM dist/context/index.mjs 98.00 B
|
|
112
|
+
ESM dist/chunk-ZYC5YVDO.mjs 638.00 B
|
|
112
113
|
ESM dist/chunk-7NSRDJ5C.mjs.map 51.00 B
|
|
114
|
+
ESM dist/chunk-H4VKQGVU.mjs.map 51.00 B
|
|
113
115
|
ESM dist/chunk-U6NJWGTV.mjs.map 51.00 B
|
|
114
116
|
ESM dist/chunk-IU3WTXLQ.mjs.map 51.00 B
|
|
115
|
-
ESM dist/
|
|
117
|
+
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
118
|
+
ESM dist/types/types.mjs.map 51.00 B
|
|
116
119
|
ESM dist/components/chat-components/ui/textarea.mjs.map 1.17 KB
|
|
117
|
-
ESM dist/
|
|
120
|
+
ESM dist/lib/utils.test.mjs.map 349.00 B
|
|
121
|
+
ESM dist/components/chat-components/ui/tooltip.mjs.map 51.00 B
|
|
118
122
|
ESM dist/components/chat-components/ui/label.mjs.map 1.14 KB
|
|
119
123
|
ESM dist/components/chat-components/ui/dropdown-menu.mjs.map 5.79 KB
|
|
120
|
-
ESM dist/components/chat-components/ui/
|
|
121
|
-
ESM dist/components/chat-components/ui/
|
|
124
|
+
ESM dist/components/chat-components/ui/input.mjs.map 1.25 KB
|
|
125
|
+
ESM dist/components/chat-components/ui/icons.mjs.map 51.00 B
|
|
122
126
|
ESM dist/components/chat-components/ui/switch.mjs.map 1.67 KB
|
|
127
|
+
ESM dist/components/chat-components/ui/separator.mjs.map 51.00 B
|
|
123
128
|
ESM dist/components/chat-components/ui/select.mjs.map 5.80 KB
|
|
124
|
-
ESM dist/
|
|
125
|
-
ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
|
|
126
|
-
ESM dist/types/types.mjs.map 51.00 B
|
|
127
|
-
ESM dist/components/sidebar/copilot-sidebar-ui-provider.mjs.map 51.00 B
|
|
128
|
-
ESM dist/components/chat-components/ui/input.mjs.map 1.25 KB
|
|
129
|
+
ESM dist/components/chat-components/ui/alert-dialog.mjs.map 51.00 B
|
|
129
130
|
ESM dist/components/chat-components/ui/sheet.mjs.map 5.30 KB
|
|
130
|
-
ESM dist/components/sidebar/sidebar-context.mjs.map 51.00 B
|
|
131
131
|
ESM dist/components/chat-components/ui/badge.mjs.map 1.66 KB
|
|
132
|
-
ESM dist/components/
|
|
132
|
+
ESM dist/components/sidebar/copilot-sidebar-ui-provider.mjs.map 51.00 B
|
|
133
|
+
ESM dist/components/sidebar/sidebar-context.mjs.map 51.00 B
|
|
133
134
|
ESM dist/components/sidebar/copilot-sidebar.mjs.map 51.00 B
|
|
135
|
+
ESM dist/components/chat-components/clear-history.mjs.map 3.25 KB
|
|
136
|
+
ESM dist/chunk-SRBUGQTM.mjs.map 6.48 KB
|
|
137
|
+
ESM dist/components/chat-components/ui/dialog.mjs.map 5.60 KB
|
|
134
138
|
ESM dist/components/chat-components/default-empty-screen.mjs.map 51.00 B
|
|
135
139
|
ESM dist/components/chat-components/ui/button.mjs.map 51.00 B
|
|
136
|
-
ESM dist/components/chat-components/ui/codeblock.mjs.map 51.00 B
|
|
137
140
|
ESM dist/components/chat-components/markdown.mjs.map 51.00 B
|
|
138
|
-
ESM dist/components/chat-components/
|
|
139
|
-
ESM dist/components/chat-components/prompt-form.mjs.map 51.00 B
|
|
140
|
-
ESM dist/components/chat-components/theme-toggle.mjs.map 1.35 KB
|
|
141
|
+
ESM dist/components/chat-components/copilot-chat.mjs.map 51.00 B
|
|
141
142
|
ESM dist/components/chat-components/external-link.mjs.map 51.00 B
|
|
142
143
|
ESM dist/components/chat-components/toaster.mjs.map 209.00 B
|
|
144
|
+
ESM dist/components/chat-components/chat-message-actions.mjs.map 51.00 B
|
|
143
145
|
ESM dist/components/chat-components/chat-message.mjs.map 51.00 B
|
|
146
|
+
ESM dist/components/chat-components/chat-list.mjs.map 51.00 B
|
|
144
147
|
ESM dist/types/index.mjs.map 51.00 B
|
|
148
|
+
ESM dist/components/chat-components/theme-toggle.mjs.map 1.35 KB
|
|
149
|
+
ESM dist/lib/utils.mjs.map 51.00 B
|
|
150
|
+
ESM dist/components/chat-components/prompt-form.mjs.map 51.00 B
|
|
151
|
+
ESM dist/components/chat-components/chat-panel.mjs.map 51.00 B
|
|
152
|
+
ESM dist/chunk-C34L4AWW.mjs.map 1.89 KB
|
|
153
|
+
ESM dist/chunk-MC6KTH4X.mjs.map 520.00 B
|
|
145
154
|
ESM dist/index.mjs.map 51.00 B
|
|
146
|
-
ESM dist/chunk-
|
|
147
|
-
ESM dist/components/chat-components/chat-message-actions.mjs.map 51.00 B
|
|
148
|
-
ESM dist/components/chat-components/chat-scroll-anchor.mjs.map 51.00 B
|
|
155
|
+
ESM dist/chunk-XGUBRIUV.mjs.map 3.44 KB
|
|
149
156
|
ESM dist/components/index.mjs.map 51.00 B
|
|
150
|
-
ESM dist/
|
|
151
|
-
ESM dist/chunk-
|
|
152
|
-
ESM dist/
|
|
153
|
-
ESM dist/chunk-
|
|
154
|
-
ESM dist/components/chat-components/chat-panel.mjs.map 51.00 B
|
|
155
|
-
ESM dist/chunk-7TUGXTHJ.mjs.map 2.39 KB
|
|
156
|
-
ESM dist/chunk-EJR2J4DR.mjs.map 1.21 KB
|
|
157
|
-
ESM dist/chunk-Y2LXYPNP.mjs.map 1.68 KB
|
|
157
|
+
ESM dist/components/chat-components/chat-scroll-anchor.mjs.map 51.00 B
|
|
158
|
+
ESM dist/chunk-RPTRCFSO.mjs.map 2.39 KB
|
|
159
|
+
ESM dist/chunk-SEH5PQVW.mjs.map 2.85 KB
|
|
160
|
+
ESM dist/chunk-GCOPYGHH.mjs.map 1.23 KB
|
|
158
161
|
ESM dist/chunk-6LAZQHEB.mjs.map 6.24 KB
|
|
159
|
-
ESM dist/
|
|
162
|
+
ESM dist/components/chat-components/ui/codeblock.mjs.map 51.00 B
|
|
163
|
+
ESM dist/chunk-CNQX2VY3.mjs.map 3.73 KB
|
|
164
|
+
ESM dist/chunk-OOBQC5H6.mjs.map 1.70 KB
|
|
165
|
+
ESM dist/chunk-SHOTWRKC.mjs.map 1.23 KB
|
|
166
|
+
ESM dist/chunk-5KEDV5VC.mjs.map 1.05 KB
|
|
160
167
|
ESM dist/chunk-TEYIQHMK.mjs.map 551.00 B
|
|
161
|
-
ESM dist/chunk-GCOPYGHH.mjs.map 1.23 KB
|
|
162
|
-
ESM dist/chunk-L3OH4SEP.mjs.map 2.90 KB
|
|
163
|
-
ESM dist/chunk-M3CZWJI3.mjs.map 2.62 KB
|
|
164
168
|
ESM dist/chunk-VGX2W5ZB.mjs.map 1.56 KB
|
|
165
|
-
ESM dist/chunk-GC4LE273.mjs.map 2.71 KB
|
|
166
|
-
ESM dist/chunk-ITE4RI6K.mjs.map 3.71 KB
|
|
167
|
-
ESM dist/chunk-Q6YO7LDK.mjs.map 1.75 KB
|
|
168
|
-
ESM dist/hooks/index.mjs.map 51.00 B
|
|
169
|
-
ESM dist/hooks/use-at-bottom.mjs.map 51.00 B
|
|
170
|
-
ESM dist/chunk-IJLMKBSZ.mjs.map 1.27 KB
|
|
171
|
-
ESM dist/chunk-ZYC5YVDO.mjs.map 994.00 B
|
|
172
169
|
ESM dist/chunk-2KAF7NKC.mjs.map 27.13 KB
|
|
173
|
-
ESM dist/chunk-
|
|
170
|
+
ESM dist/chunk-CF3BK4OX.mjs.map 2.81 KB
|
|
171
|
+
ESM dist/chunk-M3CZWJI3.mjs.map 2.62 KB
|
|
172
|
+
ESM dist/chunk-IJLMKBSZ.mjs.map 1.27 KB
|
|
174
173
|
ESM dist/hooks/use-copy-to-clipboard.mjs.map 51.00 B
|
|
175
|
-
ESM dist/
|
|
176
|
-
ESM dist/
|
|
177
|
-
ESM dist/lib/utils.mjs.map 51.00 B
|
|
174
|
+
ESM dist/hooks/use-at-bottom.mjs.map 51.00 B
|
|
175
|
+
ESM dist/chunk-INCNMGJ7.mjs.map 4.04 KB
|
|
178
176
|
ESM dist/hooks/use-enter-submit.mjs.map 51.00 B
|
|
179
|
-
ESM dist/
|
|
177
|
+
ESM dist/hooks/index.mjs.map 51.00 B
|
|
178
|
+
ESM dist/chunk-OHWEJUCS.mjs.map 933.00 B
|
|
180
179
|
ESM dist/chunk-POVINPXX.mjs.map 1.18 KB
|
|
181
|
-
ESM dist/
|
|
182
|
-
ESM
|
|
183
|
-
|
|
180
|
+
ESM dist/chunk-ZYC5YVDO.mjs.map 994.00 B
|
|
181
|
+
ESM dist/context/index.mjs.map 51.00 B
|
|
182
|
+
ESM dist/chunk-Q6YO7LDK.mjs.map 1.75 KB
|
|
183
|
+
ESM ⚡️ Build success in 1730ms
|
|
184
|
+
DTS Build start
|
|
185
|
+
DTS ⚡️ Build success in 6913ms
|
|
184
186
|
DTS dist/index.d.ts 587.00 B
|
|
185
187
|
DTS dist/components/chat-components/copilot-chat.d.ts 496.00 B
|
|
186
188
|
DTS dist/components/chat-components/ui/tooltip.d.ts 640.00 B
|
|
@@ -189,24 +191,24 @@ DTS dist/components/sidebar/copilot-sidebar.d.ts 181.00 B
|
|
|
189
191
|
DTS dist/components/sidebar/sidebar-context.d.ts 273.00 B
|
|
190
192
|
DTS dist/components/chat-components/default-empty-screen.d.ts 267.00 B
|
|
191
193
|
DTS dist/components/index.d.ts 521.00 B
|
|
194
|
+
DTS dist/context/index.d.ts 12.00 B
|
|
192
195
|
DTS dist/hooks/index.d.ts 12.00 B
|
|
193
196
|
DTS dist/hooks/use-at-bottom.d.ts 81.00 B
|
|
194
197
|
DTS dist/hooks/use-copy-to-clipboard.d.ts 266.00 B
|
|
195
198
|
DTS dist/hooks/use-enter-submit.d.ts 219.00 B
|
|
196
|
-
DTS dist/context/index.d.ts 12.00 B
|
|
197
199
|
DTS dist/lib/utils.test.d.ts 12.00 B
|
|
198
200
|
DTS dist/lib/utils.d.ts 357.00 B
|
|
199
201
|
DTS dist/types/index.d.ts 12.00 B
|
|
200
|
-
DTS dist/types/types.d.ts
|
|
201
|
-
DTS dist/components/chat-components/chat-list.d.ts
|
|
202
|
-
DTS dist/components/chat-components/chat-message-actions.d.ts
|
|
203
|
-
DTS dist/components/chat-components/chat-message.d.ts
|
|
204
|
-
DTS dist/components/chat-components/chat-panel.d.ts
|
|
202
|
+
DTS dist/types/types.d.ts 355.00 B
|
|
203
|
+
DTS dist/components/chat-components/chat-list.d.ts 192.00 B
|
|
204
|
+
DTS dist/components/chat-components/chat-message-actions.d.ts 288.00 B
|
|
205
|
+
DTS dist/components/chat-components/chat-message.d.ts 231.00 B
|
|
206
|
+
DTS dist/components/chat-components/chat-panel.d.ts 378.00 B
|
|
205
207
|
DTS dist/components/chat-components/chat-scroll-anchor.d.ts 189.00 B
|
|
206
|
-
DTS dist/components/chat-components/clear-history.d.ts
|
|
208
|
+
DTS dist/components/chat-components/clear-history.d.ts 278.00 B
|
|
207
209
|
DTS dist/components/chat-components/external-link.d.ts 144.00 B
|
|
208
210
|
DTS dist/components/chat-components/markdown.d.ts 156.00 B
|
|
209
|
-
DTS dist/components/chat-components/prompt-form.d.ts
|
|
211
|
+
DTS dist/components/chat-components/prompt-form.d.ts 341.00 B
|
|
210
212
|
DTS dist/components/chat-components/theme-toggle.d.ts 70.00 B
|
|
211
213
|
DTS dist/components/chat-components/toaster.d.ts 43.00 B
|
|
212
214
|
DTS dist/components/chat-components/ui/alert-dialog.d.ts 1.80 KB
|
|
@@ -223,3 +225,5 @@ DTS dist/components/chat-components/ui/separator.d.ts 303.00 B
|
|
|
223
225
|
DTS dist/components/chat-components/ui/sheet.d.ts 1.36 KB
|
|
224
226
|
DTS dist/components/chat-components/ui/switch.d.ts 293.00 B
|
|
225
227
|
DTS dist/components/chat-components/ui/textarea.d.ts 271.00 B
|
|
228
|
+
Waiting for the debugger to disconnect...
|
|
229
|
+
Waiting for the debugger to disconnect...
|
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,66 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 0.14.0-alpha.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- insertion default prompt update
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @copilotkit/react-core@0.17.0-alpha.4
|
|
13
|
+
|
|
14
|
+
## 0.14.0-alpha.3
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- textarea editing: default prompt + few shot update
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @copilotkit/react-core@0.17.0-alpha.3
|
|
24
|
+
|
|
3
25
|
## 0.14.0-alpha.2
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
6
28
|
|
|
7
|
-
-
|
|
29
|
+
- useChat: do not separately propagate options.url to constructor
|
|
8
30
|
|
|
9
31
|
### Patch Changes
|
|
10
32
|
|
|
11
33
|
- Updated dependencies
|
|
12
|
-
- @copilotkit/react-core@0.
|
|
34
|
+
- @copilotkit/react-core@0.17.0-alpha.2
|
|
13
35
|
|
|
14
36
|
## 0.14.0-alpha.1
|
|
15
37
|
|
|
16
38
|
### Minor Changes
|
|
17
39
|
|
|
18
|
-
-
|
|
40
|
+
- strictly propagate copilot api params through the fetch arguments - not through any constructors
|
|
19
41
|
|
|
20
42
|
### Patch Changes
|
|
21
43
|
|
|
22
44
|
- Updated dependencies
|
|
23
|
-
- @copilotkit/react-core@0.
|
|
45
|
+
- @copilotkit/react-core@0.17.0-alpha.1
|
|
24
46
|
|
|
25
47
|
## 0.14.0-alpha.0
|
|
26
48
|
|
|
27
49
|
### Minor Changes
|
|
28
50
|
|
|
29
|
-
-
|
|
51
|
+
- remove vercel ai
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies
|
|
56
|
+
- @copilotkit/react-core@0.17.0-alpha.0
|
|
57
|
+
|
|
58
|
+
## 0.13.1
|
|
30
59
|
|
|
31
60
|
### Patch Changes
|
|
32
61
|
|
|
33
62
|
- Updated dependencies
|
|
34
|
-
- @copilotkit/react-core@0.16.0
|
|
63
|
+
- @copilotkit/react-core@0.16.0
|
|
35
64
|
|
|
36
65
|
## 0.13.0
|
|
37
66
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CopilotChat } from './chunk-
|
|
1
|
+
import { CopilotChat } from './chunk-RPTRCFSO.mjs';
|
|
2
2
|
import { __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
3
3
|
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -36,4 +36,4 @@ function TopBar(props) {
|
|
|
36
36
|
|
|
37
37
|
export { CopilotSidebar };
|
|
38
38
|
//# sourceMappingURL=out.js.map
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-C34L4AWW.mjs.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PromptForm } from './chunk-
|
|
1
|
+
import { PromptForm } from './chunk-INCNMGJ7.mjs';
|
|
2
2
|
import { Button } from './chunk-M3CZWJI3.mjs';
|
|
3
3
|
import { IconStop, IconRefresh } from './chunk-2KAF7NKC.mjs';
|
|
4
4
|
import { __async } from './chunk-MRXNTQOX.mjs';
|
|
5
|
+
import { nanoid } from 'nanoid';
|
|
5
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
function ChatPanel({
|
|
@@ -32,7 +33,7 @@ function ChatPanel({
|
|
|
32
33
|
{
|
|
33
34
|
onSubmit: (value) => __async(this, null, function* () {
|
|
34
35
|
yield append({
|
|
35
|
-
id,
|
|
36
|
+
id: id || nanoid(),
|
|
36
37
|
content: value,
|
|
37
38
|
role: "user"
|
|
38
39
|
});
|
|
@@ -49,4 +50,4 @@ function ChatPanel({
|
|
|
49
50
|
|
|
50
51
|
export { ChatPanel };
|
|
51
52
|
//# sourceMappingURL=out.js.map
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-CF3BK4OX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/chat-panel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,SAAS,cAAc;AA4BX,SACE,KADF;AAlBL,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,QAAQ,UAAU,UAAU,WAAW,aAAa;AAAA,MAEpE,+BAAC,SAAI,WAAU,gCACb;AAAA,4BAAC,SAAI,WAAU,8CACZ,sBACC,qBAAC,UAAO,SAAQ,WAAU,SAAS,MAAM,KAAK,GAAG,WAAU,iBACzD;AAAA,8BAAC,YAAS,WAAU,QAAO;AAAA,UAAE;AAAA,WAE/B,KAEA,qCAAU,UAAS,KACjB,qBAAC,UAAO,SAAQ,WAAU,SAAS,MAAM,OAAO,GAAG,WAAU,iBAC3D;AAAA,8BAAC,eAAY,WAAU,QAAO;AAAA,UAAE;AAAA,WAElC,GAGN;AAAA,QACA,oBAAC,SAAI,WAAU,8EACb;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,CAAO,UAAU;AACzB,oBAAM,OAAO;AAAA,gBACX,IAAI,MAAM,OAAO;AAAA,gBACjB,SAAS;AAAA,gBACT,MAAM;AAAA,cACR,CAAC;AAAA,YACH;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF,GACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ","sourcesContent":["import { type UseChatHelpers } from \"@copilotkit/react-core\";\n\nimport { Button } from \"./ui/button\";\nimport { PromptForm } from \"./prompt-form\";\nimport { IconRefresh, IconStop } from \"./ui/icons\";\nimport { nanoid } from \"nanoid\";\n\nexport interface ChatPanelProps\n extends Pick<\n UseChatHelpers,\n \"append\" | \"isLoading\" | \"reload\" | \"messages\" | \"stop\" | \"input\" | \"setInput\"\n > {\n id?: string;\n}\n\nexport function ChatPanel({\n id,\n isLoading,\n stop,\n append,\n reload,\n input,\n setInput,\n messages,\n}: ChatPanelProps) {\n return (\n <div\n className=\"inset-x-0 bottom-0 bg-gradient-to-b from-muted/10 from-10% to-muted/30 to-50% mt-4 mb-8\"\n style={{ width: \"100%\", overflow: \"hidden\", boxSizing: \"border-box\" }}\n >\n <div className=\"mx-auto sm:max-w-2xl sm:px-4\">\n <div className=\"flex h-10 items-center justify-center mb-4\">\n {isLoading ? (\n <Button variant=\"outline\" onClick={() => stop()} className=\"bg-background\">\n <IconStop className=\"mr-2\" />\n Stop generating\n </Button>\n ) : (\n messages?.length > 0 && (\n <Button variant=\"outline\" onClick={() => reload()} className=\"bg-background\">\n <IconRefresh className=\"mr-2\" />\n Regenerate response\n </Button>\n )\n )}\n </div>\n <div className=\"space-y-4 border-2 bg-background px-4 py-2 shadow-lg sm:rounded-xl md:py-4\">\n <PromptForm\n onSubmit={async (value) => {\n await append({\n id: id || nanoid(),\n content: value,\n role: \"user\",\n });\n }}\n input={input}\n setInput={setInput}\n isLoading={isLoading}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CodeBlock } from './chunk-6LAZQHEB.mjs';
|
|
2
2
|
import { MemoizedReactMarkdown } from './chunk-TEYIQHMK.mjs';
|
|
3
|
-
import { ChatMessageActions } from './chunk-
|
|
3
|
+
import { ChatMessageActions } from './chunk-OOBQC5H6.mjs';
|
|
4
4
|
import { IconUser, IconOpenAI } from './chunk-2KAF7NKC.mjs';
|
|
5
5
|
import { cn } from './chunk-Q6YO7LDK.mjs';
|
|
6
6
|
import { __objRest, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
@@ -63,4 +63,4 @@ function ChatMessage(_a) {
|
|
|
63
63
|
|
|
64
64
|
export { ChatMessage };
|
|
65
65
|
//# sourceMappingURL=out.js.map
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-CNQX2VY3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/chat-message.tsx"],"names":["_a","_b","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAqBY,cAE7B,YAF6B;AAT5B,SAAS,YAAY,IAAyC;AAAzC,eAAE,UAd9B,IAc4B,IAAc,kBAAd,IAAc,CAAZ;AAC5B,SACE,qBAAC,sCAAI,WAAW,GAAG,sCAAsC,KAAO,QAA/D,EACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,QAAQ,SAAS,SAAS,kBAAkB;AAAA,QAC9C;AAAA,QAEC,kBAAQ,SAAS,SAAS,oBAAC,YAAS,IAAK,oBAAC,cAAW;AAAA;AAAA,IACxD;AAAA,IACA,qBAAC,SAAI,WAAU,8CACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAe,CAAC,WAAW,UAAU;AAAA,UACrC,YAAY;AAAA,YACV,EAAE,EAAE,SAAS,GAAG;AACd,qBAAO,oBAAC,OAAE,WAAU,kBAAkB,UAAS;AAAA,YACjD;AAAA,YACA,KAAKA,KAA2C;AAA3C,kBAAAC,MAAAD,KAAE,YAAU,WAAW,OAjCxC,IAiCiBC,KAAkCC,SAAA,UAAlCD,KAAkC,CAAhC,YAAU,aAAW;AAC1B,kBAAI,SAAS,QAAQ;AACnB,oBAAI,SAAS,CAAC,KAAK,UAAK;AACtB,yBAAO,oBAAC,UAAK,WAAU,qCAAoC,oBAAC;AAAA,gBAC9D;AAEA,yBAAS,CAAC,IAAK,SAAS,CAAC,EAAa,QAAQ,YAAO,QAAG;AAAA,cAC1D;AAEA,oBAAM,QAAQ,iBAAiB,KAAK,aAAa,EAAE;AAEnD,kBAAI,QAAQ;AACV,uBACE,oBAAC,uCAAK,aAA0BC,SAA/B,EACE,WACH;AAAA,cAEJ;AAEA,qBACE;AAAA,gBAAC;AAAA;AAAA,kBAEC,UAAW,SAAS,MAAM,CAAC,KAAM;AAAA,kBACjC,OAAO,OAAO,QAAQ,EAAE,QAAQ,OAAO,EAAE;AAAA,mBACrCA;AAAA,gBAHC,KAAK,OAAO;AAAA,cAInB;AAAA,YAEJ;AAAA,UACF;AAAA,UAEC,kBAAQ;AAAA;AAAA,MACX;AAAA,MACA,oBAAC,sBAAmB,SAAkB;AAAA,OACxC;AAAA,MACF;AAEJ","sourcesContent":["import { Message } from \"@copilotkit/react-core\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\n\nimport { cn } from \"../../lib/utils\";\nimport { CodeBlock } from \"./ui/codeblock\";\nimport { MemoizedReactMarkdown } from \"./markdown\";\nimport { IconOpenAI, IconUser } from \"./ui/icons\";\nimport { ChatMessageActions } from \"./chat-message-actions\";\n\nexport interface ChatMessageProps {\n message: Message;\n}\n\nexport function ChatMessage({ message, ...props }: ChatMessageProps) {\n return (\n <div className={cn(\"group relative mb-4 flex items-start\")} {...props}>\n <div\n className={cn(\n \"flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border shadow\",\n message.role === \"user\" ? \"bg-background\" : \"bg-primary text-primary-foreground\",\n )}\n >\n {message.role === \"user\" ? <IconUser /> : <IconOpenAI />}\n </div>\n <div className=\"ml-4 flex-1 space-y-2 overflow-hidden px-1\">\n <MemoizedReactMarkdown\n className=\"prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 text-sm\"\n remarkPlugins={[remarkGfm, remarkMath]}\n components={{\n p({ children }) {\n return <p className=\"mb-2 last:mb-0\">{children}</p>;\n },\n code({ children, className, inline, ...props }) {\n if (children.length) {\n if (children[0] == \"▍\") {\n return <span className=\"mt-1 animate-pulse cursor-default\">▍</span>;\n }\n\n children[0] = (children[0] as string).replace(\"`▍`\", \"▍\");\n }\n\n const match = /language-(\\w+)/.exec(className || \"\");\n\n if (inline) {\n return (\n <code className={className} {...props}>\n {children}\n </code>\n );\n }\n\n return (\n <CodeBlock\n key={Math.random()}\n language={(match && match[1]) || \"\"}\n value={String(children).replace(/\\n$/, \"\")}\n {...props}\n />\n );\n },\n }}\n >\n {message.content}\n </MemoizedReactMarkdown>\n <ChatMessageActions message={message} />\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/prompt-form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB,OAAO,sBAAsB;AAsCrB,SACE,KADF;AAvBD,SAAS,WAAW,EAAE,UAAU,OAAO,UAAU,UAAU,GAAgB;AAChF,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAC9C,QAAM,WAAiB,aAA4B,IAAI;AAEvD,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ,MAAM;AAAA,IACzB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAO,MAAM;AACrB,UAAE,eAAe;AACjB,YAAI,EAAC,+BAAO,SAAQ;AAClB;AAAA,QACF;AACA,iBAAS,EAAE;AACX,cAAM,SAAS,KAAK;AAAA,MACtB;AAAA,MACA,KAAK;AAAA,MAEL,+BAAC,SAAI,WAAU,gHACb;AAAA,6BAAC,WACC;AAAA,8BAAC,kBAAe,SAAO,MAWvB;AAAA,UACA,oBAAC,kBAAe,sBAAQ;AAAA,WAC1B;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,UAAU;AAAA,YACV;AAAA,YACA,MAAM;AAAA,YACN,OAAO;AAAA,YACP,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,YACxC,aAAY;AAAA,YACZ,YAAY;AAAA,YACZ,WAAU;AAAA;AAAA,QACZ;AAAA,QACA,oBAAC,SAAI,WAAU,qCACb,+BAAC,WACC;AAAA,8BAAC,kBAAe,SAAO,MACrB;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,UAAU,aAAa,UAAU;AAAA,cACjC,WAAU;AAAA,cAEV;AAAA,oCAAC,kBAAe;AAAA,gBAChB,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA;AAAA;AAAA,UACxC,GACF;AAAA,UACA,oBAAC,kBAAe,0BAAY;AAAA,WAC9B,GACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ","sourcesContent":["import * as React from \"react\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { UseChatHelpers } from \"@copilotkit/react-core\";\n\nimport { useEnterSubmit } from \"../../hooks/use-enter-submit\";\nimport { cn } from \"../../lib/utils\";\nimport { Button, buttonVariants } from \"./ui/button\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { IconArrowElbow, IconPlus } from \"./ui/icons\";\n// import Link from \"next/link\";\n\nexport interface PromptProps extends Pick<UseChatHelpers, \"input\" | \"setInput\"> {\n onSubmit: (value: string) => Promise<void>;\n isLoading: boolean;\n}\n\nexport function PromptForm({ onSubmit, input, setInput, isLoading }: PromptProps) {\n const { formRef, onKeyDown } = useEnterSubmit();\n const inputRef = React.useRef<HTMLTextAreaElement>(null);\n\n React.useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, []);\n\n return (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n if (!input?.trim()) {\n return;\n }\n setInput(\"\");\n await onSubmit(input);\n }}\n ref={formRef}\n >\n <div className=\"relative flex max-h-60 w-full grow flex-col overflow-hidden bg-background px-8 sm:rounded-md border sm:px-12\">\n <Tooltip>\n <TooltipTrigger asChild>\n {/* <Link\n href=\"/\"\n className={cn(\n buttonVariants({ size: \"sm\", variant: \"outline\" }),\n \"absolute left-0 top-4 h-8 w-8 rounded-full bg-background p-0 sm:left-4\"\n )}\n >\n <IconPlus />\n <span className=\"sr-only\">New Chat</span>\n </Link> */}\n </TooltipTrigger>\n <TooltipContent>New Chat</TooltipContent>\n </Tooltip>\n <TextareaAutosize\n ref={inputRef}\n tabIndex={0}\n onKeyDown={onKeyDown}\n rows={1}\n value={input}\n onChange={(e) => setInput(e.target.value)}\n placeholder=\"Send a message.\"\n spellCheck={false}\n className=\"min-h-[60px] w-full resize-none bg-transparent px-4 py-[1.3rem] focus-within:outline-none sm:text-sm\"\n />\n <div className=\"absolute right-0 top-4 sm:right-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type=\"submit\"\n size=\"icon\"\n disabled={isLoading || input === \"\"}\n className=\" bg-slate-300\"\n >\n <IconArrowElbow />\n <span className=\"sr-only\">Send message</span>\n </Button>\n </TooltipTrigger>\n <TooltipContent>Send message</TooltipContent>\n </Tooltip>\n </div>\n </div>\n </form>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/chat-message-actions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BM,SACc,KADd;AAhBC,SAAS,mBAAmB,IAA2D;AAA3D,eAAE,WAAS,UAb9C,IAamC,IAAyB,kBAAzB,IAAyB,CAAvB,WAAS;AAC5C,QAAM,EAAE,UAAU,gBAAgB,IAAI,mBAAmB,EAAE,SAAS,IAAK,CAAC;AAE1E,QAAM,SAAS,MAAM;AACnB,QAAI;AAAU;AACd,oBAAgB,QAAQ,OAAO;AAAA,EACjC;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI,QALL;AAAA,MAOC,+BAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,SAAS,QAC1C;AAAA,mBAAW,oBAAC,aAAU,IAAK,oBAAC,YAAS;AAAA,QACtC,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,SACxC;AAAA;AAAA,EACF;AAEJ","sourcesContent":["\"use client\";\n\nimport { type Message } from \"@copilotkit/react-core\";\n\nimport { Button } from \"./ui/button\";\nimport { IconCheck, IconCopy } from \"./ui/icons\";\nimport { useCopyToClipboard } from \"../../hooks/use-copy-to-clipboard\";\nimport { cn } from \"../../lib/utils\";\n\ninterface ChatMessageActionsProps extends React.ComponentProps<\"div\"> {\n message: Message;\n}\n\nexport function ChatMessageActions({ message, className, ...props }: ChatMessageActionsProps) {\n const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 });\n\n const onCopy = () => {\n if (isCopied) return;\n copyToClipboard(message.content);\n };\n\n return (\n <div\n className={cn(\n \"flex items-center justify-end transition-opacity group-hover:opacity-100 md:absolute md:-right-10 md:-top-2 md:opacity-0\",\n className,\n )}\n {...props}\n >\n <Button variant=\"ghost\" size=\"icon\" onClick={onCopy}>\n {isCopied ? <IconCheck /> : <IconCopy />}\n <span className=\"sr-only\">Copy message</span>\n </Button>\n </div>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DefaultEmptyScreen } from './chunk-
|
|
2
|
-
import { ChatList } from './chunk-
|
|
3
|
-
import { ChatPanel } from './chunk-
|
|
1
|
+
import { DefaultEmptyScreen } from './chunk-SEH5PQVW.mjs';
|
|
2
|
+
import { ChatList } from './chunk-SHOTWRKC.mjs';
|
|
3
|
+
import { ChatPanel } from './chunk-CF3BK4OX.mjs';
|
|
4
4
|
import { ChatScrollAnchor } from './chunk-IJLMKBSZ.mjs';
|
|
5
5
|
import { useCopilotChat } from '@copilotkit/react-core';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -39,4 +39,4 @@ function CopilotChat({
|
|
|
39
39
|
|
|
40
40
|
export { CopilotChat };
|
|
41
41
|
//# sourceMappingURL=out.js.map
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-RPTRCFSO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/default-empty-screen.tsx"],"names":[],"mappings":";;;;;;;;;;;AA8BQ,cACA,YADA;AAvBR,IAAM,kBAAkB;AAAA,EACtB;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA;AAAA,EACX;AACF;AAMO,IAAM,qBAAiD,CAAC,UAAU;AACvE,SACE,oBAAC,SAAI,WAAU,0BACb,+BAAC,SAAI,WAAU,uCACb;AAAA,wBAAC,QAAG,WAAU,8BAA6B,8CAAyB;AAAA,IACpE,qBAAC,OAAE,WAAU,6CAA4C;AAAA;AAAA,MAC1B;AAAA,MAC7B,oBAAC,gBAAa,MAAK,0BAAyB,8BAAgB;AAAA,MAAgB;AAAA,MAC5E,oBAAC,gBAAa,MAAK,+CAA8C,wBAAU;AAAA,MAAgB;AAAA,MAAI;AAAA,OAEjG;AAAA,IACA,oBAAC,OAAE,WAAU,wCAAuC,8EAEpD;AAAA,IACA,oBAAC,SAAI,WAAU,4CACZ,0BAAgB,IAAI,CAAC,SAAS,UAC7B;AAAA,MAAC;AAAA;AAAA,QAEC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,SAAS,MAAM,MAAM,SAAS,QAAQ,OAAO;AAAA,QAE7C;AAAA,8BAAC,kBAAe,WAAU,8BAA6B;AAAA,UACtD,QAAQ;AAAA;AAAA;AAAA,MANJ;AAAA,IAOP,CACD,GACH;AAAA,KACF,GACF;AAEJ","sourcesContent":["\"use client\";\nimport React from \"react\";\n\nimport { Button } from \"./ui/button\";\nimport { ExternalLink } from \"./external-link\";\nimport { IconArrowRight } from \"./ui/icons\";\n\nconst exampleMessages = [\n {\n heading: \"Explain technical concepts\",\n message: `What is a \"serverless function\"?`,\n },\n {\n heading: \"Summarize an article\",\n message: \"Summarize the following article for a 2nd grader: \\n\",\n },\n {\n heading: \"Draft an email\",\n message: `Draft an email to my boss about the following: \\n`,\n },\n];\n\nexport interface EmptyScreenProps {\n setInput: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport const DefaultEmptyScreen: React.FC<EmptyScreenProps> = (props) => {\n return (\n <div className=\"mx-auto max-w-2xl px-4\">\n <div className=\"rounded-lg border bg-background p-8\">\n <h1 className=\"mb-2 text-lg font-semibold\">Welcome to CopilotKit! 👋</h1>\n <p className=\"mb-2 leading-normal text-muted-foreground\">\n This is a Copilot built with{\" \"}\n <ExternalLink href=\"https://recursively.ai\">recursively.ai's</ExternalLink>{\" \"}\n <ExternalLink href=\"https://github.com/RecursivelyAI/CopilotKit\">CopilotKit</ExternalLink>{\" \"}\n .\n </p>\n <p className=\"leading-normal text-muted-foreground\">\n You can start a conversation here or try the following examples:\n </p>\n <div className=\"mt-4 flex flex-col items-start space-y-2\">\n {exampleMessages.map((message, index) => (\n <Button\n key={index}\n variant=\"link\"\n className=\"h-auto p-0 text-base\"\n onClick={() => props.setInput(message.message)}\n >\n <IconArrowRight className=\"mr-2 text-muted-foreground\" />\n {message.heading}\n </Button>\n ))}\n </div>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Separator } from './chunk-GCOPYGHH.mjs';
|
|
2
|
-
import { ChatMessage } from './chunk-
|
|
2
|
+
import { ChatMessage } from './chunk-CNQX2VY3.mjs';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
function ChatList({ messages }) {
|
|
@@ -15,4 +15,4 @@ function ChatList({ messages }) {
|
|
|
15
15
|
|
|
16
16
|
export { ChatList };
|
|
17
17
|
//# sourceMappingURL=out.js.map
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-SHOTWRKC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat-components/chat-list.tsx"],"names":[],"mappings":";;;;;;;;AAoBQ,SACE,KADF;AAXD,SAAS,SAAS,EAAE,SAAS,GAAa;AAE/C,QAAM,oBAAoB,SAAS,OAAO,CAAC,YAAY,QAAQ,SAAS,QAAQ;AAEhF,MAAI,CAAC,kBAAkB,QAAQ;AAC7B,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,SAAI,WAAU,mCACZ,4BAAkB,IAAI,CAAC,SAAS,UAC/B,qBAAC,SACC;AAAA,wBAAC,eAAY,SAAkB;AAAA,IAC9B,QAAQ,kBAAkB,SAAS,KAAK,oBAAC,aAAU,WAAU,gBAAe;AAAA,OAFrE,KAGV,CACD,GACH;AAEJ","sourcesContent":["import { type Message } from \"@copilotkit/react-core\";\n\nimport { Separator } from \"./ui/separator\";\nimport { ChatMessage } from \"./chat-message\";\n\nexport interface ChatList {\n messages: Message[];\n}\n\nexport function ChatList({ messages }: ChatList) {\n // we don't want to display system messages\n const displayedMessages = messages.filter((message) => message.role !== \"system\");\n\n if (!displayedMessages.length) {\n return null;\n }\n\n return (\n <div className=\"relative mx-auto max-w-2xl px-0\">\n {displayedMessages.map((message, index) => (\n <div key={index}>\n <ChatMessage message={message} />\n {index < displayedMessages.length - 1 && <Separator className=\"my-4 md:my-4\" />}\n </div>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CopilotSidebar } from './chunk-
|
|
1
|
+
import { CopilotSidebar } from './chunk-C34L4AWW.mjs';
|
|
2
2
|
import { CopilotSidebarContext } from './chunk-MC6KTH4X.mjs';
|
|
3
3
|
import { TooltipProvider } from './chunk-VGX2W5ZB.mjs';
|
|
4
4
|
import { useState, useCallback } from 'react';
|
|
@@ -69,4 +69,4 @@ function CopilotSidebarUIProvider({ children }) {
|
|
|
69
69
|
|
|
70
70
|
export { CopilotSidebarUIProvider };
|
|
71
71
|
//# sourceMappingURL=out.js.map
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-XGUBRIUV.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ChatList } from '../../chunk-
|
|
1
|
+
export { ChatList } from '../../chunk-SHOTWRKC.mjs';
|
|
2
2
|
import '../../chunk-GCOPYGHH.mjs';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-CNQX2VY3.mjs';
|
|
4
4
|
import '../../chunk-6LAZQHEB.mjs';
|
|
5
5
|
import '../../chunk-TEYIQHMK.mjs';
|
|
6
|
-
import '../../chunk-
|
|
6
|
+
import '../../chunk-OOBQC5H6.mjs';
|
|
7
7
|
import '../../chunk-M3CZWJI3.mjs';
|
|
8
8
|
import '../../chunk-2KAF7NKC.mjs';
|
|
9
9
|
import '../../chunk-Q6YO7LDK.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ChatMessage } from '../../chunk-
|
|
1
|
+
export { ChatMessage } from '../../chunk-CNQX2VY3.mjs';
|
|
2
2
|
import '../../chunk-6LAZQHEB.mjs';
|
|
3
3
|
import '../../chunk-TEYIQHMK.mjs';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-OOBQC5H6.mjs';
|
|
5
5
|
import '../../chunk-M3CZWJI3.mjs';
|
|
6
6
|
import '../../chunk-2KAF7NKC.mjs';
|
|
7
7
|
import '../../chunk-Q6YO7LDK.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ChatPanel } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ChatPanel } from '../../chunk-CF3BK4OX.mjs';
|
|
2
|
+
import '../../chunk-INCNMGJ7.mjs';
|
|
3
3
|
import '../../chunk-VGX2W5ZB.mjs';
|
|
4
4
|
import '../../chunk-M3CZWJI3.mjs';
|
|
5
5
|
import '../../chunk-2KAF7NKC.mjs';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { CopilotChat } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { CopilotChat } from '../../chunk-RPTRCFSO.mjs';
|
|
2
|
+
import '../../chunk-SEH5PQVW.mjs';
|
|
3
3
|
import '../../chunk-5KEDV5VC.mjs';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-SHOTWRKC.mjs';
|
|
5
5
|
import '../../chunk-GCOPYGHH.mjs';
|
|
6
|
-
import '../../chunk-
|
|
6
|
+
import '../../chunk-CNQX2VY3.mjs';
|
|
7
7
|
import '../../chunk-6LAZQHEB.mjs';
|
|
8
8
|
import '../../chunk-TEYIQHMK.mjs';
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-OOBQC5H6.mjs';
|
|
10
|
+
import '../../chunk-CF3BK4OX.mjs';
|
|
11
|
+
import '../../chunk-INCNMGJ7.mjs';
|
|
12
12
|
import '../../chunk-VGX2W5ZB.mjs';
|
|
13
13
|
import '../../chunk-M3CZWJI3.mjs';
|
|
14
14
|
import '../../chunk-2KAF7NKC.mjs';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import '../chunk-U6NJWGTV.mjs';
|
|
2
|
-
export { CopilotSidebarUIProvider } from '../chunk-
|
|
3
|
-
export { CopilotSidebar } from '../chunk-
|
|
2
|
+
export { CopilotSidebarUIProvider } from '../chunk-XGUBRIUV.mjs';
|
|
3
|
+
export { CopilotSidebar } from '../chunk-C34L4AWW.mjs';
|
|
4
4
|
export { CopilotSidebarContext } from '../chunk-MC6KTH4X.mjs';
|
|
5
|
-
export { CopilotChat } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
export { CopilotChat } from '../chunk-RPTRCFSO.mjs';
|
|
6
|
+
import '../chunk-SEH5PQVW.mjs';
|
|
7
7
|
import '../chunk-5KEDV5VC.mjs';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-SHOTWRKC.mjs';
|
|
9
9
|
import '../chunk-GCOPYGHH.mjs';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-CNQX2VY3.mjs';
|
|
11
11
|
import '../chunk-6LAZQHEB.mjs';
|
|
12
12
|
import '../chunk-TEYIQHMK.mjs';
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-OOBQC5H6.mjs';
|
|
14
|
+
import '../chunk-CF3BK4OX.mjs';
|
|
15
|
+
import '../chunk-INCNMGJ7.mjs';
|
|
16
16
|
export { Tooltip, TooltipProvider } from '../chunk-VGX2W5ZB.mjs';
|
|
17
17
|
import '../chunk-M3CZWJI3.mjs';
|
|
18
18
|
import '../chunk-2KAF7NKC.mjs';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { CopilotSidebarUIProvider } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { CopilotSidebarUIProvider } from '../../chunk-XGUBRIUV.mjs';
|
|
2
|
+
import '../../chunk-C34L4AWW.mjs';
|
|
3
3
|
import '../../chunk-MC6KTH4X.mjs';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-RPTRCFSO.mjs';
|
|
5
|
+
import '../../chunk-SEH5PQVW.mjs';
|
|
6
6
|
import '../../chunk-5KEDV5VC.mjs';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-SHOTWRKC.mjs';
|
|
8
8
|
import '../../chunk-GCOPYGHH.mjs';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-CNQX2VY3.mjs';
|
|
10
10
|
import '../../chunk-6LAZQHEB.mjs';
|
|
11
11
|
import '../../chunk-TEYIQHMK.mjs';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-OOBQC5H6.mjs';
|
|
13
|
+
import '../../chunk-CF3BK4OX.mjs';
|
|
14
|
+
import '../../chunk-INCNMGJ7.mjs';
|
|
15
15
|
import '../../chunk-VGX2W5ZB.mjs';
|
|
16
16
|
import '../../chunk-M3CZWJI3.mjs';
|
|
17
17
|
import '../../chunk-2KAF7NKC.mjs';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { CopilotSidebar } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { CopilotSidebar } from '../../chunk-C34L4AWW.mjs';
|
|
2
|
+
import '../../chunk-RPTRCFSO.mjs';
|
|
3
|
+
import '../../chunk-SEH5PQVW.mjs';
|
|
4
4
|
import '../../chunk-5KEDV5VC.mjs';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-SHOTWRKC.mjs';
|
|
6
6
|
import '../../chunk-GCOPYGHH.mjs';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-CNQX2VY3.mjs';
|
|
8
8
|
import '../../chunk-6LAZQHEB.mjs';
|
|
9
9
|
import '../../chunk-TEYIQHMK.mjs';
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-OOBQC5H6.mjs';
|
|
11
|
+
import '../../chunk-CF3BK4OX.mjs';
|
|
12
|
+
import '../../chunk-INCNMGJ7.mjs';
|
|
13
13
|
import '../../chunk-VGX2W5ZB.mjs';
|
|
14
14
|
import '../../chunk-M3CZWJI3.mjs';
|
|
15
15
|
import '../../chunk-2KAF7NKC.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import './chunk-7NSRDJ5C.mjs';
|
|
2
2
|
import './chunk-U6NJWGTV.mjs';
|
|
3
|
-
export { CopilotSidebarUIProvider } from './chunk-
|
|
4
|
-
export { CopilotSidebar } from './chunk-
|
|
3
|
+
export { CopilotSidebarUIProvider } from './chunk-XGUBRIUV.mjs';
|
|
4
|
+
export { CopilotSidebar } from './chunk-C34L4AWW.mjs';
|
|
5
5
|
export { CopilotSidebarContext } from './chunk-MC6KTH4X.mjs';
|
|
6
|
-
export { CopilotChat } from './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
export { CopilotChat } from './chunk-RPTRCFSO.mjs';
|
|
7
|
+
import './chunk-SEH5PQVW.mjs';
|
|
8
8
|
import './chunk-5KEDV5VC.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-SHOTWRKC.mjs';
|
|
10
10
|
import './chunk-GCOPYGHH.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-CNQX2VY3.mjs';
|
|
12
12
|
import './chunk-6LAZQHEB.mjs';
|
|
13
13
|
import './chunk-TEYIQHMK.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
14
|
+
import './chunk-OOBQC5H6.mjs';
|
|
15
|
+
import './chunk-CF3BK4OX.mjs';
|
|
16
|
+
import './chunk-INCNMGJ7.mjs';
|
|
17
17
|
export { Tooltip, TooltipProvider } from './chunk-VGX2W5ZB.mjs';
|
|
18
18
|
import './chunk-M3CZWJI3.mjs';
|
|
19
19
|
import './chunk-2KAF7NKC.mjs';
|
|
20
20
|
import './chunk-Q6YO7LDK.mjs';
|
|
21
21
|
import './chunk-IJLMKBSZ.mjs';
|
|
22
|
+
import './chunk-IU3WTXLQ.mjs';
|
|
22
23
|
import './chunk-H4VKQGVU.mjs';
|
|
23
24
|
import './chunk-ZYC5YVDO.mjs';
|
|
24
25
|
import './chunk-POVINPXX.mjs';
|
|
25
26
|
import './chunk-OHWEJUCS.mjs';
|
|
26
27
|
import './chunk-MRXNTQOX.mjs';
|
|
27
|
-
import './chunk-IU3WTXLQ.mjs';
|
|
28
28
|
//# sourceMappingURL=out.js.map
|
|
29
29
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.14.0-alpha.
|
|
7
|
+
"version": "0.14.0-alpha.4",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"**/*.css"
|
|
10
10
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"ts-jest": "^29.1.1",
|
|
32
32
|
"tsup": "^6.7.0",
|
|
33
33
|
"typescript": "^5.1.3",
|
|
34
|
-
"eslint-config-custom": "0.2.0",
|
|
35
34
|
"tailwind-config": "0.1.0",
|
|
35
|
+
"eslint-config-custom": "0.2.0",
|
|
36
36
|
"tsconfig": "0.6.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"@radix-ui/react-slot": "^1.0.2",
|
|
47
47
|
"@radix-ui/react-switch": "^1.0.3",
|
|
48
48
|
"@radix-ui/react-tooltip": "^1.0.6",
|
|
49
|
-
"ai": "^2.2.23",
|
|
50
49
|
"class-variance-authority": "^0.6.1",
|
|
51
50
|
"clsx": "^1.2.1",
|
|
52
51
|
"nanoid": "^4.0.2",
|
|
@@ -60,7 +59,7 @@
|
|
|
60
59
|
"remark-gfm": "^3.0.1",
|
|
61
60
|
"remark-math": "^5.1.1",
|
|
62
61
|
"tailwind-merge": "^1.13.2",
|
|
63
|
-
"@copilotkit/react-core": "0.
|
|
62
|
+
"@copilotkit/react-core": "0.17.0-alpha.4"
|
|
64
63
|
},
|
|
65
64
|
"scripts": {
|
|
66
65
|
"build": "tsup --treeshake",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type UseChatHelpers } from "
|
|
1
|
+
import { type UseChatHelpers } from "@copilotkit/react-core";
|
|
2
2
|
|
|
3
3
|
import { Button } from "./ui/button";
|
|
4
4
|
import { PromptForm } from "./prompt-form";
|
|
5
5
|
import { IconRefresh, IconStop } from "./ui/icons";
|
|
6
|
+
import { nanoid } from "nanoid";
|
|
6
7
|
|
|
7
8
|
export interface ChatPanelProps
|
|
8
9
|
extends Pick<
|
|
@@ -47,7 +48,7 @@ export function ChatPanel({
|
|
|
47
48
|
<PromptForm
|
|
48
49
|
onSubmit={async (value) => {
|
|
49
50
|
await append({
|
|
50
|
-
id,
|
|
51
|
+
id: id || nanoid(),
|
|
51
52
|
content: value,
|
|
52
53
|
role: "user",
|
|
53
54
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import TextareaAutosize from "react-textarea-autosize";
|
|
3
|
-
import { UseChatHelpers } from "
|
|
3
|
+
import { UseChatHelpers } from "@copilotkit/react-core";
|
|
4
4
|
|
|
5
5
|
import { useEnterSubmit } from "../../hooks/use-enter-submit";
|
|
6
6
|
import { cn } from "../../lib/utils";
|
package/src/types/types.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-list.tsx"],"names":[],"mappings":";;;;;;;;AAoBQ,SACE,KADF;AAXD,SAAS,SAAS,EAAE,SAAS,GAAa;AAE/C,QAAM,oBAAoB,SAAS,OAAO,CAAC,YAAY,QAAQ,SAAS,QAAQ;AAEhF,MAAI,CAAC,kBAAkB,QAAQ;AAC7B,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,SAAI,WAAU,mCACZ,4BAAkB,IAAI,CAAC,SAAS,UAC/B,qBAAC,SACC;AAAA,wBAAC,eAAY,SAAkB;AAAA,IAC9B,QAAQ,kBAAkB,SAAS,KAAK,oBAAC,aAAU,WAAU,gBAAe;AAAA,OAFrE,KAGV,CACD,GACH;AAEJ","sourcesContent":["import { type Message } from \"ai\";\n\nimport { Separator } from \"./ui/separator\";\nimport { ChatMessage } from \"./chat-message\";\n\nexport interface ChatList {\n messages: Message[];\n}\n\nexport function ChatList({ messages }: ChatList) {\n // we don't want to display system messages\n const displayedMessages = messages.filter((message) => message.role !== \"system\");\n\n if (!displayedMessages.length) {\n return null;\n }\n\n return (\n <div className=\"relative mx-auto max-w-2xl px-0\">\n {displayedMessages.map((message, index) => (\n <div key={index}>\n <ChatMessage message={message} />\n {index < displayedMessages.length - 1 && <Separator className=\"my-4 md:my-4\" />}\n </div>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-panel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgCY,SACE,KADF;AAlBL,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,QAAQ,UAAU,UAAU,WAAW,aAAa;AAAA,MAEpE,+BAAC,SAAI,WAAU,gCACb;AAAA,4BAAC,SAAI,WAAU,8CACZ,sBACC,qBAAC,UAAO,SAAQ,WAAU,SAAS,MAAM,KAAK,GAAG,WAAU,iBACzD;AAAA,8BAAC,YAAS,WAAU,QAAO;AAAA,UAAE;AAAA,WAE/B,KAEA,qCAAU,UAAS,KACjB,qBAAC,UAAO,SAAQ,WAAU,SAAS,MAAM,OAAO,GAAG,WAAU,iBAC3D;AAAA,8BAAC,eAAY,WAAU,QAAO;AAAA,UAAE;AAAA,WAElC,GAGN;AAAA,QACA,oBAAC,SAAI,WAAU,8EACb;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,CAAO,UAAU;AACzB,oBAAM,OAAO;AAAA,gBACX;AAAA,gBACA,SAAS;AAAA,gBACT,MAAM;AAAA,cACR,CAAC;AAAA,YACH;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF,GACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ","sourcesContent":["import { type UseChatHelpers } from \"ai/react\";\n\nimport { Button } from \"./ui/button\";\nimport { PromptForm } from \"./prompt-form\";\nimport { IconRefresh, IconStop } from \"./ui/icons\";\n\nexport interface ChatPanelProps\n extends Pick<\n UseChatHelpers,\n \"append\" | \"isLoading\" | \"reload\" | \"messages\" | \"stop\" | \"input\" | \"setInput\"\n > {\n id?: string;\n}\n\nexport function ChatPanel({\n id,\n isLoading,\n stop,\n append,\n reload,\n input,\n setInput,\n messages,\n}: ChatPanelProps) {\n return (\n <div\n className=\"inset-x-0 bottom-0 bg-gradient-to-b from-muted/10 from-10% to-muted/30 to-50% mt-4 mb-8\"\n style={{ width: \"100%\", overflow: \"hidden\", boxSizing: \"border-box\" }}\n >\n <div className=\"mx-auto sm:max-w-2xl sm:px-4\">\n <div className=\"flex h-10 items-center justify-center mb-4\">\n {isLoading ? (\n <Button variant=\"outline\" onClick={() => stop()} className=\"bg-background\">\n <IconStop className=\"mr-2\" />\n Stop generating\n </Button>\n ) : (\n messages?.length > 0 && (\n <Button variant=\"outline\" onClick={() => reload()} className=\"bg-background\">\n <IconRefresh className=\"mr-2\" />\n Regenerate response\n </Button>\n )\n )}\n </div>\n <div className=\"space-y-4 border-2 bg-background px-4 py-2 shadow-lg sm:rounded-xl md:py-4\">\n <PromptForm\n onSubmit={async (value) => {\n await append({\n id,\n content: value,\n role: \"user\",\n });\n }}\n input={input}\n setInput={setInput}\n isLoading={isLoading}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/prompt-form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB,OAAO,sBAAsB;AAsCrB,SACE,KADF;AAvBD,SAAS,WAAW,EAAE,UAAU,OAAO,UAAU,UAAU,GAAgB;AAChF,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAC9C,QAAM,WAAiB,aAA4B,IAAI;AAEvD,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS,SAAS;AACpB,eAAS,QAAQ,MAAM;AAAA,IACzB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAO,MAAM;AACrB,UAAE,eAAe;AACjB,YAAI,EAAC,+BAAO,SAAQ;AAClB;AAAA,QACF;AACA,iBAAS,EAAE;AACX,cAAM,SAAS,KAAK;AAAA,MACtB;AAAA,MACA,KAAK;AAAA,MAEL,+BAAC,SAAI,WAAU,gHACb;AAAA,6BAAC,WACC;AAAA,8BAAC,kBAAe,SAAO,MAWvB;AAAA,UACA,oBAAC,kBAAe,sBAAQ;AAAA,WAC1B;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,UAAU;AAAA,YACV;AAAA,YACA,MAAM;AAAA,YACN,OAAO;AAAA,YACP,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,YACxC,aAAY;AAAA,YACZ,YAAY;AAAA,YACZ,WAAU;AAAA;AAAA,QACZ;AAAA,QACA,oBAAC,SAAI,WAAU,qCACb,+BAAC,WACC;AAAA,8BAAC,kBAAe,SAAO,MACrB;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,UAAU,aAAa,UAAU;AAAA,cACjC,WAAU;AAAA,cAEV;AAAA,oCAAC,kBAAe;AAAA,gBAChB,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA;AAAA;AAAA,UACxC,GACF;AAAA,UACA,oBAAC,kBAAe,0BAAY;AAAA,WAC9B,GACF;AAAA,SACF;AAAA;AAAA,EACF;AAEJ","sourcesContent":["import * as React from \"react\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { UseChatHelpers } from \"ai/react\";\n\nimport { useEnterSubmit } from \"../../hooks/use-enter-submit\";\nimport { cn } from \"../../lib/utils\";\nimport { Button, buttonVariants } from \"./ui/button\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { IconArrowElbow, IconPlus } from \"./ui/icons\";\n// import Link from \"next/link\";\n\nexport interface PromptProps extends Pick<UseChatHelpers, \"input\" | \"setInput\"> {\n onSubmit: (value: string) => Promise<void>;\n isLoading: boolean;\n}\n\nexport function PromptForm({ onSubmit, input, setInput, isLoading }: PromptProps) {\n const { formRef, onKeyDown } = useEnterSubmit();\n const inputRef = React.useRef<HTMLTextAreaElement>(null);\n\n React.useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, []);\n\n return (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n if (!input?.trim()) {\n return;\n }\n setInput(\"\");\n await onSubmit(input);\n }}\n ref={formRef}\n >\n <div className=\"relative flex max-h-60 w-full grow flex-col overflow-hidden bg-background px-8 sm:rounded-md border sm:px-12\">\n <Tooltip>\n <TooltipTrigger asChild>\n {/* <Link\n href=\"/\"\n className={cn(\n buttonVariants({ size: \"sm\", variant: \"outline\" }),\n \"absolute left-0 top-4 h-8 w-8 rounded-full bg-background p-0 sm:left-4\"\n )}\n >\n <IconPlus />\n <span className=\"sr-only\">New Chat</span>\n </Link> */}\n </TooltipTrigger>\n <TooltipContent>New Chat</TooltipContent>\n </Tooltip>\n <TextareaAutosize\n ref={inputRef}\n tabIndex={0}\n onKeyDown={onKeyDown}\n rows={1}\n value={input}\n onChange={(e) => setInput(e.target.value)}\n placeholder=\"Send a message.\"\n spellCheck={false}\n className=\"min-h-[60px] w-full resize-none bg-transparent px-4 py-[1.3rem] focus-within:outline-none sm:text-sm\"\n />\n <div className=\"absolute right-0 top-4 sm:right-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type=\"submit\"\n size=\"icon\"\n disabled={isLoading || input === \"\"}\n className=\" bg-slate-300\"\n >\n <IconArrowElbow />\n <span className=\"sr-only\">Send message</span>\n </Button>\n </TooltipTrigger>\n <TooltipContent>Send message</TooltipContent>\n </Tooltip>\n </div>\n </div>\n </form>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-message.tsx"],"names":["_a","_b","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAqBY,cAE7B,YAF6B;AAT5B,SAAS,YAAY,IAAyC;AAAzC,eAAE,UAd9B,IAc4B,IAAc,kBAAd,IAAc,CAAZ;AAC5B,SACE,qBAAC,sCAAI,WAAW,GAAG,sCAAsC,KAAO,QAA/D,EACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,QAAQ,SAAS,SAAS,kBAAkB;AAAA,QAC9C;AAAA,QAEC,kBAAQ,SAAS,SAAS,oBAAC,YAAS,IAAK,oBAAC,cAAW;AAAA;AAAA,IACxD;AAAA,IACA,qBAAC,SAAI,WAAU,8CACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAe,CAAC,WAAW,UAAU;AAAA,UACrC,YAAY;AAAA,YACV,EAAE,EAAE,SAAS,GAAG;AACd,qBAAO,oBAAC,OAAE,WAAU,kBAAkB,UAAS;AAAA,YACjD;AAAA,YACA,KAAKA,KAA2C;AAA3C,kBAAAC,MAAAD,KAAE,YAAU,WAAW,OAjCxC,IAiCiBC,KAAkCC,SAAA,UAAlCD,KAAkC,CAAhC,YAAU,aAAW;AAC1B,kBAAI,SAAS,QAAQ;AACnB,oBAAI,SAAS,CAAC,KAAK,UAAK;AACtB,yBAAO,oBAAC,UAAK,WAAU,qCAAoC,oBAAC;AAAA,gBAC9D;AAEA,yBAAS,CAAC,IAAK,SAAS,CAAC,EAAa,QAAQ,YAAO,QAAG;AAAA,cAC1D;AAEA,oBAAM,QAAQ,iBAAiB,KAAK,aAAa,EAAE;AAEnD,kBAAI,QAAQ;AACV,uBACE,oBAAC,uCAAK,aAA0BC,SAA/B,EACE,WACH;AAAA,cAEJ;AAEA,qBACE;AAAA,gBAAC;AAAA;AAAA,kBAEC,UAAW,SAAS,MAAM,CAAC,KAAM;AAAA,kBACjC,OAAO,OAAO,QAAQ,EAAE,QAAQ,OAAO,EAAE;AAAA,mBACrCA;AAAA,gBAHC,KAAK,OAAO;AAAA,cAInB;AAAA,YAEJ;AAAA,UACF;AAAA,UAEC,kBAAQ;AAAA;AAAA,MACX;AAAA,MACA,oBAAC,sBAAmB,SAAkB;AAAA,OACxC;AAAA,MACF;AAEJ","sourcesContent":["import { Message } from \"ai\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\n\nimport { cn } from \"../../lib/utils\";\nimport { CodeBlock } from \"./ui/codeblock\";\nimport { MemoizedReactMarkdown } from \"./markdown\";\nimport { IconOpenAI, IconUser } from \"./ui/icons\";\nimport { ChatMessageActions } from \"./chat-message-actions\";\n\nexport interface ChatMessageProps {\n message: Message;\n}\n\nexport function ChatMessage({ message, ...props }: ChatMessageProps) {\n return (\n <div className={cn(\"group relative mb-4 flex items-start\")} {...props}>\n <div\n className={cn(\n \"flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border shadow\",\n message.role === \"user\" ? \"bg-background\" : \"bg-primary text-primary-foreground\",\n )}\n >\n {message.role === \"user\" ? <IconUser /> : <IconOpenAI />}\n </div>\n <div className=\"ml-4 flex-1 space-y-2 overflow-hidden px-1\">\n <MemoizedReactMarkdown\n className=\"prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 text-sm\"\n remarkPlugins={[remarkGfm, remarkMath]}\n components={{\n p({ children }) {\n return <p className=\"mb-2 last:mb-0\">{children}</p>;\n },\n code({ children, className, inline, ...props }) {\n if (children.length) {\n if (children[0] == \"▍\") {\n return <span className=\"mt-1 animate-pulse cursor-default\">▍</span>;\n }\n\n children[0] = (children[0] as string).replace(\"`▍`\", \"▍\");\n }\n\n const match = /language-(\\w+)/.exec(className || \"\");\n\n if (inline) {\n return (\n <code className={className} {...props}>\n {children}\n </code>\n );\n }\n\n return (\n <CodeBlock\n key={Math.random()}\n language={(match && match[1]) || \"\"}\n value={String(children).replace(/\\n$/, \"\")}\n {...props}\n />\n );\n },\n }}\n >\n {message.content}\n </MemoizedReactMarkdown>\n <ChatMessageActions message={message} />\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/default-empty-screen.tsx"],"names":[],"mappings":";;;;;;;;;;;AA+BQ,cACA,YADA;AAvBR,IAAM,kBAAkB;AAAA,EACtB;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA;AAAA,EACX;AACF;AAMO,IAAM,qBAAiD,CAAC,UAAU;AACvE,SACE,oBAAC,SAAI,WAAU,0BACb,+BAAC,SAAI,WAAU,uCACb;AAAA,wBAAC,QAAG,WAAU,8BAA6B,8CAAyB;AAAA,IACpE,qBAAC,OAAE,WAAU,6CAA4C;AAAA;AAAA,MAC1B;AAAA,MAC7B,oBAAC,gBAAa,MAAK,0BAAyB,8BAAgB;AAAA,MAAgB;AAAA,MAC5E,oBAAC,gBAAa,MAAK,+CAA8C,wBAAU;AAAA,MAAgB;AAAA,MAAI;AAAA,OAEjG;AAAA,IACA,oBAAC,OAAE,WAAU,wCAAuC,8EAEpD;AAAA,IACA,oBAAC,SAAI,WAAU,4CACZ,0BAAgB,IAAI,CAAC,SAAS,UAC7B;AAAA,MAAC;AAAA;AAAA,QAEC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,SAAS,MAAM,MAAM,SAAS,QAAQ,OAAO;AAAA,QAE7C;AAAA,8BAAC,kBAAe,WAAU,8BAA6B;AAAA,UACtD,QAAQ;AAAA;AAAA;AAAA,MANJ;AAAA,IAOP,CACD,GACH;AAAA,KACF,GACF;AAEJ","sourcesContent":["\"use client\";\nimport React from \"react\";\nimport { UseChatHelpers } from \"ai/react\";\n\nimport { Button } from \"./ui/button\";\nimport { ExternalLink } from \"./external-link\";\nimport { IconArrowRight } from \"./ui/icons\";\n\nconst exampleMessages = [\n {\n heading: \"Explain technical concepts\",\n message: `What is a \"serverless function\"?`,\n },\n {\n heading: \"Summarize an article\",\n message: \"Summarize the following article for a 2nd grader: \\n\",\n },\n {\n heading: \"Draft an email\",\n message: `Draft an email to my boss about the following: \\n`,\n },\n];\n\nexport interface EmptyScreenProps {\n setInput: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport const DefaultEmptyScreen: React.FC<EmptyScreenProps> = (props) => {\n return (\n <div className=\"mx-auto max-w-2xl px-4\">\n <div className=\"rounded-lg border bg-background p-8\">\n <h1 className=\"mb-2 text-lg font-semibold\">Welcome to CopilotKit! 👋</h1>\n <p className=\"mb-2 leading-normal text-muted-foreground\">\n This is a Copilot built with{\" \"}\n <ExternalLink href=\"https://recursively.ai\">recursively.ai's</ExternalLink>{\" \"}\n <ExternalLink href=\"https://github.com/RecursivelyAI/CopilotKit\">CopilotKit</ExternalLink>{\" \"}\n .\n </p>\n <p className=\"leading-normal text-muted-foreground\">\n You can start a conversation here or try the following examples:\n </p>\n <div className=\"mt-4 flex flex-col items-start space-y-2\">\n {exampleMessages.map((message, index) => (\n <Button\n key={index}\n variant=\"link\"\n className=\"h-auto p-0 text-base\"\n onClick={() => props.setInput(message.message)}\n >\n <IconArrowRight className=\"mr-2 text-muted-foreground\" />\n {message.heading}\n </Button>\n ))}\n </div>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-message-actions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BM,SACc,KADd;AAhBC,SAAS,mBAAmB,IAA2D;AAA3D,eAAE,WAAS,UAb9C,IAamC,IAAyB,kBAAzB,IAAyB,CAAvB,WAAS;AAC5C,QAAM,EAAE,UAAU,gBAAgB,IAAI,mBAAmB,EAAE,SAAS,IAAK,CAAC;AAE1E,QAAM,SAAS,MAAM;AACnB,QAAI;AAAU;AACd,oBAAgB,QAAQ,OAAO;AAAA,EACjC;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI,QALL;AAAA,MAOC,+BAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,SAAS,QAC1C;AAAA,mBAAW,oBAAC,aAAU,IAAK,oBAAC,YAAS;AAAA,QACtC,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,SACxC;AAAA;AAAA,EACF;AAEJ","sourcesContent":["\"use client\";\n\nimport { type Message } from \"ai\";\n\nimport { Button } from \"./ui/button\";\nimport { IconCheck, IconCopy } from \"./ui/icons\";\nimport { useCopyToClipboard } from \"../../hooks/use-copy-to-clipboard\";\nimport { cn } from \"../../lib/utils\";\n\ninterface ChatMessageActionsProps extends React.ComponentProps<\"div\"> {\n message: Message;\n}\n\nexport function ChatMessageActions({ message, className, ...props }: ChatMessageActionsProps) {\n const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 });\n\n const onCopy = () => {\n if (isCopied) return;\n copyToClipboard(message.content);\n };\n\n return (\n <div\n className={cn(\n \"flex items-center justify-end transition-opacity group-hover:opacity-100 md:absolute md:-right-10 md:-top-2 md:opacity-0\",\n className,\n )}\n {...props}\n >\n <Button variant=\"ghost\" size=\"icon\" onClick={onCopy}>\n {isCopied ? <IconCheck /> : <IconCopy />}\n <span className=\"sr-only\">Copy message</span>\n </Button>\n </div>\n );\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|