@tangle-network/agent-app 3.0.10 → 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-N7IBDET7.js → chunk-ENK2VT7O.js} +68 -75
- package/dist/{chunk-N7IBDET7.js.map → chunk-ENK2VT7O.js.map} +1 -1
- package/dist/{chunk-NQT4IPUF.js → chunk-KIU3X2UF.js} +3 -3
- package/dist/{chunk-JBTUNGXV.js → chunk-KV63GEO7.js} +4 -4
- package/dist/{chunk-T4YYINOM.js → chunk-OJKMW2CB.js} +3 -3
- package/dist/{chunk-3NMXB62K.js → chunk-S2UGXHHZ.js} +129 -119
- package/dist/chunk-S2UGXHHZ.js.map +1 -0
- package/dist/{chunk-7PZBBYNU.js → chunk-TKEC2UL4.js} +2 -2
- package/dist/{chunk-BX3MAXJI.js → chunk-W6NLRGZT.js} +3 -3
- package/dist/{mention-editor-WQYVWDOB.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 +35 -16
- 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 +15 -4
- package/dist/workspace-react/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3NMXB62K.js.map +0 -1
- /package/dist/{chunk-NQT4IPUF.js.map → chunk-KIU3X2UF.js.map} +0 -0
- /package/dist/{chunk-JBTUNGXV.js.map → chunk-KV63GEO7.js.map} +0 -0
- /package/dist/{chunk-T4YYINOM.js.map → chunk-OJKMW2CB.js.map} +0 -0
- /package/dist/{chunk-7PZBBYNU.js.map → chunk-TKEC2UL4.js.map} +0 -0
- /package/dist/{chunk-BX3MAXJI.js.map → chunk-W6NLRGZT.js.map} +0 -0
- /package/dist/{mention-editor-WQYVWDOB.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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopoverDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TKEC2UL4.js";
|
|
4
4
|
import {
|
|
5
|
-
CHIP_PICKER_TRIGGER,
|
|
6
5
|
CheckGlyph,
|
|
7
6
|
EffortPicker,
|
|
8
7
|
ModelPicker,
|
|
9
8
|
OVERLAY_SHADOW,
|
|
9
|
+
PickerTrigger,
|
|
10
10
|
PopoverSurface,
|
|
11
11
|
fieldPickerTriggerClass,
|
|
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,
|
|
@@ -265,26 +265,21 @@ function AgentSettingsPopover({
|
|
|
265
265
|
import { useId, useMemo, useRef, useState as useState2 } from "react";
|
|
266
266
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
267
267
|
var HARNESS_LABELS = {
|
|
268
|
-
opencode: "OpenCode
|
|
269
|
-
"claude-code": "Claude Code
|
|
270
|
-
codex: "Codex
|
|
271
|
-
"kimi-code": "Kimi
|
|
272
|
-
amp: "Amp",
|
|
273
|
-
"factory-droids": "Factory Droids",
|
|
274
|
-
cursor: "Cursor",
|
|
275
|
-
hermes: "Hermes",
|
|
276
|
-
forge: "Forge",
|
|
277
|
-
pi: "Pi",
|
|
278
|
-
openclaw: "OpenClaw",
|
|
279
|
-
acp: "ACP",
|
|
280
|
-
"cli-base": "CLI"
|
|
268
|
+
opencode: ["OpenCode", "Any model"],
|
|
269
|
+
"claude-code": ["Claude Code", "Anthropic models"],
|
|
270
|
+
codex: ["Codex", "OpenAI models"],
|
|
271
|
+
"kimi-code": ["Kimi", "Moonshot models"],
|
|
272
|
+
amp: ["Amp"],
|
|
273
|
+
"factory-droids": ["Factory Droids"],
|
|
274
|
+
cursor: ["Cursor"],
|
|
275
|
+
hermes: ["Hermes"],
|
|
276
|
+
forge: ["Forge"],
|
|
277
|
+
pi: ["Pi"],
|
|
278
|
+
openclaw: ["OpenClaw"],
|
|
279
|
+
acp: ["ACP"],
|
|
280
|
+
"cli-base": ["CLI"]
|
|
281
281
|
};
|
|
282
|
-
|
|
283
|
-
return HARNESS_LABELS[h] ?? h;
|
|
284
|
-
}
|
|
285
|
-
function ChevronDown({ className }) {
|
|
286
|
-
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" }) });
|
|
287
|
-
}
|
|
282
|
+
var harnessLabel = (h) => HARNESS_LABELS[h]?.[0] ?? h;
|
|
288
283
|
function LockGlyph({ className }) {
|
|
289
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: [
|
|
290
285
|
/* @__PURE__ */ jsx3("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
@@ -297,16 +292,18 @@ function GearGlyph({ className }) {
|
|
|
297
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" })
|
|
298
293
|
] });
|
|
299
294
|
}
|
|
300
|
-
function
|
|
295
|
+
function ChoicePicker({
|
|
301
296
|
value,
|
|
302
297
|
onChange,
|
|
303
|
-
|
|
298
|
+
options,
|
|
299
|
+
placeholder = "",
|
|
304
300
|
fullWidth = false,
|
|
305
301
|
lockReason,
|
|
306
302
|
variant = "chip",
|
|
307
|
-
defaultOption,
|
|
308
303
|
disabled = false,
|
|
309
304
|
id,
|
|
305
|
+
title,
|
|
306
|
+
"aria-label": ariaLabel,
|
|
310
307
|
"aria-describedby": ariaDescribedBy
|
|
311
308
|
}) {
|
|
312
309
|
const [requestedOpen, setOpen] = useState2(false);
|
|
@@ -318,22 +315,24 @@ function HarnessPicker({
|
|
|
318
315
|
const reasonId = useId();
|
|
319
316
|
const locked = lockReason !== void 0;
|
|
320
317
|
const field = variant === "field";
|
|
321
|
-
const options = available ?? Object.keys(HARNESS_LABELS);
|
|
322
318
|
const showHint = () => setHintOpen(true);
|
|
323
319
|
const hideHint = () => setHintOpen(false);
|
|
324
|
-
const
|
|
320
|
+
const selected = options.find((o) => o.value === value);
|
|
325
321
|
const choose = (next) => {
|
|
326
322
|
onChange(next);
|
|
327
323
|
setOpen(false);
|
|
328
324
|
};
|
|
329
325
|
return /* @__PURE__ */ jsxs3("div", { ref: containerRef, className: pickerRootClass(fullWidth || field), children: [
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
|
|
326
|
+
/* @__PURE__ */ jsx3(
|
|
327
|
+
PickerTrigger,
|
|
332
328
|
{
|
|
333
|
-
|
|
329
|
+
variant,
|
|
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
|
-
className: field ? fieldPickerTriggerClass({ interactive: !locked && !disabled }) : variant === "quiet" ? `${quietPickerTriggerClass({ interactive: !locked })} w-full justify-between` :
|
|
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
|
-
]
|
|
348
|
+
className: field ? fieldPickerTriggerClass({ interactive: !locked && !disabled }) : variant === "quiet" ? `${quietPickerTriggerClass({ interactive: !locked })} w-full justify-between` : `w-full ${locked ? "cursor-default hover:bg-transparent" : ""}`,
|
|
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,44 +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__ */ jsx3("span", { className: "truncate", children: harnessLabel(h) }),
|
|
412
|
-
h === value && /* @__PURE__ */ jsx3(CheckGlyph, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-primary" })
|
|
413
|
-
]
|
|
414
|
-
},
|
|
415
|
-
h
|
|
416
|
-
))
|
|
417
|
-
]
|
|
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
|
+
))
|
|
418
401
|
}
|
|
419
402
|
)
|
|
420
403
|
] });
|
|
421
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
|
+
}
|
|
422
414
|
function useCoherentHandlers(props) {
|
|
423
415
|
const { model, models, harness, onModelChange, onHarnessChange, harnessLockReason } = props;
|
|
424
416
|
const canonicalIds = useMemo(() => models.map((m) => m.id), [models]);
|
|
@@ -575,7 +567,8 @@ export {
|
|
|
575
567
|
renamePastedImages,
|
|
576
568
|
HarnessGlyph,
|
|
577
569
|
AgentSettingsPopover,
|
|
570
|
+
ChoicePicker,
|
|
578
571
|
HarnessPicker,
|
|
579
572
|
AgentSessionControls
|
|
580
573
|
};
|
|
581
|
-
//# sourceMappingURL=chunk-
|
|
574
|
+
//# sourceMappingURL=chunk-ENK2VT7O.js.map
|