@tonyclaw/agent-inspector 2.0.2 → 2.0.4
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-Bp7_x-5N.js → CompareDrawer-BCH_fsLm.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-D85_UANk.js +101 -0
- package/.output/public/assets/{ReplayDialog-DFHCd0yx.js → ReplayDialog-DTeaHHit.js} +1 -1
- package/.output/public/assets/RequestAnatomy-DZ8grAih.js +1 -0
- package/.output/public/assets/ResponseView-Cldm6RCi.js +1 -0
- package/.output/public/assets/{StreamingChunkSequence-Bjs4Lqwn.js → StreamingChunkSequence-3x4p-yT7.js} +1 -1
- package/.output/public/assets/_sessionId-YqWFBu6d.js +1 -0
- package/.output/public/assets/index-BIw2H6jO.js +1 -0
- package/.output/public/assets/index-CobXD0yH.css +1 -0
- package/.output/public/assets/{json-viewer-6uV_YXws.js → json-viewer-BrzjD7qI.js} +1 -1
- package/.output/public/assets/{main-FSGUGtEL.js → main-mgxeUdZQ.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +8 -8
- package/.output/server/{_sessionId-_bf9vUww.mjs → _sessionId-C4xsxIWm.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-DIth2DQM.mjs → CompareDrawer-DuWEpqQ7.mjs} +4 -4
- package/.output/server/_ssr/{ProxyViewerContainer-249bTH-T.mjs → ProxyViewerContainer-Cckz5qKu.mjs} +519 -89
- package/.output/server/_ssr/{ReplayDialog-C1aGx0y1.mjs → ReplayDialog-BDRcr8E5.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-D2bCiEJn.mjs → RequestAnatomy-BoO2_Ij0.mjs} +5 -5
- package/.output/server/_ssr/{ResponseView-DP6k4Xs_.mjs → ResponseView-DZiPBxvO.mjs} +21 -17
- package/.output/server/_ssr/{StreamingChunkSequence-HyXZV-b5.mjs → StreamingChunkSequence-D-be7KEL.mjs} +3 -3
- package/.output/server/_ssr/{index-Bt47f9pn.mjs → index-5RImHKfu.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Co-YRwUP.mjs → json-viewer-aJhb93ZK.mjs} +2 -2
- package/.output/server/_ssr/{router-to_OJirX.mjs → router-Dgkv5nKP.mjs} +38 -99
- package/.output/server/{_tanstack-start-manifest_v-Bd-2YRWo.mjs → _tanstack-start-manifest_v-B8rrWXjr.mjs} +1 -1
- package/.output/server/index.mjs +63 -63
- package/README.md +5 -2
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +25 -15
- package/src/components/ProxyViewerContainer.tsx +2 -1
- package/src/components/providers/SettingsDialog.tsx +45 -1
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +276 -0
- package/src/components/proxy-viewer/AnswerMarkdown.tsx +16 -0
- package/src/components/proxy-viewer/ConversationGroup.tsx +18 -0
- package/src/components/proxy-viewer/ConversationHeader.tsx +6 -6
- package/src/components/proxy-viewer/LogEntry.tsx +5 -5
- package/src/components/proxy-viewer/LogEntryHeader.tsx +9 -14
- package/src/components/proxy-viewer/ResponseView.tsx +2 -6
- package/src/components/proxy-viewer/ToolTraceEvents.tsx +32 -0
- package/src/components/proxy-viewer/TurnGroup.tsx +15 -1
- package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +2 -2
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +6 -12
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +10 -14
- package/src/components/proxy-viewer/viewerState.ts +177 -0
- package/src/lib/runtimeConfig.ts +6 -0
- package/src/lib/timeDisplay.ts +22 -0
- package/src/lib/useOnboarding.ts +2 -0
- package/src/lib/useStripConfig.ts +16 -0
- package/src/proxy/chunkStorage.ts +3 -4
- package/src/proxy/config.ts +3 -0
- package/src/proxy/logger.ts +8 -15
- package/src/proxy/store.ts +8 -16
- package/src/routes/api/config.ts +5 -1
- package/src/routes/api/providers.$providerId.test.log.ts +0 -79
- package/.output/public/assets/ProxyViewerContainer-USuxPy-K.js +0 -101
- package/.output/public/assets/RequestAnatomy-ehyrskxt.js +0 -1
- package/.output/public/assets/ResponseView-BNGyc8e_.js +0 -1
- package/.output/public/assets/_sessionId-D_SeK_qp.js +0 -1
- package/.output/public/assets/index-BGGOWR7A.js +0 -1
- package/.output/public/assets/index-CIL46Z2y.css +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createFileRoute } from "@tanstack/react-router";
|
|
2
2
|
import { getProvider, getModelUsageName } from "../../proxy/providers";
|
|
3
|
-
import { appendLogEntry } from "../../proxy/logger";
|
|
4
3
|
import { addTestLogEntry } from "../../proxy/store";
|
|
5
4
|
import { buildProviderTestRequestBody } from "../../lib/providerTestPrompt";
|
|
6
5
|
import {
|
|
@@ -13,38 +12,6 @@ function hasSuccessField(result: ProviderTestState): result is TestResult {
|
|
|
13
12
|
return Object.prototype.hasOwnProperty.call(result, "success");
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
function createTestLogEntry(
|
|
17
|
-
providerName: string,
|
|
18
|
-
path: string,
|
|
19
|
-
body: string,
|
|
20
|
-
upstreamUrl: string,
|
|
21
|
-
result: TestResult,
|
|
22
|
-
isTest: boolean,
|
|
23
|
-
): Record<string, unknown> {
|
|
24
|
-
return {
|
|
25
|
-
timestamp: new Date().toISOString(),
|
|
26
|
-
id: `test-${Date.now()}`,
|
|
27
|
-
method: "POST",
|
|
28
|
-
path,
|
|
29
|
-
model: isTest ? result.model : undefined,
|
|
30
|
-
sessionId: null,
|
|
31
|
-
rawRequestBody: body,
|
|
32
|
-
responseStatus: result.success ? 200 : 500,
|
|
33
|
-
responseText: result.rawResponse ?? JSON.stringify(result),
|
|
34
|
-
inputTokens: result.inputTokens ?? null,
|
|
35
|
-
outputTokens: result.outputTokens ?? null,
|
|
36
|
-
elapsedMs: result.latencyMs ?? 0,
|
|
37
|
-
streaming: result.streaming ?? false,
|
|
38
|
-
userAgent: "provider-test",
|
|
39
|
-
origin: null,
|
|
40
|
-
upstreamUrl,
|
|
41
|
-
error: result.success ? null : (result.error?.message ?? String(result.error)),
|
|
42
|
-
isTest: true,
|
|
43
|
-
providerName,
|
|
44
|
-
headers: result.requestHeaders ?? {},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
15
|
async function logModelResults(
|
|
49
16
|
displayName: string,
|
|
50
17
|
providerName: string,
|
|
@@ -65,7 +32,6 @@ async function logModelResults(
|
|
|
65
32
|
const streamingResult = sResult;
|
|
66
33
|
|
|
67
34
|
const requestBody = JSON.stringify(buildProviderTestRequestBody(usageModel, "non-streaming"));
|
|
68
|
-
const upstreamUrl = `${anthropicUrl}/v1/messages`;
|
|
69
35
|
|
|
70
36
|
await addTestLogEntry({
|
|
71
37
|
timestamp: new Date().toISOString(),
|
|
@@ -90,17 +56,6 @@ async function logModelResults(
|
|
|
90
56
|
headers: nonStreamingResult.requestHeaders ?? {},
|
|
91
57
|
});
|
|
92
58
|
|
|
93
|
-
appendLogEntry(
|
|
94
|
-
createTestLogEntry(
|
|
95
|
-
providerName,
|
|
96
|
-
"/v1/messages",
|
|
97
|
-
requestBody,
|
|
98
|
-
upstreamUrl,
|
|
99
|
-
nonStreamingResult,
|
|
100
|
-
true,
|
|
101
|
-
),
|
|
102
|
-
);
|
|
103
|
-
|
|
104
59
|
const streamingRequestBody = JSON.stringify(
|
|
105
60
|
buildProviderTestRequestBody(usageModel, "streaming"),
|
|
106
61
|
);
|
|
@@ -128,17 +83,6 @@ async function logModelResults(
|
|
|
128
83
|
providerName,
|
|
129
84
|
headers: streamingResult.requestHeaders ?? {},
|
|
130
85
|
});
|
|
131
|
-
|
|
132
|
-
appendLogEntry(
|
|
133
|
-
createTestLogEntry(
|
|
134
|
-
providerName,
|
|
135
|
-
"/v1/messages",
|
|
136
|
-
streamingRequestBody,
|
|
137
|
-
upstreamUrl,
|
|
138
|
-
streamingResult,
|
|
139
|
-
true,
|
|
140
|
-
),
|
|
141
|
-
);
|
|
142
86
|
}
|
|
143
87
|
}
|
|
144
88
|
|
|
@@ -150,7 +94,6 @@ async function logModelResults(
|
|
|
150
94
|
const streamingResult = sResult;
|
|
151
95
|
|
|
152
96
|
const requestBody = JSON.stringify(buildProviderTestRequestBody(usageModel, "non-streaming"));
|
|
153
|
-
const upstreamUrl = `${openaiUrl}/v1/chat/completions`;
|
|
154
97
|
|
|
155
98
|
await addTestLogEntry({
|
|
156
99
|
timestamp: new Date().toISOString(),
|
|
@@ -175,17 +118,6 @@ async function logModelResults(
|
|
|
175
118
|
headers: nonStreamingResult.requestHeaders ?? {},
|
|
176
119
|
});
|
|
177
120
|
|
|
178
|
-
appendLogEntry(
|
|
179
|
-
createTestLogEntry(
|
|
180
|
-
providerName,
|
|
181
|
-
"/v1/chat/completions",
|
|
182
|
-
requestBody,
|
|
183
|
-
upstreamUrl,
|
|
184
|
-
nonStreamingResult,
|
|
185
|
-
true,
|
|
186
|
-
),
|
|
187
|
-
);
|
|
188
|
-
|
|
189
121
|
const streamingRequestBody = JSON.stringify(
|
|
190
122
|
buildProviderTestRequestBody(usageModel, "streaming"),
|
|
191
123
|
);
|
|
@@ -213,17 +145,6 @@ async function logModelResults(
|
|
|
213
145
|
providerName,
|
|
214
146
|
headers: streamingResult.requestHeaders ?? {},
|
|
215
147
|
});
|
|
216
|
-
|
|
217
|
-
appendLogEntry(
|
|
218
|
-
createTestLogEntry(
|
|
219
|
-
providerName,
|
|
220
|
-
"/v1/chat/completions",
|
|
221
|
-
streamingRequestBody,
|
|
222
|
-
upstreamUrl,
|
|
223
|
-
streamingResult,
|
|
224
|
-
true,
|
|
225
|
-
),
|
|
226
|
-
);
|
|
227
148
|
}
|
|
228
149
|
}
|
|
229
150
|
}
|