@tangle-network/agent-app 0.53.2 → 0.53.3
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/assistant/index.js +6 -4
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +3 -2
- package/dist/{chunk-EV5UI4VH.js → chunk-36ZV7KIP.js} +152 -64
- package/dist/chunk-36ZV7KIP.js.map +1 -0
- package/dist/chunk-6FYFGQ6I.js +48 -0
- package/dist/chunk-6FYFGQ6I.js.map +1 -0
- package/dist/{chunk-2LPNGZFG.js → chunk-BINC6OWR.js} +183 -152
- package/dist/chunk-BINC6OWR.js.map +1 -0
- package/dist/{chunk-CIYMRDAM.js → chunk-IYK5BRL4.js} +6 -2
- package/dist/chunk-IYK5BRL4.js.map +1 -0
- package/dist/{chunk-FRABQIQ4.js → chunk-NH32EPWU.js} +2 -2
- package/dist/chunk-ODP3X4BN.js +114 -0
- package/dist/chunk-ODP3X4BN.js.map +1 -0
- package/dist/{mention-editor-YPKFP2LF.js → mention-editor-E6J2RUG4.js} +2 -2
- package/dist/studio-react/index.js +2 -2
- package/dist/web-react/agent-profile-choices.d.ts +6 -0
- package/dist/web-react/agent-session-controls.d.ts +6 -1
- package/dist/web-react/agent-settings-popover.d.ts +15 -0
- package/dist/web-react/index.d.ts +3 -0
- package/dist/web-react/index.js +13 -4
- package/dist/web-react/popover-dialog.d.ts +13 -0
- package/dist/web-react/workspace-switcher.d.ts +24 -0
- package/dist/workspace-react/index.d.ts +1 -0
- package/dist/workspace-react/index.js +8 -0
- package/dist/workspace-react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2LPNGZFG.js.map +0 -1
- package/dist/chunk-CIYMRDAM.js.map +0 -1
- package/dist/chunk-EV5UI4VH.js.map +0 -1
- /package/dist/{chunk-FRABQIQ4.js.map → chunk-NH32EPWU.js.map} +0 -0
- /package/dist/{mention-editor-YPKFP2LF.js.map → mention-editor-E6J2RUG4.js.map} +0 -0
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
PopoverSurface,
|
|
24
24
|
usePending,
|
|
25
25
|
usePopover
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IYK5BRL4.js";
|
|
27
27
|
import {
|
|
28
28
|
filterCommandPaletteItems,
|
|
29
29
|
groupCommandPaletteItems
|
|
@@ -6439,8 +6439,38 @@ function ApiAccessPanel({
|
|
|
6439
6439
|
] }) });
|
|
6440
6440
|
}
|
|
6441
6441
|
|
|
6442
|
+
// src/web-react/agent-profile-choices.tsx
|
|
6443
|
+
import { useId as useId5 } from "react";
|
|
6444
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6445
|
+
function AgentProfileChoices({ value, profiles, onChange, disabled, locked, lockReason, onNewChat, label = "Agent profile" }) {
|
|
6446
|
+
const name = useId5();
|
|
6447
|
+
const selected = profiles.find((profile) => profile.id === value);
|
|
6448
|
+
if (locked) {
|
|
6449
|
+
return /* @__PURE__ */ jsxs16("div", { className: "space-y-2 rounded-lg border border-border p-3 text-sm", children: [
|
|
6450
|
+
/* @__PURE__ */ jsx18("p", { className: "font-medium text-foreground", children: selected?.name ?? value }),
|
|
6451
|
+
/* @__PURE__ */ jsx18("p", { className: "text-muted-foreground", children: lockReason ?? "This conversation stays on its current profile." }),
|
|
6452
|
+
onNewChat && !disabled && /* @__PURE__ */ jsx18("button", { type: "button", onClick: onNewChat, className: "text-sm font-medium text-primary underline underline-offset-4", children: "New chat to switch profile" })
|
|
6453
|
+
] });
|
|
6454
|
+
}
|
|
6455
|
+
return /* @__PURE__ */ jsxs16("fieldset", { disabled, className: "min-w-0 space-y-1", children: [
|
|
6456
|
+
/* @__PURE__ */ jsx18("legend", { className: "sr-only", children: label }),
|
|
6457
|
+
/* @__PURE__ */ jsxs16("div", { className: "max-h-48 space-y-1 overflow-y-auto", children: [
|
|
6458
|
+
profiles.map((profile) => /* @__PURE__ */ jsxs16("label", { className: "flex min-h-10 cursor-pointer items-start gap-2 rounded-lg border border-transparent p-2 text-sm hover:bg-muted has-[:checked]:border-border has-[:checked]:bg-muted has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-60", children: [
|
|
6459
|
+
/* @__PURE__ */ jsx18("input", { type: "radio", name, value: profile.id, checked: profile.id === value, disabled, onChange: () => {
|
|
6460
|
+
if (!disabled) onChange(profile.id);
|
|
6461
|
+
}, className: "mt-1 shrink-0 accent-primary" }),
|
|
6462
|
+
/* @__PURE__ */ jsxs16("span", { className: "min-w-0", children: [
|
|
6463
|
+
/* @__PURE__ */ jsx18("span", { className: "block font-medium text-foreground", children: profile.name }),
|
|
6464
|
+
profile.description && /* @__PURE__ */ jsx18("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: profile.description })
|
|
6465
|
+
] })
|
|
6466
|
+
] }, profile.id)),
|
|
6467
|
+
profiles.length === 0 && /* @__PURE__ */ jsx18("p", { role: "status", className: "p-2 text-sm text-muted-foreground", children: "No profiles available." })
|
|
6468
|
+
] })
|
|
6469
|
+
] });
|
|
6470
|
+
}
|
|
6471
|
+
|
|
6442
6472
|
// src/web-react/index.tsx
|
|
6443
|
-
import { Fragment as Fragment9, jsx as
|
|
6473
|
+
import { Fragment as Fragment9, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6444
6474
|
function formatModelCost(msg, models) {
|
|
6445
6475
|
if (msg.promptTokens == null && msg.completionTokens == null) return null;
|
|
6446
6476
|
const pricing = models.find((m) => m.id === msg.modelUsed)?.pricing;
|
|
@@ -6459,41 +6489,41 @@ function formatTokensPerSecond(msg) {
|
|
|
6459
6489
|
return `${Math.round(msg.completionTokens / (msg.durationMs / 1e3))} tok/s`;
|
|
6460
6490
|
}
|
|
6461
6491
|
function RunDrillIn({ run, onClose }) {
|
|
6462
|
-
return /* @__PURE__ */
|
|
6463
|
-
/* @__PURE__ */
|
|
6464
|
-
/* @__PURE__ */
|
|
6492
|
+
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
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 border-b border-border px-4 py-3", children: [
|
|
6494
|
+
/* @__PURE__ */ jsx19(
|
|
6465
6495
|
"span",
|
|
6466
6496
|
{
|
|
6467
6497
|
className: `h-2 w-2 shrink-0 rounded-full ${run.status === "running" ? "bg-warning" : run.status === "error" ? "bg-destructive" : "bg-success"}`
|
|
6468
6498
|
}
|
|
6469
6499
|
),
|
|
6470
|
-
/* @__PURE__ */
|
|
6471
|
-
/* @__PURE__ */
|
|
6472
|
-
/* @__PURE__ */
|
|
6500
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
6501
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate text-[15px] font-semibold", children: run.title }),
|
|
6502
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate font-mono text-xs text-muted-foreground", children: run.toolName })
|
|
6473
6503
|
] }),
|
|
6474
|
-
/* @__PURE__ */
|
|
6504
|
+
/* @__PURE__ */ jsx19(
|
|
6475
6505
|
"button",
|
|
6476
6506
|
{
|
|
6477
6507
|
type: "button",
|
|
6478
6508
|
onClick: onClose,
|
|
6479
6509
|
"aria-label": "Close",
|
|
6480
6510
|
className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
|
|
6481
|
-
children: /* @__PURE__ */
|
|
6511
|
+
children: /* @__PURE__ */ jsx19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx19("path", { d: "M18 6 6 18M6 6l12 12" }) })
|
|
6482
6512
|
}
|
|
6483
6513
|
)
|
|
6484
6514
|
] }),
|
|
6485
|
-
/* @__PURE__ */
|
|
6486
|
-
run.steps.length === 0 && /* @__PURE__ */
|
|
6487
|
-
run.steps.map((step, i) => /* @__PURE__ */
|
|
6488
|
-
/* @__PURE__ */
|
|
6489
|
-
/* @__PURE__ */
|
|
6490
|
-
/* @__PURE__ */
|
|
6491
|
-
/* @__PURE__ */
|
|
6515
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex-1 space-y-3 overflow-y-auto p-4", children: [
|
|
6516
|
+
run.steps.length === 0 && /* @__PURE__ */ jsx19("p", { className: "text-sm text-muted-foreground", children: "No steps recorded yet." }),
|
|
6517
|
+
run.steps.map((step, i) => /* @__PURE__ */ jsxs17("div", { className: "rounded-lg border border-card-edge bg-card", children: [
|
|
6518
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-baseline gap-2 border-b border-border px-3 py-1.5", children: [
|
|
6519
|
+
/* @__PURE__ */ jsx19("span", { className: `font-mono text-xs ${step.status === "error" ? "text-destructive" : "text-muted-foreground"}`, children: step.status === "error" ? "\u2717" : "$" }),
|
|
6520
|
+
/* @__PURE__ */ jsx19("code", { className: "min-w-0 flex-1 truncate font-mono text-xs", children: step.label }),
|
|
6521
|
+
/* @__PURE__ */ jsx19("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: new Date(step.at).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }) })
|
|
6492
6522
|
] }),
|
|
6493
|
-
step.detail && /* @__PURE__ */
|
|
6523
|
+
step.detail && /* @__PURE__ */ jsx19("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 })
|
|
6494
6524
|
] }, i))
|
|
6495
6525
|
] }),
|
|
6496
|
-
/* @__PURE__ */
|
|
6526
|
+
/* @__PURE__ */ jsx19("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." })
|
|
6497
6527
|
] });
|
|
6498
6528
|
}
|
|
6499
6529
|
function pendingApprovalOf(call) {
|
|
@@ -6509,23 +6539,23 @@ function ChatEmptyState({
|
|
|
6509
6539
|
}) {
|
|
6510
6540
|
const doorCount = Math.min(doors?.length ?? 0, 3);
|
|
6511
6541
|
const doorsGridClass = doorCount === 1 ? "mx-auto max-w-sm sm:grid-cols-1" : doorCount === 2 ? "sm:grid-cols-2" : "sm:grid-cols-3";
|
|
6512
|
-
return /* @__PURE__ */
|
|
6513
|
-
/* @__PURE__ */
|
|
6514
|
-
/* @__PURE__ */
|
|
6515
|
-
/* @__PURE__ */
|
|
6516
|
-
subline && /* @__PURE__ */
|
|
6517
|
-
doors && doors.length > 0 && /* @__PURE__ */
|
|
6542
|
+
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__ */ jsx19("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__ */ jsx19(BrandMark, { size: 32, className: "shrink-0" }) }),
|
|
6544
|
+
/* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: productName }),
|
|
6545
|
+
/* @__PURE__ */ jsx19("h2", { className: "mt-1.5 text-balance text-2xl font-semibold leading-tight text-foreground", children: headline }),
|
|
6546
|
+
subline && /* @__PURE__ */ jsx19("p", { className: "mt-3 max-w-md text-[15px] leading-relaxed text-muted-foreground", children: subline }),
|
|
6547
|
+
doors && doors.length > 0 && /* @__PURE__ */ jsx19("div", { className: `mt-7 grid w-full gap-2.5 ${doorsGridClass}`, children: doors.slice(0, 3).map((door, i) => /* @__PURE__ */ jsxs17(
|
|
6518
6548
|
"button",
|
|
6519
6549
|
{
|
|
6520
6550
|
type: "button",
|
|
6521
6551
|
onClick: door.onSelect,
|
|
6522
6552
|
className: "group flex min-h-[44px] flex-col items-start rounded-xl border border-border bg-card px-4 py-3 text-left transition hover:border-primary/40 hover:bg-accent",
|
|
6523
6553
|
children: [
|
|
6524
|
-
/* @__PURE__ */
|
|
6554
|
+
/* @__PURE__ */ jsxs17("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
|
|
6525
6555
|
door.icon,
|
|
6526
6556
|
door.label
|
|
6527
6557
|
] }),
|
|
6528
|
-
door.description && /* @__PURE__ */
|
|
6558
|
+
door.description && /* @__PURE__ */ jsx19("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
|
|
6529
6559
|
]
|
|
6530
6560
|
},
|
|
6531
6561
|
i
|
|
@@ -6534,26 +6564,26 @@ function ChatEmptyState({
|
|
|
6534
6564
|
}
|
|
6535
6565
|
function ToolGlyph({ name, className }) {
|
|
6536
6566
|
if (name.startsWith("sandbox_")) {
|
|
6537
|
-
return /* @__PURE__ */
|
|
6538
|
-
/* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6567
|
+
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__ */ jsx19("polyline", { points: "4 17 10 11 4 5" }),
|
|
6569
|
+
/* @__PURE__ */ jsx19("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
|
|
6540
6570
|
] });
|
|
6541
6571
|
}
|
|
6542
6572
|
if (name === "submit_proposal") {
|
|
6543
|
-
return /* @__PURE__ */
|
|
6544
|
-
/* @__PURE__ */
|
|
6545
|
-
/* @__PURE__ */
|
|
6573
|
+
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__ */ jsx19("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
6575
|
+
/* @__PURE__ */ jsx19("path", { d: "M14 2v6h6M9 15l2 2 4-4" })
|
|
6546
6576
|
] });
|
|
6547
6577
|
}
|
|
6548
6578
|
if (name === "schedule_followup") {
|
|
6549
|
-
return /* @__PURE__ */
|
|
6550
|
-
/* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */
|
|
6579
|
+
return /* @__PURE__ */ jsxs17("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
|
|
6580
|
+
/* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "9" }),
|
|
6581
|
+
/* @__PURE__ */ jsx19("path", { d: "M12 7v5l3 3" })
|
|
6552
6582
|
] });
|
|
6553
6583
|
}
|
|
6554
|
-
return /* @__PURE__ */
|
|
6555
|
-
/* @__PURE__ */
|
|
6556
|
-
/* @__PURE__ */
|
|
6584
|
+
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__ */ jsx19("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3" }),
|
|
6586
|
+
/* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "4" })
|
|
6557
6587
|
] });
|
|
6558
6588
|
}
|
|
6559
6589
|
function toolOutcomeOf(call) {
|
|
@@ -6639,40 +6669,40 @@ function truncate(v, max = 240) {
|
|
|
6639
6669
|
function KvRows({ data }) {
|
|
6640
6670
|
const entries = Object.entries(data).filter(([, v]) => v !== void 0 && v !== null && v !== "");
|
|
6641
6671
|
if (!entries.length) return null;
|
|
6642
|
-
return /* @__PURE__ */
|
|
6643
|
-
/* @__PURE__ */
|
|
6644
|
-
/* @__PURE__ */
|
|
6672
|
+
return /* @__PURE__ */ jsx19("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: entries.map(([k, v]) => /* @__PURE__ */ jsxs17("div", { className: "contents", children: [
|
|
6673
|
+
/* @__PURE__ */ jsx19("dt", { className: "font-mono text-xs text-muted-foreground", children: k }),
|
|
6674
|
+
/* @__PURE__ */ jsx19("dd", { className: "min-w-0 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground", children: truncate(v) })
|
|
6645
6675
|
] }, k)) });
|
|
6646
6676
|
}
|
|
6647
6677
|
function ShellDetail({ call }) {
|
|
6648
6678
|
const outcome = toolOutcomeOf(call);
|
|
6649
6679
|
const r = outcome?.result ?? {};
|
|
6650
|
-
return /* @__PURE__ */
|
|
6651
|
-
/* @__PURE__ */
|
|
6652
|
-
/* @__PURE__ */
|
|
6653
|
-
/* @__PURE__ */
|
|
6654
|
-
r.exitCode != null && /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ jsxs17("div", { className: "overflow-hidden rounded-md bg-zinc-900 font-mono text-xs leading-relaxed", children: [
|
|
6681
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 px-3 pt-2 text-zinc-400", children: [
|
|
6682
|
+
/* @__PURE__ */ jsx19("span", { className: "select-none text-zinc-500", children: "$" }),
|
|
6683
|
+
/* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 truncate text-zinc-200", children: String(call.args?.command ?? "") }),
|
|
6684
|
+
r.exitCode != null && /* @__PURE__ */ jsxs17("span", { className: r.exitCode === 0 ? "text-success" : "text-destructive", children: [
|
|
6655
6685
|
"exit ",
|
|
6656
6686
|
r.exitCode
|
|
6657
6687
|
] })
|
|
6658
6688
|
] }),
|
|
6659
|
-
/* @__PURE__ */
|
|
6689
|
+
/* @__PURE__ */ jsx19("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)" })
|
|
6660
6690
|
] });
|
|
6661
6691
|
}
|
|
6662
6692
|
function DefaultToolDetail({ call }) {
|
|
6663
6693
|
const result = call.result;
|
|
6664
6694
|
const envelope = typeof result === "object" && result !== null ? result : null;
|
|
6665
|
-
return /* @__PURE__ */
|
|
6666
|
-
call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */
|
|
6667
|
-
/* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6695
|
+
return /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
6696
|
+
call.args && Object.keys(call.args).length > 0 && /* @__PURE__ */ jsxs17("div", { children: [
|
|
6697
|
+
/* @__PURE__ */ jsx19("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Called with" }),
|
|
6698
|
+
/* @__PURE__ */ jsx19(KvRows, { data: call.args })
|
|
6669
6699
|
] }),
|
|
6670
|
-
envelope ? /* @__PURE__ */
|
|
6671
|
-
/* @__PURE__ */
|
|
6672
|
-
envelope.ok === false ? /* @__PURE__ */
|
|
6673
|
-
] }) : result != null ? /* @__PURE__ */
|
|
6674
|
-
/* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
6700
|
+
envelope ? /* @__PURE__ */ jsxs17("div", { children: [
|
|
6701
|
+
/* @__PURE__ */ jsx19("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: envelope.ok === false ? "Failed" : "Result" }),
|
|
6702
|
+
envelope.ok === false ? /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: envelope.message ?? "Tool failed" }) : envelope.result && typeof envelope.result === "object" ? /* @__PURE__ */ jsx19(KvRows, { data: envelope.result }) : envelope.result != null ? /* @__PURE__ */ jsx19("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(envelope.result) }) : null
|
|
6703
|
+
] }) : result != null ? /* @__PURE__ */ jsxs17("div", { children: [
|
|
6704
|
+
/* @__PURE__ */ jsx19("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Result" }),
|
|
6705
|
+
/* @__PURE__ */ jsx19("p", { className: "font-mono text-xs text-muted-foreground", children: truncate(result) })
|
|
6676
6706
|
] }) : null
|
|
6677
6707
|
] });
|
|
6678
6708
|
}
|
|
@@ -6687,20 +6717,20 @@ function ProposalCard({
|
|
|
6687
6717
|
const { summary, meta, typeSlug } = proposalPreview(call);
|
|
6688
6718
|
const custom = renderers?.[call.name]?.(call, message);
|
|
6689
6719
|
const { pending: deciding, run: decide } = usePending();
|
|
6690
|
-
return /* @__PURE__ */
|
|
6691
|
-
/* @__PURE__ */
|
|
6692
|
-
/* @__PURE__ */
|
|
6693
|
-
/* @__PURE__ */
|
|
6694
|
-
/* @__PURE__ */
|
|
6695
|
-
/* @__PURE__ */
|
|
6696
|
-
summary && /* @__PURE__ */
|
|
6697
|
-
typeSlug && /* @__PURE__ */
|
|
6698
|
-
meta.length > 0 && /* @__PURE__ */
|
|
6720
|
+
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
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
|
|
6722
|
+
/* @__PURE__ */ jsx19("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__ */ jsx19(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
|
|
6723
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
6724
|
+
/* @__PURE__ */ jsx19("p", { className: "text-xs font-semibold uppercase tracking-[0.05em] text-warning-strong", children: approval ? "Needs your approval" : "Awaiting approval" }),
|
|
6725
|
+
/* @__PURE__ */ jsx19("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
|
|
6726
|
+
summary && /* @__PURE__ */ jsx19("p", { className: "mt-1 text-xs leading-relaxed text-muted-foreground", children: summary }),
|
|
6727
|
+
typeSlug && /* @__PURE__ */ jsx19("p", { className: "mt-1 font-mono text-xs text-muted-foreground", children: typeSlug }),
|
|
6728
|
+
meta.length > 0 && /* @__PURE__ */ jsx19("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx19("span", { className: "rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-muted-foreground", children: m }, i)) })
|
|
6699
6729
|
] })
|
|
6700
6730
|
] }),
|
|
6701
|
-
/* @__PURE__ */
|
|
6702
|
-
approval && /* @__PURE__ */
|
|
6703
|
-
/* @__PURE__ */
|
|
6731
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap items-center gap-2 px-4 pb-3.5 pt-3", children: [
|
|
6732
|
+
approval && /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
6733
|
+
/* @__PURE__ */ jsx19(
|
|
6704
6734
|
"button",
|
|
6705
6735
|
{
|
|
6706
6736
|
type: "button",
|
|
@@ -6710,7 +6740,7 @@ function ProposalCard({
|
|
|
6710
6740
|
children: "Approve & run"
|
|
6711
6741
|
}
|
|
6712
6742
|
),
|
|
6713
|
-
/* @__PURE__ */
|
|
6743
|
+
/* @__PURE__ */ jsx19(
|
|
6714
6744
|
"button",
|
|
6715
6745
|
{
|
|
6716
6746
|
type: "button",
|
|
@@ -6721,7 +6751,7 @@ function ProposalCard({
|
|
|
6721
6751
|
}
|
|
6722
6752
|
)
|
|
6723
6753
|
] }),
|
|
6724
|
-
/* @__PURE__ */
|
|
6754
|
+
/* @__PURE__ */ jsxs17(
|
|
6725
6755
|
"button",
|
|
6726
6756
|
{
|
|
6727
6757
|
type: "button",
|
|
@@ -6730,12 +6760,12 @@ function ProposalCard({
|
|
|
6730
6760
|
className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
|
|
6731
6761
|
children: [
|
|
6732
6762
|
expanded ? "Hide details" : "View details",
|
|
6733
|
-
/* @__PURE__ */
|
|
6763
|
+
/* @__PURE__ */ jsx19(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
|
|
6734
6764
|
]
|
|
6735
6765
|
}
|
|
6736
6766
|
)
|
|
6737
6767
|
] }),
|
|
6738
|
-
expanded && /* @__PURE__ */
|
|
6768
|
+
expanded && /* @__PURE__ */ jsx19("div", { className: "border-t border-warning/20 px-4 py-3 text-xs", children: custom ?? /* @__PURE__ */ jsx19(DefaultToolDetail, { call }) })
|
|
6739
6769
|
] });
|
|
6740
6770
|
}
|
|
6741
6771
|
function formatFollowupWhen(when) {
|
|
@@ -6750,14 +6780,14 @@ function FollowupCard({ call }) {
|
|
|
6750
6780
|
const when = typeof a.when === "string" ? a.when : typeof a.at === "string" ? a.at : typeof a.schedule === "string" ? a.schedule : null;
|
|
6751
6781
|
const failed = toolCallFailed(call);
|
|
6752
6782
|
const errorText = failed ? toolOutcomeOf(call)?.message ?? "Scheduling failed" : null;
|
|
6753
|
-
return /* @__PURE__ */
|
|
6754
|
-
/* @__PURE__ */
|
|
6755
|
-
/* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
6757
|
-
when && /* @__PURE__ */
|
|
6758
|
-
/* @__PURE__ */
|
|
6783
|
+
return /* @__PURE__ */ jsx19("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
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex w-full items-center gap-2.5 px-3 py-2", children: [
|
|
6785
|
+
/* @__PURE__ */ jsx19("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__ */ jsx19(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
|
|
6786
|
+
/* @__PURE__ */ jsx19("span", { className: "shrink-0 whitespace-nowrap text-xs font-medium text-foreground", children: friendlyToolTitle(call) }),
|
|
6787
|
+
when && /* @__PURE__ */ jsx19("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) }),
|
|
6788
|
+
/* @__PURE__ */ jsx19("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: call.status === "running" ? /* @__PURE__ */ jsx19("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__ */ jsx19("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }) : /* @__PURE__ */ jsx19("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${failed ? "bg-[var(--surface-danger-text)]" : "bg-[var(--surface-success-text)]"}` }) })
|
|
6759
6789
|
] }),
|
|
6760
|
-
errorText && /* @__PURE__ */
|
|
6790
|
+
errorText && /* @__PURE__ */ jsx19("div", { className: "border-t border-border px-3 py-2 text-xs text-[var(--surface-danger-text)]", children: errorText })
|
|
6761
6791
|
] }) });
|
|
6762
6792
|
}
|
|
6763
6793
|
function toolRowTitle(call) {
|
|
@@ -6780,10 +6810,10 @@ function ToolCallCard({
|
|
|
6780
6810
|
const arrival = useArrivalStyle(staggerIndex ?? 0);
|
|
6781
6811
|
const pending = call.status === "done" ? pendingApprovalOf(call) : null;
|
|
6782
6812
|
const kind = blockKindOf(call);
|
|
6783
|
-
const arrive = (row) => /* @__PURE__ */
|
|
6813
|
+
const arrive = (row) => /* @__PURE__ */ jsx19("div", { className: "agent-arrive", style: arrival, children: row });
|
|
6784
6814
|
if (pending) {
|
|
6785
6815
|
return arrive(
|
|
6786
|
-
/* @__PURE__ */
|
|
6816
|
+
/* @__PURE__ */ jsx19(
|
|
6787
6817
|
ProposalCard,
|
|
6788
6818
|
{
|
|
6789
6819
|
call,
|
|
@@ -6796,18 +6826,18 @@ function ToolCallCard({
|
|
|
6796
6826
|
);
|
|
6797
6827
|
}
|
|
6798
6828
|
if (kind === "followup") {
|
|
6799
|
-
return arrive(/* @__PURE__ */
|
|
6829
|
+
return arrive(/* @__PURE__ */ jsx19(FollowupCard, { call }));
|
|
6800
6830
|
}
|
|
6801
6831
|
const custom = renderers?.[call.name]?.(call, message);
|
|
6802
6832
|
return arrive(
|
|
6803
|
-
/* @__PURE__ */
|
|
6833
|
+
/* @__PURE__ */ jsx19(
|
|
6804
6834
|
InlineToolItem,
|
|
6805
6835
|
{
|
|
6806
6836
|
part: chatToolCallPart(call),
|
|
6807
6837
|
title: toolRowTitle(call),
|
|
6808
6838
|
description: toolRowDescription(call),
|
|
6809
|
-
renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */
|
|
6810
|
-
actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */
|
|
6839
|
+
renderToolDetail: () => custom ?? (call.name === "sandbox_run_command" ? /* @__PURE__ */ jsx19(ShellDetail, { call }) : /* @__PURE__ */ jsx19(DefaultToolDetail, { call })),
|
|
6840
|
+
actions: onOpenRun && call.name.startsWith("sandbox_") ? /* @__PURE__ */ jsx19(
|
|
6811
6841
|
"button",
|
|
6812
6842
|
{
|
|
6813
6843
|
type: "button",
|
|
@@ -6815,9 +6845,9 @@ function ToolCallCard({
|
|
|
6815
6845
|
"aria-label": "Open full transcript",
|
|
6816
6846
|
title: "Open full transcript",
|
|
6817
6847
|
className: "rounded-md p-1.5 text-muted-foreground transition hover:bg-accent hover:text-foreground",
|
|
6818
|
-
children: /* @__PURE__ */
|
|
6819
|
-
/* @__PURE__ */
|
|
6820
|
-
/* @__PURE__ */
|
|
6848
|
+
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__ */ jsx19("path", { d: "M7 17 17 7" }),
|
|
6850
|
+
/* @__PURE__ */ jsx19("path", { d: "M7 7h10v10" })
|
|
6821
6851
|
] })
|
|
6822
6852
|
}
|
|
6823
6853
|
) : void 0
|
|
@@ -6826,7 +6856,7 @@ function ToolCallCard({
|
|
|
6826
6856
|
);
|
|
6827
6857
|
}
|
|
6828
6858
|
function StreamingCaret() {
|
|
6829
|
-
return /* @__PURE__ */
|
|
6859
|
+
return /* @__PURE__ */ jsx19(
|
|
6830
6860
|
"span",
|
|
6831
6861
|
{
|
|
6832
6862
|
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",
|
|
@@ -6851,9 +6881,9 @@ function SegmentText({
|
|
|
6851
6881
|
// the container on top of that makes the paragraph shimmer while it types.
|
|
6852
6882
|
// The distinction is what separates "the answer materialised" from "the
|
|
6853
6883
|
// log was appended to".
|
|
6854
|
-
/* @__PURE__ */
|
|
6884
|
+
/* @__PURE__ */ jsxs17("div", { className: `${messageClassName}${streaming ? "" : " agent-stream-in"}`, children: [
|
|
6855
6885
|
body,
|
|
6856
|
-
showCaret && /* @__PURE__ */
|
|
6886
|
+
showCaret && /* @__PURE__ */ jsx19(StreamingCaret, {})
|
|
6857
6887
|
] })
|
|
6858
6888
|
);
|
|
6859
6889
|
}
|
|
@@ -6878,7 +6908,7 @@ function SegmentedBody({
|
|
|
6878
6908
|
const leftoverToolCalls = (msg.toolCalls ?? []).filter(
|
|
6879
6909
|
(tc) => !segmentToolIds.has(tc.id)
|
|
6880
6910
|
);
|
|
6881
|
-
const renderToolCard = (call, index) => /* @__PURE__ */
|
|
6911
|
+
const renderToolCard = (call, index) => /* @__PURE__ */ jsx19(
|
|
6882
6912
|
ToolCallCard,
|
|
6883
6913
|
{
|
|
6884
6914
|
call,
|
|
@@ -6906,7 +6936,7 @@ function SegmentedBody({
|
|
|
6906
6936
|
for (const g of groups) {
|
|
6907
6937
|
if (g.kind === "text") {
|
|
6908
6938
|
children.push(
|
|
6909
|
-
/* @__PURE__ */
|
|
6939
|
+
/* @__PURE__ */ jsx19(
|
|
6910
6940
|
SegmentText,
|
|
6911
6941
|
{
|
|
6912
6942
|
content: g.content,
|
|
@@ -6922,13 +6952,13 @@ function SegmentedBody({
|
|
|
6922
6952
|
}
|
|
6923
6953
|
if (!streaming && g.calls.length >= COLLAPSE_TOOL_RUN_AT && !g.calls.some(isImportantTool)) {
|
|
6924
6954
|
children.push(
|
|
6925
|
-
/* @__PURE__ */
|
|
6926
|
-
/* @__PURE__ */
|
|
6955
|
+
/* @__PURE__ */ jsxs17("details", { children: [
|
|
6956
|
+
/* @__PURE__ */ jsxs17("summary", { className: "cursor-pointer select-none rounded-md py-0.5 text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground", children: [
|
|
6927
6957
|
"Worked through ",
|
|
6928
6958
|
g.calls.length,
|
|
6929
6959
|
" steps"
|
|
6930
6960
|
] }),
|
|
6931
|
-
/* @__PURE__ */
|
|
6961
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-1.5 flex flex-col gap-1.5", children: g.calls.map(renderToolCard) })
|
|
6932
6962
|
] }, `tools-fold-${g.index}`)
|
|
6933
6963
|
);
|
|
6934
6964
|
continue;
|
|
@@ -6937,9 +6967,9 @@ function SegmentedBody({
|
|
|
6937
6967
|
}
|
|
6938
6968
|
leftoverToolCalls.forEach((call, index) => children.push(renderToolCard(call, index)));
|
|
6939
6969
|
if (streaming && segments[lastIndex]?.kind === "tool") {
|
|
6940
|
-
children.push(/* @__PURE__ */
|
|
6970
|
+
children.push(/* @__PURE__ */ jsx19(StreamingCaret, {}, "streaming-caret"));
|
|
6941
6971
|
}
|
|
6942
|
-
return /* @__PURE__ */
|
|
6972
|
+
return /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-2", children });
|
|
6943
6973
|
}
|
|
6944
6974
|
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";
|
|
6945
6975
|
function copyTextOf(msg) {
|
|
@@ -6969,7 +6999,7 @@ function CopyMessageButton({ text }) {
|
|
|
6969
6999
|
}
|
|
6970
7000
|
);
|
|
6971
7001
|
};
|
|
6972
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ jsx19(
|
|
6973
7003
|
"button",
|
|
6974
7004
|
{
|
|
6975
7005
|
type: "button",
|
|
@@ -6977,9 +7007,9 @@ function CopyMessageButton({ text }) {
|
|
|
6977
7007
|
"aria-label": "Copy message",
|
|
6978
7008
|
title: "Copy message",
|
|
6979
7009
|
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",
|
|
6980
|
-
children: copied ? /* @__PURE__ */
|
|
6981
|
-
/* @__PURE__ */
|
|
6982
|
-
/* @__PURE__ */
|
|
7010
|
+
children: copied ? /* @__PURE__ */ jsx19("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__ */ jsx19("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: [
|
|
7011
|
+
/* @__PURE__ */ jsx19("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
7012
|
+
/* @__PURE__ */ jsx19("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
6983
7013
|
] })
|
|
6984
7014
|
}
|
|
6985
7015
|
);
|
|
@@ -7024,12 +7054,12 @@ function AssistantMessageImpl({
|
|
|
7024
7054
|
const [reasoningToggled, setReasoningToggled] = useState18(null);
|
|
7025
7055
|
const reasoningOpen = reasoningToggled ?? !hasAnswerText;
|
|
7026
7056
|
const quiet = chrome === "quiet";
|
|
7027
|
-
return /* @__PURE__ */
|
|
7028
|
-
!quiet && /* @__PURE__ */
|
|
7029
|
-
/* @__PURE__ */
|
|
7030
|
-
msg.modelUsed && /* @__PURE__ */
|
|
7031
|
-
formatTokensPerSecond(msg) && /* @__PURE__ */
|
|
7032
|
-
formatModelCost(msg, models) && /* @__PURE__ */
|
|
7057
|
+
return /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
|
|
7058
|
+
!quiet && /* @__PURE__ */ jsxs17("div", { className: "mb-1 flex items-baseline gap-2 text-xs tabular-nums text-muted-foreground", children: [
|
|
7059
|
+
/* @__PURE__ */ jsx19("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
|
|
7060
|
+
msg.modelUsed && /* @__PURE__ */ jsx19("span", { className: "font-mono normal-case", children: msg.modelUsed }),
|
|
7061
|
+
formatTokensPerSecond(msg) && /* @__PURE__ */ jsx19("span", { children: formatTokensPerSecond(msg) }),
|
|
7062
|
+
formatModelCost(msg, models) && /* @__PURE__ */ jsx19("span", { children: formatModelCost(msg, models) })
|
|
7033
7063
|
] }),
|
|
7034
7064
|
reasoning && // The canonical run-row grammar (RunRowShell — the same shell the tool
|
|
7035
7065
|
// rows compose): one family of rows instead of a bespoke disclosure per
|
|
@@ -7039,12 +7069,12 @@ function AssistantMessageImpl({
|
|
|
7039
7069
|
// and a click outranks the default from then on — the contract the old
|
|
7040
7070
|
// hand-rolled disclosure had, now enforced through the shell's
|
|
7041
7071
|
// controlled `open`.
|
|
7042
|
-
/* @__PURE__ */
|
|
7072
|
+
/* @__PURE__ */ jsx19(
|
|
7043
7073
|
RunRowShell,
|
|
7044
7074
|
{
|
|
7045
7075
|
className: "mb-2",
|
|
7046
|
-
icon: /* @__PURE__ */
|
|
7047
|
-
title: !hasAnswerText ? /* @__PURE__ */
|
|
7076
|
+
icon: /* @__PURE__ */ jsx19(BrainGlyph, { className: "h-3.5 w-3.5" }),
|
|
7077
|
+
title: !hasAnswerText ? /* @__PURE__ */ jsxs17("span", { className: "agent-shimmer", "data-motion": "essential", children: [
|
|
7048
7078
|
"Thinking",
|
|
7049
7079
|
thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
|
|
7050
7080
|
] }) : thinkMsRef.current != null ? (
|
|
@@ -7059,7 +7089,7 @@ function AssistantMessageImpl({
|
|
|
7059
7089
|
status: hasAnswerText ? "idle" : "running",
|
|
7060
7090
|
open: reasoningOpen,
|
|
7061
7091
|
onOpenChange: (next) => setReasoningToggled(next),
|
|
7062
|
-
children: /* @__PURE__ */
|
|
7092
|
+
children: /* @__PURE__ */ jsx19(
|
|
7063
7093
|
"div",
|
|
7064
7094
|
{
|
|
7065
7095
|
ref: reasoningScrollRef,
|
|
@@ -7069,7 +7099,7 @@ function AssistantMessageImpl({
|
|
|
7069
7099
|
)
|
|
7070
7100
|
}
|
|
7071
7101
|
),
|
|
7072
|
-
segments && segments.length > 0 ? /* @__PURE__ */
|
|
7102
|
+
segments && segments.length > 0 ? /* @__PURE__ */ jsx19(
|
|
7073
7103
|
SegmentedBody,
|
|
7074
7104
|
{
|
|
7075
7105
|
segments,
|
|
@@ -7081,12 +7111,12 @@ function AssistantMessageImpl({
|
|
|
7081
7111
|
toolRenderers,
|
|
7082
7112
|
messageClassName
|
|
7083
7113
|
}
|
|
7084
|
-
) : /* @__PURE__ */
|
|
7085
|
-
/* @__PURE__ */
|
|
7114
|
+
) : /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
7115
|
+
/* @__PURE__ */ jsxs17("div", { className: messageClassName, children: [
|
|
7086
7116
|
body,
|
|
7087
|
-
streaming && content && !msg.toolCalls?.length && /* @__PURE__ */
|
|
7117
|
+
streaming && content && !msg.toolCalls?.length && /* @__PURE__ */ jsx19(StreamingCaret, {})
|
|
7088
7118
|
] }),
|
|
7089
|
-
msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */
|
|
7119
|
+
msg.toolCalls && msg.toolCalls.length > 0 && /* @__PURE__ */ jsx19("div", { className: "mt-2 flex flex-col gap-1.5", children: msg.toolCalls.map((tc, index) => /* @__PURE__ */ jsx19(
|
|
7090
7120
|
ToolCallCard,
|
|
7091
7121
|
{
|
|
7092
7122
|
call: tc,
|
|
@@ -7099,7 +7129,7 @@ function AssistantMessageImpl({
|
|
|
7099
7129
|
tc.id
|
|
7100
7130
|
)) })
|
|
7101
7131
|
] }),
|
|
7102
|
-
durableCards && msg.parts && /* @__PURE__ */
|
|
7132
|
+
durableCards && msg.parts && /* @__PURE__ */ jsx19(
|
|
7103
7133
|
DurableChatCards,
|
|
7104
7134
|
{
|
|
7105
7135
|
...durableCards,
|
|
@@ -7108,7 +7138,7 @@ function AssistantMessageImpl({
|
|
|
7108
7138
|
className: "mt-3"
|
|
7109
7139
|
}
|
|
7110
7140
|
),
|
|
7111
|
-
workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */
|
|
7141
|
+
workProductCards && workProductPartsFromMessageParts(msg.parts).map((part) => /* @__PURE__ */ jsx19(
|
|
7112
7142
|
WorkProductCard,
|
|
7113
7143
|
{
|
|
7114
7144
|
part,
|
|
@@ -7118,7 +7148,7 @@ function AssistantMessageImpl({
|
|
|
7118
7148
|
`${part.ref.id}:${part.ref.version}`
|
|
7119
7149
|
)),
|
|
7120
7150
|
renderExtras?.(msg),
|
|
7121
|
-
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */
|
|
7151
|
+
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx19("div", { className: "mt-2", children: /* @__PURE__ */ jsx19(
|
|
7122
7152
|
MessageAttachments,
|
|
7123
7153
|
{
|
|
7124
7154
|
parts: attachmentPartsFromMessageParts(msg.parts),
|
|
@@ -7126,11 +7156,11 @@ function AssistantMessageImpl({
|
|
|
7126
7156
|
justify: "start"
|
|
7127
7157
|
}
|
|
7128
7158
|
) }),
|
|
7129
|
-
quiet && /* @__PURE__ */
|
|
7130
|
-
/* @__PURE__ */
|
|
7131
|
-
msg.modelUsed && /* @__PURE__ */
|
|
7132
|
-
formatTokensPerSecond(msg) && /* @__PURE__ */
|
|
7133
|
-
formatModelCost(msg, models) && /* @__PURE__ */
|
|
7159
|
+
quiet && /* @__PURE__ */ jsxs17("div", { "data-testid": "message-meta-lane", className: QUIET_META_LANE_CLASS, children: [
|
|
7160
|
+
/* @__PURE__ */ jsx19(CopyMessageButton, { text: copyTextOf(msg) }),
|
|
7161
|
+
msg.modelUsed && /* @__PURE__ */ jsx19("span", { className: "font-mono", children: msg.modelUsed }),
|
|
7162
|
+
formatTokensPerSecond(msg) && /* @__PURE__ */ jsx19("span", { children: formatTokensPerSecond(msg) }),
|
|
7163
|
+
formatModelCost(msg, models) && /* @__PURE__ */ jsx19("span", { children: formatModelCost(msg, models) })
|
|
7134
7164
|
] })
|
|
7135
7165
|
] });
|
|
7136
7166
|
}
|
|
@@ -7147,23 +7177,23 @@ function useThinkingSeconds(active) {
|
|
|
7147
7177
|
}
|
|
7148
7178
|
function ThinkingRow({ agentLabel, chrome = "labeled" }) {
|
|
7149
7179
|
const seconds = useThinkingSeconds(true);
|
|
7150
|
-
return /* @__PURE__ */
|
|
7151
|
-
chrome !== "quiet" && /* @__PURE__ */
|
|
7152
|
-
/* @__PURE__ */
|
|
7153
|
-
/* @__PURE__ */
|
|
7180
|
+
return /* @__PURE__ */ jsxs17("div", { className: "mx-auto w-full max-w-3xl px-6 py-3", children: [
|
|
7181
|
+
chrome !== "quiet" && /* @__PURE__ */ jsx19("p", { className: "mb-1 text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: agentLabel }),
|
|
7182
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-[15px] text-muted-foreground", children: [
|
|
7183
|
+
/* @__PURE__ */ jsx19("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx19("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }) }),
|
|
7154
7184
|
"Thinking",
|
|
7155
7185
|
seconds >= 3 ? ` \xB7 ${seconds}s` : "..."
|
|
7156
7186
|
] })
|
|
7157
7187
|
] });
|
|
7158
7188
|
}
|
|
7159
7189
|
function StreamErrorRow({ message, onRetry }) {
|
|
7160
|
-
return /* @__PURE__ */
|
|
7161
|
-
/* @__PURE__ */
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7190
|
+
return /* @__PURE__ */ jsx19("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
|
+
/* @__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__ */ jsx19("circle", { cx: "12", cy: "12", r: "9" }),
|
|
7193
|
+
/* @__PURE__ */ jsx19("path", { d: "M12 8v4m0 4h.01" })
|
|
7164
7194
|
] }),
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
onRetry && /* @__PURE__ */
|
|
7195
|
+
/* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 break-words", children: message }),
|
|
7196
|
+
onRetry && /* @__PURE__ */ jsx19(
|
|
7167
7197
|
"button",
|
|
7168
7198
|
{
|
|
7169
7199
|
type: "button",
|
|
@@ -7199,32 +7229,32 @@ function ChatMessages({
|
|
|
7199
7229
|
const messageClassName = messageSize === "large" ? "agent-app-message-copy text-[17px] leading-[1.6]" : "agent-app-message-copy text-base leading-[1.6]";
|
|
7200
7230
|
const assistantMessageClassName = `${messageClassName} bg-transparent text-[hsl(var(--foreground))]`;
|
|
7201
7231
|
const renderBody = useMemo7(
|
|
7202
|
-
() => renderMarkdown ?? ((content) => /* @__PURE__ */
|
|
7232
|
+
() => renderMarkdown ?? ((content) => /* @__PURE__ */ jsx19("p", { className: "whitespace-pre-wrap", children: content })),
|
|
7203
7233
|
[renderMarkdown]
|
|
7204
7234
|
);
|
|
7205
7235
|
const lastIsUser = messages[messages.length - 1]?.role === "user";
|
|
7206
7236
|
const quiet = chrome === "quiet";
|
|
7207
7237
|
if (messages.length === 0 && !loading && !error) {
|
|
7208
|
-
const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */
|
|
7209
|
-
return /* @__PURE__ */
|
|
7238
|
+
const empty = renderEmpty ? renderEmpty() : /* @__PURE__ */ jsx19(ChatEmptyState, { ...emptyState });
|
|
7239
|
+
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
7210
7240
|
header,
|
|
7211
7241
|
empty
|
|
7212
7242
|
] });
|
|
7213
7243
|
}
|
|
7214
|
-
return /* @__PURE__ */
|
|
7244
|
+
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
|
7215
7245
|
header,
|
|
7216
7246
|
messages.map(
|
|
7217
|
-
(msg) => msg.role === "user" ? /* @__PURE__ */
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
!quiet && /* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7247
|
+
(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
|
+
/* @__PURE__ */ jsxs17("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
|
|
7249
|
+
!quiet && /* @__PURE__ */ jsx19("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
|
|
7250
|
+
/* @__PURE__ */ jsx19(
|
|
7221
7251
|
"div",
|
|
7222
7252
|
{
|
|
7223
7253
|
className: `rounded-2xl bg-[hsl(var(--foreground))] px-4 py-2.5 text-[hsl(var(--background))] ${quiet ? "" : "rounded-tr-md "}${messageClassName}`,
|
|
7224
|
-
children: /* @__PURE__ */
|
|
7254
|
+
children: /* @__PURE__ */ jsx19("p", { className: "whitespace-pre-wrap", children: msg.content })
|
|
7225
7255
|
}
|
|
7226
7256
|
),
|
|
7227
|
-
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */
|
|
7257
|
+
resolveAttachmentUrl && attachmentPartsFromMessageParts(msg.parts).length > 0 && /* @__PURE__ */ jsx19("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx19(
|
|
7228
7258
|
MessageAttachments,
|
|
7229
7259
|
{
|
|
7230
7260
|
parts: attachmentPartsFromMessageParts(msg.parts),
|
|
@@ -7233,8 +7263,8 @@ function ChatMessages({
|
|
|
7233
7263
|
}
|
|
7234
7264
|
) })
|
|
7235
7265
|
] }),
|
|
7236
|
-
quiet && /* @__PURE__ */
|
|
7237
|
-
] }, msg.id) : /* @__PURE__ */
|
|
7266
|
+
quiet && /* @__PURE__ */ jsx19("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-end`, children: /* @__PURE__ */ jsx19(CopyMessageButton, { text: msg.content }) })
|
|
7267
|
+
] }, msg.id) : /* @__PURE__ */ jsx19(
|
|
7238
7268
|
AssistantMessage,
|
|
7239
7269
|
{
|
|
7240
7270
|
msg,
|
|
@@ -7255,8 +7285,8 @@ function ChatMessages({
|
|
|
7255
7285
|
msg.id
|
|
7256
7286
|
)
|
|
7257
7287
|
),
|
|
7258
|
-
loading && lastIsUser && /* @__PURE__ */
|
|
7259
|
-
error && !loading && /* @__PURE__ */
|
|
7288
|
+
loading && lastIsUser && /* @__PURE__ */ jsx19(ThinkingRow, { agentLabel, chrome }),
|
|
7289
|
+
error && !loading && /* @__PURE__ */ jsx19(StreamErrorRow, { message: error, onRetry })
|
|
7260
7290
|
] });
|
|
7261
7291
|
}
|
|
7262
7292
|
|
|
@@ -7386,6 +7416,7 @@ export {
|
|
|
7386
7416
|
insightPageSlice,
|
|
7387
7417
|
InsightDeck,
|
|
7388
7418
|
ApiAccessPanel,
|
|
7419
|
+
AgentProfileChoices,
|
|
7389
7420
|
formatModelCost,
|
|
7390
7421
|
formatTokensPerSecond,
|
|
7391
7422
|
RunDrillIn,
|
|
@@ -7395,4 +7426,4 @@ export {
|
|
|
7395
7426
|
useThinkingSeconds,
|
|
7396
7427
|
ChatMessages
|
|
7397
7428
|
};
|
|
7398
|
-
//# sourceMappingURL=chunk-
|
|
7429
|
+
//# sourceMappingURL=chunk-BINC6OWR.js.map
|