@tonyclaw/agent-inspector 2.1.13 → 2.1.15
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-BcEd6V-V.js +1 -0
- package/.output/public/assets/ProxyViewerContainer-h851qWNp.js +106 -0
- package/.output/public/assets/ReplayDialog-BNpC0548.js +1 -0
- package/.output/public/assets/{RequestAnatomy-BjlBT-Cy.js → RequestAnatomy-Ds1uRLVB.js} +1 -1
- package/.output/public/assets/ResponseView-7KPVqKl5.js +3 -0
- package/.output/public/assets/{StreamingChunkSequence-D2_SMhlE.js → StreamingChunkSequence-BHQT261s.js} +1 -1
- package/.output/public/assets/_sessionId-DWePGjnS.js +1 -0
- package/.output/public/assets/index-CI1-G8ua.js +1 -0
- package/.output/public/assets/index-DdhFqPsI.css +1 -0
- package/.output/public/assets/index-DjKt8XKe.js +14 -0
- package/.output/public/assets/json-viewer-CkCu-rka.js +1 -0
- package/.output/public/assets/{main-Dtspb4Ui.js → main-DpD1N0S8.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +194 -200
- package/.output/server/_libs/react-markdown.mjs +90 -2
- package/.output/server/{_sessionId-CXDcLuvi.mjs → _sessionId-DF9Sy8cP.mjs} +6 -57
- package/.output/server/_ssr/{CompareDrawer-CMoCAoeq.mjs → CompareDrawer-BoxztaO7.mjs} +50 -74
- package/.output/server/_ssr/{ProxyViewerContainer-BW2vVCBN.mjs → ProxyViewerContainer-CRBkqFlJ.mjs} +1221 -799
- package/.output/server/_ssr/{ReplayDialog-ChXL1t8H.mjs → ReplayDialog-Cc1dyDuK.mjs} +18 -62
- package/.output/server/_ssr/{RequestAnatomy-DtKzIlfU.mjs → RequestAnatomy-CMGSsz5Z.mjs} +6 -57
- package/.output/server/_ssr/{ResponseView-B5I8drzc.mjs → ResponseView-Cp10DM1D.mjs} +139 -61
- package/.output/server/_ssr/{StreamingChunkSequence-DvwjQNcO.mjs → StreamingChunkSequence-B1VGxy3A.mjs} +13 -58
- package/.output/server/_ssr/{index-D_ZHtRfl.mjs → index-47XVPghS.mjs} +6 -57
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/json-viewer-zDE2rrmJ.mjs +478 -0
- package/.output/server/_ssr/{router-DhL9Wp3N.mjs → router-DVeuZFqI.mjs} +680 -174
- package/.output/server/{_tanstack-start-manifest_v-BHgoAmxZ.mjs → _tanstack-start-manifest_v-Bp8JxtPW.mjs} +1 -1
- package/.output/server/index.mjs +72 -58
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +28 -2
- package/src/components/ProxyViewerContainer.tsx +25 -17
- package/src/components/clients/ClientLogo.tsx +132 -0
- package/src/components/groups/GroupsDialog.tsx +18 -13
- package/src/components/providers/ImportWizardDialog.tsx +7 -1
- package/src/components/providers/ProviderCard.tsx +10 -1
- package/src/components/providers/ProviderForm.tsx +157 -41
- package/src/components/providers/ProvidersPanel.tsx +5 -1
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +56 -23
- package/src/components/proxy-viewer/AnswerMarkdown.tsx +8 -3
- package/src/components/proxy-viewer/CompareDrawer.tsx +58 -14
- package/src/components/proxy-viewer/ConversationGroup.tsx +11 -15
- package/src/components/proxy-viewer/ConversationHeader.tsx +33 -41
- package/src/components/proxy-viewer/LogEntry.tsx +41 -12
- package/src/components/proxy-viewer/LogEntryHeader.tsx +122 -51
- package/src/components/proxy-viewer/ProviderLogoStack.tsx +60 -0
- package/src/components/proxy-viewer/ReplayDialog.tsx +8 -2
- package/src/components/proxy-viewer/RequestToolsPanel.tsx +19 -13
- package/src/components/proxy-viewer/StreamingChunkSequence.tsx +9 -3
- package/src/components/proxy-viewer/ThreadConnector.tsx +18 -7
- package/src/components/proxy-viewer/TurnGroup.tsx +67 -32
- package/src/components/proxy-viewer/TurnGroupList.tsx +153 -0
- package/src/components/proxy-viewer/anatomy/sessionContextSummary.ts +74 -2
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +13 -7
- package/src/components/proxy-viewer/formats/index.tsx +10 -3
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +185 -17
- package/src/components/proxy-viewer/log-formats/openai.ts +107 -15
- package/src/components/proxy-viewer/logFocus.ts +15 -2
- package/src/components/proxy-viewer/requestTools.ts +7 -3
- package/src/components/proxy-viewer/viewerState.ts +77 -5
- package/src/components/ui/json-viewer-bulk.ts +41 -6
- package/src/components/ui/json-viewer.tsx +9 -8
- package/src/contracts/index.ts +15 -1
- package/src/contracts/openai.ts +94 -0
- package/src/lib/providerContract.ts +1 -0
- package/src/lib/providerModelMetadata.ts +7 -1
- package/src/lib/sessionInfoContract.ts +1 -0
- package/src/lib/stopReason.ts +59 -15
- package/src/lib/upstreamUrl.ts +46 -0
- package/src/mcp/previewExtractor.ts +73 -3
- package/src/mcp/server.ts +2 -0
- package/src/mcp/toolHandlers.ts +2 -0
- package/src/proxy/constants.ts +2 -0
- package/src/proxy/formats/openai/handler.ts +40 -9
- package/src/proxy/formats/openai/index.ts +7 -0
- package/src/proxy/formats/openai/schemas.ts +15 -1
- package/src/proxy/formats/openai/stream.ts +529 -135
- package/src/proxy/formats/registry.ts +9 -1
- package/src/proxy/providerImporters.ts +45 -5
- package/src/proxy/providers.ts +31 -11
- package/src/proxy/schemas.ts +6 -0
- package/src/proxy/sessionInfo.ts +5 -1
- package/src/proxy/toolSchemaWarnings.ts +25 -3
- package/src/proxy/upstream.ts +18 -37
- package/src/routes/api/providers.$providerId.ts +1 -0
- package/src/routes/api/providers.ts +2 -0
- package/.output/public/assets/CompareDrawer-Cz_1vIpR.js +0 -1
- package/.output/public/assets/ProxyViewerContainer-7QSiluMf.js +0 -117
- package/.output/public/assets/ReplayDialog-sBA1KAYD.js +0 -1
- package/.output/public/assets/ResponseView-PtEKzml9.js +0 -1
- package/.output/public/assets/_sessionId-DZfB4ruK.js +0 -1
- package/.output/public/assets/index-B-QQLbpz.js +0 -1
- package/.output/public/assets/index-CmtfjQPv.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as unreachable } from "./devlop.mjs";
|
|
2
|
-
import { j as jsxRuntimeExports } from "./react.mjs";
|
|
2
|
+
import { r as reactExports, j as jsxRuntimeExports } from "./react.mjs";
|
|
3
3
|
import { u as unified } from "./unified.mjs";
|
|
4
4
|
import { r as remarkParse } from "./remark-parse.mjs";
|
|
5
5
|
import { r as remarkRehype } from "./remark-rehype.mjs";
|
|
@@ -7,6 +7,51 @@ import { V as VFile } from "./vfile.mjs";
|
|
|
7
7
|
import { v as visit } from "./unist-util-visit.mjs";
|
|
8
8
|
import { t as toJsxRuntime } from "./hast-util-to-jsx-runtime.mjs";
|
|
9
9
|
import { u as urlAttributes } from "./html-url-attributes.mjs";
|
|
10
|
+
import "./bail.mjs";
|
|
11
|
+
import "./extend.mjs";
|
|
12
|
+
import "./is-plain-obj.mjs";
|
|
13
|
+
import "./trough.mjs";
|
|
14
|
+
import "./mdast-util-from-markdown.mjs";
|
|
15
|
+
import "./micromark-util-decode-numeric-character-reference+[...].mjs";
|
|
16
|
+
import "./micromark-util-decode-string.mjs";
|
|
17
|
+
import "./decode-named-character-reference+[...].mjs";
|
|
18
|
+
import "./character-entities.mjs";
|
|
19
|
+
import "./micromark-util-normalize-identifier+[...].mjs";
|
|
20
|
+
import "./micromark.mjs";
|
|
21
|
+
import "./micromark-util-combine-extensions+[...].mjs";
|
|
22
|
+
import "./micromark-util-chunked.mjs";
|
|
23
|
+
import "./micromark-factory-space.mjs";
|
|
24
|
+
import "./micromark-util-character.mjs";
|
|
25
|
+
import "./micromark-core-commonmark.mjs";
|
|
26
|
+
import "./micromark-util-classify-character+[...].mjs";
|
|
27
|
+
import "./micromark-util-resolve-all.mjs";
|
|
28
|
+
import "./micromark-util-subtokenize.mjs";
|
|
29
|
+
import "./micromark-factory-destination.mjs";
|
|
30
|
+
import "./micromark-factory-label.mjs";
|
|
31
|
+
import "./micromark-factory-title.mjs";
|
|
32
|
+
import "./micromark-factory-whitespace.mjs";
|
|
33
|
+
import "./micromark-util-html-tag-name.mjs";
|
|
34
|
+
import "./unist-util-stringify-position.mjs";
|
|
35
|
+
import "./mdast-util-to-string.mjs";
|
|
36
|
+
import "./mdast-util-to-hast.mjs";
|
|
37
|
+
import "./ungap__structured-clone.mjs";
|
|
38
|
+
import "./micromark-util-sanitize-uri.mjs";
|
|
39
|
+
import "./unist-util-position.mjs";
|
|
40
|
+
import "./trim-lines.mjs";
|
|
41
|
+
import "./vfile-message.mjs";
|
|
42
|
+
import "node:process";
|
|
43
|
+
import "node:path";
|
|
44
|
+
import "node:url";
|
|
45
|
+
import "./unist-util-visit-parents.mjs";
|
|
46
|
+
import "./unist-util-is.mjs";
|
|
47
|
+
import "./comma-separated-tokens.mjs";
|
|
48
|
+
import "./property-information.mjs";
|
|
49
|
+
import "./space-separated-tokens.mjs";
|
|
50
|
+
import "./style-to-js.mjs";
|
|
51
|
+
import "./style-to-object.mjs";
|
|
52
|
+
import "./inline-style-parser.mjs";
|
|
53
|
+
import "./hast-util-whitespace.mjs";
|
|
54
|
+
import "./estree-util-is-identifier-name.mjs";
|
|
10
55
|
const changelog = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md";
|
|
11
56
|
const emptyPlugins = [];
|
|
12
57
|
const emptyRemarkRehypeOptions = { allowDangerousHtml: true };
|
|
@@ -50,6 +95,46 @@ function Markdown(options) {
|
|
|
50
95
|
const file = createFile(options);
|
|
51
96
|
return post(processor.runSync(processor.parse(file), file), options);
|
|
52
97
|
}
|
|
98
|
+
async function MarkdownAsync(options) {
|
|
99
|
+
const processor = createProcessor(options);
|
|
100
|
+
const file = createFile(options);
|
|
101
|
+
const tree = await processor.run(processor.parse(file), file);
|
|
102
|
+
return post(tree, options);
|
|
103
|
+
}
|
|
104
|
+
function MarkdownHooks(options) {
|
|
105
|
+
const processor = createProcessor(options);
|
|
106
|
+
const [error, setError] = reactExports.useState(
|
|
107
|
+
/** @type {Error | undefined} */
|
|
108
|
+
void 0
|
|
109
|
+
);
|
|
110
|
+
const [tree, setTree] = reactExports.useState(
|
|
111
|
+
/** @type {Root | undefined} */
|
|
112
|
+
void 0
|
|
113
|
+
);
|
|
114
|
+
reactExports.useEffect(
|
|
115
|
+
function() {
|
|
116
|
+
let cancelled = false;
|
|
117
|
+
const file = createFile(options);
|
|
118
|
+
processor.run(processor.parse(file), file, function(error2, tree2) {
|
|
119
|
+
if (!cancelled) {
|
|
120
|
+
setError(error2);
|
|
121
|
+
setTree(tree2);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return function() {
|
|
125
|
+
cancelled = true;
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
[
|
|
129
|
+
options.children,
|
|
130
|
+
options.rehypePlugins,
|
|
131
|
+
options.remarkPlugins,
|
|
132
|
+
options.remarkRehypeOptions
|
|
133
|
+
]
|
|
134
|
+
);
|
|
135
|
+
if (error) throw error;
|
|
136
|
+
return tree ? post(tree, options) : options.fallback;
|
|
137
|
+
}
|
|
53
138
|
function createProcessor(options) {
|
|
54
139
|
const rehypePlugins = options.rehypePlugins || emptyPlugins;
|
|
55
140
|
const remarkPlugins = options.remarkPlugins || emptyPlugins;
|
|
@@ -143,5 +228,8 @@ function defaultUrlTransform(value) {
|
|
|
143
228
|
return "";
|
|
144
229
|
}
|
|
145
230
|
export {
|
|
146
|
-
|
|
231
|
+
MarkdownAsync,
|
|
232
|
+
MarkdownHooks,
|
|
233
|
+
Markdown as default,
|
|
234
|
+
defaultUrlTransform
|
|
147
235
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./_libs/react.mjs";
|
|
2
|
-
import { P as ProxyViewerContainer } from "./_ssr/ProxyViewerContainer-
|
|
3
|
-
import { R as Route$B } from "./_ssr/router-
|
|
2
|
+
import { P as ProxyViewerContainer } from "./_ssr/ProxyViewerContainer-CRBkqFlJ.mjs";
|
|
3
|
+
import { R as Route$B } from "./_ssr/router-DVeuZFqI.mjs";
|
|
4
4
|
import "./_libs/jszip.mjs";
|
|
5
5
|
import "./_libs/modelcontextprotocol__server.mjs";
|
|
6
6
|
import "./_libs/swr.mjs";
|
|
@@ -38,9 +38,9 @@ import "./_libs/use-sidecar.mjs";
|
|
|
38
38
|
import "./_libs/use-callback-ref.mjs";
|
|
39
39
|
import "./_libs/aria-hidden.mjs";
|
|
40
40
|
import "./_libs/class-variance-authority.mjs";
|
|
41
|
-
import "./_libs/diff.mjs";
|
|
42
41
|
import "./_libs/tanstack__react-virtual.mjs";
|
|
43
42
|
import "./_libs/tanstack__virtual-core.mjs";
|
|
43
|
+
import "./_libs/diff.mjs";
|
|
44
44
|
import "./_libs/radix-ui__react-select.mjs";
|
|
45
45
|
import "./_libs/radix-ui__number.mjs";
|
|
46
46
|
import "./_libs/radix-ui__react-collection.mjs";
|
|
@@ -55,60 +55,6 @@ import "./_libs/radix-ui__react-use-size.mjs";
|
|
|
55
55
|
import "./_libs/radix-ui__react-use-previous.mjs";
|
|
56
56
|
import "./_libs/@radix-ui/react-visually-hidden+[...].mjs";
|
|
57
57
|
import "./_libs/lucide-react.mjs";
|
|
58
|
-
import "./_libs/react-markdown.mjs";
|
|
59
|
-
import "./_libs/devlop.mjs";
|
|
60
|
-
import "./_libs/unified.mjs";
|
|
61
|
-
import "./_libs/bail.mjs";
|
|
62
|
-
import "./_libs/extend.mjs";
|
|
63
|
-
import "./_libs/is-plain-obj.mjs";
|
|
64
|
-
import "./_libs/trough.mjs";
|
|
65
|
-
import "./_libs/vfile.mjs";
|
|
66
|
-
import "./_libs/vfile-message.mjs";
|
|
67
|
-
import "./_libs/unist-util-stringify-position.mjs";
|
|
68
|
-
import "node:process";
|
|
69
|
-
import "node:path";
|
|
70
|
-
import "node:url";
|
|
71
|
-
import "./_libs/remark-parse.mjs";
|
|
72
|
-
import "./_libs/mdast-util-from-markdown.mjs";
|
|
73
|
-
import "./_libs/micromark-util-decode-numeric-character-reference+[...].mjs";
|
|
74
|
-
import "./_libs/micromark-util-decode-string.mjs";
|
|
75
|
-
import "./_libs/decode-named-character-reference+[...].mjs";
|
|
76
|
-
import "./_libs/character-entities.mjs";
|
|
77
|
-
import "./_libs/micromark-util-normalize-identifier+[...].mjs";
|
|
78
|
-
import "./_libs/micromark.mjs";
|
|
79
|
-
import "./_libs/micromark-util-combine-extensions+[...].mjs";
|
|
80
|
-
import "./_libs/micromark-util-chunked.mjs";
|
|
81
|
-
import "./_libs/micromark-factory-space.mjs";
|
|
82
|
-
import "./_libs/micromark-util-character.mjs";
|
|
83
|
-
import "./_libs/micromark-core-commonmark.mjs";
|
|
84
|
-
import "./_libs/micromark-util-classify-character+[...].mjs";
|
|
85
|
-
import "./_libs/micromark-util-resolve-all.mjs";
|
|
86
|
-
import "./_libs/micromark-util-subtokenize.mjs";
|
|
87
|
-
import "./_libs/micromark-factory-destination.mjs";
|
|
88
|
-
import "./_libs/micromark-factory-label.mjs";
|
|
89
|
-
import "./_libs/micromark-factory-title.mjs";
|
|
90
|
-
import "./_libs/micromark-factory-whitespace.mjs";
|
|
91
|
-
import "./_libs/micromark-util-html-tag-name.mjs";
|
|
92
|
-
import "./_libs/mdast-util-to-string.mjs";
|
|
93
|
-
import "./_libs/remark-rehype.mjs";
|
|
94
|
-
import "./_libs/mdast-util-to-hast.mjs";
|
|
95
|
-
import "./_libs/ungap__structured-clone.mjs";
|
|
96
|
-
import "./_libs/micromark-util-sanitize-uri.mjs";
|
|
97
|
-
import "./_libs/unist-util-position.mjs";
|
|
98
|
-
import "./_libs/trim-lines.mjs";
|
|
99
|
-
import "./_libs/unist-util-visit.mjs";
|
|
100
|
-
import "./_libs/unist-util-visit-parents.mjs";
|
|
101
|
-
import "./_libs/unist-util-is.mjs";
|
|
102
|
-
import "./_libs/hast-util-to-jsx-runtime.mjs";
|
|
103
|
-
import "./_libs/comma-separated-tokens.mjs";
|
|
104
|
-
import "./_libs/property-information.mjs";
|
|
105
|
-
import "./_libs/space-separated-tokens.mjs";
|
|
106
|
-
import "./_libs/style-to-js.mjs";
|
|
107
|
-
import "./_libs/style-to-object.mjs";
|
|
108
|
-
import "./_libs/inline-style-parser.mjs";
|
|
109
|
-
import "./_libs/hast-util-whitespace.mjs";
|
|
110
|
-
import "./_libs/estree-util-is-identifier-name.mjs";
|
|
111
|
-
import "./_libs/html-url-attributes.mjs";
|
|
112
58
|
import "./_libs/zod.mjs";
|
|
113
59
|
import "./_libs/radix-ui__react-tabs.mjs";
|
|
114
60
|
import "./_libs/radix-ui__react-roving-focus.mjs";
|
|
@@ -130,10 +76,13 @@ import "node:fs";
|
|
|
130
76
|
import "node:fs/promises";
|
|
131
77
|
import "node:readline";
|
|
132
78
|
import "node:buffer";
|
|
79
|
+
import "node:path";
|
|
133
80
|
import "node:crypto";
|
|
134
81
|
import "node:child_process";
|
|
82
|
+
import "node:url";
|
|
135
83
|
import "./_libs/conf.mjs";
|
|
136
84
|
import "node:util";
|
|
85
|
+
import "node:process";
|
|
137
86
|
import "node:assert";
|
|
138
87
|
import "./_libs/dot-prop.mjs";
|
|
139
88
|
import "./_libs/env-paths.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { g as getLogFormatAdapter, r as resolveLogFormat, a as getConversationId, c as cn, B as Badge, f as formatTokens,
|
|
3
|
-
import "./router-
|
|
2
|
+
import { g as getLogFormatAdapter, r as resolveLogFormat, a as getConversationId, c as cn, B as Badge, f as formatTokens, b as copyTextToClipboard, L as LazyJsonViewerFromString } from "./ProxyViewerContainer-CRBkqFlJ.mjs";
|
|
3
|
+
import "./router-DVeuZFqI.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
|
-
import { X,
|
|
6
|
+
import { X, aj as Rows3, ak as Columns2, O as Minus, P as Plus, x as Pencil, f as ChevronRight, al as Equal, a as Check, c as Copy } from "../_libs/lucide-react.mjs";
|
|
7
7
|
import "../_libs/swr.mjs";
|
|
8
8
|
import "../_libs/use-sync-external-store.mjs";
|
|
9
9
|
import "../_libs/dequal.mjs";
|
|
@@ -39,9 +39,9 @@ import "../_libs/use-sidecar.mjs";
|
|
|
39
39
|
import "../_libs/use-callback-ref.mjs";
|
|
40
40
|
import "../_libs/aria-hidden.mjs";
|
|
41
41
|
import "../_libs/class-variance-authority.mjs";
|
|
42
|
-
import "../_libs/diff.mjs";
|
|
43
42
|
import "../_libs/tanstack__react-virtual.mjs";
|
|
44
43
|
import "../_libs/tanstack__virtual-core.mjs";
|
|
44
|
+
import "../_libs/diff.mjs";
|
|
45
45
|
import "../_libs/radix-ui__react-select.mjs";
|
|
46
46
|
import "../_libs/radix-ui__number.mjs";
|
|
47
47
|
import "../_libs/radix-ui__react-collection.mjs";
|
|
@@ -55,60 +55,6 @@ import "../_libs/radix-ui__react-arrow.mjs";
|
|
|
55
55
|
import "../_libs/radix-ui__react-use-size.mjs";
|
|
56
56
|
import "../_libs/radix-ui__react-use-previous.mjs";
|
|
57
57
|
import "../_libs/@radix-ui/react-visually-hidden+[...].mjs";
|
|
58
|
-
import "../_libs/react-markdown.mjs";
|
|
59
|
-
import "../_libs/devlop.mjs";
|
|
60
|
-
import "../_libs/unified.mjs";
|
|
61
|
-
import "../_libs/bail.mjs";
|
|
62
|
-
import "../_libs/extend.mjs";
|
|
63
|
-
import "../_libs/is-plain-obj.mjs";
|
|
64
|
-
import "../_libs/trough.mjs";
|
|
65
|
-
import "../_libs/vfile.mjs";
|
|
66
|
-
import "../_libs/vfile-message.mjs";
|
|
67
|
-
import "../_libs/unist-util-stringify-position.mjs";
|
|
68
|
-
import "node:process";
|
|
69
|
-
import "node:path";
|
|
70
|
-
import "node:url";
|
|
71
|
-
import "../_libs/remark-parse.mjs";
|
|
72
|
-
import "../_libs/mdast-util-from-markdown.mjs";
|
|
73
|
-
import "../_libs/micromark-util-decode-numeric-character-reference+[...].mjs";
|
|
74
|
-
import "../_libs/micromark-util-decode-string.mjs";
|
|
75
|
-
import "../_libs/decode-named-character-reference+[...].mjs";
|
|
76
|
-
import "../_libs/character-entities.mjs";
|
|
77
|
-
import "../_libs/micromark-util-normalize-identifier+[...].mjs";
|
|
78
|
-
import "../_libs/micromark.mjs";
|
|
79
|
-
import "../_libs/micromark-util-combine-extensions+[...].mjs";
|
|
80
|
-
import "../_libs/micromark-util-chunked.mjs";
|
|
81
|
-
import "../_libs/micromark-factory-space.mjs";
|
|
82
|
-
import "../_libs/micromark-util-character.mjs";
|
|
83
|
-
import "../_libs/micromark-core-commonmark.mjs";
|
|
84
|
-
import "../_libs/micromark-util-classify-character+[...].mjs";
|
|
85
|
-
import "../_libs/micromark-util-resolve-all.mjs";
|
|
86
|
-
import "../_libs/micromark-util-subtokenize.mjs";
|
|
87
|
-
import "../_libs/micromark-factory-destination.mjs";
|
|
88
|
-
import "../_libs/micromark-factory-label.mjs";
|
|
89
|
-
import "../_libs/micromark-factory-title.mjs";
|
|
90
|
-
import "../_libs/micromark-factory-whitespace.mjs";
|
|
91
|
-
import "../_libs/micromark-util-html-tag-name.mjs";
|
|
92
|
-
import "../_libs/mdast-util-to-string.mjs";
|
|
93
|
-
import "../_libs/remark-rehype.mjs";
|
|
94
|
-
import "../_libs/mdast-util-to-hast.mjs";
|
|
95
|
-
import "../_libs/ungap__structured-clone.mjs";
|
|
96
|
-
import "../_libs/micromark-util-sanitize-uri.mjs";
|
|
97
|
-
import "../_libs/unist-util-position.mjs";
|
|
98
|
-
import "../_libs/trim-lines.mjs";
|
|
99
|
-
import "../_libs/unist-util-visit.mjs";
|
|
100
|
-
import "../_libs/unist-util-visit-parents.mjs";
|
|
101
|
-
import "../_libs/unist-util-is.mjs";
|
|
102
|
-
import "../_libs/hast-util-to-jsx-runtime.mjs";
|
|
103
|
-
import "../_libs/comma-separated-tokens.mjs";
|
|
104
|
-
import "../_libs/property-information.mjs";
|
|
105
|
-
import "../_libs/space-separated-tokens.mjs";
|
|
106
|
-
import "../_libs/style-to-js.mjs";
|
|
107
|
-
import "../_libs/style-to-object.mjs";
|
|
108
|
-
import "../_libs/inline-style-parser.mjs";
|
|
109
|
-
import "../_libs/hast-util-whitespace.mjs";
|
|
110
|
-
import "../_libs/estree-util-is-identifier-name.mjs";
|
|
111
|
-
import "../_libs/html-url-attributes.mjs";
|
|
112
58
|
import "../_libs/zod.mjs";
|
|
113
59
|
import "../_libs/radix-ui__react-tabs.mjs";
|
|
114
60
|
import "../_libs/radix-ui__react-roving-focus.mjs";
|
|
@@ -130,10 +76,13 @@ import "node:fs";
|
|
|
130
76
|
import "node:fs/promises";
|
|
131
77
|
import "node:readline";
|
|
132
78
|
import "node:buffer";
|
|
79
|
+
import "node:path";
|
|
133
80
|
import "node:crypto";
|
|
134
81
|
import "node:child_process";
|
|
82
|
+
import "node:url";
|
|
135
83
|
import "../_libs/conf.mjs";
|
|
136
84
|
import "node:util";
|
|
85
|
+
import "node:process";
|
|
137
86
|
import "node:assert";
|
|
138
87
|
import "../_libs/dot-prop.mjs";
|
|
139
88
|
import "../_libs/env-paths.mjs";
|
|
@@ -354,6 +303,12 @@ function nodeToJsonValue(node) {
|
|
|
354
303
|
}
|
|
355
304
|
}
|
|
356
305
|
}
|
|
306
|
+
function LazyJsonStringView({
|
|
307
|
+
text,
|
|
308
|
+
defaultExpandDepth
|
|
309
|
+
}) {
|
|
310
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-muted-foreground", children: "Loading JSON..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonViewerFromString, { text, defaultExpandDepth }) });
|
|
311
|
+
}
|
|
357
312
|
function parentPath(path) {
|
|
358
313
|
if (path === "") return "";
|
|
359
314
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -474,7 +429,7 @@ function EqualRunRow({
|
|
|
474
429
|
),
|
|
475
430
|
expanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-5 mt-1 mb-2 space-y-2 pr-2", children: ops.map((op) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border border-border/50 rounded p-2 bg-muted/20", children: [
|
|
476
431
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground mb-1", children: op.path }),
|
|
477
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
432
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.value), defaultExpandDepth: 0 })
|
|
478
433
|
] }, op.path)) })
|
|
479
434
|
] });
|
|
480
435
|
}
|
|
@@ -592,7 +547,7 @@ function UnifiedOpRow({
|
|
|
592
547
|
}
|
|
593
548
|
function ExpandedSubtree({ op }) {
|
|
594
549
|
if (op.kind === "added" || op.kind === "removed") {
|
|
595
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-5 mt-2 border border-border/50 rounded p-2 bg-muted/20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
550
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-5 mt-2 border border-border/50 rounded p-2 bg-muted/20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.value), defaultExpandDepth: 0 }) });
|
|
596
551
|
}
|
|
597
552
|
const leftIsStructured = op.left.kind === "object" || op.left.kind === "array";
|
|
598
553
|
const rightIsStructured = op.right.kind === "object" || op.right.kind === "array";
|
|
@@ -602,11 +557,11 @@ function ExpandedSubtree({ op }) {
|
|
|
602
557
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pl-5 mt-2 grid grid-cols-1 md:grid-cols-2 gap-2", children: [
|
|
603
558
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border border-rose-500/30 rounded p-2 bg-rose-500/5", children: [
|
|
604
559
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[10px] uppercase tracking-wider text-rose-500 mb-1", children: "Old" }),
|
|
605
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
560
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.left), defaultExpandDepth: 0 })
|
|
606
561
|
] }),
|
|
607
562
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border border-emerald-500/30 rounded p-2 bg-emerald-500/5", children: [
|
|
608
563
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[10px] uppercase tracking-wider text-emerald-500 mb-1", children: "New" }),
|
|
609
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.right), defaultExpandDepth: 0 })
|
|
610
565
|
] })
|
|
611
566
|
] });
|
|
612
567
|
}
|
|
@@ -718,7 +673,11 @@ function ModeToggle({
|
|
|
718
673
|
)
|
|
719
674
|
] });
|
|
720
675
|
}
|
|
721
|
-
function SideSummary({
|
|
676
|
+
function SideSummary({
|
|
677
|
+
log,
|
|
678
|
+
side,
|
|
679
|
+
displayNumber
|
|
680
|
+
}) {
|
|
722
681
|
const conversationId = getConversationId(log);
|
|
723
682
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0 space-y-1 text-xs", children: [
|
|
724
683
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -733,9 +692,9 @@ function SideSummary({ log, side }) {
|
|
|
733
692
|
children: side === "left" ? "← Left" : "Right →"
|
|
734
693
|
}
|
|
735
694
|
),
|
|
736
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-blue-400/80", children: [
|
|
695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-blue-400/80", title: `Log ID ${String(log.id)}`, children: [
|
|
737
696
|
"#",
|
|
738
|
-
|
|
697
|
+
displayNumber
|
|
739
698
|
] }),
|
|
740
699
|
log.model !== null && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-muted-foreground truncate", children: log.model })
|
|
741
700
|
] }),
|
|
@@ -756,7 +715,13 @@ function SideSummary({ log, side }) {
|
|
|
756
715
|
] })
|
|
757
716
|
] });
|
|
758
717
|
}
|
|
759
|
-
function CompareDrawer({
|
|
718
|
+
function CompareDrawer({
|
|
719
|
+
left,
|
|
720
|
+
right,
|
|
721
|
+
leftDisplayNumber,
|
|
722
|
+
rightDisplayNumber,
|
|
723
|
+
onClose
|
|
724
|
+
}) {
|
|
760
725
|
const ops = reactExports.useMemo(() => {
|
|
761
726
|
const leftRequest = getLogFormatAdapter(resolveLogFormat(left)).analyzeRequest(
|
|
762
727
|
left.rawRequestBody
|
|
@@ -888,8 +853,8 @@ function CompareDrawer({ left, right, onClose }) {
|
|
|
888
853
|
children: [
|
|
889
854
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4 px-4 py-3 border-b border-border", children: [
|
|
890
855
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex gap-4 min-w-0", children: [
|
|
891
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: left, side: "left" }),
|
|
892
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: right, side: "right" })
|
|
856
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: left, side: "left", displayNumber: leftDisplayNumber }),
|
|
857
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: right, side: "right", displayNumber: rightDisplayNumber })
|
|
893
858
|
] }),
|
|
894
859
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
895
860
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ModeToggle, { mode, onChange: setMode }),
|
|
@@ -933,7 +898,16 @@ function CompareDrawer({ left, right, onClose }) {
|
|
|
933
898
|
},
|
|
934
899
|
`o${i}`
|
|
935
900
|
);
|
|
936
|
-
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
901
|
+
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
902
|
+
SplitBody,
|
|
903
|
+
{
|
|
904
|
+
grouped,
|
|
905
|
+
left,
|
|
906
|
+
right,
|
|
907
|
+
leftDisplayNumber,
|
|
908
|
+
rightDisplayNumber
|
|
909
|
+
}
|
|
910
|
+
) })
|
|
937
911
|
] })
|
|
938
912
|
]
|
|
939
913
|
}
|
|
@@ -945,19 +919,21 @@ function CompareDrawer({ left, right, onClose }) {
|
|
|
945
919
|
function SplitBody({
|
|
946
920
|
grouped,
|
|
947
921
|
left,
|
|
948
|
-
right
|
|
922
|
+
right,
|
|
923
|
+
leftDisplayNumber,
|
|
924
|
+
rightDisplayNumber
|
|
949
925
|
}) {
|
|
950
926
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[200px_1fr_1fr] gap-x-2 gap-y-0.5 px-3 py-2 text-xs", children: [
|
|
951
927
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-[200px_1fr_1fr] gap-x-2 col-span-3 pb-2 mb-2 border-b border-border text-[10px] uppercase tracking-wider text-muted-foreground", children: [
|
|
952
928
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Path" }),
|
|
953
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
929
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { title: `Log ID ${String(left.id)}`, children: [
|
|
954
930
|
"Left (Log #",
|
|
955
|
-
|
|
931
|
+
leftDisplayNumber,
|
|
956
932
|
")"
|
|
957
933
|
] }),
|
|
958
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
934
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { title: `Log ID ${String(right.id)}`, children: [
|
|
959
935
|
"Right (Log #",
|
|
960
|
-
|
|
936
|
+
rightDisplayNumber,
|
|
961
937
|
")"
|
|
962
938
|
] })
|
|
963
939
|
] }),
|