@tangle-network/agent-app 3.0.9 → 3.0.11

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.
Files changed (28) hide show
  1. package/dist/assistant/index.js +7 -7
  2. package/dist/chat-react/index.js +4 -4
  3. package/dist/{chunk-UN3PDU3M.js → chunk-43FJ5YNL.js} +2 -2
  4. package/dist/{chunk-7IVRHG3L.js → chunk-4FQPTWUJ.js} +3 -3
  5. package/dist/{chunk-4W6MDZQH.js → chunk-7OECXAOV.js} +3 -3
  6. package/dist/{chunk-6CDNITEO.js → chunk-KNRXBBGV.js} +81 -72
  7. package/dist/chunk-KNRXBBGV.js.map +1 -0
  8. package/dist/{chunk-NN3CQNX5.js → chunk-MRU4I4LH.js} +4 -4
  9. package/dist/{chunk-NN3CQNX5.js.map → chunk-MRU4I4LH.js.map} +1 -1
  10. package/dist/{chunk-PKBNDVGR.js → chunk-OPRMWCZN.js} +31 -28
  11. package/dist/{chunk-PKBNDVGR.js.map → chunk-OPRMWCZN.js.map} +1 -1
  12. package/dist/{chunk-S6HCSAO6.js → chunk-VXBJ6DH6.js} +4 -4
  13. package/dist/{mention-editor-UHGJXXUC.js → mention-editor-Y7D4GZHT.js} +2 -2
  14. package/dist/settings-react/index.js +1 -1
  15. package/dist/studio-react/index.js +1 -1
  16. package/dist/web-react/agent-profile-editor.js +4 -4
  17. package/dist/web-react/agent-session-controls.d.ts +3 -3
  18. package/dist/web-react/composer-profile-pill.d.ts +1 -1
  19. package/dist/web-react/index.js +7 -7
  20. package/dist/web-react/picker-presentation.d.ts +8 -4
  21. package/dist/workspace-react/index.js +3 -3
  22. package/package.json +2 -2
  23. package/dist/chunk-6CDNITEO.js.map +0 -1
  24. /package/dist/{chunk-UN3PDU3M.js.map → chunk-43FJ5YNL.js.map} +0 -0
  25. /package/dist/{chunk-7IVRHG3L.js.map → chunk-4FQPTWUJ.js.map} +0 -0
  26. /package/dist/{chunk-4W6MDZQH.js.map → chunk-7OECXAOV.js.map} +0 -0
  27. /package/dist/{chunk-S6HCSAO6.js.map → chunk-VXBJ6DH6.js.map} +0 -0
  28. /package/dist/{mention-editor-UHGJXXUC.js.map → mention-editor-Y7D4GZHT.js.map} +0 -0
@@ -3,26 +3,26 @@ import {
3
3
  ResizeHandle,
4
4
  chatToolCallPart,
5
5
  resolveToolPresentation
6
- } from "../chunk-NN3CQNX5.js";
6
+ } from "../chunk-MRU4I4LH.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-7IVRHG3L.js";
12
+ import "../chunk-4FQPTWUJ.js";
13
13
  import "../chunk-Y6PRDUFJ.js";
14
14
  import "../chunk-GEYACSFW.js";
15
15
  import {
16
16
  ChatComposer
17
- } from "../chunk-S6HCSAO6.js";
17
+ } from "../chunk-VXBJ6DH6.js";
18
18
  import "../chunk-L7MB2LLM.js";
19
- import "../chunk-PKBNDVGR.js";
20
- import "../chunk-4W6MDZQH.js";
19
+ import "../chunk-OPRMWCZN.js";
20
+ import "../chunk-7OECXAOV.js";
21
21
  import "../chunk-2HQP2CTA.js";
22
- import "../chunk-UN3PDU3M.js";
22
+ import "../chunk-43FJ5YNL.js";
23
23
  import {
24
24
  ModelPicker
25
- } from "../chunk-6CDNITEO.js";
25
+ } from "../chunk-KNRXBBGV.js";
26
26
  import "../chunk-ZAMHLXNS.js";
27
27
  import "../chunk-SJWIZT7B.js";
28
28
  import "../chunk-RASGKEAL.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ComposerModeControls,
3
3
  EntryComposer
4
- } from "../chunk-S6HCSAO6.js";
4
+ } from "../chunk-VXBJ6DH6.js";
5
5
  import "../chunk-L7MB2LLM.js";
6
- import "../chunk-PKBNDVGR.js";
6
+ import "../chunk-OPRMWCZN.js";
7
7
  import "../chunk-2HQP2CTA.js";
8
- import "../chunk-UN3PDU3M.js";
9
- import "../chunk-6CDNITEO.js";
8
+ import "../chunk-43FJ5YNL.js";
9
+ import "../chunk-KNRXBBGV.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
  usePopover
3
- } from "./chunk-6CDNITEO.js";
3
+ } from "./chunk-KNRXBBGV.js";
4
4
 
5
5
  // src/web-react/popover-dialog.ts
6
6
  import { useEffect, useId } from "react";
@@ -45,4 +45,4 @@ function usePopoverDialog(open, onOpenChange) {
45
45
  export {
46
46
  usePopoverDialog
47
47
  };
48
- //# sourceMappingURL=chunk-UN3PDU3M.js.map
48
+ //# sourceMappingURL=chunk-43FJ5YNL.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HarnessPicker,
3
3
  filterAcceptedFiles
4
- } from "./chunk-PKBNDVGR.js";
4
+ } from "./chunk-OPRMWCZN.js";
5
5
  import {
6
6
  EffortPicker,
7
7
  ModelPicker,
@@ -9,7 +9,7 @@ import {
9
9
  POPOVER_OPTION_FOCUS,
10
10
  PopoverSurface,
11
11
  effortLevelsFromIds
12
- } from "./chunk-6CDNITEO.js";
12
+ } from "./chunk-KNRXBBGV.js";
13
13
  import {
14
14
  isCommitSha,
15
15
  parseGitHubLocation,
@@ -2382,4 +2382,4 @@ export {
2382
2382
  AGENT_PROFILE_EDITOR_SECTIONS,
2383
2383
  AgentProfileEditor
2384
2384
  };
2385
- //# sourceMappingURL=chunk-7IVRHG3L.js.map
2385
+ //# sourceMappingURL=chunk-4FQPTWUJ.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  usePopoverDialog
3
- } from "./chunk-UN3PDU3M.js";
3
+ } from "./chunk-43FJ5YNL.js";
4
4
  import {
5
5
  CheckGlyph,
6
6
  OVERLAY_SHADOW,
7
7
  PopoverSurface
8
- } from "./chunk-6CDNITEO.js";
8
+ } from "./chunk-KNRXBBGV.js";
9
9
 
10
10
  // src/web-react/workspace-switcher.tsx
11
11
  import { useCallback, useState } from "react";
@@ -156,4 +156,4 @@ export {
156
156
  WorkspaceSwitcher,
157
157
  WorkspaceInitial
158
158
  };
159
- //# sourceMappingURL=chunk-4W6MDZQH.js.map
159
+ //# sourceMappingURL=chunk-7OECXAOV.js.map
@@ -149,8 +149,11 @@ function PopoverSurface({
149
149
  );
150
150
  }
151
151
 
152
- // src/web-react/picker-presentation.ts
152
+ // src/web-react/picker-presentation.tsx
153
+ import { forwardRef } from "react";
154
+ import { Chip } from "@tangle-network/ui/primitives";
153
155
  import { fieldPresentation, fieldSizes, fieldTouchText } from "@tangle-network/ui/presentation";
156
+ import { jsx as jsx2 } from "react/jsx-runtime";
154
157
  var POPOVER_OPTION_FOCUS = "focus-visible:[outline-offset:-2px]";
155
158
  var OVERLAY_SHADOW = "shadow-[var(--shadow-overlay)]";
156
159
  function pickerRootClass(fullWidth) {
@@ -159,7 +162,9 @@ function pickerRootClass(fullWidth) {
159
162
  function fieldPickerTriggerClass({ interactive = true } = {}) {
160
163
  return `${fieldPresentation} ${fieldSizes.md} ${fieldTouchText} inline-flex w-full min-w-0 items-center justify-between gap-2 whitespace-nowrap border text-left font-normal text-foreground disabled:cursor-not-allowed disabled:opacity-50 ${interactive ? "data-[state=open]:border-[var(--ix-hover-border)] data-[state=open]:shadow-[var(--ix-after)]" : "cursor-default"}`;
161
164
  }
162
- var CHIP_PICKER_TRIGGER = "inline-flex h-[var(--control-height-sm,2rem)] items-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-3 text-sm font-medium text-foreground transition";
165
+ var PickerTrigger = forwardRef(
166
+ ({ variant, icon, children, className, ...props }, ref) => variant === "chip" ? /* @__PURE__ */ jsx2(Chip, { ref, size: "md", emphasis: "outline", icon, className: `[&>span:last-child]:inline-flex [&>span:last-child]:flex-1 [&>span:last-child]:items-center [&>span:last-child]:justify-between [&>span:last-child]:gap-1.5 ${className ?? ""}`, ...props, children }) : /* @__PURE__ */ jsx2("button", { ref, type: "button", className, ...props, children })
167
+ );
163
168
  var QUIET_PICKER_TRIGGER_BASE = "inline-flex h-[var(--control-height-sm,2rem)] shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md bg-transparent px-2 text-sm font-normal text-muted-foreground transition focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
164
169
  var QUIET_PICKER_TRIGGER_INTERACTIVE = "hover:bg-accent hover:text-foreground data-[state=open]:bg-accent data-[state=open]:text-foreground";
165
170
  function quietPickerTriggerClass({ interactive = true } = {}) {
@@ -202,37 +207,37 @@ import { useCallback as useCallback2, useEffect as useEffect3, useId as useId2,
202
207
  import { StatusPill } from "@tangle-network/ui/primitives";
203
208
 
204
209
  // src/web-react/control-glyphs.tsx
205
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
210
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
206
211
  function ChevronDown({ className }) {
207
- return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "m6 9 6 6 6-6" }) });
212
+ 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" }) });
208
213
  }
209
214
  function SearchGlyph({ className }) {
210
215
  return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
211
- /* @__PURE__ */ jsx2("circle", { cx: "11", cy: "11", r: "8" }),
212
- /* @__PURE__ */ jsx2("path", { d: "m21 21-4.3-4.3" })
216
+ /* @__PURE__ */ jsx3("circle", { cx: "11", cy: "11", r: "8" }),
217
+ /* @__PURE__ */ jsx3("path", { d: "m21 21-4.3-4.3" })
213
218
  ] });
214
219
  }
215
220
  function SparkleGlyph({ className }) {
216
- return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1m0-12.8-2.1 2.1M7.7 16.3l-2.1 2.1" }) });
221
+ 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: "M12 3v3m0 12v3M3 12h3m12 0h3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1m0-12.8-2.1 2.1M7.7 16.3l-2.1 2.1" }) });
217
222
  }
218
223
  function BrainGlyph({ className }) {
219
224
  return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
220
- /* @__PURE__ */ jsx2("path", { d: "M12 18V5" }),
221
- /* @__PURE__ */ jsx2("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }),
222
- /* @__PURE__ */ jsx2("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }),
223
- /* @__PURE__ */ jsx2("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
224
- /* @__PURE__ */ jsx2("path", { d: "M18 18a4 4 0 0 0 2-7.464" }),
225
- /* @__PURE__ */ jsx2("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
226
- /* @__PURE__ */ jsx2("path", { d: "M6 18a4 4 0 0 1-2-7.464" }),
227
- /* @__PURE__ */ jsx2("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
225
+ /* @__PURE__ */ jsx3("path", { d: "M12 18V5" }),
226
+ /* @__PURE__ */ jsx3("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }),
227
+ /* @__PURE__ */ jsx3("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }),
228
+ /* @__PURE__ */ jsx3("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
229
+ /* @__PURE__ */ jsx3("path", { d: "M18 18a4 4 0 0 0 2-7.464" }),
230
+ /* @__PURE__ */ jsx3("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
231
+ /* @__PURE__ */ jsx3("path", { d: "M6 18a4 4 0 0 1-2-7.464" }),
232
+ /* @__PURE__ */ jsx3("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
228
233
  ] });
229
234
  }
230
235
  function CheckGlyph({ className }) {
231
- return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M20 6 9 17l-5-5" }) });
236
+ 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: "M20 6 9 17l-5-5" }) });
232
237
  }
233
238
 
234
239
  // src/web-react/model-picker.tsx
235
- import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
240
+ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
236
241
  function formatPrice(p) {
237
242
  if (!p) return void 0;
238
243
  const n = Number(p);
@@ -264,15 +269,15 @@ function formatContext(len) {
264
269
  function ModelMarks({ model, size, renderProviderBadge }) {
265
270
  const brand = model.maker?.trim() || model.provider;
266
271
  const host = model.servedBy?.trim();
267
- const primary = renderProviderBadge ? renderProviderBadge(brand) : /* @__PURE__ */ jsx3(ProviderLogo, { provider: brand, size });
272
+ const primary = renderProviderBadge ? renderProviderBadge(brand) : /* @__PURE__ */ jsx4(ProviderLogo, { provider: brand, size });
268
273
  if (!host || host.toLowerCase() === brand.toLowerCase()) return primary;
269
274
  return /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-0.5", children: [
270
275
  primary,
271
- /* @__PURE__ */ jsx3(ProviderLogo, { provider: host, size })
276
+ /* @__PURE__ */ jsx4(ProviderLogo, { provider: host, size })
272
277
  ] });
273
278
  }
274
279
  function SectionHeader({ children }) {
275
- return /* @__PURE__ */ jsx3("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children });
280
+ return /* @__PURE__ */ jsx4("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children });
276
281
  }
277
282
  function ModelRow({
278
283
  model,
@@ -298,7 +303,7 @@ function ModelRow({
298
303
  children: [
299
304
  thumb ? (
300
305
  // A media model shows what it makes: a 40px example beside its name.
301
- /* @__PURE__ */ jsx3(
306
+ /* @__PURE__ */ jsx4(
302
307
  "img",
303
308
  {
304
309
  src: thumb,
@@ -309,21 +314,21 @@ function ModelRow({
309
314
  className: `size-10 shrink-0 rounded-md border border-border object-cover${unavailable ? " opacity-50" : ""}`
310
315
  }
311
316
  )
312
- ) : /* @__PURE__ */ jsx3("span", { className: "shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx3(ModelMarks, { model, size: 16, renderProviderBadge }) }),
317
+ ) : /* @__PURE__ */ jsx4("span", { className: "shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx4(ModelMarks, { model, size: 16, renderProviderBadge }) }),
313
318
  /* @__PURE__ */ jsxs2("span", { className: "min-w-0 flex-1", children: [
314
319
  /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 items-center gap-1.5", children: [
315
- thumb && /* @__PURE__ */ jsx3("span", { className: "shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx3(ModelMarks, { model, size: 14, renderProviderBadge }) }),
316
- /* @__PURE__ */ jsx3("span", { className: `min-w-0 break-words [overflow-wrap:anywhere]${unavailable ? " text-muted-foreground" : ""}`, children: model.name }),
317
- flagged && /* @__PURE__ */ jsx3(StatusPill, { tone: "warning", size: "sm", className: "shrink-0", title: model.statusReason, "data-model-status": model.status, children: unavailable ? "Unavailable" : "Limited" })
320
+ thumb && /* @__PURE__ */ jsx4("span", { className: "shrink-0", "aria-hidden": true, children: /* @__PURE__ */ jsx4(ModelMarks, { model, size: 14, renderProviderBadge }) }),
321
+ /* @__PURE__ */ jsx4("span", { className: `min-w-0 break-words [overflow-wrap:anywhere]${unavailable ? " text-muted-foreground" : ""}`, children: model.name }),
322
+ flagged && /* @__PURE__ */ jsx4(StatusPill, { tone: "warning", size: "sm", className: "shrink-0", title: model.statusReason, "data-model-status": model.status, children: unavailable ? "Unavailable" : "Limited" })
318
323
  ] }),
319
- capability && /* @__PURE__ */ jsx3("span", { className: "mt-0.5 block truncate text-xs font-normal text-muted-foreground", "data-model-capability": true, children: capability }),
324
+ capability && /* @__PURE__ */ jsx4("span", { className: "mt-0.5 block truncate text-xs font-normal text-muted-foreground", "data-model-capability": true, children: capability }),
320
325
  (ctx || price || !media && !model.supportsTools) && /* @__PURE__ */ jsxs2("span", { className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs font-normal text-muted-foreground", children: [
321
- !media && !model.supportsTools && /* @__PURE__ */ jsx3("span", { className: "rounded bg-secondary px-1.5 py-0.5", children: "no tools" }),
322
- !media && ctx && /* @__PURE__ */ jsx3("span", { children: ctx }),
323
- price && /* @__PURE__ */ jsx3("span", { "data-model-price": true, children: price })
326
+ !media && !model.supportsTools && /* @__PURE__ */ jsx4("span", { className: "rounded bg-secondary px-1.5 py-0.5", children: "no tools" }),
327
+ !media && ctx && /* @__PURE__ */ jsx4("span", { children: ctx }),
328
+ price && /* @__PURE__ */ jsx4("span", { "data-model-price": true, children: price })
324
329
  ] })
325
330
  ] }),
326
- selected && /* @__PURE__ */ jsx3(CheckGlyph, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
331
+ selected && /* @__PURE__ */ jsx4(CheckGlyph, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
327
332
  ]
328
333
  }
329
334
  );
@@ -423,12 +428,14 @@ function ModelPicker({
423
428
  triggerRef.current?.focus();
424
429
  onChange(modelId);
425
430
  };
426
- const row = (model) => /* @__PURE__ */ jsx3(ModelRow, { model, selected: model.id === value, onSelect: () => select(model.id), renderProviderBadge }, model.id);
431
+ const row = (model) => /* @__PURE__ */ jsx4(ModelRow, { model, selected: model.id === value, onSelect: () => select(model.id), renderProviderBadge }, model.id);
432
+ const glyph = /* @__PURE__ */ jsx4("span", { className: "shrink-0", "aria-hidden": true, children: selected ? /* @__PURE__ */ jsx4(ModelMarks, { model: selected, size: 16, renderProviderBadge }) : /* @__PURE__ */ jsx4(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }) });
427
433
  return /* @__PURE__ */ jsxs2("div", { ref: containerRef, className: variant === "field" ? "relative flex w-full min-w-0" : "relative inline-flex min-w-0 max-w-full", children: [
428
434
  /* @__PURE__ */ jsxs2(
429
- "button",
435
+ PickerTrigger,
430
436
  {
431
- type: "button",
437
+ variant,
438
+ icon: triggerContent ? void 0 : glyph,
432
439
  ...triggerProps,
433
440
  id,
434
441
  disabled,
@@ -446,13 +453,13 @@ function ModelPicker({
446
453
  },
447
454
  title: selected ? `${selectedLabel}${selected.servedBy ? ` \xB7 served by ${selected.servedBy}` : ""}` : selectedLabel || defaultOption?.label || "Select model",
448
455
  "data-state": expanded ? "open" : "closed",
449
- className: `${variant === "field" ? fieldPickerTriggerClass({ interactive: !disabled }) : variant === "quiet" ? quietPickerTriggerClass({ interactive: !disabled }) : `${CHIP_PICKER_TRIGGER} ${disabled ? "" : "hover:bg-accent"}`} max-w-full disabled:cursor-not-allowed disabled:opacity-50`,
456
+ className: `${variant === "field" ? fieldPickerTriggerClass({ interactive: !disabled }) : variant === "quiet" ? quietPickerTriggerClass({ interactive: !disabled }) : ""} max-w-full disabled:cursor-not-allowed disabled:opacity-50`,
450
457
  children: [
451
458
  triggerContent ?? /* @__PURE__ */ jsxs2("span", { className: variant === "field" ? "flex min-w-0 flex-1 items-center gap-2" : "contents", children: [
452
- /* @__PURE__ */ jsx3("span", { className: "shrink-0", "aria-hidden": true, children: selected ? /* @__PURE__ */ jsx3(ModelMarks, { model: selected, size: 16, renderProviderBadge }) : /* @__PURE__ */ jsx3(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }) }),
453
- /* @__PURE__ */ jsx3("span", { className: variant === "field" ? `min-w-0 flex-1 truncate ${value ? "" : "text-muted-foreground"}` : "max-w-[160px] truncate", children: selectedLabel || defaultOption?.label || "Select model" })
459
+ variant !== "chip" && glyph,
460
+ /* @__PURE__ */ jsx4("span", { className: variant === "field" ? `min-w-0 flex-1 truncate ${value ? "" : "text-muted-foreground"}` : "max-w-[160px] truncate", children: selectedLabel || defaultOption?.label || "Select model" })
454
461
  ] }),
455
- /* @__PURE__ */ jsx3(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
462
+ /* @__PURE__ */ jsx4(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
456
463
  ]
457
464
  }
458
465
  ),
@@ -474,9 +481,9 @@ function ModelPicker({
474
481
  side: variant === "field" ? "below" : void 0,
475
482
  className: `flex w-[420px] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-xl border border-card-edge bg-popover text-foreground ${OVERLAY_SHADOW}`,
476
483
  children: [
477
- /* @__PURE__ */ jsx3("div", { className: "shrink-0 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 rounded-lg border border-strong bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring", children: [
478
- /* @__PURE__ */ jsx3(SearchGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
479
- /* @__PURE__ */ jsx3(
484
+ /* @__PURE__ */ jsx4("div", { className: "shrink-0 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 rounded-lg border border-strong bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring", children: [
485
+ /* @__PURE__ */ jsx4(SearchGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
486
+ /* @__PURE__ */ jsx4(
480
487
  "input",
481
488
  {
482
489
  ref: inputRef,
@@ -498,23 +505,23 @@ function ModelPicker({
498
505
  "aria-pressed": !value,
499
506
  className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm transition ${POPOVER_OPTION_FOCUS} ${value ? "hover:bg-accent" : "bg-primary/10 font-medium"}`,
500
507
  children: [
501
- /* @__PURE__ */ jsx3(SparkleGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
502
- /* @__PURE__ */ jsx3("span", { className: "min-w-0 flex-1", children: defaultOption.label }),
503
- !value && /* @__PURE__ */ jsx3(CheckGlyph, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
508
+ /* @__PURE__ */ jsx4(SparkleGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
509
+ /* @__PURE__ */ jsx4("span", { className: "min-w-0 flex-1", children: defaultOption.label }),
510
+ !value && /* @__PURE__ */ jsx4(CheckGlyph, { className: "h-3.5 w-3.5 shrink-0 text-primary" })
504
511
  ]
505
512
  }
506
513
  ),
507
514
  value && !selected && /* @__PURE__ */ jsxs2("div", { className: "mx-2 mb-1 mt-2 rounded-lg bg-secondary px-3 py-2 text-sm", children: [
508
- /* @__PURE__ */ jsx3("p", { className: "text-xs font-medium text-muted-foreground", children: "Saved model" }),
509
- /* @__PURE__ */ jsx3("p", { className: "break-words [overflow-wrap:anywhere]", children: value }),
510
- /* @__PURE__ */ jsx3("p", { className: "mt-1 text-xs text-muted-foreground", children: loading || unavailable ? "Your saved selection is unchanged." : "Not in this catalogue. Your saved selection is unchanged." })
515
+ /* @__PURE__ */ jsx4("p", { className: "text-xs font-medium text-muted-foreground", children: "Saved model" }),
516
+ /* @__PURE__ */ jsx4("p", { className: "break-words [overflow-wrap:anywhere]", children: value }),
517
+ /* @__PURE__ */ jsx4("p", { className: "mt-1 text-xs text-muted-foreground", children: loading || unavailable ? "Your saved selection is unchanged." : "Not in this catalogue. Your saved selection is unchanged." })
511
518
  ] }),
512
- loading ? /* @__PURE__ */ jsx3("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "Loading models..." }) : unavailable ? /* @__PURE__ */ jsxs2("div", { className: "px-3 py-4 text-sm", children: [
519
+ loading ? /* @__PURE__ */ jsx4("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "Loading models..." }) : unavailable ? /* @__PURE__ */ jsxs2("div", { className: "px-3 py-4 text-sm", children: [
513
520
  /* @__PURE__ */ jsxs2("div", { role: "alert", children: [
514
- /* @__PURE__ */ jsx3("p", { className: "font-medium", children: "Model catalogue unavailable" }),
515
- /* @__PURE__ */ jsx3("p", { className: "mt-1 break-words text-muted-foreground [overflow-wrap:anywhere]", children: error || "The catalogue could not be loaded." })
521
+ /* @__PURE__ */ jsx4("p", { className: "font-medium", children: "Model catalogue unavailable" }),
522
+ /* @__PURE__ */ jsx4("p", { className: "mt-1 break-words text-muted-foreground [overflow-wrap:anywhere]", children: error || "The catalogue could not be loaded." })
516
523
  ] }),
517
- onRetry && /* @__PURE__ */ jsx3(
524
+ onRetry && /* @__PURE__ */ jsx4(
518
525
  "button",
519
526
  {
520
527
  type: "button",
@@ -526,24 +533,24 @@ function ModelPicker({
526
533
  children: "Retry"
527
534
  }
528
535
  )
529
- ] }) : models.length === 0 ? /* @__PURE__ */ jsx3("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models available" }) : filtered ? /* @__PURE__ */ jsxs2(Fragment, { children: [
530
- filtered.length === 0 && /* @__PURE__ */ jsx3("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models match your search" }),
536
+ ] }) : models.length === 0 ? /* @__PURE__ */ jsx4("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models available" }) : filtered ? /* @__PURE__ */ jsxs2(Fragment, { children: [
537
+ filtered.length === 0 && /* @__PURE__ */ jsx4("div", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models match your search" }),
531
538
  filtered.map(row)
532
539
  ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
533
540
  priorityGroup && sections.priority.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
534
- /* @__PURE__ */ jsx3(SectionHeader, { children: priorityGroup.label }),
541
+ /* @__PURE__ */ jsx4(SectionHeader, { children: priorityGroup.label }),
535
542
  sections.priority.map(row)
536
543
  ] }),
537
544
  sections.currentSelection && !showAll && /* @__PURE__ */ jsxs2(Fragment, { children: [
538
- /* @__PURE__ */ jsx3(SectionHeader, { children: "Selected model" }),
545
+ /* @__PURE__ */ jsx4(SectionHeader, { children: "Selected model" }),
539
546
  row(sections.currentSelection)
540
547
  ] }),
541
548
  sections.recommended.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
542
- /* @__PURE__ */ jsx3(SectionHeader, { children: recommendedLabel }),
549
+ /* @__PURE__ */ jsx4(SectionHeader, { children: recommendedLabel }),
543
550
  sections.recommended.map(row)
544
551
  ] }),
545
- sections.recommended.length === 0 && sections.priority.length === 0 && !sections.currentSelection && /* @__PURE__ */ jsx3("div", { className: "px-3 py-3 text-sm text-muted-foreground", children: "Search or browse all models" }),
546
- sections.byProvider.length > 0 && /* @__PURE__ */ jsx3(
552
+ sections.recommended.length === 0 && sections.priority.length === 0 && !sections.currentSelection && /* @__PURE__ */ jsx4("div", { className: "px-3 py-3 text-sm text-muted-foreground", children: "Search or browse all models" }),
553
+ sections.byProvider.length > 0 && /* @__PURE__ */ jsx4(
547
554
  "button",
548
555
  {
549
556
  type: "button",
@@ -554,7 +561,7 @@ function ModelPicker({
554
561
  }
555
562
  ),
556
563
  showAll && sections.byProvider.map((group) => /* @__PURE__ */ jsxs2("div", { children: [
557
- /* @__PURE__ */ jsx3(SectionHeader, { children: group.provider }),
564
+ /* @__PURE__ */ jsx4(SectionHeader, { children: group.provider }),
558
565
  group.items.map(row)
559
566
  ] }, group.provider))
560
567
  ] })
@@ -567,7 +574,7 @@ function ModelPicker({
567
574
 
568
575
  // src/web-react/effort-picker.tsx
569
576
  import { useId as useId3, useState as useState4 } from "react";
570
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
577
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
571
578
  var KNOWN_EFFORT_LABELS = {
572
579
  off: "Off",
573
580
  low: "Quick",
@@ -608,7 +615,7 @@ function effortMeterFill(levelId, levels = DEFAULT_EFFORT_LEVELS) {
608
615
  return Math.max(1, Math.floor((index + 1) * EFFORT_METER_SEGMENTS / active.length));
609
616
  }
610
617
  function EffortMeter({ fill, className }) {
611
- return /* @__PURE__ */ jsx4("span", { "aria-hidden": true, className: `inline-flex items-center gap-[2px] ${className ?? ""}`, children: Array.from({ length: EFFORT_METER_SEGMENTS }, (_, i) => /* @__PURE__ */ jsx4(
618
+ return /* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: `inline-flex items-center gap-[2px] ${className ?? ""}`, children: Array.from({ length: EFFORT_METER_SEGMENTS }, (_, i) => /* @__PURE__ */ jsx5(
612
619
  "span",
613
620
  {
614
621
  className: "h-3 w-[3px] rounded-full bg-current",
@@ -638,9 +645,10 @@ function EffortPicker({
638
645
  const selected = rendered.find((l) => l.id === value);
639
646
  return /* @__PURE__ */ jsxs3("div", { ref: containerRef, className: pickerRootClass(fullWidth || field), children: [
640
647
  /* @__PURE__ */ jsxs3(
641
- "button",
648
+ PickerTrigger,
642
649
  {
643
- type: "button",
650
+ variant,
651
+ icon: /* @__PURE__ */ jsx5(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0" }),
644
652
  ...triggerProps,
645
653
  id,
646
654
  disabled,
@@ -649,9 +657,9 @@ function EffortPicker({
649
657
  onClick: () => setOpen(!open),
650
658
  title: label ? `${label} \u2014 how hard the agent reasons before answering` : "Reasoning effort",
651
659
  "data-state": open ? "open" : "closed",
652
- className: `${field ? fieldPickerTriggerClass({ interactive: !disabled }) : variant === "quiet" ? quietPickerTriggerClass() : fullWidth ? "inline-flex min-h-[36px] shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent" : `${CHIP_PICKER_TRIGGER} shrink-0 hover:bg-accent`} ${fullWidth ? "w-full" : ""}`,
660
+ className: `${field ? fieldPickerTriggerClass({ interactive: !disabled }) : variant === "quiet" ? quietPickerTriggerClass() : ""} ${fullWidth ? "w-full" : ""}`,
653
661
  children: [
654
- /* @__PURE__ */ jsx4(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
662
+ variant !== "chip" && /* @__PURE__ */ jsx5(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
655
663
  /* @__PURE__ */ jsxs3("span", { className: fullWidth || field ? "flex-1 truncate text-left" : void 0, children: [
656
664
  label ? /* @__PURE__ */ jsxs3("span", { className: "text-muted-foreground", children: [
657
665
  label,
@@ -659,18 +667,18 @@ function EffortPicker({
659
667
  ] }) : null,
660
668
  selected ? selected.label : "\u2014"
661
669
  ] }),
662
- selected && isDeclared(selected.id) && /* @__PURE__ */ jsx4(
670
+ selected && isDeclared(selected.id) && /* @__PURE__ */ jsx5(
663
671
  EffortMeter,
664
672
  {
665
673
  fill: effortMeterFill(selected.id, levels),
666
674
  className: variant === "quiet" ? "shrink-0" : "shrink-0 text-foreground"
667
675
  }
668
676
  ),
669
- /* @__PURE__ */ jsx4(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
677
+ /* @__PURE__ */ jsx5(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
670
678
  ]
671
679
  }
672
680
  ),
673
- /* @__PURE__ */ jsx4(
681
+ /* @__PURE__ */ jsx5(
674
682
  PopoverSurface,
675
683
  {
676
684
  open,
@@ -693,10 +701,10 @@ function EffortPicker({
693
701
  },
694
702
  className: `flex min-h-[40px] w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition ${POPOVER_OPTION_FOCUS} ${l.id === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
695
703
  children: [
696
- /* @__PURE__ */ jsx4(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
697
- /* @__PURE__ */ jsx4("span", { className: "truncate", children: l.label }),
698
- isDeclared(l.id) && /* @__PURE__ */ jsx4(EffortMeter, { fill: effortMeterFill(l.id, levels), className: "ml-auto text-foreground" }),
699
- l.id === value && /* @__PURE__ */ jsx4(CheckGlyph, { className: `${isDeclared(l.id) ? "" : "ml-auto "}h-3.5 w-3.5 shrink-0 text-primary` })
704
+ /* @__PURE__ */ jsx5(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
705
+ /* @__PURE__ */ jsx5("span", { className: "truncate", children: l.label }),
706
+ isDeclared(l.id) && /* @__PURE__ */ jsx5(EffortMeter, { fill: effortMeterFill(l.id, levels), className: "ml-auto text-foreground" }),
707
+ l.id === value && /* @__PURE__ */ jsx5(CheckGlyph, { className: `${isDeclared(l.id) ? "" : "ml-auto "}h-3.5 w-3.5 shrink-0 text-primary` })
700
708
  ]
701
709
  },
702
710
  l.id
@@ -718,6 +726,7 @@ export {
718
726
  OVERLAY_SHADOW,
719
727
  pickerRootClass,
720
728
  fieldPickerTriggerClass,
729
+ PickerTrigger,
721
730
  quietPickerTriggerClass,
722
731
  usePending,
723
732
  formatModelPrice,
@@ -731,4 +740,4 @@ export {
731
740
  EffortMeter,
732
741
  EffortPicker
733
742
  };
734
- //# sourceMappingURL=chunk-6CDNITEO.js.map
743
+ //# sourceMappingURL=chunk-KNRXBBGV.js.map