@mcp-b/react-components 0.11.0 → 0.13.0

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 (253) hide show
  1. package/dist/{AgentChat-B9LD_WF1.d.ts → AgentChat-Br6tKEl8.d.ts} +38 -10
  2. package/dist/{BrowserLiveView-ZktFZiMD.d.ts → BrowserLiveView-BV5qgFgI.d.ts} +11 -10
  3. package/dist/{BrowserReplay-6G-mnwcn.d.ts → BrowserReplay-xWvRjRAC.d.ts} +2 -1
  4. package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
  5. package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
  6. package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
  7. package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
  8. package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
  9. package/dist/{Menu-B5vDqZe_.d.ts → Menu-Bgu-ufb5.d.ts} +29 -65
  10. package/dist/{ModelSelector-DXtpcRmT.js → ModelSelector-DVgVBdvw.js} +23 -20
  11. package/dist/{PromptInput-D6-G24p7.d.ts → PromptInput-p5KmOmt1.d.ts} +313 -89
  12. package/dist/Select-Dl_vF_Bt.d.ts +213 -0
  13. package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
  14. package/dist/ThinkChat-7DQ2CogF.js +222 -0
  15. package/dist/{ThinkChatActivity-B2UD95My.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +4 -4
  16. package/dist/ThinkChatContext-C3Eb1Xpi.d.ts +16 -0
  17. package/dist/{ThinkChatToolParts-DnUiZgCC.d.ts → ThinkChatToolParts-Cv4o7j6F.d.ts} +13 -5
  18. package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
  19. package/dist/components/Accordion.d.ts +17 -6
  20. package/dist/components/Accordion.js +23 -36
  21. package/dist/components/Activity.d.ts +5 -5
  22. package/dist/components/Activity.js +9 -9
  23. package/dist/components/AgentChat.d.ts +1 -1
  24. package/dist/components/AgentChat.js +354 -132
  25. package/dist/components/AgentConnection.js +6 -22
  26. package/dist/components/AlertDialog.d.ts +40 -32
  27. package/dist/components/AlertDialog.js +46 -39
  28. package/dist/components/Artifact.d.ts +1 -1
  29. package/dist/components/Artifact.js +5 -5
  30. package/dist/components/Autocomplete.js +10 -2
  31. package/dist/components/Avatar.d.ts +2 -2
  32. package/dist/components/Avatar.js +3 -3
  33. package/dist/components/Badge.d.ts +11 -14
  34. package/dist/components/Badge.js +11 -33
  35. package/dist/components/BrowserLiveView.d.ts +1 -1
  36. package/dist/components/BrowserLiveView.js +39 -45
  37. package/dist/components/BrowserReplay.d.ts +1 -1
  38. package/dist/components/BrowserReplay.js +4 -4
  39. package/dist/components/BrowserRunPanel.js +91 -55
  40. package/dist/components/Button.d.ts +2 -2
  41. package/dist/components/Button.js +7 -30
  42. package/dist/components/ChainOfThought.d.ts +5 -5
  43. package/dist/components/ChainOfThought.js +8 -5
  44. package/dist/components/ChatGptSignInScreen.js +3 -3
  45. package/dist/components/Checkbox.d.ts +10 -2
  46. package/dist/components/Checkbox.js +13 -6
  47. package/dist/components/CheckboxGroup.d.ts +6 -6
  48. package/dist/components/CheckboxGroup.js +6 -6
  49. package/dist/components/CodeBlock.d.ts +1 -1
  50. package/dist/components/CodeBlock.js +1 -1
  51. package/dist/components/CodexModelSelector.d.ts +58 -0
  52. package/dist/components/CodexModelSelector.js +170 -0
  53. package/dist/components/Collapsible.d.ts +2 -4
  54. package/dist/components/Collapsible.js +9 -7
  55. package/dist/components/Combobox.d.ts +2 -2
  56. package/dist/components/Combobox.js +20 -22
  57. package/dist/components/Commit.d.ts +6 -6
  58. package/dist/components/Commit.js +14 -26
  59. package/dist/components/Context.js +5 -1
  60. package/dist/components/ContextMenu.d.ts +20 -72
  61. package/dist/components/ContextMenu.js +46 -56
  62. package/dist/components/Conversation.d.ts +3 -7
  63. package/dist/components/Conversation.js +3 -4
  64. package/dist/components/Dialog.d.ts +38 -30
  65. package/dist/components/Dialog.js +46 -34
  66. package/dist/components/EnvironmentVariables.d.ts +2 -7
  67. package/dist/components/EnvironmentVariables.js +13 -36
  68. package/dist/components/Field.d.ts +3 -3
  69. package/dist/components/Field.js +7 -8
  70. package/dist/components/Fieldset.d.ts +2 -2
  71. package/dist/components/Fieldset.js +2 -2
  72. package/dist/components/FileTree.js +1 -1
  73. package/dist/components/Label.d.ts +1 -1
  74. package/dist/components/Label.js +1 -1
  75. package/dist/components/Marker.js +1 -15
  76. package/dist/components/McpServerPicker.d.ts +31 -6
  77. package/dist/components/McpServerPicker.js +136 -72
  78. package/dist/components/Menu.d.ts +2 -2
  79. package/dist/components/Menu.js +41 -51
  80. package/dist/components/Menubar.d.ts +16 -52
  81. package/dist/components/Menubar.js +44 -56
  82. package/dist/components/Message.d.ts +4 -3
  83. package/dist/components/Message.js +16 -9
  84. package/dist/components/MessageScroller.d.ts +1 -1
  85. package/dist/components/MessageScroller.js +1 -1
  86. package/dist/components/Meter.js +5 -0
  87. package/dist/components/ModelSelector.d.ts +12 -9
  88. package/dist/components/ModelSelector.js +1 -1
  89. package/dist/components/NavigationMenu.d.ts +3 -14
  90. package/dist/components/NavigationMenu.js +22 -38
  91. package/dist/components/NumberField.js +6 -0
  92. package/dist/components/Popover.d.ts +21 -44
  93. package/dist/components/Popover.js +33 -23
  94. package/dist/components/PreviewCard.d.ts +20 -18
  95. package/dist/components/PreviewCard.js +30 -20
  96. package/dist/components/PricingPage.js +30 -29
  97. package/dist/components/Progress.d.ts +7 -3
  98. package/dist/components/Progress.js +9 -4
  99. package/dist/components/PromptInput.d.ts +2 -2
  100. package/dist/components/PromptInput.js +184 -148
  101. package/dist/components/Queue.d.ts +8 -19
  102. package/dist/components/Queue.js +6 -6
  103. package/dist/components/RadioGroup.d.ts +10 -9
  104. package/dist/components/RadioGroup.js +8 -9
  105. package/dist/components/Reasoning.d.ts +4 -4
  106. package/dist/components/Reasoning.js +12 -21
  107. package/dist/components/ScrollArea.d.ts +2 -9
  108. package/dist/components/ScrollArea.js +5 -23
  109. package/dist/components/Select.d.ts +2 -2
  110. package/dist/components/Select.js +100 -134
  111. package/dist/components/Slider.d.ts +10 -7
  112. package/dist/components/Slider.js +12 -11
  113. package/dist/components/Sources.d.ts +4 -4
  114. package/dist/components/Sources.js +8 -5
  115. package/dist/components/Stepper.js +2 -8
  116. package/dist/components/Switch.d.ts +6 -3
  117. package/dist/components/Switch.js +7 -4
  118. package/dist/components/Tabs.d.ts +2 -2
  119. package/dist/components/Tabs.js +9 -4
  120. package/dist/components/Task.d.ts +4 -4
  121. package/dist/components/Task.js +10 -6
  122. package/dist/components/Terminal.d.ts +2 -2
  123. package/dist/components/Terminal.js +5 -5
  124. package/dist/components/TestResults.d.ts +4 -4
  125. package/dist/components/TestResults.js +5 -5
  126. package/dist/components/ThinkChat.d.ts +37 -30
  127. package/dist/components/ThinkChat.js +1 -152
  128. package/dist/components/ThinkChatActivity.d.ts +2 -2
  129. package/dist/components/ThinkChatActivity.js +4 -11
  130. package/dist/components/ThinkChatContext.d.ts +2 -2
  131. package/dist/components/ThinkChatContext.js +9 -2
  132. package/dist/components/ThinkChatToolPanels.d.ts +1 -1
  133. package/dist/components/ThinkChatToolPanels.js +27 -15
  134. package/dist/components/ThinkChatToolParts.d.ts +1 -1
  135. package/dist/components/ThinkExecutionWorkbench.d.ts +10 -7
  136. package/dist/components/ThinkExecutionWorkbench.js +382 -359
  137. package/dist/components/ThinkFullApp.d.ts +16 -13
  138. package/dist/components/ThinkFullApp.js +35 -25
  139. package/dist/components/ThinkThreadPicker.d.ts +1 -31
  140. package/dist/components/ThinkThreadPicker.js +32 -171
  141. package/dist/components/ThinkThreadShell.d.ts +35 -0
  142. package/dist/components/ThinkThreadShell.js +146 -0
  143. package/dist/components/Toast.js +7 -0
  144. package/dist/components/ToggleGroup.d.ts +6 -2
  145. package/dist/components/ToggleGroup.js +6 -2
  146. package/dist/components/Toolbar.js +6 -0
  147. package/dist/components/Tooltip.d.ts +36 -27
  148. package/dist/components/Tooltip.js +45 -29
  149. package/dist/components/WebPreview.d.ts +1 -1
  150. package/dist/components/WebPreview.js +3 -3
  151. package/dist/components/WorkspaceExplorer.d.ts +6 -8
  152. package/dist/components/WorkspaceExplorer.js +9 -7
  153. package/dist/components/icons.d.ts +2 -2
  154. package/dist/components/icons.js +2 -2
  155. package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
  156. package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
  157. package/dist/icons-Ba9THQKz.js +64 -0
  158. package/dist/icons-CUCz_Sft.d.ts +210 -0
  159. package/dist/merge-refs-DF_7w2x_.js +18 -0
  160. package/dist/styles/accessibility.css +14 -0
  161. package/dist/styles/accordion.css +21 -61
  162. package/dist/styles/activity.css +23 -58
  163. package/dist/styles/agent-chat.css +49 -5
  164. package/dist/styles/agent-connection.css +8 -10
  165. package/dist/styles/alert-dialog.css +20 -26
  166. package/dist/styles/artifact.css +6 -6
  167. package/dist/styles/attachment-preview.css +1 -1
  168. package/dist/styles/autocomplete.css +5 -170
  169. package/dist/styles/avatar.css +8 -8
  170. package/dist/styles/badge.css +8 -10
  171. package/dist/styles/base-ui-motion.css +176 -0
  172. package/dist/styles/base.css +19 -25
  173. package/dist/styles/browser-live-view.css +7 -7
  174. package/dist/styles/browser-replay.css +5 -5
  175. package/dist/styles/browser-run-panel.css +59 -112
  176. package/dist/styles/button.css +48 -43
  177. package/dist/styles/card.css +3 -5
  178. package/dist/styles/chain-of-thought.css +14 -70
  179. package/dist/styles/chatgpt-sign-in-screen.css +3 -3
  180. package/dist/styles/checkbox-group.css +1 -1
  181. package/dist/styles/checkbox.css +3 -7
  182. package/dist/styles/code-block.css +10 -10
  183. package/dist/styles/codex-model-selector.css +186 -0
  184. package/dist/styles/collapsible.css +11 -27
  185. package/dist/styles/combobox.css +3 -149
  186. package/dist/styles/commit.css +19 -35
  187. package/dist/styles/context-menu.css +1 -77
  188. package/dist/styles/context.css +12 -12
  189. package/dist/styles/conversation.css +7 -7
  190. package/dist/styles/dialog.css +34 -55
  191. package/dist/styles/environment-variables.css +10 -10
  192. package/dist/styles/field.css +16 -58
  193. package/dist/styles/fieldset.css +2 -2
  194. package/dist/styles/file-tree.css +7 -9
  195. package/dist/styles/index.css +12 -2
  196. package/dist/styles/input.css +1 -51
  197. package/dist/styles/label.css +2 -2
  198. package/dist/styles/marker.css +2 -4
  199. package/dist/styles/mcp-server-picker.css +66 -19
  200. package/dist/styles/menu.css +6 -153
  201. package/dist/styles/menubar.css +6 -105
  202. package/dist/styles/message-scroller.css +1 -1
  203. package/dist/styles/message.css +87 -9
  204. package/dist/styles/meter.css +4 -20
  205. package/dist/styles/model-selector.css +32 -20
  206. package/dist/styles/navigation-menu.css +14 -54
  207. package/dist/styles/number-field.css +8 -23
  208. package/dist/styles/popover.css +13 -68
  209. package/dist/styles/preview-card.css +5 -46
  210. package/dist/styles/pricing-page.css +43 -43
  211. package/dist/styles/progress.css +7 -16
  212. package/dist/styles/prompt-input.css +100 -44
  213. package/dist/styles/queue.css +12 -28
  214. package/dist/styles/radio.css +4 -8
  215. package/dist/styles/reasoning.css +3 -62
  216. package/dist/styles/recipes.css +475 -0
  217. package/dist/styles/select.css +7 -103
  218. package/dist/styles/shell.css +3 -3
  219. package/dist/styles/slider.css +5 -7
  220. package/dist/styles/sources.css +9 -66
  221. package/dist/styles/stepper.css +16 -14
  222. package/dist/styles/streamdown.css +11 -57
  223. package/dist/styles/switch.css +4 -7
  224. package/dist/styles/tabs.css +7 -8
  225. package/dist/styles/task.css +13 -42
  226. package/dist/styles/terminal.css +7 -7
  227. package/dist/styles/test-results.css +21 -37
  228. package/dist/styles/think-execution-workbench.css +337 -0
  229. package/dist/styles/think-full-app.css +27 -410
  230. package/dist/styles/think-resize-handle.css +33 -0
  231. package/dist/styles/think-thread-picker.css +18 -247
  232. package/dist/styles/think-thread-shell.css +219 -0
  233. package/dist/styles/toast.css +14 -25
  234. package/dist/styles/toggle-group.css +16 -14
  235. package/dist/styles/toggle.css +14 -15
  236. package/dist/styles/toolbar.css +13 -25
  237. package/dist/styles/tooltip.css +6 -16
  238. package/dist/styles/web-preview.css +15 -15
  239. package/dist/styles/workspace-explorer.css +21 -14
  240. package/dist/summarize-tool-input-BUJsENSn.js +12 -0
  241. package/dist/utils/codex-model-catalog.d.ts +142 -0
  242. package/dist/utils/codex-model-catalog.js +112 -0
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/package.json +8 -2
  245. package/dist/Select-CRsKCJ9x.d.ts +0 -200
  246. package/dist/ThinkChatContext-BLAAb8J5.d.ts +0 -28
  247. package/dist/components/McpServerConnections.d.ts +0 -41
  248. package/dist/components/McpServerConnections.js +0 -188
  249. package/dist/components/useStickToBottom.d.ts +0 -33
  250. package/dist/components/useStickToBottom.js +0 -107
  251. package/dist/icons-CbjtbIJK.d.ts +0 -51
  252. package/dist/icons-D2Q5n5C1.js +0 -291
  253. package/dist/styles/mcp-server-connections.css +0 -145
@@ -1,200 +0,0 @@
1
- import * as React from "react";
2
- import { Select } from "@base-ui/react/select";
3
-
4
- //#region src/components/Select.d.ts
5
- interface SelectProps extends React.ComponentPropsWithRef<typeof Select.Root> {
6
- /**
7
- * Static list of items for label resolution. Needed when options are inside
8
- * a portal (not mounted until opened) so SelectValue can display the correct
9
- * label on initial render.
10
- */
11
- items?: Array<{
12
- label: React.ReactNode;
13
- value: unknown;
14
- }>;
15
- }
16
- interface SelectTriggerProps extends Omit<Select.Trigger.Props, "className"> {
17
- className?: string;
18
- /**
19
- * The size of the select trigger.
20
- * @default 'default'
21
- */
22
- size?: "sm" | "md" | "default";
23
- }
24
- interface SelectValueProps extends Omit<Select.Value.Props, "children"> {
25
- placeholder?: string;
26
- children?: Select.Value.Props["children"];
27
- }
28
- interface SelectPortalProps extends Select.Portal.Props {}
29
- interface SelectPositionerProps extends Select.Positioner.Props {}
30
- interface SelectPopupProps extends Omit<Select.Popup.Props, "className"> {
31
- className?: string;
32
- }
33
- interface SelectListProps extends Omit<Select.List.Props, "className"> {
34
- className?: string;
35
- }
36
- interface SelectOptionProps extends Omit<Select.Item.Props, "className"> {
37
- className?: string;
38
- }
39
- interface SelectOptionGroupProps extends Omit<Select.Group.Props, "className"> {
40
- className?: string;
41
- label?: string;
42
- }
43
- type SelectItemProps = SelectOptionProps;
44
- type SelectGroupProps = SelectOptionGroupProps;
45
- interface SelectLabelProps extends Omit<Select.GroupLabel.Props, "className"> {
46
- className?: string;
47
- }
48
- interface SelectSeparatorProps extends Omit<Select.Separator.Props, "className"> {
49
- className?: string;
50
- }
51
- interface SelectScrollUpButtonProps extends Omit<Select.ScrollUpArrow.Props, "className"> {
52
- className?: string;
53
- }
54
- interface SelectScrollDownButtonProps extends Omit<Select.ScrollDownArrow.Props, "className"> {
55
- className?: string;
56
- }
57
- type SelectPlacementProps = Pick<SelectPositionerProps, "anchor" | "positionMethod" | "side" | "sideOffset" | "align" | "alignOffset" | "collisionBoundary" | "collisionPadding" | "sticky" | "arrowPadding" | "disableAnchorTracking" | "collisionAvoidance"> & {
58
- position?: "popper" | "item-aligned";
59
- };
60
- type SelectContentProps = SelectPopupProps & SelectPlacementProps;
61
- /**
62
- * A select component for choosing from a list of options.
63
- *
64
- * @example
65
- * ```tsx
66
- * <Select defaultValue="option1">
67
- * <SelectTrigger>
68
- * <SelectValue placeholder="Select..." />
69
- * </SelectTrigger>
70
- * <SelectPortal>
71
- * <SelectPositioner>
72
- * <SelectPopup>
73
- * <SelectList>
74
- * <SelectOption value="option1">Option 1</SelectOption>
75
- * <SelectOption value="option2">Option 2</SelectOption>
76
- * </SelectList>
77
- * </SelectPopup>
78
- * </SelectPositioner>
79
- * </SelectPortal>
80
- * </Select>
81
- * ```
82
- *
83
- * @see {@link https://base-ui.com/react/components/select | Base UI Select}
84
- */
85
- declare function Select$1({
86
- items,
87
- ...props
88
- }: SelectProps): React.JSX.Element;
89
- declare function SelectTrigger({
90
- size,
91
- className,
92
- children,
93
- ref,
94
- ...props
95
- }: SelectTriggerProps & {
96
- ref?: React.Ref<HTMLButtonElement>;
97
- }): React.JSX.Element;
98
- declare function SelectValue({
99
- placeholder,
100
- children,
101
- ref,
102
- ...props
103
- }: SelectValueProps & {
104
- ref?: React.Ref<HTMLSpanElement>;
105
- }): React.JSX.Element;
106
- declare const SelectPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
107
- declare function SelectPositioner({
108
- className,
109
- ref,
110
- ...props
111
- }: SelectPositionerProps & {
112
- className?: string;
113
- } & {
114
- ref?: React.Ref<HTMLDivElement>;
115
- }): React.JSX.Element;
116
- declare function SelectPopup({
117
- className,
118
- ref,
119
- ...props
120
- }: SelectPopupProps & {
121
- ref?: React.Ref<HTMLDivElement>;
122
- }): React.JSX.Element;
123
- declare function SelectContent({
124
- anchor,
125
- positionMethod,
126
- side,
127
- sideOffset,
128
- align,
129
- alignOffset,
130
- collisionBoundary,
131
- collisionPadding,
132
- sticky,
133
- arrowPadding,
134
- disableAnchorTracking,
135
- collisionAvoidance,
136
- position,
137
- children,
138
- ...props
139
- }: SelectContentProps & {
140
- ref?: React.Ref<HTMLDivElement>;
141
- }): React.JSX.Element;
142
- declare function SelectList({
143
- className,
144
- ref,
145
- ...props
146
- }: SelectListProps & {
147
- ref?: React.Ref<HTMLDivElement>;
148
- }): React.JSX.Element;
149
- declare function SelectOption({
150
- className,
151
- value,
152
- children,
153
- ref,
154
- ...props
155
- }: SelectOptionProps & {
156
- ref?: React.Ref<HTMLDivElement>;
157
- }): React.JSX.Element;
158
- declare const SelectItem: typeof SelectOption;
159
- declare function SelectOptionGroup({
160
- label,
161
- className,
162
- children,
163
- ref,
164
- ...props
165
- }: SelectOptionGroupProps & {
166
- ref?: React.Ref<HTMLDivElement>;
167
- }): React.JSX.Element;
168
- declare const SelectGroup: typeof SelectOptionGroup;
169
- declare function SelectLabel({
170
- className,
171
- ref,
172
- ...props
173
- }: SelectLabelProps & {
174
- ref?: React.Ref<HTMLDivElement>;
175
- }): React.JSX.Element;
176
- declare function SelectSeparator({
177
- className,
178
- ref,
179
- ...props
180
- }: SelectSeparatorProps & {
181
- ref?: React.Ref<HTMLDivElement>;
182
- }): React.JSX.Element;
183
- declare function SelectScrollUpButton({
184
- className,
185
- children,
186
- ref,
187
- ...props
188
- }: SelectScrollUpButtonProps & {
189
- ref?: React.Ref<HTMLDivElement>;
190
- }): React.JSX.Element;
191
- declare function SelectScrollDownButton({
192
- className,
193
- children,
194
- ref,
195
- ...props
196
- }: SelectScrollDownButtonProps & {
197
- ref?: React.Ref<HTMLDivElement>;
198
- }): React.JSX.Element;
199
- //#endregion
200
- export { SelectTriggerProps as A, SelectScrollDownButton as C, SelectSeparator as D, SelectScrollUpButtonProps as E, SelectValueProps as M, SelectSeparatorProps as O, SelectProps as S, SelectScrollUpButton as T, SelectPopupProps as _, SelectGroupProps as a, SelectPositioner as b, SelectLabel as c, SelectListProps as d, SelectOption as f, SelectPopup as g, SelectOptionProps as h, SelectGroup as i, SelectValue as j, SelectTrigger as k, SelectLabelProps as l, SelectOptionGroupProps as m, SelectContent as n, SelectItem as o, SelectOptionGroup as p, SelectContentProps as r, SelectItemProps as s, Select$1 as t, SelectList as u, SelectPortal as v, SelectScrollDownButtonProps as w, SelectPositionerProps as x, SelectPortalProps as y };
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import { useAgentChat } from "@cloudflare/think/react";
3
- import { UIMessage } from "ai";
4
-
5
- //#region src/components/ThinkChatContext.d.ts
6
- type ThinkChatValue = ReturnType<typeof useAgentChat<unknown, UIMessage>>;
7
- declare const ThinkChatContext: React.Context<(Omit<import("@ai-sdk/react").UseChatHelpers<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>, "addToolOutput"> & {
8
- clearHistory: () => void;
9
- addToolOutput: (opts: {
10
- toolCallId: string;
11
- toolName?: string;
12
- output?: unknown;
13
- state?: "output-available" | "output-error";
14
- errorText?: string;
15
- }) => void;
16
- isServerStreaming: boolean;
17
- isStreaming: boolean;
18
- isRecovering: boolean;
19
- isToolContinuation: boolean;
20
- connectionError: (Error & {
21
- code: number;
22
- reason: string;
23
- wasClean: boolean;
24
- }) | null;
25
- }) | null>;
26
- declare function useThinkChatContext(component: string): ThinkChatValue;
27
- //#endregion
28
- export { ThinkChatValue as n, useThinkChatContext as r, ThinkChatContext as t };
@@ -1,41 +0,0 @@
1
- import * as React from "react";
2
- import { MCPServer, MCPServersState } from "agents";
3
-
4
- //#region src/components/McpServerConnections.d.ts
5
- type McpServerConnectionAction = (serverId: string, server: MCPServer) => void | Promise<void>;
6
- interface McpServerConnectionsProps extends React.HTMLAttributes<HTMLElement> {
7
- /** Upstream Agents SDK MCP state from `getMcpServers()` or `useAgent({ onMcpUpdate })`. */
8
- mcp: MCPServersState;
9
- /** Optional heading for the connected-server list. */
10
- heading?: React.ReactNode;
11
- /** Called when an OAuth server needs user authorization. */
12
- onAuthorize?: McpServerConnectionAction;
13
- /** Called when a failed server should retry through an app-owned Agent RPC. */
14
- onRetry?: McpServerConnectionAction;
15
- /** Called when a ready/connected server should refresh discovery through an app-owned Agent RPC. */
16
- onRefresh?: McpServerConnectionAction;
17
- /** Called when a server transport should close but the stored config should remain. */
18
- onDisconnect?: McpServerConnectionAction;
19
- /** Should call `removeMcpServer(serverId)`; Agents SDK disconnects and removes storage. */
20
- onRemove?: McpServerConnectionAction;
21
- }
22
- /**
23
- * Runtime MCP server list. Add servers with `McpServerPicker`; render connected
24
- * state here from the upstream Agents SDK `MCPServersState`.
25
- */
26
- declare function McpServerConnections({
27
- className,
28
- heading,
29
- mcp,
30
- onAuthorize,
31
- onDisconnect,
32
- onRefresh,
33
- onRemove,
34
- onRetry,
35
- ref,
36
- ...props
37
- }: McpServerConnectionsProps & {
38
- ref?: React.Ref<HTMLElement>;
39
- }): React.JSX.Element;
40
- //#endregion
41
- export { McpServerConnections, McpServerConnectionsProps };
@@ -1,188 +0,0 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { F as WarningIcon, L as XIcon, M as SpinnerIcon, a as CheckIcon, k as RefreshIcon } from "../icons-D2Q5n5C1.js";
3
- import { Button } from "./Button.js";
4
- import { Badge } from "./Badge.js";
5
- import * as React from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/McpServerConnections.tsx
8
- /**
9
- * Runtime MCP server list. Add servers with `McpServerPicker`; render connected
10
- * state here from the upstream Agents SDK `MCPServersState`.
11
- */
12
- function McpServerConnections({ className, heading = "Connected MCP servers", mcp, onAuthorize, onDisconnect, onRefresh, onRemove, onRetry, ref, ...props }) {
13
- const [pendingAction, setPendingAction] = React.useState(null);
14
- const entries = Object.entries(mcp.servers);
15
- async function runAction(action, serverId, server, handler) {
16
- if (!handler) return;
17
- setPendingAction(`${action}:${serverId}`);
18
- try {
19
- await handler(serverId, server);
20
- } finally {
21
- setPendingAction(null);
22
- }
23
- }
24
- return /* @__PURE__ */ jsxs("section", {
25
- ref,
26
- className: cx("mcp-server-connections", className),
27
- ...props,
28
- children: [/* @__PURE__ */ jsxs("div", {
29
- className: "mcp-server-connections__header",
30
- children: [/* @__PURE__ */ jsx("h2", { children: heading }), /* @__PURE__ */ jsxs("span", {
31
- className: "mcp-server-connections__summary",
32
- children: [
33
- entries.length,
34
- " ",
35
- entries.length === 1 ? "server" : "servers"
36
- ]
37
- })]
38
- }), entries.length === 0 ? /* @__PURE__ */ jsx("p", {
39
- className: "mcp-server-connections__empty",
40
- children: "No MCP servers connected."
41
- }) : /* @__PURE__ */ jsx("ul", {
42
- className: "mcp-server-connections__list",
43
- role: "list",
44
- children: entries.map(([serverId, server]) => {
45
- const counts = getServerCapabilityCounts(mcp, serverId);
46
- const status = getServerStatus(server);
47
- const state = server.state;
48
- const pending = (action) => pendingAction === `${action}:${serverId}`;
49
- return /* @__PURE__ */ jsxs("li", {
50
- className: "mcp-server-connections__item",
51
- children: [/* @__PURE__ */ jsxs("div", {
52
- className: "mcp-server-connections__main",
53
- children: [
54
- /* @__PURE__ */ jsxs("div", {
55
- className: "mcp-server-connections__title-row",
56
- children: [/* @__PURE__ */ jsx("span", {
57
- className: "mcp-server-connections__name",
58
- children: server.name
59
- }), /* @__PURE__ */ jsxs(Badge, {
60
- color: status.color,
61
- size: "sm",
62
- className: "mcp-server-connections__status",
63
- children: [status.icon, status.label]
64
- })]
65
- }),
66
- /* @__PURE__ */ jsx("span", {
67
- className: "mcp-server-connections__url",
68
- children: server.server_url
69
- }),
70
- server.error ? /* @__PURE__ */ jsx("p", {
71
- className: "mcp-server-connections__error",
72
- children: server.error
73
- }) : null,
74
- server.instructions ? /* @__PURE__ */ jsx("p", {
75
- className: "mcp-server-connections__instructions",
76
- children: server.instructions
77
- }) : null,
78
- /* @__PURE__ */ jsxs("p", {
79
- className: "mcp-server-connections__capabilities",
80
- children: [
81
- counts.tools,
82
- " tools, ",
83
- counts.prompts,
84
- " prompts, ",
85
- counts.resources,
86
- " resources"
87
- ]
88
- })
89
- ]
90
- }), /* @__PURE__ */ jsxs("div", {
91
- className: "mcp-server-connections__actions",
92
- children: [
93
- state === "authenticating" && onAuthorize ? /* @__PURE__ */ jsx(Button, {
94
- type: "button",
95
- size: "xs",
96
- variant: "outline",
97
- color: "primary",
98
- disabled: pending("authorize"),
99
- onClick: () => void runAction("authorize", serverId, server, onAuthorize),
100
- children: pending("authorize") ? "Opening" : "Authorize"
101
- }) : null,
102
- state === "failed" && onRetry ? /* @__PURE__ */ jsxs(Button, {
103
- type: "button",
104
- size: "xs",
105
- variant: "outline",
106
- color: "neutral",
107
- disabled: pending("retry"),
108
- onClick: () => void runAction("retry", serverId, server, onRetry),
109
- children: [/* @__PURE__ */ jsx(RefreshIcon, {}), pending("retry") ? "Retrying" : "Retry"]
110
- }) : null,
111
- (state === "ready" || state === "connected") && onRefresh ? /* @__PURE__ */ jsx(Button, {
112
- type: "button",
113
- size: "icon-xs",
114
- variant: "ghost",
115
- color: "neutral",
116
- "aria-label": `Refresh ${server.name} capabilities`,
117
- disabled: pending("refresh"),
118
- onClick: () => void runAction("refresh", serverId, server, onRefresh),
119
- children: /* @__PURE__ */ jsx(RefreshIcon, {})
120
- }) : null,
121
- state !== "failed" && onDisconnect ? /* @__PURE__ */ jsx(Button, {
122
- type: "button",
123
- size: "xs",
124
- variant: "outline",
125
- color: "neutral",
126
- disabled: pending("disconnect"),
127
- onClick: () => void runAction("disconnect", serverId, server, onDisconnect),
128
- children: pending("disconnect") ? "Disconnecting" : "Disconnect"
129
- }) : null,
130
- onRemove ? /* @__PURE__ */ jsx(Button, {
131
- type: "button",
132
- size: "icon-xs",
133
- variant: "ghost",
134
- color: "destructive",
135
- "aria-label": `Remove ${server.name}`,
136
- disabled: pending("remove"),
137
- onClick: () => void runAction("remove", serverId, server, onRemove),
138
- children: /* @__PURE__ */ jsx(XIcon, {})
139
- }) : null
140
- ]
141
- })]
142
- }, serverId);
143
- })
144
- })]
145
- });
146
- }
147
- function getServerCapabilityCounts(mcp, serverId) {
148
- return {
149
- tools: mcp.tools.filter((tool) => tool.serverId === serverId).length,
150
- prompts: mcp.prompts.filter((prompt) => prompt.serverId === serverId).length,
151
- resources: mcp.resources.filter((resource) => resource.serverId === serverId).length
152
- };
153
- }
154
- function getServerStatus(server) {
155
- const state = server.state;
156
- if (state === "ready") return {
157
- color: "success",
158
- icon: /* @__PURE__ */ jsx(CheckIcon, {}),
159
- label: "Ready"
160
- };
161
- if (state === "failed") return {
162
- color: "destructive",
163
- icon: /* @__PURE__ */ jsx(WarningIcon, {}),
164
- label: "Failed"
165
- };
166
- if (state === "authenticating") return {
167
- color: "warning",
168
- icon: /* @__PURE__ */ jsx(WarningIcon, {}),
169
- label: "Authorize"
170
- };
171
- if (state === "connecting") return {
172
- color: "neutral",
173
- icon: /* @__PURE__ */ jsx(SpinnerIcon, { className: "mcp-server-connections__spinner" }),
174
- label: "Connecting"
175
- };
176
- if (state === "discovering") return {
177
- color: "neutral",
178
- icon: /* @__PURE__ */ jsx(SpinnerIcon, { className: "mcp-server-connections__spinner" }),
179
- label: "Discovering"
180
- };
181
- return {
182
- color: "neutral",
183
- icon: /* @__PURE__ */ jsx(CheckIcon, {}),
184
- label: "Connected"
185
- };
186
- }
187
- //#endregion
188
- export { McpServerConnections };
@@ -1,33 +0,0 @@
1
- //#region src/components/useStickToBottom.d.ts
2
- interface UseStickToBottomOptions {
3
- /**
4
- * How close to the bottom (in pixels) still counts as "at bottom" for the
5
- * sticky behavior. Larger values keep the viewport pinned through small
6
- * scroll jitter.
7
- */
8
- slackPx?: number;
9
- }
10
- interface UseStickToBottomResult {
11
- /** Attach to the scrolling element. */
12
- viewportRef: (element: HTMLElement | null) => void;
13
- /**
14
- * Attach to the element whose size determines whether the viewport
15
- * overflows. Typically the immediate child of the viewport.
16
- */
17
- contentRef: (element: HTMLElement | null) => void;
18
- /** True while the viewport is pinned within `slackPx` of the bottom. */
19
- isAtBottom: boolean;
20
- /** Imperatively scroll the viewport to its bottom. */
21
- scrollToBottom: (behavior?: ScrollBehavior) => void;
22
- }
23
- /**
24
- * Pin a scrollable viewport to the bottom as its content grows, unless the
25
- * user has scrolled up.
26
- *
27
- * @deprecated Use MessageScroller for chat transcripts. Keep this only for
28
- * standalone streaming panes that do not need transcript row anchoring,
29
- * history prepending, visibility tracking, or jump-to-message behavior.
30
- */
31
- declare function useStickToBottom(options?: UseStickToBottomOptions): UseStickToBottomResult;
32
- //#endregion
33
- export { UseStickToBottomOptions, UseStickToBottomResult, useStickToBottom };
@@ -1,107 +0,0 @@
1
- import * as React from "react";
2
- //#region src/components/useStickToBottom.ts
3
- const DEFAULT_STICK_SLACK_PX = 160;
4
- /**
5
- * Pin a scrollable viewport to the bottom as its content grows, unless the
6
- * user has scrolled up.
7
- *
8
- * @deprecated Use MessageScroller for chat transcripts. Keep this only for
9
- * standalone streaming panes that do not need transcript row anchoring,
10
- * history prepending, visibility tracking, or jump-to-message behavior.
11
- */
12
- function useStickToBottom(options = {}) {
13
- const slackPx = options.slackPx ?? DEFAULT_STICK_SLACK_PX;
14
- const viewportElementRef = React.useRef(null);
15
- const contentElementRef = React.useRef(null);
16
- const [viewportElement, setViewportElement] = React.useState(null);
17
- const [contentElement, setContentElement] = React.useState(null);
18
- const [isAtBottom, setIsAtBottom] = React.useState(true);
19
- const isAtBottomRef = React.useRef(true);
20
- const didInitialScrollRef = React.useRef(false);
21
- const viewportRef = React.useCallback((element) => {
22
- viewportElementRef.current = element;
23
- setViewportElement((prev) => prev === element ? prev : element);
24
- }, []);
25
- const contentRef = React.useCallback((element) => {
26
- contentElementRef.current = element;
27
- setContentElement((prev) => prev === element ? prev : element);
28
- }, []);
29
- React.useLayoutEffect(() => {
30
- const el = viewportElement;
31
- const observed = contentElement ?? el?.firstElementChild;
32
- if (!el || !observed) return;
33
- if (!didInitialScrollRef.current) {
34
- el.scrollTo({
35
- top: el.scrollHeight,
36
- behavior: "auto"
37
- });
38
- didInitialScrollRef.current = true;
39
- }
40
- const readIsAtBottom = () => el.scrollHeight - el.scrollTop - el.clientHeight < slackPx;
41
- let lastInteractionAt = 0;
42
- const markInteraction = () => {
43
- lastInteractionAt = Date.now();
44
- };
45
- const isUserResize = () => Date.now() - lastInteractionAt < 600;
46
- const updateIsAtBottom = () => {
47
- const next = readIsAtBottom();
48
- if (isAtBottomRef.current === next) return;
49
- isAtBottomRef.current = next;
50
- setIsAtBottom(next);
51
- };
52
- let resizeFrameId = null;
53
- const flushResize = () => {
54
- resizeFrameId = null;
55
- if (!isAtBottomRef.current || isUserResize()) {
56
- updateIsAtBottom();
57
- return;
58
- }
59
- el.scrollTo({
60
- top: el.scrollHeight,
61
- behavior: "auto"
62
- });
63
- updateIsAtBottom();
64
- };
65
- const scheduleResize = () => {
66
- if (resizeFrameId !== null) return;
67
- resizeFrameId = window.requestAnimationFrame(flushResize);
68
- };
69
- const handleScroll = () => {
70
- updateIsAtBottom();
71
- };
72
- handleScroll();
73
- el.addEventListener("scroll", handleScroll, { passive: true });
74
- el.addEventListener("pointerdown", markInteraction, { passive: true });
75
- el.addEventListener("keydown", markInteraction, { passive: true });
76
- const observer = new ResizeObserver(() => {
77
- scheduleResize();
78
- });
79
- observer.observe(observed);
80
- return () => {
81
- if (resizeFrameId !== null) window.cancelAnimationFrame(resizeFrameId);
82
- el.removeEventListener("scroll", handleScroll);
83
- el.removeEventListener("pointerdown", markInteraction);
84
- el.removeEventListener("keydown", markInteraction);
85
- observer.disconnect();
86
- };
87
- }, [
88
- contentElement,
89
- viewportElement,
90
- slackPx
91
- ]);
92
- return {
93
- viewportRef,
94
- contentRef,
95
- isAtBottom,
96
- scrollToBottom: React.useCallback((behavior = "smooth") => {
97
- const el = viewportElementRef.current;
98
- if (!el) return;
99
- el.scrollTo({
100
- top: el.scrollHeight,
101
- behavior
102
- });
103
- }, [])
104
- };
105
- }
106
- //#endregion
107
- export { useStickToBottom };
@@ -1,51 +0,0 @@
1
- import * as React from "react";
2
-
3
- //#region src/components/_internal/icons.d.ts
4
- /**
5
- * Small inline-SVG icon set used across AI chat and code components.
6
- *
7
- * All icons are 16x16 by default, use `currentColor` for strokes/fills, and
8
- * accept standard SVG props so consumers can override size and aria-hidden.
9
- */
10
- type IconProps = Omit<React.SVGAttributes<SVGSVGElement>, "width" | "height"> & {
11
- size?: number | string;
12
- };
13
- declare const ChevronRightIcon: (props: IconProps) => React.JSX.Element;
14
- declare const ChevronDownIcon: (props: IconProps) => React.JSX.Element;
15
- declare const ChevronLeftIcon: (props: IconProps) => React.JSX.Element;
16
- declare const CheckIcon: (props: IconProps) => React.JSX.Element;
17
- declare const XIcon: (props: IconProps) => React.JSX.Element;
18
- declare const PencilIcon: (props: IconProps) => React.JSX.Element;
19
- declare const CopyIcon: (props: IconProps) => React.JSX.Element;
20
- declare const EyeIcon: (props: IconProps) => React.JSX.Element;
21
- declare const EyeOffIcon: (props: IconProps) => React.JSX.Element;
22
- declare const FolderIcon: (props: IconProps) => React.JSX.Element;
23
- declare const FolderOpenIcon: (props: IconProps) => React.JSX.Element;
24
- declare const FileIcon: (props: IconProps) => React.JSX.Element;
25
- declare const PaperclipIcon: (props: IconProps) => React.JSX.Element;
26
- declare const PlusIcon: (props: IconProps) => React.JSX.Element;
27
- declare const MinusIcon: (props: IconProps) => React.JSX.Element;
28
- declare const PlayIcon: (props: IconProps) => React.JSX.Element;
29
- declare const PauseIcon: (props: IconProps) => React.JSX.Element;
30
- declare const SquareIcon: (props: IconProps) => React.JSX.Element;
31
- declare const ArrowLeftIcon: (props: IconProps) => React.JSX.Element;
32
- declare const ArrowRightIcon: (props: IconProps) => React.JSX.Element;
33
- declare const ArrowDownIcon: (props: IconProps) => React.JSX.Element;
34
- declare const ArrowUpIcon: (props: IconProps) => React.JSX.Element;
35
- declare const DownloadIcon: (props: IconProps) => React.JSX.Element;
36
- declare const RefreshIcon: (props: IconProps) => React.JSX.Element;
37
- declare const DotIcon: (props: IconProps) => React.JSX.Element;
38
- declare const EllipsisIcon: (props: IconProps) => React.JSX.Element;
39
- declare const SpinnerIcon: (props: IconProps) => React.JSX.Element;
40
- declare const SearchIcon: (props: IconProps) => React.JSX.Element;
41
- declare const SidebarIcon: (props: IconProps) => React.JSX.Element;
42
- declare const TerminalIcon: (props: IconProps) => React.JSX.Element;
43
- declare const LinkIcon: (props: IconProps) => React.JSX.Element;
44
- declare const WarningIcon: (props: IconProps) => React.JSX.Element;
45
- declare const WrenchIcon: (props: IconProps) => React.JSX.Element;
46
- declare const InfoIcon: (props: IconProps) => React.JSX.Element;
47
- declare const ImageIcon: (props: IconProps) => React.JSX.Element;
48
- declare const MonitorIcon: (props: IconProps) => React.JSX.Element;
49
- declare const MaximizeIcon: (props: IconProps) => React.JSX.Element;
50
- //#endregion
51
- export { RefreshIcon as A, MinusIcon as C, PencilIcon as D, PauseIcon as E, TerminalIcon as F, WarningIcon as I, WrenchIcon as L, SidebarIcon as M, SpinnerIcon as N, PlayIcon as O, SquareIcon as P, XIcon as R, MaximizeIcon as S, PaperclipIcon as T, FolderOpenIcon as _, CheckIcon as a, InfoIcon as b, ChevronRightIcon as c, DownloadIcon as d, EllipsisIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SearchIcon as j, PlusIcon as k, CopyIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, ChevronDownIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronLeftIcon as s, ArrowDownIcon as t, DotIcon as u, IconProps as v, MonitorIcon as w, LinkIcon as x, ImageIcon as y };