@mcp-b/react-components 0.16.0 → 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 +118 -64
- 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 +13 -11
- package/dist/styles/agent-attention.css +19 -13
- package/dist/styles/agent-chat.css +0 -41
- package/dist/styles/agent-connection.css +9 -21
- package/dist/styles/agent-tool-detail.css +54 -0
- package/dist/styles/alert-dialog.css +11 -11
- package/dist/styles/app-top-bar.css +9 -7
- 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/card.css +8 -8
- package/dist/styles/chain-of-thought.css +5 -13
- package/dist/styles/checkpoint.css +58 -0
- package/dist/styles/codex-model-selector.css +3 -3
- package/dist/styles/combobox.css +3 -2
- package/dist/styles/commit.css +0 -21
- package/dist/styles/context-menu.css +1 -9
- package/dist/styles/dialog.css +11 -11
- package/dist/styles/environment-variables.css +0 -13
- package/dist/styles/field.css +14 -14
- package/dist/styles/fieldset.css +5 -5
- 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-connection-request.css +3 -3
- package/dist/styles/mcp-server-picker.css +1 -30
- package/dist/styles/menu.css +1 -30
- 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 +18 -32
- package/dist/styles/plan.css +127 -0
- package/dist/styles/popover.css +7 -43
- package/dist/styles/preview-card.css +1 -1
- package/dist/styles/prompt-input.css +2 -195
- package/dist/styles/recipes.css +139 -12
- package/dist/styles/responsive-sidebar-shell.css +16 -19
- package/dist/styles/select.css +3 -3
- package/dist/styles/sources.css +6 -14
- package/dist/styles/subagent-run.css +12 -70
- package/dist/styles/task.css +17 -26
- package/dist/styles/test-results.css +17 -23
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/think-execution-workbench.css +9 -9
- package/dist/styles/think-full-app.css +49 -33
- package/dist/styles/think-routine-library.css +30 -38
- package/dist/styles/think-thread-picker.css +15 -0
- package/dist/styles/toast.css +4 -11
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/utilities.css +31 -0
- package/dist/styles/web-preview.css +0 -21
- package/dist/styles/workspace-explorer.css +20 -65
- 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,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 { C as LinkIcon, l as ChevronRightIcon } from "../icons-CpfUer49.js";
|
|
3
|
+
import { u as ChevronRightIcon, w as LinkIcon } from "../icons--FqCZEc3.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Sources.tsx
|
|
@@ -29,6 +29,7 @@ function Sources({ className, ref, ...props }) {
|
|
|
29
29
|
ref,
|
|
30
30
|
className: cx("sources", className),
|
|
31
31
|
...props,
|
|
32
|
+
"data-recipe": "disclosure-stack",
|
|
32
33
|
unstyled: true
|
|
33
34
|
});
|
|
34
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
|
+
import { V as SpinnerIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import { t as assignRef } from "../merge-refs-DF_7w2x_.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
|
+
import { J as WarningIcon, V as SpinnerIcon, W as StopIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/SubagentRunIndicator.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
2
|
import { SubagentRunSelector } from "./SubagentRunSelector.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -15,7 +15,6 @@ function SubagentRunList({ className, onSelect, runs, selectedRunId, ref, ...pro
|
|
|
15
15
|
className: "subagent-run__list-item",
|
|
16
16
|
children: /* @__PURE__ */ jsx(SubagentRunSelector, {
|
|
17
17
|
run,
|
|
18
|
-
naniteIndex: run.order,
|
|
19
18
|
selected: run.runId === selectedRunId,
|
|
20
19
|
onSelect
|
|
21
20
|
})
|
|
@@ -4,16 +4,9 @@ import { UIMessage } from "ai";
|
|
|
4
4
|
import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
|
|
5
5
|
|
|
6
6
|
//#region src/components/SubagentRunSelector.d.ts
|
|
7
|
-
interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<ButtonProps, "children" | "
|
|
8
|
-
className?: string;
|
|
7
|
+
interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<ButtonProps, "children" | "color" | "onSelect" | "size" | "variant"> {
|
|
9
8
|
/** Complete retained-run state returned by `useAgentToolEvents()`. */
|
|
10
|
-
run
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Pass `run` so the selector derives its content from the whole
|
|
13
|
-
* upstream object. Retained for the pre-0.15 presentation-only API.
|
|
14
|
-
*/
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
naniteIndex?: number;
|
|
9
|
+
run: AgentToolRunState<Part>;
|
|
17
10
|
selected?: boolean;
|
|
18
11
|
/** Short supplementary status shown on hover and keyboard focus. `false` disables it. */
|
|
19
12
|
tooltip?: React.ReactNode | false;
|
|
@@ -30,8 +23,6 @@ interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["pa
|
|
|
30
23
|
*/
|
|
31
24
|
declare function SubagentRunSelector<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
|
|
32
25
|
className,
|
|
33
|
-
children,
|
|
34
|
-
naniteIndex,
|
|
35
26
|
onClick,
|
|
36
27
|
onSelect,
|
|
37
28
|
run,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-Bk-QLWWI.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
3
|
import { Tooltip } from "./Tooltip.js";
|
|
4
4
|
import { NaniteMark } from "./NaniteScene.js";
|
|
5
5
|
import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import {
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/SubagentRunSelector.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Compact selector for a retained Cloudflare Agent Tool run.
|
|
@@ -14,8 +14,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* an adjacent detail surface; it never invents a second transcript or expands
|
|
15
15
|
* child content inline.
|
|
16
16
|
*/
|
|
17
|
-
function SubagentRunSelector({ className,
|
|
18
|
-
const name =
|
|
17
|
+
function SubagentRunSelector({ className, onClick, onSelect, run, selected = false, tooltip, ref, "aria-label": ariaLabel, ...props }) {
|
|
18
|
+
const name = getSubagentRunName(run);
|
|
19
19
|
const button = /* @__PURE__ */ jsxs(Button, {
|
|
20
20
|
ref,
|
|
21
21
|
type: "button",
|
|
@@ -23,24 +23,25 @@ function SubagentRunSelector({ className, children, naniteIndex = 0, onClick, on
|
|
|
23
23
|
color: "neutral",
|
|
24
24
|
size: "xs",
|
|
25
25
|
"data-slot": "subagent-run-selector",
|
|
26
|
-
"data-status": run
|
|
26
|
+
"data-status": run.status,
|
|
27
27
|
className: cx("subagent-run__selector", className),
|
|
28
28
|
"aria-pressed": selected,
|
|
29
|
-
"aria-label": ariaLabel ??
|
|
29
|
+
"aria-label": ariaLabel ?? `Open ${name}, ${run.status}`,
|
|
30
30
|
onClick: (event) => {
|
|
31
31
|
onClick?.(event);
|
|
32
|
-
if (!event.defaultPrevented
|
|
32
|
+
if (!event.defaultPrevented) onSelect?.(run);
|
|
33
33
|
},
|
|
34
34
|
...props,
|
|
35
|
-
children: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(NaniteMark, { index: run.order }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "subagent-run__title",
|
|
39
|
+
children: name
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(SubagentRunIndicator, { run })
|
|
42
|
+
]
|
|
42
43
|
});
|
|
43
|
-
const tooltipContent = tooltip === false ? null : tooltip ??
|
|
44
|
+
const tooltipContent = tooltip === false ? null : tooltip ?? getSubagentRunTooltip(run);
|
|
44
45
|
if (!tooltipContent) return button;
|
|
45
46
|
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
46
47
|
render: button,
|
|
@@ -2,17 +2,14 @@ import * as React from "react";
|
|
|
2
2
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Switch.d.ts
|
|
5
|
-
interface SwitchProps extends
|
|
6
|
-
className?: string;
|
|
5
|
+
interface SwitchProps extends React.ComponentPropsWithRef<typeof Switch$1.Root> {
|
|
7
6
|
/**
|
|
8
7
|
* The size of the switch.
|
|
9
8
|
* @default 'default'
|
|
10
9
|
*/
|
|
11
10
|
size?: "sm" | "md" | "lg" | "default";
|
|
12
11
|
}
|
|
13
|
-
interface SwitchThumbProps extends
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
12
|
+
interface SwitchThumbProps extends React.ComponentPropsWithRef<typeof Switch$1.Thumb> {}
|
|
16
13
|
/**
|
|
17
14
|
* A toggle switch component for binary choices.
|
|
18
15
|
*
|
|
@@ -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 { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
@@ -23,13 +24,9 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
|
23
24
|
*
|
|
24
25
|
* @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
|
|
25
26
|
*/
|
|
26
|
-
function SwitchRoot({ size = "default", className
|
|
27
|
+
function SwitchRoot({ size = "default", className, ref, ...props }) {
|
|
27
28
|
const normalizedSize = size === "md" ? "default" : size;
|
|
28
|
-
const classes = [
|
|
29
|
-
"switch",
|
|
30
|
-
normalizedSize !== "default" && `switch--${normalizedSize}`,
|
|
31
|
-
className
|
|
32
|
-
].filter(Boolean).join(" ");
|
|
29
|
+
const classes = mergeBaseClassName(["switch", normalizedSize !== "default" && `switch--${normalizedSize}`].filter(Boolean).join(" "), className);
|
|
33
30
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
34
31
|
ref,
|
|
35
32
|
"data-slot": "switch",
|
|
@@ -41,8 +38,8 @@ function SwitchRoot({ size = "default", className = "", ref, ...props }) {
|
|
|
41
38
|
/**
|
|
42
39
|
* The thumb indicator for the Switch component.
|
|
43
40
|
*/
|
|
44
|
-
function SwitchThumb({ className
|
|
45
|
-
const classes = ["switch__thumb"
|
|
41
|
+
function SwitchThumb({ className, ref, ...props }) {
|
|
42
|
+
const classes = mergeBaseClassName(["switch__thumb"].filter(Boolean).join(" "), className);
|
|
46
43
|
return /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
47
44
|
ref,
|
|
48
45
|
"data-slot": "switch-thumb",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { TabPanelProps, TabProps, Tabs, TabsListProps,
|
|
1
|
+
import { a as TabsProps, i as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "../Tabs-9zddXDQo.js";
|
|
2
|
+
export { TabPanelProps, TabProps, Tabs, TabsListProps, TabsProps };
|
package/dist/components/Tabs.js
CHANGED
|
@@ -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 { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
@@ -26,12 +27,8 @@ function tabsListVariants({ variant = "default", className } = {}) {
|
|
|
26
27
|
*
|
|
27
28
|
* @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
|
|
28
29
|
*/
|
|
29
|
-
function TabsRoot({ orientation = "horizontal", variant = "default", className
|
|
30
|
-
const classes = [
|
|
31
|
-
"tabs",
|
|
32
|
-
variant !== "default" && `tabs--${variant}`,
|
|
33
|
-
className
|
|
34
|
-
].filter(Boolean).join(" ");
|
|
30
|
+
function TabsRoot({ orientation = "horizontal", variant = "default", className, ref, ...props }) {
|
|
31
|
+
const classes = mergeBaseClassName(["tabs", variant !== "default" && `tabs--${variant}`].filter(Boolean).join(" "), className);
|
|
35
32
|
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
36
33
|
ref,
|
|
37
34
|
"data-orientation": orientation,
|
|
@@ -41,11 +38,8 @@ function TabsRoot({ orientation = "horizontal", variant = "default", className =
|
|
|
41
38
|
...props
|
|
42
39
|
});
|
|
43
40
|
}
|
|
44
|
-
function TabsList({ className
|
|
45
|
-
const classes = tabsListVariants({
|
|
46
|
-
variant,
|
|
47
|
-
className
|
|
48
|
-
});
|
|
41
|
+
function TabsList({ className, variant = "default", ref, ...props }) {
|
|
42
|
+
const classes = mergeBaseClassName(tabsListVariants({ variant }), className);
|
|
49
43
|
return /* @__PURE__ */ jsx(Tabs$1.List, {
|
|
50
44
|
ref,
|
|
51
45
|
"data-slot": "tabs-list",
|
|
@@ -54,8 +48,8 @@ function TabsList({ className = "", variant = "default", ref, ...props }) {
|
|
|
54
48
|
...props
|
|
55
49
|
});
|
|
56
50
|
}
|
|
57
|
-
function Tab({ className
|
|
58
|
-
const classes =
|
|
51
|
+
function Tab({ className, ref, ...props }) {
|
|
52
|
+
const classes = mergeBaseClassName("tabs__tab", className);
|
|
59
53
|
return /* @__PURE__ */ jsx(Tabs$1.Tab, {
|
|
60
54
|
ref,
|
|
61
55
|
"data-slot": "tabs-trigger",
|
|
@@ -63,8 +57,8 @@ function Tab({ className = "", ref, ...props }) {
|
|
|
63
57
|
...props
|
|
64
58
|
});
|
|
65
59
|
}
|
|
66
|
-
function TabPanel({ className
|
|
67
|
-
const classes =
|
|
60
|
+
function TabPanel({ className, ref, ...props }) {
|
|
61
|
+
const classes = mergeBaseClassName("tabs__panel", className);
|
|
68
62
|
return /* @__PURE__ */ jsx(Tabs$1.Panel, {
|
|
69
63
|
ref,
|
|
70
64
|
"data-slot": "tabs-content",
|
|
@@ -80,4 +74,4 @@ const Tabs = {
|
|
|
80
74
|
Panel: TabPanel
|
|
81
75
|
};
|
|
82
76
|
//#endregion
|
|
83
|
-
export { Tabs
|
|
77
|
+
export { Tabs };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Collapsible } from "
|
|
1
|
+
import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Task.d.ts
|
|
5
|
-
interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
5
|
+
interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {}
|
|
8
6
|
/**
|
|
9
7
|
* A collapsible task/workflow list. Compose with TaskTrigger, TaskContent,
|
|
10
8
|
* TaskItem, and TaskItemFile to show structured progress for a multi-step
|
|
@@ -36,8 +34,7 @@ declare function Task({
|
|
|
36
34
|
}: TaskProps & {
|
|
37
35
|
ref?: React.Ref<HTMLDivElement>;
|
|
38
36
|
}): React.JSX.Element;
|
|
39
|
-
interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "
|
|
40
|
-
className?: string;
|
|
37
|
+
interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {
|
|
41
38
|
/** Heading text shown in the trigger row. */
|
|
42
39
|
title: string;
|
|
43
40
|
}
|
|
@@ -53,9 +50,7 @@ declare function TaskTrigger({
|
|
|
53
50
|
}: TaskTriggerProps & {
|
|
54
51
|
ref?: React.Ref<HTMLButtonElement>;
|
|
55
52
|
}): React.JSX.Element;
|
|
56
|
-
interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "
|
|
57
|
-
className?: string;
|
|
58
|
-
}
|
|
53
|
+
interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> {}
|
|
59
54
|
/**
|
|
60
55
|
* The collapsible panel containing TaskItem children.
|
|
61
56
|
*/
|
package/dist/components/Task.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 { R as SearchIcon, l as ChevronRightIcon, v as FileIcon } from "../icons-CpfUer49.js";
|
|
3
|
+
import { u as ChevronRightIcon, y as FileIcon, z as SearchIcon } from "../icons--FqCZEc3.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Task.tsx
|
|
@@ -33,6 +33,7 @@ function Task({ className, defaultOpen = true, ref, ...props }) {
|
|
|
33
33
|
className: cx("task", className),
|
|
34
34
|
defaultOpen,
|
|
35
35
|
...props,
|
|
36
|
+
"data-recipe": "disclosure-stack",
|
|
36
37
|
unstyled: true
|
|
37
38
|
});
|
|
38
39
|
}
|
|
@@ -61,7 +62,7 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
|
|
|
61
62
|
children: /* @__PURE__ */ jsx(SearchIcon, {})
|
|
62
63
|
}),
|
|
63
64
|
/* @__PURE__ */ jsx("span", {
|
|
64
|
-
className: "task__trigger-title",
|
|
65
|
+
className: "task__trigger-title sigvelo-truncate",
|
|
65
66
|
children: title
|
|
66
67
|
}),
|
|
67
68
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as ButtonProps } from "../Button-FX_hpqxm.js";
|
|
2
|
-
import { t as CopyButtonProps } from "../copy-button-
|
|
2
|
+
import { t as CopyButtonProps } from "../copy-button-CQx3LQAC.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Terminal.d.ts
|
|
@@ -103,8 +103,7 @@ declare function TerminalCopyButton({
|
|
|
103
103
|
onClick,
|
|
104
104
|
...props
|
|
105
105
|
}: TerminalCopyButtonProps): React.JSX.Element;
|
|
106
|
-
interface TerminalClearButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "
|
|
107
|
-
className?: string;
|
|
106
|
+
interface TerminalClearButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "onClick"> {
|
|
108
107
|
label?: string;
|
|
109
108
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
110
109
|
}
|
|
@@ -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 { K as TerminalIcon, X as XIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
|
-
import { t as CopyButton } from "../copy-button-
|
|
5
|
+
import { t as CopyButton } from "../copy-button-cYsJBauI.js";
|
|
6
6
|
import { Badge } from "./Badge.js";
|
|
7
7
|
import { ScrollArea } from "./ScrollArea.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Collapsible } from "
|
|
1
|
+
import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/TestResults.d.ts
|
|
@@ -101,8 +101,7 @@ declare function TestResultsContent({
|
|
|
101
101
|
}: TestResultsContentProps & {
|
|
102
102
|
ref?: React.Ref<HTMLDivElement>;
|
|
103
103
|
}): React.JSX.Element;
|
|
104
|
-
interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "
|
|
105
|
-
className?: string;
|
|
104
|
+
interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {
|
|
106
105
|
name: string;
|
|
107
106
|
status: TestStatusValue;
|
|
108
107
|
}
|
|
@@ -117,9 +116,7 @@ declare function TestSuite({
|
|
|
117
116
|
}: TestSuiteProps & {
|
|
118
117
|
ref?: React.Ref<HTMLDivElement>;
|
|
119
118
|
}): React.JSX.Element;
|
|
120
|
-
type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "
|
|
121
|
-
className?: string;
|
|
122
|
-
};
|
|
119
|
+
type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> & {};
|
|
123
120
|
declare function TestSuiteName({
|
|
124
121
|
className,
|
|
125
122
|
children,
|
|
@@ -144,9 +141,7 @@ declare function TestSuiteStats({
|
|
|
144
141
|
}: TestSuiteStatsProps & {
|
|
145
142
|
ref?: React.Ref<HTMLDivElement>;
|
|
146
143
|
}): React.JSX.Element;
|
|
147
|
-
type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "
|
|
148
|
-
className?: string;
|
|
149
|
-
};
|
|
144
|
+
type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> & {};
|
|
150
145
|
declare function TestSuiteContent({
|
|
151
146
|
className,
|
|
152
147
|
children,
|
|
@@ -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 { B as SpinnerIcon, Y as XIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-CpfUer49.js";
|
|
3
|
+
import { V as SpinnerIcon, X as XIcon, s as CheckIcon, u as ChevronRightIcon } from "../icons--FqCZEc3.js";
|
|
4
4
|
import { Badge } from "./Badge.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -52,6 +52,7 @@ function TestResults({ className, summary, children, ref, ...props }) {
|
|
|
52
52
|
className: cx("test-results", className),
|
|
53
53
|
"data-status": overall,
|
|
54
54
|
...props,
|
|
55
|
+
"data-recipe": "framed-panel",
|
|
55
56
|
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TestResultsHeader, { children: [/* @__PURE__ */ jsx(TestResultsSummary, {}), /* @__PURE__ */ jsx(TestResultsProgress, {})] }), /* @__PURE__ */ jsx(TestResultsContent, {})] })
|
|
56
57
|
})
|
|
57
58
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as MonitorIcon, G as SunIcon, j as MoonIcon } from "../icons--FqCZEc3.js";
|
|
2
2
|
import { Radio, RadioGroup } from "./RadioGroup.js";
|
|
3
3
|
import { useTheme } from "./ThemeProvider.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
1
|
+
import { i as AgentMessageRenderPartContext } from "../AgentMessageParts-CyD2UB3V.js";
|
|
2
|
+
import { r as AgentChatProps } from "../AgentChat-CRuMi1Pb.js";
|
|
3
|
+
import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "../AgentToolRunsContext-BVe4stgw.js";
|
|
4
4
|
import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
|
|
5
5
|
import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-BPmu9a-c.js";
|
|
6
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-
|
|
7
|
-
import { n as ThinkChatValue } from "../ThinkChatContext-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BgesTfZ4.js";
|
|
7
|
+
import { n as ThinkChatValue } from "../ThinkChatContext-DrsZqdaO.js";
|
|
8
|
+
import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../ThinkRecoveryNotice-DFIcG9UX.js";
|
|
9
|
+
import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
|
|
10
|
+
import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
|
|
11
|
+
import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-C8UzuSH4.js";
|
|
12
|
+
import { a as useWorkspace, i as WorkspaceState, n as WorkspaceInfo, r as WorkspaceSource, t as UseWorkspaceOptions } from "../Workspace-C9RFoxcu.js";
|
|
13
|
+
import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-sZewzT2O.js";
|
|
11
14
|
import * as React from "react";
|
|
12
15
|
import { UIMessage } from "ai";
|
|
13
16
|
import { UseAgentOptions } from "agents/react";
|
|
@@ -19,6 +22,8 @@ import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
|
19
22
|
interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
|
|
20
23
|
/** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
|
|
21
24
|
chat: ThinkChatValue<State, MessageT>;
|
|
25
|
+
/** Optional whole `useAgentToolEvents` result when the app owns the parent connection. */
|
|
26
|
+
agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
|
|
22
27
|
children: React.ReactNode;
|
|
23
28
|
}
|
|
24
29
|
interface ThinkChatRootProps<State = unknown> {
|
|
@@ -28,7 +33,7 @@ interface ThinkChatRootProps<State = unknown> {
|
|
|
28
33
|
name?: string;
|
|
29
34
|
children: React.ReactNode;
|
|
30
35
|
}
|
|
31
|
-
interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions {
|
|
36
|
+
interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions<MessageT> {
|
|
32
37
|
className?: string;
|
|
33
38
|
/** Disable the composer (e.g. while the agent is unreachable). */
|
|
34
39
|
disabled?: boolean;
|
|
@@ -105,6 +110,7 @@ declare function useThinkPendingApprovals(stub: AgentStub<Think>, refreshKey: un
|
|
|
105
110
|
* stream with agent work folded into collapsed Activity blocks.
|
|
106
111
|
*/
|
|
107
112
|
declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
113
|
+
agentTools,
|
|
108
114
|
chat,
|
|
109
115
|
children
|
|
110
116
|
}: ThinkChatProviderProps<State, MessageT>): React.JSX.Element;
|
|
@@ -136,8 +142,11 @@ declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIM
|
|
|
136
142
|
* card) — see README "App-specific tools" and the Custom Tool Panel story.
|
|
137
143
|
*/
|
|
138
144
|
declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
145
|
+
composerHeader,
|
|
139
146
|
renderPart,
|
|
140
147
|
excludeTools,
|
|
148
|
+
onAgentToolRunSelect,
|
|
149
|
+
selectedAgentToolRunId,
|
|
141
150
|
toolRenderers,
|
|
142
151
|
thinkStub,
|
|
143
152
|
onExecutionSettled,
|
|
@@ -180,8 +189,9 @@ declare const ThinkChat: {
|
|
|
180
189
|
Root: typeof ThinkChatRoot;
|
|
181
190
|
Messages: typeof ThinkChatMessages;
|
|
182
191
|
Activity: typeof ThinkChatActivity;
|
|
183
|
-
|
|
192
|
+
RecoveryNotice: typeof ThinkRecoveryNotice;
|
|
193
|
+
renderActivityPart: (context: AgentMessageRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
|
|
184
194
|
createActivityRenderer: typeof createThinkChatActivityRenderer;
|
|
185
195
|
};
|
|
186
196
|
//#endregion
|
|
187
|
-
export { BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
|
|
197
|
+
export { type AgentToolEventsValue, AgentToolRunsProvider, type AgentToolRunsProviderProps, BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, ThinkRecoveryNotice, type ThinkRecoveryNoticeProps, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useOptionalAgentToolRuns, useThinkChat, useThinkPendingApprovals, useWorkspace };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
|
|
2
|
+
import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
2
3
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
3
|
-
import { BrowserReplay } from "./BrowserReplay.js";
|
|
4
4
|
import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
5
5
|
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
|
|
7
|
+
import { a as useThinkChat, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkPendingApprovals, r as ThinkChatProvider, t as ThinkChat } from "../ThinkChat-DInElus-.js";
|
|
8
|
+
import { BrowserReplay } from "./BrowserReplay.js";
|
|
7
9
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
8
10
|
import { useWorkspace } from "./Workspace.js";
|
|
9
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
10
|
-
export { BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
|
|
12
|
+
export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useOptionalAgentToolRuns, useThinkChat, useThinkPendingApprovals, useWorkspace };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
|
|
2
2
|
import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-BPmu9a-c.js";
|
|
3
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-
|
|
3
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BgesTfZ4.js";
|
|
4
4
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
2
2
|
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
3
3
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
4
|
+
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
5
|
+
import { SubagentRunList } from "./SubagentRunList.js";
|
|
4
6
|
import { useOptionalThinkChatContext } from "./ThinkChatContext.js";
|
|
5
7
|
import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
|
|
6
8
|
import { activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
7
|
-
import "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
|
|
10
12
|
//#region src/components/ThinkChatActivity.tsx
|
|
11
13
|
function activityPartIcon(part) {
|
|
@@ -103,14 +105,29 @@ function ThinkChatActivityStep({ text, part, toolRenderers }) {
|
|
|
103
105
|
children: text
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
|
-
function ThinkChatActivityGroup({ message, parts, isTrailing, toolRenderers }) {
|
|
108
|
+
function ThinkChatActivityGroup({ message, onAgentToolRunSelect, parts, selectedAgentToolRunId, isTrailing, toolRenderers }) {
|
|
107
109
|
const chat = useOptionalThinkChatContext();
|
|
108
110
|
const chatStillWorking = isTrailing && Boolean(chat?.isStreaming) && chat?.messages.at(-1)?.id === message.id;
|
|
109
|
-
|
|
111
|
+
const agentTools = useOptionalAgentToolRuns();
|
|
112
|
+
const runs = React.useMemo(() => {
|
|
113
|
+
if (!agentTools || !onAgentToolRunSelect) return [];
|
|
114
|
+
return parts.flatMap((part) => isToolUIPart(part) ? agentTools.getRunsForToolCall(part.toolCallId) : []);
|
|
115
|
+
}, [
|
|
116
|
+
agentTools,
|
|
117
|
+
onAgentToolRunSelect,
|
|
118
|
+
parts
|
|
119
|
+
]);
|
|
120
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThinkChatActivity, {
|
|
110
121
|
parts,
|
|
111
122
|
isStreaming: parts.some(isPartWorking) || chatStillWorking,
|
|
112
123
|
toolRenderers
|
|
113
|
-
})
|
|
124
|
+
}), runs.length ? /* @__PURE__ */ jsx(SubagentRunList, {
|
|
125
|
+
className: "subagent-run__list--adjacent",
|
|
126
|
+
"aria-label": "Delegated agent runs",
|
|
127
|
+
runs,
|
|
128
|
+
selectedRunId: selectedAgentToolRunId,
|
|
129
|
+
onSelect: onAgentToolRunSelect
|
|
130
|
+
}) : null] });
|
|
114
131
|
}
|
|
115
132
|
/**
|
|
116
133
|
* Builds a renderPart handler that folds every run of consecutive activity
|
|
@@ -119,7 +136,7 @@ function ThinkChatActivityGroup({ message, parts, isTrailing, toolRenderers }) {
|
|
|
119
136
|
* state. Excluded tools split the run and return undefined so your own
|
|
120
137
|
* renderPart (or AgentChat's generic activity row) takes over for them.
|
|
121
138
|
*/
|
|
122
|
-
function createThinkChatActivityRenderer({ excludeTools, toolRenderers } = {}) {
|
|
139
|
+
function createThinkChatActivityRenderer({ excludeTools, onAgentToolRunSelect, selectedAgentToolRunId, toolRenderers } = {}) {
|
|
123
140
|
const excluded = excludeTools?.length ? new Set(excludeTools) : void 0;
|
|
124
141
|
const isActivity = (part) => isThinkChatActivityPart(part, excluded);
|
|
125
142
|
return (context) => {
|
|
@@ -134,7 +151,9 @@ function createThinkChatActivityRenderer({ excludeTools, toolRenderers } = {}) {
|
|
|
134
151
|
message,
|
|
135
152
|
parts: message.parts.slice(start, end + 1),
|
|
136
153
|
isTrailing: end === message.parts.length - 1,
|
|
137
|
-
toolRenderers
|
|
154
|
+
toolRenderers,
|
|
155
|
+
selectedAgentToolRunId,
|
|
156
|
+
onAgentToolRunSelect
|
|
138
157
|
});
|
|
139
158
|
};
|
|
140
159
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as useThinkChatContext, n as ThinkChatValue, r as useOptionalThinkChatContext, t as ThinkChatContext } from "../ThinkChatContext-
|
|
1
|
+
import { i as useThinkChatContext, n as ThinkChatValue, r as useOptionalThinkChatContext, t as ThinkChatContext } from "../ThinkChatContext-DrsZqdaO.js";
|
|
2
2
|
export { ThinkChatContext, ThinkChatValue, useOptionalThinkChatContext, useThinkChatContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "./Activity.js";
|
|
2
|
-
import { Tabs } from "./Tabs.js";
|
|
3
2
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
4
|
-
import {
|
|
3
|
+
import { Tabs } from "./Tabs.js";
|
|
4
|
+
import { t as CodeBlock } from "../CodeBlock-Co1noLbC.js";
|
|
5
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
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 TerminalIcon, R as RefreshIcon, X as XIcon, s as CheckIcon, t as ArrowDownIcon, y as FileIcon } from "../icons--FqCZEc3.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
5
5
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|