@copilotkit/react-ui 0.0.0-fix-use-warning-for-version-mismatch-20250212175807 → 0.0.0-fix-interrupt-issues-20250409144731
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/CHANGELOG.md +519 -5
- package/dist/chunk-2OTVZXDX.mjs +32 -0
- package/dist/chunk-2OTVZXDX.mjs.map +1 -0
- package/dist/chunk-5M7ODWKH.mjs +112 -0
- package/dist/chunk-5M7ODWKH.mjs.map +1 -0
- package/dist/chunk-62QMTKMJ.mjs +66 -0
- package/dist/chunk-62QMTKMJ.mjs.map +1 -0
- package/dist/{chunk-22K5DDPF.mjs → chunk-D5XIJNXQ.mjs} +26 -55
- package/dist/chunk-D5XIJNXQ.mjs.map +1 -0
- package/dist/{chunk-BS76QNZU.mjs → chunk-GOAED4H6.mjs} +18 -17
- package/dist/chunk-GOAED4H6.mjs.map +1 -0
- package/dist/{chunk-YAGE7RCE.mjs → chunk-HIORSNVD.mjs} +36 -8
- package/dist/chunk-HIORSNVD.mjs.map +1 -0
- package/dist/chunk-JGMFJZMG.mjs +11 -0
- package/dist/chunk-JGMFJZMG.mjs.map +1 -0
- package/dist/{chunk-XB6QCUPB.mjs → chunk-NMNC4ROZ.mjs} +20 -8
- package/dist/chunk-NMNC4ROZ.mjs.map +1 -0
- package/dist/chunk-NRA3CFEE.mjs +97 -0
- package/dist/chunk-NRA3CFEE.mjs.map +1 -0
- package/dist/chunk-ORSMX3SE.mjs +244 -0
- package/dist/chunk-ORSMX3SE.mjs.map +1 -0
- package/dist/{chunk-UPTB2MVO.mjs → chunk-PCTCOQK2.mjs} +4 -10
- package/dist/chunk-PCTCOQK2.mjs.map +1 -0
- package/dist/{chunk-UWWMAJ7R.mjs → chunk-Q2YY2NX3.mjs} +20 -8
- package/dist/chunk-Q2YY2NX3.mjs.map +1 -0
- package/dist/{chunk-OTPAZXVR.mjs → chunk-Q5V6S67N.mjs} +17 -6
- package/dist/chunk-Q5V6S67N.mjs.map +1 -0
- package/dist/{chunk-EMQEEXUB.mjs → chunk-QJKMOGWN.mjs} +22 -13
- package/dist/chunk-QJKMOGWN.mjs.map +1 -0
- package/dist/{chunk-IBPPZVL7.mjs → chunk-SMJ3QQCE.mjs} +2 -2
- package/dist/{chunk-WGAZXTUA.mjs → chunk-TOQ7P4DO.mjs} +6 -9
- package/dist/chunk-TOQ7P4DO.mjs.map +1 -0
- package/dist/{chunk-CBBFRI3Q.mjs → chunk-UN2E3HCK.mjs} +16 -6
- package/dist/chunk-UN2E3HCK.mjs.map +1 -0
- package/dist/chunk-WNC6OCIB.mjs +36 -0
- package/dist/chunk-WNC6OCIB.mjs.map +1 -0
- package/dist/{chunk-EQD5OMET.mjs → chunk-X6EFGEBJ.mjs} +2 -2
- package/dist/{chunk-YQ3D5IQV.mjs → chunk-XNQO5AZZ.mjs} +2 -5
- package/dist/chunk-XNQO5AZZ.mjs.map +1 -0
- package/dist/{chunk-RQNJNK2W.mjs → chunk-YOEL33HG.mjs} +2 -2
- package/dist/{chunk-LTVGARDO.mjs → chunk-ZLRUNNS7.mjs} +69 -52
- package/dist/chunk-ZLRUNNS7.mjs.map +1 -0
- package/dist/{chunk-6FTRYYR5.mjs → chunk-ZY25LVYR.mjs} +72 -62
- package/dist/chunk-ZY25LVYR.mjs.map +1 -0
- package/dist/components/chat/Button.js.map +1 -1
- package/dist/components/chat/Button.mjs +3 -3
- package/dist/components/chat/Chat.d.ts +25 -13
- package/dist/components/chat/Chat.js +737 -1233
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +13 -21
- package/dist/components/chat/ChatContext.d.ts +35 -0
- package/dist/components/chat/ChatContext.js +97 -61
- package/dist/components/chat/ChatContext.js.map +1 -1
- package/dist/components/chat/ChatContext.mjs +2 -2
- package/dist/components/chat/CodeBlock.js +58 -82
- package/dist/components/chat/CodeBlock.js.map +1 -1
- package/dist/components/chat/CodeBlock.mjs +2 -2
- package/dist/components/chat/Header.js +535 -4
- package/dist/components/chat/Header.js.map +1 -1
- package/dist/components/chat/Header.mjs +10 -3
- package/dist/components/chat/Icons.d.ts +10 -9
- package/dist/components/chat/Icons.js +125 -164
- package/dist/components/chat/Icons.js.map +1 -1
- package/dist/components/chat/Icons.mjs +9 -5
- package/dist/components/chat/Input.d.ts +1 -1
- package/dist/components/chat/Input.js +20 -11
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +3 -3
- package/dist/components/chat/Markdown.js +58 -56
- package/dist/components/chat/Markdown.js.map +1 -1
- package/dist/components/chat/Markdown.mjs +3 -3
- package/dist/components/chat/Messages.d.ts +1 -1
- package/dist/components/chat/Messages.js +70 -60
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +3 -3
- package/dist/components/chat/Modal.d.ts +1 -1
- package/dist/components/chat/Modal.js +1856 -1809
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +22 -22
- package/dist/components/chat/Popup.js +1853 -1806
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +23 -23
- package/dist/components/chat/Sidebar.js +1855 -1808
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +23 -23
- package/dist/components/chat/Suggestion.js +4 -40
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +2 -2
- package/dist/components/chat/Window.js +39 -5
- package/dist/components/chat/Window.js.map +1 -1
- package/dist/components/chat/Window.mjs +4 -3
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/chat/index.js +1856 -1809
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +27 -27
- package/dist/components/chat/messages/AssistantMessage.js +148 -59
- package/dist/components/chat/messages/AssistantMessage.js.map +1 -1
- package/dist/components/chat/messages/AssistantMessage.mjs +5 -5
- package/dist/components/chat/messages/RenderActionExecutionMessage.d.ts +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.js +696 -15
- package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +7 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.d.ts +1 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.js +693 -12
- package/dist/components/chat/messages/RenderAgentStateMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderAgentStateMessage.mjs +7 -1
- package/dist/components/chat/messages/RenderResultMessage.d.ts +1 -1
- package/dist/components/chat/messages/RenderResultMessage.js +687 -4
- package/dist/components/chat/messages/RenderResultMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderResultMessage.mjs +7 -1
- package/dist/components/chat/messages/RenderTextMessage.d.ts +1 -1
- package/dist/components/chat/messages/RenderTextMessage.js +710 -7
- package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderTextMessage.mjs +8 -1
- package/dist/components/chat/props.d.ts +56 -7
- package/dist/components/chat/props.js.map +1 -1
- package/dist/components/dev-console/console.js +69 -240
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +4 -4
- package/dist/components/dev-console/icons.js +16 -5
- package/dist/components/dev-console/icons.js.map +1 -1
- package/dist/components/dev-console/icons.mjs +1 -1
- package/dist/components/dev-console/index.js +69 -240
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +4 -4
- package/dist/components/help-modal/index.js +30 -148
- package/dist/components/help-modal/index.js.map +1 -1
- package/dist/components/help-modal/index.mjs +1 -1
- package/dist/components/help-modal/modal.js +30 -148
- package/dist/components/help-modal/modal.js.map +1 -1
- package/dist/components/help-modal/modal.mjs +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1856 -1809
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +30 -30
- package/dist/hooks/use-dark-mode.d.ts +3 -0
- package/dist/hooks/use-dark-mode.js +35 -0
- package/dist/hooks/use-dark-mode.js.map +1 -0
- package/dist/hooks/use-dark-mode.mjs +8 -0
- package/dist/index.css +552 -127
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1850 -1803
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/types/css.d.ts +8 -5
- package/dist/types/css.js.map +1 -1
- package/package.json +4 -4
- package/src/components/chat/Chat.tsx +92 -45
- package/src/components/chat/ChatContext.tsx +54 -1
- package/src/components/chat/CodeBlock.tsx +2 -4
- package/src/components/chat/Header.tsx +12 -3
- package/src/components/chat/Icons.tsx +108 -108
- package/src/components/chat/Input.tsx +60 -40
- package/src/components/chat/Markdown.tsx +0 -3
- package/src/components/chat/Messages.tsx +68 -56
- package/src/components/chat/Modal.tsx +8 -6
- package/src/components/chat/Suggestion.tsx +2 -3
- package/src/components/chat/Window.tsx +26 -1
- package/src/components/chat/messages/AssistantMessage.tsx +94 -3
- package/src/components/chat/messages/RenderActionExecutionMessage.tsx +6 -2
- package/src/components/chat/messages/RenderAgentStateMessage.tsx +6 -2
- package/src/components/chat/messages/RenderResultMessage.tsx +11 -2
- package/src/components/chat/messages/RenderTextMessage.tsx +22 -2
- package/src/components/chat/props.ts +68 -7
- package/src/components/dev-console/console.tsx +18 -56
- package/src/components/dev-console/icons.tsx +9 -2
- package/src/components/help-modal/modal.tsx +39 -102
- package/src/css/button.css +15 -4
- package/src/css/colors.css +66 -10
- package/src/css/console.css +74 -42
- package/src/css/crew.css +277 -0
- package/src/css/header.css +28 -6
- package/src/css/input.css +35 -19
- package/src/css/markdown.css +2 -1
- package/src/css/messages.css +128 -16
- package/src/css/panel.css +1 -0
- package/src/css/suggestions.css +14 -6
- package/src/css/window.css +27 -0
- package/src/hooks/use-dark-mode.ts +10 -0
- package/src/styles.css +1 -1
- package/src/types/css.ts +8 -5
- package/dist/chunk-22K5DDPF.mjs.map +0 -1
- package/dist/chunk-3VNMQWGT.mjs +0 -25
- package/dist/chunk-3VNMQWGT.mjs.map +0 -1
- package/dist/chunk-3XAXY2Z3.mjs +0 -18
- package/dist/chunk-3XAXY2Z3.mjs.map +0 -1
- package/dist/chunk-6FTRYYR5.mjs.map +0 -1
- package/dist/chunk-BS76QNZU.mjs.map +0 -1
- package/dist/chunk-CBBFRI3Q.mjs.map +0 -1
- package/dist/chunk-EMQEEXUB.mjs.map +0 -1
- package/dist/chunk-F7VWGY77.mjs +0 -22
- package/dist/chunk-F7VWGY77.mjs.map +0 -1
- package/dist/chunk-FZC7X5PK.mjs +0 -262
- package/dist/chunk-FZC7X5PK.mjs.map +0 -1
- package/dist/chunk-LTVGARDO.mjs.map +0 -1
- package/dist/chunk-OFYI4UU4.mjs +0 -35
- package/dist/chunk-OFYI4UU4.mjs.map +0 -1
- package/dist/chunk-OTPAZXVR.mjs.map +0 -1
- package/dist/chunk-TI7SY2RI.mjs +0 -164
- package/dist/chunk-TI7SY2RI.mjs.map +0 -1
- package/dist/chunk-UPTB2MVO.mjs.map +0 -1
- package/dist/chunk-UWWMAJ7R.mjs.map +0 -1
- package/dist/chunk-VEC45H6Q.mjs +0 -18
- package/dist/chunk-VEC45H6Q.mjs.map +0 -1
- package/dist/chunk-WGAZXTUA.mjs.map +0 -1
- package/dist/chunk-XB6QCUPB.mjs.map +0 -1
- package/dist/chunk-YAGE7RCE.mjs.map +0 -1
- package/dist/chunk-YQ3D5IQV.mjs.map +0 -1
- package/dist/components/chat/Response.d.ts +0 -7
- package/dist/components/chat/Response.js +0 -64
- package/dist/components/chat/Response.js.map +0 -1
- package/dist/components/chat/Response.mjs +0 -10
- package/src/components/chat/Response.tsx +0 -12
- package/src/css/response.css +0 -26
- /package/dist/{chunk-IBPPZVL7.mjs.map → chunk-SMJ3QQCE.mjs.map} +0 -0
- /package/dist/{chunk-EQD5OMET.mjs.map → chunk-X6EFGEBJ.mjs.map} +0 -0
- /package/dist/{chunk-RQNJNK2W.mjs.map → chunk-YOEL33HG.mjs.map} +0 -0
- /package/dist/{components/chat/Response.mjs.map → hooks/use-dark-mode.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,528 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-
|
|
3
|
+
## 0.0.0-fix-interrupt-issues-20250409144731
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4b5452d: - feat: add powered-by-copilotkit watermark
|
|
8
|
+
- d0e8a1e: - fix: fix duplicate messages on regenerate
|
|
9
|
+
- ed5ace7: - fix: for every component that has default, make prop optional
|
|
10
|
+
- Updated dependencies [b817a9f]
|
|
11
|
+
- Updated dependencies [d0e8a1e]
|
|
12
|
+
- @copilotkit/react-core@0.0.0-fix-interrupt-issues-20250409144731
|
|
13
|
+
- @copilotkit/runtime-client-gql@0.0.0-fix-interrupt-issues-20250409144731
|
|
14
|
+
- @copilotkit/shared@0.0.0-fix-interrupt-issues-20250409144731
|
|
15
|
+
|
|
16
|
+
## 1.8.5-next.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 4b5452d: - feat: add powered-by-copilotkit watermark
|
|
21
|
+
- @copilotkit/react-core@1.8.5-next.2
|
|
22
|
+
- @copilotkit/runtime-client-gql@1.8.5-next.2
|
|
23
|
+
- @copilotkit/shared@1.8.5-next.2
|
|
24
|
+
|
|
25
|
+
## 1.8.5-next.1
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- d0e8a1e: - fix: fix duplicate messages on regenerate
|
|
30
|
+
- Updated dependencies [d0e8a1e]
|
|
31
|
+
- @copilotkit/react-core@1.8.5-next.1
|
|
32
|
+
- @copilotkit/runtime-client-gql@1.8.5-next.1
|
|
33
|
+
- @copilotkit/shared@1.8.5-next.1
|
|
34
|
+
|
|
35
|
+
## 1.8.5-next.0
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- ed5ace7: - fix: for every component that has default, make prop optional
|
|
40
|
+
- @copilotkit/react-core@1.8.5-next.0
|
|
41
|
+
- @copilotkit/runtime-client-gql@1.8.5-next.0
|
|
42
|
+
- @copilotkit/shared@1.8.5-next.0
|
|
43
|
+
|
|
44
|
+
## 1.8.4
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 0846462: - fix: remove styles corresponding to OS dark theme
|
|
49
|
+
- fc11455: - fix: focus on text area when clicking in input box
|
|
50
|
+
- Updated dependencies [f363760]
|
|
51
|
+
- Updated dependencies [4e28414]
|
|
52
|
+
- @copilotkit/shared@1.8.4
|
|
53
|
+
- @copilotkit/react-core@1.8.4
|
|
54
|
+
- @copilotkit/runtime-client-gql@1.8.4
|
|
55
|
+
|
|
56
|
+
## 1.8.4-next.4
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [4e28414]
|
|
61
|
+
- @copilotkit/react-core@1.8.4-next.4
|
|
62
|
+
- @copilotkit/runtime-client-gql@1.8.4-next.4
|
|
63
|
+
- @copilotkit/shared@1.8.4-next.4
|
|
64
|
+
|
|
65
|
+
## 1.8.4-next.3
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- @copilotkit/runtime-client-gql@1.8.4-next.3
|
|
70
|
+
- @copilotkit/react-core@1.8.4-next.3
|
|
71
|
+
- @copilotkit/shared@1.8.4-next.3
|
|
72
|
+
|
|
73
|
+
## 1.8.4-next.2
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- fc11455: - fix: focus on text area when clicking in input box
|
|
78
|
+
- @copilotkit/react-core@1.8.4-next.2
|
|
79
|
+
- @copilotkit/runtime-client-gql@1.8.4-next.2
|
|
80
|
+
- @copilotkit/shared@1.8.4-next.2
|
|
81
|
+
|
|
82
|
+
## 1.8.4-next.1
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [f363760]
|
|
87
|
+
- @copilotkit/shared@1.8.4-next.1
|
|
88
|
+
- @copilotkit/runtime-client-gql@1.8.4-next.1
|
|
89
|
+
- @copilotkit/react-core@1.8.4-next.1
|
|
90
|
+
|
|
91
|
+
## 1.8.4-next.0
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- 0846462: - fix: remove styles corresponding to OS dark theme
|
|
96
|
+
- @copilotkit/react-core@1.8.4-next.0
|
|
97
|
+
- @copilotkit/runtime-client-gql@1.8.4-next.0
|
|
98
|
+
- @copilotkit/shared@1.8.4-next.0
|
|
99
|
+
|
|
100
|
+
## 1.8.3
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- 76520b8: - style: remove system-preference oriented dark mode
|
|
105
|
+
- 0f6baa1: - fix: fix default styles of chat components
|
|
106
|
+
- @copilotkit/react-core@1.8.3
|
|
107
|
+
- @copilotkit/runtime-client-gql@1.8.3
|
|
108
|
+
- @copilotkit/shared@1.8.3
|
|
109
|
+
|
|
110
|
+
## 1.8.3-next.0
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- 76520b8: - style: remove system-preference oriented dark mode
|
|
115
|
+
- @copilotkit/react-core@1.8.3-next.0
|
|
116
|
+
- @copilotkit/runtime-client-gql@1.8.3-next.0
|
|
117
|
+
- @copilotkit/shared@1.8.3-next.0
|
|
118
|
+
|
|
119
|
+
## 1.8.2-next.3
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- 0f6baa1: - fix: fix default styles of chat components
|
|
124
|
+
- @copilotkit/react-core@1.8.2-next.3
|
|
125
|
+
- @copilotkit/runtime-client-gql@1.8.2-next.3
|
|
126
|
+
- @copilotkit/shared@1.8.2-next.3
|
|
127
|
+
|
|
128
|
+
## 1.8.2-next.2
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- @copilotkit/runtime-client-gql@1.8.2-next.2
|
|
133
|
+
- @copilotkit/react-core@1.8.2-next.2
|
|
134
|
+
- @copilotkit/shared@1.8.2-next.2
|
|
135
|
+
|
|
136
|
+
## 1.8.2-next.1
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- @copilotkit/runtime-client-gql@1.8.2-next.1
|
|
141
|
+
- @copilotkit/react-core@1.8.2-next.1
|
|
142
|
+
- @copilotkit/shared@1.8.2-next.1
|
|
143
|
+
|
|
144
|
+
## 1.8.2-next.0
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- d574350: - fix: adjust order of colors so app themes prevails OS theme
|
|
149
|
+
- d574350: - fix: adjust order of colors so app themes prevails OS theme
|
|
150
|
+
- @copilotkit/react-core@1.8.2-next.0
|
|
151
|
+
- @copilotkit/runtime-client-gql@1.8.2-next.0
|
|
152
|
+
- @copilotkit/shared@1.8.2-next.0
|
|
153
|
+
|
|
154
|
+
## 1.8.1
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- 0cba747: - fix: set text area within the input box to transparent background
|
|
159
|
+
- Updated dependencies [7a42944]
|
|
160
|
+
- @copilotkit/react-core@1.8.1
|
|
161
|
+
- @copilotkit/runtime-client-gql@1.8.1
|
|
162
|
+
- @copilotkit/shared@1.8.1
|
|
163
|
+
|
|
164
|
+
## 1.8.1-next.1
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- 0cba747: - fix: set text area within the input box to transparent background
|
|
169
|
+
- @copilotkit/react-core@1.8.1-next.1
|
|
170
|
+
- @copilotkit/runtime-client-gql@1.8.1-next.1
|
|
171
|
+
- @copilotkit/shared@1.8.1-next.1
|
|
172
|
+
|
|
173
|
+
## 1.8.1-next.0
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [7a42944]
|
|
178
|
+
- @copilotkit/react-core@1.8.1-next.0
|
|
179
|
+
- @copilotkit/runtime-client-gql@1.8.1-next.0
|
|
180
|
+
- @copilotkit/shared@1.8.1-next.0
|
|
181
|
+
|
|
182
|
+
## 1.8.0
|
|
183
|
+
|
|
184
|
+
### Minor Changes
|
|
185
|
+
|
|
186
|
+
- 20f0727: - feat(chat): redesign chat
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- 099807a: - fix: adjust dev console menus to dark theme
|
|
191
|
+
- c11fab9: - chore(react-ui): Add DefaultResponseRenderer and DefaultStateRenderer components
|
|
192
|
+
- a50f4c1: - move default components out of ui
|
|
193
|
+
- 5f184b7: - fix: remove response button
|
|
194
|
+
- fix: use customizable assistant message icons
|
|
195
|
+
- d8e354b: - fix: re-align customization variable names and usage
|
|
196
|
+
- Updated dependencies [73f5eaa]
|
|
197
|
+
- Updated dependencies [a50f4c1]
|
|
198
|
+
- @copilotkit/react-core@1.8.0
|
|
199
|
+
- @copilotkit/runtime-client-gql@1.8.0
|
|
200
|
+
- @copilotkit/shared@1.8.0
|
|
201
|
+
|
|
202
|
+
## 1.8.0-next.8
|
|
203
|
+
|
|
204
|
+
### Patch Changes
|
|
205
|
+
|
|
206
|
+
- 099807a: - fix: adjust dev console menus to dark theme
|
|
207
|
+
- @copilotkit/react-core@1.8.0-next.8
|
|
208
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.8
|
|
209
|
+
- @copilotkit/shared@1.8.0-next.8
|
|
210
|
+
|
|
211
|
+
## 1.8.0-next.7
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- 5f184b7: - fix: remove response button
|
|
216
|
+
- fix: use customizable assistant message icons
|
|
217
|
+
- @copilotkit/react-core@1.8.0-next.7
|
|
218
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.7
|
|
219
|
+
- @copilotkit/shared@1.8.0-next.7
|
|
220
|
+
|
|
221
|
+
## 1.8.0-next.6
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- @copilotkit/react-core@1.8.0-next.6
|
|
226
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.6
|
|
227
|
+
- @copilotkit/shared@1.8.0-next.6
|
|
228
|
+
|
|
229
|
+
## 1.8.0-next.5
|
|
230
|
+
|
|
231
|
+
### Patch Changes
|
|
232
|
+
|
|
233
|
+
- a50f4c1: - move default components out of ui
|
|
234
|
+
- Updated dependencies [a50f4c1]
|
|
235
|
+
- @copilotkit/react-core@1.8.0-next.5
|
|
236
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.5
|
|
237
|
+
- @copilotkit/shared@1.8.0-next.5
|
|
238
|
+
|
|
239
|
+
## 1.8.0-next.4
|
|
240
|
+
|
|
241
|
+
### Patch Changes
|
|
242
|
+
|
|
243
|
+
- d8e354b: - fix: re-align customization variable names and usage
|
|
244
|
+
- @copilotkit/react-core@1.8.0-next.4
|
|
245
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.4
|
|
246
|
+
- @copilotkit/shared@1.8.0-next.4
|
|
247
|
+
|
|
248
|
+
## 1.8.0-next.3
|
|
249
|
+
|
|
250
|
+
### Minor Changes
|
|
251
|
+
|
|
252
|
+
- 20f0727: - feat(chat): redesign chat
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- @copilotkit/react-core@1.8.0-next.3
|
|
257
|
+
- @copilotkit/runtime-client-gql@1.8.0-next.3
|
|
258
|
+
- @copilotkit/shared@1.8.0-next.3
|
|
259
|
+
|
|
260
|
+
## 1.7.2-next.2
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- c11fab9: - chore(react-ui): Add DefaultResponseRenderer and DefaultStateRenderer components
|
|
265
|
+
- @copilotkit/react-core@1.7.2-next.2
|
|
266
|
+
- @copilotkit/runtime-client-gql@1.7.2-next.2
|
|
267
|
+
- @copilotkit/shared@1.7.2-next.2
|
|
268
|
+
|
|
269
|
+
## 1.7.2-next.1
|
|
270
|
+
|
|
271
|
+
### Patch Changes
|
|
272
|
+
|
|
273
|
+
- Updated dependencies [73f5eaa]
|
|
274
|
+
- @copilotkit/react-core@1.7.2-next.1
|
|
275
|
+
- @copilotkit/runtime-client-gql@1.7.2-next.1
|
|
276
|
+
- @copilotkit/shared@1.7.2-next.1
|
|
277
|
+
|
|
278
|
+
## 1.7.2-next.0
|
|
279
|
+
|
|
280
|
+
### Patch Changes
|
|
281
|
+
|
|
282
|
+
- @copilotkit/runtime-client-gql@1.7.2-next.0
|
|
283
|
+
- @copilotkit/react-core@1.7.2-next.0
|
|
284
|
+
- @copilotkit/shared@1.7.2-next.0
|
|
285
|
+
|
|
286
|
+
## 1.7.1
|
|
287
|
+
|
|
288
|
+
### Patch Changes
|
|
289
|
+
|
|
290
|
+
- @copilotkit/runtime-client-gql@1.7.1
|
|
291
|
+
- @copilotkit/react-core@1.7.1
|
|
292
|
+
- @copilotkit/shared@1.7.1
|
|
293
|
+
|
|
294
|
+
## 1.7.1-next.0
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- @copilotkit/runtime-client-gql@1.7.1-next.0
|
|
299
|
+
- @copilotkit/react-core@1.7.1-next.0
|
|
300
|
+
- @copilotkit/shared@1.7.1-next.0
|
|
301
|
+
|
|
302
|
+
## 1.7.0
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- @copilotkit/runtime-client-gql@1.7.0
|
|
307
|
+
- @copilotkit/react-core@1.7.0
|
|
308
|
+
- @copilotkit/shared@1.7.0
|
|
309
|
+
|
|
310
|
+
## 1.7.0-next.1
|
|
311
|
+
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- @copilotkit/runtime-client-gql@1.7.0-next.1
|
|
315
|
+
- @copilotkit/react-core@1.7.0-next.1
|
|
316
|
+
- @copilotkit/shared@1.7.0-next.1
|
|
317
|
+
|
|
318
|
+
## 1.7.0-next.0
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- @copilotkit/runtime-client-gql@1.7.0-next.0
|
|
323
|
+
- @copilotkit/react-core@1.7.0-next.0
|
|
324
|
+
- @copilotkit/shared@1.7.0-next.0
|
|
325
|
+
|
|
326
|
+
## 1.6.0
|
|
327
|
+
|
|
328
|
+
### Patch Changes
|
|
329
|
+
|
|
330
|
+
- c1cc77f: - feat: new useCopilotAdditionalInstructions hook and available property on useCopilotReadable
|
|
331
|
+
- Updated dependencies [d833f4c]
|
|
332
|
+
- Updated dependencies [090203d]
|
|
333
|
+
- Updated dependencies [d800f03]
|
|
334
|
+
- Updated dependencies [85753b3]
|
|
335
|
+
- Updated dependencies [7d061d9]
|
|
336
|
+
- Updated dependencies [b454827]
|
|
337
|
+
- Updated dependencies [c1cc77f]
|
|
338
|
+
- @copilotkit/react-core@1.6.0
|
|
339
|
+
- @copilotkit/runtime-client-gql@1.6.0
|
|
340
|
+
- @copilotkit/shared@1.6.0
|
|
341
|
+
|
|
342
|
+
## 1.6.0-next.12
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.12
|
|
347
|
+
- @copilotkit/react-core@1.6.0-next.12
|
|
348
|
+
- @copilotkit/shared@1.6.0-next.12
|
|
349
|
+
|
|
350
|
+
## 1.6.0-next.11
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- Updated dependencies [85753b3]
|
|
355
|
+
- @copilotkit/react-core@1.6.0-next.11
|
|
356
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.11
|
|
357
|
+
- @copilotkit/shared@1.6.0-next.11
|
|
358
|
+
|
|
359
|
+
## 1.6.0-next.10
|
|
360
|
+
|
|
361
|
+
### Patch Changes
|
|
362
|
+
|
|
363
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.10
|
|
364
|
+
- @copilotkit/react-core@1.6.0-next.10
|
|
365
|
+
- @copilotkit/shared@1.6.0-next.10
|
|
366
|
+
|
|
367
|
+
## 1.6.0-next.9
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.9
|
|
372
|
+
- @copilotkit/react-core@1.6.0-next.9
|
|
373
|
+
- @copilotkit/shared@1.6.0-next.9
|
|
374
|
+
|
|
375
|
+
## 1.6.0-next.8
|
|
376
|
+
|
|
377
|
+
### Patch Changes
|
|
378
|
+
|
|
379
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.8
|
|
380
|
+
- @copilotkit/react-core@1.6.0-next.8
|
|
381
|
+
- @copilotkit/shared@1.6.0-next.8
|
|
382
|
+
|
|
383
|
+
## 1.6.0-next.7
|
|
384
|
+
|
|
385
|
+
### Patch Changes
|
|
386
|
+
|
|
387
|
+
- Updated dependencies [d800f03]
|
|
388
|
+
- @copilotkit/react-core@1.6.0-next.7
|
|
389
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.7
|
|
390
|
+
- @copilotkit/shared@1.6.0-next.7
|
|
391
|
+
|
|
392
|
+
## 1.6.0-next.6
|
|
393
|
+
|
|
394
|
+
### Patch Changes
|
|
395
|
+
|
|
396
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.6
|
|
397
|
+
- @copilotkit/react-core@1.6.0-next.6
|
|
398
|
+
- @copilotkit/shared@1.6.0-next.6
|
|
399
|
+
|
|
400
|
+
## 1.6.0-next.5
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- Updated dependencies [090203d]
|
|
405
|
+
- @copilotkit/shared@1.6.0-next.5
|
|
406
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.5
|
|
407
|
+
- @copilotkit/react-core@1.6.0-next.5
|
|
408
|
+
|
|
409
|
+
## 1.6.0-next.4
|
|
410
|
+
|
|
411
|
+
### Patch Changes
|
|
412
|
+
|
|
413
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.4
|
|
414
|
+
- @copilotkit/react-core@1.6.0-next.4
|
|
415
|
+
- @copilotkit/shared@1.6.0-next.4
|
|
416
|
+
|
|
417
|
+
## 1.6.0-next.3
|
|
418
|
+
|
|
419
|
+
### Patch Changes
|
|
420
|
+
|
|
421
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.3
|
|
422
|
+
- @copilotkit/react-core@1.6.0-next.3
|
|
423
|
+
- @copilotkit/shared@1.6.0-next.3
|
|
424
|
+
|
|
425
|
+
## 1.6.0-next.2
|
|
426
|
+
|
|
427
|
+
### Patch Changes
|
|
428
|
+
|
|
429
|
+
- Updated dependencies [b454827]
|
|
430
|
+
- @copilotkit/react-core@1.6.0-next.2
|
|
431
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.2
|
|
432
|
+
- @copilotkit/shared@1.6.0-next.2
|
|
433
|
+
|
|
434
|
+
## 1.6.0-next.1
|
|
435
|
+
|
|
436
|
+
### Patch Changes
|
|
437
|
+
|
|
438
|
+
- Updated dependencies [d833f4c]
|
|
439
|
+
- @copilotkit/react-core@1.6.0-next.1
|
|
440
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.1
|
|
441
|
+
- @copilotkit/shared@1.6.0-next.1
|
|
442
|
+
|
|
443
|
+
## 1.6.0-next.0
|
|
444
|
+
|
|
445
|
+
### Patch Changes
|
|
446
|
+
|
|
447
|
+
- Updated dependencies [7d061d9]
|
|
448
|
+
- @copilotkit/react-core@1.6.0-next.0
|
|
449
|
+
- @copilotkit/runtime-client-gql@1.6.0-next.0
|
|
450
|
+
- @copilotkit/shared@1.6.0-next.0
|
|
451
|
+
|
|
452
|
+
## 1.5.20
|
|
453
|
+
|
|
454
|
+
### Patch Changes
|
|
455
|
+
|
|
456
|
+
- Updated dependencies [51f0d66]
|
|
457
|
+
- @copilotkit/shared@1.5.20
|
|
458
|
+
- @copilotkit/react-core@1.5.20
|
|
459
|
+
- @copilotkit/runtime-client-gql@1.5.20
|
|
460
|
+
|
|
461
|
+
## 1.5.20-next.0
|
|
462
|
+
|
|
463
|
+
### Patch Changes
|
|
464
|
+
|
|
465
|
+
- Updated dependencies [51f0d66]
|
|
466
|
+
- @copilotkit/shared@1.5.20-next.0
|
|
467
|
+
- @copilotkit/react-core@1.5.20-next.0
|
|
468
|
+
- @copilotkit/runtime-client-gql@1.5.20-next.0
|
|
469
|
+
|
|
470
|
+
## 1.5.19
|
|
471
|
+
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies [0dd1ab9]
|
|
475
|
+
- Updated dependencies [5bc68f8]
|
|
476
|
+
- @copilotkit/react-core@1.5.19
|
|
477
|
+
- @copilotkit/shared@1.5.19
|
|
478
|
+
- @copilotkit/runtime-client-gql@1.5.19
|
|
479
|
+
|
|
480
|
+
## 1.5.19-next.1
|
|
481
|
+
|
|
482
|
+
### Patch Changes
|
|
483
|
+
|
|
484
|
+
- Updated dependencies [0dd1ab9]
|
|
485
|
+
- @copilotkit/react-core@1.5.19-next.1
|
|
486
|
+
- @copilotkit/shared@1.5.19-next.1
|
|
487
|
+
- @copilotkit/runtime-client-gql@1.5.19-next.1
|
|
488
|
+
|
|
489
|
+
## 1.5.19-next.0
|
|
490
|
+
|
|
491
|
+
### Patch Changes
|
|
492
|
+
|
|
493
|
+
- Updated dependencies [5bc68f8]
|
|
494
|
+
- @copilotkit/react-core@1.5.19-next.0
|
|
495
|
+
- @copilotkit/runtime-client-gql@1.5.19-next.0
|
|
496
|
+
- @copilotkit/shared@1.5.19-next.0
|
|
497
|
+
|
|
498
|
+
## 1.5.18
|
|
4
499
|
|
|
5
500
|
### Patch Changes
|
|
6
501
|
|
|
7
502
|
- Updated dependencies [d47cd26]
|
|
8
|
-
- Updated dependencies [
|
|
9
|
-
|
|
10
|
-
- @copilotkit/
|
|
11
|
-
- @copilotkit/
|
|
503
|
+
- Updated dependencies [f77a7b9]
|
|
504
|
+
- Updated dependencies [38d3ac2]
|
|
505
|
+
- @copilotkit/runtime-client-gql@1.5.18
|
|
506
|
+
- @copilotkit/shared@1.5.18
|
|
507
|
+
- @copilotkit/react-core@1.5.18
|
|
508
|
+
|
|
509
|
+
## 1.5.18-next.3
|
|
510
|
+
|
|
511
|
+
### Patch Changes
|
|
512
|
+
|
|
513
|
+
- Updated dependencies [f77a7b9]
|
|
514
|
+
- @copilotkit/react-core@1.5.18-next.3
|
|
515
|
+
- @copilotkit/runtime-client-gql@1.5.18-next.3
|
|
516
|
+
- @copilotkit/shared@1.5.18-next.3
|
|
517
|
+
|
|
518
|
+
## 1.5.18-next.2
|
|
519
|
+
|
|
520
|
+
### Patch Changes
|
|
521
|
+
|
|
522
|
+
- Updated dependencies [38d3ac2]
|
|
523
|
+
- @copilotkit/shared@1.5.18-next.2
|
|
524
|
+
- @copilotkit/runtime-client-gql@1.5.18-next.2
|
|
525
|
+
- @copilotkit/react-core@1.5.18-next.2
|
|
12
526
|
|
|
13
527
|
## 1.5.18-next.1
|
|
14
528
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CopilotDevConsole
|
|
3
|
+
} from "./chunk-D5XIJNXQ.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useChatContext
|
|
6
|
+
} from "./chunk-UN2E3HCK.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/chat/Header.tsx
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var Header = ({}) => {
|
|
11
|
+
const { setOpen, icons, labels } = useChatContext();
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: "copilotKitHeader", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("div", { children: labels.title }),
|
|
14
|
+
/* @__PURE__ */ jsxs("div", { className: "copilotKitHeaderControls", children: [
|
|
15
|
+
/* @__PURE__ */ jsx(CopilotDevConsole, {}),
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
onClick: () => setOpen(false),
|
|
20
|
+
"aria-label": "Close",
|
|
21
|
+
className: "copilotKitHeaderCloseButton",
|
|
22
|
+
children: icons.headerCloseIcon
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
] })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
Header
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=chunk-2OTVZXDX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/Header.tsx"],"sourcesContent":["import { HeaderProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport { CopilotDevConsole } from \"../dev-console\";\nimport React from \"react\";\n\nexport const Header = ({}: HeaderProps) => {\n const { setOpen, icons, labels } = useChatContext();\n\n return (\n <div className=\"copilotKitHeader\">\n <div>{labels.title}</div>\n <div className=\"copilotKitHeaderControls\">\n <CopilotDevConsole />\n <button\n onClick={() => setOpen(false)}\n aria-label=\"Close\"\n className=\"copilotKitHeaderCloseButton\"\n >\n {icons.headerCloseIcon}\n </button>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAUM,cACA,YADA;AALC,IAAM,SAAS,CAAC,CAAC,MAAmB;AACzC,QAAM,EAAE,SAAS,OAAO,OAAO,IAAI,eAAe;AAElD,SACE,qBAAC,SAAI,WAAU,oBACb;AAAA,wBAAC,SAAK,iBAAO,OAAM;AAAA,IACnB,qBAAC,SAAI,WAAU,4BACb;AAAA,0BAAC,qBAAkB;AAAA,MACnB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM,QAAQ,KAAK;AAAA,UAC5B,cAAW;AAAA,UACX,WAAU;AAAA,UAET,gBAAM;AAAA;AAAA,MACT;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Markdown
|
|
3
|
+
} from "./chunk-XNQO5AZZ.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useChatContext
|
|
6
|
+
} from "./chunk-UN2E3HCK.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/chat/messages/AssistantMessage.tsx
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var AssistantMessage = (props) => {
|
|
12
|
+
const { icons, labels } = useChatContext();
|
|
13
|
+
const {
|
|
14
|
+
message,
|
|
15
|
+
isLoading,
|
|
16
|
+
subComponent,
|
|
17
|
+
onRegenerate,
|
|
18
|
+
onCopy,
|
|
19
|
+
onThumbsUp,
|
|
20
|
+
onThumbsDown,
|
|
21
|
+
isCurrentMessage
|
|
22
|
+
} = props;
|
|
23
|
+
const [copied, setCopied] = useState(false);
|
|
24
|
+
const handleCopy = () => {
|
|
25
|
+
if (message && onCopy) {
|
|
26
|
+
navigator.clipboard.writeText(message);
|
|
27
|
+
setCopied(true);
|
|
28
|
+
onCopy(message);
|
|
29
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
30
|
+
} else if (message) {
|
|
31
|
+
navigator.clipboard.writeText(message);
|
|
32
|
+
setCopied(true);
|
|
33
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const handleRegenerate = () => {
|
|
37
|
+
if (onRegenerate) {
|
|
38
|
+
onRegenerate();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const handleThumbsUp = () => {
|
|
42
|
+
if (onThumbsUp && message) {
|
|
43
|
+
onThumbsUp(message);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleThumbsDown = () => {
|
|
47
|
+
if (onThumbsDown && message) {
|
|
48
|
+
onThumbsDown(message);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const LoadingIcon = () => /* @__PURE__ */ jsx("span", { children: icons.activityIcon });
|
|
52
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
(message || isLoading) && /* @__PURE__ */ jsxs("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
|
|
54
|
+
message && /* @__PURE__ */ jsx(Markdown, { content: message || "" }),
|
|
55
|
+
isLoading && /* @__PURE__ */ jsx(LoadingIcon, {}),
|
|
56
|
+
message && !isLoading && /* @__PURE__ */ jsxs(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: `copilotKitMessageControls ${isCurrentMessage ? "currentMessage" : ""}`,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
className: "copilotKitMessageControlButton",
|
|
65
|
+
onClick: handleRegenerate,
|
|
66
|
+
"aria-label": labels.regenerateResponse,
|
|
67
|
+
title: labels.regenerateResponse,
|
|
68
|
+
children: icons.regenerateIcon
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
className: "copilotKitMessageControlButton",
|
|
75
|
+
onClick: handleCopy,
|
|
76
|
+
"aria-label": labels.copyToClipboard,
|
|
77
|
+
title: labels.copyToClipboard,
|
|
78
|
+
children: copied ? /* @__PURE__ */ jsx("span", { style: { fontSize: "10px", fontWeight: "bold" }, children: "\u2713" }) : icons.copyIcon
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
onThumbsUp && /* @__PURE__ */ jsx(
|
|
82
|
+
"button",
|
|
83
|
+
{
|
|
84
|
+
className: "copilotKitMessageControlButton",
|
|
85
|
+
onClick: handleThumbsUp,
|
|
86
|
+
"aria-label": labels.thumbsUp,
|
|
87
|
+
title: labels.thumbsUp,
|
|
88
|
+
children: icons.thumbsUpIcon
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
onThumbsDown && /* @__PURE__ */ jsx(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
className: "copilotKitMessageControlButton",
|
|
95
|
+
onClick: handleThumbsDown,
|
|
96
|
+
"aria-label": labels.thumbsDown,
|
|
97
|
+
title: labels.thumbsDown,
|
|
98
|
+
children: icons.thumbsDownIcon
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsx("div", { style: { marginBottom: "0.5rem" }, children: subComponent })
|
|
106
|
+
] });
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
AssistantMessage
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=chunk-5M7ODWKH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/messages/AssistantMessage.tsx"],"sourcesContent":["import { AssistantMessageProps } from \"../props\";\nimport { useChatContext } from \"../ChatContext\";\nimport { Markdown } from \"../Markdown\";\nimport { useState } from \"react\";\n\nexport const AssistantMessage = (props: AssistantMessageProps) => {\n const { icons, labels } = useChatContext();\n const {\n message,\n isLoading,\n subComponent,\n onRegenerate,\n onCopy,\n onThumbsUp,\n onThumbsDown,\n isCurrentMessage,\n } = props;\n const [copied, setCopied] = useState(false);\n\n const handleCopy = () => {\n if (message && onCopy) {\n navigator.clipboard.writeText(message);\n setCopied(true);\n onCopy(message);\n setTimeout(() => setCopied(false), 2000);\n } else if (message) {\n navigator.clipboard.writeText(message);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n }\n };\n\n const handleRegenerate = () => {\n if (onRegenerate) {\n onRegenerate();\n }\n };\n\n const handleThumbsUp = () => {\n if (onThumbsUp && message) {\n onThumbsUp(message);\n }\n };\n\n const handleThumbsDown = () => {\n if (onThumbsDown && message) {\n onThumbsDown(message);\n }\n };\n\n const LoadingIcon = () => <span>{icons.activityIcon}</span>;\n\n return (\n <>\n {(message || isLoading) && (\n <div className=\"copilotKitMessage copilotKitAssistantMessage\">\n {message && <Markdown content={message || \"\"} />}\n {isLoading && <LoadingIcon />}\n\n {message && !isLoading && (\n <div\n className={`copilotKitMessageControls ${isCurrentMessage ? \"currentMessage\" : \"\"}`}\n >\n <button\n className=\"copilotKitMessageControlButton\"\n onClick={handleRegenerate}\n aria-label={labels.regenerateResponse}\n title={labels.regenerateResponse}\n >\n {icons.regenerateIcon}\n </button>\n <button\n className=\"copilotKitMessageControlButton\"\n onClick={handleCopy}\n aria-label={labels.copyToClipboard}\n title={labels.copyToClipboard}\n >\n {copied ? (\n <span style={{ fontSize: \"10px\", fontWeight: \"bold\" }}>✓</span>\n ) : (\n icons.copyIcon\n )}\n </button>\n {onThumbsUp && (\n <button\n className=\"copilotKitMessageControlButton\"\n onClick={handleThumbsUp}\n aria-label={labels.thumbsUp}\n title={labels.thumbsUp}\n >\n {icons.thumbsUpIcon}\n </button>\n )}\n {onThumbsDown && (\n <button\n className=\"copilotKitMessageControlButton\"\n onClick={handleThumbsDown}\n aria-label={labels.thumbsDown}\n title={labels.thumbsDown}\n >\n {icons.thumbsDownIcon}\n </button>\n )}\n </div>\n )}\n </div>\n )}\n <div style={{ marginBottom: \"0.5rem\" }}>{subComponent}</div>\n </>\n );\n};\n"],"mappings":";;;;;;;;AAGA,SAAS,gBAAgB;AA+CG,SAGxB,UAHwB,KAUhB,YAVgB;AA7CrB,IAAM,mBAAmB,CAAC,UAAiC;AAChE,QAAM,EAAE,OAAO,OAAO,IAAI,eAAe;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,aAAa,MAAM;AACvB,QAAI,WAAW,QAAQ;AACrB,gBAAU,UAAU,UAAU,OAAO;AACrC,gBAAU,IAAI;AACd,aAAO,OAAO;AACd,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC,WAAW,SAAS;AAClB,gBAAU,UAAU,UAAU,OAAO;AACrC,gBAAU,IAAI;AACd,iBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,IACzC;AAAA,EACF;AAEA,QAAM,mBAAmB,MAAM;AAC7B,QAAI,cAAc;AAChB,mBAAa;AAAA,IACf;AAAA,EACF;AAEA,QAAM,iBAAiB,MAAM;AAC3B,QAAI,cAAc,SAAS;AACzB,iBAAW,OAAO;AAAA,IACpB;AAAA,EACF;AAEA,QAAM,mBAAmB,MAAM;AAC7B,QAAI,gBAAgB,SAAS;AAC3B,mBAAa,OAAO;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,oBAAC,UAAM,gBAAM,cAAa;AAEpD,SACE,iCACI;AAAA,gBAAW,cACX,qBAAC,SAAI,WAAU,gDACZ;AAAA,iBAAW,oBAAC,YAAS,SAAS,WAAW,IAAI;AAAA,MAC7C,aAAa,oBAAC,eAAY;AAAA,MAE1B,WAAW,CAAC,aACX;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,6BAA6B,mBAAmB,mBAAmB;AAAA,UAE9E;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAY,OAAO;AAAA,gBACnB,OAAO,OAAO;AAAA,gBAEb,gBAAM;AAAA;AAAA,YACT;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAY,OAAO;AAAA,gBACnB,OAAO,OAAO;AAAA,gBAEb,mBACC,oBAAC,UAAK,OAAO,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,oBAAC,IAExD,MAAM;AAAA;AAAA,YAEV;AAAA,YACC,cACC;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAY,OAAO;AAAA,gBACnB,OAAO,OAAO;AAAA,gBAEb,gBAAM;AAAA;AAAA,YACT;AAAA,YAED,gBACC;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAY,OAAO;AAAA,gBACnB,OAAO,OAAO;AAAA,gBAEb,gBAAM;AAAA;AAAA,YACT;AAAA;AAAA;AAAA,MAEJ;AAAA,OAEJ;AAAA,IAEF,oBAAC,SAAI,OAAO,EAAE,cAAc,SAAS,GAAI,wBAAa;AAAA,KACxD;AAEJ;","names":[]}
|