@tonyclaw/agent-inspector 2.0.4 → 2.0.6
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/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-BCH_fsLm.js → CompareDrawer-DDmqSAfl.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-Cxpdziwd.js +101 -0
- package/.output/public/assets/ReplayDialog-Bt5DGzlh.js +1 -0
- package/.output/public/assets/RequestAnatomy-BxX3_N9S.js +1 -0
- package/.output/public/assets/ResponseView-Bl_5S9gZ.js +1 -0
- package/.output/public/assets/StreamingChunkSequence-RJMwNf6F.js +1 -0
- package/.output/public/assets/_sessionId-b4isaoDp.js +1 -0
- package/.output/public/assets/index-BZ4x5UI6.js +1 -0
- package/.output/public/assets/{index-CobXD0yH.css → index-C624DUk9.css} +1 -1
- package/.output/public/assets/{json-viewer-BrzjD7qI.js → json-viewer-CRL_gWEZ.js} +1 -1
- package/.output/public/assets/{main-mgxeUdZQ.js → main-CKnTJ4-O.js} +6 -6
- package/.output/server/_libs/lucide-react.mjs +181 -114
- package/.output/server/{_sessionId-C4xsxIWm.mjs → _sessionId-B-x9fRY3.mjs} +3 -3
- package/.output/server/_ssr/{CompareDrawer-DuWEpqQ7.mjs → CompareDrawer-BQVNsAY2.mjs} +6 -6
- package/.output/server/_ssr/{ProxyViewerContainer-Cckz5qKu.mjs → ProxyViewerContainer-CYm2Dw19.mjs} +766 -122
- package/.output/server/_ssr/{ReplayDialog-BDRcr8E5.mjs → ReplayDialog-CaMQBc79.mjs} +240 -14
- package/.output/server/_ssr/{RequestAnatomy-BoO2_Ij0.mjs → RequestAnatomy--P5arRH2.mjs} +236 -66
- package/.output/server/_ssr/{ResponseView-DZiPBxvO.mjs → ResponseView-RtFwNvgD.mjs} +8 -8
- package/.output/server/_ssr/{StreamingChunkSequence-D-be7KEL.mjs → StreamingChunkSequence-B5HPkzab.mjs} +3 -3
- package/.output/server/_ssr/{index-5RImHKfu.mjs → index-CZIKZU43.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-aJhb93ZK.mjs → json-viewer-d4obyRaA.mjs} +3 -3
- package/.output/server/_ssr/{router-Dgkv5nKP.mjs → router-DGPt3MUc.mjs} +145 -71
- package/.output/server/_tanstack-start-manifest_v-BzH4pNaI.mjs +4 -0
- package/.output/server/index.mjs +64 -64
- package/package.json +1 -1
- package/src/components/OnboardingBanner.tsx +11 -19
- package/src/components/ProxyViewer.tsx +1 -1
- package/src/components/providers/ProviderCard.tsx +6 -20
- package/src/components/providers/SettingsDialog.tsx +95 -2
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +639 -38
- package/src/components/proxy-viewer/CompareDrawer.tsx +4 -2
- package/src/components/proxy-viewer/LogEntry.tsx +4 -4
- package/src/components/proxy-viewer/LogEntryHeader.tsx +15 -25
- package/src/components/proxy-viewer/ReplayDialog.tsx +190 -8
- package/src/components/proxy-viewer/ResponseView.tsx +2 -2
- package/src/components/proxy-viewer/ToolTraceEvents.tsx +37 -16
- package/src/components/proxy-viewer/TurnGroup.tsx +14 -2
- package/src/components/proxy-viewer/anatomy/RequestAnatomy.tsx +196 -45
- package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +92 -67
- package/src/components/proxy-viewer/anatomy/types.ts +15 -13
- package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +2 -2
- package/src/components/proxy-viewer/log-formats/anthropic.ts +1 -1
- package/src/components/proxy-viewer/log-formats/openai.ts +1 -1
- package/src/components/proxy-viewer/log-formats/types.ts +1 -1
- package/src/components/proxy-viewer/replayComparison.ts +131 -0
- package/src/components/proxy-viewer/useKeyboardNavigation.ts +64 -22
- package/src/components/proxy-viewer/viewerState.ts +14 -2
- package/src/components/ui/json-viewer.tsx +1 -1
- package/src/knowledge/candidateStore.ts +32 -1
- package/src/routes/api/knowledge.candidates.$candidateId.ts +50 -0
- package/src/routes/api/knowledge.sessions.$sessionId.candidates.ts +12 -2
- package/.output/public/assets/ProxyViewerContainer-D85_UANk.js +0 -101
- package/.output/public/assets/ReplayDialog-DTeaHHit.js +0 -1
- package/.output/public/assets/RequestAnatomy-DZ8grAih.js +0 -1
- package/.output/public/assets/ResponseView-Cldm6RCi.js +0 -1
- package/.output/public/assets/StreamingChunkSequence-3x4p-yT7.js +0 -1
- package/.output/public/assets/_sessionId-YqWFBu6d.js +0 -1
- package/.output/public/assets/index-BIw2H6jO.js +0 -1
- package/.output/server/_tanstack-start-manifest_v-B8rrWXjr.mjs +0 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as TooltipProvider, l as Tooltip, m as TooltipTrigger, n as TooltipContent, o as Button } from "./ProxyViewerContainer-
|
|
3
|
-
import { ResponseView } from "./ResponseView-
|
|
4
|
-
import "./router-
|
|
2
|
+
import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as TooltipProvider, l as Tooltip, m as TooltipTrigger, n as TooltipContent, o as Button } from "./ProxyViewerContainer-CYm2Dw19.mjs";
|
|
3
|
+
import { ResponseView } from "./ResponseView-RtFwNvgD.mjs";
|
|
4
|
+
import "./router-DGPt3MUc.mjs";
|
|
5
5
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
6
6
|
import "../_libs/jszip.mjs";
|
|
7
|
-
import "./json-viewer-
|
|
8
|
-
import {
|
|
7
|
+
import "./json-viewer-d4obyRaA.mjs";
|
|
8
|
+
import { I as RotateCcw } from "../_libs/lucide-react.mjs";
|
|
9
9
|
import { d as object, c as boolean, n as number, b as string } from "../_libs/zod.mjs";
|
|
10
10
|
import "../_libs/swr.mjs";
|
|
11
11
|
import "../_libs/use-sync-external-store.mjs";
|
|
@@ -168,17 +168,174 @@ import "../_libs/lie.mjs";
|
|
|
168
168
|
import "../_libs/immediate.mjs";
|
|
169
169
|
import "../_libs/setimmediate.mjs";
|
|
170
170
|
import "../_libs/pako.mjs";
|
|
171
|
+
function isJsonObject(value) {
|
|
172
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
173
|
+
}
|
|
174
|
+
function byteLength(value) {
|
|
175
|
+
if (value === null || value === void 0) return null;
|
|
176
|
+
return new TextEncoder().encode(value).length;
|
|
177
|
+
}
|
|
178
|
+
function readRequestModel(body) {
|
|
179
|
+
try {
|
|
180
|
+
const parsed = JSON.parse(body);
|
|
181
|
+
if (!isJsonObject(parsed)) return null;
|
|
182
|
+
const model = parsed["model"];
|
|
183
|
+
return typeof model === "string" && model.length > 0 ? model : null;
|
|
184
|
+
} catch {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function replaceRequestModel(body, model) {
|
|
189
|
+
try {
|
|
190
|
+
const parsed = JSON.parse(body);
|
|
191
|
+
if (!isJsonObject(parsed)) {
|
|
192
|
+
return { body, error: "Request body must be a JSON object." };
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
body: JSON.stringify({ ...parsed, model }, null, 2),
|
|
196
|
+
error: null
|
|
197
|
+
};
|
|
198
|
+
} catch {
|
|
199
|
+
return { body, error: "Request body must be valid JSON before changing the replay model." };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function buildReplayMetrics(input) {
|
|
203
|
+
return {
|
|
204
|
+
status: input.status ?? null,
|
|
205
|
+
elapsedMs: input.elapsedMs ?? null,
|
|
206
|
+
inputTokens: input.inputTokens ?? null,
|
|
207
|
+
outputTokens: input.outputTokens ?? null,
|
|
208
|
+
responseBytes: byteLength(input.responseText),
|
|
209
|
+
streaming: input.streaming === true
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function numericDelta(original, replay) {
|
|
213
|
+
if (original === null || replay === null) return null;
|
|
214
|
+
return replay - original;
|
|
215
|
+
}
|
|
216
|
+
function buildReplayComparisons(original, replay) {
|
|
217
|
+
return [
|
|
218
|
+
{
|
|
219
|
+
id: "status",
|
|
220
|
+
label: "Status",
|
|
221
|
+
original: original.status,
|
|
222
|
+
replay: replay.status,
|
|
223
|
+
delta: numericDelta(original.status, replay.status)
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "elapsed",
|
|
227
|
+
label: "Elapsed",
|
|
228
|
+
original: original.elapsedMs,
|
|
229
|
+
replay: replay.elapsedMs,
|
|
230
|
+
delta: numericDelta(original.elapsedMs, replay.elapsedMs)
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: "input",
|
|
234
|
+
label: "Input",
|
|
235
|
+
original: original.inputTokens,
|
|
236
|
+
replay: replay.inputTokens,
|
|
237
|
+
delta: numericDelta(original.inputTokens, replay.inputTokens)
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: "output",
|
|
241
|
+
label: "Output",
|
|
242
|
+
original: original.outputTokens,
|
|
243
|
+
replay: replay.outputTokens,
|
|
244
|
+
delta: numericDelta(original.outputTokens, replay.outputTokens)
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "bytes",
|
|
248
|
+
label: "Bytes",
|
|
249
|
+
original: original.responseBytes,
|
|
250
|
+
replay: replay.responseBytes,
|
|
251
|
+
delta: numericDelta(original.responseBytes, replay.responseBytes)
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: "streaming",
|
|
255
|
+
label: "Stream",
|
|
256
|
+
original: original.streaming,
|
|
257
|
+
replay: replay.streaming,
|
|
258
|
+
delta: null
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
}
|
|
171
262
|
const ReplayResultSchema = object({
|
|
172
263
|
success: boolean(),
|
|
173
264
|
error: string().optional(),
|
|
174
|
-
responseStatus: number().optional(),
|
|
175
|
-
responseText: string().optional(),
|
|
176
|
-
inputTokens: number().optional(),
|
|
177
|
-
outputTokens: number().optional(),
|
|
178
|
-
elapsedMs: number().optional(),
|
|
265
|
+
responseStatus: number().nullable().optional(),
|
|
266
|
+
responseText: string().nullable().optional(),
|
|
267
|
+
inputTokens: number().nullable().optional(),
|
|
268
|
+
outputTokens: number().nullable().optional(),
|
|
269
|
+
elapsedMs: number().nullable().optional(),
|
|
179
270
|
streaming: boolean().optional()
|
|
180
271
|
});
|
|
272
|
+
function formatElapsed(ms) {
|
|
273
|
+
if (ms < 1e3) return `${String(ms)}ms`;
|
|
274
|
+
return `${(ms / 1e3).toFixed(1)}s`;
|
|
275
|
+
}
|
|
276
|
+
function formatMetricValue(value, metricId) {
|
|
277
|
+
if (value === null) return "-";
|
|
278
|
+
if (typeof value === "boolean") return value ? "stream" : "non-stream";
|
|
279
|
+
switch (metricId) {
|
|
280
|
+
case "elapsed":
|
|
281
|
+
return formatElapsed(value);
|
|
282
|
+
case "input":
|
|
283
|
+
case "output":
|
|
284
|
+
case "bytes":
|
|
285
|
+
return value.toLocaleString();
|
|
286
|
+
case "status":
|
|
287
|
+
return String(value);
|
|
288
|
+
case "streaming":
|
|
289
|
+
return value ? "stream" : "non-stream";
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function formatDelta(delta, metricId) {
|
|
293
|
+
if (delta === null) return "-";
|
|
294
|
+
const sign = delta > 0 ? "+" : "";
|
|
295
|
+
switch (metricId) {
|
|
296
|
+
case "elapsed":
|
|
297
|
+
return `${sign}${formatElapsed(delta)}`;
|
|
298
|
+
case "input":
|
|
299
|
+
case "output":
|
|
300
|
+
case "bytes":
|
|
301
|
+
case "status":
|
|
302
|
+
return `${sign}${delta.toLocaleString()}`;
|
|
303
|
+
case "streaming":
|
|
304
|
+
return "-";
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function deltaToneClass(delta) {
|
|
308
|
+
if (delta === null || delta === 0) return "text-muted-foreground";
|
|
309
|
+
if (delta > 0) return "text-amber-400";
|
|
310
|
+
return "text-emerald-400";
|
|
311
|
+
}
|
|
312
|
+
function ReplayComparisonTable({
|
|
313
|
+
comparisons
|
|
314
|
+
}) {
|
|
315
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-hidden rounded-md border border-border", children: [
|
|
316
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[1fr_1fr_1fr_1fr] bg-muted/40 px-3 py-2 text-[11px] font-medium text-muted-foreground", children: [
|
|
317
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Metric" }),
|
|
318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Original" }),
|
|
319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Replay" }),
|
|
320
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Delta" })
|
|
321
|
+
] }),
|
|
322
|
+
comparisons.map((comparison) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
323
|
+
"div",
|
|
324
|
+
{
|
|
325
|
+
className: "grid grid-cols-[1fr_1fr_1fr_1fr] border-t border-border px-3 py-2 text-xs",
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-muted-foreground", children: comparison.label }),
|
|
328
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono", children: formatMetricValue(comparison.original, comparison.id) }),
|
|
329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono", children: formatMetricValue(comparison.replay, comparison.id) }),
|
|
330
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `font-mono ${deltaToneClass(comparison.delta)}`, children: formatDelta(comparison.delta, comparison.id) })
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
comparison.id
|
|
334
|
+
))
|
|
335
|
+
] });
|
|
336
|
+
}
|
|
181
337
|
function ReplayDialog({ log, open, onOpenChange }) {
|
|
338
|
+
const { providers } = useProviders();
|
|
182
339
|
const [modifiedBody, setModifiedBody] = reactExports.useState(() => {
|
|
183
340
|
return log.rawRequestBody ?? "{}";
|
|
184
341
|
});
|
|
@@ -218,6 +375,48 @@ function ReplayDialog({ log, open, onOpenChange }) {
|
|
|
218
375
|
setError(null);
|
|
219
376
|
onOpenChange(false);
|
|
220
377
|
}
|
|
378
|
+
const replayModelOptions = reactExports.useMemo(() => {
|
|
379
|
+
const options = [];
|
|
380
|
+
for (const provider of providers) {
|
|
381
|
+
for (const model of provider.models) {
|
|
382
|
+
if (model.trim().length === 0) continue;
|
|
383
|
+
options.push({
|
|
384
|
+
key: `${provider.id}:${model}`,
|
|
385
|
+
providerName: provider.name,
|
|
386
|
+
model
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return options;
|
|
391
|
+
}, [providers]);
|
|
392
|
+
const currentReplayModel = readRequestModel(modifiedBody) ?? log.model ?? "";
|
|
393
|
+
function handleReplayModelChange(model) {
|
|
394
|
+
const result = replaceRequestModel(modifiedBody, model);
|
|
395
|
+
if (result.error !== null) {
|
|
396
|
+
setError(result.error);
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
setModifiedBody(result.body);
|
|
400
|
+
setReplayResult(null);
|
|
401
|
+
setError(null);
|
|
402
|
+
}
|
|
403
|
+
const originalMetrics = buildReplayMetrics({
|
|
404
|
+
status: log.responseStatus,
|
|
405
|
+
elapsedMs: log.elapsedMs,
|
|
406
|
+
inputTokens: log.inputTokens,
|
|
407
|
+
outputTokens: log.outputTokens,
|
|
408
|
+
responseText: log.responseText,
|
|
409
|
+
streaming: log.streaming
|
|
410
|
+
});
|
|
411
|
+
const replayMetrics = replayResult === null ? null : buildReplayMetrics({
|
|
412
|
+
status: replayResult.responseStatus,
|
|
413
|
+
elapsedMs: replayResult.elapsedMs,
|
|
414
|
+
inputTokens: replayResult.inputTokens,
|
|
415
|
+
outputTokens: replayResult.outputTokens,
|
|
416
|
+
responseText: replayResult.responseText,
|
|
417
|
+
streaming: replayResult.streaming
|
|
418
|
+
});
|
|
419
|
+
const replayComparisons = replayMetrics === null ? [] : buildReplayComparisons(originalMetrics, replayMetrics);
|
|
221
420
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "max-w-4xl max-h-[85vh] overflow-auto", children: [
|
|
222
421
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
223
422
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
|
|
@@ -228,9 +427,31 @@ function ReplayDialog({ log, open, onOpenChange }) {
|
|
|
228
427
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { children: [
|
|
229
428
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "modified", children: "Modified Request" }),
|
|
230
429
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "original", children: "Original Response" }),
|
|
231
|
-
replayResult && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "replay", children: "Replay Response" })
|
|
430
|
+
replayResult && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "replay", children: "Replay Response" }),
|
|
431
|
+
replayResult && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "compare", children: "Compare" })
|
|
232
432
|
] }),
|
|
233
433
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsContent, { value: "modified", className: "space-y-4", children: [
|
|
434
|
+
replayModelOptions.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-1.5", children: [
|
|
435
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: `replay-model-${String(log.id)}`, className: "text-sm font-medium", children: "Replay target" }),
|
|
436
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
437
|
+
"select",
|
|
438
|
+
{
|
|
439
|
+
id: `replay-model-${String(log.id)}`,
|
|
440
|
+
value: currentReplayModel,
|
|
441
|
+
onChange: (event) => handleReplayModelChange(event.currentTarget.value),
|
|
442
|
+
className: "h-8 rounded-md border border-input bg-background px-2 text-sm",
|
|
443
|
+
children: [
|
|
444
|
+
currentReplayModel === "" && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Select model" }),
|
|
445
|
+
currentReplayModel !== "" && !replayModelOptions.some((option) => option.model === currentReplayModel) && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: currentReplayModel, children: currentReplayModel }),
|
|
446
|
+
replayModelOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs("option", { value: option.model, children: [
|
|
447
|
+
option.providerName,
|
|
448
|
+
" / ",
|
|
449
|
+
option.model
|
|
450
|
+
] }, option.key))
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
)
|
|
454
|
+
] }),
|
|
234
455
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
235
456
|
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium mb-2 block", children: "Request Body (JSON)" }),
|
|
236
457
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
@@ -257,6 +478,7 @@ function ReplayDialog({ log, open, onOpenChange }) {
|
|
|
257
478
|
children: loading ? "Replaying..." : "Replay"
|
|
258
479
|
}
|
|
259
480
|
) }),
|
|
481
|
+
replayResult !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(ReplayComparisonTable, { comparisons: replayComparisons.slice(0, 4) }),
|
|
260
482
|
replayResult && replayResult.success && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { defaultValue: "parsed", children: [
|
|
261
483
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { children: [
|
|
262
484
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "parsed", children: "Response" }),
|
|
@@ -296,7 +518,7 @@ function ReplayDialog({ log, open, onOpenChange }) {
|
|
|
296
518
|
) }),
|
|
297
519
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "raw", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "font-mono text-xs whitespace-pre-wrap bg-muted p-3 rounded-md max-h-96 overflow-auto", children: log.responseText }) })
|
|
298
520
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground italic", children: "No original response" }) }),
|
|
299
|
-
replayResult && replayResult.success && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "replay", children: replayResult.responseText !== null ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { defaultValue: "parsed", children: [
|
|
521
|
+
replayResult && replayResult.success && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "replay", children: (replayResult.responseText ?? null) !== null ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { defaultValue: "parsed", children: [
|
|
300
522
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { children: [
|
|
301
523
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "parsed", children: "Response" }),
|
|
302
524
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "raw", children: "Raw Response" })
|
|
@@ -312,8 +534,12 @@ function ReplayDialog({ log, open, onOpenChange }) {
|
|
|
312
534
|
apiFormat: log.apiFormat
|
|
313
535
|
}
|
|
314
536
|
) }),
|
|
315
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "raw", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "font-mono text-xs whitespace-pre-wrap bg-muted p-3 rounded-md max-h-96 overflow-auto", children: replayResult.responseText }) })
|
|
316
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground italic", children: "No replay response" }) })
|
|
537
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "raw", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "font-mono text-xs whitespace-pre-wrap bg-muted p-3 rounded-md max-h-96 overflow-auto", children: replayResult.responseText ?? "" }) })
|
|
538
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground italic", children: "No replay response" }) }),
|
|
539
|
+
replayResult && /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsContent, { value: "compare", className: "space-y-3", children: [
|
|
540
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ReplayComparisonTable, { comparisons: replayComparisons }),
|
|
541
|
+
replayResult.success ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: replayResult.error ?? "Replay failed" })
|
|
542
|
+
] })
|
|
317
543
|
] })
|
|
318
544
|
] }) });
|
|
319
545
|
}
|