@mcp-b/react-components 0.17.0 → 0.18.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.
- package/dist/{AgentActivity-BNUNrP9O.d.ts → AgentActivity-D2SHSGFX.d.ts} +1 -1
- package/dist/{AgentChat-CRuMi1Pb.d.ts → AgentChat-ClxViuUM.d.ts} +1 -20
- package/dist/{Button-FX_hpqxm.d.ts → Button-DLGzHsjc.d.ts} +13 -7
- package/dist/{CodeBlock-Co1noLbC.js → CodeBlock-Bfp5PAg3.js} +9 -6
- package/dist/{CodeBlock-Dnpr88ZQ.d.ts → CodeBlock-gV4kZeCI.d.ts} +2 -9
- package/dist/{FileTree-B7bBsUyU.js → FileTree-3zYtrddG.js} +42 -16
- package/dist/{Message-C4eYRogZ.js → Message-BXtmfc9Q.js} +13 -20
- package/dist/{ModelSelector-BNrZlY_Y.js → ModelSelector-Cqw_qrUG.js} +15 -22
- package/dist/{PromptInput-OLfXPuHM.d.ts → PromptInput-Bdh9pqlo.d.ts} +4 -6
- package/dist/{Select-CwSqP07Y.d.ts → Select-B_13gg_J.d.ts} +2 -2
- package/dist/{Tabs-9zddXDQo.d.ts → Tabs-ColWK-XA.d.ts} +10 -2
- package/dist/{ThinkChat-DInElus-.js → ThinkChat-15EhfvYJ.js} +84 -61
- package/dist/{ThinkChatActivity-BgesTfZ4.d.ts → ThinkChatActivity-Bzot45kX.d.ts} +4 -7
- package/dist/{ThinkChatActivitySummary-BPmu9a-c.d.ts → ThinkChatActivitySummary-D1xOrNrq.d.ts} +1 -1
- package/dist/{Toggle-DaXpe1Lc.d.ts → Toggle-JKZ43D5S.d.ts} +1 -1
- package/dist/{ToggleGroup-yseEWkOC.d.ts → ToggleGroup-DNd6cDJZ.d.ts} +2 -2
- package/dist/Workspace-Jez8ffUj.d.ts +274 -0
- package/dist/{WorkspaceExplorer-sZewzT2O.d.ts → WorkspaceExplorer-B9dQWNVK.d.ts} +2 -2
- package/dist/{WorkspaceFile-C8UzuSH4.d.ts → WorkspaceFile-CzyHnESE.d.ts} +1 -1
- package/dist/{WorkspaceFileView-DNdGAEiX.js → WorkspaceFileView-C68Ub8S8.js} +120 -127
- package/dist/{WorkspaceLink-B1ykV1dS.js → WorkspaceLink-BYYeTQLf.js} +6 -27
- package/dist/{WorkspaceLink-DK1DWMHe.d.ts → WorkspaceLink-O-EBKUJ8.d.ts} +6 -9
- package/dist/{class-names-Bk-QLWWI.js → class-names-BiMDVpUo.js} +4 -1
- package/dist/components/Accordion.js +7 -2
- package/dist/components/Activity.js +2 -2
- package/dist/components/AgentActivity.d.ts +1 -1
- package/dist/components/AgentActivity.js +4 -5
- package/dist/components/AgentActivityPreview.d.ts +9 -9
- package/dist/components/AgentActivityPreview.js +8 -12
- package/dist/components/AgentAttention.d.ts +1 -1
- package/dist/components/AgentAttention.js +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +94 -62
- package/dist/components/AgentChatMessageEditor.js +2 -2
- package/dist/components/AgentChatTurnError.js +2 -2
- package/dist/components/AgentConnection.js +3 -3
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.d.ts +6 -4
- package/dist/components/AgentToolDetail.js +12 -10
- package/dist/components/AlertDialog.js +1 -1
- package/dist/components/AppTopBar.d.ts +24 -7
- package/dist/components/AppTopBar.js +32 -8
- package/dist/components/Approval.js +4 -4
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +6 -4
- package/dist/components/Autocomplete.js +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Badge.js +3 -0
- package/dist/components/BrowserLiveView.js +27 -12
- package/dist/components/BrowserReplay.js +4 -3
- package/dist/components/BrowserRunPanel.js +5 -5
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +14 -11
- package/dist/components/Card.d.ts +7 -8
- package/dist/components/Card.js +19 -10
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +2 -2
- package/dist/components/ChatGptSignInScreen.js +8 -8
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CheckboxGroup.js +1 -1
- package/dist/components/Checkpoint.js +2 -2
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +2 -2
- package/dist/components/Collapsible.js +2 -2
- package/dist/components/Combobox.js +1 -1
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/Context.js +1 -1
- package/dist/components/ContextMenu.js +2 -2
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +5 -4
- package/dist/components/DescriptionListParts.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +3 -3
- package/dist/components/Field.js +5 -2
- package/dist/components/Fieldset.js +1 -1
- package/dist/components/FileTree.d.ts +6 -0
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.js +1 -1
- package/dist/components/GithubMotionMark.js +1 -1
- package/dist/components/IconButton.d.ts +2 -3
- package/dist/components/IconButton.js +2 -1
- package/dist/components/InlineCitation.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Marker.js +1 -1
- package/dist/components/McpConnectionRequest.js +2 -2
- package/dist/components/McpServerPicker.js +2 -2
- package/dist/components/MediaPreviewCard.d.ts +103 -0
- package/dist/components/MediaPreviewCard.js +193 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/Menubar.js +2 -2
- package/dist/components/Message.d.ts +4 -1
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +5 -4
- package/dist/components/Meter.js +1 -1
- package/dist/components/ModelSelector.d.ts +4 -3
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.js +1 -1
- package/dist/components/NumberField.js +1 -1
- package/dist/components/Plan.js +2 -2
- package/dist/components/Popover.js +1 -1
- package/dist/components/PreviewCard.js +1 -1
- package/dist/components/PricingBillingToggle.js +1 -1
- package/dist/components/PricingFAQ.js +1 -1
- package/dist/components/PricingPage.js +2 -1
- package/dist/components/PricingPlanCard.js +4 -3
- package/dist/components/PricingUsageCalculator.js +2 -2
- package/dist/components/Progress.js +1 -1
- package/dist/components/PromptInput.d.ts +1 -1
- package/dist/components/PromptInput.js +33 -20
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -3
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/Reasoning.js +3 -6
- package/dist/components/ResizableSidePanel.js +1 -1
- package/dist/components/ResponsiveSidebarShell.js +16 -10
- package/dist/components/ScrollArea.js +2 -1
- package/dist/components/SearchField.d.ts +43 -0
- package/dist/components/SearchField.js +52 -0
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +5 -6
- package/dist/components/Separator.js +1 -1
- package/dist/components/Slider.js +1 -1
- package/dist/components/Sources.js +2 -2
- package/dist/components/Stepper.js +16 -9
- package/dist/components/SubagentRunDetails.js +1 -1
- package/dist/components/SubagentRunIndicator.js +2 -2
- package/dist/components/SubagentRunList.d.ts +3 -5
- package/dist/components/SubagentRunList.js +3 -4
- package/dist/components/SubagentRunSelector.d.ts +8 -12
- package/dist/components/SubagentRunSelector.js +17 -20
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.js +4 -5
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +12 -3
- package/dist/components/Task.js +2 -2
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -4
- package/dist/components/TestResults.js +10 -6
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +33 -20
- package/dist/components/ThinkChat.js +4 -4
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +8 -10
- package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/ThinkChatActivitySummary.js +7 -3
- package/dist/components/ThinkChatToolPanels.js +26 -16
- package/dist/components/ThinkExecutionDetail.js +2 -2
- package/dist/components/ThinkExecutionStatus.js +2 -2
- package/dist/components/ThinkExecutionWorkbench.d.ts +30 -8
- package/dist/components/ThinkExecutionWorkbench.js +70 -134
- package/dist/components/ThinkFullApp.d.ts +36 -35
- package/dist/components/ThinkFullApp.js +156 -109
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/ThinkRecoveryNotice.js +18 -12
- package/dist/components/ThinkRoutineBrowser.d.ts +17 -9
- package/dist/components/ThinkRoutineBrowser.js +33 -40
- package/dist/components/ThinkRoutineDetail.d.ts +5 -2
- package/dist/components/ThinkRoutineDetail.js +4 -4
- package/dist/components/ThinkRoutineForm.d.ts +3 -2
- package/dist/components/ThinkRoutineForm.js +11 -10
- package/dist/components/ThinkRoutineLibrary.d.ts +24 -31
- package/dist/components/ThinkRoutineLibrary.js +57 -80
- package/dist/components/ThinkRoutineRuns.d.ts +3 -2
- package/dist/components/ThinkRoutineRuns.js +31 -24
- package/dist/components/ThinkThreadPicker.d.ts +17 -11
- package/dist/components/ThinkThreadPicker.js +163 -39
- package/dist/components/Toast.js +1 -1
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +9 -7
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +15 -13
- package/dist/components/ToolInvocation.js +1 -1
- package/dist/components/Toolbar.js +1 -1
- package/dist/components/Tooltip.d.ts +8 -1
- package/dist/components/Tooltip.js +11 -2
- package/dist/components/TransitionSurface.d.ts +27 -0
- package/dist/components/TransitionSurface.js +20 -0
- package/dist/components/WebPreview.d.ts +5 -5
- package/dist/components/WebPreview.js +68 -54
- package/dist/components/Workspace.d.ts +2 -2
- package/dist/components/Workspace.js +358 -328
- package/dist/components/WorkspaceBrowser.d.ts +4 -7
- package/dist/components/WorkspaceBrowser.js +15 -25
- package/dist/components/WorkspaceExplorer.d.ts +5 -5
- package/dist/components/WorkspaceExplorer.js +19 -32
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +14 -2
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.d.ts +0 -8
- package/dist/components/WorkspaceHeader.js +3 -15
- package/dist/components/WorkspaceLink.d.ts +1 -1
- package/dist/components/WorkspaceLink.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-CQx3LQAC.d.ts → copy-button-D7aAYA-2.d.ts} +1 -1
- package/dist/{copy-button-cYsJBauI.js → copy-button-DeK6KXEV.js} +3 -2
- package/dist/{icons--FqCZEc3.js → icons-CQJ-aMnI.js} +6 -3
- package/dist/{icons-DpUqY8Mp.d.ts → icons-CYXmvKlJ.d.ts} +17 -2
- package/dist/navigation-link-Cob7KBlM.js +19 -0
- package/dist/styles/accordion.css +4 -19
- package/dist/styles/activity.css +48 -56
- package/dist/styles/agent-activity-preview.css +2 -0
- package/dist/styles/agent-chat.css +14 -22
- package/dist/styles/alert-dialog.css +16 -18
- package/dist/styles/app-top-bar.css +17 -9
- package/dist/styles/approval.css +11 -6
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/autocomplete.css +2 -1
- package/dist/styles/avatar.css +35 -30
- package/dist/styles/badge.css +10 -10
- package/dist/styles/base-ui-motion.css +94 -39
- package/dist/styles/browser-control-overlay.css +0 -1
- package/dist/styles/browser-live-view.css +39 -22
- package/dist/styles/browser-replay.css +1 -1
- package/dist/styles/browser-run-panel.css +8 -4
- package/dist/styles/button.css +36 -33
- package/dist/styles/card.css +5 -6
- package/dist/styles/chain-of-thought.css +22 -16
- package/dist/styles/checkbox.css +18 -5
- package/dist/styles/codex-model-selector.css +3 -7
- package/dist/styles/collapsible.css +10 -10
- package/dist/styles/combobox.css +3 -2
- package/dist/styles/commit.css +19 -18
- package/dist/styles/composition-motion.css +83 -0
- package/dist/styles/context-menu.css +3 -3
- package/dist/styles/context.css +11 -10
- package/dist/styles/conversation.css +18 -23
- package/dist/styles/dialog.css +15 -15
- package/dist/styles/field.css +32 -12
- package/dist/styles/file-tree.css +69 -9
- package/dist/styles/form.css +1 -1
- package/dist/styles/index.css +5 -0
- package/dist/styles/input.css +2 -2
- package/dist/styles/marker.css +14 -13
- package/dist/styles/mcp-server-picker.css +20 -17
- package/dist/styles/media-preview-card.css +160 -0
- package/dist/styles/menu.css +11 -11
- package/dist/styles/menubar.css +12 -11
- package/dist/styles/message.css +27 -21
- package/dist/styles/meter.css +2 -2
- package/dist/styles/model-selector.css +16 -14
- package/dist/styles/motion-reduction.css +29 -0
- package/dist/styles/navigation-menu.css +14 -30
- package/dist/styles/number-field.css +22 -4
- package/dist/styles/plan.css +5 -0
- package/dist/styles/popover.css +15 -16
- package/dist/styles/preview-card.css +2 -32
- package/dist/styles/progress.css +8 -3
- package/dist/styles/prompt-input.css +75 -75
- package/dist/styles/queue.css +48 -32
- package/dist/styles/radio.css +19 -12
- package/dist/styles/reasoning.css +2 -1
- package/dist/styles/recipes.css +109 -37
- package/dist/styles/resizable-side-panel.css +4 -10
- package/dist/styles/responsive-sidebar-shell.css +16 -15
- package/dist/styles/scroll-area.css +32 -15
- package/dist/styles/search-field.css +21 -0
- package/dist/styles/select.css +19 -12
- package/dist/styles/slider.css +25 -29
- package/dist/styles/sources.css +3 -3
- package/dist/styles/stepper.css +36 -26
- package/dist/styles/subagent-run.css +1 -1
- package/dist/styles/switch.css +32 -29
- package/dist/styles/tabs.css +79 -23
- package/dist/styles/task.css +13 -9
- package/dist/styles/test-results.css +29 -23
- package/dist/styles/theme-mode-control.css +8 -0
- package/dist/styles/think-execution-workbench.css +18 -15
- package/dist/styles/think-full-app.css +45 -68
- package/dist/styles/think-routine-library.css +43 -24
- package/dist/styles/think-thread-picker.css +193 -51
- package/dist/styles/toast.css +48 -27
- package/dist/styles/toggle-group.css +2 -36
- package/dist/styles/toggle.css +29 -5
- package/dist/styles/toolbar.css +25 -27
- package/dist/styles/tooltip.css +2 -32
- package/dist/styles/transition-surface.css +55 -0
- package/dist/styles/workspace-explorer.css +99 -44
- package/dist/summarize-tool-input-CqTcGRYy.js +15 -0
- package/dist/utils/mcp-server-catalog.d.ts +132 -0
- package/dist/utils/mcp-server-catalog.js +90 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +13 -7
- package/dist/Workspace-C9RFoxcu.d.ts +0 -62
- package/dist/summarize-tool-input-BUJsENSn.js +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-
|
|
2
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-Bdh9pqlo.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
|
|
5
5
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
@@ -75,21 +75,6 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
75
75
|
showComposer?: boolean;
|
|
76
76
|
/** Called when the user hits stop while `status` is streaming/submitted. */
|
|
77
77
|
onStop?: () => void;
|
|
78
|
-
/**
|
|
79
|
-
* Let a composed follow-up submit while a response is active. The single
|
|
80
|
-
* trailing action remains Stop until the draft contains content, then
|
|
81
|
-
* becomes Queue. The transport remains the queue owner.
|
|
82
|
-
*/
|
|
83
|
-
allowSubmitWhileBusy?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Authoritative user messages waiting behind the active turn. Their ids are
|
|
86
|
-
* excluded from the transcript and rendered as queued cards above the composer.
|
|
87
|
-
*/
|
|
88
|
-
queuedMessages?: readonly MessageT[];
|
|
89
|
-
/** Promote a queued message into the host's steering flow. */
|
|
90
|
-
onSteerQueuedMessage?: (message: MessageT) => void;
|
|
91
|
-
/** Remove a queued message through the host-owned queue transport. */
|
|
92
|
-
onRemoveQueuedMessage?: (message: MessageT) => void;
|
|
93
78
|
placeholder?: string;
|
|
94
79
|
disabled?: boolean;
|
|
95
80
|
/** Rendered in place of the transcript while `messages` is empty. */
|
|
@@ -210,14 +195,10 @@ interface PermissionModeControl {
|
|
|
210
195
|
declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
211
196
|
className,
|
|
212
197
|
messages,
|
|
213
|
-
queuedMessages,
|
|
214
|
-
onSteerQueuedMessage,
|
|
215
|
-
onRemoveQueuedMessage,
|
|
216
198
|
status,
|
|
217
199
|
onSubmit,
|
|
218
200
|
showComposer,
|
|
219
201
|
onStop,
|
|
220
|
-
allowSubmitWhileBusy,
|
|
221
202
|
placeholder,
|
|
222
203
|
disabled,
|
|
223
204
|
emptyState,
|
|
@@ -24,12 +24,11 @@ type ButtonColor = "neutral" | "primary" | "destructive";
|
|
|
24
24
|
*
|
|
25
25
|
* - `xs` - Extra small, 1.75rem height
|
|
26
26
|
* - `sm` - Small, 2rem height
|
|
27
|
-
* - `md` - Medium
|
|
28
|
-
* - `lg` - Large, 2.
|
|
29
|
-
* - `xl` - Extra large,
|
|
30
|
-
* - `icon` - Square button for icon-only content
|
|
27
|
+
* - `md` - Medium, 2.25rem height
|
|
28
|
+
* - `lg` - Large, 2.5rem height
|
|
29
|
+
* - `xl` - Extra large, 2.75rem height
|
|
31
30
|
*/
|
|
32
|
-
type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl"
|
|
31
|
+
type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
33
32
|
interface ButtonVariantsOptions {
|
|
34
33
|
variant?: ButtonVariant | null;
|
|
35
34
|
color?: ButtonColor | null;
|
|
@@ -59,9 +58,15 @@ interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLBut
|
|
|
59
58
|
color?: ButtonColor;
|
|
60
59
|
/**
|
|
61
60
|
* The size of the button.
|
|
62
|
-
* @default '
|
|
61
|
+
* @default 'sm'
|
|
63
62
|
*/
|
|
64
63
|
size?: ButtonSize;
|
|
64
|
+
/**
|
|
65
|
+
* Makes the button square for icon-only content. Prefer {@link IconButton}
|
|
66
|
+
* when the control also needs a required accessible label and tooltip.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
iconOnly?: boolean;
|
|
65
70
|
}
|
|
66
71
|
/**
|
|
67
72
|
* A button component built on Base UI with semantic styling variants.
|
|
@@ -76,7 +81,7 @@ interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLBut
|
|
|
76
81
|
* <Button color="primary">Save changes</Button>
|
|
77
82
|
* <Button color="destructive">Delete account</Button>
|
|
78
83
|
* <Button variant="outline">Cancel</Button>
|
|
79
|
-
* <Button variant="ghost" size="
|
|
84
|
+
* <Button variant="ghost" size="sm" iconOnly aria-label="Search"><SearchIcon /></Button>
|
|
80
85
|
* ```
|
|
81
86
|
*
|
|
82
87
|
* @see {@link https://base-ui.com/react/components/button | Base UI Button}
|
|
@@ -85,6 +90,7 @@ declare function Button$1({
|
|
|
85
90
|
variant,
|
|
86
91
|
color,
|
|
87
92
|
size,
|
|
93
|
+
iconOnly,
|
|
88
94
|
className,
|
|
89
95
|
nativeButton,
|
|
90
96
|
ref,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as cx } from "./class-names-
|
|
1
|
+
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
2
|
import { Select } from "./components/Select.js";
|
|
3
|
-
import { t as CopyButton } from "./copy-button-
|
|
3
|
+
import { t as CopyButton } from "./copy-button-DeK6KXEV.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { createHighlighter } from "shiki";
|
|
@@ -170,11 +170,14 @@ function hasCustomCodeBlockContent(children) {
|
|
|
170
170
|
*
|
|
171
171
|
* @see {@link https://elements.ai-sdk.dev/components/code-block | AI Elements Code Block}
|
|
172
172
|
*/
|
|
173
|
-
function CodeBlock({
|
|
173
|
+
function CodeBlock({ language, ...props }) {
|
|
174
|
+
return /* @__PURE__ */ jsx(CodeBlockState, {
|
|
175
|
+
language,
|
|
176
|
+
...props
|
|
177
|
+
}, language);
|
|
178
|
+
}
|
|
179
|
+
function CodeBlockState({ className, code, language, showLineNumbers = false, isStreaming = false, onLanguageChange, children, ref, ...props }) {
|
|
174
180
|
const [internalLanguage, setInternalLanguage] = React.useState(language);
|
|
175
|
-
React.useEffect(() => {
|
|
176
|
-
setInternalLanguage(language);
|
|
177
|
-
}, [language]);
|
|
178
181
|
const setLanguage = React.useCallback((next) => {
|
|
179
182
|
setInternalLanguage(next);
|
|
180
183
|
onLanguageChange?.(next);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as SelectProps, t as Select } from "./Select-
|
|
2
|
-
import { t as CopyButtonProps } from "./copy-button-
|
|
1
|
+
import { m as SelectProps, t as Select } from "./Select-B_13gg_J.js";
|
|
2
|
+
import { t as CopyButtonProps } from "./copy-button-D7aAYA-2.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage, ThemedToken } from "shiki";
|
|
5
5
|
|
|
@@ -63,14 +63,7 @@ interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
63
63
|
* @see {@link https://elements.ai-sdk.dev/components/code-block | AI Elements Code Block}
|
|
64
64
|
*/
|
|
65
65
|
declare function CodeBlock({
|
|
66
|
-
className,
|
|
67
|
-
code,
|
|
68
66
|
language,
|
|
69
|
-
showLineNumbers,
|
|
70
|
-
isStreaming,
|
|
71
|
-
onLanguageChange,
|
|
72
|
-
children,
|
|
73
|
-
ref,
|
|
74
67
|
...props
|
|
75
68
|
}: CodeBlockProps & {
|
|
76
69
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { t as cx } from "./class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
+
import { C as FolderOpenIcon, S as FolderIcon, f as ChevronRightIcon, x as FileIcon } from "./icons-CQJ-aMnI.js";
|
|
3
|
+
import { t as NavigationLink } from "./navigation-link-Cob7KBlM.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/_internal/use-file-tree-nav.ts
|
|
6
7
|
const FileTreeContext = React.createContext(null);
|
|
8
|
+
function getVisibleFileTreeNodes(tree) {
|
|
9
|
+
return tree ? [...tree.querySelectorAll(".file-tree__node")].filter((node) => !node.closest(".file-tree__group[data-collapsed]")) : [];
|
|
10
|
+
}
|
|
7
11
|
function useFileTreeContext() {
|
|
8
12
|
const ctx = React.useContext(FileTreeContext);
|
|
9
13
|
if (!ctx) throw new Error("FileTree subcomponents must be used inside <FileTree>.");
|
|
@@ -25,8 +29,7 @@ function useFileTreeNav({ expanded, initialFocusedPath, selectedPath, onSelect,
|
|
|
25
29
|
setFolderExpanded(path, !expanded.has(path));
|
|
26
30
|
}, [expanded, setFolderExpanded]);
|
|
27
31
|
const handleKeyDown = React.useCallback((event, path, kind) => {
|
|
28
|
-
const
|
|
29
|
-
const nodes = tree ? [...tree.querySelectorAll(".file-tree__node")] : [];
|
|
32
|
+
const nodes = getVisibleFileTreeNodes(event.currentTarget.closest("[role=\"tree\"]"));
|
|
30
33
|
const currentIndex = nodes.indexOf(event.currentTarget);
|
|
31
34
|
const focusAt = (index) => nodes[index]?.focus();
|
|
32
35
|
switch (event.key) {
|
|
@@ -51,6 +54,7 @@ function useFileTreeNav({ expanded, initialFocusedPath, selectedPath, onSelect,
|
|
|
51
54
|
break;
|
|
52
55
|
case "Enter":
|
|
53
56
|
case " ":
|
|
57
|
+
if (kind === "file-link") return;
|
|
54
58
|
event.preventDefault();
|
|
55
59
|
onSelect(path);
|
|
56
60
|
if (kind === "folder") toggleFolderExpanded(path);
|
|
@@ -117,7 +121,7 @@ function getFirstFileTreePath(children) {
|
|
|
117
121
|
* </FileTree>
|
|
118
122
|
* ```
|
|
119
123
|
*/
|
|
120
|
-
function FileTree({ className, "aria-label": ariaLabel = "File tree", expanded, defaultExpanded, selectedPath = null, onSelect, onExpandedChange, children, ref, ...props }) {
|
|
124
|
+
function FileTree({ appearance = "contained", className, "aria-label": ariaLabel = "File tree", expanded, defaultExpanded, selectedPath = null, onSelect, onExpandedChange, children, ref, ...props }) {
|
|
121
125
|
const [internalExpanded, setInternalExpanded] = React.useState(() => defaultExpanded ?? /* @__PURE__ */ new Set());
|
|
122
126
|
const isControlled = expanded !== void 0;
|
|
123
127
|
const currentExpanded = isControlled ? expanded : internalExpanded;
|
|
@@ -137,7 +141,7 @@ function FileTree({ className, "aria-label": ariaLabel = "File tree", expanded,
|
|
|
137
141
|
});
|
|
138
142
|
const treeRef = React.useRef(null);
|
|
139
143
|
React.useLayoutEffect(() => {
|
|
140
|
-
const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []];
|
|
144
|
+
const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => !node.closest(".file-tree__group[data-collapsed]"));
|
|
141
145
|
if (nodes.length === 0) return;
|
|
142
146
|
if (nodes.some((node) => node.dataset.workspacePath === ctx.focusedPath)) return;
|
|
143
147
|
const firstPath = nodes[0]?.dataset.workspacePath;
|
|
@@ -152,6 +156,7 @@ function FileTree({ className, "aria-label": ariaLabel = "File tree", expanded,
|
|
|
152
156
|
children: /* @__PURE__ */ jsx("div", {
|
|
153
157
|
ref,
|
|
154
158
|
className: cx("file-tree", className),
|
|
159
|
+
"data-appearance": appearance,
|
|
155
160
|
...props,
|
|
156
161
|
children: /* @__PURE__ */ jsx("ul", {
|
|
157
162
|
ref: treeRef,
|
|
@@ -173,8 +178,8 @@ function dataFlag(enabled) {
|
|
|
173
178
|
function getFileTreeNodeTabIndex(focusedPath, path) {
|
|
174
179
|
return focusedPath === path ? 0 : -1;
|
|
175
180
|
}
|
|
176
|
-
function
|
|
177
|
-
return
|
|
181
|
+
function getFileTreeNodeStyle(level) {
|
|
182
|
+
return { "--file-tree-level": level };
|
|
178
183
|
}
|
|
179
184
|
function FileTreeFolder({ className, path, name, level = 0, children, ref, ...props }) {
|
|
180
185
|
const { expanded, focusedPath, selectedPath, onFocus, onSelect, handleKeyDown, onExpandedChange } = useFileTreeContext();
|
|
@@ -213,7 +218,7 @@ function FileTreeFolder({ className, path, name, level = 0, children, ref, ...pr
|
|
|
213
218
|
onClick: handleClick,
|
|
214
219
|
onFocus: () => onFocus(path),
|
|
215
220
|
onKeyDown: (e) => handleKeyDown(e, path, "folder"),
|
|
216
|
-
style:
|
|
221
|
+
style: getFileTreeNodeStyle(level),
|
|
217
222
|
children: [
|
|
218
223
|
/* @__PURE__ */ jsx("span", {
|
|
219
224
|
className: cx("file-tree__chevron", isExpanded && "file-tree__chevron--expanded"),
|
|
@@ -230,14 +235,17 @@ function FileTreeFolder({ className, path, name, level = 0, children, ref, ...pr
|
|
|
230
235
|
children: name
|
|
231
236
|
})
|
|
232
237
|
]
|
|
233
|
-
}),
|
|
234
|
-
className: "file-tree__list
|
|
238
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
239
|
+
className: "file-tree__list file-tree__group",
|
|
235
240
|
role: "group",
|
|
241
|
+
"aria-hidden": !isExpanded,
|
|
242
|
+
"data-collapsed": dataFlag(!isExpanded),
|
|
243
|
+
inert: !isExpanded,
|
|
236
244
|
children: React.Children.map(children, (child) => renderNestedFileTreeChild(child, level))
|
|
237
|
-
})
|
|
245
|
+
})]
|
|
238
246
|
});
|
|
239
247
|
}
|
|
240
|
-
function FileTreeFile({ className, path, name, icon, level = 0, ref, ...props }) {
|
|
248
|
+
function FileTreeFile({ className, path, name, icon, render, level = 0, ref, ...props }) {
|
|
241
249
|
const { selectedPath, focusedPath, onFocus, onSelect, handleKeyDown } = useFileTreeContext();
|
|
242
250
|
const isSelected = selectedPath === path;
|
|
243
251
|
const isFocused = focusedPath === path;
|
|
@@ -247,7 +255,25 @@ function FileTreeFile({ className, path, name, icon, level = 0, ref, ...props })
|
|
|
247
255
|
"aria-selected": isSelected,
|
|
248
256
|
className: cx("file-tree__file", className),
|
|
249
257
|
...props,
|
|
250
|
-
children: /* @__PURE__ */ jsxs(
|
|
258
|
+
children: render ? /* @__PURE__ */ jsxs(NavigationLink, {
|
|
259
|
+
render,
|
|
260
|
+
className: "file-tree__node file-tree__node--file",
|
|
261
|
+
"data-selected": dataFlag(isSelected),
|
|
262
|
+
"data-focused": dataFlag(isFocused),
|
|
263
|
+
"data-workspace-path": path,
|
|
264
|
+
tabIndex: getFileTreeNodeTabIndex(focusedPath, path),
|
|
265
|
+
onFocus: () => onFocus(path),
|
|
266
|
+
onKeyDown: (event) => handleKeyDown(event, path, "file-link"),
|
|
267
|
+
style: getFileTreeNodeStyle(level),
|
|
268
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
269
|
+
className: "file-tree__icon",
|
|
270
|
+
"aria-hidden": "true",
|
|
271
|
+
children: icon ?? /* @__PURE__ */ jsx(FileIcon, {})
|
|
272
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
273
|
+
className: "file-tree__name sigvelo-truncate",
|
|
274
|
+
children: name
|
|
275
|
+
})]
|
|
276
|
+
}) : /* @__PURE__ */ jsxs("button", {
|
|
251
277
|
type: "button",
|
|
252
278
|
className: "file-tree__node file-tree__node--file",
|
|
253
279
|
"data-selected": dataFlag(isSelected),
|
|
@@ -256,8 +282,8 @@ function FileTreeFile({ className, path, name, icon, level = 0, ref, ...props })
|
|
|
256
282
|
tabIndex: getFileTreeNodeTabIndex(focusedPath, path),
|
|
257
283
|
onClick: () => onSelect(path),
|
|
258
284
|
onFocus: () => onFocus(path),
|
|
259
|
-
onKeyDown: (
|
|
260
|
-
style:
|
|
285
|
+
onKeyDown: (event) => handleKeyDown(event, path, "file"),
|
|
286
|
+
style: getFileTreeNodeStyle(level),
|
|
261
287
|
children: [/* @__PURE__ */ jsx("span", {
|
|
262
288
|
className: "file-tree__icon",
|
|
263
289
|
"aria-hidden": "true",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cx } from "./class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
+
import { i as ArrowRightIcon, r as ArrowLeftIcon, x as FileIcon } from "./icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./components/Button.js";
|
|
4
4
|
import { Tooltip } from "./components/Tooltip.js";
|
|
5
|
-
import { c as useWorkspaceNavigationContext, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "./WorkspaceLink-
|
|
5
|
+
import { c as useWorkspaceNavigationContext, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "./WorkspaceLink-BYYeTQLf.js";
|
|
6
6
|
import { t as AttachmentPreview } from "./attachment-preview-DIs50Q0h.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -147,12 +147,7 @@ const MessageResponse = React.memo(function MessageResponse({ className, compone
|
|
|
147
147
|
...defaultComponents,
|
|
148
148
|
...components
|
|
149
149
|
} : defaultComponents;
|
|
150
|
-
const resolvedRehypePlugins = React.useMemo(() => rehypePlugins ?? (workspace ? createWorkspaceRehypePlugins(workspace.root, workspace.base) : void 0), [
|
|
151
|
-
rehypePlugins,
|
|
152
|
-
workspace?.base.kind,
|
|
153
|
-
workspace?.base.path,
|
|
154
|
-
workspace?.root
|
|
155
|
-
]);
|
|
150
|
+
const resolvedRehypePlugins = React.useMemo(() => rehypePlugins ?? (workspace ? createWorkspaceRehypePlugins(workspace.root, workspace.base) : void 0), [rehypePlugins, workspace]);
|
|
156
151
|
return /* @__PURE__ */ jsx(Streamdown, {
|
|
157
152
|
className: cx("message__response", className),
|
|
158
153
|
components: mergedComponents,
|
|
@@ -212,13 +207,14 @@ function MessageActions({ className, children, ref, ...props }) {
|
|
|
212
207
|
* A single icon button inside {@link MessageActions}. Always has an accessible
|
|
213
208
|
* name; shows a tooltip on hover/focus when {@link tooltip} is set.
|
|
214
209
|
*/
|
|
215
|
-
function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "
|
|
210
|
+
function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "sm", children, ref, ...props }) {
|
|
216
211
|
const button = /* @__PURE__ */ jsx(Button, {
|
|
217
212
|
ref,
|
|
218
213
|
type: "button",
|
|
219
214
|
variant,
|
|
220
215
|
color,
|
|
221
216
|
size,
|
|
217
|
+
iconOnly: true,
|
|
222
218
|
className: cx("message__action", className),
|
|
223
219
|
"aria-label": label ?? tooltip,
|
|
224
220
|
...props,
|
|
@@ -254,9 +250,8 @@ function useMessageBranch(component) {
|
|
|
254
250
|
* branch is active and exposes navigation through {@link MessageBranchSelector},
|
|
255
251
|
* {@link MessageBranchPrevious}, {@link MessageBranchNext}, and {@link MessageBranchPage}.
|
|
256
252
|
*/
|
|
257
|
-
function MessageBranch({ className, defaultBranch = 0, branch, onBranchChange, children, ref, ...props }) {
|
|
253
|
+
function MessageBranch({ className, branchCount, defaultBranch = 0, branch, onBranchChange, children, ref, ...props }) {
|
|
258
254
|
const [internalIndex, setInternalIndex] = React.useState(defaultBranch);
|
|
259
|
-
const [branchCount, setBranchCount] = React.useState(0);
|
|
260
255
|
const isControlled = branch !== void 0;
|
|
261
256
|
const branchIndex = isControlled ? branch : internalIndex;
|
|
262
257
|
const setBranchIndex = React.useCallback((next) => {
|
|
@@ -266,8 +261,7 @@ function MessageBranch({ className, defaultBranch = 0, branch, onBranchChange, c
|
|
|
266
261
|
const ctx = React.useMemo(() => ({
|
|
267
262
|
branchIndex,
|
|
268
263
|
branchCount,
|
|
269
|
-
setBranchIndex
|
|
270
|
-
registerCount: setBranchCount
|
|
264
|
+
setBranchIndex
|
|
271
265
|
}), [
|
|
272
266
|
branchCount,
|
|
273
267
|
branchIndex,
|
|
@@ -288,11 +282,8 @@ function MessageBranch({ className, defaultBranch = 0, branch, onBranchChange, c
|
|
|
288
282
|
* alternative versions of the same response.
|
|
289
283
|
*/
|
|
290
284
|
function MessageBranchContent({ className, children, ref, ...props }) {
|
|
291
|
-
const { branchIndex
|
|
285
|
+
const { branchIndex } = useMessageBranch("MessageBranchContent");
|
|
292
286
|
const items = React.Children.toArray(children);
|
|
293
|
-
React.useEffect(() => {
|
|
294
|
-
registerCount(items.length);
|
|
295
|
-
}, [items.length, registerCount]);
|
|
296
287
|
const safeIndex = items.length === 0 ? 0 : Math.min(Math.max(branchIndex, 0), items.length - 1);
|
|
297
288
|
return /* @__PURE__ */ jsx("div", {
|
|
298
289
|
ref,
|
|
@@ -320,7 +311,7 @@ function MessageBranchSelector({ className, children, ref, ...props }) {
|
|
|
320
311
|
});
|
|
321
312
|
}
|
|
322
313
|
/** Button that selects the previous branch. Disabled at the first branch. */
|
|
323
|
-
function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "
|
|
314
|
+
function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
324
315
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchPrevious");
|
|
325
316
|
return /* @__PURE__ */ jsx(Button, {
|
|
326
317
|
ref,
|
|
@@ -328,6 +319,7 @@ function MessageBranchPrevious({ className, label = "Previous response", variant
|
|
|
328
319
|
variant,
|
|
329
320
|
color,
|
|
330
321
|
size,
|
|
322
|
+
iconOnly: true,
|
|
331
323
|
disabled: branchCount <= 1,
|
|
332
324
|
className: cx("message__branch-prev", className),
|
|
333
325
|
"aria-label": label,
|
|
@@ -340,7 +332,7 @@ function MessageBranchPrevious({ className, label = "Previous response", variant
|
|
|
340
332
|
});
|
|
341
333
|
}
|
|
342
334
|
/** Button that selects the next branch. Disabled at the last branch. */
|
|
343
|
-
function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "
|
|
335
|
+
function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
344
336
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchNext");
|
|
345
337
|
return /* @__PURE__ */ jsx(Button, {
|
|
346
338
|
ref,
|
|
@@ -348,6 +340,7 @@ function MessageBranchNext({ className, label = "Next response", variant = "ghos
|
|
|
348
340
|
variant,
|
|
349
341
|
color,
|
|
350
342
|
size,
|
|
343
|
+
iconOnly: true,
|
|
351
344
|
disabled: branchCount <= 1,
|
|
352
345
|
className: cx("message__branch-next", className),
|
|
353
346
|
"aria-label": label,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "./class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
+
import { U as SearchIcon, u as ChevronDownIcon } from "./icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./components/Button.js";
|
|
4
4
|
import { Dialog } from "./components/Dialog.js";
|
|
5
5
|
import { Separator } from "./components/Separator.js";
|
|
@@ -256,23 +256,16 @@ function useModelSelectorContext() {
|
|
|
256
256
|
* ```
|
|
257
257
|
*/
|
|
258
258
|
function ModelSelector({ open, defaultOpen = false, onOpenChange, children, className, ref, ...props }) {
|
|
259
|
-
const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
|
|
260
259
|
const [query, setQuery] = React.useState("");
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
if (!isControlled) setInternalOpen(next);
|
|
265
|
-
onOpenChange?.(next);
|
|
260
|
+
const handleOpenChange = React.useCallback((...args) => {
|
|
261
|
+
const [next] = args;
|
|
262
|
+
onOpenChange?.(...args);
|
|
266
263
|
if (!next) setQuery("");
|
|
267
|
-
}, [
|
|
268
|
-
const onSelectItem = React.useCallback(() => {
|
|
269
|
-
handleOpenChange(false);
|
|
270
|
-
}, [handleOpenChange]);
|
|
264
|
+
}, [onOpenChange]);
|
|
271
265
|
const ctxValue = React.useMemo(() => ({
|
|
272
266
|
query,
|
|
273
|
-
setQuery
|
|
274
|
-
|
|
275
|
-
}), [query, onSelectItem]);
|
|
267
|
+
setQuery
|
|
268
|
+
}), [query]);
|
|
276
269
|
return /* @__PURE__ */ jsx(ModelSelectorContext.Provider, {
|
|
277
270
|
value: ctxValue,
|
|
278
271
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -280,7 +273,8 @@ function ModelSelector({ open, defaultOpen = false, onOpenChange, children, clas
|
|
|
280
273
|
className: cx("model-selector", className),
|
|
281
274
|
...props,
|
|
282
275
|
children: /* @__PURE__ */ jsx(Dialog.Root, {
|
|
283
|
-
open
|
|
276
|
+
open,
|
|
277
|
+
defaultOpen,
|
|
284
278
|
onOpenChange: handleOpenChange,
|
|
285
279
|
children
|
|
286
280
|
})
|
|
@@ -302,9 +296,10 @@ function CloudflareModelSelector({ models, selectedModelId = null, onSelectModel
|
|
|
302
296
|
const typedModelId = query.trim();
|
|
303
297
|
const showTypedModel = allowTypedModel && isCloudflareRunnableModelId(typedModelId) && typedModelId !== selectedModelId && !optionIds.has(typedModelId);
|
|
304
298
|
return /* @__PURE__ */ jsxs(ModelSelector, {
|
|
305
|
-
onOpenChange: React.useCallback((
|
|
299
|
+
onOpenChange: React.useCallback((...args) => {
|
|
300
|
+
const [nextOpen] = args;
|
|
306
301
|
if (!nextOpen) setQuery("");
|
|
307
|
-
onOpenChange?.(
|
|
302
|
+
onOpenChange?.(...args);
|
|
308
303
|
}, [onOpenChange]),
|
|
309
304
|
...props,
|
|
310
305
|
children: [/* @__PURE__ */ jsx(ModelSelectorTrigger, {
|
|
@@ -431,13 +426,11 @@ function ModelSelectorGroup({ className, label, children, ref, ...props }) {
|
|
|
431
426
|
});
|
|
432
427
|
}
|
|
433
428
|
function ModelSelectorItem({ className, value, keywords, selected, onSelect, children, onClick, ref, ...props }) {
|
|
434
|
-
const { onSelectItem } = useModelSelectorContext();
|
|
435
429
|
const handleClick = (e) => {
|
|
436
430
|
onSelect?.(value);
|
|
437
|
-
onSelectItem();
|
|
438
431
|
onClick?.(e);
|
|
439
432
|
};
|
|
440
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
433
|
+
return /* @__PURE__ */ jsx(Dialog.Close, { render: /* @__PURE__ */ jsx(Button, {
|
|
441
434
|
ref,
|
|
442
435
|
variant: "ghost",
|
|
443
436
|
color: "neutral",
|
|
@@ -447,7 +440,7 @@ function ModelSelectorItem({ className, value, keywords, selected, onSelect, chi
|
|
|
447
440
|
onClick: handleClick,
|
|
448
441
|
...props,
|
|
449
442
|
children
|
|
450
|
-
});
|
|
443
|
+
}) });
|
|
451
444
|
}
|
|
452
445
|
function ModelSelectorEmpty({ className, children = "No models found", ref, ...props }) {
|
|
453
446
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
2
|
-
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "./Select-
|
|
3
|
-
import {
|
|
1
|
+
import { r as ButtonProps } from "./Button-DLGzHsjc.js";
|
|
2
|
+
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "./Select-B_13gg_J.js";
|
|
3
|
+
import { a as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "./Tabs-ColWK-XA.js";
|
|
4
4
|
import { t as Combobox } from "./Combobox-CYc37s5l.js";
|
|
5
5
|
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-L6MZm-7N.js";
|
|
6
6
|
import * as React from "react";
|
|
@@ -226,6 +226,7 @@ declare function PromptInputButton({
|
|
|
226
226
|
variant,
|
|
227
227
|
color,
|
|
228
228
|
size,
|
|
229
|
+
iconOnly,
|
|
229
230
|
children,
|
|
230
231
|
"aria-label": ariaLabel,
|
|
231
232
|
ref,
|
|
@@ -335,8 +336,6 @@ interface PromptInputSubmitProps extends Omit<ButtonProps, "children" | "type">
|
|
|
335
336
|
onStop?: () => void;
|
|
336
337
|
children?: React.ReactNode;
|
|
337
338
|
label?: string;
|
|
338
|
-
/** Allow a composed follow-up to submit while a response is active. */
|
|
339
|
-
allowSubmitWhileBusy?: boolean;
|
|
340
339
|
/** Whether the composer currently contains text, references, or attachments. */
|
|
341
340
|
hasContent?: boolean;
|
|
342
341
|
}
|
|
@@ -350,7 +349,6 @@ declare function PromptInputSubmit({
|
|
|
350
349
|
onClick,
|
|
351
350
|
children,
|
|
352
351
|
label,
|
|
353
|
-
allowSubmitWhileBusy,
|
|
354
352
|
hasContent,
|
|
355
353
|
ref,
|
|
356
354
|
...props
|
|
@@ -7,9 +7,9 @@ interface SelectLabelProps extends Select.Label.Props {}
|
|
|
7
7
|
interface SelectTriggerProps extends Select.Trigger.Props {
|
|
8
8
|
/**
|
|
9
9
|
* The size of the select trigger.
|
|
10
|
-
* @default '
|
|
10
|
+
* @default 'sm'
|
|
11
11
|
*/
|
|
12
|
-
size?: "sm" | "md"
|
|
12
|
+
size?: "sm" | "md";
|
|
13
13
|
}
|
|
14
14
|
interface SelectValueProps extends Omit<Select.Value.Props, "children"> {
|
|
15
15
|
placeholder?: string;
|
|
@@ -14,6 +14,7 @@ interface TabsListProps extends Tabs.List.Props {
|
|
|
14
14
|
}
|
|
15
15
|
interface TabProps extends Tabs.Tab.Props {}
|
|
16
16
|
interface TabPanelProps extends Tabs.Panel.Props {}
|
|
17
|
+
interface TabsIndicatorProps extends Tabs.Indicator.Props {}
|
|
17
18
|
/**
|
|
18
19
|
* A tabs component for organizing content into separate views.
|
|
19
20
|
*
|
|
@@ -55,6 +56,13 @@ declare function Tab({
|
|
|
55
56
|
}: TabProps & {
|
|
56
57
|
ref?: React.Ref<HTMLButtonElement>;
|
|
57
58
|
}): React.JSX.Element;
|
|
59
|
+
declare function TabsIndicator({
|
|
60
|
+
className,
|
|
61
|
+
ref,
|
|
62
|
+
...props
|
|
63
|
+
}: TabsIndicatorProps & {
|
|
64
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
65
|
+
}): React.JSX.Element;
|
|
58
66
|
declare function TabPanel({
|
|
59
67
|
className,
|
|
60
68
|
ref,
|
|
@@ -66,8 +74,8 @@ declare const Tabs$1: {
|
|
|
66
74
|
Root: typeof TabsRoot;
|
|
67
75
|
List: typeof TabsList;
|
|
68
76
|
Tab: typeof Tab;
|
|
69
|
-
Indicator:
|
|
77
|
+
Indicator: typeof TabsIndicator;
|
|
70
78
|
Panel: typeof TabPanel;
|
|
71
79
|
};
|
|
72
80
|
//#endregion
|
|
73
|
-
export {
|
|
81
|
+
export { TabsListProps as a, TabsIndicatorProps as i, TabProps as n, TabsProps as o, Tabs$1 as r, TabPanelProps as t };
|