@mcp-b/react-components 0.20.5 → 0.22.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-D2SHSGFX.d.ts → AgentActivity-D3OvrC02.d.ts} +14 -1
- package/dist/{AgentChat-C-ZyXbJz.d.ts → AgentChat-Bm1qYbOo.d.ts} +24 -1
- package/dist/AgentChatStartScreen-DDZ25aax.d.ts +60 -0
- package/dist/{Button-yRInko9u.d.ts → Button-SBIz6Lqi.d.ts} +2 -1
- package/dist/{CodeBlock-ygtuzqJd.js → CodeBlock-Cp67Njo3.js} +1 -1
- package/dist/{CodeBlock-Bbls1CnA.d.ts → CodeBlock-yMpGqScn.d.ts} +1 -1
- package/dist/Dialog-BD8NBKaE.d.ts +122 -0
- package/dist/{FileTree-CdgfccsM.js → FileTree-DW60q1w7.js} +1 -1
- package/dist/IconButton-CFKhu6OR.d.ts +35 -0
- package/dist/{Message-DzuteocT.js → Message-_-bEYLAO.js} +9 -16
- package/dist/{ModelSelector-pecWyOFI.js → ModelSelector-Brvj9Cab.js} +15 -8
- package/dist/{PromptInput-Cq-8RoXD.d.ts → PromptInput-BjoPWaaG.d.ts} +15 -2
- package/dist/{ThinkChatActivity-CdbL0aoA.d.ts → ThinkChatActivity-2BobmuvR.d.ts} +8 -7
- package/dist/{ThinkChatActivitySummary-D1xOrNrq.d.ts → ThinkChatActivitySummary-kr5fE0wg.d.ts} +14 -5
- package/dist/{ToggleGroup-DNd6cDJZ.d.ts → ToggleGroup-BW1jrhAF.d.ts} +10 -0
- package/dist/{Workspace-CWtust-2.d.ts → Workspace-CIycQ4xE.d.ts} +1 -1
- package/dist/{WorkspaceExplorer-DGigwsgH.d.ts → WorkspaceExplorer-BCipn7Vd.d.ts} +1 -1
- package/dist/{WorkspaceFile-D8Un_xge.d.ts → WorkspaceFile-DMtRMwVv.d.ts} +1 -1
- package/dist/{WorkspaceFileView-Bxx4wEzJ.js → WorkspaceFileView-rUEN2iox.js} +4 -4
- package/dist/assets/think-browser-host.png +0 -0
- package/dist/components/ActionGuide.d.ts +85 -0
- package/dist/components/ActionGuide.js +94 -0
- package/dist/components/Activity.d.ts +33 -17
- package/dist/components/Activity.js +40 -28
- package/dist/components/AgentActivity.d.ts +1 -1
- package/dist/components/AgentActivity.js +3 -11
- package/dist/components/AgentActivityPreview.d.ts +1 -1
- package/dist/components/AgentActivityPreview.js +17 -16
- package/dist/components/AgentAttention.d.ts +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +169 -136
- package/dist/components/AgentChatStartScreen.d.ts +2 -0
- package/dist/components/AgentChatStartScreen.js +88 -0
- package/dist/components/AgentConnection.d.ts +1 -1
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.js +1 -1
- package/dist/components/AlertDialog.d.ts +2 -1
- package/dist/components/AlertDialog.js +8 -2
- package/dist/components/AppIcon.d.ts +58 -0
- package/dist/components/AppIcon.js +51 -0
- package/dist/components/AppTopBar.js +9 -10
- package/dist/components/Approval.js +3 -5
- package/dist/components/Artifact.d.ts +3 -7
- package/dist/components/Artifact.js +12 -18
- package/dist/components/Avatar.d.ts +7 -2
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BrowserLiveView.js +6 -8
- package/dist/components/BrowserReplay.js +9 -9
- package/dist/components/BrowserRunPanel.js +2 -2
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +1 -1
- package/dist/components/ChatGptSignInScreen.js +2 -2
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Checkpoint.js +1 -1
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +1 -1
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.d.ts +3 -24
- package/dist/components/Conversation.js +6 -34
- package/dist/components/Dialog.d.ts +1 -117
- package/dist/components/Dialog.js +9 -1
- package/dist/components/EmptyState.d.ts +46 -0
- package/dist/components/EmptyState.js +50 -0
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/IconButton.d.ts +1 -31
- package/dist/components/IconButton.js +2 -1
- package/dist/components/Kbd.d.ts +32 -0
- package/dist/components/Kbd.js +34 -0
- package/dist/components/McpConnectionRequest.d.ts +1 -1
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpPluginCatalog.d.ts +86 -0
- package/dist/components/McpPluginCatalog.js +364 -0
- package/dist/components/McpServerPicker.d.ts +2 -2
- package/dist/components/McpServerPicker.js +7 -13
- package/dist/components/MediaPreviewCard.js +1 -1
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.d.ts +4 -8
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/ModelSelector.d.ts +12 -6
- package/dist/components/ModelSelector.js +2 -2
- package/dist/components/Plan.js +1 -1
- package/dist/components/PricingBillingToggle.js +1 -0
- package/dist/components/PricingPlanCard.d.ts +1 -1
- package/dist/components/PricingPlanCard.js +10 -12
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +30 -12
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -2
- package/dist/components/Reasoning.js +5 -10
- package/dist/components/ResponsiveSidebarShell.js +2 -1
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Sources.js +1 -1
- package/dist/components/StatusPill.d.ts +43 -0
- package/dist/components/StatusPill.js +35 -0
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/SubagentRunSelector.js +1 -1
- package/dist/components/Task.js +1 -1
- package/dist/components/Terminal.d.ts +3 -3
- package/dist/components/Terminal.js +7 -8
- package/dist/components/TestResults.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +12 -6
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +28 -16
- package/dist/components/ThinkChatActivitySummary.d.ts +2 -2
- package/dist/components/ThinkChatActivitySummary.js +67 -64
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +5 -5
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.js +19 -25
- package/dist/components/ThinkFullApp.d.ts +8 -4
- package/dist/components/ThinkFullApp.js +17 -2
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkRoutineBrowser.js +3 -2
- package/dist/components/ThinkRoutineForm.js +3 -3
- package/dist/components/ThinkRoutineLibrary.js +2 -2
- package/dist/components/ThinkRoutineRuns.js +4 -3
- package/dist/components/ThinkThreadPicker.js +5 -4
- package/dist/components/Toast.d.ts +12 -2
- package/dist/components/Toast.js +14 -4
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +54 -7
- package/dist/components/ToolInvocation.js +1 -1
- package/dist/components/Tooltip.d.ts +6 -4
- package/dist/components/Tooltip.js +11 -4
- package/dist/components/WebPreview.d.ts +13 -6
- package/dist/components/WebPreview.js +55 -50
- package/dist/components/Workspace.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.d.ts +3 -3
- package/dist/components/WorkspaceExplorer.js +1 -1
- 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/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-BrvQ7z4W.d.ts → copy-button-EBv_B9F6.d.ts} +2 -2
- package/dist/{copy-button-vo1paUSi.js → copy-button-TWq8nZhc.js} +8 -8
- package/dist/{icons-DyOM0EJs.js → icons-ua6f_GH3.js} +3 -2
- package/dist/{icons-DkRtZmvT.d.ts → icons-wP1yFUXF.d.ts} +6 -1
- package/dist/mcp-server-catalog-DycejaJ5.d.ts +1077 -0
- package/dist/styles/action-guide.css +128 -0
- package/dist/styles/activity-header.css +41 -10
- package/dist/styles/activity.css +26 -4
- package/dist/styles/agent-activity-preview-overlay.css +51 -12
- package/dist/styles/agent-activity-preview.css +23 -53
- package/dist/styles/agent-attention.css +2 -2
- package/dist/styles/agent-chat.css +291 -57
- package/dist/styles/agent-connection.css +8 -8
- package/dist/styles/alert-dialog.css +5 -20
- package/dist/styles/app-icon.css +122 -0
- package/dist/styles/app-top-bar.css +4 -5
- package/dist/styles/approval.css +1 -7
- package/dist/styles/artifact.css +4 -4
- package/dist/styles/avatar.css +13 -0
- package/dist/styles/base-ui-motion.css +1 -1
- package/dist/styles/base.css +94 -3
- package/dist/styles/browser-control-overlay.css +16 -7
- package/dist/styles/browser-live-view.css +5 -38
- package/dist/styles/browser-replay.css +2 -6
- package/dist/styles/browser-run-panel.css +4 -18
- package/dist/styles/button.css +17 -1
- package/dist/styles/card.css +4 -4
- package/dist/styles/chain-of-thought.css +0 -1
- package/dist/styles/chatgpt-sign-in-screen.css +7 -5
- package/dist/styles/checkbox-group.css +3 -3
- package/dist/styles/code-block.css +4 -4
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/conversation.css +7 -42
- package/dist/styles/description-list.css +4 -4
- package/dist/styles/dialog.css +22 -7
- package/dist/styles/empty-state.css +48 -0
- package/dist/styles/environment-variables.css +4 -4
- package/dist/styles/field.css +2 -2
- package/dist/styles/index.css +6 -0
- package/dist/styles/inline-citation.css +1 -1
- package/dist/styles/kbd.css +40 -0
- package/dist/styles/mcp-plugin-catalog.css +296 -0
- package/dist/styles/mcp-server-picker.css +0 -26
- package/dist/styles/media-preview-card.css +5 -3
- package/dist/styles/message-scroller.css +4 -4
- package/dist/styles/message.css +11 -6
- package/dist/styles/model-selector.css +5 -8
- package/dist/styles/popover.css +1 -1
- package/dist/styles/preview-card.css +1 -1
- package/dist/styles/prompt-input.css +44 -54
- package/dist/styles/queue.css +2 -2
- package/dist/styles/recipes.css +83 -9
- package/dist/styles/resizable-side-panel.css +1 -1
- package/dist/styles/responsive-sidebar-shell.css +19 -14
- package/dist/styles/scrollbars.css +32 -3
- package/dist/styles/search-field.css +9 -0
- package/dist/styles/sources.css +1 -1
- package/dist/styles/status-pill.css +39 -0
- package/dist/styles/stepper.css +2 -2
- package/dist/styles/streamdown.css +13 -12
- package/dist/styles/subagent-run.css +3 -3
- package/dist/styles/switch.css +1 -3
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/task.css +1 -1
- package/dist/styles/terminal.css +2 -2
- package/dist/styles/test-results.css +1 -2
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/theme-mode-control.css +1 -1
- package/dist/styles/think-execution-status.css +4 -23
- package/dist/styles/think-execution-workbench.css +2 -3
- package/dist/styles/think-full-app.css +24 -4
- package/dist/styles/think-routine-library.css +14 -16
- package/dist/styles/think-thread-picker.css +9 -26
- package/dist/styles/toast.css +2 -23
- package/dist/styles/toggle-group.css +76 -3
- package/dist/styles/tooltip.css +1 -2
- package/dist/styles/utilities.css +73 -0
- package/dist/styles/web-preview.css +5 -0
- package/dist/styles/workspace-explorer.css +4 -6
- package/dist/utils/favicon.d.ts +10 -0
- package/dist/utils/favicon.js +18 -0
- package/dist/utils/mcp-server-catalog.d.ts +2 -1078
- package/dist/utils/mcp-server-catalog.js +3 -11
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,20 @@ type AgentActivityIconKind = "thought" | "read" | "edit" | "search" | "web" | "c
|
|
|
7
7
|
/** Safe, serializable presentation state suitable for an Agents SDK state object. */
|
|
8
8
|
interface AgentActivitySummary<CustomIcon extends string = never> {
|
|
9
9
|
mode: AgentActivityMode;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The action phrase, already in the tense the part's state calls for:
|
|
12
|
+
* "Reading" while the tool runs, "Read" once it settles. Not a whole line —
|
|
13
|
+
* the thing being acted on belongs in `detail`, so a renderer can set the two
|
|
14
|
+
* apart. Joining them here is what makes an activity line read as one
|
|
15
|
+
* undifferentiated string.
|
|
16
|
+
*/
|
|
17
|
+
action: string;
|
|
18
|
+
/**
|
|
19
|
+
* What the action is being applied to: a path, a command, a query. Optional
|
|
20
|
+
* because aggregate summaries ("Read 2 files and searched code") are a whole
|
|
21
|
+
* sentence with no target to separate out.
|
|
22
|
+
*/
|
|
23
|
+
detail?: string;
|
|
11
24
|
iconKind: AgentActivityIconKind | CustomIcon;
|
|
12
25
|
/** Optional presentation hint. Consumers decide whether exposing or fetching it is safe. */
|
|
13
26
|
url?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-DDZ25aax.js";
|
|
3
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-BjoPWaaG.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
|
|
5
6
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
@@ -79,6 +80,13 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
79
80
|
disabled?: boolean;
|
|
80
81
|
/** Rendered in place of the transcript while `messages` is empty. */
|
|
81
82
|
emptyState?: React.ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* First-turn composition that places the live composer between a welcoming
|
|
85
|
+
* heading and app-authored starter actions. It is the default when messages
|
|
86
|
+
* are empty and no legacy `emptyState` is supplied. Pass `false` to retain
|
|
87
|
+
* the transcript-style empty row.
|
|
88
|
+
*/
|
|
89
|
+
startScreen?: Omit<AgentChatStartScreenProps, "composer" | "className" | "aria-labelledby"> | false;
|
|
82
90
|
/** Extra controls rendered in the composer toolbar. */
|
|
83
91
|
composerTools?: React.ReactNode;
|
|
84
92
|
/** Controlled slash-command catalog and host-owned selection policy. */
|
|
@@ -176,6 +184,18 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
176
184
|
renderPart?: (context: AgentMessageRenderPartContext<MessageT>) => React.ReactNode | undefined;
|
|
177
185
|
/** Rendered after each message's parts — for actions, citations, and the like. */
|
|
178
186
|
renderMessageAfter?: (context: AgentChatRenderMessageContext<MessageT>) => React.ReactNode;
|
|
187
|
+
/**
|
|
188
|
+
* Per-message policy for the built-in assistant copy/retry toolbar. Use this
|
|
189
|
+
* for deterministic interactive data messages whose visible UI already owns
|
|
190
|
+
* its actions, while preserving a hidden model-visible text companion.
|
|
191
|
+
*/
|
|
192
|
+
showAssistantActions?: (context: AgentChatRenderMessageContext<MessageT>) => boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Selects transcript rows that should anchor at the top when they appear.
|
|
195
|
+
* Defaults to user messages; large deterministic assistant guides can opt in
|
|
196
|
+
* so their introduction is visible instead of their final action.
|
|
197
|
+
*/
|
|
198
|
+
isMessageScrollAnchor?: (context: AgentChatRenderMessageContext<MessageT>) => boolean;
|
|
179
199
|
}
|
|
180
200
|
interface AgentChatComposerDraft {
|
|
181
201
|
value: string;
|
|
@@ -204,6 +224,7 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
204
224
|
placeholder,
|
|
205
225
|
disabled,
|
|
206
226
|
emptyState,
|
|
227
|
+
startScreen,
|
|
207
228
|
composerHeader,
|
|
208
229
|
composerTools,
|
|
209
230
|
slashCommands,
|
|
@@ -225,6 +246,8 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
225
246
|
contextWindow,
|
|
226
247
|
renderPart,
|
|
227
248
|
renderMessageAfter,
|
|
249
|
+
showAssistantActions,
|
|
250
|
+
isMessageScrollAnchor,
|
|
228
251
|
ref
|
|
229
252
|
}: AgentChatProps<MessageT> & {
|
|
230
253
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/AgentChatStartScreen.d.ts
|
|
5
|
+
interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<"section">, "children" | "title"> {
|
|
6
|
+
/** The prompt that orients the user before their first message. */
|
|
7
|
+
heading?: React.ReactNode;
|
|
8
|
+
/** The one composer owned by `AgentChat`, placed between the heading and starters. */
|
|
9
|
+
composer: React.ReactNode;
|
|
10
|
+
/** App-authored content for the utility tray beneath the first-turn composer. */
|
|
11
|
+
composerTray?: React.ReactNode;
|
|
12
|
+
/** App-authored starter actions rendered below the composer. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Welcoming first-turn layout for `AgentChat` and `ThinkChat`.
|
|
17
|
+
*
|
|
18
|
+
* `AgentChat` normally creates this component through its `startScreen` prop so
|
|
19
|
+
* the same live composer moves from the center of the empty view to the pinned
|
|
20
|
+
* transcript position after the first message.
|
|
21
|
+
*/
|
|
22
|
+
declare function AgentChatStartScreen({
|
|
23
|
+
heading,
|
|
24
|
+
composer,
|
|
25
|
+
composerTray,
|
|
26
|
+
children,
|
|
27
|
+
className,
|
|
28
|
+
"aria-label": ariaLabel,
|
|
29
|
+
"aria-labelledby": ariaLabelledBy,
|
|
30
|
+
...props
|
|
31
|
+
}: AgentChatStartScreenProps): React.JSX.Element;
|
|
32
|
+
interface AgentChatStarterListProps extends React.ComponentPropsWithoutRef<"ul"> {}
|
|
33
|
+
/** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
|
|
34
|
+
declare function AgentChatStarterList({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: AgentChatStarterListProps): React.JSX.Element;
|
|
38
|
+
interface AgentChatStarterProps extends Omit<ButtonProps, "color" | "iconOnly" | "size" | "variant"> {
|
|
39
|
+
/** Decorative icon shown before the prompt label. */
|
|
40
|
+
icon?: React.ReactNode;
|
|
41
|
+
/** Render the prompt with quieter onboarding emphasis. */
|
|
42
|
+
muted?: boolean;
|
|
43
|
+
/** Optional independent action for removing a suggested prompt. */
|
|
44
|
+
onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
|
|
45
|
+
/** Accessible name for the dismiss action. */
|
|
46
|
+
dismissLabel?: string;
|
|
47
|
+
}
|
|
48
|
+
/** One full-width, keyboard-native starter prompt. */
|
|
49
|
+
declare function AgentChatStarter({
|
|
50
|
+
icon,
|
|
51
|
+
muted,
|
|
52
|
+
onDismiss,
|
|
53
|
+
dismissLabel,
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
type,
|
|
57
|
+
...props
|
|
58
|
+
}: AgentChatStarterProps): React.JSX.Element;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { AgentChatStarterListProps as a, AgentChatStarterList as i, AgentChatStartScreenProps as n, AgentChatStarterProps as o, AgentChatStarter as r, AgentChatStartScreen as t };
|
|
@@ -7,10 +7,11 @@ import { Button } from "@base-ui/react/button";
|
|
|
7
7
|
*
|
|
8
8
|
* - `normal` - Filled background (default)
|
|
9
9
|
* - `outline` - Low-emphasis with border, transparent background
|
|
10
|
+
* - `surface` - Raised neutral surface for prominent lightweight actions
|
|
10
11
|
* - `ghost` - Minimal style, background appears on hover
|
|
11
12
|
* - `link` - Appears as a text link with underline on hover
|
|
12
13
|
*/
|
|
13
|
-
type ButtonVariant = "normal" | "outline" | "ghost" | "link";
|
|
14
|
+
type ButtonVariant = "normal" | "surface" | "outline" | "ghost" | "link";
|
|
14
15
|
/**
|
|
15
16
|
* The semantic color intent of the button.
|
|
16
17
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-TWq8nZhc.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { createHighlighter } from "shiki";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as SelectProps, t as Select } from "./Select-B_13gg_J.js";
|
|
2
|
-
import { t as CopyButtonProps } from "./copy-button-
|
|
2
|
+
import { t as CopyButtonProps } from "./copy-button-EBv_B9F6.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage, ThemedToken } from "shiki";
|
|
5
5
|
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Dialog.d.ts
|
|
5
|
+
interface DialogProps extends Dialog.Root.Props {}
|
|
6
|
+
interface DialogTriggerProps extends Dialog.Trigger.Props {}
|
|
7
|
+
interface DialogPortalProps extends Dialog.Portal.Props {}
|
|
8
|
+
interface DialogBackdropProps extends Dialog.Backdrop.Props {}
|
|
9
|
+
interface DialogViewportProps extends Dialog.Viewport.Props {}
|
|
10
|
+
interface DialogPopupProps extends Dialog.Popup.Props {
|
|
11
|
+
/**
|
|
12
|
+
* The size of the dialog.
|
|
13
|
+
* @default 'md'
|
|
14
|
+
*/
|
|
15
|
+
size?: "sm" | "md" | "lg" | "fullscreen";
|
|
16
|
+
}
|
|
17
|
+
interface DialogTitleProps extends Dialog.Title.Props {}
|
|
18
|
+
interface DialogDescriptionProps extends Dialog.Description.Props {}
|
|
19
|
+
interface DialogCloseProps extends Dialog.Close.Props {}
|
|
20
|
+
interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
21
|
+
interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
22
|
+
/**
|
|
23
|
+
* A dialog component for modal interactions.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Dialog.Root open={isOpen} onOpenChange={setIsOpen}>
|
|
28
|
+
* <Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>
|
|
29
|
+
* <Dialog.Portal>
|
|
30
|
+
* <Dialog.Backdrop />
|
|
31
|
+
* <Dialog.Viewport>
|
|
32
|
+
* <Dialog.Popup>
|
|
33
|
+
* <Dialog.Title>Confirm</Dialog.Title>
|
|
34
|
+
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
35
|
+
* <Dialog.Close>Cancel</Dialog.Close>
|
|
36
|
+
* </Dialog.Popup>
|
|
37
|
+
* </Dialog.Viewport>
|
|
38
|
+
* </Dialog.Portal>
|
|
39
|
+
* </Dialog.Root>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
|
|
43
|
+
*/
|
|
44
|
+
declare function DialogTrigger({
|
|
45
|
+
render,
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: DialogTriggerProps): React.JSX.Element;
|
|
49
|
+
declare function DialogBackdrop({
|
|
50
|
+
className,
|
|
51
|
+
ref,
|
|
52
|
+
...props
|
|
53
|
+
}: DialogBackdropProps & {
|
|
54
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
55
|
+
}): React.JSX.Element;
|
|
56
|
+
declare function DialogViewport({
|
|
57
|
+
className,
|
|
58
|
+
ref,
|
|
59
|
+
...props
|
|
60
|
+
}: DialogViewportProps & {
|
|
61
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
62
|
+
}): React.JSX.Element;
|
|
63
|
+
declare function DialogPopup({
|
|
64
|
+
size,
|
|
65
|
+
className,
|
|
66
|
+
ref,
|
|
67
|
+
...props
|
|
68
|
+
}: DialogPopupProps & {
|
|
69
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
+
}): React.JSX.Element;
|
|
71
|
+
declare function DialogHeader({
|
|
72
|
+
className,
|
|
73
|
+
ref,
|
|
74
|
+
...props
|
|
75
|
+
}: DialogHeaderProps & {
|
|
76
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
77
|
+
}): React.JSX.Element;
|
|
78
|
+
declare function DialogFooter({
|
|
79
|
+
className,
|
|
80
|
+
ref,
|
|
81
|
+
...props
|
|
82
|
+
}: DialogFooterProps & {
|
|
83
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
84
|
+
}): React.JSX.Element;
|
|
85
|
+
declare function DialogTitle({
|
|
86
|
+
className,
|
|
87
|
+
ref,
|
|
88
|
+
...props
|
|
89
|
+
}: DialogTitleProps & {
|
|
90
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
91
|
+
}): React.JSX.Element;
|
|
92
|
+
declare function DialogDescription({
|
|
93
|
+
className,
|
|
94
|
+
ref,
|
|
95
|
+
...props
|
|
96
|
+
}: DialogDescriptionProps & {
|
|
97
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
98
|
+
}): React.JSX.Element;
|
|
99
|
+
declare function DialogClose({
|
|
100
|
+
render,
|
|
101
|
+
className,
|
|
102
|
+
ref,
|
|
103
|
+
...props
|
|
104
|
+
}: DialogCloseProps & {
|
|
105
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
106
|
+
}): React.JSX.Element;
|
|
107
|
+
declare const Dialog$1: {
|
|
108
|
+
Root: typeof Dialog.Root;
|
|
109
|
+
Trigger: typeof DialogTrigger;
|
|
110
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
111
|
+
Backdrop: typeof DialogBackdrop;
|
|
112
|
+
Viewport: typeof DialogViewport;
|
|
113
|
+
Popup: typeof DialogPopup;
|
|
114
|
+
Header: typeof DialogHeader;
|
|
115
|
+
Footer: typeof DialogFooter;
|
|
116
|
+
Title: typeof DialogTitle;
|
|
117
|
+
Description: typeof DialogDescription;
|
|
118
|
+
Close: typeof DialogClose;
|
|
119
|
+
createHandle: typeof Dialog.createHandle;
|
|
120
|
+
};
|
|
121
|
+
//#endregion
|
|
122
|
+
export { DialogFooterProps as a, DialogPortalProps as c, DialogTriggerProps as d, DialogViewportProps as f, DialogDescriptionProps as i, DialogProps as l, DialogBackdropProps as n, DialogHeaderProps as o, DialogCloseProps as r, DialogPopupProps as s, Dialog$1 as t, DialogTitleProps as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as FileIcon, T as FolderOpenIcon, m as ChevronRightIcon, w as FolderIcon } from "./icons-ua6f_GH3.js";
|
|
3
3
|
import { t as NavigationLink } from "./navigation-link-Cob7KBlM.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { i as ButtonSize, r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/IconButton.d.ts
|
|
5
|
+
interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "children" | "size"> {
|
|
6
|
+
/** Decorative icon rendered inside the square button. */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Accessible name and default tooltip text for the icon-only control. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Tooltip content when it should differ from the accessible name. */
|
|
11
|
+
tooltip?: React.ReactNode;
|
|
12
|
+
/** Preferred side for the tooltip. */
|
|
13
|
+
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
14
|
+
/** Square button size. */
|
|
15
|
+
size?: ButtonSize;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A square, icon-only button with a required accessible name and matching
|
|
19
|
+
* tooltip. Use text buttons for actions whose consequence an icon cannot make
|
|
20
|
+
* clear on its own.
|
|
21
|
+
*/
|
|
22
|
+
declare function IconButton({
|
|
23
|
+
children,
|
|
24
|
+
label,
|
|
25
|
+
size,
|
|
26
|
+
tooltip,
|
|
27
|
+
tooltipSide,
|
|
28
|
+
type,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: IconButtonProps & {
|
|
32
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { IconButtonProps as n, IconButton as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "./icons-DyOM0EJs.js";
|
|
3
2
|
import { Button } from "./components/Button.js";
|
|
4
|
-
import {
|
|
3
|
+
import { C as FileIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "./icons-ua6f_GH3.js";
|
|
4
|
+
import { IconButton } from "./components/IconButton.js";
|
|
5
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 { n as clamp } from "./format-S6uWyoSb.js";
|
|
@@ -209,23 +209,18 @@ function MessageActions({ className, children, ref, ...props }) {
|
|
|
209
209
|
* name; shows a tooltip on hover/focus when {@link tooltip} is set.
|
|
210
210
|
*/
|
|
211
211
|
function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "sm", children, ref, ...props }) {
|
|
212
|
-
|
|
212
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
213
213
|
ref,
|
|
214
214
|
type: "button",
|
|
215
|
+
label,
|
|
216
|
+
tooltip,
|
|
215
217
|
variant,
|
|
216
218
|
color,
|
|
217
219
|
size,
|
|
218
|
-
iconOnly: true,
|
|
219
220
|
className: cx("message__action", className),
|
|
220
|
-
"aria-label": label ?? tooltip,
|
|
221
221
|
...props,
|
|
222
222
|
children
|
|
223
223
|
});
|
|
224
|
-
if (!tooltip) return button;
|
|
225
|
-
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
226
|
-
sideOffset: 6,
|
|
227
|
-
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: tooltip })
|
|
228
|
-
}) })] });
|
|
229
224
|
}
|
|
230
225
|
/**
|
|
231
226
|
* Horizontal container that places children in a row with space between —
|
|
@@ -314,16 +309,15 @@ function MessageBranchSelector({ className, children, ref, ...props }) {
|
|
|
314
309
|
/** Button that selects the previous branch. Disabled at the first branch. */
|
|
315
310
|
function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
316
311
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchPrevious");
|
|
317
|
-
return /* @__PURE__ */ jsx(
|
|
312
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
318
313
|
ref,
|
|
319
314
|
type: "button",
|
|
315
|
+
label,
|
|
320
316
|
variant,
|
|
321
317
|
color,
|
|
322
318
|
size,
|
|
323
|
-
iconOnly: true,
|
|
324
319
|
disabled: branchCount <= 1,
|
|
325
320
|
className: cx("message__branch-prev", className),
|
|
326
|
-
"aria-label": label,
|
|
327
321
|
onClick: (event) => {
|
|
328
322
|
onClick?.(event);
|
|
329
323
|
if (!event.defaultPrevented) setBranchIndex(branchIndex > 0 ? branchIndex - 1 : branchCount - 1);
|
|
@@ -335,16 +329,15 @@ function MessageBranchPrevious({ className, label = "Previous response", variant
|
|
|
335
329
|
/** Button that selects the next branch. Disabled at the last branch. */
|
|
336
330
|
function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
|
|
337
331
|
const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchNext");
|
|
338
|
-
return /* @__PURE__ */ jsx(
|
|
332
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
339
333
|
ref,
|
|
340
334
|
type: "button",
|
|
335
|
+
label,
|
|
341
336
|
variant,
|
|
342
337
|
color,
|
|
343
338
|
size,
|
|
344
|
-
iconOnly: true,
|
|
345
339
|
disabled: branchCount <= 1,
|
|
346
340
|
className: cx("message__branch-next", className),
|
|
347
|
-
"aria-label": label,
|
|
348
341
|
onClick: (event) => {
|
|
349
342
|
onClick?.(event);
|
|
350
343
|
if (!event.defaultPrevented) setBranchIndex(branchIndex < branchCount - 1 ? branchIndex + 1 : 0);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { W as SearchIcon, d as ChevronDownIcon } from "./icons-DyOM0EJs.js";
|
|
3
2
|
import { Button } from "./components/Button.js";
|
|
3
|
+
import { G as SearchIcon, f as ChevronDownIcon } from "./icons-ua6f_GH3.js";
|
|
4
4
|
import { Dialog } from "./components/Dialog.js";
|
|
5
5
|
import { i as titleCase } from "./format-S6uWyoSb.js";
|
|
6
6
|
import { Separator } from "./components/Separator.js";
|
|
7
|
+
import { EmptyState } from "./components/EmptyState.js";
|
|
7
8
|
import { Input } from "./components/Input.js";
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -321,7 +322,7 @@ function CloudflareModelSelector({ models, selectedModelId = null, onSelectModel
|
|
|
321
322
|
children: [
|
|
322
323
|
/* @__PURE__ */ jsx(ModelSelectorLogo, { provider: getCloudflareModelProvider(typedModelId) }),
|
|
323
324
|
/* @__PURE__ */ jsx(ModelSelectorName, { children: typedModelId }),
|
|
324
|
-
/* @__PURE__ */ jsx(
|
|
325
|
+
/* @__PURE__ */ jsx(ModelSelectorSource, { children: "Use" })
|
|
325
326
|
]
|
|
326
327
|
})
|
|
327
328
|
}) : null,
|
|
@@ -335,7 +336,7 @@ function CloudflareModelSelector({ models, selectedModelId = null, onSelectModel
|
|
|
335
336
|
children: [
|
|
336
337
|
/* @__PURE__ */ jsx(ModelSelectorLogo, { provider: option.provider }),
|
|
337
338
|
/* @__PURE__ */ jsx(ModelSelectorName, { children: option.id }),
|
|
338
|
-
/* @__PURE__ */ jsx(
|
|
339
|
+
/* @__PURE__ */ jsx(ModelSelectorSource, { children: option.source === "workers-ai" ? "Workers AI" : "Gateway" })
|
|
339
340
|
]
|
|
340
341
|
}, option.id))
|
|
341
342
|
}, group.providerLabel)),
|
|
@@ -444,7 +445,7 @@ function ModelSelectorItem({ className, value, keywords, selected, onSelect, chi
|
|
|
444
445
|
}) });
|
|
445
446
|
}
|
|
446
447
|
function ModelSelectorEmpty({ className, children = "No models found", ref, ...props }) {
|
|
447
|
-
return /* @__PURE__ */ jsx(
|
|
448
|
+
return /* @__PURE__ */ jsx(EmptyState, {
|
|
448
449
|
ref,
|
|
449
450
|
className: cx("model-selector__empty", className),
|
|
450
451
|
...props,
|
|
@@ -483,13 +484,19 @@ function ModelSelectorName({ className, children, ref, ...props }) {
|
|
|
483
484
|
children
|
|
484
485
|
});
|
|
485
486
|
}
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
/**
|
|
488
|
+
* Where a model comes from — "Workers AI", "Gateway" — shown at the end of its
|
|
489
|
+
* row. This was a `<kbd>` named `ModelSelectorSource`, which announced
|
|
490
|
+
* "Workers AI" to a screen reader as keyboard input and offered a shortcut
|
|
491
|
+
* that does not exist.
|
|
492
|
+
*/
|
|
493
|
+
function ModelSelectorSource({ className, children, ref, ...props }) {
|
|
494
|
+
return /* @__PURE__ */ jsx("span", {
|
|
488
495
|
ref,
|
|
489
|
-
className: cx("model-
|
|
496
|
+
className: cx("model-selector__source", className),
|
|
490
497
|
...props,
|
|
491
498
|
children
|
|
492
499
|
});
|
|
493
500
|
}
|
|
494
501
|
//#endregion
|
|
495
|
-
export { getCloudflareModelProvider as _, ModelSelectorEmpty as a, normalizeCloudflareModelSelectorModels as b, ModelSelectorItem as c, ModelSelectorLogoGroup as d, ModelSelectorName as f, formatCloudflareModelProvider as g, ModelSelectorTrigger as h, ModelSelectorDialog as i, ModelSelectorList as l,
|
|
502
|
+
export { getCloudflareModelProvider as _, ModelSelectorEmpty as a, normalizeCloudflareModelSelectorModels as b, ModelSelectorItem as c, ModelSelectorLogoGroup as d, ModelSelectorName as f, formatCloudflareModelProvider as g, ModelSelectorTrigger as h, ModelSelectorDialog as i, ModelSelectorList as l, ModelSelectorSource as m, ModelSelector as n, ModelSelectorGroup as o, ModelSelectorSeparator as p, ModelSelectorContent as r, ModelSelectorInput as s, CloudflareModelSelector as t, ModelSelectorLogo as u, isCloudflareRunnableModelId as v, readCloudflareModelId as x, listCloudflareModelSelectorOptions as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { r as ButtonProps } from "./Button-SBIz6Lqi.js";
|
|
2
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
3
|
import { a as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "./Tabs-C49J5m0Q.js";
|
|
4
4
|
import { t as Combobox } from "./Combobox-xEEF6fUb.js";
|
|
@@ -179,6 +179,19 @@ declare function PromptInputFooter({
|
|
|
179
179
|
}: PromptInputFooterProps & {
|
|
180
180
|
ref?: React.Ref<HTMLDivElement>;
|
|
181
181
|
}): React.JSX.Element;
|
|
182
|
+
interface PromptInputTrayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
183
|
+
/** Edge of the composer this supporting tray attaches to. */
|
|
184
|
+
side: "top" | "bottom";
|
|
185
|
+
}
|
|
186
|
+
/** Supporting controls or queued work tucked behind a PromptInput edge. */
|
|
187
|
+
declare function PromptInputTray({
|
|
188
|
+
side,
|
|
189
|
+
className,
|
|
190
|
+
ref,
|
|
191
|
+
...props
|
|
192
|
+
}: PromptInputTrayProps & {
|
|
193
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
194
|
+
}): React.JSX.Element;
|
|
182
195
|
interface PromptInputToolsProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
183
196
|
declare function PromptInputTools({
|
|
184
197
|
className,
|
|
@@ -850,4 +863,4 @@ declare function PromptInputContextSelector({
|
|
|
850
863
|
action
|
|
851
864
|
}: PromptInputContextSelectorProps): React.JSX.Element;
|
|
852
865
|
//#endregion
|
|
853
|
-
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B,
|
|
866
|
+
export { PromptInputDictationProps as $, PromptInputCommandDefinition as A, PromptInputTabProps as At, PromptInputCommandItemProps as B, TextInputContext as Bt, PromptInputBodyProps as C, PromptInputTab as Ct, PromptInputCommand as D, PromptInputTabItemProps as Dt, PromptInputButtonTooltip as E, PromptInputTabItem as Et, PromptInputCommandGroupLabelProps as F, PromptInputTools as Ft, PromptInputCommandSeparatorProps as G, usePromptInputAttachments as Gt, PromptInputCommandListProps as H, getApprovalRequestId as Ht, PromptInputCommandGroupProps as I, PromptInputToolsProps as It, PromptInputContextItem as J, PromptInputCommandTrigger as K, usePromptInputController as Kt, PromptInputCommandInput as L, PromptInputTooltipConfig as Lt, PromptInputCommandEmptyProps as M, PromptInputTabsListProps as Mt, PromptInputCommandGroup as N, PromptInputTextarea as Nt, PromptInputCommandComposer as O, PromptInputTabLabel as Ot, PromptInputCommandGroupLabel as P, PromptInputTextareaProps as Pt, PromptInputDictation as Q, PromptInputCommandInputProps as R, PromptInputTray as Rt, PromptInputBody as S, PromptInputSubmitProps as St, PromptInputButtonProps as T, PromptInputTabBodyProps as Tt, PromptInputCommandProps as U, getApprovalStateKey as Ut, PromptInputCommandList as V, TooltipSide as Vt, PromptInputCommandSeparator as W, getPendingToolApprovals as Wt, PromptInputContextSelectorProps as X, PromptInputContextSelector as Y, PromptInputControllerProps as Z, PromptInputApprovalProps as _, PromptInputReferences as _t, PromptInputActionAddAttachmentsProps as a, PromptInputHoverCardContent as at, PromptInputAttachments as b, PromptInputSelectProps as bt, PromptInputActionMenu as c, PromptInputHoverCardTrigger as ct, PromptInputActionMenuItem as d, PromptInputPermissionSelector as dt, PromptInputFooter as et, PromptInputActionMenuItemProps as f, PromptInputPermissionSelectorProps as ft, PromptInputApproval as g, PromptInputReference as gt, PromptInputActionMenuTriggerProps as h, PromptInputProviderProps as ht, PromptInputActionAddAttachments as i, PromptInputHoverCard as it, PromptInputCommandEmpty as j, PromptInputTabsList as jt, PromptInputCommandComposerProps as k, PromptInputTabLabelProps as kt, PromptInputActionMenuContent as l, PromptInputHoverCardTriggerProps as lt, PromptInputActionMenuTrigger as m, PromptInputProvider as mt, PermissionMode as n, PromptInputHeader as nt, PromptInputActionAddScreenshot as o, PromptInputHoverCardContentProps as ot, PromptInputActionMenuProps as p, PromptInputProps as pt, PromptInputContextAction as q, useProviderAttachments as qt, PromptInput as r, PromptInputHeaderProps as rt, PromptInputActionAddScreenshotProps as s, PromptInputHoverCardProps as st, AttachmentsContext as t, PromptInputFooterProps as tt, PromptInputActionMenuContentProps as u, PromptInputMessage as ut, PromptInputAttachment as v, PromptInputReferencesProps as vt, PromptInputButton as w, PromptInputTabBody as wt, PromptInputAttachmentsProps as x, PromptInputSubmit as xt, PromptInputAttachmentProps as y, PromptInputSelect as yt, PromptInputCommandItem as z, PromptInputTrayProps as zt };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
|
|
2
|
-
import { r as AgentChatProps } from "./AgentChat-
|
|
2
|
+
import { r as AgentChatProps } from "./AgentChat-Bm1qYbOo.js";
|
|
3
3
|
import { l as ThinkChatPart } from "./ThinkChatToolParts-CSzVwMXf.js";
|
|
4
|
+
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-kr5fE0wg.js";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
6
7
|
import { AgentToolRunState } from "agents/agent-tools";
|
|
@@ -9,11 +10,11 @@ import { AgentToolRunState } from "agents/agent-tools";
|
|
|
9
10
|
/**
|
|
10
11
|
* Bespoke rendering for one tool inside the activity log. Both hooks fall
|
|
11
12
|
* through to the built-in families when they return `undefined`, so an
|
|
12
|
-
* override can adjust just the
|
|
13
|
+
* override can adjust just the action or just the panel.
|
|
13
14
|
*/
|
|
14
15
|
interface ThinkChatToolRenderer {
|
|
15
|
-
/** One-line step
|
|
16
|
-
describe?: (part: ToolUIPart | DynamicToolUIPart) =>
|
|
16
|
+
/** One-line step action. `null` hides the step from the log. */
|
|
17
|
+
describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
|
|
17
18
|
/** Expanded detail under the step. `null` keeps the step a plain row. */
|
|
18
19
|
panel?: (part: ToolUIPart | DynamicToolUIPart) => React.ReactNode;
|
|
19
20
|
}
|
|
@@ -26,7 +27,7 @@ interface ThinkChatActivityRendererOptions<MessageT extends UIMessage = UIMessag
|
|
|
26
27
|
* with custom UI, use `toolRenderers` instead.
|
|
27
28
|
*/
|
|
28
29
|
excludeTools?: readonly string[];
|
|
29
|
-
/** Per-tool
|
|
30
|
+
/** Per-tool action/panel overrides inside the activity log, keyed by tool name. */
|
|
30
31
|
toolRenderers?: ThinkChatToolRenderers;
|
|
31
32
|
/** App-authored TanStack Router Link for each retained child destination. */
|
|
32
33
|
renderAgentToolRunLink?: (run: AgentToolRunState<MessageT["parts"][number]>) => React.ReactElement;
|
|
@@ -37,12 +38,12 @@ interface ThinkChatActivityProps {
|
|
|
37
38
|
parts: readonly ThinkChatPart[];
|
|
38
39
|
/** Defaults to deriving from part states (reasoning streaming, tool awaiting output). */
|
|
39
40
|
isStreaming?: boolean;
|
|
40
|
-
/** Per-tool
|
|
41
|
+
/** Per-tool action/panel overrides, keyed by tool name. */
|
|
41
42
|
toolRenderers?: ThinkChatToolRenderers;
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* One run of agent work as a collapsed Activity block: while streaming the
|
|
45
|
-
*
|
|
46
|
+
* action shimmers with the live step; settled, it becomes a short summary
|
|
46
47
|
* ("Thought, read 2 files and ran a command") over an expandable step log
|
|
47
48
|
* with per-tool panels. Normally reached through `ThinkChat.Messages`;
|
|
48
49
|
* exported for apps that lay out messages themselves.
|
package/dist/{ThinkChatActivitySummary-D1xOrNrq.d.ts → ThinkChatActivitySummary-kr5fE0wg.d.ts}
RENAMED
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-
|
|
1
|
+
import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-D3OvrC02.js";
|
|
2
2
|
import { l as ThinkChatPart } from "./ThinkChatToolParts-CSzVwMXf.js";
|
|
3
3
|
import { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ThinkChatActivitySummary.d.ts
|
|
6
6
|
interface ThinkChatToolDescriber {
|
|
7
|
-
describe?: (part: ToolUIPart | DynamicToolUIPart) =>
|
|
7
|
+
describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
|
|
8
8
|
}
|
|
9
9
|
type ThinkChatToolDescribers = Record<string, ThinkChatToolDescriber>;
|
|
10
10
|
type ThinkChatActivityHeader = Omit<AgentActivitySummary, "mode">;
|
|
11
|
+
/**
|
|
12
|
+
* A described step, kept in two pieces so the renderer can set the action apart
|
|
13
|
+
* from what it acted on. Describers that produce a whole sentence — aggregate
|
|
14
|
+
* summaries, failures — leave `detail` off and put everything in `action`.
|
|
15
|
+
*/
|
|
16
|
+
interface ThinkChatActivityDescription {
|
|
17
|
+
action: string;
|
|
18
|
+
detail?: string;
|
|
19
|
+
}
|
|
11
20
|
declare function activityPartUrl(part: ThinkChatPart): string | null;
|
|
12
21
|
declare function activityPartIconKind(part: ThinkChatPart): AgentActivityIconKind;
|
|
13
22
|
/**
|
|
14
|
-
* One-line natural-language
|
|
23
|
+
* One-line natural-language action for an activity part ("Ran vp test",
|
|
15
24
|
* "Fetched developers.cloudflare.com/agents/"); `null` for boundaries that
|
|
16
25
|
* aren't steps (step-start). Exported so a custom `renderPart` can reuse the
|
|
17
26
|
* built-in labels for tools it doesn't override.
|
|
18
27
|
*/
|
|
19
|
-
declare function describeThinkChatActivityPart(part: ThinkChatPart, toolRenderers?: ThinkChatToolDescribers):
|
|
28
|
+
declare function describeThinkChatActivityPart(part: ThinkChatPart, toolRenderers?: ThinkChatToolDescribers): ThinkChatActivityDescription | null;
|
|
20
29
|
declare function summarizeActivitySteps(parts: readonly ThinkChatPart[]): string;
|
|
21
30
|
interface ThinkChatToolLifecycleSnapshot {
|
|
22
31
|
toolName: string;
|
|
@@ -36,4 +45,4 @@ declare function deriveThinkChatActivityHeader(parts: readonly ThinkChatPart[],
|
|
|
36
45
|
*/
|
|
37
46
|
declare function deriveThinkChatToolLifecycleHeader(snapshot: ThinkChatToolLifecycleSnapshot): ThinkChatActivityHeader;
|
|
38
47
|
//#endregion
|
|
39
|
-
export {
|
|
48
|
+
export { ThinkChatToolLifecycleSnapshot as a, deriveThinkChatActivityHeader as c, summarizeActivitySteps as d, ThinkChatToolDescribers as i, deriveThinkChatToolLifecycleHeader as l, ThinkChatActivityHeader as n, activityPartIconKind as o, ThinkChatToolDescriber as r, activityPartUrl as s, ThinkChatActivityDescription as t, describeThinkChatActivityPart as u };
|
|
@@ -13,6 +13,15 @@ interface ToggleGroupProps extends React.ComponentPropsWithRef<typeof ToggleGrou
|
|
|
13
13
|
*/
|
|
14
14
|
size?: ToggleGroupSize;
|
|
15
15
|
spacing?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Draws one shared thumb that slides between segments rather than lighting up
|
|
18
|
+
* each item's own background. This is the permission-mode / view-switch
|
|
19
|
+
* control; it is a presentation of this group, not a separate component.
|
|
20
|
+
*
|
|
21
|
+
* Only meaningful for single selection — a sliding thumb cannot be in two
|
|
22
|
+
* places, so a `multiple` group ignores it.
|
|
23
|
+
*/
|
|
24
|
+
segmented?: boolean;
|
|
16
25
|
}
|
|
17
26
|
interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle>, Omit<ToggleVariantsOptions, "className"> {}
|
|
18
27
|
/**
|
|
@@ -43,6 +52,7 @@ interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle
|
|
|
43
52
|
declare function ToggleGroupRoot({
|
|
44
53
|
size,
|
|
45
54
|
spacing,
|
|
55
|
+
segmented,
|
|
46
56
|
variant,
|
|
47
57
|
className,
|
|
48
58
|
children,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-DMtRMwVv.js";
|
|
2
2
|
import { WorkspaceLike } from "@cloudflare/think";
|
|
3
3
|
import { FileInfo, Workspace } from "@cloudflare/shell";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-O-EBKUJ8.js";
|
|
2
|
-
import { o as WorkspaceState } from "./Workspace-
|
|
2
|
+
import { o as WorkspaceState } from "./Workspace-CIycQ4xE.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/WorkspaceExplorer.d.ts
|