@neuronection/assistant-ui 0.54.0 → 0.56.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @neuronection/assistant-ui
2
2
 
3
+ ## 0.56.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ca62ca8`](https://github.com/neuronection/assistant-ui/commit/ca62ca8cc92816788b35bf254cf1b8376725c112) Thanks [@constLiakos](https://github.com/constLiakos)! - **ModelRegistry: capability-kind add/edit form (plan 26 follow-up).** The add/edit modal becomes capability-conditional and grouped. New additive optional props: `standaloneCaps` + `standaloneLabel` (capabilities that are standalone kinds — decision, stt, tts, embeddings — render in their own cluster and select exclusively: a standalone kind replaces the chat caps and vice versa, expressing the family's D4 slot-separation law in the form) and `decisionTransport` + `decisionTransportLabel` (the app's shipping transport, e.g. `systemone`: a decision selection renders a read-only transport row and carries `decisionTransport` on `ModelRegistryDraft`/`Patch`/`Model`). Generation options — temperature, max tokens, reasoning effort — now render only when a chat-family capability (`text`/`vision`/`tools`) is selected; decision/stt/tts/embeddings models get the minimal form. Without the new props the form behaves exactly as before. Docs page updated in the same change; visual baselines need the CI rebaseline flow for the model-registry story if it renders the modal.
8
+
9
+ ## 0.55.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`20e78c5`](https://github.com/neuronection/assistant-ui/commit/20e78c58c3b1397afa7f2ca88e8fd99bf4361caf) Thanks [@constLiakos](https://github.com/constLiakos)! - **ProviderSetupTiles: per-tile capability chips (plan 26 §13.3 follow-up).** Preset entries gain an additive optional `chips?: { key: string; label: string }[]` (`ProviderSetupTileChip`), rendered with the existing `CapabilityChips` badge pattern — neutral styling, i18n labels prop-injected per the family rule (the app derives chips from its preset data: wire type → chat/vision/stt, `decision_models` → decision, keyless-local → local). Frozen props untouched; chips carry text (part of the tile's accessible name) and never rank tiles. Story, docs page, a11y row and README updated in the same change — visual baselines need the CI rebaseline flow for the `ai-settings-setup-tiles-story`.
14
+
3
15
  ## 0.54.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -112,7 +112,7 @@ Visual reference: [gallery](https://neuronection.github.io/assistant-ui/).
112
112
  | [`flow-status`](./docs/components/flow-status.md) | `FlowStatusCard` (multi-step AI-flow progress from the family event vocabulary: per-node status, current-step emphasis, progress summary, error + retryable, controlled retry/cancel/resume, `detail` slot for HITL cards) | [stories](https://neuronection.github.io/assistant-ui/?story=flow-status--running) |
113
113
  | [`flow-trace`](./docs/components/flow-trace.md) | `FlowTraceCard` (run ledger over the library-owned `FlowTrace` schema: outcome badge, stage timeline, per-call LLM table with tokens/latency/prompt version, ops ✓/✗ list, simulated badge for mock rows) + `FlowTelemetryStrip` (compact `calls · tokens in/out · edits` live counters) | [stories](https://neuronection.github.io/assistant-ui/?story=flow-trace--completed-run) |
114
114
  | [`settings-shell`](./docs/components/settings-shell.md) / [`provider-form`](./docs/components/provider-form.md) / [`connection-test-row`](./docs/components/connection-test-row.md) | `SettingsShell` (controlled two-pane nav) · `ProviderForm` (write-only API-key field) · `ConnectionTestRow` (idle/testing/ok/fail + latency, `inline` variant + meta slot) | [stories](https://neuronection.github.io/assistant-ui/?story=settings-trio--provider-form-story) |
115
- | [`provider-setup-tiles`](./docs/components/provider-setup-tiles.md) / [`provider-setup-form`](./docs/components/provider-setup-form.md) / [`setup-review`](./docs/components/setup-review.md) / [`switch-row`](./docs/components/switch-row.md) / [`provider-logo`](./docs/components/provider-logo.md) / [`setup-first-run-card`](./docs/components/setup-first-run-card.md) | The plan-26 one-click setup kit (BYOK + decision models): neutral equal-weight preset tiles (family order, no "recommended") · guided setup form (checklist + copy buttons, write-only `new-password` key, Advanced disclosure with fixed-base read-only, §15 error enum copy prop-injected) · editable pre-flight review emitting the five-bind options body `{curatedIds, bindChat, bindVision, bindStt, bindDecision}` (decision-only presets show the decision slot only) · labeled `role="switch"` row with `now:` sub-line · simple-icons provider mark with monogram fallback (openai/groq gone upstream), `currentColor` · first-run CTA card with local-probe status | [stories](https://neuronection.github.io/assistant-ui/?story=ai-settings-assembly--ai-settings-setup-tiles-story) |
115
+ | [`provider-setup-tiles`](./docs/components/provider-setup-tiles.md) / [`provider-setup-form`](./docs/components/provider-setup-form.md) / [`setup-review`](./docs/components/setup-review.md) / [`switch-row`](./docs/components/switch-row.md) / [`provider-logo`](./docs/components/provider-logo.md) / [`setup-first-run-card`](./docs/components/setup-first-run-card.md) | The plan-26 one-click setup kit (BYOK + decision models): neutral equal-weight preset tiles (family order, no "recommended", optional per-tile capability chips — chat/vision/decision/local, i18n labels prop-injected) · guided setup form (checklist + copy buttons, write-only `new-password` key, Advanced disclosure with fixed-base read-only, §15 error enum copy prop-injected) · editable pre-flight review emitting the five-bind options body `{curatedIds, bindChat, bindVision, bindStt, bindDecision}` (decision-only presets show the decision slot only) · labeled `role="switch"` row with `now:` sub-line · simple-icons provider mark with monogram fallback (openai/groq gone upstream), `currentColor` · first-run CTA card with local-probe status | [stories](https://neuronection.github.io/assistant-ui/?story=ai-settings-assembly--ai-settings-setup-tiles-story) |
116
116
  | [`admin-user-table`](./docs/components/admin-user-table.md) | `AdminUserTable` — controlled admin user management table (email + "(you)" marker, activity count, role/status, promote/demote, activate/deactivate, inline password reset with min-length gate, force logout; guard-rail 403s as friendly messages) | [stories](https://neuronection.github.io/assistant-ui/?story=admin-user-table--default) |
117
117
  | [`instance-mode-control`](./docs/components/instance-mode-control.md) | `InstanceModeControl` — controlled §4.5 instance access-mode panel (current mode, open→authenticated with owner credential set, authenticated→open with password + explicit ack, blocked states, audit note) | [stories](https://neuronection.github.io/assistant-ui/?story=instance-mode-control--open) |
118
118
  | [`login-form`](./docs/components/login-form.md) / [`register-form`](./docs/components/register-form.md) | `LoginForm` — controlled sign-in form (labelled email + password with visibility toggle, loading/error props, register/forgot link slots; no remember-me — HttpOnly sessions are server-owned) · `RegisterForm` — controlled registration form (confirm-password mismatch gate, optional full-name field, min-length hint, login link slot) | [stories](https://neuronection.github.io/assistant-ui/?story=login-form--default) |
@@ -1,3 +1,3 @@
1
- export { CapabilityChips } from './chunk-SY5FR4HC.js';
1
+ export { CapabilityChips } from './chunk-H5KOC7Z5.js';
2
2
  //# sourceMappingURL=capability-chips.js.map
3
3
  //# sourceMappingURL=capability-chips.js.map
@@ -1,4 +1,4 @@
1
- import { CapabilityChips } from './chunk-SY5FR4HC.js';
1
+ import { CapabilityChips } from './chunk-H5KOC7Z5.js';
2
2
  import { ModelPicker } from './chunk-CCFVDJHU.js';
3
3
  import { Modal, ModalContent, ModalHeader, ModalTitle, ModalFooter } from './chunk-FVQWIDB5.js';
4
4
  import { beautifyId } from './chunk-B2G66OSQ.js';
@@ -9,6 +9,12 @@ import * as React from 'react';
9
9
  import { ChevronDown, ChevronRight, Pencil, X, Plus, Check, ChevronUp } from 'lucide-react';
10
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
11
11
 
12
+ var PARAMETRIC_CAPS = /* @__PURE__ */ new Set(["text", "vision", "tools"]);
13
+ var hasParametricCaps = (caps) => caps.some((cap) => PARAMETRIC_CAPS.has(cap));
14
+ var normalizeCaps = (next, standalone) => {
15
+ const standaloneHit = next.find((cap) => standalone.has(cap));
16
+ return standaloneHit ? [standaloneHit] : next;
17
+ };
12
18
  var CUSTOM = "__custom__";
13
19
  function NumberField({
14
20
  label,
@@ -107,6 +113,8 @@ var ModelRegistry = React.forwardRef(
107
113
  missingLabel = "Missing",
108
114
  capsLabel = "Capabilities",
109
115
  capsHint,
116
+ standaloneCaps,
117
+ standaloneLabel = "Standalone",
110
118
  searchPlaceholder = "Search models\u2026",
111
119
  searchLabel = "Search models",
112
120
  emptyProviderLabel = "No models yet \u2014 use Add model to pick from the live catalog.",
@@ -119,6 +127,8 @@ var ModelRegistry = React.forwardRef(
119
127
  maxTokensLabel = "Max tokens",
120
128
  labelLabel = "Display label",
121
129
  reasoningEffortLabel = "Reasoning effort",
130
+ decisionTransport,
131
+ decisionTransportLabel = "Transport",
122
132
  saveLabel = "Save",
123
133
  cancelLabel = "Cancel",
124
134
  addDraftLabel = "Add model",
@@ -128,6 +138,18 @@ var ModelRegistry = React.forwardRef(
128
138
  }, ref) {
129
139
  const [modal, setModal] = React.useState(null);
130
140
  const [draftError, setDraftError] = React.useState(null);
141
+ const standaloneSet = React.useMemo(
142
+ () => new Set(standaloneCaps ?? []),
143
+ [standaloneCaps]
144
+ );
145
+ const combinableCaps = React.useMemo(
146
+ () => caps.filter((cap) => !standaloneSet.has(cap.value)),
147
+ [caps, standaloneSet]
148
+ );
149
+ const standaloneDescriptors = React.useMemo(
150
+ () => caps.filter((cap) => standaloneSet.has(cap.value)),
151
+ [caps, standaloneSet]
152
+ );
131
153
  const descriptorFor = React.useCallback(
132
154
  (value) => caps.find((cap) => cap.value === value) ?? { value, label: value },
133
155
  [caps]
@@ -140,16 +162,18 @@ var ModelRegistry = React.forwardRef(
140
162
  onExpandedProviderChange(expandedProviderId === providerId ? null : providerId);
141
163
  };
142
164
  const openAddModal = (providerId) => {
165
+ const firstCap = combinableCaps[0] ?? caps[0];
143
166
  setModal({
144
167
  mode: "add",
145
168
  providerId,
146
169
  externalId: "",
147
170
  label: "",
148
- caps: caps[0] ? [caps[0].value] : [],
171
+ caps: firstCap ? [firstCap.value] : [],
149
172
  reasoningEffort: "",
150
173
  reasoningCustom: false,
151
174
  temperature: "",
152
175
  maxTokens: "",
176
+ decisionTransport: "",
153
177
  extra: {},
154
178
  extraTouched: false,
155
179
  labelTouched: false,
@@ -169,6 +193,7 @@ var ModelRegistry = React.forwardRef(
169
193
  reasoningCustom: model.reasoningEffort != null && model.reasoningEffort !== "" && !(reasoningEffortOptions ?? []).includes(model.reasoningEffort),
170
194
  temperature: model.temperature != null ? String(model.temperature) : "",
171
195
  maxTokens: model.maxTokens != null ? String(model.maxTokens) : "",
196
+ decisionTransport: model.decisionTransport ?? "",
172
197
  extra: { ...model.extra ?? {} },
173
198
  extraTouched: false,
174
199
  model,
@@ -183,22 +208,34 @@ var ModelRegistry = React.forwardRef(
183
208
  };
184
209
  const selectRemote = (remoteId) => {
185
210
  const remote = (remoteModels ?? []).find((entry) => entry.id === remoteId);
186
- setModal(
187
- (current) => current ? {
211
+ setModal((current) => {
212
+ if (!current) return current;
213
+ const nextCaps = remote ? normalizeCaps([...remote.caps], standaloneSet) : current.caps;
214
+ return {
188
215
  ...current,
189
216
  externalId: remoteId,
190
- caps: remote ? [...remote.caps] : current.caps,
217
+ caps: nextCaps,
218
+ decisionTransport: nextCaps.includes("decision") ? decisionTransport ?? current.decisionTransport ?? "" : "",
191
219
  label: current.labelTouched ? current.label : beautifyId(remoteId)
192
- } : current
193
- );
220
+ };
221
+ });
194
222
  };
195
223
  const toggleDraftCap = (value) => {
196
- setModal(
197
- (current) => current ? {
224
+ setModal((current) => {
225
+ if (!current) return current;
226
+ const isStandalone = standaloneSet.has(value);
227
+ const nextCaps = isStandalone ? (
228
+ // a standalone kind replaces everything (or clears when toggled off)
229
+ current.caps.includes(value) ? current.caps.filter((entry) => entry !== value) : [value]
230
+ ) : current.caps.includes(value) ? current.caps.filter((entry) => entry !== value) : [...current.caps.filter((entry) => !standaloneSet.has(entry)), value];
231
+ return {
198
232
  ...current,
199
- caps: current.caps.includes(value) ? current.caps.filter((entry) => entry !== value) : [...current.caps, value]
200
- } : current
201
- );
233
+ caps: nextCaps,
234
+ // The decision capability stamps the app's shipping transport;
235
+ // without it there is no transport to carry.
236
+ decisionTransport: nextCaps.includes("decision") ? decisionTransport ?? current.decisionTransport ?? "" : ""
237
+ };
238
+ });
202
239
  };
203
240
  const patchField = (field, value) => {
204
241
  setModal((current) => current ? { ...current, [field]: value } : current);
@@ -217,6 +254,7 @@ var ModelRegistry = React.forwardRef(
217
254
  return;
218
255
  }
219
256
  const extra = modal.extraTouched || Object.values(modal.extra).some((value) => value.trim() !== "") ? { ...modal.extra } : void 0;
257
+ const isDecision = modal.caps.includes("decision");
220
258
  const payload = {
221
259
  externalId,
222
260
  label: modal.label.trim() || void 0,
@@ -224,12 +262,19 @@ var ModelRegistry = React.forwardRef(
224
262
  reasoningEffort: modal.reasoningEffort.trim(),
225
263
  temperature: numberOr(modal.temperature),
226
264
  maxTokens: numberOr(modal.maxTokens),
265
+ ...isDecision && modal.decisionTransport ? { decisionTransport: modal.decisionTransport } : {},
227
266
  ...extra !== void 0 ? { extra } : {}
228
267
  };
229
268
  if (modal.mode === "add") {
230
269
  onAddModel(modal.providerId, payload);
231
270
  } else if (modal.model) {
232
- onUpdateModel(modal.model, payload);
271
+ const patch = { ...payload };
272
+ if (isDecision) {
273
+ patch.decisionTransport = modal.decisionTransport || decisionTransport;
274
+ } else {
275
+ patch.decisionTransport = void 0;
276
+ }
277
+ onUpdateModel(modal.model, patch);
233
278
  }
234
279
  resetModal();
235
280
  };
@@ -338,7 +383,31 @@ var ModelRegistry = React.forwardRef(
338
383
  ] }),
339
384
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
340
385
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[var(--as-fg)]", children: capsLabel }),
341
- /* @__PURE__ */ jsx(
386
+ standaloneDescriptors.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
387
+ /* @__PURE__ */ jsx(
388
+ CapabilityChips,
389
+ {
390
+ caps: combinableCaps,
391
+ selected: modal.caps,
392
+ onToggle: toggleDraftCap,
393
+ ariaLabel: capsLabel
394
+ }
395
+ ),
396
+ /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 pt-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--as-muted-fg)]", children: [
397
+ /* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-[var(--as-border)]", "aria-hidden": true }),
398
+ standaloneLabel,
399
+ /* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-[var(--as-border)]", "aria-hidden": true })
400
+ ] }),
401
+ /* @__PURE__ */ jsx(
402
+ CapabilityChips,
403
+ {
404
+ caps: standaloneDescriptors,
405
+ selected: modal.caps,
406
+ onToggle: toggleDraftCap,
407
+ ariaLabel: standaloneLabel
408
+ }
409
+ )
410
+ ] }) : /* @__PURE__ */ jsx(
342
411
  CapabilityChips,
343
412
  {
344
413
  caps,
@@ -347,9 +416,16 @@ var ModelRegistry = React.forwardRef(
347
416
  ariaLabel: capsLabel
348
417
  }
349
418
  ),
419
+ modal.caps.includes("decision") && decisionTransport ? /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1.5 text-xs text-[var(--as-muted-fg)]", children: [
420
+ /* @__PURE__ */ jsxs("span", { children: [
421
+ decisionTransportLabel,
422
+ ":"
423
+ ] }),
424
+ /* @__PURE__ */ jsx("code", { className: "rounded-[var(--as-radius-sm)] bg-[var(--as-muted)] px-1.5 py-0.5 font-mono text-[10px] font-semibold uppercase tracking-wide text-[var(--as-fg)]", children: decisionTransport })
425
+ ] }) : null,
350
426
  capsHint ? /* @__PURE__ */ jsx("p", { className: "text-xs text-[var(--as-muted-fg)]", children: capsHint }) : null
351
427
  ] }),
352
- reasoningEffortOptions ? /* @__PURE__ */ jsxs("label", { className: "block space-y-1 text-sm", children: [
428
+ hasParametricCaps(modal.caps) && reasoningEffortOptions ? /* @__PURE__ */ jsxs("label", { className: "block space-y-1 text-sm", children: [
353
429
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[var(--as-fg)]", children: reasoningEffortLabel }),
354
430
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 sm:flex-row", children: modal.reasoningCustom ? /* @__PURE__ */ jsx(
355
431
  "input",
@@ -380,7 +456,7 @@ var ModelRegistry = React.forwardRef(
380
456
  }
381
457
  ) })
382
458
  ] }) : null,
383
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
459
+ hasParametricCaps(modal.caps) ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
384
460
  /* @__PURE__ */ jsx(
385
461
  NumberField,
386
462
  {
@@ -404,7 +480,7 @@ var ModelRegistry = React.forwardRef(
404
480
  min: "1"
405
481
  }
406
482
  )
407
- ] }),
483
+ ] }) : null,
408
484
  (extraFields ?? []).map((field) => {
409
485
  const value = modal.extra[field.key] ?? "";
410
486
  const common = "w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]";
@@ -616,5 +692,5 @@ var ModelRegistry = React.forwardRef(
616
692
  );
617
693
 
618
694
  export { ModelRegistry };
619
- //# sourceMappingURL=chunk-I5H4KYEZ.js.map
620
- //# sourceMappingURL=chunk-I5H4KYEZ.js.map
695
+ //# sourceMappingURL=chunk-AP56DLCQ.js.map
696
+ //# sourceMappingURL=chunk-AP56DLCQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/model-registry/ModelRegistry.tsx"],"names":["ModelRegistry"],"mappings":";;;;;;;;;;;AAgJA,IAAM,kCAAkB,IAAI,GAAA,CAAI,CAAC,MAAA,EAAQ,QAAA,EAAU,OAAO,CAAC,CAAA;AAG3D,IAAM,iBAAA,GAAoB,CAAC,IAAA,KACzB,IAAA,CAAK,IAAA,CAAK,CAAC,GAAA,KAAQ,eAAA,CAAgB,GAAA,CAAI,GAAG,CAAC,CAAA;AAO7C,IAAM,aAAA,GAAgB,CAAC,IAAA,EAAgB,UAAA,KAA8C;AACnF,EAAA,MAAM,aAAA,GAAgB,KAAK,IAAA,CAAK,CAAC,QAAQ,UAAA,CAAW,GAAA,CAAI,GAAG,CAAC,CAAA;AAC5D,EAAA,OAAO,aAAA,GAAgB,CAAC,aAAa,CAAA,GAAI,IAAA;AAC3C,CAAA;AAEA,IAAM,MAAA,GAAS,YAAA;AAWf,SAAS,WAAA,CAAY;AAAA,EACnB,KAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA,GAAO,GAAA;AAAA,EACP,GAAA;AAAA,EACA;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,IAAA,GAA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,OAAA,EAAQ,SAAA;AAAA,wBACR,IAAA,EAAK,IAAA;AAAA,wBACL,iBAAe,KAAA,EAAO,IAAA,KAAS,KAAA,IAAS,KAAA,CAAM,eAAe,QAAA,CAAS,EAAA;AAAA,wBACtE,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,CAAS,EAAE,CAAA;AAAA,wBAEvC,QAAA,EAAA;AAAA,0CAAA,GAAA,CAAC,IAAA,EAAA,EAAK,eAAW,IAAA,EAAC,CAAA;AAAA,0BACjB;AAAA;AAAA;AAAA,uBAEL,CAAA,GACE;AAAA,mBAAA,EACN,CAAA,GACE;AAAA;AAAA,eAAA;AAAA,cA/HC,QAAA,CAAS;AAAA,aAgIhB;AAAA,UAEJ,CAAC,CAAA;AAAA,UACA,UAAU,MAAA,KAAW,CAAA,mBACpB,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,mDAAA,EACb,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,mCAAA,EAAqC,QAAA,EAAA,mBAAA,EAAoB,CAAA;AAAA,YACrE;AAAA,WAAA,EACH,CAAA,GACE,IAAA;AAAA,UACH,WAAA;AAAY;AAAA;AAAA,KACf;AAAA,EAEJ;AACF","file":"chunk-AP56DLCQ.js","sourcesContent":["import * as React from 'react'\nimport { Check, ChevronDown, ChevronRight, ChevronUp, Pencil, Plus, X } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { Button } from '../button'\nimport { CapabilityChips, type CapabilityDescriptor } from '../capability-chips'\nimport { Modal, ModalContent, ModalHeader, ModalTitle, ModalFooter } from '../modal/Modal'\nimport { ModelPicker, type ModelPickerProvider } from '../model-picker/ModelPicker'\nimport { Spinner } from '../spinner'\nimport { beautifyId } from '../../lib/fuzzy'\n\nexport interface ModelRegistryProvider {\n id: string\n name: string\n type?: string\n baseUrl?: string\n /** Read-only provider: hides Add/Edit/Remove (e.g. org-managed providers). */\n readOnly?: boolean\n}\n\nexport interface ModelRegistryModel {\n id: string\n providerId: string\n externalId: string\n label?: string\n caps: string[]\n enabled: boolean\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n /** The model's decision transport (e.g. `systemone`) — set when `caps`\n * carries the app's decision capability. */\n decisionTransport?: string\n /** App-defined extra fields (see `extraFields`), carried verbatim. */\n extra?: Record<string, string>\n missing?: boolean\n}\n\nexport interface ModelRegistryRemoteModel {\n id: string\n caps: string[]\n}\n\nexport interface ModelRegistryDraft {\n externalId: string\n label?: string\n caps: string[]\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n decisionTransport?: string\n extra?: Record<string, string>\n}\n\nexport interface ModelRegistryPatch {\n label?: string\n caps?: string[]\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n decisionTransport?: string\n extra?: Record<string, string>\n}\n\nexport interface ModelRegistryExtraField {\n key: string\n label: string\n placeholder?: string\n /** Render a multi-line textarea instead of a single-line input. */\n multiline?: boolean\n}\n\nexport type ModelRegistryRemoteState = 'loading' | 'error' | 'ready'\n\nexport interface ModelRegistryProps {\n providers: ModelRegistryProvider[]\n models: ModelRegistryModel[]\n caps: CapabilityDescriptor[]\n expandedProviderId?: string | null\n onExpandedProviderChange: (providerId: string | null) => void\n remoteModels?: ModelRegistryRemoteModel[]\n remoteState?: ModelRegistryRemoteState\n remoteError?: string | null\n onRetryRemote?: () => void\n onAddModel: (providerId: string, draft: ModelRegistryDraft) => void\n onAddAll?: (providerId: string, drafts: ModelRegistryDraft[]) => void\n onUpdateModel: (model: ModelRegistryModel, patch: ModelRegistryPatch) => void\n onDeleteModel: (model: ModelRegistryModel) => void\n /** Toggle a model's enabled flag; renders the row checkbox when set. */\n onToggleEnabled?: (model: ModelRegistryModel, enabled: boolean) => void\n enableLabel?: string\n /** App-declared extra fields rendered in the add/edit modal (e.g. a\n * description line); values ride `extra` on Draft/Patch/Model. */\n extraFields?: ModelRegistryExtraField[]\n reasoningEffortOptions?: string[]\n addLabel?: string\n addAllLabel?: string\n addTitle?: string\n editTitle?: string\n selectModelLabel?: string\n manualIdToggleLabel?: string\n editLabel?: string\n removeLabel?: string\n missingLabel?: string\n capsLabel?: string\n /** Muted explainer under the capability chips (what they gate). */\n capsHint?: string\n /** Capability values that are standalone kinds (e.g. decision, stt, tts,\n * embeddings): selecting one makes the model exactly that kind — the\n * chat-family caps combine, standalone kinds replace everything (the\n * family's slot-separation law, D4, expressed in the form). */\n standaloneCaps?: string[]\n /** Label for the standalone-kinds cluster (`standaloneCaps`). */\n standaloneLabel?: string\n searchPlaceholder?: string\n searchLabel?: string\n emptyProviderLabel?: string\n externalIdRequiredLabel?: string\n remoteEmptyLabel?: string\n remoteLoadingLabel?: string\n retryLabel?: string\n customOptionLabel?: string\n temperatureLabel?: string\n maxTokensLabel?: string\n labelLabel?: string\n reasoningEffortLabel?: string\n /** The app's shipping decision transport (e.g. `systemone`): when set,\n * models with the decision capability render a read-only transport row\n * and carry the value on Draft/Patch. */\n decisionTransport?: string\n decisionTransportLabel?: string\n saveLabel?: string\n cancelLabel?: string\n addDraftLabel?: string\n providersEmptyLabel?: string\n emptyAction?: React.ReactNode\n className?: string\n}\n\n/**\n * Capabilities whose models take generation-side parameters (temperature,\n * max tokens, reasoning effort). Other capabilities (stt/tts/embeddings/\n * decision) render without those sections — plan 26 follow-up: options\n * are shown per capability, never always.\n */\nconst PARAMETRIC_CAPS = new Set(['text', 'vision', 'tools'])\n\n/** Whether any selected capability takes generation-side parameters. */\nconst hasParametricCaps = (caps: string[]): boolean =>\n caps.some((cap) => PARAMETRIC_CAPS.has(cap))\n\n/**\n * Catalog normalization for `standaloneCaps` (remote model pick): a caps\n * set may carry either one standalone kind (alone) or any combination of\n * the chat-family caps — never both, never two standalone kinds.\n */\nconst normalizeCaps = (next: string[], standalone: ReadonlySet<string>): string[] => {\n const standaloneHit = next.find((cap) => standalone.has(cap))\n return standaloneHit ? [standaloneHit] : next\n}\n\nconst CUSTOM = '__custom__'\ninterface NumberFieldProps {\n label: string\n value: string\n onChange: (value: string) => void\n onClear: () => void\n step?: string\n min?: string\n max?: string\n}\n\nfunction NumberField({\n label,\n value,\n onChange,\n onClear,\n step = '1',\n min,\n max,\n}: NumberFieldProps) {\n const bump = (delta: number) => {\n const current = value.trim() === '' ? 0 : Number(value)\n if (!Number.isFinite(current)) return\n const next = current + delta\n onChange(String(min != null && next < Number(min) ? Number(min) : next))\n }\n return (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{label}</span>\n <span className=\"relative block\">\n <input\n type=\"number\"\n step={step}\n min={min}\n max={max}\n value={value}\n onChange={(event) => onChange(event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 pr-16 text-sm text-[var(--as-fg)] [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none\"\n />\n <span className=\"absolute inset-y-0 right-1.5 flex items-center gap-1\">\n {value !== '' ? (\n <button\n type=\"button\"\n aria-label={`${label} clear`}\n onClick={onClear}\n className=\"cursor-pointer text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <X className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n <span className=\"flex flex-col\">\n <button\n type=\"button\"\n aria-label={`${label} increment`}\n onClick={() => bump(Number(step))}\n className=\"cursor-pointer leading-none text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <ChevronUp className=\"size-3.5\" aria-hidden />\n </button>\n <button\n type=\"button\"\n aria-label={`${label} decrement`}\n onClick={() => bump(-Number(step))}\n className=\"cursor-pointer leading-none text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <ChevronDown className=\"size-3.5\" aria-hidden />\n </button>\n </span>\n </span>\n </span>\n </label>\n )\n}\n\ninterface ModalState {\n mode: 'add' | 'edit'\n providerId: string\n externalId: string\n label: string\n caps: string[]\n reasoningEffort: string\n reasoningCustom: boolean\n temperature: string\n maxTokens: string\n decisionTransport: string\n extra: Record<string, string>\n extraTouched: boolean\n labelTouched: boolean\n model?: ModelRegistryModel\n manual: boolean\n}\n\nexport const ModelRegistry = React.forwardRef<HTMLDivElement, ModelRegistryProps>(\n function ModelRegistry(\n {\n providers,\n models,\n caps,\n expandedProviderId,\n onExpandedProviderChange,\n remoteModels,\n remoteState = 'ready',\n remoteError,\n onRetryRemote,\n onAddModel,\n onAddAll,\n onUpdateModel,\n onDeleteModel,\n onToggleEnabled,\n enableLabel = 'Enabled',\n extraFields,\n reasoningEffortOptions,\n addLabel = 'Add model',\n addAllLabel = 'Add all',\n addTitle = 'Add model',\n editTitle = 'Edit model',\n selectModelLabel = 'Model',\n manualIdToggleLabel = 'Enter the model id manually',\n editLabel = 'Edit',\n removeLabel = 'Remove',\n missingLabel = 'Missing',\n capsLabel = 'Capabilities',\n capsHint,\n standaloneCaps,\n standaloneLabel = 'Standalone',\n searchPlaceholder = 'Search models…',\n searchLabel = 'Search models',\n emptyProviderLabel = 'No models yet — use Add model to pick from the live catalog.',\n externalIdRequiredLabel = 'The model id is required.',\n remoteEmptyLabel = 'The provider listed no models.',\n remoteLoadingLabel = 'Loading models…',\n retryLabel = 'Retry',\n customOptionLabel = 'Custom…',\n temperatureLabel = 'Temperature',\n maxTokensLabel = 'Max tokens',\n labelLabel = 'Display label',\n reasoningEffortLabel = 'Reasoning effort',\n decisionTransport,\n decisionTransportLabel = 'Transport',\n saveLabel = 'Save',\n cancelLabel = 'Cancel',\n addDraftLabel = 'Add model',\n providersEmptyLabel = 'No providers yet.',\n emptyAction,\n className,\n },\n ref,\n ) {\n const [modal, setModal] = React.useState<ModalState | null>(null)\n const [draftError, setDraftError] = React.useState<string | null>(null)\n\n const standaloneSet = React.useMemo(\n () => new Set(standaloneCaps ?? []),\n [standaloneCaps],\n )\n const combinableCaps = React.useMemo(\n () => caps.filter((cap) => !standaloneSet.has(cap.value)),\n [caps, standaloneSet],\n )\n const standaloneDescriptors = React.useMemo(\n () => caps.filter((cap) => standaloneSet.has(cap.value)),\n [caps, standaloneSet],\n )\n\n const descriptorFor = React.useCallback(\n (value: string): CapabilityDescriptor =>\n caps.find((cap) => cap.value === value) ?? { value, label: value },\n [caps],\n )\n\n const resetModal = React.useCallback(() => {\n setModal(null)\n setDraftError(null)\n }, [])\n\n const toggleProvider = (providerId: string) => {\n onExpandedProviderChange(expandedProviderId === providerId ? null : providerId)\n }\n\n const openAddModal = (providerId: string) => {\n const firstCap = combinableCaps[0] ?? caps[0]\n setModal({\n mode: 'add',\n providerId,\n externalId: '',\n label: '',\n caps: firstCap ? [firstCap.value] : [],\n reasoningEffort: '',\n reasoningCustom: false,\n temperature: '',\n maxTokens: '',\n decisionTransport: '',\n extra: {},\n extraTouched: false,\n labelTouched: false,\n manual: false,\n })\n setDraftError(null)\n }\n\n const openEditModal = (model: ModelRegistryModel) => {\n setModal({\n mode: 'edit',\n providerId: model.providerId,\n externalId: model.externalId,\n label: model.label ?? '',\n caps: [...model.caps],\n labelTouched: true,\n reasoningEffort: model.reasoningEffort ?? '',\n reasoningCustom:\n model.reasoningEffort != null &&\n model.reasoningEffort !== '' &&\n !(reasoningEffortOptions ?? []).includes(model.reasoningEffort),\n temperature: model.temperature != null ? String(model.temperature) : '',\n maxTokens: model.maxTokens != null ? String(model.maxTokens) : '',\n decisionTransport: model.decisionTransport ?? '',\n extra: { ...(model.extra ?? {}) },\n extraTouched: false,\n model,\n manual: false,\n })\n setDraftError(null)\n }\n\n const patchExtraField = (key: string, value: string) => {\n setModal((current) =>\n current\n ? { ...current, extra: { ...current.extra, [key]: value }, extraTouched: true }\n : current,\n )\n }\n\n const selectRemote = (remoteId: string) => {\n const remote = (remoteModels ?? []).find((entry) => entry.id === remoteId)\n setModal((current) => {\n if (!current) return current\n const nextCaps = remote ? normalizeCaps([...remote.caps], standaloneSet) : current.caps\n return {\n ...current,\n externalId: remoteId,\n caps: nextCaps,\n decisionTransport: nextCaps.includes('decision')\n ? (decisionTransport ?? current.decisionTransport ?? '')\n : '',\n label: current.labelTouched ? current.label : beautifyId(remoteId),\n }\n })\n }\n\n const toggleDraftCap = (value: string) => {\n setModal((current) => {\n if (!current) return current\n const isStandalone = standaloneSet.has(value)\n const nextCaps = isStandalone\n ? // a standalone kind replaces everything (or clears when toggled off)\n current.caps.includes(value)\n ? current.caps.filter((entry) => entry !== value)\n : [value]\n : current.caps.includes(value)\n ? current.caps.filter((entry) => entry !== value)\n : [...current.caps.filter((entry) => !standaloneSet.has(entry)), value]\n return {\n ...current,\n caps: nextCaps,\n // The decision capability stamps the app's shipping transport;\n // without it there is no transport to carry.\n decisionTransport: nextCaps.includes('decision')\n ? (decisionTransport ?? current.decisionTransport ?? '')\n : '',\n }\n })\n }\n\n const patchField = (field: keyof ModalState, value: string) => {\n setModal((current) => (current ? { ...current, [field]: value } : current))\n }\n\n const numberOr = (raw: string): number | null => {\n const trimmed = raw.trim()\n if (!trimmed) return null\n const parsed = Number(trimmed)\n return Number.isFinite(parsed) ? parsed : null\n }\n\n const submitModal = () => {\n if (!modal) return\n const externalId = modal.externalId.trim()\n if (!externalId) {\n setDraftError(externalIdRequiredLabel)\n return\n }\n const extra: Record<string, string> | undefined =\n modal.extraTouched || Object.values(modal.extra).some((value) => value.trim() !== '')\n ? { ...modal.extra }\n : undefined\n const isDecision = modal.caps.includes('decision')\n const payload: ModelRegistryDraft = {\n externalId,\n label: modal.label.trim() || undefined,\n caps: modal.caps,\n reasoningEffort: modal.reasoningEffort.trim(),\n temperature: numberOr(modal.temperature),\n maxTokens: numberOr(modal.maxTokens),\n ...(isDecision && modal.decisionTransport\n ? { decisionTransport: modal.decisionTransport }\n : {}),\n ...(extra !== undefined ? { extra } : {}),\n }\n if (modal.mode === 'add') {\n onAddModel(modal.providerId, payload)\n } else if (modal.model) {\n const patch: ModelRegistryPatch = { ...payload }\n if (isDecision) {\n patch.decisionTransport = modal.decisionTransport || decisionTransport\n } else {\n patch.decisionTransport = undefined\n }\n onUpdateModel(modal.model, patch)\n }\n resetModal()\n }\n\n const remoteForProvider = (provider: ModelRegistryProvider): ModelPickerProvider[] => {\n const items = remoteModels ?? []\n if (items.length === 0) return []\n return [\n {\n id: provider.id,\n name: provider.name,\n models: items.map((entry) => ({\n id: entry.id,\n name: entry.id,\n capabilities: entry.caps,\n })),\n },\n ]\n }\n\n const renderModal = () => {\n if (!modal) return null\n const provider = providers.find((entry) => entry.id === modal.providerId)\n const catalog = provider ? remoteForProvider(provider) : []\n const pendingCount = (remoteModels ?? []).filter(\n (remote) =>\n !models.some(\n (model) => model.providerId === modal.providerId && model.externalId === remote.id,\n ),\n ).length\n return (\n <Modal open onOpenChange={(open: boolean) => (!open ? resetModal() : undefined)}>\n <ModalContent className=\"max-h-[85vh] w-full max-w-lg overflow-y-auto\">\n <ModalHeader>\n <ModalTitle className=\"text-base\">\n {modal.mode === 'add' ? addTitle : `${editTitle} — ${modal.externalId}`}\n </ModalTitle>\n </ModalHeader>\n <div className=\"flex flex-col gap-4 p-4\">\n {modal.mode === 'add' ? (\n remoteState === 'loading' ? (\n <p className=\"flex items-center justify-center gap-2 py-4 text-xs text-[var(--as-muted-fg)]\">\n <Spinner size=\"sm\" />\n {remoteLoadingLabel}\n </p>\n ) : remoteState === 'error' ? (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <p className=\"truncate text-xs text-[var(--as-danger)]\">{remoteError}</p>\n {onRetryRemote ? (\n <Button variant=\"outline\" size=\"sm\" onClick={onRetryRemote}>\n {retryLabel}\n </Button>\n ) : null}\n </div>\n {modal.manual ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {selectModelLabel}\n </span>\n <input\n type=\"text\"\n value={modal.externalId}\n onChange={(event) => patchField('externalId', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)]\"\n />\n </label>\n ) : (\n <button\n type=\"button\"\n className=\"cursor-pointer self-start text-xs text-[var(--as-muted-fg)] underline-offset-2 hover:text-[var(--as-fg)] hover:underline\"\n onClick={() => setModal((c) => (c ? { ...c, manual: true } : c))}\n >\n {manualIdToggleLabel}\n </button>\n )}\n </>\n ) : (\n <>\n {modal.manual ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {selectModelLabel}\n </span>\n <input\n type=\"text\"\n value={modal.externalId}\n onChange={(event) => patchField('externalId', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)]\"\n />\n </label>\n ) : (\n <ModelPicker\n providers={catalog}\n value={modal.externalId}\n onChange={(modelId) => (modelId ? selectRemote(modelId) : undefined)}\n label={selectModelLabel}\n searchPlaceholder={searchPlaceholder}\n searchLabel={searchLabel}\n emptyLabel={remoteEmptyLabel}\n />\n )}\n <button\n type=\"button\"\n className=\"cursor-pointer self-start text-xs text-[var(--as-muted-fg)] underline-offset-2 hover:text-[var(--as-fg)] hover:underline\"\n onClick={() => setModal((c) => (c ? { ...c, manual: !c.manual } : c))}\n >\n {manualIdToggleLabel}\n </button>\n </>\n )\n ) : (\n <p className=\"font-mono text-sm text-[var(--as-fg)]\">{modal.externalId}</p>\n )}\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{labelLabel}</span>\n <input\n type=\"text\"\n value={modal.label}\n onChange={(event) =>\n setModal((current) =>\n current\n ? { ...current, label: event.target.value, labelTouched: true }\n : current,\n )\n }\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]\"\n />\n </label>\n <div className=\"space-y-1\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{capsLabel}</span>\n {standaloneDescriptors.length > 0 ? (\n <>\n <CapabilityChips\n caps={combinableCaps}\n selected={modal.caps}\n onToggle={toggleDraftCap}\n ariaLabel={capsLabel}\n />\n <p className=\"flex items-center gap-2 pt-1 text-[10px] font-semibold uppercase tracking-wide text-[var(--as-muted-fg)]\">\n <span className=\"h-px flex-1 bg-[var(--as-border)]\" aria-hidden />\n {standaloneLabel}\n <span className=\"h-px flex-1 bg-[var(--as-border)]\" aria-hidden />\n </p>\n <CapabilityChips\n caps={standaloneDescriptors}\n selected={modal.caps}\n onToggle={toggleDraftCap}\n ariaLabel={standaloneLabel}\n />\n </>\n ) : (\n <CapabilityChips\n caps={caps}\n selected={modal.caps}\n onToggle={toggleDraftCap}\n ariaLabel={capsLabel}\n />\n )}\n {modal.caps.includes('decision') && decisionTransport ? (\n <p className=\"flex items-center gap-1.5 text-xs text-[var(--as-muted-fg)]\">\n <span>{decisionTransportLabel}:</span>\n <code className=\"rounded-[var(--as-radius-sm)] bg-[var(--as-muted)] px-1.5 py-0.5 font-mono text-[10px] font-semibold uppercase tracking-wide text-[var(--as-fg)]\">\n {decisionTransport}\n </code>\n </p>\n ) : null}\n {capsHint ? (\n <p className=\"text-xs text-[var(--as-muted-fg)]\">{capsHint}</p>\n ) : null}\n </div>\n {hasParametricCaps(modal.caps) && reasoningEffortOptions ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {reasoningEffortLabel}\n </span>\n <div className=\"flex flex-col gap-2 sm:flex-row\">\n {modal.reasoningCustom ? (\n <input\n type=\"text\"\n value={modal.reasoningEffort}\n placeholder={customOptionLabel}\n onChange={(event) => patchField('reasoningEffort', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)] sm:flex-1\"\n />\n ) : (\n <select\n value={modal.reasoningCustom ? CUSTOM : modal.reasoningEffort}\n onChange={(event) =>\n setModal((current) =>\n current\n ? {\n ...current,\n reasoningCustom: event.target.value === CUSTOM,\n reasoningEffort:\n event.target.value === CUSTOM\n ? current.reasoningEffort\n : event.target.value,\n }\n : current,\n )\n }\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)] sm:w-40\"\n >\n <option value=\"\">—</option>\n {reasoningEffortOptions.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n <option value={CUSTOM}>{customOptionLabel}</option>\n </select>\n )}\n </div>\n </label>\n ) : null}\n {hasParametricCaps(modal.caps) ? (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <NumberField\n label={temperatureLabel}\n value={modal.temperature}\n onChange={(value) => patchField('temperature', value)}\n onClear={() => patchField('temperature', '')}\n step=\"0.1\"\n min=\"0\"\n max=\"2\"\n />\n <NumberField\n label={maxTokensLabel}\n value={modal.maxTokens}\n onChange={(value) => patchField('maxTokens', value)}\n onClear={() => patchField('maxTokens', '')}\n step=\"256\"\n min=\"1\"\n />\n </div>\n ) : null}\n {(extraFields ?? []).map((field) => {\n const value = modal.extra[field.key] ?? ''\n const common =\n 'w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]'\n return (\n <label key={field.key} className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{field.label}</span>\n {field.multiline ? (\n <textarea\n rows={2}\n value={value}\n placeholder={field.placeholder}\n onChange={(event) => patchExtraField(field.key, event.target.value)}\n className={common}\n />\n ) : (\n <input\n type=\"text\"\n value={value}\n placeholder={field.placeholder}\n onChange={(event) => patchExtraField(field.key, event.target.value)}\n className={common}\n />\n )}\n </label>\n )\n })}\n {draftError ? (\n <p role=\"alert\" className=\"text-xs text-[var(--as-danger)]\">\n {draftError}\n </p>\n ) : null}\n </div>\n <ModalFooter>\n {modal.mode === 'add' && onAddAll ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={remoteState !== 'ready' || pendingCount === 0}\n onClick={() => {\n onAddAll(\n modal.providerId,\n (remoteModels ?? [])\n .filter(\n (remote) =>\n !models.some(\n (model) =>\n model.providerId === modal.providerId &&\n model.externalId === remote.id,\n ),\n )\n .map((remote) => ({\n externalId: remote.id,\n caps: remote.caps,\n reasoningEffort: '',\n temperature: null,\n maxTokens: null,\n })),\n )\n resetModal()\n }}\n >\n <Plus aria-hidden />\n {addAllLabel} ({pendingCount})\n </Button>\n ) : null}\n <Button variant=\"ghost\" size=\"sm\" onClick={resetModal}>\n {cancelLabel}\n </Button>\n <Button size=\"sm\" onClick={submitModal}>\n <Check aria-hidden />\n {modal.mode === 'add' ? addDraftLabel : saveLabel}\n </Button>\n </ModalFooter>\n </ModalContent>\n </Modal>\n )\n }\n\n return (\n <div\n ref={ref}\n data-as=\"model-registry\"\n className={cn('flex w-full flex-col gap-4', className)}\n >\n {providers.map((provider) => {\n const expanded = expandedProviderId === provider.id\n const providerModels = models.filter((model) => model.providerId === provider.id)\n return (\n <div\n key={provider.id}\n data-as=\"model-registry-provider\"\n className={cn(\n 'rounded-[var(--as-radius-lg)] border bg-[var(--as-surface)] transition-all',\n expanded\n ? 'border-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)]',\n )}\n >\n <button\n type=\"button\"\n aria-expanded={expanded}\n onClick={() => toggleProvider(provider.id)}\n className=\"group flex w-full cursor-pointer items-center gap-4 p-4 text-left focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]\"\n >\n <span\n className={cn(\n 'flex size-9 shrink-0 items-center justify-center rounded-[var(--as-radius)] transition-colors',\n expanded\n ? 'bg-[var(--as-primary)] text-[var(--as-primary-fg)]'\n : 'bg-[var(--as-muted)] text-[var(--as-muted-fg)] group-hover:bg-[var(--as-primary)]/10 group-hover:text-[var(--as-primary)]',\n )}\n >\n {expanded ? (\n <ChevronDown className=\"size-5\" aria-hidden />\n ) : (\n <ChevronRight className=\"size-5\" aria-hidden />\n )}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex flex-wrap items-center gap-2 text-sm font-semibold text-[var(--as-fg)]\">\n {provider.name}\n {provider.type ? (\n <span className=\"rounded-full border border-[var(--as-border)] px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-[var(--as-muted-fg)]\">\n {provider.type}\n </span>\n ) : null}\n {providerModels.length ? (\n <span className=\"rounded-full bg-[var(--as-muted)] px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-widest text-[var(--as-muted-fg)]\">\n {providerModels.filter((model) => model.enabled).length}/\n {providerModels.length}\n </span>\n ) : null}\n </span>\n {provider.baseUrl ? (\n <span className=\"block truncate font-mono text-xs text-[var(--as-muted-fg)]\">\n {provider.baseUrl}\n </span>\n ) : null}\n </span>\n </button>\n {expanded ? (\n <div className=\"as-anim-fade flex flex-col gap-2 border-t border-[var(--as-border)] p-4\">\n {!provider.readOnly && providerModels.length === 0 ? (\n <p className=\"text-xs text-[var(--as-muted-fg)]\">\n {emptyProviderLabel}\n </p>\n ) : null}\n {providerModels.map((model) => {\n return (\n <div\n key={model.id}\n className={cn(\n 'flex min-w-0 items-center gap-2 rounded-[var(--as-radius-sm)] border border-[var(--as-border)] px-3 py-2 text-sm',\n model.missing && 'opacity-50',\n )}\n >\n {onToggleEnabled && !provider.readOnly ? (\n <input\n type=\"checkbox\"\n aria-label={`${enableLabel} — ${model.externalId}`}\n checked={model.enabled}\n onChange={(event) => onToggleEnabled(model, event.target.checked)}\n className=\"size-4 shrink-0 cursor-pointer accent-[var(--as-primary)]\"\n />\n ) : null}\n <span className=\"min-w-0 flex-1 truncate font-mono text-xs text-[var(--as-fg)]\">\n {model.externalId}\n </span>\n {model.missing ? (\n <span className=\"text-xs text-[var(--as-warning)]\">\n {missingLabel}\n </span>\n ) : null}\n <CapabilityChips\n variant=\"badge\"\n caps={model.caps.map(descriptorFor)}\n selected={model.caps}\n />\n {!provider.readOnly ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${editLabel} ${model.externalId}`}\n onClick={() => openEditModal(model)}\n >\n <Pencil aria-hidden />\n {editLabel}\n </Button>\n ) : null}\n {!provider.readOnly ? (\n <button\n type=\"button\"\n aria-label={`${removeLabel} ${model.externalId}`}\n onClick={() => onDeleteModel(model)}\n className=\"cursor-pointer rounded-[var(--as-radius-sm)] p-1.5 text-[var(--as-muted-fg)] transition-colors hover:bg-[var(--as-muted)] hover:text-[var(--as-fg)] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]\"\n >\n <X className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n </div>\n )\n })}\n {!provider.readOnly ? (\n <div className=\"pt-1\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-expanded={modal?.mode === 'add' && modal.providerId === provider.id}\n onClick={() => openAddModal(provider.id)}\n >\n <Plus aria-hidden />\n {addLabel}\n </Button>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n })}\n {providers.length === 0 ? (\n <div className=\"flex flex-col items-center gap-2 py-8 text-center\">\n <p className=\"text-sm text-[var(--as-muted-fg)]\">{providersEmptyLabel}</p>\n {emptyAction}\n </div>\n ) : null}\n {renderModal()}\n </div>\n )\n },\n)\n\n"]}
@@ -76,5 +76,5 @@ var CapabilityChips = React.forwardRef(
76
76
  );
77
77
 
78
78
  export { CapabilityChips };
79
- //# sourceMappingURL=chunk-SY5FR4HC.js.map
80
- //# sourceMappingURL=chunk-SY5FR4HC.js.map
79
+ //# sourceMappingURL=chunk-H5KOC7Z5.js.map
80
+ //# sourceMappingURL=chunk-H5KOC7Z5.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/capability-chips/CapabilityChips.tsx"],"names":["CapabilityChips"],"mappings":";;;;;AAsBO,IAAM,eAAA,GAAwB,KAAA,CAAA,UAAA;AAAA,EACnC,SAASA,gBAAAA,CACP;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA,GAAU,QAAA;AAAA,IACV,WAAA,G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AAW,MAAC,CAAA,GAAK,IAAA;AAAA,kBACnD,GAAA,CAAI;AAAA;AAAA,eAAA;AAAA,cAZA,GAAA,CAAI;AAAA,aAaX;AAAA,UAEJ;AACA,UAAA,uBACE,IAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cAEC,IAAA,EAAK,QAAA;AAAA,cACL,eAAa,GAAA,CAAI,KAAA;AAAA,cACjB,cAAA,EAAc,EAAA;AAAA,cACd,QAAA,EAAU,QAAA,IAAY,MAAA,CAAO,GAAA,CAAI,KAAK,CAAA;AAAA,cACtC,OAAA,EAAS,MAAM,QAAA,GAAW,GAAA,CAAI,KAAK,CAAA;AAAA,cACnC,SAAA,EAAW,EAAA;AAAA,gBACT,oJAAA;AAAA,gBACA,qGAAA;AAAA,gBACA,kDAAA;AAAA,gBACA,KACI,8GAAA,GACA;AAAA,eACN;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,IAAA,uBAAQ,IAAA,EAAA,EAAK,SAAA,EAAU,UAAA,EAAW,aAAA,EAAW,MAAC,CAAA,GAAK,IAAA;AAAA,gBACnD,GAAA,CAAI,KAAA;AAAA,gBACJ,qBAAK,GAAA,CAAC,KAAA,EAAA,EAAM,WAAU,QAAA,EAAS,aAAA,EAAW,MAAC,CAAA,GAAK;AAAA;AAAA,aAAA;AAAA,YAjB5C,GAAA,CAAI;AAAA,WAkBX;AAAA,QAEJ,CAAC;AAAA;AAAA,KACH;AAAA,EAEJ;AACF","file":"chunk-SY5FR4HC.js","sourcesContent":["import * as React from 'react'\nimport { Check } from 'lucide-react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nexport interface CapabilityDescriptor {\n value: string\n label: string\n icon?: LucideIcon\n}\n\nexport interface CapabilityChipsProps {\n caps: CapabilityDescriptor[]\n selected: string[]\n onToggle?: (value: string) => void\n variant?: 'toggle' | 'badge'\n minSelected?: number\n disabled?: boolean\n ariaLabel?: string\n className?: string\n}\n\nexport const CapabilityChips = React.forwardRef<HTMLDivElement, CapabilityChipsProps>(\n function CapabilityChips(\n {\n caps,\n selected,\n onToggle,\n variant = 'toggle',\n minSelected = 0,\n disabled = false,\n ariaLabel,\n className,\n },\n ref,\n ) {\n const interactive = variant === 'toggle' && Boolean(onToggle)\n const locked = (value: string) =>\n interactive && !disabled && selected.includes(value) && selected.length <= minSelected\n\n return (\n <div\n ref={ref}\n data-as=\"capability-chips\"\n data-variant={variant}\n role={interactive ? 'group' : undefined}\n aria-label={interactive ? ariaLabel : undefined}\n className={cn('flex flex-wrap items-center gap-1.5', className)}\n >\n {caps.map((cap) => {\n const on = selected.includes(cap.value)\n const Icon = cap.icon\n if (!interactive) {\n return (\n <span\n key={cap.value}\n data-as-cap={cap.value}\n data-active={on || undefined}\n title={`${cap.label} capability`}\n className={cn(\n 'inline-flex items-center gap-1 rounded-[var(--as-radius-sm)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide',\n on\n ? 'bg-[var(--as-primary)]/10 text-[var(--as-primary)]'\n : 'bg-[var(--as-muted)] text-[var(--as-muted-fg)]',\n )}\n >\n {Icon ? <Icon className=\"size-2.5\" aria-hidden /> : null}\n {cap.label}\n </span>\n )\n }\n return (\n <button\n key={cap.value}\n type=\"button\"\n data-as-cap={cap.value}\n aria-pressed={on}\n disabled={disabled || locked(cap.value)}\n onClick={() => onToggle?.(cap.value)}\n className={cn(\n 'flex cursor-pointer items-center gap-1.5 rounded-[var(--as-radius)] border px-3 py-2 text-xs font-semibold uppercase tracking-wider transition-all',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]',\n 'disabled:pointer-events-none disabled:opacity-60',\n on\n ? 'border-[var(--as-primary)]/30 bg-[var(--as-primary)]/10 text-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] text-[var(--as-muted-fg)] hover:border-[var(--as-muted-fg)]/40',\n )}\n >\n {Icon ? <Icon className=\"size-3.5\" aria-hidden /> : null}\n {cap.label}\n {on ? <Check className=\"size-3\" aria-hidden /> : null}\n </button>\n )\n })}\n </div>\n )\n },\n)\n"]}
1
+ {"version":3,"sources":["../src/components/capability-chips/CapabilityChips.tsx"],"names":["CapabilityChips"],"mappings":";;;;;AAsBO,IAAM,eAAA,GAAwB,KAAA,CAAA,UAAA;AAAA,EACnC,SAASA,gBAAAA,CACP;AAAA,IACE,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA,GAAU,QAAA;AAAA,IACV,WAAA,GAAc,CAAA;AAAA,IACd,QAAA,GAAW,KAAA;AAAA,IACX,SAAA;AAAA,IACA;AAAA,KAEF,GAAA,EACA;AACA,IAAA,MAAM,WAAA,GAAc,OAAA,KAAY,QAAA,IAAY,OAAA,CAAQ,QAAQ,CAAA;AAC5D,IAAA,MAAM,MAAA,GAAS,CAAC,KAAA,KACd,WAAA,IAAe,CAAC,QAAA,IAAY,QAAA,CAAS,QAAA,CAAS,KAAK,CAAA,IAAK,QAAA,CAAS,MAAA,IAAU,WAAA;AAE7E,IAAA,uBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAQ,kBAAA;AAAA,QACR,cAAA,EAAc,OAAA;AAAA,QACd,IAAA,EAAM,cAAc,OAAA,GAAU,MAAA;AAAA,QAC9B,YAAA,EAAY,cAAc,SAAA,GAAY,MAAA;AAAA,QACtC,SAAA,EAAW,EAAA,CAAG,qCAAA,EAAuC,SAAS,CAAA;AAAA,QAE7D,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAC,GAAA,KAAQ;AACjB,UAAA,MAAM,EAAA,GAAK,QAAA,CAAS,QAAA,CAAS,GAAA,CAAI,KAAK,CAAA;AACtC,UAAA,MAAM,OAAO,GAAA,CAAI,IAAA;AACjB,UAAA,IAAI,CAAC,WAAA,EAAa;AAChB,YAAA,uBACE,IAAA;AAAA,cAAC,MAAA;AAAA,cAAA;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AA,EAEJ;AACF","file":"chunk-H5KOC7Z5.js","sourcesContent":["import * as React from 'react'\nimport { Check } from 'lucide-react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nexport interface CapabilityDescriptor {\n value: string\n label: string\n icon?: LucideIcon\n}\n\nexport interface CapabilityChipsProps {\n caps: CapabilityDescriptor[]\n selected: string[]\n onToggle?: (value: string) => void\n variant?: 'toggle' | 'badge'\n minSelected?: number\n disabled?: boolean\n ariaLabel?: string\n className?: string\n}\n\nexport const CapabilityChips = React.forwardRef<HTMLDivElement, CapabilityChipsProps>(\n function CapabilityChips(\n {\n caps,\n selected,\n onToggle,\n variant = 'toggle',\n minSelected = 0,\n disabled = false,\n ariaLabel,\n className,\n },\n ref,\n ) {\n const interactive = variant === 'toggle' && Boolean(onToggle)\n const locked = (value: string) =>\n interactive && !disabled && selected.includes(value) && selected.length <= minSelected\n\n return (\n <div\n ref={ref}\n data-as=\"capability-chips\"\n data-variant={variant}\n role={interactive ? 'group' : undefined}\n aria-label={interactive ? ariaLabel : undefined}\n className={cn('flex flex-wrap items-center gap-1.5', className)}\n >\n {caps.map((cap) => {\n const on = selected.includes(cap.value)\n const Icon = cap.icon\n if (!interactive) {\n return (\n <span\n key={cap.value}\n data-as-cap={cap.value}\n data-active={on || undefined}\n title={`${cap.label} capability`}\n className={cn(\n 'inline-flex items-center gap-1 rounded-[var(--as-radius-sm)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide',\n on\n ? 'bg-[var(--as-primary)]/10 text-[var(--as-primary)]'\n : 'bg-[var(--as-muted)] text-[var(--as-muted-fg)]',\n )}\n >\n {Icon ? <Icon className=\"size-2.5\" aria-hidden /> : null}\n {cap.label}\n </span>\n )\n }\n return (\n <button\n key={cap.value}\n type=\"button\"\n data-as-cap={cap.value}\n aria-pressed={on}\n disabled={disabled || locked(cap.value)}\n onClick={() => onToggle?.(cap.value)}\n className={cn(\n 'flex cursor-pointer items-center gap-1.5 rounded-[var(--as-radius)] border px-3 py-2 text-xs font-semibold uppercase tracking-wider transition-all',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]',\n 'disabled:pointer-events-none disabled:opacity-60',\n on\n ? 'border-[var(--as-primary)]/30 bg-[var(--as-primary)]/10 text-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] text-[var(--as-muted-fg)] hover:border-[var(--as-muted-fg)]/40',\n )}\n >\n {Icon ? <Icon className=\"size-3.5\" aria-hidden /> : null}\n {cap.label}\n {on ? <Check className=\"size-3\" aria-hidden /> : null}\n </button>\n )\n })}\n </div>\n )\n },\n)\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-SESPLTG7.js.map
3
+ //# sourceMappingURL=chunk-SESPLTG7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-SESPLTG7.js"}
@@ -1,3 +1,4 @@
1
+ import { CapabilityChips } from './chunk-H5KOC7Z5.js';
1
2
  import { ProviderLogo } from './chunk-7IP3JP3Z.js';
2
3
  import { cn } from './chunk-RVVXVTH3.js';
3
4
  import * as React from 'react';
@@ -52,6 +53,15 @@ var ProviderSetupTiles = React.forwardRef(function ProviderSetupTiles2({
52
53
  children: [
53
54
  /* @__PURE__ */ jsx(ProviderLogo, { preset: preset.key }),
54
55
  /* @__PURE__ */ jsx("span", { className: "w-full truncate text-center", children: preset.name }),
56
+ preset.chips && preset.chips.length > 0 ? /* @__PURE__ */ jsx(
57
+ CapabilityChips,
58
+ {
59
+ variant: "badge",
60
+ className: "justify-center",
61
+ caps: preset.chips.map((chip) => ({ value: chip.key, label: chip.label })),
62
+ selected: []
63
+ }
64
+ ) : null,
55
65
  preset.local ? /* @__PURE__ */ jsx("span", { className: "text-xs font-normal text-[var(--as-muted-fg)]", children: localLabel }) : null,
56
66
  preset.disabled && preset.disabledReason ? /* @__PURE__ */ jsx("span", { className: "text-xs font-normal text-[var(--as-muted-fg)]", children: preset.disabledReason }) : null,
57
67
  isConfigured ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-normal text-[var(--as-success)]", children: [
@@ -90,5 +100,5 @@ var ProviderSetupManualTile = React.forwardRef(function ProviderSetupManualTile2
90
100
  });
91
101
 
92
102
  export { ProviderSetupManualTile, ProviderSetupTiles };
93
- //# sourceMappingURL=chunk-65JY3ATO.js.map
94
- //# sourceMappingURL=chunk-65JY3ATO.js.map
103
+ //# sourceMappingURL=chunk-YSBGF44F.js.map
104
+ //# sourceMappingURL=chunk-YSBGF44F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/provider-setup-tiles/ProviderSetupTiles.tsx"],"names":["ProviderSetupTiles","ProviderSetupManualTile"],"mappings":";;;;;;;AAuDO,IAAM,kBAAA,GAA2B,KAAA,CAAA,UAAA,CAGtC,SAASA,mBAAAA,CACT;AAAA,EACE,OAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA,GAAQ,mBAAA;AAAA,EACR,UAAA,GAAa,OAAA;AAAA,EACb,eAAA,GAAkB,QAAA;AAAA,EAClB,cAAA,GAAiB,+BAAA;AAAA,EACjB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EACA,GAAA,EACA;AACA,EAAA,MAAM,aAAA,GAAgB,IAAI,GAAA,CAAI,UAAU,CAAA;AACxC,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA,EAAK,OAAA;AAAA,MACL,YAAA,EAAY,KAAA;AAAA,MACZ,SAAA,EAAQ,sBAAA;AAAA,MACR,SAAA,EAAW,EAAA;AAAA,QACT,uCAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,OAAA,CAAQ,GAAA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,aAAU,SAAA,EAAU,QAAA,EAAS,aAAA,EAAW,IAAA,EAAC,CAAA,EAC5C,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC","file":"chunk-YSBGF44F.js","sourcesContent":["import * as React from 'react'\nimport { Check, Settings2 } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { CapabilityChips } from '../capability-chips/CapabilityChips'\nimport { ProviderLogo } from '../provider-logo/ProviderLogo'\n\n/** A capability chip rendered on the tile (plan 26 follow-up): the app\n * derives chips from its preset data (wire type → chat/vision/stt,\n * decision models → decision, keyless-local → local) and supplies the\n * translated label — the library never guesses copy (ADR-006). */\nexport interface ProviderSetupTileChip {\n key: string\n label: string\n}\n\n/** One preset entry (ADR-006: the catalog is app data — the tiles only\n * render it, in the order given, with equal weight). */\nexport interface ProviderSetupTileData {\n key: string\n name: string\n /** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */\n local?: boolean\n /** Capability chips (e.g. chat / vision / decision / local) — rendered\n * with the capability-chips badge pattern, neutral (equal weight). */\n chips?: ProviderSetupTileChip[]\n /** Disabled tiles render inert with their reason (health's overlay). */\n disabled?: boolean\n disabledReason?: string\n /** The preset ships a key-prefix hint (informational for the app). */\n hasKeyPrefixHint?: boolean\n}\n\nexport interface ProviderSetupTilesProps\n extends Omit<React.ComponentProps<'div'>, 'onSelect' | 'children'> {\n /** Presets in the app's family order — the grid keeps it verbatim. */\n presets: ProviderSetupTileData[]\n /** Preset keys already configured (renders the `configuredLabel` badge). */\n configured?: string[]\n /** Key of a tile the app's paste-prefix match suggests (highlight only —\n * never a \"recommended\" ranking; all tiles stay equal weight). */\n suggestedKey?: string\n /** Fires with the preset key of the activated tile. */\n onSelect: (key: string) => void\n /** Extra grid cell (e.g. the \"Manual / custom\" tile) — app-composed. */\n children?: React.ReactNode\n label?: string\n localLabel?: string\n configuredLabel?: string\n /** Visually-hidden text marking the suggested tile. */\n suggestedLabel?: string\n}\n\n/** Neutral, equal-weight provider picker grid — step one of the family's\n * one-click setup (plan 26 §6): tiles in family order, no \"recommended\"\n * anywhere, local presets visible, disabled presets explain themselves. */\nexport const ProviderSetupTiles = React.forwardRef<\n HTMLDivElement,\n ProviderSetupTilesProps\n>(function ProviderSetupTiles(\n {\n presets,\n configured,\n suggestedKey,\n onSelect,\n children,\n label = 'Choose a provider',\n localLabel = 'Local',\n configuredLabel = 'Set up',\n suggestedLabel = 'Suggested for your pasted key',\n className,\n ...props\n },\n ref,\n) {\n const configuredSet = new Set(configured)\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={label}\n data-as=\"provider-setup-tiles\"\n className={cn(\n 'grid grid-cols-2 gap-2 sm:grid-cols-3',\n className,\n )}\n {...props}\n >\n {presets.map((preset) => {\n const isConfigured = configuredSet.has(preset.key)\n const isSuggested = suggestedKey === preset.key\n return (\n <button\n key={preset.key}\n type=\"button\"\n data-preset={preset.key}\n data-suggested={isSuggested || undefined}\n aria-disabled={preset.disabled || undefined}\n disabled={preset.disabled}\n onClick={() => {\n if (!preset.disabled) onSelect(preset.key)\n }}\n className={cn(\n 'flex h-auto cursor-pointer flex-col items-center gap-2 rounded-[var(--as-radius)] border px-3 py-4 text-sm font-medium text-[var(--as-fg)] transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--as-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50',\n isSuggested\n ? 'border-[var(--as-focus-ring)] bg-[var(--as-muted)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] hover:bg-[var(--as-muted)]',\n )}\n >\n <ProviderLogo preset={preset.key} />\n <span className=\"w-full truncate text-center\">{preset.name}</span>\n {preset.chips && preset.chips.length > 0 ? (\n <CapabilityChips\n variant=\"badge\"\n className=\"justify-center\"\n caps={preset.chips.map((chip) => ({ value: chip.key, label: chip.label }))}\n selected={[]}\n />\n ) : null}\n {preset.local ? (\n <span className=\"text-xs font-normal text-[var(--as-muted-fg)]\">\n {localLabel}\n </span>\n ) : null}\n {preset.disabled && preset.disabledReason ? (\n <span className=\"text-xs font-normal text-[var(--as-muted-fg)]\">\n {preset.disabledReason}\n </span>\n ) : null}\n {isConfigured ? (\n <span className=\"inline-flex items-center gap-1 text-xs font-normal text-[var(--as-success)]\">\n <Check className=\"size-3\" aria-hidden />\n {configuredLabel}\n </span>\n ) : null}\n {isSuggested ? (\n <span className=\"sr-only\">{suggestedLabel}</span>\n ) : null}\n </button>\n )\n })}\n {children ? <div className=\"contents\">{children}</div> : null}\n </div>\n )\n})\n\n/** The \"manual / custom\" tile apps append as `children` of the grid. */\nexport const ProviderSetupManualTile = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'>\n>(function ProviderSetupManualTile(\n { children, className, ...props },\n ref,\n) {\n return (\n <button\n ref={ref}\n type=\"button\"\n data-as=\"provider-setup-manual-tile\"\n className={cn(\n 'flex h-auto cursor-pointer flex-col items-center gap-2 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-4 text-sm font-medium text-[var(--as-fg)] transition-colors hover:bg-[var(--as-muted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--as-focus-ring)]',\n className,\n )}\n {...props}\n >\n <span className=\"inline-flex size-5 shrink-0 items-center justify-center text-[var(--as-muted-fg)]\">\n <Settings2 className=\"size-5\" aria-hidden />\n </span>\n {children}\n </button>\n )\n})\n"]}
package/dist/index.d.ts CHANGED
@@ -597,6 +597,14 @@ interface ProviderFormProps extends React.ComponentProps<'div'> {
597
597
  */
598
598
  declare const ProviderForm: React.ForwardRefExoticComponent<Omit<ProviderFormProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
599
599
 
600
+ /** A capability chip rendered on the tile (plan 26 follow-up): the app
601
+ * derives chips from its preset data (wire type → chat/vision/stt,
602
+ * decision models → decision, keyless-local → local) and supplies the
603
+ * translated label — the library never guesses copy (ADR-006). */
604
+ interface ProviderSetupTileChip {
605
+ key: string;
606
+ label: string;
607
+ }
600
608
  /** One preset entry (ADR-006: the catalog is app data — the tiles only
601
609
  * render it, in the order given, with equal weight). */
602
610
  interface ProviderSetupTileData {
@@ -604,6 +612,9 @@ interface ProviderSetupTileData {
604
612
  name: string;
605
613
  /** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */
606
614
  local?: boolean;
615
+ /** Capability chips (e.g. chat / vision / decision / local) — rendered
616
+ * with the capability-chips badge pattern, neutral (equal weight). */
617
+ chips?: ProviderSetupTileChip[];
607
618
  /** Disabled tiles render inert with their reason (health's overlay). */
608
619
  disabled?: boolean;
609
620
  disabledReason?: string;
@@ -1564,6 +1575,9 @@ interface ModelRegistryModel {
1564
1575
  reasoningEffort?: string;
1565
1576
  temperature?: number | null;
1566
1577
  maxTokens?: number | null;
1578
+ /** The model's decision transport (e.g. `systemone`) — set when `caps`
1579
+ * carries the app's decision capability. */
1580
+ decisionTransport?: string;
1567
1581
  /** App-defined extra fields (see `extraFields`), carried verbatim. */
1568
1582
  extra?: Record<string, string>;
1569
1583
  missing?: boolean;
@@ -1579,6 +1593,7 @@ interface ModelRegistryDraft {
1579
1593
  reasoningEffort?: string;
1580
1594
  temperature?: number | null;
1581
1595
  maxTokens?: number | null;
1596
+ decisionTransport?: string;
1582
1597
  extra?: Record<string, string>;
1583
1598
  }
1584
1599
  interface ModelRegistryPatch {
@@ -1587,6 +1602,7 @@ interface ModelRegistryPatch {
1587
1602
  reasoningEffort?: string;
1588
1603
  temperature?: number | null;
1589
1604
  maxTokens?: number | null;
1605
+ decisionTransport?: string;
1590
1606
  extra?: Record<string, string>;
1591
1607
  }
1592
1608
  interface ModelRegistryExtraField {
@@ -1630,6 +1646,13 @@ interface ModelRegistryProps {
1630
1646
  capsLabel?: string;
1631
1647
  /** Muted explainer under the capability chips (what they gate). */
1632
1648
  capsHint?: string;
1649
+ /** Capability values that are standalone kinds (e.g. decision, stt, tts,
1650
+ * embeddings): selecting one makes the model exactly that kind — the
1651
+ * chat-family caps combine, standalone kinds replace everything (the
1652
+ * family's slot-separation law, D4, expressed in the form). */
1653
+ standaloneCaps?: string[];
1654
+ /** Label for the standalone-kinds cluster (`standaloneCaps`). */
1655
+ standaloneLabel?: string;
1633
1656
  searchPlaceholder?: string;
1634
1657
  searchLabel?: string;
1635
1658
  emptyProviderLabel?: string;
@@ -1642,6 +1665,11 @@ interface ModelRegistryProps {
1642
1665
  maxTokensLabel?: string;
1643
1666
  labelLabel?: string;
1644
1667
  reasoningEffortLabel?: string;
1668
+ /** The app's shipping decision transport (e.g. `systemone`): when set,
1669
+ * models with the decision capability render a read-only transport row
1670
+ * and carry the value on Draft/Patch. */
1671
+ decisionTransport?: string;
1672
+ decisionTransportLabel?: string;
1645
1673
  saveLabel?: string;
1646
1674
  cancelLabel?: string;
1647
1675
  addDraftLabel?: string;
@@ -3692,4 +3720,4 @@ interface ChatLauncherProps {
3692
3720
  */
3693
3721
  declare const ChatLauncher: React.ForwardRefExoticComponent<ChatLauncherProps & React.RefAttributes<HTMLButtonElement>>;
3694
3722
 
3695
- export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatPending, type ChatPendingProps, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSearchField, type ChatSearchFieldLabels, type ChatSearchFieldProps, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatSuggestionCard, type ChatSuggestionCardProps, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, ChatWelcome, type ChatWelcomeProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DEFAULT_SETUP_ERROR_COPY, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, ProviderLogo, type ProviderLogoProps, type ProviderPresetOption, ProviderSetupForm, type ProviderSetupFormError, type ProviderSetupFormPreset, type ProviderSetupFormProps, type ProviderSetupFormValue, ProviderSetupManualTile, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, SETUP_ERROR_CODES, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, type SetupErrorCode, SetupFirstRunCard, type SetupFirstRunCardProps, SetupReview, type SetupReviewModel, type SetupReviewOptions, type SetupReviewOptionsKey, type SetupReviewProps, type SetupReviewSlot, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, SwitchRow, type SwitchRowProps, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, describeInstanceModeError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
3723
+ export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatPending, type ChatPendingProps, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSearchField, type ChatSearchFieldLabels, type ChatSearchFieldProps, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatSuggestionCard, type ChatSuggestionCardProps, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, ChatWelcome, type ChatWelcomeProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DEFAULT_SETUP_ERROR_COPY, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, ProviderLogo, type ProviderLogoProps, type ProviderPresetOption, ProviderSetupForm, type ProviderSetupFormError, type ProviderSetupFormPreset, type ProviderSetupFormProps, type ProviderSetupFormValue, ProviderSetupManualTile, type ProviderSetupTileChip, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, SETUP_ERROR_CODES, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, type SetupErrorCode, SetupFirstRunCard, type SetupFirstRunCardProps, SetupReview, type SetupReviewModel, type SetupReviewOptions, type SetupReviewOptionsKey, type SetupReviewProps, type SetupReviewSlot, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, SwitchRow, type SwitchRowProps, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, describeInstanceModeError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
package/dist/index.js CHANGED
@@ -17,12 +17,12 @@ export { SettingsShell } from './chunk-YPDIA54W.js';
17
17
  export { RangeBar } from './chunk-3UDWLHLD.js';
18
18
  export { ScaleSlider, scaleColorForValue } from './chunk-NLHODVBI.js';
19
19
  export { SearchInput } from './chunk-UUIMMMSJ.js';
20
- export { ModelRegistry } from './chunk-I5H4KYEZ.js';
21
- export { CapabilityChips } from './chunk-SY5FR4HC.js';
20
+ export { ModelRegistry } from './chunk-AP56DLCQ.js';
22
21
  export { ProfileSwitcher } from './chunk-6ANLDUGL.js';
23
22
  export { CUSTOM_PRESET_KEY, ProviderForm } from './chunk-UMI4M4MF.js';
24
23
  export { DEFAULT_SETUP_ERROR_COPY, ProviderSetupForm, SETUP_ERROR_CODES } from './chunk-6G7H6YP6.js';
25
- export { ProviderSetupManualTile, ProviderSetupTiles } from './chunk-65JY3ATO.js';
24
+ export { ProviderSetupManualTile, ProviderSetupTiles } from './chunk-YSBGF44F.js';
25
+ export { CapabilityChips } from './chunk-H5KOC7Z5.js';
26
26
  export { ProviderLogo } from './chunk-7IP3JP3Z.js';
27
27
  export { SetupFirstRunCard } from './chunk-YDQW2WJH.js';
28
28
  export { SetupReview } from './chunk-FY3NCPFO.js';
@@ -20,6 +20,9 @@ interface ModelRegistryModel {
20
20
  reasoningEffort?: string;
21
21
  temperature?: number | null;
22
22
  maxTokens?: number | null;
23
+ /** The model's decision transport (e.g. `systemone`) — set when `caps`
24
+ * carries the app's decision capability. */
25
+ decisionTransport?: string;
23
26
  /** App-defined extra fields (see `extraFields`), carried verbatim. */
24
27
  extra?: Record<string, string>;
25
28
  missing?: boolean;
@@ -35,6 +38,7 @@ interface ModelRegistryDraft {
35
38
  reasoningEffort?: string;
36
39
  temperature?: number | null;
37
40
  maxTokens?: number | null;
41
+ decisionTransport?: string;
38
42
  extra?: Record<string, string>;
39
43
  }
40
44
  interface ModelRegistryPatch {
@@ -43,6 +47,7 @@ interface ModelRegistryPatch {
43
47
  reasoningEffort?: string;
44
48
  temperature?: number | null;
45
49
  maxTokens?: number | null;
50
+ decisionTransport?: string;
46
51
  extra?: Record<string, string>;
47
52
  }
48
53
  interface ModelRegistryExtraField {
@@ -86,6 +91,13 @@ interface ModelRegistryProps {
86
91
  capsLabel?: string;
87
92
  /** Muted explainer under the capability chips (what they gate). */
88
93
  capsHint?: string;
94
+ /** Capability values that are standalone kinds (e.g. decision, stt, tts,
95
+ * embeddings): selecting one makes the model exactly that kind — the
96
+ * chat-family caps combine, standalone kinds replace everything (the
97
+ * family's slot-separation law, D4, expressed in the form). */
98
+ standaloneCaps?: string[];
99
+ /** Label for the standalone-kinds cluster (`standaloneCaps`). */
100
+ standaloneLabel?: string;
89
101
  searchPlaceholder?: string;
90
102
  searchLabel?: string;
91
103
  emptyProviderLabel?: string;
@@ -98,6 +110,11 @@ interface ModelRegistryProps {
98
110
  maxTokensLabel?: string;
99
111
  labelLabel?: string;
100
112
  reasoningEffortLabel?: string;
113
+ /** The app's shipping decision transport (e.g. `systemone`): when set,
114
+ * models with the decision capability render a read-only transport row
115
+ * and carry the value on Draft/Patch. */
116
+ decisionTransport?: string;
117
+ decisionTransportLabel?: string;
101
118
  saveLabel?: string;
102
119
  cancelLabel?: string;
103
120
  addDraftLabel?: string;
@@ -1,3 +1,3 @@
1
- export { ModelRegistry } from './chunk-I5H4KYEZ.js';
1
+ export { ModelRegistry } from './chunk-AP56DLCQ.js';
2
2
  //# sourceMappingURL=model-registry.js.map
3
3
  //# sourceMappingURL=model-registry.js.map
@@ -1,5 +1,13 @@
1
1
  import * as React from 'react';
2
2
 
3
+ /** A capability chip rendered on the tile (plan 26 follow-up): the app
4
+ * derives chips from its preset data (wire type → chat/vision/stt,
5
+ * decision models → decision, keyless-local → local) and supplies the
6
+ * translated label — the library never guesses copy (ADR-006). */
7
+ interface ProviderSetupTileChip {
8
+ key: string;
9
+ label: string;
10
+ }
3
11
  /** One preset entry (ADR-006: the catalog is app data — the tiles only
4
12
  * render it, in the order given, with equal weight). */
5
13
  interface ProviderSetupTileData {
@@ -7,6 +15,9 @@ interface ProviderSetupTileData {
7
15
  name: string;
8
16
  /** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */
9
17
  local?: boolean;
18
+ /** Capability chips (e.g. chat / vision / decision / local) — rendered
19
+ * with the capability-chips badge pattern, neutral (equal weight). */
20
+ chips?: ProviderSetupTileChip[];
10
21
  /** Disabled tiles render inert with their reason (health's overlay). */
11
22
  disabled?: boolean;
12
23
  disabledReason?: string;
@@ -38,4 +49,4 @@ declare const ProviderSetupTiles: React.ForwardRefExoticComponent<Omit<ProviderS
38
49
  /** The "manual / custom" tile apps append as `children` of the grid. */
39
50
  declare const ProviderSetupManualTile: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
40
51
 
41
- export { ProviderSetupManualTile, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps };
52
+ export { ProviderSetupManualTile, type ProviderSetupTileChip, type ProviderSetupTileData, ProviderSetupTiles, type ProviderSetupTilesProps };
@@ -1,3 +1,3 @@
1
- export { ProviderSetupManualTile, ProviderSetupTiles } from './chunk-65JY3ATO.js';
1
+ export { ProviderSetupManualTile, ProviderSetupTiles } from './chunk-YSBGF44F.js';
2
2
  //# sourceMappingURL=provider-setup-tiles.js.map
3
3
  //# sourceMappingURL=provider-setup-tiles.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuronection/assistant-ui",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "Shared React component library for the Assistant family (career-, study-, health-, desktop-assistant). Family look by default, app-flavored via CSS-variable tokens.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/provider-setup-tiles/ProviderSetupTiles.tsx"],"names":["ProviderSetupTiles","ProviderSetupManualTile"],"mappings":";;;;;;AA0CO,IAAM,kBAAA,GAA2B,KAAA,CAAA,UAAA,CAGtC,SAASA,mBAAAA,CACT;AAAA,EACE,OAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA,GAAQ,mBAAA;AAAA,EACR,UAAA,GAAa,OAAA;AAAA,EACb,eAAA,GAAkB,QAAA;AAAA,EAClB,cAAA,GAAiB,+BAAA;AAAA,EACjB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EACA,GAAA,EACA;AACA,EAAA,MAAM,aAAA,GAAgB,IAAI,GAAA,CAAI,UAAU,CAAA;AACxC,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA,EAAK,OAAA;AAAA,MACL,YAAA,EAAY,KAAA;AAAA,MACZ,SAAA,EAAQ,sBAAA;AAAA,MACR,SAAA,EAAW,EAAA;AAAA,QACT,uCAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,OAAA,CAAQ,GAAA,CAAI,CAAC,MAAA,KAAW;AACvB,UAAA,MAAM,YAAA,GAAe,aAAA,CAAc,GAAA,CAAI,MAAA,CAAO,GAAG,CAAA;AACjD,UAAA,MAAM,WAAA,GA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EAAU,SAAA,EAAW,0BAAe,CAAA,GACxC;AAAA;AAAA,aAAA;AAAA,YApCC,MAAA,CAAO;AAAA,WAqCd;AAAA,QAEJ,CAAC,CAAA;AAAA,QACA,2BAAW,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,UAAA,EAAY,UAAS,CAAA,GAAS;AAAA;AAAA;AAAA,GAC3D;AAEJ,CAAC;AAGM,IAAM,uBAAA,GAAgC,KAAA,CAAA,UAAA,CAG3C,SAASC,wBAAAA,CACT,EAAE,UAAU,SAAA,EAAW,GAAG,KAAA,EAAM,EAChC,GAAA,EACA;AACA,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA,EAAK,QAAA;AAAA,MACL,SAAA,EAAQ,4BAAA;AAAA,MACR,SAAA,EAAW,EAAA;AAAA,QACT,8UAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,WAAU,mFAAA,EACd,QAAA,kBAAA,GAAA,CAAC,aAAU,SAAA,EAAU,QAAA,EAAS,aAAA,EAAW,IAAA,EAAC,CAAA,EAC5C,CAAA;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC","file":"chunk-65JY3ATO.js","sourcesContent":["import * as React from 'react'\nimport { Check, Settings2 } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { ProviderLogo } from '../provider-logo/ProviderLogo'\n\n/** One preset entry (ADR-006: the catalog is app data — the tiles only\n * render it, in the order given, with equal weight). */\nexport interface ProviderSetupTileData {\n key: string\n name: string\n /** Keyless local preset (e.g. Ollama) — renders the `localLabel` caption. */\n local?: boolean\n /** Disabled tiles render inert with their reason (health's overlay). */\n disabled?: boolean\n disabledReason?: string\n /** The preset ships a key-prefix hint (informational for the app). */\n hasKeyPrefixHint?: boolean\n}\n\nexport interface ProviderSetupTilesProps\n extends Omit<React.ComponentProps<'div'>, 'onSelect' | 'children'> {\n /** Presets in the app's family order — the grid keeps it verbatim. */\n presets: ProviderSetupTileData[]\n /** Preset keys already configured (renders the `configuredLabel` badge). */\n configured?: string[]\n /** Key of a tile the app's paste-prefix match suggests (highlight only —\n * never a \"recommended\" ranking; all tiles stay equal weight). */\n suggestedKey?: string\n /** Fires with the preset key of the activated tile. */\n onSelect: (key: string) => void\n /** Extra grid cell (e.g. the \"Manual / custom\" tile) — app-composed. */\n children?: React.ReactNode\n label?: string\n localLabel?: string\n configuredLabel?: string\n /** Visually-hidden text marking the suggested tile. */\n suggestedLabel?: string\n}\n\n/** Neutral, equal-weight provider picker grid — step one of the family's\n * one-click setup (plan 26 §6): tiles in family order, no \"recommended\"\n * anywhere, local presets visible, disabled presets explain themselves. */\nexport const ProviderSetupTiles = React.forwardRef<\n HTMLDivElement,\n ProviderSetupTilesProps\n>(function ProviderSetupTiles(\n {\n presets,\n configured,\n suggestedKey,\n onSelect,\n children,\n label = 'Choose a provider',\n localLabel = 'Local',\n configuredLabel = 'Set up',\n suggestedLabel = 'Suggested for your pasted key',\n className,\n ...props\n },\n ref,\n) {\n const configuredSet = new Set(configured)\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={label}\n data-as=\"provider-setup-tiles\"\n className={cn(\n 'grid grid-cols-2 gap-2 sm:grid-cols-3',\n className,\n )}\n {...props}\n >\n {presets.map((preset) => {\n const isConfigured = configuredSet.has(preset.key)\n const isSuggested = suggestedKey === preset.key\n return (\n <button\n key={preset.key}\n type=\"button\"\n data-preset={preset.key}\n data-suggested={isSuggested || undefined}\n aria-disabled={preset.disabled || undefined}\n disabled={preset.disabled}\n onClick={() => {\n if (!preset.disabled) onSelect(preset.key)\n }}\n className={cn(\n 'flex h-auto cursor-pointer flex-col items-center gap-2 rounded-[var(--as-radius)] border px-3 py-4 text-sm font-medium text-[var(--as-fg)] transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--as-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50',\n isSuggested\n ? 'border-[var(--as-focus-ring)] bg-[var(--as-muted)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] hover:bg-[var(--as-muted)]',\n )}\n >\n <ProviderLogo preset={preset.key} />\n <span className=\"w-full truncate text-center\">{preset.name}</span>\n {preset.local ? (\n <span className=\"text-xs font-normal text-[var(--as-muted-fg)]\">\n {localLabel}\n </span>\n ) : null}\n {preset.disabled && preset.disabledReason ? (\n <span className=\"text-xs font-normal text-[var(--as-muted-fg)]\">\n {preset.disabledReason}\n </span>\n ) : null}\n {isConfigured ? (\n <span className=\"inline-flex items-center gap-1 text-xs font-normal text-[var(--as-success)]\">\n <Check className=\"size-3\" aria-hidden />\n {configuredLabel}\n </span>\n ) : null}\n {isSuggested ? (\n <span className=\"sr-only\">{suggestedLabel}</span>\n ) : null}\n </button>\n )\n })}\n {children ? <div className=\"contents\">{children}</div> : null}\n </div>\n )\n})\n\n/** The \"manual / custom\" tile apps append as `children` of the grid. */\nexport const ProviderSetupManualTile = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'>\n>(function ProviderSetupManualTile(\n { children, className, ...props },\n ref,\n) {\n return (\n <button\n ref={ref}\n type=\"button\"\n data-as=\"provider-setup-manual-tile\"\n className={cn(\n 'flex h-auto cursor-pointer flex-col items-center gap-2 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-4 text-sm font-medium text-[var(--as-fg)] transition-colors hover:bg-[var(--as-muted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--as-focus-ring)]',\n className,\n )}\n {...props}\n >\n <span className=\"inline-flex size-5 shrink-0 items-center justify-center text-[var(--as-muted-fg)]\">\n <Settings2 className=\"size-5\" aria-hidden />\n </span>\n {children}\n </button>\n )\n})\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/model-registry/ModelRegistry.tsx"],"names":["ModelRegistry"],"m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,mDAAA,EACb,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,mCAAA,EAAqC,QAAA,EAAA,mBAAA,EAAoB,CAAA;AAAA,YACrE;AAAA,WAAA,EACH,CAAA,GACE,IAAA;AAAA,UACH,WAAA;AAAY;AAAA;AAAA,KACf;AAAA,EAEJ;AACF","file":"chunk-I5H4KYEZ.js","sourcesContent":["import * as React from 'react'\nimport { Check, ChevronDown, ChevronRight, ChevronUp, Pencil, Plus, X } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { Button } from '../button'\nimport { CapabilityChips, type CapabilityDescriptor } from '../capability-chips'\nimport { Modal, ModalContent, ModalHeader, ModalTitle, ModalFooter } from '../modal/Modal'\nimport { ModelPicker, type ModelPickerProvider } from '../model-picker/ModelPicker'\nimport { Spinner } from '../spinner'\nimport { beautifyId } from '../../lib/fuzzy'\n\nexport interface ModelRegistryProvider {\n id: string\n name: string\n type?: string\n baseUrl?: string\n /** Read-only provider: hides Add/Edit/Remove (e.g. org-managed providers). */\n readOnly?: boolean\n}\n\nexport interface ModelRegistryModel {\n id: string\n providerId: string\n externalId: string\n label?: string\n caps: string[]\n enabled: boolean\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n /** App-defined extra fields (see `extraFields`), carried verbatim. */\n extra?: Record<string, string>\n missing?: boolean\n}\n\nexport interface ModelRegistryRemoteModel {\n id: string\n caps: string[]\n}\n\nexport interface ModelRegistryDraft {\n externalId: string\n label?: string\n caps: string[]\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n extra?: Record<string, string>\n}\n\nexport interface ModelRegistryPatch {\n label?: string\n caps?: string[]\n reasoningEffort?: string\n temperature?: number | null\n maxTokens?: number | null\n extra?: Record<string, string>\n}\n\nexport interface ModelRegistryExtraField {\n key: string\n label: string\n placeholder?: string\n /** Render a multi-line textarea instead of a single-line input. */\n multiline?: boolean\n}\n\nexport type ModelRegistryRemoteState = 'loading' | 'error' | 'ready'\n\nexport interface ModelRegistryProps {\n providers: ModelRegistryProvider[]\n models: ModelRegistryModel[]\n caps: CapabilityDescriptor[]\n expandedProviderId?: string | null\n onExpandedProviderChange: (providerId: string | null) => void\n remoteModels?: ModelRegistryRemoteModel[]\n remoteState?: ModelRegistryRemoteState\n remoteError?: string | null\n onRetryRemote?: () => void\n onAddModel: (providerId: string, draft: ModelRegistryDraft) => void\n onAddAll?: (providerId: string, drafts: ModelRegistryDraft[]) => void\n onUpdateModel: (model: ModelRegistryModel, patch: ModelRegistryPatch) => void\n onDeleteModel: (model: ModelRegistryModel) => void\n /** Toggle a model's enabled flag; renders the row checkbox when set. */\n onToggleEnabled?: (model: ModelRegistryModel, enabled: boolean) => void\n enableLabel?: string\n /** App-declared extra fields rendered in the add/edit modal (e.g. a\n * description line); values ride `extra` on Draft/Patch/Model. */\n extraFields?: ModelRegistryExtraField[]\n reasoningEffortOptions?: string[]\n addLabel?: string\n addAllLabel?: string\n addTitle?: string\n editTitle?: string\n selectModelLabel?: string\n manualIdToggleLabel?: string\n editLabel?: string\n removeLabel?: string\n missingLabel?: string\n capsLabel?: string\n /** Muted explainer under the capability chips (what they gate). */\n capsHint?: string\n searchPlaceholder?: string\n searchLabel?: string\n emptyProviderLabel?: string\n externalIdRequiredLabel?: string\n remoteEmptyLabel?: string\n remoteLoadingLabel?: string\n retryLabel?: string\n customOptionLabel?: string\n temperatureLabel?: string\n maxTokensLabel?: string\n labelLabel?: string\n reasoningEffortLabel?: string\n saveLabel?: string\n cancelLabel?: string\n addDraftLabel?: string\n providersEmptyLabel?: string\n emptyAction?: React.ReactNode\n className?: string\n}\n\nconst CUSTOM = '__custom__'\ninterface NumberFieldProps {\n label: string\n value: string\n onChange: (value: string) => void\n onClear: () => void\n step?: string\n min?: string\n max?: string\n}\n\nfunction NumberField({\n label,\n value,\n onChange,\n onClear,\n step = '1',\n min,\n max,\n}: NumberFieldProps) {\n const bump = (delta: number) => {\n const current = value.trim() === '' ? 0 : Number(value)\n if (!Number.isFinite(current)) return\n const next = current + delta\n onChange(String(min != null && next < Number(min) ? Number(min) : next))\n }\n return (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{label}</span>\n <span className=\"relative block\">\n <input\n type=\"number\"\n step={step}\n min={min}\n max={max}\n value={value}\n onChange={(event) => onChange(event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 pr-16 text-sm text-[var(--as-fg)] [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none\"\n />\n <span className=\"absolute inset-y-0 right-1.5 flex items-center gap-1\">\n {value !== '' ? (\n <button\n type=\"button\"\n aria-label={`${label} clear`}\n onClick={onClear}\n className=\"cursor-pointer text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <X className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n <span className=\"flex flex-col\">\n <button\n type=\"button\"\n aria-label={`${label} increment`}\n onClick={() => bump(Number(step))}\n className=\"cursor-pointer leading-none text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <ChevronUp className=\"size-3.5\" aria-hidden />\n </button>\n <button\n type=\"button\"\n aria-label={`${label} decrement`}\n onClick={() => bump(-Number(step))}\n className=\"cursor-pointer leading-none text-[var(--as-muted-fg)] hover:text-[var(--as-fg)]\"\n >\n <ChevronDown className=\"size-3.5\" aria-hidden />\n </button>\n </span>\n </span>\n </span>\n </label>\n )\n}\n\ninterface ModalState {\n mode: 'add' | 'edit'\n providerId: string\n externalId: string\n label: string\n caps: string[]\n reasoningEffort: string\n reasoningCustom: boolean\n temperature: string\n maxTokens: string\n extra: Record<string, string>\n extraTouched: boolean\n labelTouched: boolean\n model?: ModelRegistryModel\n manual: boolean\n}\n\nexport const ModelRegistry = React.forwardRef<HTMLDivElement, ModelRegistryProps>(\n function ModelRegistry(\n {\n providers,\n models,\n caps,\n expandedProviderId,\n onExpandedProviderChange,\n remoteModels,\n remoteState = 'ready',\n remoteError,\n onRetryRemote,\n onAddModel,\n onAddAll,\n onUpdateModel,\n onDeleteModel,\n onToggleEnabled,\n enableLabel = 'Enabled',\n extraFields,\n reasoningEffortOptions,\n addLabel = 'Add model',\n addAllLabel = 'Add all',\n addTitle = 'Add model',\n editTitle = 'Edit model',\n selectModelLabel = 'Model',\n manualIdToggleLabel = 'Enter the model id manually',\n editLabel = 'Edit',\n removeLabel = 'Remove',\n missingLabel = 'Missing',\n capsLabel = 'Capabilities',\n capsHint,\n searchPlaceholder = 'Search models…',\n searchLabel = 'Search models',\n emptyProviderLabel = 'No models yet — use Add model to pick from the live catalog.',\n externalIdRequiredLabel = 'The model id is required.',\n remoteEmptyLabel = 'The provider listed no models.',\n remoteLoadingLabel = 'Loading models…',\n retryLabel = 'Retry',\n customOptionLabel = 'Custom…',\n temperatureLabel = 'Temperature',\n maxTokensLabel = 'Max tokens',\n labelLabel = 'Display label',\n reasoningEffortLabel = 'Reasoning effort',\n saveLabel = 'Save',\n cancelLabel = 'Cancel',\n addDraftLabel = 'Add model',\n providersEmptyLabel = 'No providers yet.',\n emptyAction,\n className,\n },\n ref,\n ) {\n const [modal, setModal] = React.useState<ModalState | null>(null)\n const [draftError, setDraftError] = React.useState<string | null>(null)\n\n const descriptorFor = React.useCallback(\n (value: string): CapabilityDescriptor =>\n caps.find((cap) => cap.value === value) ?? { value, label: value },\n [caps],\n )\n\n const resetModal = React.useCallback(() => {\n setModal(null)\n setDraftError(null)\n }, [])\n\n const toggleProvider = (providerId: string) => {\n onExpandedProviderChange(expandedProviderId === providerId ? null : providerId)\n }\n\n const openAddModal = (providerId: string) => {\n setModal({\n mode: 'add',\n providerId,\n externalId: '',\n label: '',\n caps: caps[0] ? [caps[0].value] : [],\n reasoningEffort: '',\n reasoningCustom: false,\n temperature: '',\n maxTokens: '',\n extra: {},\n extraTouched: false,\n labelTouched: false,\n manual: false,\n })\n setDraftError(null)\n }\n\n const openEditModal = (model: ModelRegistryModel) => {\n setModal({\n mode: 'edit',\n providerId: model.providerId,\n externalId: model.externalId,\n label: model.label ?? '',\n caps: [...model.caps],\n labelTouched: true,\n reasoningEffort: model.reasoningEffort ?? '',\n reasoningCustom:\n model.reasoningEffort != null &&\n model.reasoningEffort !== '' &&\n !(reasoningEffortOptions ?? []).includes(model.reasoningEffort),\n temperature: model.temperature != null ? String(model.temperature) : '',\n maxTokens: model.maxTokens != null ? String(model.maxTokens) : '',\n extra: { ...(model.extra ?? {}) },\n extraTouched: false,\n model,\n manual: false,\n })\n setDraftError(null)\n }\n\n const patchExtraField = (key: string, value: string) => {\n setModal((current) =>\n current\n ? { ...current, extra: { ...current.extra, [key]: value }, extraTouched: true }\n : current,\n )\n }\n\n const selectRemote = (remoteId: string) => {\n const remote = (remoteModels ?? []).find((entry) => entry.id === remoteId)\n setModal((current) =>\n current\n ? {\n ...current,\n externalId: remoteId,\n caps: remote ? [...remote.caps] : current.caps,\n label: current.labelTouched ? current.label : beautifyId(remoteId),\n }\n : current,\n )\n }\n\n const toggleDraftCap = (value: string) => {\n setModal((current) =>\n current\n ? {\n ...current,\n caps: current.caps.includes(value)\n ? current.caps.filter((entry) => entry !== value)\n : [...current.caps, value],\n }\n : current,\n )\n }\n\n const patchField = (field: keyof ModalState, value: string) => {\n setModal((current) => (current ? { ...current, [field]: value } : current))\n }\n\n const numberOr = (raw: string): number | null => {\n const trimmed = raw.trim()\n if (!trimmed) return null\n const parsed = Number(trimmed)\n return Number.isFinite(parsed) ? parsed : null\n }\n\n const submitModal = () => {\n if (!modal) return\n const externalId = modal.externalId.trim()\n if (!externalId) {\n setDraftError(externalIdRequiredLabel)\n return\n }\n const extra: Record<string, string> | undefined =\n modal.extraTouched || Object.values(modal.extra).some((value) => value.trim() !== '')\n ? { ...modal.extra }\n : undefined\n const payload: ModelRegistryDraft = {\n externalId,\n label: modal.label.trim() || undefined,\n caps: modal.caps,\n reasoningEffort: modal.reasoningEffort.trim(),\n temperature: numberOr(modal.temperature),\n maxTokens: numberOr(modal.maxTokens),\n ...(extra !== undefined ? { extra } : {}),\n }\n if (modal.mode === 'add') {\n onAddModel(modal.providerId, payload)\n } else if (modal.model) {\n onUpdateModel(modal.model, payload)\n }\n resetModal()\n }\n\n const remoteForProvider = (provider: ModelRegistryProvider): ModelPickerProvider[] => {\n const items = remoteModels ?? []\n if (items.length === 0) return []\n return [\n {\n id: provider.id,\n name: provider.name,\n models: items.map((entry) => ({\n id: entry.id,\n name: entry.id,\n capabilities: entry.caps,\n })),\n },\n ]\n }\n\n const renderModal = () => {\n if (!modal) return null\n const provider = providers.find((entry) => entry.id === modal.providerId)\n const catalog = provider ? remoteForProvider(provider) : []\n const pendingCount = (remoteModels ?? []).filter(\n (remote) =>\n !models.some(\n (model) => model.providerId === modal.providerId && model.externalId === remote.id,\n ),\n ).length\n return (\n <Modal open onOpenChange={(open: boolean) => (!open ? resetModal() : undefined)}>\n <ModalContent className=\"max-h-[85vh] w-full max-w-lg overflow-y-auto\">\n <ModalHeader>\n <ModalTitle className=\"text-base\">\n {modal.mode === 'add' ? addTitle : `${editTitle} — ${modal.externalId}`}\n </ModalTitle>\n </ModalHeader>\n <div className=\"flex flex-col gap-4 p-4\">\n {modal.mode === 'add' ? (\n remoteState === 'loading' ? (\n <p className=\"flex items-center justify-center gap-2 py-4 text-xs text-[var(--as-muted-fg)]\">\n <Spinner size=\"sm\" />\n {remoteLoadingLabel}\n </p>\n ) : remoteState === 'error' ? (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <p className=\"truncate text-xs text-[var(--as-danger)]\">{remoteError}</p>\n {onRetryRemote ? (\n <Button variant=\"outline\" size=\"sm\" onClick={onRetryRemote}>\n {retryLabel}\n </Button>\n ) : null}\n </div>\n {modal.manual ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {selectModelLabel}\n </span>\n <input\n type=\"text\"\n value={modal.externalId}\n onChange={(event) => patchField('externalId', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)]\"\n />\n </label>\n ) : (\n <button\n type=\"button\"\n className=\"cursor-pointer self-start text-xs text-[var(--as-muted-fg)] underline-offset-2 hover:text-[var(--as-fg)] hover:underline\"\n onClick={() => setModal((c) => (c ? { ...c, manual: true } : c))}\n >\n {manualIdToggleLabel}\n </button>\n )}\n </>\n ) : (\n <>\n {modal.manual ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {selectModelLabel}\n </span>\n <input\n type=\"text\"\n value={modal.externalId}\n onChange={(event) => patchField('externalId', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)]\"\n />\n </label>\n ) : (\n <ModelPicker\n providers={catalog}\n value={modal.externalId}\n onChange={(modelId) => (modelId ? selectRemote(modelId) : undefined)}\n label={selectModelLabel}\n searchPlaceholder={searchPlaceholder}\n searchLabel={searchLabel}\n emptyLabel={remoteEmptyLabel}\n />\n )}\n <button\n type=\"button\"\n className=\"cursor-pointer self-start text-xs text-[var(--as-muted-fg)] underline-offset-2 hover:text-[var(--as-fg)] hover:underline\"\n onClick={() => setModal((c) => (c ? { ...c, manual: !c.manual } : c))}\n >\n {manualIdToggleLabel}\n </button>\n </>\n )\n ) : (\n <p className=\"font-mono text-sm text-[var(--as-fg)]\">{modal.externalId}</p>\n )}\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{labelLabel}</span>\n <input\n type=\"text\"\n value={modal.label}\n onChange={(event) =>\n setModal((current) =>\n current\n ? { ...current, label: event.target.value, labelTouched: true }\n : current,\n )\n }\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]\"\n />\n </label>\n <div className=\"space-y-1\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{capsLabel}</span>\n <CapabilityChips\n caps={caps}\n selected={modal.caps}\n onToggle={toggleDraftCap}\n ariaLabel={capsLabel}\n />\n {capsHint ? (\n <p className=\"text-xs text-[var(--as-muted-fg)]\">{capsHint}</p>\n ) : null}\n </div>\n {reasoningEffortOptions ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">\n {reasoningEffortLabel}\n </span>\n <div className=\"flex flex-col gap-2 sm:flex-row\">\n {modal.reasoningCustom ? (\n <input\n type=\"text\"\n value={modal.reasoningEffort}\n placeholder={customOptionLabel}\n onChange={(event) => patchField('reasoningEffort', event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 font-mono text-sm text-[var(--as-fg)] sm:flex-1\"\n />\n ) : (\n <select\n value={modal.reasoningCustom ? CUSTOM : modal.reasoningEffort}\n onChange={(event) =>\n setModal((current) =>\n current\n ? {\n ...current,\n reasoningCustom: event.target.value === CUSTOM,\n reasoningEffort:\n event.target.value === CUSTOM\n ? current.reasoningEffort\n : event.target.value,\n }\n : current,\n )\n }\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)] sm:w-40\"\n >\n <option value=\"\">—</option>\n {reasoningEffortOptions.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n <option value={CUSTOM}>{customOptionLabel}</option>\n </select>\n )}\n </div>\n </label>\n ) : null}\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <NumberField\n label={temperatureLabel}\n value={modal.temperature}\n onChange={(value) => patchField('temperature', value)}\n onClear={() => patchField('temperature', '')}\n step=\"0.1\"\n min=\"0\"\n max=\"2\"\n />\n <NumberField\n label={maxTokensLabel}\n value={modal.maxTokens}\n onChange={(value) => patchField('maxTokens', value)}\n onClear={() => patchField('maxTokens', '')}\n step=\"256\"\n min=\"1\"\n />\n </div>\n {(extraFields ?? []).map((field) => {\n const value = modal.extra[field.key] ?? ''\n const common =\n 'w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]'\n return (\n <label key={field.key} className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{field.label}</span>\n {field.multiline ? (\n <textarea\n rows={2}\n value={value}\n placeholder={field.placeholder}\n onChange={(event) => patchExtraField(field.key, event.target.value)}\n className={common}\n />\n ) : (\n <input\n type=\"text\"\n value={value}\n placeholder={field.placeholder}\n onChange={(event) => patchExtraField(field.key, event.target.value)}\n className={common}\n />\n )}\n </label>\n )\n })}\n {draftError ? (\n <p role=\"alert\" className=\"text-xs text-[var(--as-danger)]\">\n {draftError}\n </p>\n ) : null}\n </div>\n <ModalFooter>\n {modal.mode === 'add' && onAddAll ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={remoteState !== 'ready' || pendingCount === 0}\n onClick={() => {\n onAddAll(\n modal.providerId,\n (remoteModels ?? [])\n .filter(\n (remote) =>\n !models.some(\n (model) =>\n model.providerId === modal.providerId &&\n model.externalId === remote.id,\n ),\n )\n .map((remote) => ({\n externalId: remote.id,\n caps: remote.caps,\n reasoningEffort: '',\n temperature: null,\n maxTokens: null,\n })),\n )\n resetModal()\n }}\n >\n <Plus aria-hidden />\n {addAllLabel} ({pendingCount})\n </Button>\n ) : null}\n <Button variant=\"ghost\" size=\"sm\" onClick={resetModal}>\n {cancelLabel}\n </Button>\n <Button size=\"sm\" onClick={submitModal}>\n <Check aria-hidden />\n {modal.mode === 'add' ? addDraftLabel : saveLabel}\n </Button>\n </ModalFooter>\n </ModalContent>\n </Modal>\n )\n }\n\n return (\n <div\n ref={ref}\n data-as=\"model-registry\"\n className={cn('flex w-full flex-col gap-4', className)}\n >\n {providers.map((provider) => {\n const expanded = expandedProviderId === provider.id\n const providerModels = models.filter((model) => model.providerId === provider.id)\n return (\n <div\n key={provider.id}\n data-as=\"model-registry-provider\"\n className={cn(\n 'rounded-[var(--as-radius-lg)] border bg-[var(--as-surface)] transition-all',\n expanded\n ? 'border-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)]',\n )}\n >\n <button\n type=\"button\"\n aria-expanded={expanded}\n onClick={() => toggleProvider(provider.id)}\n className=\"group flex w-full cursor-pointer items-center gap-4 p-4 text-left focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]\"\n >\n <span\n className={cn(\n 'flex size-9 shrink-0 items-center justify-center rounded-[var(--as-radius)] transition-colors',\n expanded\n ? 'bg-[var(--as-primary)] text-[var(--as-primary-fg)]'\n : 'bg-[var(--as-muted)] text-[var(--as-muted-fg)] group-hover:bg-[var(--as-primary)]/10 group-hover:text-[var(--as-primary)]',\n )}\n >\n {expanded ? (\n <ChevronDown className=\"size-5\" aria-hidden />\n ) : (\n <ChevronRight className=\"size-5\" aria-hidden />\n )}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex flex-wrap items-center gap-2 text-sm font-semibold text-[var(--as-fg)]\">\n {provider.name}\n {provider.type ? (\n <span className=\"rounded-full border border-[var(--as-border)] px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-[var(--as-muted-fg)]\">\n {provider.type}\n </span>\n ) : null}\n {providerModels.length ? (\n <span className=\"rounded-full bg-[var(--as-muted)] px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-widest text-[var(--as-muted-fg)]\">\n {providerModels.filter((model) => model.enabled).length}/\n {providerModels.length}\n </span>\n ) : null}\n </span>\n {provider.baseUrl ? (\n <span className=\"block truncate font-mono text-xs text-[var(--as-muted-fg)]\">\n {provider.baseUrl}\n </span>\n ) : null}\n </span>\n </button>\n {expanded ? (\n <div className=\"as-anim-fade flex flex-col gap-2 border-t border-[var(--as-border)] p-4\">\n {!provider.readOnly && providerModels.length === 0 ? (\n <p className=\"text-xs text-[var(--as-muted-fg)]\">\n {emptyProviderLabel}\n </p>\n ) : null}\n {providerModels.map((model) => {\n return (\n <div\n key={model.id}\n className={cn(\n 'flex min-w-0 items-center gap-2 rounded-[var(--as-radius-sm)] border border-[var(--as-border)] px-3 py-2 text-sm',\n model.missing && 'opacity-50',\n )}\n >\n {onToggleEnabled && !provider.readOnly ? (\n <input\n type=\"checkbox\"\n aria-label={`${enableLabel} — ${model.externalId}`}\n checked={model.enabled}\n onChange={(event) => onToggleEnabled(model, event.target.checked)}\n className=\"size-4 shrink-0 cursor-pointer accent-[var(--as-primary)]\"\n />\n ) : null}\n <span className=\"min-w-0 flex-1 truncate font-mono text-xs text-[var(--as-fg)]\">\n {model.externalId}\n </span>\n {model.missing ? (\n <span className=\"text-xs text-[var(--as-warning)]\">\n {missingLabel}\n </span>\n ) : null}\n <CapabilityChips\n variant=\"badge\"\n caps={model.caps.map(descriptorFor)}\n selected={model.caps}\n />\n {!provider.readOnly ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${editLabel} ${model.externalId}`}\n onClick={() => openEditModal(model)}\n >\n <Pencil aria-hidden />\n {editLabel}\n </Button>\n ) : null}\n {!provider.readOnly ? (\n <button\n type=\"button\"\n aria-label={`${removeLabel} ${model.externalId}`}\n onClick={() => onDeleteModel(model)}\n className=\"cursor-pointer rounded-[var(--as-radius-sm)] p-1.5 text-[var(--as-muted-fg)] transition-colors hover:bg-[var(--as-muted)] hover:text-[var(--as-fg)] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]\"\n >\n <X className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n </div>\n )\n })}\n {!provider.readOnly ? (\n <div className=\"pt-1\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-expanded={modal?.mode === 'add' && modal.providerId === provider.id}\n onClick={() => openAddModal(provider.id)}\n >\n <Plus aria-hidden />\n {addLabel}\n </Button>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n )\n })}\n {providers.length === 0 ? (\n <div className=\"flex flex-col items-center gap-2 py-8 text-center\">\n <p className=\"text-sm text-[var(--as-muted-fg)]\">{providersEmptyLabel}</p>\n {emptyAction}\n </div>\n ) : null}\n {renderModal()}\n </div>\n )\n },\n)\n\n"]}