@tangle-network/agent-app 3.0.11 → 3.0.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/assistant/index.js +7 -7
- package/dist/chat-react/index.js +4 -4
- package/dist/{chunk-OPRMWCZN.js → chunk-ENK2VT7O.js} +50 -60
- package/dist/{chunk-OPRMWCZN.js.map → chunk-ENK2VT7O.js.map} +1 -1
- package/dist/{chunk-7OECXAOV.js → chunk-KIU3X2UF.js} +3 -3
- package/dist/{chunk-VXBJ6DH6.js → chunk-KV63GEO7.js} +4 -4
- package/dist/{chunk-4FQPTWUJ.js → chunk-OJKMW2CB.js} +3 -3
- package/dist/{chunk-KNRXBBGV.js → chunk-S2UGXHHZ.js} +74 -72
- package/dist/chunk-S2UGXHHZ.js.map +1 -0
- package/dist/{chunk-43FJ5YNL.js → chunk-TKEC2UL4.js} +2 -2
- package/dist/{chunk-MRU4I4LH.js → chunk-W6NLRGZT.js} +3 -3
- package/dist/{mention-editor-Y7D4GZHT.js → mention-editor-BGUVPI75.js} +2 -2
- package/dist/settings-react/index.js +1 -1
- package/dist/studio-react/index.js +1 -1
- package/dist/web-react/agent-profile-editor.js +4 -4
- package/dist/web-react/agent-session-controls.d.ts +33 -14
- package/dist/web-react/controls.d.ts +1 -1
- package/dist/web-react/index.d.ts +2 -2
- package/dist/web-react/index.js +11 -7
- package/dist/web-react/picker-presentation.d.ts +10 -3
- package/dist/workspace-react/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-KNRXBBGV.js.map +0 -1
- /package/dist/{chunk-7OECXAOV.js.map → chunk-KIU3X2UF.js.map} +0 -0
- /package/dist/{chunk-VXBJ6DH6.js.map → chunk-KV63GEO7.js.map} +0 -0
- /package/dist/{chunk-4FQPTWUJ.js.map → chunk-OJKMW2CB.js.map} +0 -0
- /package/dist/{chunk-43FJ5YNL.js.map → chunk-TKEC2UL4.js.map} +0 -0
- /package/dist/{chunk-MRU4I4LH.js.map → chunk-W6NLRGZT.js.map} +0 -0
- /package/dist/{mention-editor-Y7D4GZHT.js.map → mention-editor-BGUVPI75.js.map} +0 -0
package/dist/assistant/index.js
CHANGED
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
ResizeHandle,
|
|
4
4
|
chatToolCallPart,
|
|
5
5
|
resolveToolPresentation
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-W6NLRGZT.js";
|
|
7
7
|
import "../chunk-UHSUY6H6.js";
|
|
8
8
|
import "../chunk-3HUFJ5LO.js";
|
|
9
9
|
import "../chunk-7PULOECS.js";
|
|
10
10
|
import "../chunk-E4AY62T2.js";
|
|
11
11
|
import "../chunk-ELPNBEXJ.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-OJKMW2CB.js";
|
|
13
13
|
import "../chunk-Y6PRDUFJ.js";
|
|
14
14
|
import "../chunk-GEYACSFW.js";
|
|
15
15
|
import {
|
|
16
16
|
ChatComposer
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-KV63GEO7.js";
|
|
18
18
|
import "../chunk-L7MB2LLM.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-ENK2VT7O.js";
|
|
20
|
+
import "../chunk-KIU3X2UF.js";
|
|
21
21
|
import "../chunk-2HQP2CTA.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-TKEC2UL4.js";
|
|
23
23
|
import {
|
|
24
24
|
ModelPicker
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-S2UGXHHZ.js";
|
|
26
26
|
import "../chunk-ZAMHLXNS.js";
|
|
27
27
|
import "../chunk-SJWIZT7B.js";
|
|
28
28
|
import "../chunk-RASGKEAL.js";
|
package/dist/chat-react/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComposerModeControls,
|
|
3
3
|
EntryComposer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-KV63GEO7.js";
|
|
5
5
|
import "../chunk-L7MB2LLM.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-ENK2VT7O.js";
|
|
7
7
|
import "../chunk-2HQP2CTA.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TKEC2UL4.js";
|
|
9
|
+
import "../chunk-S2UGXHHZ.js";
|
|
10
10
|
import "../chunk-ZAMHLXNS.js";
|
|
11
11
|
import "../chunk-SJWIZT7B.js";
|
|
12
12
|
import "../chunk-RASGKEAL.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopoverDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TKEC2UL4.js";
|
|
4
4
|
import {
|
|
5
5
|
CheckGlyph,
|
|
6
6
|
EffortPicker,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
pickerRootClass,
|
|
13
13
|
quietPickerTriggerClass,
|
|
14
14
|
usePopover
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-S2UGXHHZ.js";
|
|
16
16
|
import {
|
|
17
17
|
isModelCompatibleWithHarness,
|
|
18
18
|
snapHarnessToModel,
|
|
@@ -280,9 +280,6 @@ var HARNESS_LABELS = {
|
|
|
280
280
|
"cli-base": ["CLI"]
|
|
281
281
|
};
|
|
282
282
|
var harnessLabel = (h) => HARNESS_LABELS[h]?.[0] ?? h;
|
|
283
|
-
function ChevronDown({ className }) {
|
|
284
|
-
return /* @__PURE__ */ jsx3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" }) });
|
|
285
|
-
}
|
|
286
283
|
function LockGlyph({ className }) {
|
|
287
284
|
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
288
285
|
/* @__PURE__ */ jsx3("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
@@ -295,16 +292,18 @@ function GearGlyph({ className }) {
|
|
|
295
292
|
/* @__PURE__ */ jsx3("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" })
|
|
296
293
|
] });
|
|
297
294
|
}
|
|
298
|
-
function
|
|
295
|
+
function ChoicePicker({
|
|
299
296
|
value,
|
|
300
297
|
onChange,
|
|
301
|
-
|
|
298
|
+
options,
|
|
299
|
+
placeholder = "",
|
|
302
300
|
fullWidth = false,
|
|
303
301
|
lockReason,
|
|
304
302
|
variant = "chip",
|
|
305
|
-
defaultOption,
|
|
306
303
|
disabled = false,
|
|
307
304
|
id,
|
|
305
|
+
title,
|
|
306
|
+
"aria-label": ariaLabel,
|
|
308
307
|
"aria-describedby": ariaDescribedBy
|
|
309
308
|
}) {
|
|
310
309
|
const [requestedOpen, setOpen] = useState2(false);
|
|
@@ -316,24 +315,24 @@ function HarnessPicker({
|
|
|
316
315
|
const reasonId = useId();
|
|
317
316
|
const locked = lockReason !== void 0;
|
|
318
317
|
const field = variant === "field";
|
|
319
|
-
const options = available ?? Object.keys(HARNESS_LABELS);
|
|
320
318
|
const showHint = () => setHintOpen(true);
|
|
321
319
|
const hideHint = () => setHintOpen(false);
|
|
322
|
-
const
|
|
323
|
-
const glyph = value ? /* @__PURE__ */ jsx3(HarnessGlyph, { harness: value, className: variant === "quiet" ? "h-4 w-4 shrink-0" : "h-4 w-4 shrink-0 text-foreground" }) : /* @__PURE__ */ jsx3(GearGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" });
|
|
320
|
+
const selected = options.find((o) => o.value === value);
|
|
324
321
|
const choose = (next) => {
|
|
325
322
|
onChange(next);
|
|
326
323
|
setOpen(false);
|
|
327
324
|
};
|
|
328
325
|
return /* @__PURE__ */ jsxs3("div", { ref: containerRef, className: pickerRootClass(fullWidth || field), children: [
|
|
329
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ jsx3(
|
|
330
327
|
PickerTrigger,
|
|
331
328
|
{
|
|
332
329
|
variant,
|
|
333
|
-
icon:
|
|
330
|
+
icon: selected?.icon,
|
|
331
|
+
trailing: locked ? /* @__PURE__ */ jsx3(LockGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : void 0,
|
|
334
332
|
...triggerProps,
|
|
335
333
|
id,
|
|
336
334
|
disabled,
|
|
335
|
+
"aria-label": ariaLabel,
|
|
337
336
|
"aria-haspopup": locked ? void 0 : true,
|
|
338
337
|
"aria-expanded": locked ? void 0 : open,
|
|
339
338
|
"aria-controls": !locked && open ? panelId : void 0,
|
|
@@ -344,16 +343,13 @@ function HarnessPicker({
|
|
|
344
343
|
onMouseLeave: locked ? hideHint : void 0,
|
|
345
344
|
onFocus: locked ? showHint : void 0,
|
|
346
345
|
onBlur: locked ? hideHint : void 0,
|
|
347
|
-
title
|
|
346
|
+
title,
|
|
348
347
|
"data-state": !locked && open ? "open" : "closed",
|
|
349
348
|
className: field ? fieldPickerTriggerClass({ interactive: !locked && !disabled }) : variant === "quiet" ? `${quietPickerTriggerClass({ interactive: !locked })} w-full justify-between` : `w-full ${locked ? "cursor-default hover:bg-transparent" : ""}`,
|
|
350
|
-
children: [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
] }),
|
|
355
|
-
locked ? /* @__PURE__ */ jsx3(LockGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx3(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
|
|
356
|
-
]
|
|
349
|
+
children: /* @__PURE__ */ jsxs3("span", { className: `flex min-w-0 items-center ${field ? "flex-1 gap-2" : "gap-1.5"}`, children: [
|
|
350
|
+
variant !== "chip" && selected?.icon,
|
|
351
|
+
/* @__PURE__ */ jsx3("span", { className: `truncate ${value ? "" : "text-muted-foreground"}`, children: selected?.label ?? placeholder })
|
|
352
|
+
] })
|
|
357
353
|
}
|
|
358
354
|
),
|
|
359
355
|
locked && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
@@ -371,7 +367,7 @@ function HarnessPicker({
|
|
|
371
367
|
}
|
|
372
368
|
)
|
|
373
369
|
] }),
|
|
374
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ jsx3(
|
|
375
371
|
PopoverSurface,
|
|
376
372
|
{
|
|
377
373
|
open: !locked && open,
|
|
@@ -381,47 +377,40 @@ function HarnessPicker({
|
|
|
381
377
|
panelRef,
|
|
382
378
|
matchTriggerWidth: true,
|
|
383
379
|
side: field ? "below" : void 0,
|
|
384
|
-
className: `max-h-64 min-w-[248px] overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
385
|
-
children:
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
role: "menuitemradio",
|
|
406
|
-
"aria-checked": h === value,
|
|
407
|
-
onClick: () => choose(h),
|
|
408
|
-
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm transition ${h === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
409
|
-
children: [
|
|
410
|
-
/* @__PURE__ */ jsx3(HarnessGlyph, { harness: h, className: "h-4 w-4 shrink-0 text-foreground" }),
|
|
411
|
-
/* @__PURE__ */ jsxs3("span", { className: "min-w-0", children: [
|
|
412
|
-
/* @__PURE__ */ jsx3("span", { className: "block truncate", children: harnessLabel(h) }),
|
|
413
|
-
HARNESS_LABELS[h]?.[1] && /* @__PURE__ */ jsx3("span", { className: "block truncate text-xs font-normal text-muted-foreground", children: HARNESS_LABELS[h]?.[1] })
|
|
414
|
-
] }),
|
|
415
|
-
h === value && /* @__PURE__ */ jsx3(CheckGlyph, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-primary" })
|
|
416
|
-
]
|
|
417
|
-
},
|
|
418
|
-
h
|
|
419
|
-
))
|
|
420
|
-
]
|
|
380
|
+
className: `max-h-64 min-w-[248px] max-w-[min(24rem,calc(100vw-2rem))] overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
381
|
+
children: options.map((o) => /* @__PURE__ */ jsxs3(
|
|
382
|
+
"button",
|
|
383
|
+
{
|
|
384
|
+
type: "button",
|
|
385
|
+
role: "menuitemradio",
|
|
386
|
+
"aria-checked": o.value === value,
|
|
387
|
+
title: o.description ? `${o.label} \u2014 ${o.description}` : o.label,
|
|
388
|
+
onClick: () => choose(o.value),
|
|
389
|
+
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm transition ${o.value === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
390
|
+
children: [
|
|
391
|
+
o.icon,
|
|
392
|
+
/* @__PURE__ */ jsxs3("span", { className: "min-w-0 flex-1", children: [
|
|
393
|
+
/* @__PURE__ */ jsx3("span", { className: "block truncate", children: o.label }),
|
|
394
|
+
o.description && /* @__PURE__ */ jsx3("span", { className: "block truncate text-xs font-normal text-muted-foreground", children: o.description })
|
|
395
|
+
] }),
|
|
396
|
+
o.value === value && /* @__PURE__ */ jsx3(CheckGlyph, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
o.value
|
|
400
|
+
))
|
|
421
401
|
}
|
|
422
402
|
)
|
|
423
403
|
] });
|
|
424
404
|
}
|
|
405
|
+
function HarnessPicker({ value, onChange, available, defaultOption, variant = "chip", ...rest }) {
|
|
406
|
+
const glyph = (h) => /* @__PURE__ */ jsx3(HarnessGlyph, { harness: h, className: variant === "quiet" ? "h-4 w-4 shrink-0" : "h-4 w-4 shrink-0 text-foreground" });
|
|
407
|
+
const ids = available ?? Object.keys(HARNESS_LABELS);
|
|
408
|
+
const options = [
|
|
409
|
+
...defaultOption ? [{ value: "", label: defaultOption.label, icon: /* @__PURE__ */ jsx3(GearGlyph, { className: "h-4 w-4 shrink-0 text-muted-foreground" }) }] : [],
|
|
410
|
+
...(value && !ids.includes(value) ? [value, ...ids] : ids).map((h) => ({ value: h, label: harnessLabel(h), description: HARNESS_LABELS[h]?.[1], icon: glyph(h) }))
|
|
411
|
+
];
|
|
412
|
+
return /* @__PURE__ */ jsx3(ChoicePicker, { ...rest, variant, value, onChange: (v) => onChange(v), options, placeholder: "Select harness", title: "Harness" });
|
|
413
|
+
}
|
|
425
414
|
function useCoherentHandlers(props) {
|
|
426
415
|
const { model, models, harness, onModelChange, onHarnessChange, harnessLockReason } = props;
|
|
427
416
|
const canonicalIds = useMemo(() => models.map((m) => m.id), [models]);
|
|
@@ -578,7 +567,8 @@ export {
|
|
|
578
567
|
renamePastedImages,
|
|
579
568
|
HarnessGlyph,
|
|
580
569
|
AgentSettingsPopover,
|
|
570
|
+
ChoicePicker,
|
|
581
571
|
HarnessPicker,
|
|
582
572
|
AgentSessionControls
|
|
583
573
|
};
|
|
584
|
-
//# sourceMappingURL=chunk-
|
|
574
|
+
//# sourceMappingURL=chunk-ENK2VT7O.js.map
|