@ai-matrx/agents 0.59.214 → 0.59.215
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 +6 -2
- package/dist/catalog/react/index.cjs +29 -31
- package/dist/catalog/react/index.js +1 -3
- package/dist/context/react/index.cjs +171 -205
- package/dist/context/react/index.js +172 -201
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/models/react/index.cjs +339 -436
- package/dist/models/react/index.js +346 -432
- package/dist/settings/react/index.cjs +116 -173
- package/dist/settings/react/index.js +126 -172
- package/dist/versions/react/index.cjs +15 -68
- package/dist/versions/react/index.js +83 -121
- package/package.json +5 -5
|
@@ -126,76 +126,23 @@ function compareAgentDefinitions(systemAgent, personalAgent) {
|
|
|
126
126
|
var import_design_system = require("@ai-matrx/design-system");
|
|
127
127
|
|
|
128
128
|
// versions/react/icons.tsx
|
|
129
|
+
var import_icons = require("@ai-matrx/design-system/icons");
|
|
129
130
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
...rest,
|
|
145
|
-
children
|
|
146
|
-
}
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
var MessageSquare = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Glyph, { className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
150
|
-
var Webhook = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
151
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2" }),
|
|
152
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06" }),
|
|
153
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8" })
|
|
154
|
-
] });
|
|
155
|
-
var Layers = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
156
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
157
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
158
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
159
|
-
] });
|
|
131
|
+
var sized = (Glyph) => (0, import_icons.withGlyphDefaults)(Glyph, { className: "h-4 w-4" });
|
|
132
|
+
var MessageSquare = sized(import_icons.MessageSquareIcon);
|
|
133
|
+
var Webhook = sized(import_icons.WebhookIcon);
|
|
134
|
+
var Layers = sized(import_icons.LayersIcon);
|
|
135
|
+
var Hammer = sized(import_icons.HammerIcon);
|
|
136
|
+
var Server = sized(import_icons.ServerIcon);
|
|
137
|
+
var Variable = sized(import_icons.VariableIcon);
|
|
138
|
+
var Wrench = sized(import_icons.WrenchIcon);
|
|
139
|
+
var Settings = sized(import_icons.SettingsIcon);
|
|
140
|
+
var Copy = sized(import_icons.CopyIcon);
|
|
141
|
+
var Atom = sized(import_icons.AtomIcon);
|
|
142
|
+
var ShieldAlert = sized(import_icons.ShieldAlertIcon);
|
|
143
|
+
var AlertTriangle = sized(import_icons.AlertTriangleIcon);
|
|
144
|
+
var LoaderSpin = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.Loader2Icon, { className: `animate-spin ${className ?? "h-8 w-8"}` });
|
|
160
145
|
var Layers3 = Layers;
|
|
161
|
-
var Hammer = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
162
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m15 12-8.5 8.5c-.83.83-2.17.83-3 0 0 0 0 0 0 0a2.12 2.12 0 0 1 0-3L12 9" }),
|
|
163
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M17.64 15 22 10.64" }),
|
|
164
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m20.91 11.7-1.25-1.25c-.6-.6-.93-1.4-.93-2.25v-.86L16.01 4.6a5.56 5.56 0 0 0-3.94-1.64H9l.92.82A6.18 6.18 0 0 1 12 8.4v1.56l2 2h2.47l2.26 1.91" })
|
|
165
|
-
] });
|
|
166
|
-
var Server = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
167
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }),
|
|
168
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }),
|
|
169
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
|
|
170
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
|
|
171
|
-
] });
|
|
172
|
-
var Variable = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
173
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 21s-4-3-4-9 4-9 4-9" }),
|
|
174
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 3s4 3 4 9-4 9-4 9" }),
|
|
175
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "15", x2: "9", y1: "9", y2: "15" }),
|
|
176
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "9", x2: "15", y1: "9", y2: "15" })
|
|
177
|
-
] });
|
|
178
|
-
var Wrench = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Glyph, { className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) });
|
|
179
|
-
var Settings = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
180
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
181
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
182
|
-
] });
|
|
183
|
-
var Atom = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
184
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
185
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z" }),
|
|
186
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z" })
|
|
187
|
-
] });
|
|
188
|
-
var ShieldAlert = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
189
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }),
|
|
190
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 8v4" }),
|
|
191
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 16h.01" })
|
|
192
|
-
] });
|
|
193
|
-
var AlertTriangle = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Glyph, { className, children: [
|
|
194
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
195
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 9v4" }),
|
|
196
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 17h.01" })
|
|
197
|
-
] });
|
|
198
|
-
var LoaderSpin = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Glyph, { className: `animate-spin ${className ?? "h-8 w-8"}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
199
146
|
|
|
200
147
|
// versions/react/adapters/ContextPoliciesAdapter.tsx
|
|
201
148
|
var import_react = require("@ai-matrx/diff/react");
|
|
@@ -103,80 +103,42 @@ function compareAgentDefinitions(systemAgent, personalAgent) {
|
|
|
103
103
|
import { cn } from "@ai-matrx/design-system";
|
|
104
104
|
|
|
105
105
|
// versions/react/icons.tsx
|
|
106
|
-
import {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
106
|
+
import {
|
|
107
|
+
AlertTriangleIcon as GAlertTriangleIcon,
|
|
108
|
+
AtomIcon as GAtomIcon,
|
|
109
|
+
CopyIcon as GCopyIcon,
|
|
110
|
+
HammerIcon as GHammerIcon,
|
|
111
|
+
LayersIcon as GLayersIcon,
|
|
112
|
+
Loader2Icon as GLoader2Icon,
|
|
113
|
+
MessageSquareIcon as GMessageSquareIcon,
|
|
114
|
+
ServerIcon as GServerIcon,
|
|
115
|
+
SettingsIcon as GSettingsIcon,
|
|
116
|
+
ShieldAlertIcon as GShieldAlertIcon,
|
|
117
|
+
VariableIcon as GVariableIcon,
|
|
118
|
+
WebhookIcon as GWebhookIcon,
|
|
119
|
+
WrenchIcon as GWrenchIcon,
|
|
120
|
+
withGlyphDefaults
|
|
121
|
+
} from "@ai-matrx/design-system/icons";
|
|
122
|
+
import { jsx } from "react/jsx-runtime";
|
|
123
|
+
var sized = (Glyph) => withGlyphDefaults(Glyph, { className: "h-4 w-4" });
|
|
124
|
+
var MessageSquare = sized(GMessageSquareIcon);
|
|
125
|
+
var Webhook = sized(GWebhookIcon);
|
|
126
|
+
var Layers = sized(GLayersIcon);
|
|
127
|
+
var Hammer = sized(GHammerIcon);
|
|
128
|
+
var Server = sized(GServerIcon);
|
|
129
|
+
var Variable = sized(GVariableIcon);
|
|
130
|
+
var Wrench = sized(GWrenchIcon);
|
|
131
|
+
var Settings = sized(GSettingsIcon);
|
|
132
|
+
var Copy = sized(GCopyIcon);
|
|
133
|
+
var Atom = sized(GAtomIcon);
|
|
134
|
+
var ShieldAlert = sized(GShieldAlertIcon);
|
|
135
|
+
var AlertTriangle = sized(GAlertTriangleIcon);
|
|
136
|
+
var LoaderSpin = ({ className }) => /* @__PURE__ */ jsx(GLoader2Icon, { className: `animate-spin ${className ?? "h-8 w-8"}` });
|
|
137
137
|
var Layers3 = Layers;
|
|
138
|
-
var Hammer = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
139
|
-
/* @__PURE__ */ jsx("path", { d: "m15 12-8.5 8.5c-.83.83-2.17.83-3 0 0 0 0 0 0 0a2.12 2.12 0 0 1 0-3L12 9" }),
|
|
140
|
-
/* @__PURE__ */ jsx("path", { d: "M17.64 15 22 10.64" }),
|
|
141
|
-
/* @__PURE__ */ jsx("path", { d: "m20.91 11.7-1.25-1.25c-.6-.6-.93-1.4-.93-2.25v-.86L16.01 4.6a5.56 5.56 0 0 0-3.94-1.64H9l.92.82A6.18 6.18 0 0 1 12 8.4v1.56l2 2h2.47l2.26 1.91" })
|
|
142
|
-
] });
|
|
143
|
-
var Server = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
144
|
-
/* @__PURE__ */ jsx("rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }),
|
|
145
|
-
/* @__PURE__ */ jsx("rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }),
|
|
146
|
-
/* @__PURE__ */ jsx("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
|
|
147
|
-
/* @__PURE__ */ jsx("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
|
|
148
|
-
] });
|
|
149
|
-
var Variable = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
150
|
-
/* @__PURE__ */ jsx("path", { d: "M8 21s-4-3-4-9 4-9 4-9" }),
|
|
151
|
-
/* @__PURE__ */ jsx("path", { d: "M16 3s4 3 4 9-4 9-4 9" }),
|
|
152
|
-
/* @__PURE__ */ jsx("line", { x1: "15", x2: "9", y1: "9", y2: "15" }),
|
|
153
|
-
/* @__PURE__ */ jsx("line", { x1: "9", x2: "15", y1: "9", y2: "15" })
|
|
154
|
-
] });
|
|
155
|
-
var Wrench = ({ className }) => /* @__PURE__ */ jsx(Glyph, { className, children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) });
|
|
156
|
-
var Settings = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
157
|
-
/* @__PURE__ */ jsx("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
158
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
159
|
-
] });
|
|
160
|
-
var Atom = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
161
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
|
|
162
|
-
/* @__PURE__ */ jsx("path", { d: "M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z" }),
|
|
163
|
-
/* @__PURE__ */ jsx("path", { d: "M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z" })
|
|
164
|
-
] });
|
|
165
|
-
var ShieldAlert = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
166
|
-
/* @__PURE__ */ jsx("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }),
|
|
167
|
-
/* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
|
|
168
|
-
/* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
|
|
169
|
-
] });
|
|
170
|
-
var AlertTriangle = ({ className }) => /* @__PURE__ */ jsxs(Glyph, { className, children: [
|
|
171
|
-
/* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
172
|
-
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
173
|
-
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
174
|
-
] });
|
|
175
|
-
var LoaderSpin = ({ className }) => /* @__PURE__ */ jsx(Glyph, { className: `animate-spin ${className ?? "h-8 w-8"}`, children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
|
|
176
138
|
|
|
177
139
|
// versions/react/adapters/ContextPoliciesAdapter.tsx
|
|
178
140
|
import { InlineTextDiff } from "@ai-matrx/diff/react";
|
|
179
|
-
import { Fragment, jsx as jsx2, jsxs
|
|
141
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
180
142
|
function formatPolicy(policy) {
|
|
181
143
|
if (!policy) return "\u2014";
|
|
182
144
|
const parts = [policy.key];
|
|
@@ -190,7 +152,7 @@ function ContextPoliciesDiffRenderer({ node }) {
|
|
|
190
152
|
if (!node.children || node.children.length === 0) {
|
|
191
153
|
const oldJson = node.oldValue != null ? JSON.stringify(node.oldValue, null, 2) : "\u2014";
|
|
192
154
|
const newJson = node.newValue != null ? JSON.stringify(node.newValue, null, 2) : "\u2014";
|
|
193
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary", children: [
|
|
194
156
|
/* @__PURE__ */ jsx2("div", { className: "border-r border-border" }),
|
|
195
157
|
/* @__PURE__ */ jsx2("div", { className: "px-3 py-2 border-r border-border", children: /* @__PURE__ */ jsx2("pre", { className: "font-mono type-meta text-foreground/70", children: oldJson }) }),
|
|
196
158
|
/* @__PURE__ */ jsx2("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx2("pre", { className: "font-mono type-meta text-foreground/70", children: newJson }) })
|
|
@@ -204,7 +166,7 @@ function ContextPoliciesDiffRenderer({ node }) {
|
|
|
204
166
|
const oldText = formatPolicy(oldPolicy);
|
|
205
167
|
const newText = formatPolicy(newPolicy);
|
|
206
168
|
if (oldText !== "" && newText !== "") {
|
|
207
|
-
return /* @__PURE__ */
|
|
169
|
+
return /* @__PURE__ */ jsxs(
|
|
208
170
|
"div",
|
|
209
171
|
{
|
|
210
172
|
className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30",
|
|
@@ -217,7 +179,7 @@ function ContextPoliciesDiffRenderer({ node }) {
|
|
|
217
179
|
);
|
|
218
180
|
}
|
|
219
181
|
}
|
|
220
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ jsxs(
|
|
221
183
|
"div",
|
|
222
184
|
{
|
|
223
185
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -268,7 +230,7 @@ var ContextPoliciesAdapter = {
|
|
|
268
230
|
import { cn as cn2 } from "@ai-matrx/design-system";
|
|
269
231
|
import { InlineTextDiff as InlineTextDiff2 } from "@ai-matrx/diff/react";
|
|
270
232
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
271
|
-
import { Fragment as Fragment2, jsx as jsx3, jsxs as
|
|
233
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
272
234
|
function formatCustomTool(tool) {
|
|
273
235
|
if (!tool) return "\u2014";
|
|
274
236
|
const parts = [tool.name];
|
|
@@ -283,7 +245,7 @@ function CustomToolsDiffRenderer({ node }) {
|
|
|
283
245
|
if (!node.children || node.children.length === 0) {
|
|
284
246
|
const oldJson = JSON.stringify(node.oldValue, null, 2) ?? "\u2014";
|
|
285
247
|
const newJson = JSON.stringify(node.newValue, null, 2) ?? "\u2014";
|
|
286
|
-
return /* @__PURE__ */
|
|
248
|
+
return /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary", children: [
|
|
287
249
|
/* @__PURE__ */ jsx3("div", { className: "border-r border-border" }),
|
|
288
250
|
/* @__PURE__ */ jsx3("div", { className: "px-3 py-2 border-r border-border", children: /* @__PURE__ */ jsx3("pre", { className: "font-mono type-meta text-foreground/70", children: oldJson }) }),
|
|
289
251
|
/* @__PURE__ */ jsx3("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx3("pre", { className: "font-mono type-meta text-foreground/70", children: newJson }) })
|
|
@@ -297,7 +259,7 @@ function CustomToolsDiffRenderer({ node }) {
|
|
|
297
259
|
const oldText = formatCustomTool(oldTool);
|
|
298
260
|
const newText = formatCustomTool(newTool);
|
|
299
261
|
if (oldText !== "" && newText !== "") {
|
|
300
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ jsxs2(
|
|
301
263
|
"div",
|
|
302
264
|
{
|
|
303
265
|
className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30",
|
|
@@ -310,7 +272,7 @@ function CustomToolsDiffRenderer({ node }) {
|
|
|
310
272
|
);
|
|
311
273
|
}
|
|
312
274
|
}
|
|
313
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ jsxs2(
|
|
314
276
|
"div",
|
|
315
277
|
{
|
|
316
278
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -364,7 +326,7 @@ var CustomToolsAdapter = {
|
|
|
364
326
|
|
|
365
327
|
// versions/react/adapters/McpServersAdapter.tsx
|
|
366
328
|
import { cn as cn3 } from "@ai-matrx/design-system";
|
|
367
|
-
import { Fragment as Fragment3, jsx as jsx4, jsxs as
|
|
329
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
368
330
|
function resolveMcp(id, enrichment) {
|
|
369
331
|
return enrichment?.resolveMcpServerId(id) ?? id;
|
|
370
332
|
}
|
|
@@ -377,7 +339,7 @@ function McpServersDiffRenderer({ node, enrichment }) {
|
|
|
377
339
|
const inNew = newServers.includes(id);
|
|
378
340
|
const name = resolveMcp(id, enrichment);
|
|
379
341
|
const status = inOld && inNew ? "unchanged" : inOld ? "removed" : "added";
|
|
380
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ jsxs3(
|
|
381
343
|
"div",
|
|
382
344
|
{
|
|
383
345
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -439,7 +401,7 @@ var McpServersAdapter = {
|
|
|
439
401
|
import { Badge } from "@ai-matrx/design-system/controls";
|
|
440
402
|
import { cn as cn4 } from "@ai-matrx/design-system";
|
|
441
403
|
import { InlineTextDiff as InlineTextDiff3 } from "@ai-matrx/diff/react";
|
|
442
|
-
import { Fragment as Fragment4, jsx as jsx5, jsxs as
|
|
404
|
+
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
443
405
|
function extractText(msg) {
|
|
444
406
|
if (typeof msg.content === "string") return msg.content;
|
|
445
407
|
if (!Array.isArray(msg.content)) return "";
|
|
@@ -459,14 +421,14 @@ function MessagesDiffRenderer({ node }) {
|
|
|
459
421
|
const newMsg = newMessages[i];
|
|
460
422
|
const oldT = oldMsg ? extractText(oldMsg) : "";
|
|
461
423
|
const newT = newMsg ? extractText(newMsg) : "";
|
|
462
|
-
const roleLabel = /* @__PURE__ */
|
|
424
|
+
const roleLabel = /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
463
425
|
"#",
|
|
464
426
|
i + 1,
|
|
465
427
|
" ",
|
|
466
428
|
(newMsg?.role ?? oldMsg?.role ?? "").toUpperCase()
|
|
467
429
|
] });
|
|
468
430
|
if (oldMsg && newMsg && oldT !== "" && newT !== "" && oldT !== newT) {
|
|
469
|
-
return /* @__PURE__ */
|
|
431
|
+
return /* @__PURE__ */ jsxs4(
|
|
470
432
|
"div",
|
|
471
433
|
{
|
|
472
434
|
className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30",
|
|
@@ -478,7 +440,7 @@ function MessagesDiffRenderer({ node }) {
|
|
|
478
440
|
i
|
|
479
441
|
);
|
|
480
442
|
}
|
|
481
|
-
return /* @__PURE__ */
|
|
443
|
+
return /* @__PURE__ */ jsxs4(
|
|
482
444
|
"div",
|
|
483
445
|
{
|
|
484
446
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -516,8 +478,8 @@ function MessageRow({ child, index }) {
|
|
|
516
478
|
const role = (newMsg?.role ?? oldMsg?.role ?? "unknown").toUpperCase();
|
|
517
479
|
const oldText = oldMsg ? extractText(oldMsg) : "";
|
|
518
480
|
const newText = newMsg ? extractText(newMsg) : "";
|
|
519
|
-
const roleBadge = /* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
481
|
+
const roleBadge = /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1", children: [
|
|
482
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
521
483
|
"#",
|
|
522
484
|
index + 1
|
|
523
485
|
] }),
|
|
@@ -530,12 +492,12 @@ function MessageRow({ child, index }) {
|
|
|
530
492
|
)
|
|
531
493
|
] });
|
|
532
494
|
if (child.changeType === "modified" && oldText !== "" && newText !== "") {
|
|
533
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30", children: [
|
|
534
496
|
/* @__PURE__ */ jsx5("div", { className: "px-3 py-2 border-r border-border text-muted-foreground pl-8", children: roleBadge }),
|
|
535
497
|
/* @__PURE__ */ jsx5("div", { className: "min-w-0 overflow-x-auto", children: /* @__PURE__ */ jsx5(InlineTextDiff3, { original: oldText, modified: newText }) })
|
|
536
498
|
] });
|
|
537
499
|
}
|
|
538
|
-
return /* @__PURE__ */
|
|
500
|
+
return /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
539
501
|
/* @__PURE__ */ jsx5("div", { className: "px-3 py-2 border-r border-border text-muted-foreground pl-8", children: roleBadge }),
|
|
540
502
|
/* @__PURE__ */ jsx5(
|
|
541
503
|
"div",
|
|
@@ -589,10 +551,10 @@ import { cn as cn5 } from "@ai-matrx/design-system";
|
|
|
589
551
|
|
|
590
552
|
// versions/react/refs.tsx
|
|
591
553
|
import { createContext, useContext } from "react";
|
|
592
|
-
import { jsx as jsx6, jsxs as
|
|
554
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
593
555
|
function PlainRef({ id, name, showId, className }) {
|
|
594
556
|
const label = name && name !== id ? name : null;
|
|
595
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ jsxs5("span", { className, children: [
|
|
596
558
|
label ? /* @__PURE__ */ jsx6("span", { className: "font-medium", children: label }) : null,
|
|
597
559
|
label && showId ? " " : null,
|
|
598
560
|
!label || showId ? /* @__PURE__ */ jsx6("span", { className: "select-all break-all font-mono type-meta text-muted-foreground", children: id }) : null
|
|
@@ -609,14 +571,14 @@ function useAgentDiffRefs() {
|
|
|
609
571
|
}
|
|
610
572
|
|
|
611
573
|
// versions/react/adapters/ModelAdapter.tsx
|
|
612
|
-
import { jsx as jsx7, jsxs as
|
|
574
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
613
575
|
function ModelDiffRenderer({ node, enrichment }) {
|
|
614
576
|
const { ModelRef } = useAgentDiffRefs();
|
|
615
577
|
const oldId = typeof node.oldValue === "string" ? node.oldValue : null;
|
|
616
578
|
const newId = typeof node.newValue === "string" ? node.newValue : null;
|
|
617
579
|
const oldName = oldId ? enrichment?.resolveModelId(oldId) : null;
|
|
618
580
|
const newName = newId ? enrichment?.resolveModelId(newId) : null;
|
|
619
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary", children: [
|
|
620
582
|
/* @__PURE__ */ jsx7("div", { className: "border-r border-border" }),
|
|
621
583
|
/* @__PURE__ */ jsx7(
|
|
622
584
|
"div",
|
|
@@ -674,7 +636,7 @@ var ModelAdapter = {
|
|
|
674
636
|
};
|
|
675
637
|
|
|
676
638
|
// versions/react/adapters/ModelTiersAdapter.tsx
|
|
677
|
-
import { jsx as jsx8, jsxs as
|
|
639
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
678
640
|
function isRecord(value) {
|
|
679
641
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
680
642
|
}
|
|
@@ -699,13 +661,13 @@ function ModelTierIdentityList({ value }) {
|
|
|
699
661
|
if (identities.length === 0) {
|
|
700
662
|
return /* @__PURE__ */ jsx8("span", { className: "text-muted-foreground", children: "No model tiers" });
|
|
701
663
|
}
|
|
702
|
-
return /* @__PURE__ */ jsx8("span", { className: "flex flex-col gap-1.5", children: identities.map((identity) => /* @__PURE__ */
|
|
664
|
+
return /* @__PURE__ */ jsx8("span", { className: "flex flex-col gap-1.5", children: identities.map((identity) => /* @__PURE__ */ jsxs7("span", { className: "grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-start gap-2", children: [
|
|
703
665
|
/* @__PURE__ */ jsx8("span", { className: "text-muted-foreground", children: identity.role }),
|
|
704
666
|
/* @__PURE__ */ jsx8(ModelRef, { modelId: identity.modelId })
|
|
705
667
|
] }, identity.key)) });
|
|
706
668
|
}
|
|
707
669
|
function ModelTiersDiffRenderer({ node }) {
|
|
708
|
-
return /* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary", children: [
|
|
709
671
|
/* @__PURE__ */ jsx8("div", { className: "border-r border-border" }),
|
|
710
672
|
/* @__PURE__ */ jsx8("div", { className: "border-r border-border px-3 py-2", children: /* @__PURE__ */ jsx8(ModelTierIdentityList, { value: node.oldValue }) }),
|
|
711
673
|
/* @__PURE__ */ jsx8("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx8(ModelTierIdentityList, { value: node.newValue }) })
|
|
@@ -729,7 +691,7 @@ var ModelTiersAdapter = {
|
|
|
729
691
|
// versions/react/adapters/RecordFieldsAdapter.tsx
|
|
730
692
|
import { cn as cn6 } from "@ai-matrx/design-system";
|
|
731
693
|
import { humanizeIdentifier as humanizeIdentifier2 } from "@ai-matrx/kit/text-case";
|
|
732
|
-
import { Fragment as Fragment5, jsx as jsx9, jsxs as
|
|
694
|
+
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
733
695
|
var asRecord = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
734
696
|
function recordValueText(value) {
|
|
735
697
|
if (value === void 0 || value === null || value === "") return "\u2014";
|
|
@@ -753,13 +715,13 @@ function createRecordFieldsAdapter(spec) {
|
|
|
753
715
|
function RecordFieldsDiff({ node }) {
|
|
754
716
|
const rows = recordRows(node, spec.keyLabels);
|
|
755
717
|
if (rows.length === 0) {
|
|
756
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
757
719
|
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border" }),
|
|
758
720
|
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground", children: "Nothing set" }),
|
|
759
721
|
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 text-muted-foreground", children: "Nothing set" })
|
|
760
722
|
] });
|
|
761
723
|
}
|
|
762
|
-
return /* @__PURE__ */ jsx9(Fragment5, { children: rows.map((r) => /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ jsx9(Fragment5, { children: rows.map((r) => /* @__PURE__ */ jsxs8("div", { "data-diff-record-key": r.key, className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
763
725
|
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: r.label }),
|
|
764
726
|
/* @__PURE__ */ jsx9("div", { className: cn6("px-3 py-1.5 border-r border-border whitespace-pre-wrap break-words", r.changed ? "bg-destructive/15 text-destructive-ink" : "text-foreground/80"), children: r.oldText }),
|
|
765
727
|
/* @__PURE__ */ jsx9("div", { className: cn6("px-3 py-1.5 whitespace-pre-wrap break-words", r.changed ? "bg-success/15 text-success-ink" : "text-foreground/80"), children: r.newText })
|
|
@@ -799,7 +761,7 @@ import {
|
|
|
799
761
|
formatValue
|
|
800
762
|
} from "@ai-matrx/diff/structural";
|
|
801
763
|
import { humanizeIdentifier as humanizeIdentifier3 } from "@ai-matrx/kit/text-case";
|
|
802
|
-
import { Fragment as Fragment6, jsx as jsx10, jsxs as
|
|
764
|
+
import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
803
765
|
function SettingsDiffRenderer({ node }) {
|
|
804
766
|
const entries = node.children ?? buildEntries();
|
|
805
767
|
function buildEntries() {
|
|
@@ -820,7 +782,7 @@ function SettingsDiffRenderer({ node }) {
|
|
|
820
782
|
const oldVal = child.oldValue != null ? formatValue(child.oldValue) : "\u2014";
|
|
821
783
|
const newVal = child.newValue != null ? formatValue(child.newValue) : "\u2014";
|
|
822
784
|
const changed = child.changeType !== "unchanged";
|
|
823
|
-
return /* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ jsxs9(
|
|
824
786
|
"div",
|
|
825
787
|
{
|
|
826
788
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -873,7 +835,7 @@ var SettingsAdapter = {
|
|
|
873
835
|
|
|
874
836
|
// versions/react/adapters/ToolsAdapter.tsx
|
|
875
837
|
import { cn as cn8 } from "@ai-matrx/design-system";
|
|
876
|
-
import { Fragment as Fragment7, jsx as jsx11, jsxs as
|
|
838
|
+
import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
877
839
|
function resolveTool(id, enrichment) {
|
|
878
840
|
return enrichment?.resolveToolId(id) ?? id;
|
|
879
841
|
}
|
|
@@ -891,7 +853,7 @@ function ToolsDiffRenderer({ node, enrichment }) {
|
|
|
891
853
|
const inNew = newTools.includes(id);
|
|
892
854
|
const name = resolveTool(id, enrichment);
|
|
893
855
|
const status = inOld && inNew ? "unchanged" : inOld ? "removed" : "added";
|
|
894
|
-
return /* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ jsxs10(
|
|
895
857
|
"div",
|
|
896
858
|
{
|
|
897
859
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -955,7 +917,7 @@ import {
|
|
|
955
917
|
formatValue as formatValue2
|
|
956
918
|
} from "@ai-matrx/diff/structural";
|
|
957
919
|
import { InlineTextDiff as InlineTextDiff4 } from "@ai-matrx/diff/react";
|
|
958
|
-
import { Fragment as Fragment8, jsx as jsx12, jsxs as
|
|
920
|
+
import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
959
921
|
function formatVar(v) {
|
|
960
922
|
if (!v) return "\u2014";
|
|
961
923
|
const parts = [`{{${v.name}}}`];
|
|
@@ -978,7 +940,7 @@ function VariablesDiffRenderer({ node }) {
|
|
|
978
940
|
const oldVar = oldVars[i];
|
|
979
941
|
const newVar = newVars[i];
|
|
980
942
|
const changed = JSON.stringify(oldVar) !== JSON.stringify(newVar);
|
|
981
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ jsxs11(
|
|
982
944
|
"div",
|
|
983
945
|
{
|
|
984
946
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
@@ -1020,13 +982,13 @@ function VariableRow({ child }) {
|
|
|
1020
982
|
const oldText = formatVar(oldVar);
|
|
1021
983
|
const newText = formatVar(newVar);
|
|
1022
984
|
if (oldText !== "" && newText !== "") {
|
|
1023
|
-
return /* @__PURE__ */
|
|
985
|
+
return /* @__PURE__ */ jsxs11("div", { className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30", children: [
|
|
1024
986
|
/* @__PURE__ */ jsx12("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
|
|
1025
987
|
/* @__PURE__ */ jsx12("div", { className: "min-w-0 overflow-x-auto", children: /* @__PURE__ */ jsx12(InlineTextDiff4, { original: oldText, modified: newText }) })
|
|
1026
988
|
] });
|
|
1027
989
|
}
|
|
1028
990
|
}
|
|
1029
|
-
return /* @__PURE__ */
|
|
991
|
+
return /* @__PURE__ */ jsxs11("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
1030
992
|
/* @__PURE__ */ jsx12("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
|
|
1031
993
|
/* @__PURE__ */ jsx12(
|
|
1032
994
|
"div",
|
|
@@ -1149,7 +1111,7 @@ import {
|
|
|
1149
1111
|
} from "@ai-matrx/design-system/data-table";
|
|
1150
1112
|
import { RecordId } from "@ai-matrx/design-system";
|
|
1151
1113
|
import { humanizeIdentifier as humanizeIdentifier4 } from "@ai-matrx/kit/text-case";
|
|
1152
|
-
import { jsx as jsx14, jsxs as
|
|
1114
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1153
1115
|
var SILENT = { success: () => {
|
|
1154
1116
|
}, error: () => {
|
|
1155
1117
|
} };
|
|
@@ -1185,7 +1147,7 @@ function VersionHistoryTimeline({
|
|
|
1185
1147
|
at: version.changed_at,
|
|
1186
1148
|
note: version.change_note ?? null,
|
|
1187
1149
|
loaded: enriched ? version.snapshotLoaded : false,
|
|
1188
|
-
changes: enriched ? /* @__PURE__ */ jsx14(VersionChanges, { version, ports: breakPorts }) : /* @__PURE__ */
|
|
1150
|
+
changes: enriched ? /* @__PURE__ */ jsx14(VersionChanges, { version, ports: breakPorts }) : /* @__PURE__ */ jsxs12("div", { className: "space-y-1", children: [
|
|
1189
1151
|
/* @__PURE__ */ jsx14(ContractBreak, { version, ports: breakPorts }),
|
|
1190
1152
|
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Not loaded" })
|
|
1191
1153
|
] }),
|
|
@@ -1208,9 +1170,9 @@ function VersionHistoryTimeline({
|
|
|
1208
1170
|
return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center py-12 type-body text-muted-foreground", children: "No version history" });
|
|
1209
1171
|
}
|
|
1210
1172
|
if (!hasEnrichedData && !enrichLoading) {
|
|
1211
|
-
return /* @__PURE__ */
|
|
1212
|
-
/* @__PURE__ */
|
|
1213
|
-
/* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
|
|
1174
|
+
/* @__PURE__ */ jsxs12("div", { className: "text-center", children: [
|
|
1175
|
+
/* @__PURE__ */ jsxs12("div", { className: "type-title mb-1", children: [
|
|
1214
1176
|
versions.length,
|
|
1215
1177
|
" version",
|
|
1216
1178
|
versions.length !== 1 ? "s" : "",
|
|
@@ -1219,9 +1181,9 @@ function VersionHistoryTimeline({
|
|
|
1219
1181
|
] }),
|
|
1220
1182
|
/* @__PURE__ */ jsx14("p", { className: "type-secondary text-muted-foreground max-w-[320px]", children: "Load history to see what changed in each version" })
|
|
1221
1183
|
] }),
|
|
1222
|
-
failedVersions.length > 0 && /* @__PURE__ */
|
|
1184
|
+
failedVersions.length > 0 && /* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-2 max-w-[420px] px-3 py-2 rounded-md border border-destructive/30 bg-destructive/10 type-secondary text-destructive-ink", children: [
|
|
1223
1185
|
/* @__PURE__ */ jsx14(AlertTriangle, { className: "w-3.5 h-3.5 mt-0.5 shrink-0" }),
|
|
1224
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ jsxs12("span", { children: [
|
|
1225
1187
|
failedVersions.length,
|
|
1226
1188
|
" of ",
|
|
1227
1189
|
progress.total,
|
|
@@ -1247,9 +1209,9 @@ function VersionHistoryTimeline({
|
|
|
1247
1209
|
] });
|
|
1248
1210
|
}
|
|
1249
1211
|
if (enrichLoading) {
|
|
1250
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
|
|
1251
1213
|
/* @__PURE__ */ jsx14(LoaderSpin, { className: "h-8 w-8 text-primary" }),
|
|
1252
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ jsxs12("div", { className: "type-body text-muted-foreground", children: [
|
|
1253
1215
|
"Loading version details... ",
|
|
1254
1216
|
progress.fetched,
|
|
1255
1217
|
"/",
|
|
@@ -1266,14 +1228,14 @@ function VersionHistoryTimeline({
|
|
|
1266
1228
|
) })
|
|
1267
1229
|
] });
|
|
1268
1230
|
}
|
|
1269
|
-
return /* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-between mb-3 pb-3 border-b border-border", children: /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ jsxs12("div", { className: "px-4 py-3", children: [
|
|
1232
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-between mb-3 pb-3 border-b border-border", children: /* @__PURE__ */ jsxs12("div", { className: "type-secondary text-muted-foreground", children: [
|
|
1271
1233
|
enrichedVersions.filter((v) => v.snapshotLoaded).length,
|
|
1272
1234
|
" of",
|
|
1273
1235
|
" ",
|
|
1274
1236
|
versions.length,
|
|
1275
1237
|
" versions loaded",
|
|
1276
|
-
failedVersions.length > 0 && /* @__PURE__ */
|
|
1238
|
+
failedVersions.length > 0 && /* @__PURE__ */ jsxs12("span", { className: "text-destructive", children: [
|
|
1277
1239
|
" ",
|
|
1278
1240
|
"\xB7 ",
|
|
1279
1241
|
failedVersions.length,
|
|
@@ -1289,7 +1251,7 @@ function VersionHistoryTimeline({
|
|
|
1289
1251
|
function VersionChanges({ version, ports }) {
|
|
1290
1252
|
const diff = version.diffSummary;
|
|
1291
1253
|
const changedFields = diff?.root.filter((n) => n.changeType !== "unchanged") ?? [];
|
|
1292
|
-
return /* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ jsxs12("div", { className: "space-y-1", children: [
|
|
1293
1255
|
/* @__PURE__ */ jsx14(ContractBreak, { version, ports }),
|
|
1294
1256
|
diff && changedFields.length > 0 ? /* @__PURE__ */ jsx14(ChipSet, { children: changedFields.map((n) => /* @__PURE__ */ jsx14(
|
|
1295
1257
|
Chip,
|
|
@@ -1328,7 +1290,7 @@ function ContractBreak({ version, ports }) {
|
|
|
1328
1290
|
}
|
|
1329
1291
|
const autoChange = version.contract_change || null;
|
|
1330
1292
|
const effectiveChange = declared ?? autoChange;
|
|
1331
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1332
1294
|
effectiveChange && /* @__PURE__ */ jsx14(
|
|
1333
1295
|
Badge2,
|
|
1334
1296
|
{
|
|
@@ -1337,7 +1299,7 @@ function ContractBreak({ version, ports }) {
|
|
|
1337
1299
|
children: `Contract: ${effectiveChange}${declared ? " (declared)" : ""}`
|
|
1338
1300
|
}
|
|
1339
1301
|
),
|
|
1340
|
-
ports.onDeclare ? /* @__PURE__ */
|
|
1302
|
+
ports.onDeclare ? /* @__PURE__ */ jsxs12(DropdownMenu, { children: [
|
|
1341
1303
|
/* @__PURE__ */ jsx14(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
|
|
1342
1304
|
Button,
|
|
1343
1305
|
{
|
|
@@ -1347,7 +1309,7 @@ function ContractBreak({ version, ports }) {
|
|
|
1347
1309
|
title: "Mark this version as a contract break the hashes cannot see (e.g. a prompt-level output change)"
|
|
1348
1310
|
}
|
|
1349
1311
|
) }),
|
|
1350
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ jsxs12(DropdownMenuContent, { align: "start", children: [
|
|
1351
1313
|
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("input"), children: "Declare input break" }),
|
|
1352
1314
|
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("output"), children: "Declare output break" }),
|
|
1353
1315
|
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("both"), children: "Declare input + output break" }),
|