@tangle-network/agent-app 0.45.23 → 0.45.25
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/{DesignCanvas-ZG7DJS7C.js → DesignCanvas-3RRPVPCP.js} +2 -2
- package/dist/{DesignCanvasEditor-SLFMHOII.js → DesignCanvasEditor-KAMMEX7E.js} +4 -4
- package/dist/{TimelineEditor-6PV42FLG.js → TimelineEditor-IIBVCAZV.js} +2 -2
- package/dist/VaultPane-MUWGYVJ7.js +7 -0
- package/dist/assistant/index.d.ts +11 -0
- package/dist/assistant/index.js +89 -56
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +4 -1
- package/dist/chat-react/index.js.map +1 -1
- package/dist/chat-routes/index.d.ts +57 -6
- package/dist/chat-routes/index.js +225 -17
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/{chunk-MLACJ6DB.js → chunk-7O4FZAFP.js} +10 -10
- package/dist/chunk-7O4FZAFP.js.map +1 -0
- package/dist/{chunk-OASVAPRL.js → chunk-AWPK7ZDS.js} +3 -3
- package/dist/{chunk-YTMKRL3L.js → chunk-HZ4WCA37.js} +3 -2
- package/dist/chunk-HZ4WCA37.js.map +1 -0
- package/dist/{chunk-FVJP2RTC.js → chunk-JJJEO4ND.js} +91 -36
- package/dist/chunk-JJJEO4ND.js.map +1 -0
- package/dist/{chunk-7PFFFRVU.js → chunk-KOMP6NDW.js} +172 -43
- package/dist/chunk-KOMP6NDW.js.map +1 -0
- package/dist/{chunk-TZO3SOUL.js → chunk-LSQR6HM6.js} +49 -33
- package/dist/chunk-LSQR6HM6.js.map +1 -0
- package/dist/{chunk-3IHYJIDJ.js → chunk-NC2V63EL.js} +15 -15
- package/dist/chunk-NC2V63EL.js.map +1 -0
- package/dist/{chunk-73CQJOIU.js → chunk-OYGM5WLD.js} +5 -5
- package/dist/chunk-OYGM5WLD.js.map +1 -0
- package/dist/chunk-YIQHOAHN.js +340 -0
- package/dist/chunk-YIQHOAHN.js.map +1 -0
- package/dist/design-canvas-react/index.d.ts +2 -2
- package/dist/design-canvas-react/index.js +9 -9
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/sequences-react/index.js +2 -2
- package/dist/theme/index.d.ts +27 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tailwind-preset.d.ts +25 -0
- package/dist/theme/tailwind-preset.js +55 -1
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme/tokens.css +298 -40
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/async/index.js +19 -307
- package/dist/web-react/async/index.js.map +1 -1
- package/dist/web-react/index.d.ts +73 -6
- package/dist/web-react/index.js +2 -2
- package/dist/work-product-react/index.js +1 -1
- package/package.json +1 -1
- package/dist/VaultPane-HFH734K6.js +0 -7
- package/dist/chunk-3IHYJIDJ.js.map +0 -1
- package/dist/chunk-73CQJOIU.js.map +0 -1
- package/dist/chunk-7PFFFRVU.js.map +0 -1
- package/dist/chunk-FVJP2RTC.js.map +0 -1
- package/dist/chunk-MLACJ6DB.js.map +0 -1
- package/dist/chunk-TZO3SOUL.js.map +0 -1
- package/dist/chunk-YTMKRL3L.js.map +0 -1
- /package/dist/{DesignCanvas-ZG7DJS7C.js.map → DesignCanvas-3RRPVPCP.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-SLFMHOII.js.map → DesignCanvasEditor-KAMMEX7E.js.map} +0 -0
- /package/dist/{TimelineEditor-6PV42FLG.js.map → TimelineEditor-IIBVCAZV.js.map} +0 -0
- /package/dist/{VaultPane-HFH734K6.js.map → VaultPane-MUWGYVJ7.js.map} +0 -0
- /package/dist/{chunk-OASVAPRL.js.map → chunk-AWPK7ZDS.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
WorkProductCard,
|
|
11
11
|
workProductPartsFromMessageParts
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HZ4WCA37.js";
|
|
13
13
|
import {
|
|
14
14
|
attachmentPartsFromMessageParts
|
|
15
15
|
} from "./chunk-B2UEW62O.js";
|
|
@@ -166,7 +166,7 @@ function usePopover(open, setOpen) {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
var POPOVER_OPTION_FOCUS = "focus
|
|
169
|
+
var POPOVER_OPTION_FOCUS = "focus-visible:[outline-offset:-2px]";
|
|
170
170
|
function usePending() {
|
|
171
171
|
const [pending, setPending] = useState2(false);
|
|
172
172
|
const inFlight = useRef2(false);
|
|
@@ -278,7 +278,7 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
278
278
|
type: "button",
|
|
279
279
|
...triggerProps,
|
|
280
280
|
onClick: () => setOpen(!open),
|
|
281
|
-
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30
|
|
281
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30",
|
|
282
282
|
children: [
|
|
283
283
|
selected ? renderProviderBadge ? renderProviderBadge(selected.provider) : /* @__PURE__ */ jsx2(ProviderLogo, { provider: selected.provider, size: 16 }) : /* @__PURE__ */ jsx2(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
284
284
|
/* @__PURE__ */ jsx2("span", { className: "max-w-[160px] truncate", children: selected?.name ?? value }),
|
|
@@ -297,7 +297,7 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
297
297
|
value: query,
|
|
298
298
|
onChange: (e) => setQuery(e.target.value),
|
|
299
299
|
placeholder: "Search models...",
|
|
300
|
-
className: "flex-1 bg-transparent text-sm
|
|
300
|
+
className: "flex-1 bg-transparent text-sm placeholder:text-muted-foreground"
|
|
301
301
|
}
|
|
302
302
|
)
|
|
303
303
|
] }) }),
|
|
@@ -343,7 +343,7 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
|
|
|
343
343
|
...triggerProps,
|
|
344
344
|
onClick: () => setOpen(!open),
|
|
345
345
|
title: label ? `${label} \u2014 how hard the agent reasons before answering` : "Reasoning effort",
|
|
346
|
-
className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30
|
|
346
|
+
className: "inline-flex min-h-[36px] items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent/30",
|
|
347
347
|
children: [
|
|
348
348
|
/* @__PURE__ */ jsx2(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
349
349
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
@@ -581,12 +581,12 @@ function InteractionActionButton({
|
|
|
581
581
|
type: "button",
|
|
582
582
|
onClick,
|
|
583
583
|
disabled,
|
|
584
|
-
className: `inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition disabled:cursor-not-allowed disabled:opacity-40
|
|
584
|
+
className: `inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition disabled:cursor-not-allowed disabled:opacity-40 ${variantClasses}`,
|
|
585
585
|
children
|
|
586
586
|
}
|
|
587
587
|
);
|
|
588
588
|
}
|
|
589
|
-
var FIELD_INPUT_CLASSES = "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground
|
|
589
|
+
var FIELD_INPUT_CLASSES = "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50";
|
|
590
590
|
function QuestionOptionList({
|
|
591
591
|
groupName,
|
|
592
592
|
idPrefix,
|
|
@@ -923,7 +923,7 @@ function DurablePlanCard({
|
|
|
923
923
|
{
|
|
924
924
|
type: "button",
|
|
925
925
|
onClick: () => setExpanded((value) => !value),
|
|
926
|
-
className: "mt-1 text-xs text-muted-foreground hover:text-foreground
|
|
926
|
+
className: "mt-1 text-xs text-muted-foreground hover:text-foreground",
|
|
927
927
|
children: expanded ? "Collapse plan" : "Show full plan"
|
|
928
928
|
}
|
|
929
929
|
)
|
|
@@ -939,7 +939,7 @@ function DurablePlanCard({
|
|
|
939
939
|
onChange: (event) => setFeedback(event.target.value),
|
|
940
940
|
rows: 2,
|
|
941
941
|
placeholder: "Describe what you want changed in the plan",
|
|
942
|
-
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm
|
|
942
|
+
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm focus:border-primary disabled:opacity-50"
|
|
943
943
|
}
|
|
944
944
|
)
|
|
945
945
|
] }),
|
|
@@ -1071,7 +1071,7 @@ function InteractionPlanCard({
|
|
|
1071
1071
|
{
|
|
1072
1072
|
type: "button",
|
|
1073
1073
|
onClick: () => setExpanded((prev) => !prev),
|
|
1074
|
-
className: "mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground
|
|
1074
|
+
className: "mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground transition hover:text-foreground",
|
|
1075
1075
|
children: [
|
|
1076
1076
|
/* @__PURE__ */ jsx6(ChevronDownGlyph, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` }),
|
|
1077
1077
|
expanded ? "Collapse plan" : "Show full plan"
|
|
@@ -1090,7 +1090,7 @@ function InteractionPlanCard({
|
|
|
1090
1090
|
onChange: (event) => setValues((prev) => ({ ...prev, [field.name]: { ...prev[field.name], text: event.target.value } })),
|
|
1091
1091
|
rows: 2,
|
|
1092
1092
|
placeholder: field.type === "text" ? field.placeholder ?? "Optional feedback for the agent" : void 0,
|
|
1093
|
-
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground
|
|
1093
|
+
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50"
|
|
1094
1094
|
}
|
|
1095
1095
|
) : /* @__PURE__ */ jsx6(
|
|
1096
1096
|
"input",
|
|
@@ -1100,7 +1100,7 @@ function InteractionPlanCard({
|
|
|
1100
1100
|
disabled,
|
|
1101
1101
|
"aria-label": field.label,
|
|
1102
1102
|
onChange: (event) => setValues((prev) => ({ ...prev, [field.name]: { ...prev[field.name], text: event.target.value } })),
|
|
1103
|
-
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground
|
|
1103
|
+
className: "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary disabled:opacity-50"
|
|
1104
1104
|
}
|
|
1105
1105
|
)
|
|
1106
1106
|
] }, field.name)) }),
|
|
@@ -1309,7 +1309,7 @@ function AttachmentThumbnail({ part, resolveFileUrl, fetchFile }) {
|
|
|
1309
1309
|
window.open(objectUrl, "_blank", "noopener");
|
|
1310
1310
|
}, [objectUrl]);
|
|
1311
1311
|
if (!result) {
|
|
1312
|
-
return /* @__PURE__ */ jsx8("span", { className: "inline-block h-16 w-16 shrink-0 animate-pulse rounded-md bg-muted"
|
|
1312
|
+
return /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "inline-block h-16 w-16 shrink-0 animate-pulse rounded-md bg-muted" });
|
|
1313
1313
|
}
|
|
1314
1314
|
if (!result.ok || !objectUrl) {
|
|
1315
1315
|
return /* @__PURE__ */ jsx8(AttachmentThumbnailError, { name: part.name });
|
|
@@ -1320,7 +1320,7 @@ function AttachmentThumbnail({ part, resolveFileUrl, fetchFile }) {
|
|
|
1320
1320
|
type: "button",
|
|
1321
1321
|
onClick: handleClick,
|
|
1322
1322
|
"aria-label": `Open ${part.name}`,
|
|
1323
|
-
className: "h-16 w-16 shrink-0 overflow-hidden rounded-md border border-border
|
|
1323
|
+
className: "h-16 w-16 shrink-0 overflow-hidden rounded-md border border-border",
|
|
1324
1324
|
children: /* @__PURE__ */ jsx8("img", { src: objectUrl, alt: part.name, className: "h-16 w-16 object-cover" })
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
@@ -1588,9 +1588,28 @@ function UploadGlyph({ className }) {
|
|
|
1588
1588
|
return /* @__PURE__ */ jsx9("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx9("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" }) });
|
|
1589
1589
|
}
|
|
1590
1590
|
var MAX_HEIGHT = 168;
|
|
1591
|
+
var DEFAULT_SEND_FAILURE = "Message not sent. Your draft is still here \u2014 try again.";
|
|
1592
|
+
function isRejectedOutcome(outcome) {
|
|
1593
|
+
return typeof outcome === "object" && outcome !== null && outcome.ok === false;
|
|
1594
|
+
}
|
|
1595
|
+
function isPromise(value) {
|
|
1596
|
+
return typeof value?.then === "function";
|
|
1597
|
+
}
|
|
1598
|
+
function sendFailureText(error, fallback) {
|
|
1599
|
+
if (typeof error === "object" && error !== null && "ok" in error) {
|
|
1600
|
+
const named = error.error;
|
|
1601
|
+
if (typeof named === "string" && named.trim() !== "") return named;
|
|
1602
|
+
return fallback;
|
|
1603
|
+
}
|
|
1604
|
+
if (typeof error === "string" && error.trim() !== "") return error;
|
|
1605
|
+
if (error instanceof Error && error.message.trim() !== "") return error.message;
|
|
1606
|
+
return fallback;
|
|
1607
|
+
}
|
|
1591
1608
|
function ChatComposer({
|
|
1592
1609
|
onSend,
|
|
1593
1610
|
onSendParts,
|
|
1611
|
+
onSendFailed,
|
|
1612
|
+
sendFailureMessage = DEFAULT_SEND_FAILURE,
|
|
1594
1613
|
onCancel,
|
|
1595
1614
|
isStreaming = false,
|
|
1596
1615
|
disabled = false,
|
|
@@ -1616,6 +1635,8 @@ function ChatComposer({
|
|
|
1616
1635
|
const isControlled = value !== void 0;
|
|
1617
1636
|
const [internal, setInternal] = useState7(initialValue ?? "");
|
|
1618
1637
|
const text = isControlled ? value : internal;
|
|
1638
|
+
const textRef = useRef5(text);
|
|
1639
|
+
textRef.current = text;
|
|
1619
1640
|
const textareaRef = useRef5(null);
|
|
1620
1641
|
const fileInputRef = useRef5(null);
|
|
1621
1642
|
const folderInputRef = useRef5(null);
|
|
@@ -1659,6 +1680,18 @@ function ChatComposer({
|
|
|
1659
1680
|
el.focus();
|
|
1660
1681
|
el.setSelectionRange(text.length, text.length);
|
|
1661
1682
|
}, [text]);
|
|
1683
|
+
const restoreCaretRef = useRef5(null);
|
|
1684
|
+
useEffect6(() => {
|
|
1685
|
+
const pending = restoreCaretRef.current;
|
|
1686
|
+
if (!pending || pending.text !== text) return;
|
|
1687
|
+
restoreCaretRef.current = null;
|
|
1688
|
+
const el = textareaRef.current;
|
|
1689
|
+
if (!el) return;
|
|
1690
|
+
el.focus();
|
|
1691
|
+
const start = Math.min(pending.start, text.length);
|
|
1692
|
+
const end = Math.min(pending.end, text.length);
|
|
1693
|
+
el.setSelectionRange(start, end);
|
|
1694
|
+
}, [text]);
|
|
1662
1695
|
useEffect6(() => {
|
|
1663
1696
|
if (!focusShortcut || disabled) return;
|
|
1664
1697
|
function onKeyDown(e) {
|
|
@@ -1673,20 +1706,68 @@ function ChatComposer({
|
|
|
1673
1706
|
const readyFileCount = pendingFiles.filter((f) => f.status === "ready").length;
|
|
1674
1707
|
const hasSendable = text.trim().length > 0 || readyFileCount > 0;
|
|
1675
1708
|
const canSend = hasSendable && !isStreaming && !disabled;
|
|
1709
|
+
const [failedSend, setFailedSend] = useState7(null);
|
|
1710
|
+
const failSend = useCallback2(
|
|
1711
|
+
(error, draft, trimmed, parts, caret) => {
|
|
1712
|
+
const message = sendFailureText(error, sendFailureMessage);
|
|
1713
|
+
const restored = textRef.current === "";
|
|
1714
|
+
if (restored) {
|
|
1715
|
+
const el = textareaRef.current;
|
|
1716
|
+
setText(draft);
|
|
1717
|
+
if (el && el.value === draft) {
|
|
1718
|
+
el.focus();
|
|
1719
|
+
el.setSelectionRange(Math.min(caret.start, draft.length), Math.min(caret.end, draft.length));
|
|
1720
|
+
} else {
|
|
1721
|
+
restoreCaretRef.current = { text: draft, start: caret.start, end: caret.end };
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
setFailedSend({ message, text: draft, trimmed, parts, restored });
|
|
1725
|
+
onSendFailed?.({ message, text: draft, parts, error, restored });
|
|
1726
|
+
},
|
|
1727
|
+
[onSendFailed, sendFailureMessage, setText]
|
|
1728
|
+
);
|
|
1729
|
+
const dispatchSend = useCallback2(
|
|
1730
|
+
(draft, trimmed, parts, caret) => {
|
|
1731
|
+
let outcome;
|
|
1732
|
+
try {
|
|
1733
|
+
outcome = onSendParts ? onSendParts(trimmed, parts) : onSend?.(trimmed);
|
|
1734
|
+
} catch (error) {
|
|
1735
|
+
failSend(error, draft, trimmed, parts, caret);
|
|
1736
|
+
return;
|
|
1737
|
+
}
|
|
1738
|
+
if (isPromise(outcome)) {
|
|
1739
|
+
void outcome.then(
|
|
1740
|
+
(settled) => {
|
|
1741
|
+
if (isRejectedOutcome(settled)) failSend(settled, draft, trimmed, parts, caret);
|
|
1742
|
+
},
|
|
1743
|
+
(error) => failSend(error, draft, trimmed, parts, caret)
|
|
1744
|
+
);
|
|
1745
|
+
return;
|
|
1746
|
+
}
|
|
1747
|
+
if (isRejectedOutcome(outcome)) failSend(outcome, draft, trimmed, parts, caret);
|
|
1748
|
+
},
|
|
1749
|
+
[onSend, onSendParts, failSend]
|
|
1750
|
+
);
|
|
1676
1751
|
const send = useCallback2(() => {
|
|
1677
1752
|
const trimmed = text.trim();
|
|
1678
1753
|
if (isStreaming || disabled) return;
|
|
1679
1754
|
const readyFiles = pendingFiles.filter((f) => f.status === "ready");
|
|
1680
1755
|
if (!trimmed && readyFiles.length === 0) return;
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
return;
|
|
1686
|
-
}
|
|
1687
|
-
onSend?.(trimmed);
|
|
1756
|
+
const parts = onSendParts ? readyFiles.filter((f) => f.part).map((f) => f.part) : [];
|
|
1757
|
+
const el = textareaRef.current;
|
|
1758
|
+
const caret = { start: el?.selectionStart ?? text.length, end: el?.selectionEnd ?? text.length };
|
|
1759
|
+
setFailedSend(null);
|
|
1688
1760
|
setText("");
|
|
1689
|
-
|
|
1761
|
+
textRef.current = "";
|
|
1762
|
+
dispatchSend(text, trimmed, parts, caret);
|
|
1763
|
+
}, [text, isStreaming, disabled, onSendParts, pendingFiles, setText, dispatchSend]);
|
|
1764
|
+
const retryFailedSend = useCallback2(() => {
|
|
1765
|
+
const failure = failedSend;
|
|
1766
|
+
if (!failure || isStreaming || disabled) return;
|
|
1767
|
+
setFailedSend(null);
|
|
1768
|
+
const caret = { start: failure.text.length, end: failure.text.length };
|
|
1769
|
+
dispatchSend(failure.text, failure.trimmed, failure.parts, caret);
|
|
1770
|
+
}, [failedSend, isStreaming, disabled, dispatchSend]);
|
|
1690
1771
|
const handleKeyDown = (e) => {
|
|
1691
1772
|
if (e.nativeEvent.isComposing) return;
|
|
1692
1773
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
@@ -1752,6 +1833,50 @@ function ChatComposer({
|
|
|
1752
1833
|
/* @__PURE__ */ jsx9("p", { className: "mt-0.5 text-xs text-muted-foreground", children: dropDescription })
|
|
1753
1834
|
] }) }),
|
|
1754
1835
|
showAbove && /* @__PURE__ */ jsx9("div", { className: "mb-1.5 flex flex-wrap items-center gap-1.5 px-1", children: controls }),
|
|
1836
|
+
failedSend && /* @__PURE__ */ jsxs7(
|
|
1837
|
+
"div",
|
|
1838
|
+
{
|
|
1839
|
+
role: "alert",
|
|
1840
|
+
"data-testid": "composer-send-error",
|
|
1841
|
+
className: "mb-2 rounded-xl border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",
|
|
1842
|
+
children: [
|
|
1843
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-2", children: [
|
|
1844
|
+
/* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1", children: failedSend.message }),
|
|
1845
|
+
/* @__PURE__ */ jsx9(
|
|
1846
|
+
"button",
|
|
1847
|
+
{
|
|
1848
|
+
type: "button",
|
|
1849
|
+
"aria-label": "Dismiss send error",
|
|
1850
|
+
onClick: () => setFailedSend(null),
|
|
1851
|
+
className: "shrink-0 font-medium underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
|
|
1852
|
+
children: "Dismiss"
|
|
1853
|
+
}
|
|
1854
|
+
)
|
|
1855
|
+
] }),
|
|
1856
|
+
!failedSend.restored && /* @__PURE__ */ jsxs7("div", { className: "mt-1.5", children: [
|
|
1857
|
+
/* @__PURE__ */ jsx9(
|
|
1858
|
+
"p",
|
|
1859
|
+
{
|
|
1860
|
+
"data-testid": "composer-unsent-draft",
|
|
1861
|
+
className: "max-h-20 overflow-y-auto whitespace-pre-wrap rounded-lg border border-destructive/30 bg-card px-2 py-1 text-foreground",
|
|
1862
|
+
children: failedSend.text
|
|
1863
|
+
}
|
|
1864
|
+
),
|
|
1865
|
+
/* @__PURE__ */ jsx9(
|
|
1866
|
+
"button",
|
|
1867
|
+
{
|
|
1868
|
+
type: "button",
|
|
1869
|
+
"aria-label": "Retry sending the unsent message",
|
|
1870
|
+
onClick: retryFailedSend,
|
|
1871
|
+
disabled: isStreaming || disabled,
|
|
1872
|
+
className: "mt-1.5 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
|
|
1873
|
+
children: "Retry"
|
|
1874
|
+
}
|
|
1875
|
+
)
|
|
1876
|
+
] })
|
|
1877
|
+
]
|
|
1878
|
+
}
|
|
1879
|
+
),
|
|
1755
1880
|
pendingFiles.length > 0 && /* @__PURE__ */ jsx9("div", { className: "mb-2 flex flex-wrap gap-1.5", children: [...folderChips, ...fileChips].map((f) => /* @__PURE__ */ jsxs7(
|
|
1756
1881
|
"span",
|
|
1757
1882
|
{
|
|
@@ -2499,7 +2624,7 @@ function TraceIdCopy({ traceId }) {
|
|
|
2499
2624
|
onClick: copy,
|
|
2500
2625
|
title: "Copy trace id",
|
|
2501
2626
|
"aria-label": "Copy trace id",
|
|
2502
|
-
className: "inline-flex min-w-0 items-center gap-1.5 rounded text-left font-mono text-muted-foreground transition hover:text-foreground
|
|
2627
|
+
className: "inline-flex min-w-0 items-center gap-1.5 rounded text-left font-mono text-muted-foreground transition hover:text-foreground",
|
|
2503
2628
|
children: [
|
|
2504
2629
|
/* @__PURE__ */ jsx10("span", { className: "truncate", children: traceId }),
|
|
2505
2630
|
/* @__PURE__ */ jsx10(CopyGlyph, { className: "h-3 w-3 shrink-0" }),
|
|
@@ -2686,7 +2811,8 @@ function AgentActivityPanel({ fetchActivity, renderMissionRef, title = "Agent ac
|
|
|
2686
2811
|
] }),
|
|
2687
2812
|
error && /* @__PURE__ */ jsx10("p", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: error }),
|
|
2688
2813
|
!error && rows.length === 0 && !loading && /* @__PURE__ */ jsx10("p", { className: "px-1 text-sm text-muted-foreground", children: emptyLabel }),
|
|
2689
|
-
/* @__PURE__ */ jsx10("
|
|
2814
|
+
/* @__PURE__ */ jsx10("span", { role: "status", "aria-live": "polite", "aria-busy": loading, className: "sr-only", children: loading ? "Loading activity\u2026" : "" }),
|
|
2815
|
+
/* @__PURE__ */ jsx10("div", { className: "space-y-1.5", "aria-busy": loading, children: rows.map((record) => /* @__PURE__ */ jsx10(ActivityRow, { record, renderMissionRef }, record.taskId)) }),
|
|
2690
2816
|
cursor && /* @__PURE__ */ jsx10(
|
|
2691
2817
|
"button",
|
|
2692
2818
|
{
|
|
@@ -3528,7 +3654,7 @@ function useSessionActions({
|
|
|
3528
3654
|
void submitRename();
|
|
3529
3655
|
}
|
|
3530
3656
|
},
|
|
3531
|
-
className: "mt-1.5 h-9 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground
|
|
3657
|
+
className: "mt-1.5 h-9 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground"
|
|
3532
3658
|
}
|
|
3533
3659
|
)
|
|
3534
3660
|
]
|
|
@@ -3630,11 +3756,14 @@ function formatSessionTimestamp(isoDate) {
|
|
|
3630
3756
|
return new Date(at).toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
3631
3757
|
}
|
|
3632
3758
|
function SkeletonRows() {
|
|
3633
|
-
return /* @__PURE__ */
|
|
3634
|
-
/* @__PURE__ */ jsx13("
|
|
3635
|
-
/* @__PURE__ */ jsx13("div", { className: "
|
|
3636
|
-
|
|
3637
|
-
|
|
3759
|
+
return /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
3760
|
+
/* @__PURE__ */ jsx13("span", { role: "status", "aria-live": "polite", "aria-busy": true, className: "sr-only", children: "Loading sessions\u2026" }),
|
|
3761
|
+
/* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-0.5", "aria-hidden": true, children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3 px-3 py-2.5", children: [
|
|
3762
|
+
/* @__PURE__ */ jsx13("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" }),
|
|
3763
|
+
/* @__PURE__ */ jsx13("div", { className: "h-4 w-1/2 animate-pulse rounded bg-muted" }),
|
|
3764
|
+
/* @__PURE__ */ jsx13("div", { className: "ml-auto h-3 w-12 animate-pulse rounded bg-muted" })
|
|
3765
|
+
] }, i)) })
|
|
3766
|
+
] });
|
|
3638
3767
|
}
|
|
3639
3768
|
function MessageIcon({ className }) {
|
|
3640
3769
|
return /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", className, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx13("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
@@ -3750,7 +3879,7 @@ function SessionHistoryPanel({
|
|
|
3750
3879
|
onChange: (e) => onQueryChange(e.target.value),
|
|
3751
3880
|
placeholder: "Search your sessions\u2026",
|
|
3752
3881
|
"aria-label": "Search sessions",
|
|
3753
|
-
className: "h-9 min-w-0 appearance-none rounded-md border border-border bg-card px-3 text-sm text-foreground
|
|
3882
|
+
className: "h-9 min-w-0 appearance-none rounded-md border border-border bg-card px-3 text-sm text-foreground placeholder:text-muted-foreground sm:flex-1 [&::-webkit-search-cancel-button]:appearance-none"
|
|
3754
3883
|
}
|
|
3755
3884
|
),
|
|
3756
3885
|
/* @__PURE__ */ jsxs11(
|
|
@@ -3759,7 +3888,7 @@ function SessionHistoryPanel({
|
|
|
3759
3888
|
value: sort,
|
|
3760
3889
|
onChange: (e) => onSortChange(e.target.value),
|
|
3761
3890
|
"aria-label": "Sort sessions",
|
|
3762
|
-
className: "h-9 shrink-0 appearance-none rounded-md border border-border bg-card px-2 text-sm text-foreground
|
|
3891
|
+
className: "h-9 shrink-0 appearance-none rounded-md border border-border bg-card px-2 text-sm text-foreground sm:w-[132px]",
|
|
3763
3892
|
children: [
|
|
3764
3893
|
/* @__PURE__ */ jsx13("option", { value: "newest", children: "Newest" }),
|
|
3765
3894
|
/* @__PURE__ */ jsx13("option", { value: "oldest", children: "Oldest" })
|
|
@@ -3818,7 +3947,7 @@ function SessionHistoryPanel({
|
|
|
3818
3947
|
value: ageDays,
|
|
3819
3948
|
onChange: (event) => setAgeDays(event.target.value),
|
|
3820
3949
|
"aria-invalid": ageDays.length > 0 && !validAgeDays,
|
|
3821
|
-
className: "h-8 w-20 rounded-md border border-border bg-card px-2 text-xs tabular-nums text-foreground
|
|
3950
|
+
className: "h-8 w-20 rounded-md border border-border bg-card px-2 text-xs tabular-nums text-foreground"
|
|
3822
3951
|
}
|
|
3823
3952
|
),
|
|
3824
3953
|
/* @__PURE__ */ jsx13("span", { className: "text-xs text-muted-foreground", children: "days" }),
|
|
@@ -3886,7 +4015,7 @@ function SessionHistoryPanel({
|
|
|
3886
4015
|
},
|
|
3887
4016
|
session.id
|
|
3888
4017
|
)),
|
|
3889
|
-
history.isError ? /* @__PURE__ */ jsx13(ErrorBlock, { onRetry: history.retry, message: "Couldn\u2019t load more sessions.", inline: true }) : history.hasMore ? /* @__PURE__ */ jsx13("div", { ref: sentinelRef, className: "flex items-center justify-center py-6", children: history.isLoadingMore && /* @__PURE__ */ jsx13("span", { className: "text-xs text-muted-foreground", children: "Loading\u2026" }) }) : null
|
|
4018
|
+
history.isError ? /* @__PURE__ */ jsx13(ErrorBlock, { onRetry: history.retry, message: "Couldn\u2019t load more sessions.", inline: true }) : history.hasMore ? /* @__PURE__ */ jsx13("div", { ref: sentinelRef, className: "flex items-center justify-center py-6", children: history.isLoadingMore && /* @__PURE__ */ jsx13("span", { role: "status", "aria-live": "polite", "aria-busy": true, className: "text-xs text-muted-foreground", children: "Loading\u2026" }) }) : null
|
|
3890
4019
|
] }) })
|
|
3891
4020
|
] }),
|
|
3892
4021
|
bulkTarget && /* @__PURE__ */ jsx13(
|
|
@@ -5295,7 +5424,7 @@ function GearGlyph({ className }) {
|
|
|
5295
5424
|
/* @__PURE__ */ jsx15("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
|
|
5296
5425
|
] });
|
|
5297
5426
|
}
|
|
5298
|
-
var FOCUS_RING = "
|
|
5427
|
+
var FOCUS_RING = "";
|
|
5299
5428
|
function HarnessPicker({
|
|
5300
5429
|
value,
|
|
5301
5430
|
onChange,
|
|
@@ -5492,7 +5621,7 @@ function ChatEmptyState({
|
|
|
5492
5621
|
{
|
|
5493
5622
|
type: "button",
|
|
5494
5623
|
onClick: door.onSelect,
|
|
5495
|
-
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/30
|
|
5624
|
+
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/30",
|
|
5496
5625
|
children: [
|
|
5497
5626
|
/* @__PURE__ */ jsx16("span", { className: "text-sm font-semibold text-foreground", children: door.label }),
|
|
5498
5627
|
door.description && /* @__PURE__ */ jsx16("span", { className: "mt-0.5 text-[12px] leading-snug text-muted-foreground", children: door.description })
|
|
@@ -5643,7 +5772,7 @@ function ProposalCard({
|
|
|
5643
5772
|
/* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2.5 px-4 pt-3.5", children: [
|
|
5644
5773
|
/* @__PURE__ */ jsx16("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__ */ jsx16(ToolGlyph, { name: call.name, className: "h-3.5 w-3.5" }) }),
|
|
5645
5774
|
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
5646
|
-
/* @__PURE__ */ jsx16("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-warning-
|
|
5775
|
+
/* @__PURE__ */ jsx16("p", { className: "text-[10px] font-semibold uppercase tracking-wider text-warning-strong", children: "Needs your approval" }),
|
|
5647
5776
|
/* @__PURE__ */ jsx16("p", { className: "mt-0.5 text-[15px] font-semibold leading-snug text-foreground", children: friendlyToolTitle(call) }),
|
|
5648
5777
|
summary && /* @__PURE__ */ jsx16("p", { className: "mt-1 text-[13px] leading-relaxed text-muted-foreground", children: summary }),
|
|
5649
5778
|
meta.length > 0 && /* @__PURE__ */ jsx16("div", { className: "mt-1.5 flex flex-wrap items-center gap-1.5", children: meta.map((m, i) => /* @__PURE__ */ jsx16("span", { className: "rounded-full bg-muted/60 px-2 py-0.5 text-[11px] font-medium text-muted-foreground", children: m }, i)) })
|
|
@@ -5657,7 +5786,7 @@ function ProposalCard({
|
|
|
5657
5786
|
type: "button",
|
|
5658
5787
|
disabled: deciding,
|
|
5659
5788
|
onClick: () => decide(() => approval.onApprove(pending.proposalId, call.id)),
|
|
5660
|
-
className: "inline-flex min-h-[40px] flex-1 items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition hover:bg-primary/90
|
|
5789
|
+
className: "inline-flex min-h-[40px] flex-1 items-center justify-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-60 sm:flex-none sm:min-w-[160px]",
|
|
5661
5790
|
children: "Approve & run"
|
|
5662
5791
|
}
|
|
5663
5792
|
),
|
|
@@ -5667,7 +5796,7 @@ function ProposalCard({
|
|
|
5667
5796
|
type: "button",
|
|
5668
5797
|
disabled: deciding,
|
|
5669
5798
|
onClick: () => decide(() => approval.onReject(pending.proposalId, call.id)),
|
|
5670
|
-
className: "inline-flex min-h-[40px] items-center justify-center rounded-lg border border-border bg-transparent px-4 py-2 text-sm font-medium text-muted-foreground transition hover:bg-accent/30 hover:text-foreground
|
|
5799
|
+
className: "inline-flex min-h-[40px] items-center justify-center rounded-lg border border-border bg-transparent px-4 py-2 text-sm font-medium text-muted-foreground transition hover:bg-accent/30 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",
|
|
5671
5800
|
children: "Reject"
|
|
5672
5801
|
}
|
|
5673
5802
|
)
|
|
@@ -5678,7 +5807,7 @@ function ProposalCard({
|
|
|
5678
5807
|
type: "button",
|
|
5679
5808
|
onClick: () => setExpanded((v) => !v),
|
|
5680
5809
|
"aria-expanded": expanded,
|
|
5681
|
-
className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground
|
|
5810
|
+
className: "ml-auto inline-flex items-center gap-1 rounded text-[12px] font-medium text-muted-foreground transition hover:text-foreground",
|
|
5682
5811
|
children: [
|
|
5683
5812
|
expanded ? "Hide details" : "View details",
|
|
5684
5813
|
/* @__PURE__ */ jsx16(ChevronDown, { className: `h-3 w-3 transition-transform ${expanded ? "rotate-180" : ""}` })
|
|
@@ -5740,7 +5869,7 @@ function ToolCallCard({
|
|
|
5740
5869
|
type: "button",
|
|
5741
5870
|
onClick: () => setExpanded((v) => !v),
|
|
5742
5871
|
"aria-expanded": expanded,
|
|
5743
|
-
className: "flex min-w-0 flex-1 items-center gap-2 rounded text-left
|
|
5872
|
+
className: "flex min-w-0 flex-1 items-center gap-2 rounded text-left",
|
|
5744
5873
|
children: [
|
|
5745
5874
|
/* @__PURE__ */ jsx16(
|
|
5746
5875
|
"span",
|
|
@@ -5767,7 +5896,7 @@ function ToolCallCard({
|
|
|
5767
5896
|
onClick: () => setExpanded((v) => !v),
|
|
5768
5897
|
"aria-label": expanded ? "Collapse details" : "Expand details",
|
|
5769
5898
|
"aria-expanded": expanded,
|
|
5770
|
-
className: "shrink-0 rounded p-0.5
|
|
5899
|
+
className: "shrink-0 rounded p-0.5",
|
|
5771
5900
|
children: /* @__PURE__ */ jsx16(ChevronDown, { className: `h-3 w-3 text-muted-foreground transition-transform ${expanded ? "rotate-180" : ""}` })
|
|
5772
5901
|
}
|
|
5773
5902
|
)
|
|
@@ -6235,4 +6364,4 @@ export {
|
|
|
6235
6364
|
useThinkingSeconds,
|
|
6236
6365
|
ChatMessages
|
|
6237
6366
|
};
|
|
6238
|
-
//# sourceMappingURL=chunk-
|
|
6367
|
+
//# sourceMappingURL=chunk-KOMP6NDW.js.map
|