@agentscope-ai/chat 1.1.39 → 1.1.41-beta.1764749089549

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/bin/starter_webui.zip +0 -0
  2. package/components/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder.tsx +8 -4
  3. package/components/ImageGenerator/index.tsx +1 -1
  4. package/components/Markdown/Markdown.tsx +105 -0
  5. package/components/Markdown/{Markdown/defaultComponents → core/components}/CodeBlock.tsx +1 -1
  6. package/components/Markdown/core/components/Null.tsx +1 -0
  7. package/components/Markdown/core/components/Raw.tsx +18 -0
  8. package/components/Markdown/{Markdown → core}/hooks/useCitationsData.tsx +3 -7
  9. package/components/Markdown/core/hooks/useCursorContent.tsx +15 -0
  10. package/components/Markdown/{Markdown/hooks/useTyping.ts → core/hooks/useTyping.tsx} +4 -1
  11. package/components/Markdown/core/index.tsx +18 -0
  12. package/components/Markdown/{plugins → core/plugins}/citations/CitationComponent.tsx +5 -3
  13. package/components/Markdown/{plugins → core/plugins}/citations/index.tsx +3 -4
  14. package/components/Markdown/{plugins → core/plugins}/cursor/Underline.tsx +1 -1
  15. package/components/Markdown/{plugins → core/plugins}/cursor/index.tsx +8 -8
  16. package/components/Markdown/demo/cursor.tsx +2 -3
  17. package/components/Markdown/index.en-US.md +1 -2
  18. package/components/Markdown/index.tsx +6 -0
  19. package/components/Markdown/index.zh-CN.md +1 -2
  20. package/components/Markdown/{Markdown/style.ts → styles.ts} +12 -21
  21. package/components/Markdown/types.tsx +94 -0
  22. package/components/index.ts +1 -3
  23. package/lib/AgentScopeRuntimeWebUI/core/AgentScopeRuntime/Response/Builder.js +5 -3
  24. package/lib/ImageGenerator/index.js +1 -1
  25. package/lib/Markdown/Markdown.d.ts +4 -0
  26. package/lib/Markdown/Markdown.js +110 -0
  27. package/lib/Markdown/core/components/Null.d.ts +2 -0
  28. package/lib/Markdown/core/components/Null.js +3 -0
  29. package/lib/Markdown/core/components/Raw.d.ts +8 -0
  30. package/lib/Markdown/core/components/Raw.js +13 -0
  31. package/lib/Markdown/core/hooks/useCitationsData.d.ts +6 -0
  32. package/lib/Markdown/{Markdown → core}/hooks/useCitationsData.js +1 -1
  33. package/lib/Markdown/core/hooks/useCursorContent.d.ts +4 -0
  34. package/lib/Markdown/core/hooks/useCursorContent.js +14 -0
  35. package/lib/Markdown/core/hooks/useTyping.d.ts +5 -0
  36. package/lib/Markdown/{Markdown → core}/hooks/useTyping.js +3 -2
  37. package/lib/Markdown/core/index.d.ts +2 -0
  38. package/lib/Markdown/{Markdown/hooks/useAnimation.js → core/index.js} +23 -23
  39. package/lib/Markdown/{plugins → core/plugins}/citations/CitationComponent.js +5 -5
  40. package/lib/Markdown/{plugins → core/plugins}/citations/index.d.ts +1 -2
  41. package/lib/Markdown/{plugins → core/plugins}/citations/index.js +1 -1
  42. package/lib/Markdown/{plugins → core/plugins}/cursor/Dot.js +1 -1
  43. package/lib/Markdown/{plugins → core/plugins}/cursor/Underline.js +1 -1
  44. package/lib/Markdown/{plugins → core/plugins}/cursor/index.js +4 -4
  45. package/lib/Markdown/index.d.ts +2 -1
  46. package/lib/Markdown/styles.js +32 -0
  47. package/lib/Markdown/types.d.ts +78 -0
  48. package/lib/index.d.ts +0 -2
  49. package/lib/index.js +0 -2
  50. package/package.json +7 -31
  51. package/components/AGUI/components/HelpModal/icons.tsx +0 -68
  52. package/components/AGUI/components/HelpModal/index.tsx +0 -1
  53. package/components/AGUI/components/HelpModal/modal.tsx +0 -101
  54. package/components/AGUI/components/chat/Button.tsx +0 -18
  55. package/components/AGUI/components/chat/Chat.tsx +0 -780
  56. package/components/AGUI/components/chat/ChatContext.tsx +0 -248
  57. package/components/AGUI/components/chat/CodeBlock.tsx +0 -406
  58. package/components/AGUI/components/chat/Header.tsx +0 -22
  59. package/components/AGUI/components/chat/Icons.tsx +0 -237
  60. package/components/AGUI/components/chat/ImageUploadQueue.tsx +0 -77
  61. package/components/AGUI/components/chat/Input.tsx +0 -24
  62. package/components/AGUI/components/chat/Markdown.tsx +0 -134
  63. package/components/AGUI/components/chat/Messages.tsx +0 -259
  64. package/components/AGUI/components/chat/Modal.tsx +0 -133
  65. package/components/AGUI/components/chat/Popup.tsx +0 -57
  66. package/components/AGUI/components/chat/PoweredByTag.tsx +0 -29
  67. package/components/AGUI/components/chat/Sidebar.tsx +0 -74
  68. package/components/AGUI/components/chat/Suggestion.tsx +0 -132
  69. package/components/AGUI/components/chat/Suggestions.tsx +0 -20
  70. package/components/AGUI/components/chat/Textarea.tsx +0 -61
  71. package/components/AGUI/components/chat/Window.tsx +0 -152
  72. package/components/AGUI/components/chat/index.tsx +0 -11
  73. package/components/AGUI/components/chat/messages/AssistantMessage.tsx +0 -69
  74. package/components/AGUI/components/chat/messages/RenderActionExecutionMessage.tsx +0 -129
  75. package/components/AGUI/components/chat/messages/RenderAgentStateMessage.tsx +0 -116
  76. package/components/AGUI/components/chat/messages/RenderImageMessage.tsx +0 -64
  77. package/components/AGUI/components/chat/messages/RenderResultMessage.tsx +0 -26
  78. package/components/AGUI/components/chat/messages/RenderTextMessage.tsx +0 -51
  79. package/components/AGUI/components/chat/messages/UserMessage.tsx +0 -10
  80. package/components/AGUI/components/chat/props.ts +0 -186
  81. package/components/AGUI/components/index.ts +0 -1
  82. package/components/AGUI/context/index.ts +0 -1
  83. package/components/AGUI/hooks/index.ts +0 -1
  84. package/components/AGUI/hooks/use-copilot-chat-suggestions.tsx +0 -122
  85. package/components/AGUI/hooks/use-copy-to-clipboard.tsx +0 -29
  86. package/components/AGUI/hooks/use-dark-mode.ts +0 -10
  87. package/components/AGUI/hooks/use-push-to-talk.tsx +0 -166
  88. package/components/AGUI/index.tsx +0 -4
  89. package/components/AGUI/lib/utils.test.ts +0 -7
  90. package/components/AGUI/lib/utils.ts +0 -27
  91. package/components/AGUI/styles.css +0 -0
  92. package/components/AGUI/types/css.ts +0 -0
  93. package/components/AGUI/types/index.ts +0 -1
  94. package/components/AGUI/types/suggestions.ts +0 -6
  95. package/components/Markdown/Markdown/AnimationNode.tsx +0 -89
  96. package/components/Markdown/Markdown/Markdown.tsx +0 -61
  97. package/components/Markdown/Markdown/core/Parser.ts +0 -52
  98. package/components/Markdown/Markdown/core/Renderer.ts +0 -121
  99. package/components/Markdown/Markdown/core/index.ts +0 -4
  100. package/components/Markdown/Markdown/hooks/index.ts +0 -4
  101. package/components/Markdown/Markdown/hooks/useAnimation.tsx +0 -27
  102. package/components/Markdown/Markdown/hooks/useStreaming.ts +0 -503
  103. package/components/Markdown/Markdown/index.tsx +0 -198
  104. package/components/Markdown/Markdown/interface.ts +0 -217
  105. package/components/Markdown/demo/typing.tsx +0 -82
  106. package/components/Markdown/index.ts +0 -1
  107. package/components/Markdown/plugins/latex/index.ts +0 -109
  108. package/components/Markdown/plugins/type.ts +0 -71
  109. package/lib/AGUI/components/HelpModal/icons.d.ts +0 -5
  110. package/lib/AGUI/components/HelpModal/icons.js +0 -84
  111. package/lib/AGUI/components/HelpModal/index.d.ts +0 -1
  112. package/lib/AGUI/components/HelpModal/index.js +0 -1
  113. package/lib/AGUI/components/HelpModal/modal.d.ts +0 -1
  114. package/lib/AGUI/components/HelpModal/modal.js +0 -104
  115. package/lib/AGUI/components/chat/Button.d.ts +0 -2
  116. package/lib/AGUI/components/chat/Button.js +0 -27
  117. package/lib/AGUI/components/chat/Chat.d.ts +0 -242
  118. package/lib/AGUI/components/chat/Chat.js +0 -634
  119. package/lib/AGUI/components/chat/ChatContext.d.ts +0 -142
  120. package/lib/AGUI/components/chat/ChatContext.js +0 -75
  121. package/lib/AGUI/components/chat/CodeBlock.d.ts +0 -12
  122. package/lib/AGUI/components/chat/CodeBlock.js +0 -398
  123. package/lib/AGUI/components/chat/Header.d.ts +0 -2
  124. package/lib/AGUI/components/chat/Header.js +0 -28
  125. package/lib/AGUI/components/chat/Icons.d.ts +0 -16
  126. package/lib/AGUI/components/chat/Icons.js +0 -247
  127. package/lib/AGUI/components/chat/ImageUploadQueue.d.ts +0 -11
  128. package/lib/AGUI/components/chat/ImageUploadQueue.js +0 -65
  129. package/lib/AGUI/components/chat/Input.d.ts +0 -2
  130. package/lib/AGUI/components/chat/Input.js +0 -30
  131. package/lib/AGUI/components/chat/Markdown.d.ts +0 -7
  132. package/lib/AGUI/components/chat/Markdown.js +0 -187
  133. package/lib/AGUI/components/chat/Messages.d.ts +0 -7
  134. package/lib/AGUI/components/chat/Messages.js +0 -242
  135. package/lib/AGUI/components/chat/Modal.d.ts +0 -43
  136. package/lib/AGUI/components/chat/Modal.js +0 -113
  137. package/lib/AGUI/components/chat/Popup.d.ts +0 -49
  138. package/lib/AGUI/components/chat/Popup.js +0 -64
  139. package/lib/AGUI/components/chat/PoweredByTag.d.ts +0 -3
  140. package/lib/AGUI/components/chat/PoweredByTag.js +0 -27
  141. package/lib/AGUI/components/chat/Sidebar.d.ts +0 -2
  142. package/lib/AGUI/components/chat/Sidebar.js +0 -85
  143. package/lib/AGUI/components/chat/Suggestion.d.ts +0 -16
  144. package/lib/AGUI/components/chat/Suggestion.js +0 -146
  145. package/lib/AGUI/components/chat/Suggestions.d.ts +0 -2
  146. package/lib/AGUI/components/chat/Suggestions.js +0 -21
  147. package/lib/AGUI/components/chat/Textarea.d.ts +0 -11
  148. package/lib/AGUI/components/chat/Textarea.js +0 -60
  149. package/lib/AGUI/components/chat/Window.d.ts +0 -2
  150. package/lib/AGUI/components/chat/Window.js +0 -115
  151. package/lib/AGUI/components/chat/index.d.ts +0 -11
  152. package/lib/AGUI/components/chat/index.js +0 -11
  153. package/lib/AGUI/components/chat/messages/AssistantMessage.d.ts +0 -2
  154. package/lib/AGUI/components/chat/messages/AssistantMessage.js +0 -56
  155. package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.d.ts +0 -2
  156. package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.js +0 -114
  157. package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.d.ts +0 -2
  158. package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.js +0 -97
  159. package/lib/AGUI/components/chat/messages/RenderImageMessage.d.ts +0 -2
  160. package/lib/AGUI/components/chat/messages/RenderImageMessage.js +0 -61
  161. package/lib/AGUI/components/chat/messages/RenderResultMessage.d.ts +0 -2
  162. package/lib/AGUI/components/chat/messages/RenderResultMessage.js +0 -27
  163. package/lib/AGUI/components/chat/messages/RenderTextMessage.d.ts +0 -2
  164. package/lib/AGUI/components/chat/messages/RenderTextMessage.js +0 -47
  165. package/lib/AGUI/components/chat/messages/UserMessage.d.ts +0 -2
  166. package/lib/AGUI/components/chat/messages/UserMessage.js +0 -9
  167. package/lib/AGUI/components/chat/props.d.ts +0 -157
  168. package/lib/AGUI/components/index.d.ts +0 -1
  169. package/lib/AGUI/components/index.js +0 -1
  170. package/lib/AGUI/context/index.d.ts +0 -1
  171. package/lib/AGUI/context/index.js +0 -1
  172. package/lib/AGUI/hooks/index.d.ts +0 -1
  173. package/lib/AGUI/hooks/index.js +0 -1
  174. package/lib/AGUI/hooks/use-copilot-chat-suggestions.d.ts +0 -87
  175. package/lib/AGUI/hooks/use-copilot-chat-suggestions.js +0 -95
  176. package/lib/AGUI/hooks/use-copy-to-clipboard.d.ts +0 -7
  177. package/lib/AGUI/hooks/use-copy-to-clipboard.js +0 -34
  178. package/lib/AGUI/hooks/use-dark-mode.d.ts +0 -1
  179. package/lib/AGUI/hooks/use-dark-mode.js +0 -4
  180. package/lib/AGUI/hooks/use-push-to-talk.d.ts +0 -16
  181. package/lib/AGUI/hooks/use-push-to-talk.js +0 -260
  182. package/lib/AGUI/index.d.ts +0 -4
  183. package/lib/AGUI/index.js +0 -4
  184. package/lib/AGUI/lib/utils.d.ts +0 -2
  185. package/lib/AGUI/lib/utils.js +0 -52
  186. package/lib/AGUI/styles.css +0 -0
  187. package/lib/AGUI/types/css.d.ts +0 -0
  188. package/lib/AGUI/types/css.js +0 -0
  189. package/lib/AGUI/types/index.d.ts +0 -1
  190. package/lib/AGUI/types/index.js +0 -1
  191. package/lib/AGUI/types/suggestions.d.ts +0 -6
  192. package/lib/AGUI/types/suggestions.js +0 -1
  193. package/lib/Markdown/Markdown/AnimationNode.d.ts +0 -20
  194. package/lib/Markdown/Markdown/AnimationNode.js +0 -84
  195. package/lib/Markdown/Markdown/Markdown.d.ts +0 -4
  196. package/lib/Markdown/Markdown/Markdown.js +0 -58
  197. package/lib/Markdown/Markdown/core/Parser.d.ts +0 -16
  198. package/lib/Markdown/Markdown/core/Parser.js +0 -65
  199. package/lib/Markdown/Markdown/core/Renderer.d.ts +0 -24
  200. package/lib/Markdown/Markdown/core/Renderer.js +0 -137
  201. package/lib/Markdown/Markdown/core/index.d.ts +0 -3
  202. package/lib/Markdown/Markdown/core/index.js +0 -3
  203. package/lib/Markdown/Markdown/hooks/index.d.ts +0 -3
  204. package/lib/Markdown/Markdown/hooks/index.js +0 -3
  205. package/lib/Markdown/Markdown/hooks/useAnimation.d.ts +0 -4
  206. package/lib/Markdown/Markdown/hooks/useCitationsData.d.ts +0 -7
  207. package/lib/Markdown/Markdown/hooks/useStreaming.d.ts +0 -3
  208. package/lib/Markdown/Markdown/hooks/useStreaming.js +0 -521
  209. package/lib/Markdown/Markdown/hooks/useTyping.d.ts +0 -4
  210. package/lib/Markdown/Markdown/index.d.ts +0 -84
  211. package/lib/Markdown/Markdown/index.js +0 -161
  212. package/lib/Markdown/Markdown/interface.d.ts +0 -203
  213. package/lib/Markdown/Markdown/interface.js +0 -1
  214. package/lib/Markdown/Markdown/style.js +0 -32
  215. package/lib/Markdown/plugins/latex/index.d.ts +0 -9
  216. package/lib/Markdown/plugins/latex/index.js +0 -97
  217. package/lib/Markdown/plugins/type.d.ts +0 -60
  218. package/lib/Markdown/plugins/type.js +0 -1
  219. /package/components/Markdown/{Markdown/defaultComponents/DisabledImage.tsx → core/components/DisableImage.tsx} +0 -0
  220. /package/components/Markdown/{Markdown/defaultComponents → core/components}/Media.tsx +0 -0
  221. /package/components/Markdown/{plugins → core/plugins}/cursor/Dot.tsx +0 -0
  222. /package/lib/Markdown/{Markdown/defaultComponents → core/components}/CodeBlock.d.ts +0 -0
  223. /package/lib/Markdown/{Markdown/defaultComponents → core/components}/CodeBlock.js +0 -0
  224. /package/lib/Markdown/{Markdown/defaultComponents/DisabledImage.d.ts → core/components/DisableImage.d.ts} +0 -0
  225. /package/lib/Markdown/{Markdown/defaultComponents/DisabledImage.js → core/components/DisableImage.js} +0 -0
  226. /package/lib/Markdown/{Markdown/defaultComponents → core/components}/Media.d.ts +0 -0
  227. /package/lib/Markdown/{Markdown/defaultComponents → core/components}/Media.js +0 -0
  228. /package/lib/Markdown/{plugins → core/plugins}/citations/CitationComponent.d.ts +0 -0
  229. /package/lib/Markdown/{plugins → core/plugins}/cursor/Dot.d.ts +0 -0
  230. /package/lib/Markdown/{plugins → core/plugins}/cursor/Underline.d.ts +0 -0
  231. /package/lib/Markdown/{plugins → core/plugins}/cursor/index.d.ts +0 -0
  232. /package/lib/Markdown/{Markdown/style.d.ts → styles.d.ts} +0 -0
  233. /package/lib/{AGUI/components/chat/props.js → Markdown/types.js} +0 -0
@@ -1,247 +0,0 @@
1
- import React from "react";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { jsxs as _jsxs } from "react/jsx-runtime";
4
- export var OpenIcon = /*#__PURE__*/_jsx("svg", {
5
- xmlns: "http://www.w3.org/2000/svg",
6
- viewBox: "0 0 24 24",
7
- fill: "currentColor",
8
- width: "24",
9
- height: "24",
10
- children: /*#__PURE__*/_jsx("g", {
11
- transform: "translate(24, 0) scale(-1, 1)",
12
- children: /*#__PURE__*/_jsx("path", {
13
- fillRule: "evenodd",
14
- d: "M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z",
15
- clipRule: "evenodd"
16
- })
17
- })
18
- });
19
- export var CloseIcon = /*#__PURE__*/_jsx("svg", {
20
- xmlns: "http://www.w3.org/2000/svg",
21
- fill: "none",
22
- viewBox: "0 0 24 24",
23
- strokeWidth: "1.5",
24
- stroke: "currentColor",
25
- width: "24",
26
- height: "24",
27
- children: /*#__PURE__*/_jsx("path", {
28
- strokeLinecap: "round",
29
- strokeLinejoin: "round",
30
- d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
31
- })
32
- });
33
- export var HeaderCloseIcon = /*#__PURE__*/_jsx("svg", {
34
- xmlns: "http://www.w3.org/2000/svg",
35
- fill: "none",
36
- viewBox: "0 0 24 24",
37
- strokeWidth: "1.5",
38
- stroke: "currentColor",
39
- width: "24",
40
- height: "24",
41
- children: /*#__PURE__*/_jsx("path", {
42
- strokeLinecap: "round",
43
- strokeLinejoin: "round",
44
- d: "M6 18L18 6M6 6l12 12"
45
- })
46
- });
47
- export var SendIcon = /*#__PURE__*/_jsx("svg", {
48
- xmlns: "http://www.w3.org/2000/svg",
49
- fill: "none",
50
- viewBox: "0 0 24 24",
51
- strokeWidth: "1.5",
52
- stroke: "currentColor",
53
- width: "24",
54
- height: "24",
55
- children: /*#__PURE__*/_jsx("path", {
56
- strokeLinecap: "round",
57
- strokeLinejoin: "round",
58
- d: "M12 19V5m0 0l-7 7m7-7l7 7"
59
- })
60
- });
61
- export var MicrophoneIcon = /*#__PURE__*/_jsx("svg", {
62
- xmlns: "http://www.w3.org/2000/svg",
63
- fill: "none",
64
- viewBox: "0 0 24 24",
65
- strokeWidth: "1.5",
66
- stroke: "currentColor",
67
- width: "24",
68
- height: "24",
69
- children: /*#__PURE__*/_jsx("path", {
70
- strokeLinecap: "round",
71
- strokeLinejoin: "round",
72
- d: "M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"
73
- })
74
- });
75
- export var StopIcon = /*#__PURE__*/_jsx("svg", {
76
- xmlns: "http://www.w3.org/2000/svg",
77
- fill: "none",
78
- viewBox: "0 0 24 24",
79
- strokeWidth: "1.5",
80
- stroke: "currentColor",
81
- width: "24",
82
- height: "24",
83
- children: /*#__PURE__*/_jsx("path", {
84
- strokeLinecap: "round",
85
- strokeLinejoin: "round",
86
- d: "M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"
87
- })
88
- });
89
- export var RegenerateIcon = /*#__PURE__*/_jsx("svg", {
90
- xmlns: "http://www.w3.org/2000/svg",
91
- fill: "none",
92
- viewBox: "0 0 24 24",
93
- strokeWidth: "2",
94
- stroke: "currentColor",
95
- width: "16",
96
- height: "16",
97
- style: {
98
- minWidth: "16px",
99
- minHeight: "16px"
100
- },
101
- children: /*#__PURE__*/_jsx("path", {
102
- strokeLinecap: "round",
103
- strokeLinejoin: "round",
104
- d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"
105
- })
106
- });
107
- export var CopyIcon = /*#__PURE__*/_jsx("svg", {
108
- xmlns: "http://www.w3.org/2000/svg",
109
- fill: "none",
110
- viewBox: "0 0 24 24",
111
- strokeWidth: "2",
112
- stroke: "currentColor",
113
- width: "16",
114
- height: "16",
115
- style: {
116
- minWidth: "16px",
117
- minHeight: "16px"
118
- },
119
- children: /*#__PURE__*/_jsx("path", {
120
- strokeLinecap: "round",
121
- strokeLinejoin: "round",
122
- d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"
123
- })
124
- });
125
- export var SmallSpinnerIcon = /*#__PURE__*/_jsx("span", {
126
- className: "copilotKitSpinner",
127
- style: {
128
- width: "13px",
129
- height: "13px"
130
- }
131
- });
132
- export var SpinnerIcon = /*#__PURE__*/_jsx("span", {
133
- className: "copilotKitSpinner",
134
- style: {
135
- width: "24px",
136
- height: "24px"
137
- }
138
- });
139
- export var ActivityIcon = /*#__PURE__*/_jsxs("div", {
140
- style: {
141
- display: "flex",
142
- alignItems: "center",
143
- gap: "4px"
144
- },
145
- children: [/*#__PURE__*/_jsx("span", {
146
- className: "copilotKitActivityDot",
147
- style: {
148
- animationDelay: "0s"
149
- }
150
- }), /*#__PURE__*/_jsx("span", {
151
- className: "copilotKitActivityDot",
152
- style: {
153
- animationDelay: "0.2s"
154
- }
155
- }), /*#__PURE__*/_jsx("span", {
156
- className: "copilotKitActivityDot",
157
- style: {
158
- animationDelay: "0.4s"
159
- }
160
- })]
161
- });
162
- export var ThumbsUpIcon = /*#__PURE__*/_jsx("svg", {
163
- xmlns: "http://www.w3.org/2000/svg",
164
- fill: "none",
165
- viewBox: "0 0 24 24",
166
- strokeWidth: "2",
167
- stroke: "currentColor",
168
- width: "16",
169
- height: "16",
170
- style: {
171
- minWidth: "16px",
172
- minHeight: "16px"
173
- },
174
- children: /*#__PURE__*/_jsx("path", {
175
- strokeLinecap: "round",
176
- strokeLinejoin: "round",
177
- d: "M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"
178
- })
179
- });
180
- export var ThumbsDownIcon = /*#__PURE__*/_jsx("svg", {
181
- xmlns: "http://www.w3.org/2000/svg",
182
- fill: "none",
183
- viewBox: "0 0 24 24",
184
- strokeWidth: "2",
185
- stroke: "currentColor",
186
- width: "16",
187
- height: "16",
188
- style: {
189
- minWidth: "16px",
190
- minHeight: "16px"
191
- },
192
- children: /*#__PURE__*/_jsx("path", {
193
- strokeLinecap: "round",
194
- strokeLinejoin: "round",
195
- d: "M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"
196
- })
197
- });
198
- export var DownloadIcon = /*#__PURE__*/_jsx("svg", {
199
- xmlns: "http://www.w3.org/2000/svg",
200
- fill: "none",
201
- viewBox: "0 0 24 24",
202
- strokeWidth: "2",
203
- stroke: "currentColor",
204
- width: "16",
205
- height: "16",
206
- style: {
207
- minWidth: "16px",
208
- minHeight: "16px"
209
- },
210
- children: /*#__PURE__*/_jsx("path", {
211
- strokeLinecap: "round",
212
- strokeLinejoin: "round",
213
- d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"
214
- })
215
- });
216
- export var UploadIcon = /*#__PURE__*/_jsx("svg", {
217
- xmlns: "http://www.w3.org/2000/svg",
218
- fill: "none",
219
- viewBox: "0 0 24 24",
220
- strokeWidth: "1.5",
221
- stroke: "currentColor",
222
- width: "24",
223
- height: "24",
224
- children: /*#__PURE__*/_jsx("path", {
225
- strokeLinecap: "round",
226
- strokeLinejoin: "round",
227
- d: "M12 4.5v15m7.5-7.5h-15"
228
- })
229
- });
230
- export var CheckIcon = /*#__PURE__*/_jsx("svg", {
231
- xmlns: "http://www.w3.org/2000/svg",
232
- fill: "none",
233
- viewBox: "0 0 24 24",
234
- strokeWidth: "2",
235
- stroke: "currentColor",
236
- width: "16",
237
- height: "16",
238
- style: {
239
- minWidth: "16px",
240
- minHeight: "16px"
241
- },
242
- children: /*#__PURE__*/_jsx("path", {
243
- strokeLinecap: "round",
244
- strokeLinejoin: "round",
245
- d: "M4.5 12.75l6 6 9-13.5"
246
- })
247
- });
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- interface ImageUploadQueueProps {
3
- images: Array<{
4
- contentType: string;
5
- bytes: string;
6
- }>;
7
- onRemoveImage: (index: number) => void;
8
- className?: string;
9
- }
10
- export declare const ImageUploadQueue: React.FC<ImageUploadQueueProps>;
11
- export {};
@@ -1,65 +0,0 @@
1
- import React from "react";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { jsxs as _jsxs } from "react/jsx-runtime";
4
- export var ImageUploadQueue = function ImageUploadQueue(_ref) {
5
- var images = _ref.images,
6
- onRemoveImage = _ref.onRemoveImage,
7
- _ref$className = _ref.className,
8
- className = _ref$className === void 0 ? "" : _ref$className;
9
- if (images.length === 0) return null;
10
- return /*#__PURE__*/_jsx("div", {
11
- className: "copilotKitImageUploadQueue ".concat(className),
12
- style: {
13
- display: "flex",
14
- flexWrap: "wrap",
15
- gap: "8px",
16
- margin: "8px",
17
- padding: "8px"
18
- },
19
- children: images.map(function (image, index) {
20
- return /*#__PURE__*/_jsxs("div", {
21
- className: "copilotKitImageUploadQueueItem",
22
- style: {
23
- position: "relative",
24
- display: "inline-block",
25
- width: "60px",
26
- height: "60px",
27
- borderRadius: "4px",
28
- overflow: "hidden"
29
- },
30
- children: [/*#__PURE__*/_jsx("img", {
31
- src: "data:".concat(image.contentType, ";base64,").concat(image.bytes),
32
- alt: "Selected image ".concat(index + 1),
33
- style: {
34
- width: "100%",
35
- height: "100%",
36
- objectFit: "cover"
37
- }
38
- }), /*#__PURE__*/_jsx("button", {
39
- onClick: function onClick() {
40
- return onRemoveImage(index);
41
- },
42
- className: "copilotKitImageUploadQueueRemoveButton",
43
- style: {
44
- position: "absolute",
45
- top: "2px",
46
- right: "2px",
47
- background: "rgba(0,0,0,0.6)",
48
- color: "white",
49
- border: "none",
50
- borderRadius: "50%",
51
- width: "18px",
52
- height: "18px",
53
- display: "flex",
54
- alignItems: "center",
55
- justifyContent: "center",
56
- cursor: "pointer",
57
- fontSize: "10px",
58
- padding: 0
59
- },
60
- children: "\u2715"
61
- })]
62
- }, index);
63
- })
64
- });
65
- };
@@ -1,2 +0,0 @@
1
- import { InputProps } from "./props";
2
- export declare const Input: ({ inProgress, onSend, onStop, }: InputProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,30 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React, { useState } from "react";
8
- import { ChatInput } from "../../..";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- export var Input = function Input(_ref) {
11
- var inProgress = _ref.inProgress,
12
- onSend = _ref.onSend,
13
- onStop = _ref.onStop;
14
- var _useState = useState(""),
15
- _useState2 = _slicedToArray(_useState, 2),
16
- text = _useState2[0],
17
- setText = _useState2[1];
18
- var send = function send() {
19
- if (inProgress) return;
20
- onSend(text);
21
- setText("");
22
- };
23
- return /*#__PURE__*/_jsx(ChatInput, {
24
- value: text,
25
- onChange: setText,
26
- onSubmit: send,
27
- loading: inProgress,
28
- onCancel: onStop
29
- });
30
- };
@@ -1,7 +0,0 @@
1
- import { Components } from "react-markdown";
2
- type MarkdownProps = {
3
- content: string;
4
- components?: Components;
5
- };
6
- export declare const Markdown: ({ content, components }: MarkdownProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,187 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children"],
3
- _excluded2 = ["children", "className", "inline"],
4
- _excluded3 = ["children"],
5
- _excluded4 = ["children"],
6
- _excluded5 = ["children"],
7
- _excluded6 = ["children"],
8
- _excluded7 = ["children"],
9
- _excluded8 = ["children"],
10
- _excluded9 = ["children"],
11
- _excluded10 = ["children"],
12
- _excluded11 = ["children"],
13
- _excluded12 = ["children"],
14
- _excluded13 = ["children"];
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
- import { memo } from "react";
23
- import ReactMarkdown from "react-markdown";
24
- import { CodeBlock } from "./CodeBlock";
25
- import remarkGfm from "remark-gfm";
26
- import remarkMath from "remark-math";
27
- import rehypeRaw from "rehype-raw";
28
- import { jsx as _jsx } from "react/jsx-runtime";
29
- var defaultComponents = {
30
- a: function a(_ref) {
31
- var children = _ref.children,
32
- props = _objectWithoutProperties(_ref, _excluded);
33
- return /*#__PURE__*/_jsx("a", _objectSpread(_objectSpread({
34
- className: "copilotKitMarkdownElement"
35
- }, props), {}, {
36
- target: "_blank",
37
- rel: "noopener noreferrer",
38
- children: children
39
- }));
40
- },
41
- // @ts-expect-error -- inline
42
- code: function code(_ref2) {
43
- var children = _ref2.children,
44
- className = _ref2.className,
45
- inline = _ref2.inline,
46
- props = _objectWithoutProperties(_ref2, _excluded2);
47
- if (Array.isArray(children) && children.length) {
48
- if (children[0] == "▍") {
49
- return /*#__PURE__*/_jsx("span", {
50
- style: {
51
- animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
52
- marginTop: "0.25rem"
53
- },
54
- children: "\u258D"
55
- });
56
- }
57
- children[0] = (children === null || children === void 0 ? void 0 : children[0]).replace("`▍`", "▍");
58
- }
59
- var match = /language-(\w+)/.exec(className || "");
60
- if (inline) {
61
- return /*#__PURE__*/_jsx("code", _objectSpread(_objectSpread({
62
- className: className
63
- }, props), {}, {
64
- children: children
65
- }));
66
- }
67
- return /*#__PURE__*/_jsx(CodeBlock, _objectSpread({
68
- language: match && match[1] || "",
69
- value: String(children).replace(/\n$/, "")
70
- }, props), Math.random());
71
- },
72
- h1: function h1(_ref3) {
73
- var children = _ref3.children,
74
- props = _objectWithoutProperties(_ref3, _excluded3);
75
- return /*#__PURE__*/_jsx("h1", _objectSpread(_objectSpread({
76
- className: "copilotKitMarkdownElement"
77
- }, props), {}, {
78
- children: children
79
- }));
80
- },
81
- h2: function h2(_ref4) {
82
- var children = _ref4.children,
83
- props = _objectWithoutProperties(_ref4, _excluded4);
84
- return /*#__PURE__*/_jsx("h2", _objectSpread(_objectSpread({
85
- className: "copilotKitMarkdownElement"
86
- }, props), {}, {
87
- children: children
88
- }));
89
- },
90
- h3: function h3(_ref5) {
91
- var children = _ref5.children,
92
- props = _objectWithoutProperties(_ref5, _excluded5);
93
- return /*#__PURE__*/_jsx("h3", _objectSpread(_objectSpread({
94
- className: "copilotKitMarkdownElement"
95
- }, props), {}, {
96
- children: children
97
- }));
98
- },
99
- h4: function h4(_ref6) {
100
- var children = _ref6.children,
101
- props = _objectWithoutProperties(_ref6, _excluded6);
102
- return /*#__PURE__*/_jsx("h4", _objectSpread(_objectSpread({
103
- className: "copilotKitMarkdownElement"
104
- }, props), {}, {
105
- children: children
106
- }));
107
- },
108
- h5: function h5(_ref7) {
109
- var children = _ref7.children,
110
- props = _objectWithoutProperties(_ref7, _excluded7);
111
- return /*#__PURE__*/_jsx("h5", _objectSpread(_objectSpread({
112
- className: "copilotKitMarkdownElement"
113
- }, props), {}, {
114
- children: children
115
- }));
116
- },
117
- h6: function h6(_ref8) {
118
- var children = _ref8.children,
119
- props = _objectWithoutProperties(_ref8, _excluded8);
120
- return /*#__PURE__*/_jsx("h6", _objectSpread(_objectSpread({
121
- className: "copilotKitMarkdownElement"
122
- }, props), {}, {
123
- children: children
124
- }));
125
- },
126
- p: function p(_ref9) {
127
- var children = _ref9.children,
128
- props = _objectWithoutProperties(_ref9, _excluded9);
129
- return /*#__PURE__*/_jsx("p", _objectSpread(_objectSpread({
130
- className: "copilotKitMarkdownElement"
131
- }, props), {}, {
132
- children: children
133
- }));
134
- },
135
- pre: function pre(_ref10) {
136
- var children = _ref10.children,
137
- props = _objectWithoutProperties(_ref10, _excluded10);
138
- return /*#__PURE__*/_jsx("pre", _objectSpread(_objectSpread({
139
- className: "copilotKitMarkdownElement"
140
- }, props), {}, {
141
- children: children
142
- }));
143
- },
144
- blockquote: function blockquote(_ref11) {
145
- var children = _ref11.children,
146
- props = _objectWithoutProperties(_ref11, _excluded11);
147
- return /*#__PURE__*/_jsx("blockquote", _objectSpread(_objectSpread({
148
- className: "copilotKitMarkdownElement"
149
- }, props), {}, {
150
- children: children
151
- }));
152
- },
153
- ul: function ul(_ref12) {
154
- var children = _ref12.children,
155
- props = _objectWithoutProperties(_ref12, _excluded12);
156
- return /*#__PURE__*/_jsx("ul", _objectSpread(_objectSpread({
157
- className: "copilotKitMarkdownElement"
158
- }, props), {}, {
159
- children: children
160
- }));
161
- },
162
- li: function li(_ref13) {
163
- var children = _ref13.children,
164
- props = _objectWithoutProperties(_ref13, _excluded13);
165
- return /*#__PURE__*/_jsx("li", _objectSpread(_objectSpread({
166
- className: "copilotKitMarkdownElement"
167
- }, props), {}, {
168
- children: children
169
- }));
170
- }
171
- };
172
- var MemoizedReactMarkdown = /*#__PURE__*/memo(ReactMarkdown, function (prevProps, nextProps) {
173
- return prevProps.children === nextProps.children && prevProps.components === nextProps.components;
174
- });
175
- export var Markdown = function Markdown(_ref14) {
176
- var content = _ref14.content,
177
- components = _ref14.components;
178
- return /*#__PURE__*/_jsx("div", {
179
- className: "copilotKitMarkdown",
180
- children: /*#__PURE__*/_jsx(MemoizedReactMarkdown, {
181
- components: _objectSpread(_objectSpread({}, defaultComponents), components),
182
- remarkPlugins: [remarkGfm, remarkMath],
183
- rehypePlugins: [rehypeRaw],
184
- children: content
185
- })
186
- });
187
- };
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { MessagesProps } from "./props";
3
- export declare const Messages: ({ messages, inProgress, children, RenderTextMessage, RenderActionExecutionMessage, RenderAgentStateMessage, RenderResultMessage, RenderImageMessage, AssistantMessage, UserMessage, onRegenerate, onCopy, onThumbsUp, onThumbsDown, markdownTagRenderers, }: MessagesProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare function useScrollToBottom(messages: any[]): {
5
- messagesEndRef: import("react").MutableRefObject<HTMLDivElement>;
6
- messagesContainerRef: import("react").MutableRefObject<HTMLDivElement>;
7
- };