@ai-matrx/agents 0.59.233 → 0.59.235
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 +15 -1
- package/dist/quick/index.cjs +36 -34
- package/dist/quick/index.d.cts +12 -6
- package/dist/quick/index.d.ts +12 -6
- package/dist/quick/index.js +36 -34
- package/dist/settings/index.cjs +4 -0
- package/dist/settings/index.d.cts +8 -1
- package/dist/settings/index.d.ts +8 -1
- package/dist/settings/index.js +4 -0
- package/dist/settings/react/index.cjs +189 -67
- package/dist/settings/react/index.d.cts +7 -73
- package/dist/settings/react/index.d.ts +7 -73
- package/dist/settings/react/index.js +188 -66
- package/package.json +5 -5
|
@@ -167,49 +167,6 @@ interface SettingsStore {
|
|
|
167
167
|
cancelModelSwitch(agentId: string): void;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
/**
|
|
171
|
-
* Model Settings Catalog — the single source of truth for the STANDARD
|
|
172
|
-
* settings list, and the one chokepoint that decides which keys it contains.
|
|
173
|
-
*
|
|
174
|
-
* ── The model (two distinct surfaces) ────────────────────────────────────────
|
|
175
|
-
* 1. STANDARD list — ONLY the keys the selected model explicitly declares in
|
|
176
|
-
* its `controls` config (i.e. the parameters this model actually supports).
|
|
177
|
-
* `buildSettingsRows()` returns exactly these, grouped + ordered. Catalog
|
|
178
|
-
* keys the model does not declare are NOT shown here.
|
|
179
|
-
* 2. CAUTION surface — settings the agent has SET that the model does NOT
|
|
180
|
-
* support. These are never hidden: they are flagged as "not valid for this
|
|
181
|
-
* model" and made repairable by the validation layer (the IssueTable, fed
|
|
182
|
-
* by the `unsupported_by_model` rule). They do NOT belong in the standard
|
|
183
|
-
* list — that is exactly the "showing all possible keys" bug.
|
|
184
|
-
*
|
|
185
|
-
* The catalog exists so the standard list's labels, grouping and order live
|
|
186
|
-
* in ONE place (previously copy-pasted as `textModelSettings` /
|
|
187
|
-
* `booleanSettings` / ... into three components, each filtering by
|
|
188
|
-
* `getControl(key)` inline — which drifted and regressed). Components map over
|
|
189
|
-
* `buildSettingsRows()`; they must not filter by model themselves (ESLint
|
|
190
|
-
* enforces). The original recurring bug — set values silently dropped when a
|
|
191
|
-
* model didn't support them — is fixed by the CAUTION surface, not by dumping
|
|
192
|
-
* every key into the standard list.
|
|
193
|
-
*
|
|
194
|
-
* Guardrail: `settings-catalogue.test.ts` asserts the standard list contains
|
|
195
|
-
* ONLY supported keys (never the full catalog), and `unsupported-by-model.
|
|
196
|
-
* test.ts` asserts set-but-unsupported keys surface in the caution layer.
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
type SettingsGroupId = "text" | "featureFlags" | "imageVideo" | "audio" | "other";
|
|
200
|
-
interface SettingsRow {
|
|
201
|
-
key: string;
|
|
202
|
-
label: string;
|
|
203
|
-
group: SettingsGroupId;
|
|
204
|
-
/** The model's control definition for this key. Standard rows are always
|
|
205
|
-
* supported, so this is present; typed nullable for consumer convenience. */
|
|
206
|
-
control: ControlDefinition | null;
|
|
207
|
-
/** Always true for rows returned by buildSettingsRows (standard = supported). */
|
|
208
|
-
supported: boolean;
|
|
209
|
-
/** True when the current settings hold a non-null value for this key. */
|
|
210
|
-
hasValue: boolean;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
170
|
/**
|
|
214
171
|
* UI Gates — canonical model-gated UI flags.
|
|
215
172
|
*
|
|
@@ -303,6 +260,11 @@ interface SettingsWriteTarget {
|
|
|
303
260
|
read(key: string, control: ControlDefinition | null): SettingRowRead;
|
|
304
261
|
/** The person edited the control. */
|
|
305
262
|
change(key: string, value: unknown, control: ControlDefinition | null): void;
|
|
263
|
+
/**
|
|
264
|
+
* Several settings that are one choice, written together (the Voice row's `tts_voice` +
|
|
265
|
+
* `multi_speaker`). Without it the panel calls `change` once per key.
|
|
266
|
+
*/
|
|
267
|
+
changeMany?(changes: Record<string, unknown>): void;
|
|
306
268
|
/** The person ticked an unset row (store `startingValueFor`). */
|
|
307
269
|
turnOn(key: string, control: ControlDefinition): void;
|
|
308
270
|
/** The person cleared the row back to "not set". */
|
|
@@ -383,41 +345,13 @@ interface ModelSettingsPanelProps {
|
|
|
383
345
|
model?: ModelRowTarget | undefined;
|
|
384
346
|
/** Drawn between the model row and the groups: notices, the issue list. */
|
|
385
347
|
notices?: ReactNode;
|
|
386
|
-
/** A row the host draws itself (the multi-speaker voice editor); `undefined` = the standard row. */
|
|
387
|
-
renderRow?: (row: SettingsRow) => ReactNode | undefined;
|
|
388
348
|
/** The input capabilities group, under the settings groups. */
|
|
389
349
|
capabilities?: CapabilitiesWriteTarget | undefined;
|
|
390
350
|
/** Said where the rows would be when the model declares none (or no model is chosen). */
|
|
391
351
|
emptyNote?: ReactNode;
|
|
392
352
|
disabled?: boolean;
|
|
393
353
|
}
|
|
394
|
-
declare function ModelSettingsPanel({ controls, values, target, idPrefix, model, notices,
|
|
395
|
-
|
|
396
|
-
/** A catalog value as the person reads it ("On", "auto", "1024"). */
|
|
397
|
-
declare function formatSettingValue(value: unknown): string;
|
|
398
|
-
interface SettingRowFrameProps {
|
|
399
|
-
/** `data-setting-row` — the setting key (or a host row name such as "model"). */
|
|
400
|
-
rowKey: string;
|
|
401
|
-
/** `data-setting-state` — unset | set | off | bound | translated | … */
|
|
402
|
-
state?: string;
|
|
403
|
-
/** The 16px leading column: the row's checkbox, or an icon. */
|
|
404
|
-
leading?: ReactNode;
|
|
405
|
-
label: ReactNode;
|
|
406
|
-
/** The control, or the row's value text. */
|
|
407
|
-
children?: ReactNode;
|
|
408
|
-
/** Fixed-width icons on the right: status, then actions. */
|
|
409
|
-
actions?: ReactNode;
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* The one row geometry every line of the panel uses — setting rows, the model row, the
|
|
413
|
-
* translated rows, the voice row and the input capabilities — so their edges line up.
|
|
414
|
-
*/
|
|
415
|
-
declare function SettingRowFrame({ rowKey, state, leading, label, children, actions }: SettingRowFrameProps): React.JSX.Element;
|
|
416
|
-
declare function RowLabel({ htmlFor, muted, children }: {
|
|
417
|
-
htmlFor?: string;
|
|
418
|
-
muted?: boolean;
|
|
419
|
-
children: ReactNode;
|
|
420
|
-
}): React.JSX.Element;
|
|
354
|
+
declare function ModelSettingsPanel({ controls, values, target, idPrefix, model, notices, capabilities, emptyNote, disabled, }: ModelSettingsPanelProps): React.JSX.Element;
|
|
421
355
|
|
|
422
356
|
/** Subscribe to a slice of a settings store. `select` must return a stable value for unchanged state. */
|
|
423
357
|
declare function useSettingsSelector<T>(store: SettingsStore, select: (state: AgentSettingsState) => T): T;
|
|
@@ -426,4 +360,4 @@ declare function useSettingsEntry(store: SettingsStore, agentId: string | null |
|
|
|
426
360
|
/** Defaults merged with overrides for one agent; recomputed only when the entry changes. */
|
|
427
361
|
declare function useEffectiveSettings(store: SettingsStore, agentId: string | null | undefined): Partial<AgentSettings>;
|
|
428
362
|
|
|
429
|
-
export { ModelSettingsPanel, type ModelSettingsPanelProps,
|
|
363
|
+
export { ModelSettingsPanel, type ModelSettingsPanelProps, useEffectiveSettings, useSettingsEntry, useSettingsSelector };
|
|
@@ -181,7 +181,7 @@ function readEffectiveSettings(entry) {
|
|
|
181
181
|
|
|
182
182
|
// settings/react/ModelSettingsPanel.tsx
|
|
183
183
|
import { Checkbox as Checkbox2 } from "@ai-matrx/design-system";
|
|
184
|
-
import { Button as
|
|
184
|
+
import { Button as Button3, Chip, Switch as Switch2 } from "@ai-matrx/design-system/controls";
|
|
185
185
|
import { ModelListDropdown } from "@ai-matrx/agents/models/react";
|
|
186
186
|
|
|
187
187
|
// settings/settings-catalogue.ts
|
|
@@ -297,6 +297,9 @@ var CATCHALL_EXCLUDED = /* @__PURE__ */ new Set([
|
|
|
297
297
|
// model now declares `tools` for the tool-support capability).
|
|
298
298
|
...UI_GATE_KEYS
|
|
299
299
|
]);
|
|
300
|
+
function settingControl(controls, key) {
|
|
301
|
+
return lookupControl(controls, key);
|
|
302
|
+
}
|
|
300
303
|
function lookupControl(controls, key) {
|
|
301
304
|
if (!controls) return null;
|
|
302
305
|
if (CATCHALL_EXCLUDED.has(key)) {
|
|
@@ -865,29 +868,142 @@ function NumberInput({
|
|
|
865
868
|
);
|
|
866
869
|
}
|
|
867
870
|
|
|
868
|
-
// settings/react/
|
|
871
|
+
// settings/react/VoiceSettingControl.tsx
|
|
872
|
+
import { Button as Button2, Field, SegmentedControl, Select as Select2 } from "@ai-matrx/design-system/controls";
|
|
873
|
+
import { PlusIcon, XIcon } from "@ai-matrx/design-system/icons";
|
|
869
874
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
875
|
+
function speakersOf(value, voices) {
|
|
876
|
+
if (!Array.isArray(value)) return [];
|
|
877
|
+
return value.map((entry, index) => {
|
|
878
|
+
const record = entry !== null && typeof entry === "object" ? entry : {};
|
|
879
|
+
return {
|
|
880
|
+
name: typeof record.name === "string" ? record.name : `Speaker ${index + 1}`,
|
|
881
|
+
voice: typeof record.voice === "string" ? record.voice : voices[0] ?? ""
|
|
882
|
+
};
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
function VoiceSettingControl({ voices, value, multiSpeaker, onChange, idPrefix, disabled = false }) {
|
|
886
|
+
const isMulti = Array.isArray(value);
|
|
887
|
+
const speakers = speakersOf(value, voices);
|
|
888
|
+
const single = typeof value === "string" && value ? value : voices[0] ?? "";
|
|
889
|
+
const max = multiSpeaker?.max !== void 0 && multiSpeaker.max > 0 ? multiSpeaker.max : void 0;
|
|
890
|
+
const canAdd = max === void 0 || speakers.length < max;
|
|
891
|
+
const options = voices.map((voice) => ({ value: voice, label: voice }));
|
|
892
|
+
const voiceSelect = (current, label, pick) => /* @__PURE__ */ jsx4(
|
|
893
|
+
Select2,
|
|
894
|
+
{
|
|
895
|
+
value: current,
|
|
896
|
+
options: options.some((o) => o.value === current) ? options : [{ value: current, label: current }, ...options],
|
|
897
|
+
onValueChange: pick,
|
|
898
|
+
"aria-label": label,
|
|
899
|
+
disabled,
|
|
900
|
+
className: "min-w-0"
|
|
901
|
+
}
|
|
902
|
+
);
|
|
903
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 flex-col gap-1", "data-voice-control": "", children: [
|
|
904
|
+
multiSpeaker || isMulti ? /* @__PURE__ */ jsx4(
|
|
905
|
+
SegmentedControl,
|
|
906
|
+
{
|
|
907
|
+
"aria-label": "Voices",
|
|
908
|
+
value: isMulti ? "multi" : "single",
|
|
909
|
+
onValueChange: (next) => {
|
|
910
|
+
if (next === "multi" && !isMulti) {
|
|
911
|
+
onChange(
|
|
912
|
+
[
|
|
913
|
+
{ name: "Speaker 1", voice: single },
|
|
914
|
+
{ name: "Speaker 2", voice: voices[1] ?? single }
|
|
915
|
+
],
|
|
916
|
+
true
|
|
917
|
+
);
|
|
918
|
+
} else if (next === "single" && isMulti) {
|
|
919
|
+
onChange(speakers[0]?.voice || voices[0] || "", false);
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
data: [
|
|
923
|
+
{ value: "single", label: "One voice", disabled },
|
|
924
|
+
{ value: "multi", label: "Speakers", disabled: disabled || !multiSpeaker }
|
|
925
|
+
]
|
|
926
|
+
}
|
|
927
|
+
) : null,
|
|
928
|
+
!isMulti ? voiceSelect(single, "Voice", (next) => onChange(next, false)) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
929
|
+
speakers.map((speaker, index) => /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 items-center gap-1", "data-speaker": index, children: [
|
|
930
|
+
/* @__PURE__ */ jsx4(
|
|
931
|
+
Field,
|
|
932
|
+
{
|
|
933
|
+
id: `${idPrefix}-speaker-${index}`,
|
|
934
|
+
"aria-label": `Speaker ${index + 1} name`,
|
|
935
|
+
value: speaker.name,
|
|
936
|
+
onChange: (event) => onChange(
|
|
937
|
+
speakers.map((s, i) => i === index ? { ...s, name: event.target.value } : s),
|
|
938
|
+
true
|
|
939
|
+
),
|
|
940
|
+
disabled,
|
|
941
|
+
className: "min-w-0 flex-1"
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
voiceSelect(
|
|
945
|
+
speaker.voice,
|
|
946
|
+
`Speaker ${index + 1} voice`,
|
|
947
|
+
(next) => onChange(
|
|
948
|
+
speakers.map((s, i) => i === index ? { ...s, voice: next } : s),
|
|
949
|
+
true
|
|
950
|
+
)
|
|
951
|
+
),
|
|
952
|
+
/* @__PURE__ */ jsx4(
|
|
953
|
+
Button2,
|
|
954
|
+
{
|
|
955
|
+
variant: "quiet",
|
|
956
|
+
removes: true,
|
|
957
|
+
icon: /* @__PURE__ */ jsx4(XIcon, {}),
|
|
958
|
+
onClick: () => onChange(speakers.filter((_, i) => i !== index), true),
|
|
959
|
+
disabled: disabled || speakers.length <= 2,
|
|
960
|
+
"aria-label": `Remove speaker ${index + 1}`,
|
|
961
|
+
title: "Remove speaker"
|
|
962
|
+
}
|
|
963
|
+
)
|
|
964
|
+
] }, index)),
|
|
965
|
+
/* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
|
|
966
|
+
Button2,
|
|
967
|
+
{
|
|
968
|
+
variant: "quiet",
|
|
969
|
+
icon: /* @__PURE__ */ jsx4(PlusIcon, {}),
|
|
970
|
+
onClick: () => onChange([...speakers, { name: `Speaker ${speakers.length + 1}`, voice: voices[0] ?? "" }], true),
|
|
971
|
+
disabled: disabled || !canAdd,
|
|
972
|
+
title: canAdd ? "Add a speaker" : `This model takes up to ${max} speakers`,
|
|
973
|
+
children: "Add speaker"
|
|
974
|
+
}
|
|
975
|
+
) })
|
|
976
|
+
] })
|
|
977
|
+
] });
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
// settings/react/ModelSettingsPanel.tsx
|
|
981
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
870
982
|
function StatusGlyph({ issue, source }) {
|
|
871
983
|
const title = issue ? issue.message : source ? `Valid \xB7 ${source}` : "Valid";
|
|
872
|
-
return /* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ jsx5(
|
|
873
985
|
"span",
|
|
874
986
|
{
|
|
875
987
|
className: cn("inline-flex h-7 w-6 shrink-0 items-center justify-center", issue ? "text-warning" : "text-success"),
|
|
876
988
|
role: "img",
|
|
877
989
|
"aria-label": title,
|
|
878
990
|
title,
|
|
879
|
-
children: issue ? /* @__PURE__ */
|
|
991
|
+
children: issue ? /* @__PURE__ */ jsx5(TriangleAlertGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx5(CircleCheckGlyph, { className: "h-3.5 w-3.5" })
|
|
880
992
|
}
|
|
881
993
|
);
|
|
882
994
|
}
|
|
883
|
-
function
|
|
995
|
+
function changeTogether(target, changes, controls) {
|
|
996
|
+
if (target.changeMany) target.changeMany(changes);
|
|
997
|
+
else for (const [key, value] of Object.entries(changes)) target.change(key, value, controls[key] ?? null);
|
|
998
|
+
}
|
|
999
|
+
function ModelSettingRow({ row, control, target, idPrefix, disabled, multiSpeaker }) {
|
|
884
1000
|
const read = target.read(row.key, control);
|
|
885
1001
|
const resetLabel = target.resetLabel ?? "Reset to agent";
|
|
886
|
-
const reset = read.changedHere && target.resetToInherited ? /* @__PURE__ */
|
|
887
|
-
|
|
1002
|
+
const reset = read.changedHere && target.resetToInherited ? /* @__PURE__ */ jsx5(
|
|
1003
|
+
Button3,
|
|
888
1004
|
{
|
|
889
1005
|
variant: "quiet",
|
|
890
|
-
icon: /* @__PURE__ */
|
|
1006
|
+
icon: /* @__PURE__ */ jsx5(RotateCcwGlyph, {}),
|
|
891
1007
|
onClick: () => target.resetToInherited?.(row.key),
|
|
892
1008
|
disabled,
|
|
893
1009
|
"aria-label": `${resetLabel}: ${row.label}`,
|
|
@@ -896,20 +1012,20 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
896
1012
|
}
|
|
897
1013
|
) : null;
|
|
898
1014
|
if (read.state === "bound") {
|
|
899
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ jsx5(
|
|
900
1016
|
SettingRowFrame,
|
|
901
1017
|
{
|
|
902
1018
|
rowKey: row.key,
|
|
903
1019
|
state: "bound",
|
|
904
|
-
leading: /* @__PURE__ */
|
|
905
|
-
label: /* @__PURE__ */
|
|
906
|
-
actions: /* @__PURE__ */
|
|
1020
|
+
leading: /* @__PURE__ */ jsx5(Checkbox2, { checked: true, disabled: true, "aria-label": `${row.label} is a run input` }),
|
|
1021
|
+
label: /* @__PURE__ */ jsx5(RowLabel, { children: row.label }),
|
|
1022
|
+
actions: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
907
1023
|
reset,
|
|
908
|
-
target.unbind ? /* @__PURE__ */
|
|
909
|
-
|
|
1024
|
+
target.unbind ? /* @__PURE__ */ jsx5(
|
|
1025
|
+
Button3,
|
|
910
1026
|
{
|
|
911
1027
|
variant: "quiet",
|
|
912
|
-
icon: /* @__PURE__ */
|
|
1028
|
+
icon: /* @__PURE__ */ jsx5(UnlinkGlyph, {}),
|
|
913
1029
|
onClick: () => target.unbind?.(row.key, control),
|
|
914
1030
|
disabled,
|
|
915
1031
|
"aria-label": `Make ${row.label} a fixed setting`,
|
|
@@ -917,9 +1033,9 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
917
1033
|
}
|
|
918
1034
|
) : null
|
|
919
1035
|
] }),
|
|
920
|
-
children: /* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
1036
|
+
children: /* @__PURE__ */ jsxs5("span", { className: "flex min-h-7 min-w-0 items-center gap-2", "data-bound-control": row.key, children: [
|
|
1037
|
+
/* @__PURE__ */ jsx5(Chip, { tone: "primary", icon: /* @__PURE__ */ jsx5(VariableGlyph, {}), label: `{{${read.variableName}}}` }),
|
|
1038
|
+
/* @__PURE__ */ jsx5("span", { className: "truncate type-meta text-muted-foreground", children: read.value === void 0 || read.value === null || read.value === "" ? "Model default" : formatSettingValue(read.value) })
|
|
923
1039
|
] })
|
|
924
1040
|
}
|
|
925
1041
|
);
|
|
@@ -929,12 +1045,12 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
929
1045
|
const isOff = isSet && isOffValue(value, control);
|
|
930
1046
|
const checkboxId = `${idPrefix}-setting-${row.key}`;
|
|
931
1047
|
const canBind = Boolean(target.bind) && (target.canBind?.(row.key) ?? true);
|
|
932
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ jsx5(
|
|
933
1049
|
SettingRowFrame,
|
|
934
1050
|
{
|
|
935
1051
|
rowKey: row.key,
|
|
936
1052
|
state: isOff ? "off" : read.state,
|
|
937
|
-
leading: /* @__PURE__ */
|
|
1053
|
+
leading: /* @__PURE__ */ jsx5(
|
|
938
1054
|
Checkbox2,
|
|
939
1055
|
{
|
|
940
1056
|
id: checkboxId,
|
|
@@ -943,14 +1059,14 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
943
1059
|
onCheckedChange: (next) => next === true ? target.turnOn(row.key, control) : target.clear(row.key)
|
|
944
1060
|
}
|
|
945
1061
|
),
|
|
946
|
-
label: /* @__PURE__ */
|
|
947
|
-
actions: /* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
canBind ? /* @__PURE__ */
|
|
950
|
-
|
|
1062
|
+
label: /* @__PURE__ */ jsx5(RowLabel, { htmlFor: checkboxId, muted: !isSet, children: row.label }),
|
|
1063
|
+
actions: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
1064
|
+
/* @__PURE__ */ jsx5(StatusGlyph, { issue: read.issue, source: read.source }),
|
|
1065
|
+
canBind ? /* @__PURE__ */ jsx5(
|
|
1066
|
+
Button3,
|
|
951
1067
|
{
|
|
952
1068
|
variant: "quiet",
|
|
953
|
-
icon: /* @__PURE__ */
|
|
1069
|
+
icon: /* @__PURE__ */ jsx5(VariableGlyph, {}),
|
|
954
1070
|
onClick: () => target.bind?.(row.key, control),
|
|
955
1071
|
disabled,
|
|
956
1072
|
"aria-label": `Make ${row.label} a run input`,
|
|
@@ -958,11 +1074,11 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
958
1074
|
"data-bind-control": row.key
|
|
959
1075
|
}
|
|
960
1076
|
) : null,
|
|
961
|
-
isSet && read.issue?.fixable && target.fix ? /* @__PURE__ */
|
|
962
|
-
|
|
1077
|
+
isSet && read.issue?.fixable && target.fix ? /* @__PURE__ */ jsx5(
|
|
1078
|
+
Button3,
|
|
963
1079
|
{
|
|
964
1080
|
variant: "quiet",
|
|
965
|
-
icon: /* @__PURE__ */
|
|
1081
|
+
icon: /* @__PURE__ */ jsx5(WrenchGlyph, {}),
|
|
966
1082
|
onClick: () => target.fix?.(row.key),
|
|
967
1083
|
disabled,
|
|
968
1084
|
"aria-label": `Fix ${row.label} automatically`,
|
|
@@ -970,12 +1086,12 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
970
1086
|
}
|
|
971
1087
|
) : null,
|
|
972
1088
|
reset,
|
|
973
|
-
isSet ? /* @__PURE__ */
|
|
974
|
-
|
|
1089
|
+
isSet ? /* @__PURE__ */ jsx5(
|
|
1090
|
+
Button3,
|
|
975
1091
|
{
|
|
976
1092
|
variant: "quiet",
|
|
977
1093
|
removes: true,
|
|
978
|
-
icon: /* @__PURE__ */
|
|
1094
|
+
icon: /* @__PURE__ */ jsx5(Trash2Glyph, {}),
|
|
979
1095
|
onClick: () => target.clear(row.key),
|
|
980
1096
|
disabled,
|
|
981
1097
|
"aria-label": `Clear ${row.label} to not set`,
|
|
@@ -984,8 +1100,18 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
984
1100
|
}
|
|
985
1101
|
) : null
|
|
986
1102
|
] }),
|
|
987
|
-
children: isSet ? /* @__PURE__ */
|
|
988
|
-
|
|
1103
|
+
children: isSet && row.key === "tts_voice" && control.enum?.length && (multiSpeaker || Array.isArray(value)) ? /* @__PURE__ */ jsx5(
|
|
1104
|
+
VoiceSettingControl,
|
|
1105
|
+
{
|
|
1106
|
+
voices: control.enum.map(String),
|
|
1107
|
+
value,
|
|
1108
|
+
multiSpeaker: multiSpeaker ? { max: multiSpeaker.max } : null,
|
|
1109
|
+
onChange: (voice, multi) => changeTogether(target, { tts_voice: voice, multi_speaker: multi }, { tts_voice: control, multi_speaker: multiSpeaker }),
|
|
1110
|
+
idPrefix: `${idPrefix}-voice`,
|
|
1111
|
+
disabled
|
|
1112
|
+
}
|
|
1113
|
+
) : isSet ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
1114
|
+
/* @__PURE__ */ jsx5(
|
|
989
1115
|
SettingControlInput,
|
|
990
1116
|
{
|
|
991
1117
|
settingKey: row.key,
|
|
@@ -996,40 +1122,40 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled }) {
|
|
|
996
1122
|
id: `${idPrefix}-control-${row.key}`
|
|
997
1123
|
}
|
|
998
1124
|
),
|
|
999
|
-
read.issue ? /* @__PURE__ */
|
|
1000
|
-
] }) : /* @__PURE__ */
|
|
1125
|
+
read.issue ? /* @__PURE__ */ jsx5("p", { className: "pt-1 type-meta text-warning-ink", children: read.issue.message }) : null
|
|
1126
|
+
] }) : /* @__PURE__ */ jsx5(RowText, { children: read.modelDefault !== void 0 && read.modelDefault !== null ? `Not set \xB7 Model default: ${formatSettingValue(read.modelDefault)}` : "Not set" })
|
|
1001
1127
|
}
|
|
1002
1128
|
);
|
|
1003
1129
|
}
|
|
1004
1130
|
function ExtraSettingRow({ rowKey, label, value, kind, onClear, onReset, resetLabel = "Reset to agent", disabled = false }) {
|
|
1005
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ jsx5(
|
|
1006
1132
|
SettingRowFrame,
|
|
1007
1133
|
{
|
|
1008
1134
|
rowKey,
|
|
1009
1135
|
state: kind,
|
|
1010
|
-
label: /* @__PURE__ */
|
|
1011
|
-
actions: /* @__PURE__ */
|
|
1012
|
-
kind === "translated" ? /* @__PURE__ */
|
|
1013
|
-
onReset ? /* @__PURE__ */
|
|
1136
|
+
label: /* @__PURE__ */ jsx5(RowLabel, { children: label }),
|
|
1137
|
+
actions: /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
1138
|
+
kind === "translated" ? /* @__PURE__ */ jsx5(Chip, { tone: "sky", label: "Translated", title: "Kept as set and sent as this model's closest equivalent" }) : /* @__PURE__ */ jsx5(Chip, { tone: "warning", label: "Not on this model", title: "This model has no such setting" }),
|
|
1139
|
+
onReset ? /* @__PURE__ */ jsx5(Button3, { variant: "quiet", icon: /* @__PURE__ */ jsx5(RotateCcwGlyph, {}), onClick: onReset, disabled, "aria-label": `${resetLabel}: ${label}`, title: resetLabel, "data-setting-reset": rowKey }) : /* @__PURE__ */ jsx5(Button3, { variant: "quiet", removes: true, icon: /* @__PURE__ */ jsx5(Trash2Glyph, {}), onClick: onClear, disabled, "aria-label": `Clear ${label}`, title: "Clear to not set", "data-setting-clear": rowKey })
|
|
1014
1140
|
] }),
|
|
1015
|
-
children: /* @__PURE__ */
|
|
1141
|
+
children: /* @__PURE__ */ jsx5(RowText, { mono: value !== void 0 && value !== null, children: value === void 0 || value === null ? "Not set" : isOffValue(value, null) ? "Off" : formatSettingValue(value) })
|
|
1016
1142
|
}
|
|
1017
1143
|
);
|
|
1018
1144
|
}
|
|
1019
1145
|
function ModelRow({ model, resetLabel, idPrefix, disabled }) {
|
|
1020
1146
|
const off = disabled || model.disabled === true;
|
|
1021
1147
|
const oneMessageId = `${idPrefix}-model-one-message`;
|
|
1022
|
-
return /* @__PURE__ */
|
|
1148
|
+
return /* @__PURE__ */ jsx5(
|
|
1023
1149
|
SettingRowFrame,
|
|
1024
1150
|
{
|
|
1025
1151
|
rowKey: "model",
|
|
1026
1152
|
state: model.value ? "set" : "unset",
|
|
1027
|
-
label: /* @__PURE__ */
|
|
1028
|
-
actions: model.changedHere && model.resetToInherited ? /* @__PURE__ */
|
|
1029
|
-
|
|
1153
|
+
label: /* @__PURE__ */ jsx5(RowLabel, { children: "Model" }),
|
|
1154
|
+
actions: model.changedHere && model.resetToInherited ? /* @__PURE__ */ jsx5(
|
|
1155
|
+
Button3,
|
|
1030
1156
|
{
|
|
1031
1157
|
variant: "quiet",
|
|
1032
|
-
icon: /* @__PURE__ */
|
|
1158
|
+
icon: /* @__PURE__ */ jsx5(RotateCcwGlyph, {}),
|
|
1033
1159
|
onClick: () => model.resetToInherited?.(),
|
|
1034
1160
|
disabled: off,
|
|
1035
1161
|
"aria-label": `${resetLabel}: Model`,
|
|
@@ -1037,8 +1163,8 @@ function ModelRow({ model, resetLabel, idPrefix, disabled }) {
|
|
|
1037
1163
|
"data-setting-reset": "model"
|
|
1038
1164
|
}
|
|
1039
1165
|
) : null,
|
|
1040
|
-
children: /* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1166
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "flex min-h-7 min-w-0 flex-wrap items-center gap-x-2", children: [
|
|
1167
|
+
/* @__PURE__ */ jsx5(
|
|
1042
1168
|
ModelListDropdown,
|
|
1043
1169
|
{
|
|
1044
1170
|
"aria-label": "Model",
|
|
@@ -1055,8 +1181,8 @@ function ModelRow({ model, resetLabel, idPrefix, disabled }) {
|
|
|
1055
1181
|
...model.disabledTitle ? { disabledTitle: model.disabledTitle } : {}
|
|
1056
1182
|
}
|
|
1057
1183
|
),
|
|
1058
|
-
model.oneMessage ? /* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1184
|
+
model.oneMessage ? /* @__PURE__ */ jsxs5("label", { htmlFor: oneMessageId, className: "flex min-h-7 items-center gap-1 type-secondary text-muted-foreground", title: "Use this model for the next message, then go back", children: [
|
|
1185
|
+
/* @__PURE__ */ jsx5(
|
|
1060
1186
|
Switch2,
|
|
1061
1187
|
{
|
|
1062
1188
|
id: oneMessageId,
|
|
@@ -1078,7 +1204,6 @@ function ModelSettingsPanel({
|
|
|
1078
1204
|
idPrefix,
|
|
1079
1205
|
model,
|
|
1080
1206
|
notices,
|
|
1081
|
-
renderRow,
|
|
1082
1207
|
capabilities,
|
|
1083
1208
|
emptyNote,
|
|
1084
1209
|
disabled = false
|
|
@@ -1086,7 +1211,8 @@ function ModelSettingsPanel({
|
|
|
1086
1211
|
const groups = controls ? buildSettingsRows(controls, values).filter((group) => group.rows.length > 0) : [];
|
|
1087
1212
|
const extras = extraSettingKeys(controls, values, target.changedKeys);
|
|
1088
1213
|
const resetLabel = target.resetLabel ?? "Reset to agent";
|
|
1089
|
-
const
|
|
1214
|
+
const multiSpeaker = settingControl(controls, "multi_speaker");
|
|
1215
|
+
const extraRow = (key, kind) => /* @__PURE__ */ jsx5(
|
|
1090
1216
|
ExtraSettingRow,
|
|
1091
1217
|
{
|
|
1092
1218
|
rowKey: key,
|
|
@@ -1100,29 +1226,28 @@ function ModelSettingsPanel({
|
|
|
1100
1226
|
},
|
|
1101
1227
|
key
|
|
1102
1228
|
);
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
model ? /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsxs5("div", { "data-model-settings-panel": "", className: "@container flex min-w-0 flex-col", children: [
|
|
1230
|
+
model ? /* @__PURE__ */ jsx5(ModelRow, { model, resetLabel, idPrefix, disabled }) : null,
|
|
1105
1231
|
notices,
|
|
1106
1232
|
extras.unsupported.map((key) => extraRow(key, "unsupported")),
|
|
1107
|
-
extras.translated.length > 0 ? /* @__PURE__ */
|
|
1108
|
-
groups.length === 0 && emptyNote ? /* @__PURE__ */
|
|
1109
|
-
groups.map((group) => /* @__PURE__ */
|
|
1110
|
-
const custom = renderRow?.(row);
|
|
1111
|
-
if (custom !== void 0) return /* @__PURE__ */ jsx4("div", { children: custom }, row.key);
|
|
1233
|
+
extras.translated.length > 0 ? /* @__PURE__ */ jsx5(SettingsGroupSection, { id: "translated", title: "Translated for this model", children: /* @__PURE__ */ jsx5("div", { "data-translated-settings": "", children: extras.translated.map((key) => extraRow(key, "translated")) }) }) : null,
|
|
1234
|
+
groups.length === 0 && emptyNote ? /* @__PURE__ */ jsx5("div", { className: "py-2 type-secondary text-muted-foreground", children: emptyNote }) : null,
|
|
1235
|
+
groups.map((group) => /* @__PURE__ */ jsx5(SettingsGroupSection, { id: group.id, title: group.label || void 0, children: group.rows.map((row) => {
|
|
1112
1236
|
if (!row.control) return null;
|
|
1113
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsx5(
|
|
1114
1238
|
ModelSettingRow,
|
|
1115
1239
|
{
|
|
1116
1240
|
row,
|
|
1117
1241
|
control: row.control,
|
|
1118
1242
|
target,
|
|
1119
1243
|
idPrefix,
|
|
1120
|
-
disabled
|
|
1244
|
+
disabled,
|
|
1245
|
+
multiSpeaker
|
|
1121
1246
|
},
|
|
1122
1247
|
row.key
|
|
1123
1248
|
);
|
|
1124
1249
|
}) }, group.id)),
|
|
1125
|
-
capabilities ? /* @__PURE__ */
|
|
1250
|
+
capabilities ? /* @__PURE__ */ jsx5(
|
|
1126
1251
|
InputCapabilitiesEditor,
|
|
1127
1252
|
{
|
|
1128
1253
|
values: capabilities.values,
|
|
@@ -1165,9 +1290,6 @@ function memoEffective(entry) {
|
|
|
1165
1290
|
}
|
|
1166
1291
|
export {
|
|
1167
1292
|
ModelSettingsPanel,
|
|
1168
|
-
SettingRowFrame,
|
|
1169
|
-
RowLabel as SettingRowLabel,
|
|
1170
|
-
formatSettingValue,
|
|
1171
1293
|
useEffectiveSettings,
|
|
1172
1294
|
useSettingsEntry,
|
|
1173
1295
|
useSettingsSelector
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/agents",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.235",
|
|
4
4
|
"description": "Portable AI Matrx agent stream protocol, event projection, and safe result-presentation primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -511,12 +511,12 @@
|
|
|
511
511
|
"@ai-matrx/alchemy": "latest",
|
|
512
512
|
"@ai-matrx/api": "latest",
|
|
513
513
|
"@ai-matrx/associations": "latest",
|
|
514
|
+
"@ai-matrx/content-ir": "latest",
|
|
514
515
|
"@ai-matrx/data": "latest",
|
|
515
516
|
"@ai-matrx/design-system": "latest",
|
|
516
|
-
"@ai-matrx/content-ir": "latest",
|
|
517
517
|
"@ai-matrx/diff": "latest",
|
|
518
|
-
"@ai-matrx/
|
|
519
|
-
"@ai-matrx/
|
|
518
|
+
"@ai-matrx/icons": "latest",
|
|
519
|
+
"@ai-matrx/kit": "latest"
|
|
520
520
|
},
|
|
521
521
|
"peerDependencies": {
|
|
522
522
|
"react": ">=18.0.0",
|
|
@@ -561,5 +561,5 @@
|
|
|
561
561
|
"verify:tarball": "node ./scripts/verify-tarball.mjs",
|
|
562
562
|
"typegen:self-test": "node scripts/typegen/drop-guard.self-test.mjs && node scripts/typegen/check-api-types-fresh.mjs --self-test"
|
|
563
563
|
},
|
|
564
|
-
"gitHead": "
|
|
564
|
+
"gitHead": "2aaf4949f77ac5f9b9727fa33c390557dbb9aec5"
|
|
565
565
|
}
|