@mcp-b/react-components 0.16.1 → 0.17.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/{AgentChat-CrlpbvQJ.d.ts → AgentChat-CRuMi1Pb.d.ts} +4 -10
- package/dist/AgentMessageParts-CyD2UB3V.d.ts +46 -0
- package/dist/AgentToolRunsContext-BVe4stgw.d.ts +21 -0
- package/dist/{CodeBlock-BmB4Xaqq.js → CodeBlock-Co1noLbC.js} +2 -2
- package/dist/{CodeBlock-BRajW4QU.d.ts → CodeBlock-Dnpr88ZQ.d.ts} +2 -2
- package/dist/Collapsible-N64ASIQr.d.ts +119 -0
- package/dist/{Combobox-B9Fcd6q-.d.ts → Combobox-CYc37s5l.d.ts} +11 -33
- package/dist/{FileTree-CkVbIMWV.js → FileTree-B7bBsUyU.js} +7 -7
- package/dist/{Menu-Bgu-ufb5.d.ts → Menu-L6MZm-7N.d.ts} +15 -56
- package/dist/{Message-BkMdE3bS.js → Message-C4eYRogZ.js} +3 -3
- package/dist/{ModelSelector-SlJNgwKY.js → ModelSelector-BNrZlY_Y.js} +5 -5
- package/dist/{PromptInput-BWTuXMOD.d.ts → PromptInput-OLfXPuHM.d.ts} +39 -67
- package/dist/{ResponsiveSidebarShell-Dd9DCcBT.d.ts → ResponsiveSidebarShell-CsAh4NyL.d.ts} +1 -0
- package/dist/{Select-BeEsefzh.d.ts → Select-CwSqP07Y.d.ts} +14 -42
- package/dist/{Tabs-3Zc4tb9D.d.ts → Tabs-9zddXDQo.d.ts} +5 -19
- package/dist/{ThinkChat-CzC-zNGA.js → ThinkChat-DInElus-.js} +53 -26
- package/dist/{ThinkChatActivity-BFQnb2ct.d.ts → ThinkChatActivity-BgesTfZ4.d.ts} +12 -4
- package/dist/{ThinkChatContext-C3Eb1Xpi.d.ts → ThinkChatContext-DrsZqdaO.d.ts} +1 -1
- package/dist/ThinkRecoveryNotice-DFIcG9UX.d.ts +19 -0
- package/dist/{Toggle-CAAlNl-M.d.ts → Toggle-DaXpe1Lc.d.ts} +1 -1
- package/dist/{ToggleGroup-8hPv-b69.d.ts → ToggleGroup-yseEWkOC.d.ts} +3 -4
- package/dist/{Workspace-D39LxGvP.d.ts → Workspace-C9RFoxcu.d.ts} +1 -1
- package/dist/WorkspaceExplorer-sZewzT2O.d.ts +32 -0
- package/dist/{WorkspaceFile-DOZkPwzu.d.ts → WorkspaceFile-C8UzuSH4.d.ts} +1 -1
- package/dist/{WorkspaceFileView-rSN_yT0L.js → WorkspaceFileView-DNdGAEiX.js} +5 -5
- package/dist/{WorkspaceLink-DIPbXrUM.js → WorkspaceLink-B1ykV1dS.js} +15 -29
- package/dist/class-names-Bk-QLWWI.js +11 -0
- package/dist/components/Accordion.d.ts +5 -15
- package/dist/components/Accordion.js +11 -10
- package/dist/components/Activity.d.ts +5 -10
- package/dist/components/Activity.js +2 -2
- package/dist/components/AgentActivity.js +1 -1
- package/dist/components/AgentActivityPreview.js +2 -2
- package/dist/components/AgentAttention.d.ts +1 -1
- package/dist/components/AgentAttention.js +1 -1
- package/dist/components/AgentChat.d.ts +2 -2
- package/dist/components/AgentChat.js +27 -164
- package/dist/components/AgentChatMessageEditor.js +1 -1
- package/dist/components/AgentConnection.js +4 -4
- package/dist/components/AgentMessageParts.d.ts +2 -0
- package/dist/components/AgentMessageParts.js +119 -0
- package/dist/components/AgentToolDetail.d.ts +55 -0
- package/dist/components/AgentToolDetail.js +98 -0
- package/dist/components/AgentToolRunsContext.d.ts +2 -0
- package/dist/components/AgentToolRunsContext.js +16 -0
- package/dist/components/AlertDialog.d.ts +7 -19
- package/dist/components/AlertDialog.js +21 -32
- package/dist/components/AppTopBar.d.ts +4 -1
- package/dist/components/AppTopBar.js +5 -5
- package/dist/components/Approval.d.ts +102 -0
- package/dist/components/Approval.js +227 -0
- package/dist/components/Artifact.d.ts +2 -4
- package/dist/components/Artifact.js +3 -3
- package/dist/components/Autocomplete.d.ts +11 -33
- package/dist/components/Autocomplete.js +23 -30
- package/dist/components/Avatar.d.ts +3 -11
- package/dist/components/Avatar.js +13 -12
- package/dist/components/BrowserLiveView.js +2 -2
- package/dist/components/BrowserReplay.js +2 -2
- package/dist/components/BrowserRunPanel.js +58 -78
- package/dist/components/Button.js +4 -9
- package/dist/components/ChainOfThought.d.ts +5 -11
- package/dist/components/ChainOfThought.js +3 -2
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +2 -4
- package/dist/components/Checkbox.js +6 -5
- package/dist/components/CheckboxGroup.d.ts +1 -3
- package/dist/components/CheckboxGroup.js +15 -14
- package/dist/components/Checkpoint.d.ts +64 -0
- package/dist/components/Checkpoint.js +63 -0
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +1 -1
- package/dist/components/CodexModelSelector.js +2 -2
- package/dist/components/Collapsible.d.ts +1 -124
- package/dist/components/Collapsible.js +7 -10
- package/dist/components/Combobox.d.ts +1 -1
- package/dist/components/Combobox.js +23 -30
- package/dist/components/Commit.d.ts +5 -11
- package/dist/components/Commit.js +6 -5
- package/dist/components/Context.js +1 -1
- package/dist/components/ContextMenu.d.ts +21 -37
- package/dist/components/ContextMenu.js +34 -51
- package/dist/components/Conversation.d.ts +2 -4
- package/dist/components/Conversation.js +2 -2
- package/dist/components/DescriptionListParts.js +1 -1
- package/dist/components/Dialog.d.ts +6 -17
- package/dist/components/Dialog.js +17 -24
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +4 -3
- package/dist/components/Field.d.ts +17 -20
- package/dist/components/Field.js +16 -16
- package/dist/components/Fieldset.d.ts +2 -7
- package/dist/components/Fieldset.js +7 -6
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.d.ts +1 -4
- package/dist/components/Form.js +3 -2
- package/dist/components/GithubMotionMark.js +1 -1
- package/dist/components/InlineCitation.d.ts +66 -0
- package/dist/components/InlineCitation.js +142 -0
- package/dist/components/Input.d.ts +1 -4
- package/dist/components/Input.js +3 -2
- package/dist/components/Marker.js +1 -1
- package/dist/components/McpConnectionRequest.js +2 -2
- package/dist/components/McpServerPicker.d.ts +1 -1
- package/dist/components/McpServerPicker.js +6 -5
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Menu.js +33 -52
- package/dist/components/Menubar.d.ts +22 -43
- package/dist/components/Menubar.js +36 -53
- package/dist/components/Message.d.ts +3 -6
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +3 -3
- package/dist/components/Meter.d.ts +5 -20
- package/dist/components/Meter.js +11 -10
- package/dist/components/ModelSelector.d.ts +2 -6
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +11 -33
- package/dist/components/NavigationMenu.js +23 -30
- package/dist/components/NumberField.d.ts +6 -24
- package/dist/components/NumberField.js +13 -12
- package/dist/components/Plan.d.ts +103 -0
- package/dist/components/Plan.js +113 -0
- package/dist/components/Popover.d.ts +9 -36
- package/dist/components/Popover.js +23 -34
- package/dist/components/PreviewCard.d.ts +6 -24
- package/dist/components/PreviewCard.js +13 -24
- package/dist/components/PricingBillingToggle.js +1 -1
- package/dist/components/PricingFAQ.js +1 -1
- package/dist/components/PricingPlanCard.js +3 -3
- package/dist/components/PricingUsageCalculator.js +2 -2
- package/dist/components/Progress.d.ts +3 -8
- package/dist/components/Progress.js +7 -10
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +52 -200
- package/dist/components/Queue.d.ts +6 -16
- package/dist/components/Queue.js +2 -2
- package/dist/components/RadioGroup.d.ts +3 -8
- package/dist/components/RadioGroup.js +7 -10
- package/dist/components/Reasoning.d.ts +4 -8
- package/dist/components/Reasoning.js +3 -3
- package/dist/components/ResizableSidePanel.js +2 -2
- package/dist/components/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/ResponsiveSidebarShell.js +4 -3
- package/dist/components/ScrollArea.d.ts +5 -20
- package/dist/components/ScrollArea.js +11 -10
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +32 -55
- package/dist/components/Separator.d.ts +1 -5
- package/dist/components/Separator.js +3 -6
- package/dist/components/Slider.d.ts +6 -19
- package/dist/components/Slider.js +15 -14
- package/dist/components/Sources.d.ts +4 -9
- package/dist/components/Sources.js +3 -2
- package/dist/components/Stepper.js +2 -2
- package/dist/components/SubagentRunDetails.js +1 -1
- package/dist/components/SubagentRunIndicator.js +2 -2
- package/dist/components/SubagentRunList.js +1 -2
- package/dist/components/SubagentRunSelector.d.ts +2 -11
- package/dist/components/SubagentRunSelector.js +16 -15
- package/dist/components/Switch.d.ts +2 -5
- package/dist/components/Switch.js +5 -8
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +10 -16
- package/dist/components/Task.d.ts +4 -9
- package/dist/components/Task.js +4 -3
- package/dist/components/Terminal.d.ts +2 -3
- package/dist/components/Terminal.js +3 -3
- package/dist/components/TestResults.d.ts +4 -9
- package/dist/components/TestResults.js +3 -2
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +21 -11
- package/dist/components/ThinkChat.js +5 -3
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +26 -7
- package/dist/components/ThinkChatContext.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +2 -2
- package/dist/components/ThinkExecutionDetail.js +2 -2
- package/dist/components/ThinkExecutionStatus.js +2 -2
- package/dist/components/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/ThinkFullApp.d.ts +33 -9
- package/dist/components/ThinkFullApp.js +98 -69
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkFullAppViewSwitch.js +2 -2
- package/dist/components/ThinkPendingApproval.d.ts +60 -0
- package/dist/components/ThinkPendingApproval.js +99 -0
- package/dist/components/ThinkRecoveryNotice.d.ts +2 -0
- package/dist/components/ThinkRecoveryNotice.js +40 -0
- package/dist/components/ThinkRoutine.js +1 -0
- package/dist/components/ThinkRoutineBrowser.js +6 -6
- package/dist/components/ThinkRoutineDetail.js +1 -1
- package/dist/components/ThinkRoutineForm.js +2 -2
- package/dist/components/ThinkRoutineLibrary.d.ts +9 -0
- package/dist/components/ThinkRoutineLibrary.js +67 -20
- package/dist/components/ThinkRoutineRuns.js +1 -1
- package/dist/components/ThinkThreadPicker.js +2 -2
- package/dist/components/ThinkThreadShell.d.ts +1 -1
- package/dist/components/Toast.d.ts +7 -28
- package/dist/components/Toast.js +15 -14
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +5 -5
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +8 -15
- package/dist/components/ToolApproval.d.ts +28 -0
- package/dist/components/ToolApproval.js +35 -0
- package/dist/components/ToolInvocation.d.ts +26 -0
- package/dist/components/ToolInvocation.js +72 -0
- package/dist/components/Toolbar.d.ts +6 -24
- package/dist/components/Toolbar.js +13 -12
- package/dist/components/Tooltip.d.ts +3 -9
- package/dist/components/Tooltip.js +7 -10
- package/dist/components/WebPreview.d.ts +1 -2
- package/dist/components/WebPreview.js +4 -3
- package/dist/components/Workspace.d.ts +1 -1
- package/dist/components/Workspace.js +5 -20
- package/dist/components/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +3 -31
- package/dist/components/WorkspaceExplorer.js +3 -3
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +1 -1
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.js +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-DtPMgN7e.d.ts → copy-button-CQx3LQAC.d.ts} +1 -2
- package/dist/{copy-button-Dejn5heL.js → copy-button-cYsJBauI.js} +1 -1
- package/dist/{icons-CpfUer49.js → icons--FqCZEc3.js} +3 -2
- package/dist/{icons-GQd1xF4e.d.ts → icons-DpUqY8Mp.d.ts} +6 -1
- package/dist/styles/agent-activity-preview.css +4 -0
- package/dist/styles/agent-chat.css +0 -41
- package/dist/styles/agent-connection.css +0 -12
- package/dist/styles/agent-tool-detail.css +54 -0
- package/dist/styles/approval.css +172 -0
- package/dist/styles/artifact.css +0 -12
- package/dist/styles/browser-run-panel.css +5 -2
- package/dist/styles/chain-of-thought.css +0 -8
- package/dist/styles/checkpoint.css +58 -0
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/commit.css +0 -21
- package/dist/styles/context-menu.css +0 -8
- package/dist/styles/environment-variables.css +0 -13
- package/dist/styles/file-tree.css +0 -16
- package/dist/styles/index.css +8 -4
- package/dist/styles/inline-citation.css +107 -0
- package/dist/styles/mcp-server-picker.css +0 -30
- package/dist/styles/menu.css +0 -29
- package/dist/styles/menubar.css +0 -8
- package/dist/styles/message-scroller.css +0 -12
- package/dist/styles/message.css +0 -12
- package/dist/styles/model-selector.css +0 -20
- package/dist/styles/plan.css +127 -0
- package/dist/styles/popover.css +0 -36
- package/dist/styles/prompt-input.css +2 -195
- package/dist/styles/recipes.css +114 -5
- package/dist/styles/responsive-sidebar-shell.css +16 -19
- package/dist/styles/sources.css +0 -8
- package/dist/styles/subagent-run.css +12 -70
- package/dist/styles/task.css +0 -16
- package/dist/styles/test-results.css +0 -13
- package/dist/styles/think-full-app.css +12 -38
- package/dist/styles/think-routine-library.css +12 -20
- package/dist/styles/think-thread-picker.css +15 -0
- package/dist/styles/toast.css +0 -7
- package/dist/styles/utilities.css +31 -0
- package/dist/styles/web-preview.css +0 -21
- package/dist/styles/workspace-explorer.css +5 -55
- package/dist/think-agent-Cip5KAPj.d.ts +7 -0
- package/dist/utils/codex-model-catalog.d.ts +4 -4
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-path-L_KmjRjq.js +26 -0
- package/package.json +3 -4
- package/dist/class-names-9UtZwb0J.js +0 -12
- package/dist/components/AppFrame.d.ts +0 -24
- package/dist/components/AppFrame.js +0 -25
- package/dist/components/Shell.d.ts +0 -163
- package/dist/components/Shell.js +0 -137
- package/dist/components/SubagentRun.d.ts +0 -86
- package/dist/components/SubagentRun.js +0 -108
- package/dist/styles/app-frame.css +0 -15
- package/dist/styles/shell.css +0 -122
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
|
|
@@ -31,8 +32,8 @@ const PreviewCardRoot = (props) => {
|
|
|
31
32
|
/**
|
|
32
33
|
* Link element that triggers the preview card on hover.
|
|
33
34
|
*/
|
|
34
|
-
function PreviewCardTrigger({ className
|
|
35
|
-
const classes = ["preview-card__trigger"
|
|
35
|
+
function PreviewCardTrigger({ className, ref, ...props }) {
|
|
36
|
+
const classes = mergeBaseClassName(["preview-card__trigger"].filter(Boolean).join(" "), className);
|
|
36
37
|
return /* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
|
|
37
38
|
ref,
|
|
38
39
|
"data-slot": "hover-card-trigger",
|
|
@@ -52,12 +53,8 @@ const PreviewCardPortal = (props) => {
|
|
|
52
53
|
/**
|
|
53
54
|
* Optional backdrop behind the preview card.
|
|
54
55
|
*/
|
|
55
|
-
function PreviewCardBackdrop({ className
|
|
56
|
-
const classes = [
|
|
57
|
-
"preview-card__backdrop",
|
|
58
|
-
"base-ui-backdrop",
|
|
59
|
-
className
|
|
60
|
-
].filter(Boolean).join(" ");
|
|
56
|
+
function PreviewCardBackdrop({ className, ref, ...props }) {
|
|
57
|
+
const classes = mergeBaseClassName(["preview-card__backdrop", "base-ui-backdrop"].filter(Boolean).join(" "), className);
|
|
61
58
|
return /* @__PURE__ */ jsx(PreviewCard$1.Backdrop, {
|
|
62
59
|
ref,
|
|
63
60
|
"data-slot": "hover-card-backdrop",
|
|
@@ -68,12 +65,8 @@ function PreviewCardBackdrop({ className = "", ref, ...props }) {
|
|
|
68
65
|
/**
|
|
69
66
|
* Positions the preview card relative to the trigger.
|
|
70
67
|
*/
|
|
71
|
-
function PreviewCardPositioner({ className
|
|
72
|
-
const classes = [
|
|
73
|
-
"preview-card__positioner",
|
|
74
|
-
"base-ui-positioner",
|
|
75
|
-
className
|
|
76
|
-
].filter(Boolean).join(" ");
|
|
68
|
+
function PreviewCardPositioner({ className, ref, ...props }) {
|
|
69
|
+
const classes = mergeBaseClassName(["preview-card__positioner", "base-ui-positioner"].filter(Boolean).join(" "), className);
|
|
77
70
|
return /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
|
|
78
71
|
ref,
|
|
79
72
|
"data-slot": "hover-card-positioner",
|
|
@@ -84,12 +77,8 @@ function PreviewCardPositioner({ className = "", ref, ...props }) {
|
|
|
84
77
|
/**
|
|
85
78
|
* Container for preview card content.
|
|
86
79
|
*/
|
|
87
|
-
function PreviewCardPopup({ className
|
|
88
|
-
const classes = [
|
|
89
|
-
"preview-card__popup",
|
|
90
|
-
"base-ui-popup",
|
|
91
|
-
className
|
|
92
|
-
].filter(Boolean).join(" ");
|
|
80
|
+
function PreviewCardPopup({ className, ref, ...props }) {
|
|
81
|
+
const classes = mergeBaseClassName(["preview-card__popup", "base-ui-popup"].filter(Boolean).join(" "), className);
|
|
93
82
|
return /* @__PURE__ */ jsx(PreviewCard$1.Popup, {
|
|
94
83
|
ref,
|
|
95
84
|
"data-slot": "hover-card-content",
|
|
@@ -102,8 +91,8 @@ function PreviewCardPopup({ className = "", ref, ...props }) {
|
|
|
102
91
|
* between triggers. Pair the adaptive classes from `base-ui-motion.css` with
|
|
103
92
|
* the positioner, popup, and this viewport when that behavior is needed.
|
|
104
93
|
*/
|
|
105
|
-
function PreviewCardViewport({ className
|
|
106
|
-
const classes = ["preview-card__viewport"
|
|
94
|
+
function PreviewCardViewport({ className, ref, ...props }) {
|
|
95
|
+
const classes = mergeBaseClassName(["preview-card__viewport"].filter(Boolean).join(" "), className);
|
|
107
96
|
return /* @__PURE__ */ jsx(PreviewCard$1.Viewport, {
|
|
108
97
|
ref,
|
|
109
98
|
"data-slot": "hover-card-viewport",
|
|
@@ -114,8 +103,8 @@ function PreviewCardViewport({ className = "", ref, ...props }) {
|
|
|
114
103
|
/**
|
|
115
104
|
* Decorative arrow pointing to the trigger.
|
|
116
105
|
*/
|
|
117
|
-
function PreviewCardArrow({ className
|
|
118
|
-
const classes = ["preview-card__arrow"
|
|
106
|
+
function PreviewCardArrow({ className, ref, ...props }) {
|
|
107
|
+
const classes = mergeBaseClassName(["preview-card__arrow"].filter(Boolean).join(" "), className);
|
|
119
108
|
return /* @__PURE__ */ jsx(PreviewCard$1.Arrow, {
|
|
120
109
|
ref,
|
|
121
110
|
"data-slot": "hover-card-arrow",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
1
2
|
import { Accordion } from "./Accordion.js";
|
|
2
|
-
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/PricingFAQ.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
|
+
import { C as InfoIcon, k as MinusIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Separator } from "./Separator.js";
|
|
5
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
|
+
import { Separator } from "./Separator.js";
|
|
6
6
|
import { Badge } from "./Badge.js";
|
|
7
7
|
import { Card } from "./Card.js";
|
|
8
8
|
import { getPlanPrice, getPlanYearlySavings } from "./Pricing.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
2
|
import { Separator } from "./Separator.js";
|
|
3
|
+
import { Progress } from "./Progress.js";
|
|
3
4
|
import { Slider } from "./Slider.js";
|
|
4
5
|
import { Card } from "./Card.js";
|
|
5
6
|
import { formatPricingUsage, getUsagePrice } from "./Pricing.js";
|
|
6
|
-
import { Progress } from "./Progress.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/PricingUsageCalculator.tsx
|
|
@@ -3,20 +3,15 @@ import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/Progress.d.ts
|
|
5
5
|
type ProgressColor = "primary" | "success" | "warning" | "destructive";
|
|
6
|
-
interface ProgressProps extends
|
|
7
|
-
className?: string;
|
|
6
|
+
interface ProgressProps extends React.ComponentPropsWithRef<typeof Progress$1.Root> {
|
|
8
7
|
/**
|
|
9
8
|
* The semantic color of the progress bar.
|
|
10
9
|
* @default 'primary'
|
|
11
10
|
*/
|
|
12
11
|
color?: ProgressColor;
|
|
13
12
|
}
|
|
14
|
-
interface ProgressTrackProps extends
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
interface ProgressIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof Progress$1.Indicator>, "className"> {
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
13
|
+
interface ProgressTrackProps extends React.ComponentPropsWithRef<typeof Progress$1.Track> {}
|
|
14
|
+
interface ProgressIndicatorProps extends React.ComponentPropsWithRef<typeof Progress$1.Indicator> {}
|
|
20
15
|
/**
|
|
21
16
|
* A progress indicator component for showing completion status.
|
|
22
17
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
@@ -16,12 +17,8 @@ import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
|
16
17
|
*
|
|
17
18
|
* @see {@link https://base-ui.com/react/components/progress | Base UI Progress}
|
|
18
19
|
*/
|
|
19
|
-
function ProgressRoot({ color = "primary", className
|
|
20
|
-
const classes = [
|
|
21
|
-
"progress",
|
|
22
|
-
`progress--${color}`,
|
|
23
|
-
className
|
|
24
|
-
].filter(Boolean).join(" ");
|
|
20
|
+
function ProgressRoot({ color = "primary", className, ref, ...props }) {
|
|
21
|
+
const classes = mergeBaseClassName(["progress", `progress--${color}`].filter(Boolean).join(" "), className);
|
|
25
22
|
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
26
23
|
ref,
|
|
27
24
|
"data-slot": "progress",
|
|
@@ -29,8 +26,8 @@ function ProgressRoot({ color = "primary", className = "", ref, ...props }) {
|
|
|
29
26
|
...props
|
|
30
27
|
});
|
|
31
28
|
}
|
|
32
|
-
function ProgressTrack({ className
|
|
33
|
-
const classes = ["progress__track"
|
|
29
|
+
function ProgressTrack({ className, ref, ...props }) {
|
|
30
|
+
const classes = mergeBaseClassName(["progress__track"].filter(Boolean).join(" "), className);
|
|
34
31
|
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
35
32
|
ref,
|
|
36
33
|
"data-slot": "progress-track",
|
|
@@ -38,8 +35,8 @@ function ProgressTrack({ className = "", ref, ...props }) {
|
|
|
38
35
|
...props
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
|
-
function ProgressIndicator({ className
|
|
42
|
-
const classes = ["progress__indicator"
|
|
38
|
+
function ProgressIndicator({ className, ref, ...props }) {
|
|
39
|
+
const classes = mergeBaseClassName(["progress__indicator"].filter(Boolean).join(" "), className);
|
|
43
40
|
return /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
44
41
|
ref,
|
|
45
42
|
"data-slot": "progress-indicator",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AttachmentsContext,
|
|
1
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as getApprovalRequestId, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as useProviderAttachments, H as PromptInputCommandListProps, Ht as getPendingToolApprovals, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as TextInputContext, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as usePromptInputAttachments, V as PromptInputCommandList, Vt as getApprovalStateKey, W as PromptInputCommandSeparator, Wt as usePromptInputController, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as TooltipSide } from "../PromptInput-OLfXPuHM.js";
|
|
2
|
+
export { AttachmentsContext, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputApproval, PromptInputApprovalProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandGroupLabelProps, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputReferences, PromptInputReferencesProps, PromptInputSelect, PromptInputSelectProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, TextInputContext, TooltipSide, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
|
+
import { A as MonitorIcon, H as SquareIcon, I as PlusIcon, J as WarningIcon, M as PaperclipIcon, O as MicrophoneIcon, V as SpinnerIcon, W as StopIcon, X as XIcon, Y as WrenchIcon, b as FolderIcon, c as ChevronDownIcon, i as ArrowUpIcon, s as CheckIcon, y as FileIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
|
|
@@ -7,10 +7,12 @@ import { Menu } from "./Menu.js";
|
|
|
7
7
|
import { Combobox } from "./Combobox.js";
|
|
8
8
|
import { Select } from "./Select.js";
|
|
9
9
|
import { Tabs } from "./Tabs.js";
|
|
10
|
+
import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
|
|
11
|
+
import { ToolApproval } from "./ToolApproval.js";
|
|
10
12
|
import * as React from "react";
|
|
11
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
+
import { isToolUIPart } from "ai";
|
|
15
|
+
import { getToolApproval } from "@cloudflare/think/react";
|
|
14
16
|
//#region src/components/PromptInput.tsx
|
|
15
17
|
const PromptInputController = React.createContext(null);
|
|
16
18
|
const LocalAttachmentsContext = React.createContext(null);
|
|
@@ -611,7 +613,7 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
|
|
|
611
613
|
]
|
|
612
614
|
}) : null,
|
|
613
615
|
/* @__PURE__ */ jsx("span", {
|
|
614
|
-
className: "prompt-input__dictation-status",
|
|
616
|
+
className: "prompt-input__dictation-status sigvelo-visually-hidden",
|
|
615
617
|
role: "status",
|
|
616
618
|
"aria-live": "polite",
|
|
617
619
|
"aria-atomic": "true",
|
|
@@ -730,7 +732,7 @@ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset
|
|
|
730
732
|
collisionAvoidance,
|
|
731
733
|
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
732
734
|
tabIndex,
|
|
733
|
-
className:
|
|
735
|
+
className: mergeBaseClassName("prompt-input__action-menu", className),
|
|
734
736
|
...props,
|
|
735
737
|
children
|
|
736
738
|
})
|
|
@@ -738,7 +740,7 @@ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset
|
|
|
738
740
|
}
|
|
739
741
|
function PromptInputActionMenuItem({ className, ...props }) {
|
|
740
742
|
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
741
|
-
className:
|
|
743
|
+
className: mergeBaseClassName("prompt-input__action-menu-item", className),
|
|
742
744
|
...props
|
|
743
745
|
});
|
|
744
746
|
}
|
|
@@ -867,11 +869,20 @@ function PromptInputSubmit({ className, status = "ready", onStop, variant = "nor
|
|
|
867
869
|
children: children ?? (isQueueing ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : defaultSubmitIcon(status))
|
|
868
870
|
});
|
|
869
871
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
872
|
+
/**
|
|
873
|
+
* Resolve Think execution approvals that do not use the AI SDK
|
|
874
|
+
* `approval-requested` part: paused codemode executions and durable-pause
|
|
875
|
+
* approvals from `pendingApprovals()`. Pass the whole upstream Think agent
|
|
876
|
+
* stub; the component calls its client-callable RPCs directly:
|
|
877
|
+
*
|
|
878
|
+
* ```tsx
|
|
879
|
+
* <PromptInputApproval part={part} thinkStub={agent.stub} />
|
|
880
|
+
* ```
|
|
881
|
+
*
|
|
882
|
+
* On approve, upstream resumes or runs the parked execution and auto-continues
|
|
883
|
+
* the chat. Both RPCs are idempotent, so a stale click resolves to "already
|
|
884
|
+
* handled".
|
|
885
|
+
*/
|
|
875
886
|
/** The id a response must carry: the approval id, or the paused run's executionId. */
|
|
876
887
|
function getApprovalRequestId(part) {
|
|
877
888
|
if (part.state === "approval-requested") return getToolApproval(part)?.id;
|
|
@@ -888,22 +899,13 @@ function getApprovalStateKey(part) {
|
|
|
888
899
|
/** Derives pending tool approvals straight from the messages — no app-owned shapes. */
|
|
889
900
|
function getPendingToolApprovals(messages, { pausedExecutions = false } = {}) {
|
|
890
901
|
const pending = [];
|
|
891
|
-
messages.forEach((message
|
|
892
|
-
message.parts.forEach((part
|
|
893
|
-
if (isToolUIPart(part) && (part.state === "approval-requested" || pausedExecutions && getPausedExecution(part))) pending.push(
|
|
894
|
-
message,
|
|
895
|
-
messageIndex,
|
|
896
|
-
part,
|
|
897
|
-
partIndex
|
|
898
|
-
});
|
|
902
|
+
messages.forEach((message) => {
|
|
903
|
+
message.parts.forEach((part) => {
|
|
904
|
+
if (isToolUIPart(part) && (part.state === "approval-requested" || pausedExecutions && getPausedExecution(part))) pending.push(part);
|
|
899
905
|
});
|
|
900
906
|
});
|
|
901
907
|
return pending;
|
|
902
908
|
}
|
|
903
|
-
function formatApprovalValue(value) {
|
|
904
|
-
if (typeof value === "string") return value;
|
|
905
|
-
return JSON.stringify(value);
|
|
906
|
-
}
|
|
907
909
|
/**
|
|
908
910
|
* The composer's approval state: when a tool call awaits human approval the
|
|
909
911
|
* prompt input area becomes the confirmation. "Yes" approves on click; typing
|
|
@@ -912,183 +914,32 @@ function formatApprovalValue(value) {
|
|
|
912
914
|
* current selection — approve by default.
|
|
913
915
|
*/
|
|
914
916
|
function PromptInputApproval({ part, approval: durableApproval, onRespond, thinkStub, onExecutionSettled, onSkip, question, count, className, ref, ...props }) {
|
|
915
|
-
const
|
|
916
|
-
const [reason, setReason] = React.useState("");
|
|
917
|
-
const [busy, setBusy] = React.useState(false);
|
|
918
|
-
const yesRef = React.useRef(null);
|
|
919
|
-
const reasonRef = React.useRef(null);
|
|
920
|
-
const approval = part?.state === "approval-requested" ? part.approval : void 0;
|
|
921
|
-
const paused = part ? getPausedExecution(part) : void 0;
|
|
922
|
-
const approvalId = part ? getApprovalStateKey(part) : durableApproval?.executionId;
|
|
923
|
-
React.useEffect(() => {
|
|
924
|
-
setSelected("approve");
|
|
925
|
-
setReason("");
|
|
926
|
-
setBusy(false);
|
|
927
|
-
}, [approvalId]);
|
|
928
|
-
if (!part && !durableApproval) return null;
|
|
929
|
-
if (approval ? !onRespond : !(thinkStub && (paused || durableApproval))) return null;
|
|
930
|
-
const toolName = durableApproval?.descriptor.action ?? (part ? getToolName(part) : "action");
|
|
931
|
-
const respond = async (approved) => {
|
|
932
|
-
if (busy) return;
|
|
933
|
-
setBusy(true);
|
|
934
|
-
const trimmed = reason.trim();
|
|
935
|
-
const denyReason = !approved && trimmed ? trimmed : void 0;
|
|
936
|
-
try {
|
|
937
|
-
if (approval) await onRespond?.({
|
|
938
|
-
id: approval.id,
|
|
939
|
-
approved,
|
|
940
|
-
reason: denyReason
|
|
941
|
-
});
|
|
942
|
-
else if (paused && thinkStub) await (approved ? thinkStub.approveExecution(paused.executionId) : thinkStub.rejectExecution(paused.executionId, denyReason));
|
|
943
|
-
else if (durableApproval && thinkStub) await (approved ? thinkStub.approveExecution(durableApproval.executionId) : thinkStub.rejectExecution(durableApproval.executionId, denyReason));
|
|
944
|
-
} finally {
|
|
945
|
-
setBusy(false);
|
|
946
|
-
if (!approval) onExecutionSettled?.();
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
const submit = () => void respond(selected === "approve");
|
|
950
|
-
const input = durableApproval?.descriptor.input ?? (part ? getToolInput(part) : void 0);
|
|
951
|
-
const inputEntries = input && typeof input === "object" && !Array.isArray(input) ? Object.entries(input) : void 0;
|
|
952
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
953
|
-
ref,
|
|
954
|
-
role: "group",
|
|
955
|
-
"aria-label": `Approve ${toolName}`,
|
|
917
|
+
const shared = {
|
|
956
918
|
className: cx("prompt-input__approval", className),
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
}),
|
|
980
|
-
paused ? /* @__PURE__ */ jsx("div", {
|
|
981
|
-
className: "prompt-input__approval-preview",
|
|
982
|
-
children: paused.pending.map((action) => /* @__PURE__ */ jsxs("div", {
|
|
983
|
-
className: "prompt-input__approval-preview-row",
|
|
984
|
-
children: [
|
|
985
|
-
/* @__PURE__ */ jsxs("span", {
|
|
986
|
-
className: "prompt-input__approval-preview-key",
|
|
987
|
-
children: [
|
|
988
|
-
action.connector,
|
|
989
|
-
".",
|
|
990
|
-
action.method
|
|
991
|
-
]
|
|
992
|
-
}),
|
|
993
|
-
" ",
|
|
994
|
-
action.args === void 0 ? null : formatApprovalValue(action.args)
|
|
995
|
-
]
|
|
996
|
-
}, action.seq))
|
|
997
|
-
}) : input !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
998
|
-
className: "prompt-input__approval-preview",
|
|
999
|
-
children: inputEntries ? inputEntries.map(([key, value]) => /* @__PURE__ */ jsxs("div", {
|
|
1000
|
-
className: "prompt-input__approval-preview-row",
|
|
1001
|
-
children: [
|
|
1002
|
-
/* @__PURE__ */ jsx("span", {
|
|
1003
|
-
className: "prompt-input__approval-preview-key",
|
|
1004
|
-
children: key
|
|
1005
|
-
}),
|
|
1006
|
-
" ",
|
|
1007
|
-
formatApprovalValue(value)
|
|
1008
|
-
]
|
|
1009
|
-
}, key)) : /* @__PURE__ */ jsx("div", {
|
|
1010
|
-
className: "prompt-input__approval-preview-row",
|
|
1011
|
-
children: formatApprovalValue(input)
|
|
1012
|
-
})
|
|
1013
|
-
}) : null,
|
|
1014
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1015
|
-
className: "prompt-input__approval-options",
|
|
1016
|
-
children: [/* @__PURE__ */ jsxs("button", {
|
|
1017
|
-
ref: yesRef,
|
|
1018
|
-
type: "button",
|
|
1019
|
-
className: "prompt-input__approval-option",
|
|
1020
|
-
"data-selected": selected === "approve" || void 0,
|
|
1021
|
-
disabled: busy,
|
|
1022
|
-
onClick: () => void respond(true),
|
|
1023
|
-
onFocus: () => setSelected("approve"),
|
|
1024
|
-
children: [
|
|
1025
|
-
/* @__PURE__ */ jsx("span", {
|
|
1026
|
-
className: "prompt-input__approval-key",
|
|
1027
|
-
children: "1"
|
|
1028
|
-
}),
|
|
1029
|
-
"Yes",
|
|
1030
|
-
/* @__PURE__ */ jsx("span", {
|
|
1031
|
-
className: "prompt-input__approval-arrows",
|
|
1032
|
-
"aria-hidden": "true",
|
|
1033
|
-
children: "↑↓"
|
|
1034
|
-
})
|
|
1035
|
-
]
|
|
1036
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1037
|
-
className: "prompt-input__approval-option prompt-input__approval-deny",
|
|
1038
|
-
"data-selected": selected === "deny" || void 0,
|
|
1039
|
-
children: [
|
|
1040
|
-
/* @__PURE__ */ jsx("span", {
|
|
1041
|
-
className: "prompt-input__approval-key",
|
|
1042
|
-
"aria-hidden": "true",
|
|
1043
|
-
children: /* @__PURE__ */ jsx(PencilIcon, { size: 11 })
|
|
1044
|
-
}),
|
|
1045
|
-
/* @__PURE__ */ jsx("input", {
|
|
1046
|
-
ref: reasonRef,
|
|
1047
|
-
type: "text",
|
|
1048
|
-
className: "prompt-input__approval-reason",
|
|
1049
|
-
"aria-label": `Deny ${toolName} and tell the agent what to do differently`,
|
|
1050
|
-
placeholder: "No, and tell the agent what to do differently",
|
|
1051
|
-
value: reason,
|
|
1052
|
-
disabled: busy,
|
|
1053
|
-
onFocus: () => setSelected("deny"),
|
|
1054
|
-
onChange: (event) => {
|
|
1055
|
-
setSelected("deny");
|
|
1056
|
-
setReason(event.currentTarget.value);
|
|
1057
|
-
},
|
|
1058
|
-
onKeyDown: (event) => {
|
|
1059
|
-
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
1060
|
-
event.preventDefault();
|
|
1061
|
-
respond(false);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
}),
|
|
1065
|
-
onSkip ? /* @__PURE__ */ jsx(Button, {
|
|
1066
|
-
type: "button",
|
|
1067
|
-
size: "xs",
|
|
1068
|
-
variant: "ghost",
|
|
1069
|
-
color: "neutral",
|
|
1070
|
-
className: "prompt-input__approval-skip",
|
|
1071
|
-
disabled: busy,
|
|
1072
|
-
onClick: onSkip,
|
|
1073
|
-
children: "Skip"
|
|
1074
|
-
}) : null,
|
|
1075
|
-
/* @__PURE__ */ jsxs(Button, {
|
|
1076
|
-
type: "button",
|
|
1077
|
-
size: "xs",
|
|
1078
|
-
color: "primary",
|
|
1079
|
-
className: "prompt-input__approval-submit",
|
|
1080
|
-
disabled: busy,
|
|
1081
|
-
onClick: submit,
|
|
1082
|
-
children: [selected === "approve" ? "Approve" : "Submit", /* @__PURE__ */ jsx("kbd", {
|
|
1083
|
-
className: "prompt-input__approval-kbd",
|
|
1084
|
-
children: "⏎"
|
|
1085
|
-
})]
|
|
1086
|
-
})
|
|
1087
|
-
]
|
|
1088
|
-
})]
|
|
1089
|
-
})
|
|
1090
|
-
]
|
|
919
|
+
count,
|
|
920
|
+
onSkip,
|
|
921
|
+
question,
|
|
922
|
+
ref,
|
|
923
|
+
...props
|
|
924
|
+
};
|
|
925
|
+
if (part?.state === "approval-requested" && onRespond) return /* @__PURE__ */ jsx(ToolApproval, {
|
|
926
|
+
...shared,
|
|
927
|
+
part,
|
|
928
|
+
onRespond
|
|
929
|
+
});
|
|
930
|
+
if (part && thinkStub && getPausedExecution(part)) return /* @__PURE__ */ jsx(ThinkExecutionApproval, {
|
|
931
|
+
...shared,
|
|
932
|
+
part,
|
|
933
|
+
thinkStub,
|
|
934
|
+
onSettled: onExecutionSettled
|
|
935
|
+
});
|
|
936
|
+
if (durableApproval && thinkStub) return /* @__PURE__ */ jsx(ThinkPendingApproval, {
|
|
937
|
+
...shared,
|
|
938
|
+
approval: durableApproval,
|
|
939
|
+
thinkStub,
|
|
940
|
+
onSettled: onExecutionSettled
|
|
1091
941
|
});
|
|
942
|
+
return null;
|
|
1092
943
|
}
|
|
1093
944
|
const PromptInputSelect = Select;
|
|
1094
945
|
const PromptInputHoverCardContext = React.createContext(null);
|
|
@@ -1169,7 +1020,7 @@ const PromptInputCommandInput = Combobox.Input;
|
|
|
1169
1020
|
function PromptInputCommandList({ className, ref, ...props }) {
|
|
1170
1021
|
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
1171
1022
|
ref,
|
|
1172
|
-
className:
|
|
1023
|
+
className: mergeBaseClassName("prompt-input__command-list", className),
|
|
1173
1024
|
...props
|
|
1174
1025
|
});
|
|
1175
1026
|
}
|
|
@@ -1240,6 +1091,7 @@ function PromptInputCommandComposer({ commands, mentionCommands, value, onValueC
|
|
|
1240
1091
|
className: "prompt-input__command-positioner",
|
|
1241
1092
|
children: /* @__PURE__ */ jsxs(Combobox.Popup, {
|
|
1242
1093
|
className: "prompt-input__command-popup",
|
|
1094
|
+
"data-recipe": "composer-command-surface",
|
|
1243
1095
|
children: [/* @__PURE__ */ jsx(PromptInputCommandList, {
|
|
1244
1096
|
"data-command-trigger": trigger,
|
|
1245
1097
|
children: (group) => /* @__PURE__ */ jsxs(PromptInputCommandGroup, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Collapsible } from "
|
|
1
|
+
import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
|
|
2
2
|
import { r as ButtonProps } from "../Button-FX_hpqxm.js";
|
|
3
3
|
import { ScrollArea } from "./ScrollArea.js";
|
|
4
4
|
import * as React from "react";
|
|
@@ -61,9 +61,7 @@ declare function Queue({
|
|
|
61
61
|
}: QueueProps & {
|
|
62
62
|
ref?: React.Ref<HTMLDivElement>;
|
|
63
63
|
}): React.JSX.Element;
|
|
64
|
-
interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "
|
|
65
|
-
className?: string;
|
|
66
|
-
}
|
|
64
|
+
interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {}
|
|
67
65
|
/**
|
|
68
66
|
* A collapsible section within a Queue. Holds a trigger label and a list
|
|
69
67
|
* of QueueItem children.
|
|
@@ -76,9 +74,7 @@ declare function QueueSection({
|
|
|
76
74
|
}: QueueSectionProps & {
|
|
77
75
|
ref?: React.Ref<HTMLDivElement>;
|
|
78
76
|
}): React.JSX.Element;
|
|
79
|
-
interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "
|
|
80
|
-
className?: string;
|
|
81
|
-
}
|
|
77
|
+
interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {}
|
|
82
78
|
declare function QueueSectionTrigger({
|
|
83
79
|
className,
|
|
84
80
|
children,
|
|
@@ -104,9 +100,7 @@ declare function QueueSectionLabel({
|
|
|
104
100
|
}: QueueSectionLabelProps & {
|
|
105
101
|
ref?: React.Ref<HTMLSpanElement>;
|
|
106
102
|
}): React.JSX.Element;
|
|
107
|
-
interface QueueListProps extends
|
|
108
|
-
className?: string;
|
|
109
|
-
}
|
|
103
|
+
interface QueueListProps extends React.ComponentProps<typeof ScrollArea.Root> {}
|
|
110
104
|
declare function QueueList({
|
|
111
105
|
className,
|
|
112
106
|
children,
|
|
@@ -115,9 +109,7 @@ declare function QueueList({
|
|
|
115
109
|
}: QueueListProps & {
|
|
116
110
|
ref?: React.Ref<HTMLDivElement>;
|
|
117
111
|
}): React.JSX.Element;
|
|
118
|
-
interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "
|
|
119
|
-
className?: string;
|
|
120
|
-
}
|
|
112
|
+
interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> {}
|
|
121
113
|
declare function QueueSectionContent({
|
|
122
114
|
className,
|
|
123
115
|
ref,
|
|
@@ -176,9 +168,7 @@ declare function QueueItemDescription({
|
|
|
176
168
|
ref?: React.Ref<HTMLParagraphElement>;
|
|
177
169
|
}): React.JSX.Element;
|
|
178
170
|
interface QueueItemActionsProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
179
|
-
interface QueueItemActionProps extends Omit<ButtonProps, "variant" | "color" | "size"
|
|
180
|
-
className?: string;
|
|
181
|
-
}
|
|
171
|
+
interface QueueItemActionProps extends Omit<ButtonProps, "variant" | "color" | "size"> {}
|
|
182
172
|
declare function QueueItemActions({
|
|
183
173
|
className,
|
|
184
174
|
children,
|
package/dist/components/Queue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
1
2
|
import { Collapsible } from "./Collapsible.js";
|
|
2
|
-
import {
|
|
3
|
-
import { l as ChevronRightIcon, o as CheckIcon, p as DotIcon, v as FileIcon } from "../icons-CpfUer49.js";
|
|
3
|
+
import { m as DotIcon, s as CheckIcon, u as ChevronRightIcon, y as FileIcon } from "../icons--FqCZEc3.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import { ScrollArea } from "./ScrollArea.js";
|
|
@@ -3,20 +3,15 @@ import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
|
3
3
|
import { Radio as Radio$1 } from "@base-ui/react/radio";
|
|
4
4
|
|
|
5
5
|
//#region src/components/RadioGroup.d.ts
|
|
6
|
-
interface RadioGroupProps extends
|
|
7
|
-
className?: string;
|
|
6
|
+
interface RadioGroupProps extends React.ComponentPropsWithRef<typeof RadioGroup$1> {
|
|
8
7
|
/**
|
|
9
8
|
* The orientation of the radio group.
|
|
10
9
|
* @default 'vertical'
|
|
11
10
|
*/
|
|
12
11
|
orientation?: "horizontal" | "vertical";
|
|
13
12
|
}
|
|
14
|
-
interface RadioProps extends
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
interface RadioIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof Radio$1.Indicator>, "className"> {
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
13
|
+
interface RadioProps extends React.ComponentPropsWithRef<typeof Radio$1.Root> {}
|
|
14
|
+
interface RadioIndicatorProps extends React.ComponentPropsWithRef<typeof Radio$1.Indicator> {}
|
|
20
15
|
/**
|
|
21
16
|
* A radio group component for selecting one option from a list.
|
|
22
17
|
*
|