@mcp-b/react-components 0.25.0 → 0.26.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-DHxdTjwF.d.ts → AgentChat-B6sgfQ_q.d.ts} +8 -1
- package/dist/{CodeBlock-B3RLU3ez.js → CodeBlock-BUfEhDia.js} +1 -1
- package/dist/{Combobox-xEEF6fUb.d.ts → Combobox-DI6xcQjc.d.ts} +14 -4
- package/dist/{FileTree-CYr5og0q.js → FileTree-XOLP3Yvo.js} +1 -1
- package/dist/{Message-KlK8tlBZ.js → Message-BF6SiKKL.js} +1 -1
- package/dist/{ModelSelector-YTlqkIjs.js → ModelSelector-CRdvHT_b.js} +1 -1
- package/dist/{PromptInput-BjoPWaaG.d.ts → PromptInput-CES0WO4u.d.ts} +8 -5
- package/dist/{ThinkChatActivity-DMTHKWrI.d.ts → ThinkChatActivity-DawPYgga.d.ts} +5 -5
- package/dist/{WorkspaceFileView-CuMjXYQn.js → WorkspaceFileView-CKEmUyeT.js} +3 -3
- package/dist/components/Activity.js +1 -1
- package/dist/components/AgentActivity.js +1 -1
- package/dist/components/AgentActivityPreview.js +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +10 -11
- package/dist/components/AgentChatStartScreen.js +1 -1
- 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/Approval.js +1 -1
- package/dist/components/Artifact.js +1 -1
- package/dist/components/BrowserLiveView.js +1 -1
- package/dist/components/BrowserReplay.js +1 -1
- package/dist/components/BrowserRunPanel.js +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.js +1 -1
- package/dist/components/CodexModelSelector.js +1 -1
- package/dist/components/Combobox.d.ts +1 -1
- package/dist/components/Combobox.js +16 -4
- package/dist/components/Commit.js +2 -2
- package/dist/components/Context.js +1 -32
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/EnvironmentVariables.js +2 -2
- package/dist/components/ExpansionState.js +2 -3
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Goal.d.ts +7 -5
- package/dist/components/Goal.js +8 -7
- package/dist/components/McpConnectionRequest.d.ts +1 -1
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpPluginCatalog.d.ts +1 -1
- package/dist/components/McpPluginCatalog.js +3 -2
- package/dist/components/McpServerPicker.d.ts +1 -1
- package/dist/components/McpServerPicker.js +1 -1
- package/dist/components/MediaPreviewCard.js +1 -1
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/MessageScrollerVirtual.d.ts +6 -1
- package/dist/components/MessageScrollerVirtual.js +21 -13
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/Plan.d.ts +61 -1
- package/dist/components/Plan.js +82 -2
- package/dist/components/PricingPlanCard.js +1 -1
- package/dist/components/PromptInput.d.ts +1 -1
- package/dist/components/PromptInput.js +4 -3
- package/dist/components/Queue.js +1 -1
- package/dist/components/Reasoning.js +2 -2
- package/dist/components/ResponsiveSidebarShell.js +1 -1
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/SessionCompaction.d.ts +8 -7
- package/dist/components/SessionCompaction.js +2 -0
- package/dist/components/SetupChecklist.d.ts +39 -0
- package/dist/components/SetupChecklist.js +45 -0
- package/dist/components/Sources.js +1 -1
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/Task.js +1 -1
- package/dist/components/Terminal.js +2 -2
- package/dist/components/TestResults.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +4 -2
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +3 -3
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +1 -1
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.js +1 -1
- package/dist/components/ThinkFullApp.js +34 -37
- package/dist/components/ThinkRoutineBrowser.js +1 -1
- package/dist/components/ThinkRoutineForm.js +1 -1
- package/dist/components/ThinkRoutineLibrary.js +1 -1
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/components/WebPreview.js +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.js +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-Buxmtmp9.js → copy-button-7ttJAorN.js} +1 -1
- package/dist/{icons-w5PpKGRz.js → icons-B4mGvCvc.js} +3 -1
- package/dist/{icons-Cih3W-zM.d.ts → icons-BGZ916hb.d.ts} +5 -1
- package/dist/{mcp-server-catalog-DycejaJ5.d.ts → mcp-server-catalog-BewjV7Eq.d.ts} +1 -1
- package/dist/progress-ring-BjqTZqBk.js +40 -0
- package/dist/styles/agent-chat.css +57 -1
- package/dist/styles/base.css +1 -0
- package/dist/styles/combobox.css +44 -0
- package/dist/styles/goal.css +11 -5
- package/dist/styles/message-scroller.css +1 -0
- package/dist/styles/plan.css +45 -0
- package/dist/utils/mcp-server-catalog.d.ts +1 -1
- package/dist/utils/mcp-server-catalog.js +1 -1
- package/package.json +2 -2
package/dist/components/Goal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Q as TargetIcon } from "../icons-B4mGvCvc.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Goal.tsx
|
|
@@ -8,14 +8,15 @@ const STATUS_LABELS = {
|
|
|
8
8
|
pursuing: "Pursuing goal",
|
|
9
9
|
paused: "Goal paused",
|
|
10
10
|
achieved: "Goal achieved",
|
|
11
|
-
unmet: "Goal blocked"
|
|
12
|
-
budget_limited: "Goal budget exhausted"
|
|
11
|
+
unmet: "Goal blocked"
|
|
13
12
|
};
|
|
14
13
|
/**
|
|
15
14
|
* Presentation-only banner for a persisted conversation goal — an objective
|
|
16
|
-
* the agent keeps pursuing across turns until it completes, pauses, or
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* the agent keeps pursuing across turns until it completes, pauses, or
|
|
16
|
+
* blocks on the user. Renders in `AgentChat`'s `composerTray` slot, sharing the
|
|
17
|
+
* queued-message tray docked above the composer. The row is capped: the
|
|
18
|
+
* objective truncates to one line, so pass full objective and progress text
|
|
19
|
+
* via `title` (or a popover) rather than rendering it inline.
|
|
19
20
|
*
|
|
20
21
|
* Actions are ordinary composed buttons; this primitive does not set, pause,
|
|
21
22
|
* resume, or clear a goal and owns no timer or transport. The host-side goal
|
|
@@ -71,7 +72,7 @@ function GoalObjective({ className, ref, ...props }) {
|
|
|
71
72
|
...props
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
/** Host-formatted progress metadata — elapsed time
|
|
75
|
+
/** Host-formatted progress metadata — elapsed time or turn count. */
|
|
75
76
|
function GoalMeta({ className, ref, ...props }) {
|
|
76
77
|
return /* @__PURE__ */ jsx("span", {
|
|
77
78
|
ref,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as McpServerCard } from "../mcp-server-catalog-
|
|
1
|
+
import { o as McpServerCard } from "../mcp-server-catalog-BewjV7Eq.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4
4
|
import { MCPServersState } from "agents";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import {
|
|
3
|
+
import { J as SpinnerIcon, d as CheckIcon, j as McpIcon, tt as WarningIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "./AgentAttention.js";
|
|
5
5
|
import { getMcpServerEntry, getMcpServerRuntimeState } from "../utils/mcp-server-catalog.js";
|
|
6
6
|
import { DescriptionList } from "./DescriptionList.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as McpServerCard } from "../mcp-server-catalog-
|
|
1
|
+
import { o as McpServerCard } from "../mcp-server-catalog-BewjV7Eq.js";
|
|
2
2
|
import { l as DialogProps } from "../Dialog-BD8NBKaE.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { MCPServersState } from "agents";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { H as PlusIcon,
|
|
3
|
+
import { H as PlusIcon, J as SpinnerIcon, b as EllipsisIcon, o as ArrowUpRightIcon, rt as XIcon, tt as WarningIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { AppIcon } from "./AppIcon.js";
|
|
5
5
|
import { IconButton } from "./IconButton.js";
|
|
6
6
|
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "./AgentAttention.js";
|
|
@@ -252,6 +252,7 @@ function McpPluginDialogActions({ projection, server, onConnect, onDisconnect })
|
|
|
252
252
|
await callback();
|
|
253
253
|
setAction({ pending: false });
|
|
254
254
|
} catch (error) {
|
|
255
|
+
console.error(`MCP server ${disconnect ? "disconnect" : "connect"} failed`, error);
|
|
255
256
|
setAction({
|
|
256
257
|
pending: false,
|
|
257
258
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -263,7 +264,7 @@ function McpPluginDialogActions({ projection, server, onConnect, onDisconnect })
|
|
|
263
264
|
tone: "warning",
|
|
264
265
|
children: [/* @__PURE__ */ jsx(AgentAttentionHeader, {
|
|
265
266
|
icon: /* @__PURE__ */ jsx(WarningIcon, {}),
|
|
266
|
-
title: "Connection failed"
|
|
267
|
+
title: disconnect ? "Disconnect failed" : "Connection failed"
|
|
267
268
|
}), /* @__PURE__ */ jsx(AgentAttentionBody, { children: /* @__PURE__ */ jsx("p", { children: action.error }) })]
|
|
268
269
|
}) : null, /* @__PURE__ */ jsx(Dialog.Footer, {
|
|
269
270
|
className: "mcp-plugin-details__footer",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as MenuItemProps, t as Menu } from "../Menu-L6MZm-7N.js";
|
|
2
|
-
import { o as McpServerCard } from "../mcp-server-catalog-
|
|
2
|
+
import { o as McpServerCard } from "../mcp-server-catalog-BewjV7Eq.js";
|
|
3
3
|
import { McpConnectorFormProps } from "./AgentConnection.js";
|
|
4
4
|
import { l as DialogProps } from "../Dialog-BD8NBKaE.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "./Button.js";
|
|
3
|
-
import { P as MinusIcon, d as CheckIcon,
|
|
3
|
+
import { J as SpinnerIcon, P as MinusIcon, d as CheckIcon, tt as WarningIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { AppIcon } from "./AppIcon.js";
|
|
5
5
|
import { Dialog } from "./Dialog.js";
|
|
6
6
|
import { Menu } from "./Menu.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { V as PlayIcon } from "../icons-
|
|
2
|
+
import { V as PlayIcon } from "../icons-B4mGvCvc.js";
|
|
3
3
|
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
4
4
|
import { Card } from "./Card.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "./Button.js";
|
|
3
|
-
import { d as CheckIcon, v as DotIcon } from "../icons-
|
|
3
|
+
import { d as CheckIcon, v as DotIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { Menu } from "@base-ui/react/menu";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MessageBranch, c as MessageBranchPage, d as MessageContent, f as MessageResponse, i as MessageAttachment, l as MessageBranchPrevious, n as MessageAction, o as MessageBranchContent, p as MessageToolbar, r as MessageActions, s as MessageBranchNext, t as Message, u as MessageBranchSelector } from "../Message-
|
|
1
|
+
import { a as MessageBranch, c as MessageBranchPage, d as MessageContent, f as MessageResponse, i as MessageAttachment, l as MessageBranchPrevious, n as MessageAction, o as MessageBranchContent, p as MessageToolbar, r as MessageActions, s as MessageBranchNext, t as Message, u as MessageBranchSelector } from "../Message-BF6SiKKL.js";
|
|
2
2
|
export { Message, MessageAction, MessageActions, MessageAttachment, MessageBranch, MessageBranchContent, MessageBranchNext, MessageBranchPage, MessageBranchPrevious, MessageBranchSelector, MessageContent, MessageResponse, MessageToolbar };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { n as ArrowDownIcon } from "../icons-
|
|
3
|
+
import { n as ArrowDownIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
@@ -21,7 +21,12 @@ interface VirtualMessageScrollerProps<Item> extends Omit<React.HTMLAttributes<HT
|
|
|
21
21
|
overscan?: number;
|
|
22
22
|
/** Rendered inside the viewport when `items` is empty. */
|
|
23
23
|
emptyState?: React.ReactNode;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Props for the inner content element. Defaults to `role="log"` with
|
|
26
|
+
* `aria-live="off"` — windowing re-inserts old rows as they scroll back
|
|
27
|
+
* into view, and a live region would announce them as new; override via
|
|
28
|
+
* these props only with that in mind.
|
|
29
|
+
*/
|
|
25
30
|
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
26
31
|
/** Accessible label for the scroll-to-latest button. */
|
|
27
32
|
scrollButtonLabel?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { n as ArrowDownIcon } from "../icons-
|
|
3
|
+
import { n as ArrowDownIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
@@ -35,21 +35,27 @@ import { useVirtualizer } from "@tanstack/react-virtual";
|
|
|
35
35
|
*/
|
|
36
36
|
function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize = 160, overscan = 6, emptyState, contentProps, scrollButtonLabel = "Scroll to latest", scrollButtonProps, className, ...props }) {
|
|
37
37
|
const viewportRef = React.useRef(null);
|
|
38
|
-
const
|
|
38
|
+
const warnedBadKey = React.useRef(false);
|
|
39
39
|
const [atEnd, setAtEnd] = React.useState(true);
|
|
40
40
|
const [scrollEdges, setScrollEdges] = React.useState();
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
if (warnedBadKey.current) return;
|
|
43
|
+
const seen = /* @__PURE__ */ new Set();
|
|
44
|
+
for (const item of items) {
|
|
45
|
+
const key = getItemKey(item);
|
|
46
|
+
if (key == null || seen.has(key)) {
|
|
47
|
+
warnedBadKey.current = true;
|
|
48
|
+
console.error(`VirtualMessageScroller: ${key == null ? "nullish" : "duplicate"} item key ${String(key)} — every item needs a stable, unique id.`);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
seen.add(key);
|
|
52
|
+
}
|
|
53
|
+
}, [items, getItemKey]);
|
|
41
54
|
const virtualizer = useVirtualizer({
|
|
42
55
|
count: items.length,
|
|
43
56
|
getScrollElement: () => viewportRef.current,
|
|
44
57
|
estimateSize: () => estimateSize,
|
|
45
|
-
getItemKey: (index) =>
|
|
46
|
-
const key = getItemKey(items[index]);
|
|
47
|
-
if (key == null && !warnedNullKey.current) {
|
|
48
|
-
warnedNullKey.current = true;
|
|
49
|
-
console.error("VirtualMessageScroller: getItemKey returned a nullish key — every item needs a stable id.");
|
|
50
|
-
}
|
|
51
|
-
return key;
|
|
52
|
-
},
|
|
58
|
+
getItemKey: (index) => getItemKey(items[index]),
|
|
53
59
|
anchorTo: "end",
|
|
54
60
|
followOnAppend: true,
|
|
55
61
|
scrollEndThreshold: 80,
|
|
@@ -58,9 +64,9 @@ function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize =
|
|
|
58
64
|
initialOffset: () => items.length * (estimateSize + 16),
|
|
59
65
|
onChange: (instance) => {
|
|
60
66
|
setAtEnd(instance.isAtEnd());
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
setScrollEdges(
|
|
67
|
+
const start = (viewportRef.current?.scrollTop ?? 0) > 1;
|
|
68
|
+
const end = instance.getDistanceFromEnd() > 1;
|
|
69
|
+
setScrollEdges(start && end ? "start end" : start ? "start" : end ? "end" : void 0);
|
|
64
70
|
}
|
|
65
71
|
});
|
|
66
72
|
React.useLayoutEffect(() => {
|
|
@@ -75,6 +81,8 @@ function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize =
|
|
|
75
81
|
"data-scrollable": scrollEdges,
|
|
76
82
|
className: "message-scroller__viewport",
|
|
77
83
|
children: items.length === 0 ? emptyState : /* @__PURE__ */ jsx("div", {
|
|
84
|
+
role: "log",
|
|
85
|
+
"aria-live": "off",
|
|
78
86
|
...contentProps,
|
|
79
87
|
className: cx("message-scroller__virtual-content", contentProps?.className),
|
|
80
88
|
style: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorSource, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../ModelSelector-
|
|
1
|
+
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorSource, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../ModelSelector-CRdvHT_b.js";
|
|
2
2
|
export { CloudflareModelSelector, ModelSelector, ModelSelectorContent, ModelSelectorDialog, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorInput, ModelSelectorItem, ModelSelectorList, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName, ModelSelectorSeparator, ModelSelectorSource, ModelSelectorTrigger, formatCloudflareModelProvider, getCloudflareModelProvider, isCloudflareRunnableModelId, listCloudflareModelSelectorOptions, normalizeCloudflareModelSelectorModels, readCloudflareModelId };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChainOfThoughtStepStatus } from "./ChainOfThought.js";
|
|
2
|
+
import { PopoverPositionerProps, PopoverProps } from "./Popover.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
//#region src/components/Plan.d.ts
|
|
@@ -99,5 +100,64 @@ declare function PlanStepDescription({
|
|
|
99
100
|
}: PlanStepDescriptionProps & {
|
|
100
101
|
ref?: React.Ref<HTMLParagraphElement>;
|
|
101
102
|
}): React.JSX.Element;
|
|
103
|
+
interface PlanSummaryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
104
|
+
/** Steps whose status is complete. */
|
|
105
|
+
completed: number;
|
|
106
|
+
/** Total number of plan steps. */
|
|
107
|
+
total: number;
|
|
108
|
+
open?: PopoverProps["open"];
|
|
109
|
+
defaultOpen?: PopoverProps["defaultOpen"];
|
|
110
|
+
onOpenChange?: PopoverProps["onOpenChange"];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Collapsed presentation of an application-owned plan — a progress pill that
|
|
114
|
+
* opens a popover with the full step list, following the shipped Codex
|
|
115
|
+
* "Step 2 / 3" to-do plan pill. Compose the existing `Plan` anatomy inside
|
|
116
|
+
* `PlanSummaryContent`.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* <PlanSummary completed={1} total={3}>
|
|
121
|
+
* <PlanSummaryTrigger />
|
|
122
|
+
* <PlanSummaryContent>
|
|
123
|
+
* <Plan>…</Plan>
|
|
124
|
+
* </PlanSummaryContent>
|
|
125
|
+
* </PlanSummary>
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
declare function PlanSummary({
|
|
129
|
+
className,
|
|
130
|
+
completed,
|
|
131
|
+
total,
|
|
132
|
+
open,
|
|
133
|
+
defaultOpen,
|
|
134
|
+
onOpenChange,
|
|
135
|
+
children,
|
|
136
|
+
ref,
|
|
137
|
+
...props
|
|
138
|
+
}: PlanSummaryProps & {
|
|
139
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
140
|
+
}): React.JSX.Element;
|
|
141
|
+
interface PlanSummaryTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}
|
|
142
|
+
/**
|
|
143
|
+
* The progress pill. Default content is a fraction ring plus
|
|
144
|
+
* "Step {current} / {total}" where the current step is the one after the
|
|
145
|
+
* completed ones; children replace the label while keeping the ring.
|
|
146
|
+
*/
|
|
147
|
+
declare function PlanSummaryTrigger({
|
|
148
|
+
className,
|
|
149
|
+
children,
|
|
150
|
+
...props
|
|
151
|
+
}: PlanSummaryTriggerProps): React.JSX.Element;
|
|
152
|
+
interface PlanSummaryContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
153
|
+
/** The pill usually sits above a composer, so default "top". */
|
|
154
|
+
side?: PopoverPositionerProps["side"];
|
|
155
|
+
}
|
|
156
|
+
declare function PlanSummaryContent({
|
|
157
|
+
className,
|
|
158
|
+
side,
|
|
159
|
+
children,
|
|
160
|
+
...props
|
|
161
|
+
}: PlanSummaryContentProps): React.JSX.Element;
|
|
102
162
|
//#endregion
|
|
103
|
-
export { Plan, PlanContent, PlanContentProps, PlanDescription, PlanDescriptionProps, PlanHeader, PlanHeaderProps, PlanProps, PlanStep, PlanStepDescription, PlanStepDescriptionProps, PlanStepIndicator, PlanStepIndicatorProps, PlanStepProps, PlanStepStatus, PlanStepTitle, PlanStepTitleProps, PlanTitle, PlanTitleProps };
|
|
163
|
+
export { Plan, PlanContent, PlanContentProps, PlanDescription, PlanDescriptionProps, PlanHeader, PlanHeaderProps, PlanProps, PlanStep, PlanStepDescription, PlanStepDescriptionProps, PlanStepIndicator, PlanStepIndicatorProps, PlanStepProps, PlanStepStatus, PlanStepTitle, PlanStepTitleProps, PlanSummary, PlanSummaryContent, PlanSummaryContentProps, PlanSummaryProps, PlanSummaryTrigger, PlanSummaryTriggerProps, PlanTitle, PlanTitleProps };
|
package/dist/components/Plan.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { d as CheckIcon, i as ArrowRightIcon, v as DotIcon } from "../icons-
|
|
2
|
+
import { d as CheckIcon, i as ArrowRightIcon, v as DotIcon } from "../icons-B4mGvCvc.js";
|
|
3
|
+
import { Popover } from "./Popover.js";
|
|
4
|
+
import { t as ProgressRing } from "../progress-ring-BjqTZqBk.js";
|
|
3
5
|
import * as React from "react";
|
|
4
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
//#region src/components/Plan.tsx
|
|
@@ -109,5 +111,83 @@ function PlanStepDescription({ className, ref, ...props }) {
|
|
|
109
111
|
...props
|
|
110
112
|
});
|
|
111
113
|
}
|
|
114
|
+
const PlanSummaryContext = React.createContext(null);
|
|
115
|
+
function usePlanSummaryContext() {
|
|
116
|
+
const ctx = React.useContext(PlanSummaryContext);
|
|
117
|
+
if (!ctx) throw new Error("PlanSummary subcomponents must be used inside <PlanSummary>.");
|
|
118
|
+
return ctx;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Collapsed presentation of an application-owned plan — a progress pill that
|
|
122
|
+
* opens a popover with the full step list, following the shipped Codex
|
|
123
|
+
* "Step 2 / 3" to-do plan pill. Compose the existing `Plan` anatomy inside
|
|
124
|
+
* `PlanSummaryContent`.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* <PlanSummary completed={1} total={3}>
|
|
129
|
+
* <PlanSummaryTrigger />
|
|
130
|
+
* <PlanSummaryContent>
|
|
131
|
+
* <Plan>…</Plan>
|
|
132
|
+
* </PlanSummaryContent>
|
|
133
|
+
* </PlanSummary>
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
function PlanSummary({ className, completed, total, open, defaultOpen, onOpenChange, children, ref, ...props }) {
|
|
137
|
+
const value = React.useMemo(() => ({
|
|
138
|
+
completed,
|
|
139
|
+
total
|
|
140
|
+
}), [completed, total]);
|
|
141
|
+
return /* @__PURE__ */ jsx(PlanSummaryContext.Provider, {
|
|
142
|
+
value,
|
|
143
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
144
|
+
ref,
|
|
145
|
+
"data-slot": "plan-summary",
|
|
146
|
+
className: cx("plan-summary", className),
|
|
147
|
+
...props,
|
|
148
|
+
children: /* @__PURE__ */ jsx(Popover.Root, {
|
|
149
|
+
open,
|
|
150
|
+
defaultOpen,
|
|
151
|
+
onOpenChange,
|
|
152
|
+
children
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The progress pill. Default content is a fraction ring plus
|
|
159
|
+
* "Step {current} / {total}" where the current step is the one after the
|
|
160
|
+
* completed ones; children replace the label while keeping the ring.
|
|
161
|
+
*/
|
|
162
|
+
function PlanSummaryTrigger({ className, children, ...props }) {
|
|
163
|
+
const { completed, total } = usePlanSummaryContext();
|
|
164
|
+
const percent = total > 0 ? completed / total * 100 : 0;
|
|
165
|
+
const currentStep = Math.min(completed + 1, total);
|
|
166
|
+
return /* @__PURE__ */ jsxs(Popover.Trigger, {
|
|
167
|
+
unstyled: true,
|
|
168
|
+
className: cx("plan-summary__trigger", className),
|
|
169
|
+
"aria-label": `Plan: ${completed} of ${total} steps completed`,
|
|
170
|
+
...props,
|
|
171
|
+
children: [/* @__PURE__ */ jsx(ProgressRing, {
|
|
172
|
+
percent,
|
|
173
|
+
size: 16,
|
|
174
|
+
stroke: 2.5
|
|
175
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
176
|
+
className: "plan-summary__trigger-label",
|
|
177
|
+
children: children ?? `Step ${currentStep} / ${total}`
|
|
178
|
+
})]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function PlanSummaryContent({ className, side = "top", children, ...props }) {
|
|
182
|
+
return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
183
|
+
side,
|
|
184
|
+
children: /* @__PURE__ */ jsx(Popover.Popup, {
|
|
185
|
+
"aria-label": "Plan",
|
|
186
|
+
className: cx("plan-summary__content", className),
|
|
187
|
+
...props,
|
|
188
|
+
children
|
|
189
|
+
})
|
|
190
|
+
}) });
|
|
191
|
+
}
|
|
112
192
|
//#endregion
|
|
113
|
-
export { Plan, PlanContent, PlanDescription, PlanHeader, PlanStep, PlanStepDescription, PlanStepIndicator, PlanStepTitle, PlanTitle };
|
|
193
|
+
export { Plan, PlanContent, PlanDescription, PlanHeader, PlanStep, PlanStepDescription, PlanStepIndicator, PlanStepTitle, PlanSummary, PlanSummaryContent, PlanSummaryTrigger, PlanTitle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { O as InfoIcon, P as MinusIcon, d as CheckIcon } from "../icons-
|
|
3
|
+
import { O as InfoIcon, P as MinusIcon, d as CheckIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { IconButton } from "./IconButton.js";
|
|
5
5
|
import { Separator } from "./Separator.js";
|
|
6
6
|
import { Badge } from "./Badge.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as TextInputContext, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as usePromptInputAttachments, H as PromptInputCommandListProps, Ht as getApprovalRequestId, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, Kt as usePromptInputController, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as PromptInputTray, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as getApprovalStateKey, V as PromptInputCommandList, Vt as TooltipSide, W as PromptInputCommandSeparator, Wt as getPendingToolApprovals, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, qt as useProviderAttachments, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as PromptInputTrayProps } from "../PromptInput-
|
|
1
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as TextInputContext, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as usePromptInputAttachments, H as PromptInputCommandListProps, Ht as getApprovalRequestId, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, Kt as usePromptInputController, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as PromptInputTray, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as getApprovalStateKey, V as PromptInputCommandList, Vt as TooltipSide, W as PromptInputCommandSeparator, Wt as getPendingToolApprovals, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, qt as useProviderAttachments, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as PromptInputTrayProps } from "../PromptInput-CES0WO4u.js";
|
|
2
2
|
export { AttachmentsContext, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputApproval, PromptInputApprovalProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandGroupLabelProps, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputReferences, PromptInputReferencesProps, PromptInputSelect, PromptInputSelectProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, PromptInputTray, PromptInputTrayProps, TextInputContext, TooltipSide, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { C as FileIcon, F as MonitorIcon, H as PlusIcon, J as
|
|
3
|
+
import { C as FileIcon, F as MonitorIcon, H as PlusIcon, J as SpinnerIcon, N as MicrophoneIcon, R as PaperclipIcon, X as StopIcon, Y as SquareIcon, a as ArrowUpIcon, d as CheckIcon, f as ChevronDownIcon, nt as WrenchIcon, rt as XIcon, tt as WarningIcon, w as FolderIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { IconButton } from "./IconButton.js";
|
|
6
6
|
import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
|
|
@@ -507,6 +507,7 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
|
|
|
507
507
|
* Voice-dictation control for PromptInput. Final upstream transcripts are
|
|
508
508
|
* appended to the composer while interim text remains ephemeral.
|
|
509
509
|
*/
|
|
510
|
+
const DICTATION_METER_GAIN = 12;
|
|
510
511
|
function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ...props }) {
|
|
511
512
|
const controller = useOptionalPromptInputController();
|
|
512
513
|
const attachments = usePromptInputAttachments();
|
|
@@ -531,7 +532,7 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
|
|
|
531
532
|
}
|
|
532
533
|
const textarea = buttonRef.current?.form?.querySelector("textarea[data-prompt-input-textarea=\"true\"]");
|
|
533
534
|
if (!textarea) return;
|
|
534
|
-
|
|
535
|
+
Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set?.call(textarea, appendDictationTranscript(textarea.value, addition));
|
|
535
536
|
textarea.dispatchEvent(new Event("input", { bubbles: true }));
|
|
536
537
|
}, [controller, voice.transcript]);
|
|
537
538
|
React.useEffect(() => {
|
|
@@ -556,7 +557,7 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
|
|
|
556
557
|
const listening = voice.isListening;
|
|
557
558
|
const label = listening ? "Stop dictation" : error ? "Retry dictation" : "Start dictation";
|
|
558
559
|
const status = error ? `Dictation failed: ${error}` : listening ? voice.interimTranscript ? "Listening. Speech detected." : "Listening for speech." : isStarting ? "Starting dictation." : "";
|
|
559
|
-
const level = clamp(voice.audioLevel, 0, 1);
|
|
560
|
+
const level = clamp(voice.audioLevel * DICTATION_METER_GAIN, 0, 1);
|
|
560
561
|
const elapsed = formatClock(elapsedSeconds);
|
|
561
562
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
562
563
|
/* @__PURE__ */ jsx(PromptInputButton, {
|
package/dist/components/Queue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
3
|
import { Collapsible } from "./Collapsible.js";
|
|
4
|
-
import { C as FileIcon, d as CheckIcon, m as ChevronRightIcon, v as DotIcon } from "../icons-
|
|
4
|
+
import { C as FileIcon, d as CheckIcon, m as ChevronRightIcon, v as DotIcon } from "../icons-B4mGvCvc.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import { ScrollArea } from "./ScrollArea.js";
|
|
7
7
|
import "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import {
|
|
3
|
+
import { J as SpinnerIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
5
|
-
import { f as MessageResponse } from "../Message-
|
|
5
|
+
import { f as MessageResponse } from "../Message-BF6SiKKL.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/Reasoning.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Button } from "./Button.js";
|
|
3
|
-
import { K as SidebarIcon } from "../icons-
|
|
3
|
+
import { K as SidebarIcon } from "../icons-B4mGvCvc.js";
|
|
4
4
|
import { t as capitalize } from "../format-S6uWyoSb.js";
|
|
5
5
|
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
6
6
|
import { AppTopBar } from "./AppTopBar.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { G as SearchIcon } from "../icons-
|
|
2
|
+
import { G as SearchIcon } from "../icons-B4mGvCvc.js";
|
|
3
3
|
import { Field } from "./Field.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/SearchField.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
|
-
import { a as ArrowUpIcon, d as CheckIcon, n as ArrowDownIcon } from "../icons-
|
|
2
|
+
import { a as ArrowUpIcon, d as CheckIcon, n as ArrowDownIcon } from "../icons-B4mGvCvc.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
@@ -33,11 +33,7 @@ interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
|
33
33
|
/** Server read used to reload the transcript after a compaction lands. */
|
|
34
34
|
getMessages: () => Promise<MessageT[]>;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
agent,
|
|
38
|
-
chat,
|
|
39
|
-
getMessages
|
|
40
|
-
}: UseSessionCompactionOptions<MessageT>): {
|
|
36
|
+
interface UseSessionCompactionResult {
|
|
41
37
|
compacting: boolean;
|
|
42
38
|
/**
|
|
43
39
|
* Set when the post-compaction transcript reload rejected — the local view
|
|
@@ -53,6 +49,11 @@ declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
|
53
49
|
* when the next compaction starts.
|
|
54
50
|
*/
|
|
55
51
|
sessionError: string | null;
|
|
56
|
-
}
|
|
52
|
+
}
|
|
53
|
+
declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
54
|
+
agent,
|
|
55
|
+
chat,
|
|
56
|
+
getMessages
|
|
57
|
+
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
57
58
|
//#endregion
|
|
58
|
-
export { SessionFrameSource, SessionStatusFrame, SessionStatusPhase, UseSessionCompactionOptions, parseSessionErrorFrame, parseSessionStatusFrame, useSessionCompaction };
|
|
59
|
+
export { SessionFrameSource, SessionStatusFrame, SessionStatusPhase, UseSessionCompactionOptions, UseSessionCompactionResult, parseSessionErrorFrame, parseSessionStatusFrame, useSessionCompaction };
|
|
@@ -72,6 +72,8 @@ function useSessionCompaction({ agent, chat, getMessages }) {
|
|
|
72
72
|
React.useEffect(() => {
|
|
73
73
|
setCompacting(false);
|
|
74
74
|
setSessionError(null);
|
|
75
|
+
setRefreshPending(false);
|
|
76
|
+
setReloadError(null);
|
|
75
77
|
const onMessage = (event) => {
|
|
76
78
|
const frame = parseSessionStatusFrame(event.data);
|
|
77
79
|
if (frame) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/SetupChecklist.d.ts
|
|
4
|
+
interface SetupChecklistEntry<Id extends string = string> {
|
|
5
|
+
id: Id;
|
|
6
|
+
/** Accessible subject, announced as "<name>, complete" or "<name>, not set up". */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Visible row copy. */
|
|
9
|
+
description: React.ReactNode;
|
|
10
|
+
/** Decorative leading icon. */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
complete: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface SetupChecklistGroupProps<Id extends string = string> {
|
|
15
|
+
/** Quiet visible heading above the checklist rows. */
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
entries: readonly SetupChecklistEntry<Id>[];
|
|
18
|
+
/** Called with the selected entry id — complete rows re-run their setup. */
|
|
19
|
+
onSelect: (id: Id) => void;
|
|
20
|
+
}
|
|
21
|
+
/** Checklist rows for any Menu surface (composer plus menu, tray menu). */
|
|
22
|
+
declare function SetupChecklistGroup<Id extends string = string>({
|
|
23
|
+
label,
|
|
24
|
+
entries,
|
|
25
|
+
onSelect
|
|
26
|
+
}: SetupChecklistGroupProps<Id>): React.JSX.Element;
|
|
27
|
+
interface SetupChecklistActionProps<Id extends string = string> extends SetupChecklistGroupProps<Id> {
|
|
28
|
+
/** Visible trigger label; the accessible name appends "N of M set up". */
|
|
29
|
+
actionLabel: string;
|
|
30
|
+
}
|
|
31
|
+
/** Progress-aware tray trigger opening the checklist in its own menu. */
|
|
32
|
+
declare function SetupChecklistAction<Id extends string = string>({
|
|
33
|
+
actionLabel,
|
|
34
|
+
label,
|
|
35
|
+
entries,
|
|
36
|
+
onSelect
|
|
37
|
+
}: SetupChecklistActionProps<Id>): React.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SetupChecklistAction, SetupChecklistActionProps, SetupChecklistEntry, SetupChecklistGroup, SetupChecklistGroupProps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Button } from "./Button.js";
|
|
2
|
+
import { H as PlusIcon, d as CheckIcon, tt as WarningIcon } from "../icons-B4mGvCvc.js";
|
|
3
|
+
import { Menu } from "./Menu.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/SetupChecklist.tsx
|
|
7
|
+
/** Checklist rows for any Menu surface (composer plus menu, tray menu). */
|
|
8
|
+
function SetupChecklistGroup({ label, entries, onSelect }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs(Menu.Group, { children: [/* @__PURE__ */ jsx(Menu.GroupLabel, { children: label }), entries.map((entry) => /* @__PURE__ */ jsxs(Menu.Item, {
|
|
10
|
+
"aria-label": `${entry.name}, ${entry.complete ? "complete" : "not set up"}`,
|
|
11
|
+
onClick: () => onSelect(entry.id),
|
|
12
|
+
children: [
|
|
13
|
+
entry.icon,
|
|
14
|
+
/* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: "sigvelo-truncate-grow",
|
|
16
|
+
children: entry.description
|
|
17
|
+
}),
|
|
18
|
+
entry.complete ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(PlusIcon, { "aria-hidden": "true" })
|
|
19
|
+
]
|
|
20
|
+
}, entry.id))] });
|
|
21
|
+
}
|
|
22
|
+
/** Progress-aware tray trigger opening the checklist in its own menu. */
|
|
23
|
+
function SetupChecklistAction({ actionLabel, label, entries, onSelect }) {
|
|
24
|
+
const completed = entries.filter((entry) => entry.complete).length;
|
|
25
|
+
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
26
|
+
type: "button",
|
|
27
|
+
variant: "ghost",
|
|
28
|
+
color: "neutral",
|
|
29
|
+
size: "md",
|
|
30
|
+
"aria-label": `${actionLabel} — ${completed} of ${entries.length} set up`,
|
|
31
|
+
render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
|
|
32
|
+
children: [completed === entries.length ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: actionLabel })]
|
|
33
|
+
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
34
|
+
side: "bottom",
|
|
35
|
+
align: "start",
|
|
36
|
+
sideOffset: 4,
|
|
37
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, { children: /* @__PURE__ */ jsx(SetupChecklistGroup, {
|
|
38
|
+
label,
|
|
39
|
+
entries,
|
|
40
|
+
onSelect
|
|
41
|
+
}) })
|
|
42
|
+
}) })] });
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { SetupChecklistAction, SetupChecklistGroup };
|