@tangle-network/agent-app 0.53.10 → 0.53.12
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/{DesignCanvasEditor-ZQDWOGRV.js → DesignCanvasEditor-IBFHC25D.js} +3 -3
- package/dist/assistant/index.js +2 -2
- package/dist/chat-routes/index.js +4 -4
- package/dist/{chunk-P2GXQRFR.js → chunk-2TARCQA2.js} +4 -4
- package/dist/{chunk-ZFFBT5BF.js → chunk-A7P6XH6Y.js} +148 -109
- package/dist/chunk-A7P6XH6Y.js.map +1 -0
- package/dist/{chunk-T52MKPHE.js → chunk-CHYGAU4E.js} +5 -5
- package/dist/{chunk-T52MKPHE.js.map → chunk-CHYGAU4E.js.map} +1 -1
- package/dist/{chunk-ENLRJYVW.js → chunk-CUXCWQMW.js} +19 -18
- package/dist/chunk-CUXCWQMW.js.map +1 -0
- package/dist/{chunk-6JM5EWOP.js → chunk-JB2GFEOC.js} +2 -2
- package/dist/{chunk-LFMP73W3.js → chunk-KLQWU6K5.js} +2 -2
- package/dist/{chunk-YFGV5ZBY.js → chunk-LEECH4MY.js} +2 -2
- package/dist/{chunk-TUGR3FCS.js → chunk-TMKSWEVQ.js} +1 -1
- package/dist/{chunk-TUGR3FCS.js.map → chunk-TMKSWEVQ.js.map} +1 -1
- package/dist/{chunk-5GYKS6WT.js → chunk-W6LBJNCQ.js} +2 -2
- package/dist/design-canvas-react/index.js +3 -3
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/preset-cloudflare/index.js +2 -2
- package/dist/sandbox/index.js +4 -4
- package/dist/theme/brand.generated.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tokens.css +764 -34
- package/dist/tools/index.js +4 -4
- package/dist/web-react/composer-profile-pill.d.ts +26 -0
- package/dist/web-react/index.d.ts +1 -0
- package/dist/web-react/index.js +4 -2
- package/dist/work-product/index.js +2 -2
- package/dist/work-product-react/index.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-ENLRJYVW.js.map +0 -1
- package/dist/chunk-ZFFBT5BF.js.map +0 -1
- /package/dist/{DesignCanvasEditor-ZQDWOGRV.js.map → DesignCanvasEditor-IBFHC25D.js.map} +0 -0
- /package/dist/{chunk-P2GXQRFR.js.map → chunk-2TARCQA2.js.map} +0 -0
- /package/dist/{chunk-6JM5EWOP.js.map → chunk-JB2GFEOC.js.map} +0 -0
- /package/dist/{chunk-LFMP73W3.js.map → chunk-KLQWU6K5.js.map} +0 -0
- /package/dist/{chunk-YFGV5ZBY.js.map → chunk-LEECH4MY.js.map} +0 -0
- /package/dist/{chunk-5GYKS6WT.js.map → chunk-W6LBJNCQ.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
WorkProductCard,
|
|
12
12
|
workProductPartsFromMessageParts
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CUXCWQMW.js";
|
|
14
14
|
import {
|
|
15
15
|
joinClasses
|
|
16
16
|
} from "./chunk-L7MB2LLM.js";
|
|
@@ -6469,8 +6469,46 @@ function AgentProfileChoices({ value, profiles, onChange, disabled, locked, lock
|
|
|
6469
6469
|
] });
|
|
6470
6470
|
}
|
|
6471
6471
|
|
|
6472
|
+
// src/web-react/composer-profile-pill.tsx
|
|
6473
|
+
import { AgentProfilePicker } from "@tangle-network/sandbox-ui/chat";
|
|
6474
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
6475
|
+
var TRIGGER = {
|
|
6476
|
+
composer: "max-w-[180px]",
|
|
6477
|
+
// A menu panel repoints surface-container to its own tone, which would leave
|
|
6478
|
+
// the picker's default fill invisible there, so the row brings bg-card.
|
|
6479
|
+
"menu-row": "h-9 w-full justify-between gap-1.5 rounded-full border-border bg-card px-3 text-sm font-medium text-foreground shadow-none hover:border-border hover:bg-accent data-[state=open]:border-border data-[state=open]:bg-accent",
|
|
6480
|
+
// The strip scrolls horizontally and clips an outward ring at its edges, so
|
|
6481
|
+
// the ring is drawn inside the trigger's own box.
|
|
6482
|
+
"mode-strip": "h-7 gap-1 rounded-full border-border bg-transparent font-normal text-muted-foreground shadow-none hover:border-border hover:bg-transparent hover:text-foreground data-[state=open]:border-border data-[state=open]:bg-transparent data-[state=open]:text-foreground focus-visible:ring-inset"
|
|
6483
|
+
};
|
|
6484
|
+
function ComposerProfilePill({
|
|
6485
|
+
selection,
|
|
6486
|
+
locked,
|
|
6487
|
+
lockReason = "The profile is fixed after the first message.",
|
|
6488
|
+
onNewChat,
|
|
6489
|
+
side,
|
|
6490
|
+
placement = "composer",
|
|
6491
|
+
className
|
|
6492
|
+
}) {
|
|
6493
|
+
return /* @__PURE__ */ jsx19(
|
|
6494
|
+
AgentProfilePicker,
|
|
6495
|
+
{
|
|
6496
|
+
value: selection.value,
|
|
6497
|
+
onChange: selection.onChange,
|
|
6498
|
+
profiles: selection.profiles,
|
|
6499
|
+
disabled: selection.disabled,
|
|
6500
|
+
locked,
|
|
6501
|
+
lockReason,
|
|
6502
|
+
onNewChat,
|
|
6503
|
+
side,
|
|
6504
|
+
className: placement === "menu-row" ? `w-full ${className ?? ""}`.trim() : className,
|
|
6505
|
+
triggerClassName: TRIGGER[placement]
|
|
6506
|
+
}
|
|
6507
|
+
);
|
|
6508
|
+
}
|
|
6509
|
+
|
|
6472
6510
|
// src/web-react/index.tsx
|
|
6473
|
-
import { Fragment as Fragment9, jsx as
|
|
6511
|
+
import { Fragment as Fragment9, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6474
6512
|
function formatModelCost(msg, models) {
|
|
6475
6513
|
if (msg.promptTokens == null && msg.completionTokens == null) return null;
|
|
6476
6514
|
const pricing = models.find((m) => m.id === msg.modelUsed)?.pricing;
|
|
@@ -6491,39 +6529,39 @@ function formatTokensPerSecond(msg) {
|
|
|
6491
6529
|
function RunDrillIn({ run, onClose }) {
|
|
6492
6530
|
return /* @__PURE__ */ jsxs17("div", { className: `fixed inset-y-0 right-0 z-50 flex w-[480px] max-w-full flex-col border-l border-card-edge bg-popover ${OVERLAY_SHADOW}`, children: [
|
|
6493
6531
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
|
|
6494
|
-
/* @__PURE__ */
|
|
6532
|
+
/* @__PURE__ */ jsx20(
|
|
6495
6533
|
"span",
|
|
6496
6534
|
{
|
|
6497
6535
|
className: `h-2 w-2 shrink-0 rounded-full ${run.status === "running" ? "bg-warning" : run.status === "error" ? "bg-destructive" : "bg-success"}`
|
|
6498
6536
|
}
|
|
6499
6537
|
),
|
|
6500
6538
|
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
6501
|
-
/* @__PURE__ */
|
|
6502
|
-
/* @__PURE__ */
|
|
6539
|
+
/* @__PURE__ */ jsx20("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
|
|
6540
|
+
/* @__PURE__ */ jsx20("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
|
|
6503
6541
|
] }),
|
|
6504
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsx20(
|
|
6505
6543
|
"button",
|
|
6506
6544
|
{
|
|
6507
6545
|
type: "button",
|
|
6508
6546
|
onClick: onClose,
|
|
6509
6547
|
"aria-label": "Close",
|
|
6510
6548
|
className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
|
|
6511
|
-
children: /* @__PURE__ */
|
|
6549
|
+
children: /* @__PURE__ */ jsx20("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx20("path", { d: "M18 6 6 18M6 6l12 12" }) })
|
|
6512
6550
|
}
|
|
6513
6551
|
)
|
|
6514
6552
|
] }),
|
|
6515
6553
|
/* @__PURE__ */ jsxs17("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
|
|
6516
|
-
run.steps.length === 0 && /* @__PURE__ */
|
|
6554
|
+
run.steps.length === 0 && /* @__PURE__ */ jsx20("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
|
|
6517
6555
|
run.steps.map((step, i) => /* @__PURE__ */ jsxs17("div", { className: "rounded-lg border border-card-edge bg-card", children: [
|
|
6518
6556
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
|
|
6519
|
-
/* @__PURE__ */
|
|
6520
|
-
/* @__PURE__ */
|
|
6521
|
-
/* @__PURE__ */
|
|
6557
|
+
/* @__PURE__ */ jsx20("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
|
|
6558
|
+
/* @__PURE__ */ jsx20("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
|
|
6559
|
+
/* @__PURE__ */ jsx20("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
|
|
6522
6560
|
] }),
|
|
6523
|
-
step.detail && /* @__PURE__ */
|
|
6561
|
+
step.detail && /* @__PURE__ */ jsx20("pre", { className: "max-h-48 overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-xs leading-relaxed text-muted-foreground", children: step.detail })
|
|
6524
6562
|
] }, i))
|
|
6525
6563
|
] }),
|
|
6526
|
-
/* @__PURE__ */
|
|
6564
|
+
/* @__PURE__ */ jsx20("p", { className: "border-t border-border px-4 py-2 text-xs text-muted-foreground", children: "Read-only transcript \u2014 reply in the main chat." })
|
|
6527
6565
|
] });
|
|
6528
6566
|
}
|
|
6529
6567
|
function pendingApprovalOf(call) {
|
|
@@ -6540,11 +6578,11 @@ function ChatEmptyState({
|
|
|
6540
6578
|
const doorCount = Math.min(doors?.length ?? 0, 3);
|
|
6541
6579
|
const doorsGridClass = doorCount === 1 ? "mx-auto max-w-sm sm:grid-cols-1" : doorCount === 2 ? "sm:grid-cols-2" : "sm:grid-cols-3";
|
|
6542
6580
|
return /* @__PURE__ */ jsxs17("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center px-6 py-12 text-center sm:py-20", children: [
|
|
6543
|
-
/* @__PURE__ */
|
|
6544
|
-
/* @__PURE__ */
|
|
6545
|
-
/* @__PURE__ */
|
|
6546
|
-
subline && /* @__PURE__ */
|
|
6547
|
-
doors && doors.length > 0 && /* @__PURE__ */
|
|
6581
|
+
/* @__PURE__ */ jsx20("span", { className: "mb-5 inline-flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 ring-1 ring-primary/15", children: /* @__PURE__ */ jsx20(BrandMark, { size: 32, className: "shrink-0" }) }),
|
|
6582
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
|
|
6583
|
+
/* @__PURE__ */ jsx20("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
|
|
6584
|
+
subline && /* @__PURE__ */ jsx20("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
|
|
6585
|
+
doors && doors.length > 0 && /* @__PURE__ */ jsx20("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs17(
|
|
6548
6586
|
"button",
|
|
6549
6587
|
{
|
|
6550
6588
|
type: "button",
|
|
@@ -6555,7 +6593,7 @@ function ChatEmptyState({
|
|
|
6555
6593
|
door.icon,
|
|
6556
6594
|
door.label
|
|
6557
6595
|
] }),
|
|
6558
|
-
door.description && /* @__PURE__ */
|
|
6596
|
+
door.description && /* @__PURE__ */ jsx20("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
|
|
6559
6597
|
]
|
|
6560
6598
|
},
|
|
6561
6599
|
i
|
|
@@ -6565,25 +6603,25 @@ function ChatEmptyState({
|
|
|
6565
6603
|
function ToolGlyph({ name, className }) {
|
|
6566
6604
|
if (name.startsWith("sandbox_")) {
|
|
6567
6605
|
return /* @__PURE__ */ jsxs17("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
6568
|
-
/* @__PURE__ */
|
|
6569
|
-
/* @__PURE__ */
|
|
6606
|
+
/* @__PURE__ */ jsx20("polyline", { points: "4 17 10 11 4 5" }),
|
|
6607
|
+
/* @__PURE__ */ jsx20("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
|
|
6570
6608
|
] });
|
|
6571
6609
|
}
|
|
6572
6610
|
if (name === "submit_proposal") {
|
|
6573
6611
|
return /* @__PURE__ */ jsxs17("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
6574
|
-
/* @__PURE__ */
|
|
6575
|
-
/* @__PURE__ */
|
|
6612
|
+
/* @__PURE__ */ jsx20("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
6613
|
+
/* @__PURE__ */ jsx20("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
|
|
6576
6614
|
] });
|
|
6577
6615
|
}
|
|
6578
6616
|
if (name === "schedule_followup") {
|
|
6579
6617
|
return /* @__PURE__ */ jsxs17("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
|
|
6580
|
-
/* @__PURE__ */
|
|
6581
|
-
/* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9" }),
|
|
6619
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 7v5l3 3" })
|
|
6582
6620
|
] });
|
|
6583
6621
|
}
|
|
6584
6622
|
return /* @__PURE__ */ jsxs17("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6623
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
|
|
6624
|
+
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "4" })
|
|
6587
6625
|
] });
|
|
6588
6626
|
}
|
|
6589
6627
|
function toolOutcomeOf(call) {
|
|
@@ -6669,9 +6707,9 @@ function truncate(v, max = 240) {
|
|
|
6669
6707
|
function KvRows({ data }) {
|
|
6670
6708
|
const entries = Object.entries(data).filter(([, v]) => v !== void 0 && v !== null && v !== "");
|
|
6671
6709
|
if (!entries.length) return null;
|
|
6672
|
-
return /* @__PURE__ */
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
/* @__PURE__ */
|
|
6710
|
+
return /* @__PURE__ */ jsx20("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs17("div", { className: "contents", children: [
|
|
6711
|
+
/* @__PURE__ */ jsx20("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
|
|
6712
|
+
/* @__PURE__ */ jsx20("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
|
|
6675
6713
|
] }, k)) });
|
|
6676
6714
|
}
|
|
6677
6715
|
function ShellDetail({ call }) {
|
|
@@ -6679,14 +6717,14 @@ function ShellDetail({ call }) {
|
|
|
6679
6717
|
const r = outcome?.result ?? {};
|
|
6680
6718
|
return /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
|
|
6681
6719
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
|
|
6682
|
-
/* @__PURE__ */
|
|
6683
|
-
/* @__PURE__ */
|
|
6720
|
+
/* @__PURE__ */ jsx20("span", { className: "select-none text-zinc-500", children: "$" }),
|
|
6721
|
+
/* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
|
|
6684
6722
|
r.exitCode != null && /* @__PURE__ */ jsxs17("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
|
|
6685
6723
|
"exit ",
|
|
6686
6724
|
r.exitCode
|
|
6687
6725
|
] })
|
|
6688
6726
|
] }),
|
|
6689
|
-
/* @__PURE__ */
|
|
6727
|
+
/* @__PURE__ */ jsx20("pre", { className: "max-h-56 overflow-auto whitespace-pre-wrap px-3 pb-2.5 pt-1.5 text-zinc-300", children: outcome?.ok === false ? outcome.message ?? "failed" : [r.stdout, r.stderr].filter(Boolean).join("\n") || "(no output)" })
|
|
6690
6728
|
] });
|
|
6691
6729
|
}
|
|
6692
6730
|
function DefaultToolDetail({ call }) {
|
|
@@ -6694,15 +6732,15 @@ function DefaultToolDetail({ call }) {
|
|
|
6694
6732
|
const envelope = typeof result === "object" && result !== null ? result : null;
|
|
6695
6733
|
return /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
6696
6734
|
call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs17("div", { children: [
|
|
6697
|
-
/* @__PURE__ */
|
|
6698
|
-
/* @__PURE__ */
|
|
6735
|
+
/* @__PURE__ */ jsx20("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
|
|
6736
|
+
/* @__PURE__ */ jsx20(KvRows, { data: call.args })
|
|
6699
6737
|
] }),
|
|
6700
6738
|
envelope ? /* @__PURE__ */ jsxs17("div", { children: [
|
|
6701
|
-
/* @__PURE__ */
|
|
6702
|
-
envelope.ok === false ? /* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx20("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
|
|
6740
|
+
envelope.ok === false ? /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx20(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx20("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
|
|
6703
6741
|
] }) : result != null ? /* @__PURE__ */ jsxs17("div", { children: [
|
|
6704
|
-
/* @__PURE__ */
|
|
6705
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ jsx20("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
|
|
6743
|
+
/* @__PURE__ */ jsx20("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
|
|
6706
6744
|
] }) : null
|
|
6707
6745
|
] });
|
|
6708
6746
|
}
|
|
@@ -6719,18 +6757,18 @@ function ProposalCard({
|
|
|
6719
6757
|
const { pending: deciding, run: decide } = usePending();
|
|
6720
6758
|
return /* @__PURE__ */ jsxs17("div", { className: "w-full max-w-full rounded-xl border border-warning/50 bg-warning/[0.06] text-sm shadow-sm ring-1 ring-warning/10", children: [
|
|
6721
6759
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
|
|
6722
|
-
/* @__PURE__ */
|
|
6760
|
+
/* @__PURE__ */ jsx20("span", { className: "mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning", children: /* @__PURE__ */ jsx20(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
|
|
6723
6761
|
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
6724
|
-
/* @__PURE__ */
|
|
6725
|
-
/* @__PURE__ */
|
|
6726
|
-
summary && /* @__PURE__ */
|
|
6727
|
-
typeSlug && /* @__PURE__ */
|
|
6728
|
-
meta.length > 0 && /* @__PURE__ */
|
|
6762
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
|
|
6763
|
+
/* @__PURE__ */ jsx20("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
|
|
6764
|
+
summary && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
|
|
6765
|
+
typeSlug && /* @__PURE__ */ jsx20("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
|
|
6766
|
+
meta.length > 0 && /* @__PURE__ */ jsx20("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx20("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
|
|
6729
6767
|
] })
|
|
6730
6768
|
] }),
|
|
6731
6769
|
/* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
|
|
6732
6770
|
approval && /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
6733
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ jsx20(
|
|
6734
6772
|
"button",
|
|
6735
6773
|
{
|
|
6736
6774
|
type: "button",
|
|
@@ -6740,7 +6778,7 @@ function ProposalCard({
|
|
|
6740
6778
|
children: "Approve & run"
|
|
6741
6779
|
}
|
|
6742
6780
|
),
|
|
6743
|
-
/* @__PURE__ */
|
|
6781
|
+
/* @__PURE__ */ jsx20(
|
|
6744
6782
|
"button",
|
|
6745
6783
|
{
|
|
6746
6784
|
type: "button",
|
|
@@ -6760,12 +6798,12 @@ function ProposalCard({
|
|
|
6760
6798
|
className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
|
|
6761
6799
|
children: [
|
|
6762
6800
|
expanded ? "Hide details" : "View details",
|
|
6763
|
-
/* @__PURE__ */
|
|
6801
|
+
/* @__PURE__ */ jsx20(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
|
|
6764
6802
|
]
|
|
6765
6803
|
}
|
|
6766
6804
|
)
|
|
6767
6805
|
] }),
|
|
6768
|
-
expanded && /* @__PURE__ */
|
|
6806
|
+
expanded && /* @__PURE__ */ jsx20("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx20(DefaultToolDetail, { call }) })
|
|
6769
6807
|
] });
|
|
6770
6808
|
}
|
|
6771
6809
|
function formatFollowupWhen(when) {
|
|
@@ -6780,14 +6818,14 @@ function FollowupCard({ call }) {
|
|
|
6780
6818
|
const when = typeof a.when === "string" ? a.when : typeof a.at === "string" ? a.at : typeof a.schedule === "string" ? a.schedule : null;
|
|
6781
6819
|
const failed = toolCallFailed(call);
|
|
6782
6820
|
const errorText = failed ? toolOutcomeOf(call)?.message ?? "Scheduling failed" : null;
|
|
6783
|
-
return /* @__PURE__ */
|
|
6821
|
+
return /* @__PURE__ */ jsx20("div", { className: "flex items-start gap-2", children: /* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--md3-surface-container)]", children: [
|
|
6784
6822
|
/* @__PURE__ */ jsxs17("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
|
|
6785
|
-
/* @__PURE__ */
|
|
6786
|
-
/* @__PURE__ */
|
|
6787
|
-
when && /* @__PURE__ */
|
|
6788
|
-
/* @__PURE__ */
|
|
6823
|
+
/* @__PURE__ */ jsx20("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx20(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
|
|
6824
|
+
/* @__PURE__ */ jsx20("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
|
|
6825
|
+
when && /* @__PURE__ */ jsx20("span", { title: when, className: "hidden min-w-0 flex-1 truncate font-mono text-xs tabular-nums text-muted-foreground sm:inline", children: formatFollowupWhen(when) }),
|
|
6826
|
+
/* @__PURE__ */ jsx20("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx20("svg", { className: "h-3 w-3 shrink-0 animate-spin text-[var(--accent-text)]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx20("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx20("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
|
|
6789
6827
|
] }),
|
|
6790
|
-
errorText && /* @__PURE__ */
|
|
6828
|
+
errorText && /* @__PURE__ */ jsx20("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
|
|
6791
6829
|
] }) });
|
|
6792
6830
|
}
|
|
6793
6831
|
function toolRowTitle(call) {
|
|
@@ -6810,10 +6848,10 @@ function ToolCallCard({
|
|
|
6810
6848
|
const arrival = useArrivalStyle(staggerIndex ?? 0);
|
|
6811
6849
|
const pending = call.status === "done" ? pendingApprovalOf(call) : null;
|
|
6812
6850
|
const kind = blockKindOf(call);
|
|
6813
|
-
const arrive = (row) => /* @__PURE__ */
|
|
6851
|
+
const arrive = (row) => /* @__PURE__ */ jsx20("div", { className: "agent-arrive", style: arrival, children: row });
|
|
6814
6852
|
if (pending) {
|
|
6815
6853
|
return arrive(
|
|
6816
|
-
/* @__PURE__ */
|
|
6854
|
+
/* @__PURE__ */ jsx20(
|
|
6817
6855
|
ProposalCard,
|
|
6818
6856
|
{
|
|
6819
6857
|
call,
|
|
@@ -6826,18 +6864,18 @@ function ToolCallCard({
|
|
|
6826
6864
|
);
|
|
6827
6865
|
}
|
|
6828
6866
|
if (kind === "followup") {
|
|
6829
|
-
return arrive(/* @__PURE__ */
|
|
6867
|
+
return arrive(/* @__PURE__ */ jsx20(FollowupCard, { call }));
|
|
6830
6868
|
}
|
|
6831
6869
|
const custom = renderers?.[call.name]?.(call, message);
|
|
6832
6870
|
return arrive(
|
|
6833
|
-
/* @__PURE__ */
|
|
6871
|
+
/* @__PURE__ */ jsx20(
|
|
6834
6872
|
InlineToolItem,
|
|
6835
6873
|
{
|
|
6836
6874
|
part: chatToolCallPart(call),
|
|
6837
6875
|
title: toolRowTitle(call),
|
|
6838
6876
|
description: toolRowDescription(call),
|
|
6839
|
-
renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */
|
|
6840
|
-
actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */
|
|
6877
|
+
renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx20(ShellDetail, { call }) : /* @__PURE__ */ jsx20(DefaultToolDetail, { call })),
|
|
6878
|
+
actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx20(
|
|
6841
6879
|
"button",
|
|
6842
6880
|
{
|
|
6843
6881
|
type: "button",
|
|
@@ -6846,8 +6884,8 @@ function ToolCallCard({
|
|
|
6846
6884
|
title: "Open full transcript",
|
|
6847
6885
|
className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
|
|
6848
6886
|
children: /* @__PURE__ */ jsxs17("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
6849
|
-
/* @__PURE__ */
|
|
6850
|
-
/* @__PURE__ */
|
|
6887
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 17 17 7" }),
|
|
6888
|
+
/* @__PURE__ */ jsx20("path", { d: "M7 7h10v10" })
|
|
6851
6889
|
] })
|
|
6852
6890
|
}
|
|
6853
6891
|
) : void 0
|
|
@@ -6856,7 +6894,7 @@ function ToolCallCard({
|
|
|
6856
6894
|
);
|
|
6857
6895
|
}
|
|
6858
6896
|
function StreamingCaret() {
|
|
6859
|
-
return /* @__PURE__ */
|
|
6897
|
+
return /* @__PURE__ */ jsx20(
|
|
6860
6898
|
"span",
|
|
6861
6899
|
{
|
|
6862
6900
|
className: "ml-0.5 inline-block h-[1.1em] w-[3px] translate-y-[2px] animate-[agent-caret_1s_step-end_infinite] rounded-sm bg-foreground/70",
|
|
@@ -6883,7 +6921,7 @@ function SegmentText({
|
|
|
6883
6921
|
// log was appended to".
|
|
6884
6922
|
/* @__PURE__ */ jsxs17("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
|
|
6885
6923
|
body,
|
|
6886
|
-
showCaret && /* @__PURE__ */
|
|
6924
|
+
showCaret && /* @__PURE__ */ jsx20(StreamingCaret, {})
|
|
6887
6925
|
] })
|
|
6888
6926
|
);
|
|
6889
6927
|
}
|
|
@@ -6908,7 +6946,7 @@ function SegmentedBody({
|
|
|
6908
6946
|
const leftoverToolCalls = (msg.toolCalls ?? []).filter(
|
|
6909
6947
|
(tc) => !segmentToolIds.has(tc.id)
|
|
6910
6948
|
);
|
|
6911
|
-
const renderToolCard = (call, index) => /* @__PURE__ */
|
|
6949
|
+
const renderToolCard = (call, index) => /* @__PURE__ */ jsx20(
|
|
6912
6950
|
ToolCallCard,
|
|
6913
6951
|
{
|
|
6914
6952
|
call,
|
|
@@ -6936,7 +6974,7 @@ function SegmentedBody({
|
|
|
6936
6974
|
for (const g of groups) {
|
|
6937
6975
|
if (g.kind === "text") {
|
|
6938
6976
|
children.push(
|
|
6939
|
-
/* @__PURE__ */
|
|
6977
|
+
/* @__PURE__ */ jsx20(
|
|
6940
6978
|
SegmentText,
|
|
6941
6979
|
{
|
|
6942
6980
|
content: g.content,
|
|
@@ -6958,7 +6996,7 @@ function SegmentedBody({
|
|
|
6958
6996
|
g.calls.length,
|
|
6959
6997
|
" steps"
|
|
6960
6998
|
] }),
|
|
6961
|
-
/* @__PURE__ */
|
|
6999
|
+
/* @__PURE__ */ jsx20("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
|
|
6962
7000
|
] }, `tools-fold-${g.index}`)
|
|
6963
7001
|
);
|
|
6964
7002
|
continue;
|
|
@@ -6967,9 +7005,9 @@ function SegmentedBody({
|
|
|
6967
7005
|
}
|
|
6968
7006
|
leftoverToolCalls.forEach((call, index) => children.push(renderToolCard(call, index)));
|
|
6969
7007
|
if (streaming && segments[lastIndex]?.kind === "tool") {
|
|
6970
|
-
children.push(/* @__PURE__ */
|
|
7008
|
+
children.push(/* @__PURE__ */ jsx20(StreamingCaret, {}, "streaming-caret"));
|
|
6971
7009
|
}
|
|
6972
|
-
return /* @__PURE__ */
|
|
7010
|
+
return /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-2", children });
|
|
6973
7011
|
}
|
|
6974
7012
|
var QUIET_META_LANE_CLASS = "mt-1 flex h-[18px] items-center gap-2 text-xs tabular-nums text-muted-foreground opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100";
|
|
6975
7013
|
function copyTextOf(msg) {
|
|
@@ -6999,7 +7037,7 @@ function CopyMessageButton({ text }) {
|
|
|
6999
7037
|
}
|
|
7000
7038
|
);
|
|
7001
7039
|
};
|
|
7002
|
-
return /* @__PURE__ */
|
|
7040
|
+
return /* @__PURE__ */ jsx20(
|
|
7003
7041
|
"button",
|
|
7004
7042
|
{
|
|
7005
7043
|
type: "button",
|
|
@@ -7007,9 +7045,9 @@ function CopyMessageButton({ text }) {
|
|
|
7007
7045
|
"aria-label": "Copy message",
|
|
7008
7046
|
title: "Copy message",
|
|
7009
7047
|
className: "rounded p-0.5 text-muted-foreground transition hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7010
|
-
children: copied ? /* @__PURE__ */
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7048
|
+
children: copied ? /* @__PURE__ */ jsx20("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx20("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs17("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
7049
|
+
/* @__PURE__ */ jsx20("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
7050
|
+
/* @__PURE__ */ jsx20("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
7013
7051
|
] })
|
|
7014
7052
|
}
|
|
7015
7053
|
);
|
|
@@ -7056,10 +7094,10 @@ function AssistantMessageImpl({
|
|
|
7056
7094
|
const quiet = chrome === "quiet";
|
|
7057
7095
|
return /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
|
|
7058
7096
|
!quiet && /* @__PURE__ */ jsxs17("div", { className: "mb-1 flex items-baseline gap-2 text-xs tabular-nums text-muted-foreground", children: [
|
|
7059
|
-
/* @__PURE__ */
|
|
7060
|
-
msg.modelUsed && /* @__PURE__ */
|
|
7061
|
-
formatTokensPerSecond(msg) && /* @__PURE__ */
|
|
7062
|
-
formatModelCost(msg, models) && /* @__PURE__ */
|
|
7097
|
+
/* @__PURE__ */ jsx20("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
|
|
7098
|
+
msg.modelUsed && /* @__PURE__ */ jsx20("span", { className: "font-mono normal-case", children: msg.modelUsed }),
|
|
7099
|
+
formatTokensPerSecond(msg) && /* @__PURE__ */ jsx20("span", { children: formatTokensPerSecond(msg) }),
|
|
7100
|
+
formatModelCost(msg, models) && /* @__PURE__ */ jsx20("span", { children: formatModelCost(msg, models) })
|
|
7063
7101
|
] }),
|
|
7064
7102
|
reasoning && // The canonical run-row grammar (RunRowShell — the same shell the tool
|
|
7065
7103
|
// rows compose): one family of rows instead of a bespoke disclosure per
|
|
@@ -7069,11 +7107,11 @@ function AssistantMessageImpl({
|
|
|
7069
7107
|
// and a click outranks the default from then on — the contract the old
|
|
7070
7108
|
// hand-rolled disclosure had, now enforced through the shell's
|
|
7071
7109
|
// controlled `open`.
|
|
7072
|
-
/* @__PURE__ */
|
|
7110
|
+
/* @__PURE__ */ jsx20(
|
|
7073
7111
|
RunRowShell,
|
|
7074
7112
|
{
|
|
7075
7113
|
className: "mb-2",
|
|
7076
|
-
icon: /* @__PURE__ */
|
|
7114
|
+
icon: /* @__PURE__ */ jsx20(BrainGlyph, { className: "h-3.5 w-3.5" }),
|
|
7077
7115
|
title: !hasAnswerText ? /* @__PURE__ */ jsxs17("span", { className: "agent-shimmer", "data-motion": "essential", children: [
|
|
7078
7116
|
"Thinking",
|
|
7079
7117
|
thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
|
|
@@ -7089,7 +7127,7 @@ function AssistantMessageImpl({
|
|
|
7089
7127
|
status: hasAnswerText ? "idle" : "running",
|
|
7090
7128
|
open: reasoningOpen,
|
|
7091
7129
|
onOpenChange: (next) => setReasoningToggled(next),
|
|
7092
|
-
children: /* @__PURE__ */
|
|
7130
|
+
children: /* @__PURE__ */ jsx20(
|
|
7093
7131
|
"div",
|
|
7094
7132
|
{
|
|
7095
7133
|
ref: reasoningScrollRef,
|
|
@@ -7099,7 +7137,7 @@ function AssistantMessageImpl({
|
|
|
7099
7137
|
)
|
|
7100
7138
|
}
|
|
7101
7139
|
),
|
|
7102
|
-
segments && segments.length > 0 ? /* @__PURE__ */
|
|
7140
|
+
segments && segments.length > 0 ? /* @__PURE__ */ jsx20(
|
|
7103
7141
|
SegmentedBody,
|
|
7104
7142
|
{
|
|
7105
7143
|
segments,
|
|
@@ -7114,9 +7152,9 @@ function AssistantMessageImpl({
|
|
|
7114
7152
|
) : /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
7115
7153
|
/* @__PURE__ */ jsxs17("div", { className: messageClassName, children: [
|
|
7116
7154
|
body,
|
|
7117
|
-
streaming && content && !msg.toolCalls?.length && /* @__PURE__ */
|
|
7155
|
+
streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx20(StreamingCaret, {})
|
|
7118
7156
|
] }),
|
|
7119
|
-
msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */
|
|
7157
|
+
msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx20("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx20(
|
|
7120
7158
|
ToolCallCard,
|
|
7121
7159
|
{
|
|
7122
7160
|
call: tc,
|
|
@@ -7129,7 +7167,7 @@ function AssistantMessageImpl({
|
|
|
7129
7167
|
tc.id
|
|
7130
7168
|
)) })
|
|
7131
7169
|
] }),
|
|
7132
|
-
durableCards && msg.parts && /* @__PURE__ */
|
|
7170
|
+
durableCards && msg.parts && /* @__PURE__ */ jsx20(
|
|
7133
7171
|
DurableChatCards,
|
|
7134
7172
|
{
|
|
7135
7173
|
...durableCards,
|
|
@@ -7138,7 +7176,7 @@ function AssistantMessageImpl({
|
|
|
7138
7176
|
className: "mt-3"
|
|
7139
7177
|
}
|
|
7140
7178
|
),
|
|
7141
|
-
workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */
|
|
7179
|
+
workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx20(
|
|
7142
7180
|
WorkProductCard,
|
|
7143
7181
|
{
|
|
7144
7182
|
part,
|
|
@@ -7148,7 +7186,7 @@ function AssistantMessageImpl({
|
|
|
7148
7186
|
`${part.ref.id}:${part.ref.version}`
|
|
7149
7187
|
)),
|
|
7150
7188
|
renderExtras?.(msg),
|
|
7151
|
-
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */
|
|
7189
|
+
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx20("div", { className: "mt-2", children: /* @__PURE__ */ jsx20(
|
|
7152
7190
|
MessageAttachments,
|
|
7153
7191
|
{
|
|
7154
7192
|
parts: attachmentPartsFromMessageParts(msg.parts),
|
|
@@ -7157,10 +7195,10 @@ function AssistantMessageImpl({
|
|
|
7157
7195
|
}
|
|
7158
7196
|
) }),
|
|
7159
7197
|
quiet && /* @__PURE__ */ jsxs17("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
msg.modelUsed && /* @__PURE__ */
|
|
7162
|
-
formatTokensPerSecond(msg) && /* @__PURE__ */
|
|
7163
|
-
formatModelCost(msg, models) && /* @__PURE__ */
|
|
7198
|
+
/* @__PURE__ */ jsx20(CopyMessageButton, { text: copyTextOf(msg) }),
|
|
7199
|
+
msg.modelUsed && /* @__PURE__ */ jsx20("span", { className: "font-mono", children: msg.modelUsed }),
|
|
7200
|
+
formatTokensPerSecond(msg) && /* @__PURE__ */ jsx20("span", { children: formatTokensPerSecond(msg) }),
|
|
7201
|
+
formatModelCost(msg, models) && /* @__PURE__ */ jsx20("span", { children: formatModelCost(msg, models) })
|
|
7164
7202
|
] })
|
|
7165
7203
|
] });
|
|
7166
7204
|
}
|
|
@@ -7178,22 +7216,22 @@ function useThinkingSeconds(active) {
|
|
|
7178
7216
|
function ThinkingRow({ agentLabel, chrome = "labeled" }) {
|
|
7179
7217
|
const seconds = useThinkingSeconds(true);
|
|
7180
7218
|
return /* @__PURE__ */ jsxs17("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
|
|
7181
|
-
chrome !== "quiet" && /* @__PURE__ */
|
|
7219
|
+
chrome !== "quiet" && /* @__PURE__ */ jsx20("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
|
|
7182
7220
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
|
|
7183
|
-
/* @__PURE__ */
|
|
7221
|
+
/* @__PURE__ */ jsx20("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx20("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
|
|
7184
7222
|
"Thinking",
|
|
7185
7223
|
seconds >= 3 ? ` \xB7 ${seconds}s` : "..."
|
|
7186
7224
|
] })
|
|
7187
7225
|
] });
|
|
7188
7226
|
}
|
|
7189
7227
|
function StreamErrorRow({ message, onRetry }) {
|
|
7190
|
-
return /* @__PURE__ */
|
|
7228
|
+
return /* @__PURE__ */ jsx20("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: /* @__PURE__ */ jsxs17("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/5 px-3 py-2.5 text-sm text-destructive", children: [
|
|
7191
7229
|
/* @__PURE__ */ jsxs17("svg", { className: "mt-0.5 h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
7192
|
-
/* @__PURE__ */
|
|
7193
|
-
/* @__PURE__ */
|
|
7230
|
+
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "9" }),
|
|
7231
|
+
/* @__PURE__ */ jsx20("path", { d: "M12 8v4m0 4h.01" })
|
|
7194
7232
|
] }),
|
|
7195
|
-
/* @__PURE__ */
|
|
7196
|
-
onRetry && /* @__PURE__ */
|
|
7233
|
+
/* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1 break-words", children: message }),
|
|
7234
|
+
onRetry && /* @__PURE__ */ jsx20(
|
|
7197
7235
|
"button",
|
|
7198
7236
|
{
|
|
7199
7237
|
type: "button",
|
|
@@ -7229,13 +7267,13 @@ function ChatMessages({
|
|
|
7229
7267
|
const messageClassName = messageSize === "large" ? "agent-app-message-copy text-[17px] leading-[1.6]" : "agent-app-message-copy text-base leading-[1.6]";
|
|
7230
7268
|
const assistantMessageClassName = `${messageClassName} bg-transparent text-[hsl(var(--foreground))]`;
|
|
7231
7269
|
const renderBody = useMemo7(
|
|
7232
|
-
() => renderMarkdown ?? ((content) => /* @__PURE__ */
|
|
7270
|
+
() => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx20("p", { className: "whitespace-pre-wrap", children: content })),
|
|
7233
7271
|
[renderMarkdown]
|
|
7234
7272
|
);
|
|
7235
7273
|
const lastIsUser = messages[messages.length - 1]?.role === "user";
|
|
7236
7274
|
const quiet = chrome === "quiet";
|
|
7237
7275
|
if (messages.length === 0 && !loading && !error) {
|
|
7238
|
-
const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */
|
|
7276
|
+
const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx20(ChatEmptyState, { ...emptyState });
|
|
7239
7277
|
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
7240
7278
|
header,
|
|
7241
7279
|
empty
|
|
@@ -7246,15 +7284,15 @@ function ChatMessages({
|
|
|
7246
7284
|
messages.map(
|
|
7247
7285
|
(msg) => msg.role === "user" ? /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
|
|
7248
7286
|
/* @__PURE__ */ jsxs17("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
|
|
7249
|
-
!quiet && /* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7287
|
+
!quiet && /* @__PURE__ */ jsx20("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
|
|
7288
|
+
/* @__PURE__ */ jsx20(
|
|
7251
7289
|
"div",
|
|
7252
7290
|
{
|
|
7253
7291
|
className: `rounded-2xl bg-[hsl(var(--foreground))] px-4 py-2.5 text-[hsl(var(--background))] ${quiet ? "" : "rounded-tr-md "}${messageClassName}`,
|
|
7254
|
-
children: /* @__PURE__ */
|
|
7292
|
+
children: /* @__PURE__ */ jsx20("p", { className: "whitespace-pre-wrap", children: msg.content })
|
|
7255
7293
|
}
|
|
7256
7294
|
),
|
|
7257
|
-
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */
|
|
7295
|
+
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx20("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx20(
|
|
7258
7296
|
MessageAttachments,
|
|
7259
7297
|
{
|
|
7260
7298
|
parts: attachmentPartsFromMessageParts(msg.parts),
|
|
@@ -7263,8 +7301,8 @@ function ChatMessages({
|
|
|
7263
7301
|
}
|
|
7264
7302
|
) })
|
|
7265
7303
|
] }),
|
|
7266
|
-
quiet && /* @__PURE__ */
|
|
7267
|
-
] }, msg.id) : /* @__PURE__ */
|
|
7304
|
+
quiet && /* @__PURE__ */ jsx20("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx20(CopyMessageButton, { text: msg.content }) })
|
|
7305
|
+
] }, msg.id) : /* @__PURE__ */ jsx20(
|
|
7268
7306
|
AssistantMessage,
|
|
7269
7307
|
{
|
|
7270
7308
|
msg,
|
|
@@ -7285,8 +7323,8 @@ function ChatMessages({
|
|
|
7285
7323
|
msg.id
|
|
7286
7324
|
)
|
|
7287
7325
|
),
|
|
7288
|
-
loading && lastIsUser && /* @__PURE__ */
|
|
7289
|
-
error && !loading && /* @__PURE__ */
|
|
7326
|
+
loading && lastIsUser && /* @__PURE__ */ jsx20(ThinkingRow, { agentLabel, chrome }),
|
|
7327
|
+
error && !loading && /* @__PURE__ */ jsx20(StreamErrorRow, { message: error, onRetry })
|
|
7290
7328
|
] });
|
|
7291
7329
|
}
|
|
7292
7330
|
|
|
@@ -7417,6 +7455,7 @@ export {
|
|
|
7417
7455
|
InsightDeck,
|
|
7418
7456
|
ApiAccessPanel,
|
|
7419
7457
|
AgentProfileChoices,
|
|
7458
|
+
ComposerProfilePill,
|
|
7420
7459
|
formatModelCost,
|
|
7421
7460
|
formatTokensPerSecond,
|
|
7422
7461
|
RunDrillIn,
|
|
@@ -7426,4 +7465,4 @@ export {
|
|
|
7426
7465
|
useThinkingSeconds,
|
|
7427
7466
|
ChatMessages
|
|
7428
7467
|
};
|
|
7429
|
-
//# sourceMappingURL=chunk-
|
|
7468
|
+
//# sourceMappingURL=chunk-A7P6XH6Y.js.map
|