@tonyclaw/agent-inspector 3.0.45 → 3.0.46

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.
Files changed (338) hide show
  1. package/.output/{nitro.json → backend/nitro.json} +3 -3
  2. package/.output/backend-public/assets/index-D4LX-sw-.js +11 -0
  3. package/.output/cli.js +2326 -516
  4. package/.output/server/_libs/extend.mjs +4 -8
  5. package/.output/server/_libs/jszip.mjs +9 -35
  6. package/.output/server/_libs/react-dom.mjs +2 -3
  7. package/.output/server/_libs/react.mjs +1 -27
  8. package/.output/server/_libs/tanstack__react-router.mjs +1 -329
  9. package/.output/server/_libs/tanstack__router-core.mjs +42 -100
  10. package/.output/server/_libs/use-sync-external-store.mjs +1 -64
  11. package/.output/server/_libs/ws.mjs +1 -1
  12. package/.output/server/_ssr/index.mjs +4 -4
  13. package/.output/server/_ssr/{publicBasePathContext-5264L3rX.mjs → publicBasePathContext-IH2ilOfu.mjs} +52 -24
  14. package/.output/server/_ssr/{router-BJ_ltLim.mjs → router-D18yUq36.mjs} +19770 -19447
  15. package/.output/server/_ssr/{start-C6MjPjxp.mjs → start-COQu_AgD.mjs} +1 -1
  16. package/.output/server/_tanstack-start-manifest_v-DnbdNeun.mjs +4 -0
  17. package/.output/server/index.mjs +5 -145
  18. package/.output/{public/assets/CompareDrawer-B3_TLTJh.js → ui/assets/CompareDrawer-DAUuIJ6G.js} +1 -1
  19. package/.output/{public/assets/InspectorPet-Cpn6hv4P.js → ui/assets/InspectorPet-BRBVjOWI.js} +1 -1
  20. package/.output/ui/assets/ProxyViewerContainer-D7Sq0ctc.js +59 -0
  21. package/.output/{public/assets/ReplayDialog-B3EKVdJk.js → ui/assets/ReplayDialog-nDLsjOhs.js} +1 -1
  22. package/.output/{public/assets/RequestAnatomy-COOQjyUC.js → ui/assets/RequestAnatomy-zd4BDgL0.js} +1 -1
  23. package/.output/ui/assets/ResponseView-AdIXGcSn.js +2 -0
  24. package/.output/ui/assets/StreamingChunkSequence-CesTz8He.js +1 -0
  25. package/.output/{public/assets/_sessionId-zbgYl7ZJ.js → ui/assets/_sessionId-BAfzrhSU.js} +1 -1
  26. package/.output/{public/assets/_sessionId-BJlM3nmt.js → ui/assets/_sessionId-QnBomgPD.js} +1 -1
  27. package/.output/ui/assets/favicon-DYEkHSNl.svg +21 -0
  28. package/.output/{public/assets/index-BIK4bPTv.js → ui/assets/index-BcsdxBAd.js} +1 -1
  29. package/.output/ui/assets/index-BvXp42al.css +1 -0
  30. package/.output/{public/assets/index-D2Qw6Ri2.js → ui/assets/index-D0rtCN9V.js} +1 -1
  31. package/.output/ui/assets/index-DHpwr08Z.js +73 -0
  32. package/.output/{public/assets/index-xF_NY8Yb.js → ui/assets/index-dNuk2dsU.js} +5 -5
  33. package/.output/ui/assets/json-viewer-BvFHglMb.js +1 -0
  34. package/.output/{public/assets/jszip.min-B_rfAUCe.js → ui/assets/jszip.min-B5Z7gNZB.js} +1 -1
  35. package/.output/ui/index.html +229 -0
  36. package/.output/ui/runtime-config.js +2 -0
  37. package/.output/workers/logFinalizer.worker.js +979 -414
  38. package/.output/workers/sessionWorkerEntry.js +979 -414
  39. package/README.md +175 -43
  40. package/docs/instance-control.openapi.yaml +59 -4
  41. package/package.json +25 -5
  42. package/scripts/generate-theme-scales.mjs +3 -3
  43. package/src/{router.tsx → backend/router.tsx} +3 -15
  44. package/src/backend/routes/$.ts +26 -0
  45. package/src/backend/routes/__root.ts +4 -0
  46. package/src/{routes → backend/routes}/api/-instances.ts +3 -3
  47. package/src/{routes → backend/routes}/api/alerts.summary.ts +3 -3
  48. package/src/{routes → backend/routes}/api/alerts.ts +4 -4
  49. package/src/{routes → backend/routes}/api/config.paths.ts +1 -1
  50. package/src/{routes → backend/routes}/api/config.ts +11 -2
  51. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.help.ts +1 -1
  52. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.install.ts +1 -1
  53. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.runner-presets.ts +1 -1
  54. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.upgrade.ts +1 -1
  55. package/src/{routes → backend/routes}/api/ecosystem.packages.ts +5 -1
  56. package/src/{routes → backend/routes}/api/ecosystem.recipes.$recipeId.run.ts +1 -1
  57. package/src/{routes → backend/routes}/api/ecosystem.tasks.$taskId.ts +1 -1
  58. package/src/{routes → backend/routes}/api/ecosystem.tasks.ts +1 -1
  59. package/src/{routes → backend/routes}/api/groups.$groupId.evidence.ts +2 -2
  60. package/src/{routes → backend/routes}/api/groups.$groupId.sessions.ts +2 -2
  61. package/src/{routes → backend/routes}/api/groups.$groupId.ts +2 -2
  62. package/src/{routes → backend/routes}/api/groups.ts +2 -2
  63. package/src/{routes → backend/routes}/api/health.ts +3 -3
  64. package/src/{routes → backend/routes}/api/instances.$name.connection.ts +1 -1
  65. package/src/{routes → backend/routes}/api/instances.$name.restart.ts +2 -2
  66. package/src/{routes → backend/routes}/api/instances.$name.start.ts +2 -2
  67. package/src/{routes → backend/routes}/api/instances.$name.stop.ts +2 -2
  68. package/src/{routes → backend/routes}/api/instances.$name.ts +1 -1
  69. package/src/{routes → backend/routes}/api/instances.ts +1 -1
  70. package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.promote.ts +2 -2
  71. package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.ts +2 -2
  72. package/src/{routes → backend/routes}/api/knowledge.candidates.ts +1 -1
  73. package/src/{routes → backend/routes}/api/knowledge.project-context.ts +2 -2
  74. package/src/{routes → backend/routes}/api/knowledge.search.ts +2 -2
  75. package/src/{routes → backend/routes}/api/knowledge.sessions.$sessionId.candidates.ts +3 -3
  76. package/src/{routes → backend/routes}/api/logs.$id.body.ts +6 -6
  77. package/src/{routes → backend/routes}/api/logs.$id.chunks.ts +5 -4
  78. package/src/{routes → backend/routes}/api/logs.$id.replay.ts +12 -11
  79. package/src/{routes → backend/routes}/api/logs.$id.ts +4 -3
  80. package/src/{routes → backend/routes}/api/logs.import.ts +3 -3
  81. package/src/{routes → backend/routes}/api/logs.stream.ts +11 -7
  82. package/src/{routes → backend/routes}/api/logs.ts +17 -9
  83. package/src/{routes → backend/routes}/api/mcp.ts +1 -1
  84. package/src/{routes → backend/routes}/api/models.ts +1 -1
  85. package/src/{routes → backend/routes}/api/pi-agent.ts +2 -2
  86. package/src/{routes → backend/routes}/api/providers.$providerId.model-metadata.ts +5 -5
  87. package/src/{routes → backend/routes}/api/providers.$providerId.test.log.ts +7 -7
  88. package/src/{routes → backend/routes}/api/providers.$providerId.ts +4 -4
  89. package/src/{routes → backend/routes}/api/providers.export.ts +1 -1
  90. package/src/{routes → backend/routes}/api/providers.import.ts +3 -3
  91. package/src/{routes → backend/routes}/api/providers.scan.ts +2 -2
  92. package/src/{routes → backend/routes}/api/providers.ts +9 -4
  93. package/src/{routes → backend/routes}/api/runs.$runId.evidence.ts +2 -2
  94. package/src/{routes → backend/routes}/api/runs.$runId.ts +2 -2
  95. package/src/{routes → backend/routes}/api/runs.ts +4 -4
  96. package/src/backend/routes/api/runtime.ts +46 -0
  97. package/src/{routes → backend/routes}/api/sessions.ts +3 -3
  98. package/src/{routes → backend/routes}/proxy/$.ts +1 -1
  99. package/src/{routes → backend/routes}/readyz.ts +1 -1
  100. package/src/{start.ts → backend/start.ts} +1 -1
  101. package/src/cli/alias.ts +2 -11
  102. package/src/cli/doctor.ts +32 -9
  103. package/src/cli/instance.ts +26 -13
  104. package/src/cli/instanceArgs.ts +30 -11
  105. package/src/cli/instanceControl.ts +0 -2
  106. package/src/cli/instanceModel.ts +9 -17
  107. package/src/cli/instanceRegistry.ts +0 -9
  108. package/src/cli/networkHints.ts +27 -14
  109. package/src/cli/onboard.ts +69 -2
  110. package/src/cli/onboardTarget.ts +89 -40
  111. package/src/cli/templates/codex-skill-onboard.ts +44 -14
  112. package/src/cli/templates/skill-onboard.ts +64 -28
  113. package/src/cli.ts +184 -61
  114. package/src/components/ProxyViewer.tsx +11 -9
  115. package/src/components/ProxyViewerContainer.tsx +12 -11
  116. package/src/components/pi-agent/PiAgentPanel.tsx +2 -2
  117. package/src/components/providers/ProviderCard.tsx +1 -1
  118. package/src/components/providers/ProviderTestResultsView.tsx +1 -1
  119. package/src/components/providers/SettingsDialog.tsx +159 -144
  120. package/src/components/proxy-viewer/ApplicationBar.tsx +2 -1
  121. package/src/components/proxy-viewer/LogEntry.tsx +1 -1
  122. package/src/components/proxy-viewer/log-formats/index.ts +1 -1
  123. package/src/contracts/index.ts +5 -0
  124. package/src/contracts/log.ts +33 -3
  125. package/src/knowledge/types.ts +3 -2
  126. package/src/lib/alertContract.ts +2 -2
  127. package/src/lib/apiClient.ts +30 -7
  128. package/src/lib/apiFormat.ts +29 -0
  129. package/src/lib/basePath.ts +29 -11
  130. package/src/lib/browserRuntimeContract.ts +124 -0
  131. package/src/lib/browserRuntimeResolver.ts +244 -0
  132. package/src/{proxy → lib}/claudeCodeStrip.ts +6 -7
  133. package/src/lib/codingAgentEndpoints.ts +38 -0
  134. package/src/lib/instanceContract.ts +27 -11
  135. package/src/lib/piAgentContract.ts +3 -2
  136. package/src/lib/publicBasePathContext.ts +40 -10
  137. package/src/lib/resourceLimits.ts +2 -0
  138. package/src/lib/runContract.ts +3 -3
  139. package/src/lib/sessionInfoContract.ts +3 -2
  140. package/src/mcp/instanceHandlers.ts +1 -0
  141. package/src/mcp/server.ts +19 -24
  142. package/src/proxy/config.ts +25 -30
  143. package/src/proxy/dataDir.ts +43 -7
  144. package/src/proxy/ecosystemTasks.ts +161 -70
  145. package/src/proxy/formats/registry.ts +6 -21
  146. package/src/proxy/handler.ts +129 -29
  147. package/src/proxy/identityProxy.ts +419 -39
  148. package/src/proxy/jsonlRecovery.ts +554 -0
  149. package/src/proxy/logFinalizer.ts +25 -10
  150. package/src/proxy/logImporter.ts +2 -1
  151. package/src/proxy/logIndex.ts +191 -95
  152. package/src/proxy/logger.ts +77 -14
  153. package/src/proxy/platformCommands.ts +41 -0
  154. package/src/proxy/privateDataPath.ts +310 -88
  155. package/src/proxy/rawStreamCapture.ts +194 -13
  156. package/src/proxy/runtimeAdmission.ts +5 -2
  157. package/src/proxy/runtimeHealth.ts +14 -1
  158. package/src/proxy/runtimeShutdown.ts +11 -1
  159. package/src/proxy/schemas.ts +7 -1
  160. package/src/proxy/sessionArchive.ts +78 -14
  161. package/src/proxy/sqliteLogIndex.ts +65 -2
  162. package/src/proxy/store.ts +141 -34
  163. package/src/proxy/uiAssetServer.ts +106 -0
  164. package/src/proxy/upstream.ts +29 -2
  165. package/src/ui/bootstrap.ts +167 -0
  166. package/src/ui/index.html +38 -0
  167. package/src/ui/logsStreamClient.ts +20 -0
  168. package/src/ui/main.tsx +13 -0
  169. package/src/ui/public/runtime-config.js +2 -0
  170. package/src/ui/router.tsx +13 -0
  171. package/src/ui/routes/__root.tsx +69 -0
  172. package/src/{routes → ui/routes}/index.tsx +2 -3
  173. package/src/{routes → ui/routes}/session/$sessionId.tsx +5 -11
  174. package/src/ui/runtimeDiscovery.ts +50 -0
  175. package/styles/globals.css +1 -0
  176. package/.output/public/assets/ProxyViewerContainer-BEAhuGOJ.js +0 -126
  177. package/.output/public/assets/ResponseView-DBCjkwye.js +0 -2
  178. package/.output/public/assets/StreamingChunkSequence-CuXhDgMo.js +0 -1
  179. package/.output/public/assets/index-BZo_8koU.js +0 -70
  180. package/.output/public/assets/index-ZWschkCh.css +0 -1
  181. package/.output/public/assets/json-viewer-B-Ao6pwW.js +0 -1
  182. package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +0 -1
  183. package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +0 -344
  184. package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +0 -2
  185. package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +0 -2
  186. package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +0 -2
  187. package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +0 -11
  188. package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +0 -69
  189. package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +0 -1
  190. package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +0 -28
  191. package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +0 -6
  192. package/.output/server/_libs/@radix-ui/react-visually-hidden+[...].mjs +0 -34
  193. package/.output/server/_libs/aria-hidden.mjs +0 -122
  194. package/.output/server/_libs/bail.mjs +0 -8
  195. package/.output/server/_libs/character-entities.mjs +0 -2130
  196. package/.output/server/_libs/class-variance-authority.mjs +0 -44
  197. package/.output/server/_libs/clsx.mjs +0 -16
  198. package/.output/server/_libs/comma-separated-tokens.mjs +0 -10
  199. package/.output/server/_libs/decode-named-character-reference+[...].mjs +0 -8
  200. package/.output/server/_libs/dequal.mjs +0 -27
  201. package/.output/server/_libs/detect-node-es.mjs +0 -1
  202. package/.output/server/_libs/devlop.mjs +0 -8
  203. package/.output/server/_libs/diff.mjs +0 -320
  204. package/.output/server/_libs/estree-util-is-identifier-name.mjs +0 -11
  205. package/.output/server/_libs/floating-ui__core.mjs +0 -725
  206. package/.output/server/_libs/floating-ui__dom.mjs +0 -622
  207. package/.output/server/_libs/floating-ui__react-dom.mjs +0 -292
  208. package/.output/server/_libs/floating-ui__utils.mjs +0 -320
  209. package/.output/server/_libs/get-nonce.mjs +0 -9
  210. package/.output/server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
  211. package/.output/server/_libs/hast-util-whitespace.mjs +0 -10
  212. package/.output/server/_libs/html-url-attributes.mjs +0 -26
  213. package/.output/server/_libs/inline-style-parser.mjs +0 -142
  214. package/.output/server/_libs/is-plain-obj.mjs +0 -10
  215. package/.output/server/_libs/lucide-react.mjs +0 -1027
  216. package/.output/server/_libs/mdast-util-from-markdown.mjs +0 -717
  217. package/.output/server/_libs/mdast-util-to-hast.mjs +0 -710
  218. package/.output/server/_libs/mdast-util-to-string.mjs +0 -38
  219. package/.output/server/_libs/micromark-core-commonmark.mjs +0 -2259
  220. package/.output/server/_libs/micromark-factory-destination.mjs +0 -94
  221. package/.output/server/_libs/micromark-factory-label.mjs +0 -63
  222. package/.output/server/_libs/micromark-factory-space.mjs +0 -24
  223. package/.output/server/_libs/micromark-factory-title.mjs +0 -65
  224. package/.output/server/_libs/micromark-factory-whitespace.mjs +0 -22
  225. package/.output/server/_libs/micromark-util-character.mjs +0 -44
  226. package/.output/server/_libs/micromark-util-chunked.mjs +0 -36
  227. package/.output/server/_libs/micromark-util-classify-character+[...].mjs +0 -12
  228. package/.output/server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
  229. package/.output/server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
  230. package/.output/server/_libs/micromark-util-decode-string.mjs +0 -21
  231. package/.output/server/_libs/micromark-util-encode.mjs +0 -1
  232. package/.output/server/_libs/micromark-util-html-tag-name.mjs +0 -69
  233. package/.output/server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
  234. package/.output/server/_libs/micromark-util-resolve-all.mjs +0 -15
  235. package/.output/server/_libs/micromark-util-sanitize-uri.mjs +0 -41
  236. package/.output/server/_libs/micromark-util-subtokenize.mjs +0 -346
  237. package/.output/server/_libs/micromark.mjs +0 -906
  238. package/.output/server/_libs/property-information.mjs +0 -1209
  239. package/.output/server/_libs/radix-ui.mjs +0 -1
  240. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  241. package/.output/server/_libs/radix-ui__primitive.mjs +0 -11
  242. package/.output/server/_libs/radix-ui__react-accordion.mjs +0 -1
  243. package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +0 -1
  244. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  245. package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +0 -1
  246. package/.output/server/_libs/radix-ui__react-avatar.mjs +0 -1
  247. package/.output/server/_libs/radix-ui__react-checkbox.mjs +0 -1
  248. package/.output/server/_libs/radix-ui__react-collapsible.mjs +0 -144
  249. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -69
  250. package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -38
  251. package/.output/server/_libs/radix-ui__react-context-menu.mjs +0 -1
  252. package/.output/server/_libs/radix-ui__react-context.mjs +0 -64
  253. package/.output/server/_libs/radix-ui__react-dialog.mjs +0 -280
  254. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -9
  255. package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +0 -1
  256. package/.output/server/_libs/radix-ui__react-focus-guards.mjs +0 -39
  257. package/.output/server/_libs/radix-ui__react-focus-scope.mjs +0 -210
  258. package/.output/server/_libs/radix-ui__react-form.mjs +0 -1
  259. package/.output/server/_libs/radix-ui__react-hover-card.mjs +0 -1
  260. package/.output/server/_libs/radix-ui__react-id.mjs +0 -14
  261. package/.output/server/_libs/radix-ui__react-label.mjs +0 -1
  262. package/.output/server/_libs/radix-ui__react-menu.mjs +0 -1
  263. package/.output/server/_libs/radix-ui__react-menubar.mjs +0 -1
  264. package/.output/server/_libs/radix-ui__react-popover.mjs +0 -1
  265. package/.output/server/_libs/radix-ui__react-popper.mjs +0 -340
  266. package/.output/server/_libs/radix-ui__react-portal.mjs +0 -16
  267. package/.output/server/_libs/radix-ui__react-presence.mjs +0 -173
  268. package/.output/server/_libs/radix-ui__react-primitive.mjs +0 -42
  269. package/.output/server/_libs/radix-ui__react-progress.mjs +0 -1
  270. package/.output/server/_libs/radix-ui__react-radio-group.mjs +0 -1
  271. package/.output/server/_libs/radix-ui__react-roving-focus.mjs +0 -235
  272. package/.output/server/_libs/radix-ui__react-scroll-area.mjs +0 -731
  273. package/.output/server/_libs/radix-ui__react-select.mjs +0 -1207
  274. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -28
  275. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -1
  276. package/.output/server/_libs/radix-ui__react-slot.mjs +0 -132
  277. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -1
  278. package/.output/server/_libs/radix-ui__react-tabs.mjs +0 -194
  279. package/.output/server/_libs/radix-ui__react-toast.mjs +0 -2
  280. package/.output/server/_libs/radix-ui__react-toggle-group.mjs +0 -1
  281. package/.output/server/_libs/radix-ui__react-toggle.mjs +0 -1
  282. package/.output/server/_libs/radix-ui__react-toolbar.mjs +0 -1
  283. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -498
  284. package/.output/server/_libs/radix-ui__react-use-previous.mjs +0 -14
  285. package/.output/server/_libs/radix-ui__react-use-size.mjs +0 -39
  286. package/.output/server/_libs/react-markdown.mjs +0 -235
  287. package/.output/server/_libs/react-remove-scroll-bar.mjs +0 -82
  288. package/.output/server/_libs/react-remove-scroll.mjs +0 -328
  289. package/.output/server/_libs/react-style-singleton.mjs +0 -69
  290. package/.output/server/_libs/remark-parse.mjs +0 -19
  291. package/.output/server/_libs/remark-rehype.mjs +0 -21
  292. package/.output/server/_libs/space-separated-tokens.mjs +0 -6
  293. package/.output/server/_libs/style-to-js.mjs +0 -72
  294. package/.output/server/_libs/style-to-object.mjs +0 -38
  295. package/.output/server/_libs/swr.mjs +0 -947
  296. package/.output/server/_libs/tailwind-merge.mjs +0 -3255
  297. package/.output/server/_libs/tanstack__react-virtual.mjs +0 -130
  298. package/.output/server/_libs/tanstack__virtual-core.mjs +0 -1319
  299. package/.output/server/_libs/three.mjs +0 -26016
  300. package/.output/server/_libs/trim-lines.mjs +0 -41
  301. package/.output/server/_libs/trough.mjs +0 -85
  302. package/.output/server/_libs/tslib.mjs +0 -1
  303. package/.output/server/_libs/ungap__structured-clone.mjs +0 -212
  304. package/.output/server/_libs/unified.mjs +0 -661
  305. package/.output/server/_libs/unist-util-is.mjs +0 -100
  306. package/.output/server/_libs/unist-util-position.mjs +0 -27
  307. package/.output/server/_libs/unist-util-stringify-position.mjs +0 -27
  308. package/.output/server/_libs/unist-util-visit-parents.mjs +0 -82
  309. package/.output/server/_libs/unist-util-visit.mjs +0 -24
  310. package/.output/server/_libs/use-callback-ref.mjs +0 -66
  311. package/.output/server/_libs/use-sidecar.mjs +0 -106
  312. package/.output/server/_libs/vfile-message.mjs +0 -138
  313. package/.output/server/_libs/vfile.mjs +0 -467
  314. package/.output/server/_sessionId-CJ99gZFV.mjs +0 -84
  315. package/.output/server/_sessionId-DEjScBpK.mjs +0 -146
  316. package/.output/server/_ssr/CompareDrawer-DtOIMeQB.mjs +0 -1060
  317. package/.output/server/_ssr/InspectorPet-CXc4oCBQ.mjs +0 -938
  318. package/.output/server/_ssr/ProxyViewerContainer-DVPlwfkt.mjs +0 -17632
  319. package/.output/server/_ssr/ReplayDialog-BQEA95qC.mjs +0 -725
  320. package/.output/server/_ssr/RequestAnatomy-BMyd8B7Q.mjs +0 -837
  321. package/.output/server/_ssr/ResponseView-qrTaEIM8.mjs +0 -757
  322. package/.output/server/_ssr/StreamingChunkSequence-BFTL8mIy.mjs +0 -274
  323. package/.output/server/_ssr/index-Bcj1Hcy4.mjs +0 -135
  324. package/.output/server/_ssr/index-DW-M7XUG.mjs +0 -84
  325. package/.output/server/_ssr/json-viewer-DiI0Yjsn.mjs +0 -483
  326. package/.output/server/_tanstack-start-manifest_v-C6pXXX9R.mjs +0 -4
  327. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  328. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  329. package/.output/server/node_modules/tslib/package.json +0 -47
  330. package/.output/server/node_modules/tslib/tslib.js +0 -484
  331. package/.output/server/package.json +0 -9
  332. package/src/routes/__root.tsx +0 -170
  333. /package/.output/{public → ui}/assets/agent-inspector-58K1_MsC.ico +0 -0
  334. /package/.output/{public → ui}/assets/alibaba-TTwafVwX.svg +0 -0
  335. /package/.output/{public → ui}/assets/minimax-BPMzvuL-.jpeg +0 -0
  336. /package/.output/{public → ui}/assets/qwen-mMn3f5ul.webp +0 -0
  337. /package/.output/{public → ui}/assets/zhipuai-BPNAnxo-.svg +0 -0
  338. /package/src/{routes → backend/routes}/livez.ts +0 -0
@@ -1,1060 +0,0 @@
1
- import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { m as cn, x as formatTokens, y as copyTextToClipboard } from "./router-BJ_ltLim.mjs";
3
- import { g as getLogFormatAdapter, r as resolveLogFormat, a as getConversationId, B as Badge, L as LazyJsonViewerFromString } from "./ProxyViewerContainer-DVPlwfkt.mjs";
4
- import "./publicBasePathContext-5264L3rX.mjs";
5
- import "node:crypto";
6
- import "node:path";
7
- import "node:fs";
8
- import "node:child_process";
9
- import "node:buffer";
10
- import "node:url";
11
- import "crypto";
12
- import "node:util";
13
- import "node:net";
14
- import "../_libs/modelcontextprotocol__server.mjs";
15
- import "../_libs/jszip.mjs";
16
- import "node:os";
17
- import { X, aF as Rows3, aG as Columns2, af as Minus, K as Plus, a2 as Pencil, t as ChevronRight, aH as Equal, d as Check, k as Copy } from "../_libs/lucide-react.mjs";
18
- import "../_libs/tanstack__react-router.mjs";
19
- import "../_libs/tanstack__router-core.mjs";
20
- import "../_libs/cookie-es.mjs";
21
- import "../_libs/seroval.mjs";
22
- import "../_libs/seroval-plugins.mjs";
23
- import "node:stream";
24
- import "../_libs/tanstack__history.mjs";
25
- import "node:stream/web";
26
- import "../_libs/react-dom.mjs";
27
- import "util";
28
- import "async_hooks";
29
- import "stream";
30
- import "../_libs/isbot.mjs";
31
- import "../_libs/swr.mjs";
32
- import "../_libs/use-sync-external-store.mjs";
33
- import "../_libs/dequal.mjs";
34
- import "../_libs/class-variance-authority.mjs";
35
- import "../_libs/clsx.mjs";
36
- import "../_libs/tailwind-merge.mjs";
37
- import "node:fs/promises";
38
- import "node:worker_threads";
39
- import "node:readline";
40
- import "../_libs/conf.mjs";
41
- import "node:process";
42
- import "node:assert";
43
- import "../_libs/dot-prop.mjs";
44
- import "../_libs/env-paths.mjs";
45
- import "../_libs/atomically.mjs";
46
- import "node:events";
47
- import "../_libs/stubborn-fs.mjs";
48
- import "../_libs/stubborn-utils.mjs";
49
- import "../_libs/when-exit.mjs";
50
- import "../_libs/ajv.mjs";
51
- import "../_libs/fast-deep-equal.mjs";
52
- import "../_libs/json-schema-traverse.mjs";
53
- import "../_libs/fast-uri.mjs";
54
- import "../_libs/ajv-formats.mjs";
55
- import "../_libs/debounce-fn.mjs";
56
- import "../_libs/mimic-function.mjs";
57
- import "../_libs/semver.mjs";
58
- import "../_libs/uint8array-extras.mjs";
59
- import "node:dns/promises";
60
- import "node:assert/strict";
61
- import "../_libs/zod.mjs";
62
- import "node:async_hooks";
63
- import "../_libs/modelcontextprotocol__core.mjs";
64
- import "../_libs/readable-stream.mjs";
65
- import "events";
66
- import "node:string_decoder";
67
- import "../_libs/process-nextick-args.mjs";
68
- import "../_libs/isarray.mjs";
69
- import "../_libs/safe-buffer.mjs";
70
- import "buffer";
71
- import "../_libs/core-util-is.mjs";
72
- import "../_libs/inherits.mjs";
73
- import "../_libs/util-deprecate.mjs";
74
- import "../_libs/lie.mjs";
75
- import "../_libs/immediate.mjs";
76
- import "../_libs/setimmediate.mjs";
77
- import "../_libs/pako.mjs";
78
- import "../_libs/tanstack__react-virtual.mjs";
79
- import "../_libs/tanstack__virtual-core.mjs";
80
- import "../_libs/diff.mjs";
81
- import "../_libs/radix-ui__react-dialog.mjs";
82
- import "../_libs/radix-ui__primitive.mjs";
83
- import "../_libs/radix-ui__react-compose-refs.mjs";
84
- import "../_libs/radix-ui__react-context.mjs";
85
- import "../_libs/radix-ui__react-id.mjs";
86
- import "../_libs/@radix-ui/react-use-layout-effect+[...].mjs";
87
- import "../_libs/@radix-ui/react-use-controllable-state+[...].mjs";
88
- import "../_libs/@radix-ui/react-dismissable-layer+[...].mjs";
89
- import "../_libs/radix-ui__react-primitive.mjs";
90
- import "../_libs/radix-ui__react-slot.mjs";
91
- import "../_libs/@radix-ui/react-use-callback-ref+[...].mjs";
92
- import "../_libs/radix-ui__react-focus-scope.mjs";
93
- import "../_libs/radix-ui__react-portal.mjs";
94
- import "../_libs/radix-ui__react-presence.mjs";
95
- import "../_libs/radix-ui__react-focus-guards.mjs";
96
- import "../_libs/react-remove-scroll.mjs";
97
- import "tslib";
98
- import "../_libs/react-remove-scroll-bar.mjs";
99
- import "../_libs/react-style-singleton.mjs";
100
- import "../_libs/get-nonce.mjs";
101
- import "../_libs/use-sidecar.mjs";
102
- import "../_libs/use-callback-ref.mjs";
103
- import "../_libs/aria-hidden.mjs";
104
- import "../_libs/radix-ui__react-tabs.mjs";
105
- import "../_libs/radix-ui__react-roving-focus.mjs";
106
- import "../_libs/radix-ui__react-collection.mjs";
107
- import "../_libs/radix-ui__react-direction.mjs";
108
- import "../_libs/@radix-ui/react-use-is-hydrated+[...].mjs";
109
- import "../_libs/radix-ui__react-select.mjs";
110
- import "../_libs/radix-ui__number.mjs";
111
- import "../_libs/radix-ui__react-popper.mjs";
112
- import "../_libs/floating-ui__react-dom.mjs";
113
- import "../_libs/floating-ui__dom.mjs";
114
- import "../_libs/floating-ui__core.mjs";
115
- import "../_libs/floating-ui__utils.mjs";
116
- import "../_libs/radix-ui__react-arrow.mjs";
117
- import "../_libs/radix-ui__react-use-size.mjs";
118
- import "../_libs/radix-ui__react-use-previous.mjs";
119
- import "../_libs/@radix-ui/react-visually-hidden+[...].mjs";
120
- import "../_libs/radix-ui__react-tooltip.mjs";
121
- import "../_libs/radix-ui__react-collapsible.mjs";
122
- import "../_libs/radix-ui__react-scroll-area.mjs";
123
- const ROOT_PATH = "";
124
- function formatPath(segments) {
125
- if (segments.length === 0) return ROOT_PATH;
126
- let out = "";
127
- for (let i = 0; i < segments.length; i++) {
128
- const seg = segments[i];
129
- if (seg === void 0) continue;
130
- if (typeof seg === "number") {
131
- out += `[${seg}]`;
132
- } else if (i === 0) {
133
- out += seg;
134
- } else {
135
- out += `.${seg}`;
136
- }
137
- }
138
- return out;
139
- }
140
- function isPlainObject(value) {
141
- return typeof value === "object" && value !== null && !Array.isArray(value);
142
- }
143
- function normalizeRequest(raw) {
144
- if (typeof raw === "string") {
145
- try {
146
- return toNode(JSON.parse(raw));
147
- } catch {
148
- return { kind: "primitive", value: raw };
149
- }
150
- }
151
- return toNode(raw);
152
- }
153
- function toNode(value) {
154
- if (value === null) return { kind: "primitive", value: null };
155
- if (typeof value === "string") return { kind: "primitive", value };
156
- if (typeof value === "number") return { kind: "primitive", value };
157
- if (typeof value === "boolean") return { kind: "primitive", value };
158
- if (Array.isArray(value)) {
159
- return { kind: "array", value: value.map((v) => toNode(v)) };
160
- }
161
- if (isPlainObject(value)) {
162
- const out = {};
163
- for (const k of Object.keys(value).sort()) {
164
- out[k] = toNode(value[k]);
165
- }
166
- return { kind: "object", value: out };
167
- }
168
- return { kind: "primitive", value: null };
169
- }
170
- function diffTrees(left, right) {
171
- const ops = [];
172
- walk([], left, right, ops);
173
- return ops;
174
- }
175
- function walk(segments, left, right, out) {
176
- const path = formatPath(segments);
177
- if (nodeEqual(left, right)) {
178
- out.push({ kind: "equal", path, value: left });
179
- return;
180
- }
181
- if (left.kind !== right.kind) {
182
- out.push({ kind: "changed", path, left, right });
183
- return;
184
- }
185
- if (left.kind === "primitive" && right.kind === "primitive") {
186
- out.push({ kind: "changed", path, left, right });
187
- return;
188
- }
189
- if (left.kind === "object" && right.kind === "object") {
190
- const leftKeys = Object.keys(left.value);
191
- const rightKeys = Object.keys(right.value);
192
- const rightKeySet = new Set(rightKeys);
193
- for (const k of leftKeys) {
194
- const lChild = left.value[k];
195
- if (lChild === void 0) continue;
196
- if (!rightKeySet.has(k)) {
197
- out.push({
198
- kind: "removed",
199
- path: formatPath([...segments, k]),
200
- value: lChild
201
- });
202
- } else {
203
- const rChild = right.value[k];
204
- if (rChild === void 0) continue;
205
- walk([...segments, k], lChild, rChild, out);
206
- }
207
- }
208
- for (const k of rightKeys) {
209
- if (leftKeys.includes(k)) continue;
210
- const rChild = right.value[k];
211
- if (rChild === void 0) continue;
212
- out.push({
213
- kind: "added",
214
- path: formatPath([...segments, k]),
215
- value: rChild
216
- });
217
- }
218
- return;
219
- }
220
- if (left.kind === "array" && right.kind === "array") {
221
- const minLen = Math.min(left.value.length, right.value.length);
222
- for (let i = 0; i < minLen; i++) {
223
- const lChild = left.value[i];
224
- const rChild = right.value[i];
225
- if (lChild === void 0 || rChild === void 0) continue;
226
- walk([...segments, i], lChild, rChild, out);
227
- }
228
- for (let i = minLen; i < right.value.length; i++) {
229
- const rChild = right.value[i];
230
- if (rChild === void 0) continue;
231
- out.push({
232
- kind: "added",
233
- path: formatPath([...segments, i]),
234
- value: rChild
235
- });
236
- }
237
- for (let i = minLen; i < left.value.length; i++) {
238
- const lChild = left.value[i];
239
- if (lChild === void 0) continue;
240
- out.push({
241
- kind: "removed",
242
- path: formatPath([...segments, i]),
243
- value: lChild
244
- });
245
- }
246
- }
247
- }
248
- function nodeEqual(a, b) {
249
- if (a.kind !== b.kind) return false;
250
- if (a.kind === "primitive" && b.kind === "primitive") {
251
- return a.value === b.value;
252
- }
253
- if (a.kind === "array" && b.kind === "array") {
254
- if (a.value.length !== b.value.length) return false;
255
- for (let i = 0; i < a.value.length; i++) {
256
- const ai = a.value[i];
257
- const bi = b.value[i];
258
- if (ai === void 0 || bi === void 0) return false;
259
- if (!nodeEqual(ai, bi)) return false;
260
- }
261
- return true;
262
- }
263
- if (a.kind === "object" && b.kind === "object") {
264
- const aKeys = Object.keys(a.value);
265
- const bKeys = Object.keys(b.value);
266
- if (aKeys.length !== bKeys.length) return false;
267
- for (const k of aKeys) {
268
- const av = a.value[k];
269
- const bv = b.value[k];
270
- if (av === void 0 || bv === void 0) return false;
271
- if (!nodeEqual(av, bv)) return false;
272
- }
273
- return true;
274
- }
275
- return false;
276
- }
277
- function previewNode(node, maxLen = 80) {
278
- let s;
279
- switch (node.kind) {
280
- case "primitive":
281
- s = node.value === null ? "null" : JSON.stringify(node.value);
282
- break;
283
- case "array":
284
- s = `[… ${node.value.length} items]`;
285
- break;
286
- case "object":
287
- s = `{… ${Object.keys(node.value).length} keys}`;
288
- break;
289
- }
290
- if (s.length > maxLen) s = `${s.slice(0, maxLen - 1)}…`;
291
- return s;
292
- }
293
- const COMPARE_RESPONSIVE_HEADER_CLASS_NAME = "flex flex-col gap-3 border-b border-border px-3 py-3 sm:flex-row sm:items-start sm:gap-4 sm:px-4";
294
- const COMPARE_RESPONSIVE_SPLIT_CLASS_NAME = "grid min-w-0 grid-cols-1 gap-x-2 gap-y-0.5 px-3 py-2 text-xs md:grid-cols-[200px_minmax(0,1fr)_minmax(0,1fr)]";
295
- function nodeToJsonString(node, indent = 2) {
296
- return JSON.stringify(nodeToJsonValue(node), null, indent);
297
- }
298
- function nodeToJsonValue(node) {
299
- switch (node.kind) {
300
- case "primitive":
301
- return node.value;
302
- case "array":
303
- return node.value.map(nodeToJsonValue);
304
- case "object": {
305
- const out = {};
306
- for (const [k, v] of Object.entries(node.value)) {
307
- out[k] = nodeToJsonValue(v);
308
- }
309
- return out;
310
- }
311
- }
312
- }
313
- function LazyJsonStringView({
314
- text,
315
- defaultExpandDepth
316
- }) {
317
- 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 }) });
318
- }
319
- function parentPath(path) {
320
- if (path === "") return "";
321
- for (let i = path.length - 1; i >= 0; i--) {
322
- const ch = path[i];
323
- if (ch === "." || ch === "[") {
324
- return path.substring(0, i);
325
- }
326
- }
327
- return "";
328
- }
329
- function isDeepEqual(op) {
330
- return op.kind === "equal" && (op.value.kind === "object" || op.value.kind === "array");
331
- }
332
- function groupContiguousEquals(ops) {
333
- const out = [];
334
- let i = 0;
335
- while (i < ops.length) {
336
- const op = ops[i];
337
- if (op !== void 0 && isDeepEqual(op)) {
338
- const startParent = parentPath(op.path);
339
- let j = i + 1;
340
- while (j < ops.length) {
341
- const next = ops[j];
342
- if (next === void 0) break;
343
- if (!isDeepEqual(next)) break;
344
- if (parentPath(next.path) !== startParent) break;
345
- j++;
346
- }
347
- if (j - i > 1) {
348
- const equalOps = [];
349
- for (let k = i; k < j; k++) {
350
- const eop = ops[k];
351
- if (eop !== void 0 && eop.kind === "equal") {
352
- equalOps.push(eop);
353
- }
354
- }
355
- out.push({ kind: "equal-run", ops: equalOps });
356
- i = j;
357
- continue;
358
- }
359
- }
360
- if (op !== void 0) {
361
- out.push({ kind: "single", op });
362
- }
363
- i++;
364
- }
365
- return out;
366
- }
367
- const KIND_VISUAL = {
368
- added: {
369
- icon: Plus,
370
- accent: "text-status-success",
371
- bg: "bg-status-success/5 hover:bg-status-success/10",
372
- border: "border-l-status-success",
373
- label: "ADDED"
374
- },
375
- removed: {
376
- icon: Minus,
377
- accent: "text-status-danger",
378
- bg: "bg-status-danger/5 hover:bg-status-danger/10",
379
- border: "border-l-status-danger",
380
- label: "REMOVED"
381
- },
382
- changed: {
383
- icon: Pencil,
384
- accent: "text-status-watch",
385
- bg: "bg-status-watch/5 hover:bg-status-watch/10",
386
- border: "border-l-status-watch",
387
- label: "CHANGED"
388
- },
389
- equal: {
390
- icon: Equal,
391
- accent: "text-muted-foreground/70",
392
- bg: "bg-muted/20 hover:bg-muted/30",
393
- border: "border-l-muted-foreground/20",
394
- label: "EQUAL"
395
- }
396
- };
397
- function EqualRunRow({
398
- ops,
399
- expanded,
400
- onToggle
401
- }) {
402
- const first = ops[0];
403
- const last = ops[ops.length - 1];
404
- if (first === void 0 || last === void 0) {
405
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-muted-foreground/40 text-xs", children: "—" });
406
- }
407
- const firstPath = first.path;
408
- const lastPath = last.path;
409
- const label = ops.length === 1 ? firstPath : `${firstPath} … ${lastPath}`;
410
- const summary = first.value.kind === "array" ? `${ops.length} equal arrays` : first.value.kind === "object" ? `${ops.length} equal objects` : "equal";
411
- const v = KIND_VISUAL.equal;
412
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("border-l-4 rounded-sm", v.border, v.bg), children: [
413
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
414
- "button",
415
- {
416
- type: "button",
417
- onClick: onToggle,
418
- className: "w-full text-left flex items-center gap-2 px-3 py-1.5 text-xs text-muted-foreground cursor-pointer",
419
- children: [
420
- /* @__PURE__ */ jsxRuntimeExports.jsx(
421
- ChevronRight,
422
- {
423
- className: cn("size-3 transition-transform shrink-0", expanded && "rotate-90")
424
- }
425
- ),
426
- /* @__PURE__ */ jsxRuntimeExports.jsx(v.icon, { className: cn("size-3 shrink-0", v.accent) }),
427
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono truncate flex-1", title: `${firstPath} … ${lastPath}`, children: label }),
428
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("text-[10px] uppercase tracking-wider shrink-0", v.accent), children: v.label }),
429
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground/60 shrink-0", children: [
430
- "(",
431
- summary,
432
- ")"
433
- ] })
434
- ]
435
- }
436
- ),
437
- 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: [
438
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground mb-1", children: op.path }),
439
- /* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.value), defaultExpandDepth: 0 })
440
- ] }, op.path)) })
441
- ] });
442
- }
443
- function UnifiedOpRow({
444
- op,
445
- idx,
446
- copiedPath,
447
- onCopyPath,
448
- expanded,
449
- onToggle
450
- }) {
451
- const v = KIND_VISUAL[op.kind];
452
- const Icon = v.icon;
453
- const isExpandable = op.kind === "added" || op.kind === "removed" ? op.value.kind === "object" || op.value.kind === "array" : op.kind === "changed" ? op.left.kind === "object" || op.left.kind === "array" || op.right.kind === "object" || op.right.kind === "array" : false;
454
- const preview = op.kind === "changed" ? [
455
- {
456
- text: previewNode(op.left, 400),
457
- tone: "text-status-danger line-through"
458
- },
459
- { text: previewNode(op.right, 400), tone: "text-status-success" }
460
- ] : op.kind === "removed" ? [
461
- {
462
- text: previewNode(op.value, 400),
463
- tone: "text-status-danger line-through"
464
- }
465
- ] : op.kind === "added" ? [{ text: previewNode(op.value, 400), tone: "text-status-success" }] : [{ text: previewNode(op.value, 400), tone: "text-muted-foreground" }];
466
- const justCopied = copiedPath === op.path && op.path !== "";
467
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
468
- "div",
469
- {
470
- "data-diff-idx": idx,
471
- "data-diff-kind": op.kind,
472
- className: cn("border-l-4 rounded-sm px-3 py-2 my-0.5 transition-colors", v.border, v.bg),
473
- children: [
474
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
475
- "button",
476
- {
477
- type: "button",
478
- onClick: onToggle,
479
- disabled: !isExpandable,
480
- className: cn(
481
- "w-full flex items-center gap-2 text-xs text-left rounded-sm",
482
- isExpandable ? "cursor-pointer" : "cursor-default"
483
- ),
484
- "aria-expanded": isExpandable ? expanded : void 0,
485
- "aria-label": isExpandable ? expanded ? `Collapse ${op.path || "root"}` : `Expand ${op.path || "root"}` : void 0,
486
- children: [
487
- isExpandable ? /* @__PURE__ */ jsxRuntimeExports.jsx(
488
- ChevronRight,
489
- {
490
- className: cn(
491
- "size-3 shrink-0 transition-transform",
492
- v.accent,
493
- expanded && "rotate-90"
494
- )
495
- }
496
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "size-3 shrink-0", "aria-hidden": "true" }),
497
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: cn("size-3.5 shrink-0", v.accent), strokeWidth: 2.5 }),
498
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono truncate flex-1 min-w-0", title: op.path || "(root)", children: op.path === "" ? "(root)" : op.path }),
499
- /* @__PURE__ */ jsxRuntimeExports.jsx(
500
- "span",
501
- {
502
- className: cn(
503
- "text-[9px] font-bold uppercase tracking-wider shrink-0 px-1.5 py-0.5 rounded",
504
- v.accent,
505
- op.kind === "equal" ? "bg-muted/40" : "bg-background/60"
506
- ),
507
- children: v.label
508
- }
509
- ),
510
- op.path !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx(
511
- "span",
512
- {
513
- role: "button",
514
- tabIndex: 0,
515
- onClick: (e) => {
516
- e.stopPropagation();
517
- onCopyPath(op.path);
518
- },
519
- onKeyDown: (e) => {
520
- if (e.key === "Enter" || e.key === " ") {
521
- e.stopPropagation();
522
- e.preventDefault();
523
- onCopyPath(op.path);
524
- }
525
- },
526
- className: cn(
527
- "shrink-0 p-1 rounded transition-colors cursor-pointer inline-flex items-center justify-center",
528
- justCopied ? "text-status-success" : "text-muted-foreground/50 hover:text-foreground hover:bg-muted"
529
- ),
530
- "aria-label": justCopied ? "Copied" : "Copy",
531
- title: justCopied ? "Copied!" : "Copy",
532
- children: justCopied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3" })
533
- }
534
- )
535
- ]
536
- }
537
- ),
538
- preview.map((p, i) => (
539
- // biome-ignore lint/suspicious/noArrayIndexKey: preview list is rebuilt on every render and is positional
540
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("font-mono text-xs mt-1 break-all pl-5", p.tone), children: p.text }, i)
541
- )),
542
- /* @__PURE__ */ jsxRuntimeExports.jsx(
543
- "div",
544
- {
545
- className: "overflow-hidden transition-all duration-200",
546
- style: { maxHeight: expanded && isExpandable ? "2000px" : "0" },
547
- "aria-hidden": !expanded,
548
- children: expanded && isExpandable && op.kind !== "equal" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandedSubtree, { op }) : null
549
- }
550
- )
551
- ]
552
- }
553
- );
554
- }
555
- function ExpandedSubtree({ op }) {
556
- if (op.kind === "added" || op.kind === "removed") {
557
- 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 }) });
558
- }
559
- const leftIsStructured = op.left.kind === "object" || op.left.kind === "array";
560
- const rightIsStructured = op.right.kind === "object" || op.right.kind === "array";
561
- if (!leftIsStructured && !rightIsStructured) {
562
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pl-5 mt-2 text-xs text-muted-foreground/70 italic", children: "Primitive values are shown inline above." });
563
- }
564
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pl-5 mt-2 grid grid-cols-1 md:grid-cols-2 gap-2", children: [
565
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded border border-status-danger/30 bg-status-danger/5 p-2", children: [
566
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-status-danger", children: "Old" }),
567
- /* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.left), defaultExpandDepth: 0 })
568
- ] }),
569
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded border border-status-success/30 bg-status-success/5 p-2", children: [
570
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-1 text-[10px] uppercase tracking-wider text-status-success", children: "New" }),
571
- /* @__PURE__ */ jsxRuntimeExports.jsx(LazyJsonStringView, { text: nodeToJsonString(op.right), defaultExpandDepth: 0 })
572
- ] })
573
- ] });
574
- }
575
- function SummaryChips({
576
- counts,
577
- onJumpTo
578
- }) {
579
- const total = counts.added + counts.removed + counts.changed;
580
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 border-b border-border bg-muted/20 flex items-center gap-2 text-xs flex-wrap", children: [
581
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-muted-foreground font-medium", children: [
582
- total,
583
- " ",
584
- total === 1 ? "change" : "changes"
585
- ] }),
586
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
587
- "button",
588
- {
589
- type: "button",
590
- onClick: () => onJumpTo("removed"),
591
- disabled: counts.removed === 0,
592
- className: cn(
593
- "inline-flex items-center gap-1 px-2 py-0.5 rounded-full border cursor-pointer transition-colors",
594
- counts.removed > 0 ? "border-status-danger/40 bg-status-danger/10 text-status-danger hover:bg-status-danger/20" : "border-border text-muted-foreground/40 cursor-not-allowed"
595
- ),
596
- title: counts.removed > 0 ? "Jump to first removed" : "No removals",
597
- children: [
598
- /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "size-3" }),
599
- counts.removed,
600
- " removed"
601
- ]
602
- }
603
- ),
604
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
605
- "button",
606
- {
607
- type: "button",
608
- onClick: () => onJumpTo("added"),
609
- disabled: counts.added === 0,
610
- className: cn(
611
- "inline-flex items-center gap-1 px-2 py-0.5 rounded-full border cursor-pointer transition-colors",
612
- counts.added > 0 ? "border-status-success/40 bg-status-success/10 text-status-success hover:bg-status-success/20" : "border-border text-muted-foreground/40 cursor-not-allowed"
613
- ),
614
- title: counts.added > 0 ? "Jump to first added" : "No additions",
615
- children: [
616
- /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
617
- counts.added,
618
- " added"
619
- ]
620
- }
621
- ),
622
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
623
- "button",
624
- {
625
- type: "button",
626
- onClick: () => onJumpTo("changed"),
627
- disabled: counts.changed === 0,
628
- className: cn(
629
- "inline-flex items-center gap-1 px-2 py-0.5 rounded-full border cursor-pointer transition-colors",
630
- counts.changed > 0 ? "border-status-watch/40 bg-status-watch/10 text-status-watch hover:bg-status-watch/20" : "border-border text-muted-foreground/40 cursor-not-allowed"
631
- ),
632
- title: counts.changed > 0 ? "Jump to first changed" : "No changes",
633
- children: [
634
- /* @__PURE__ */ jsxRuntimeExports.jsx(Pencil, { className: "size-3" }),
635
- counts.changed,
636
- " changed"
637
- ]
638
- }
639
- )
640
- ] });
641
- }
642
- function ModeToggle({
643
- mode,
644
- onChange
645
- }) {
646
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-flex rounded-md border border-border overflow-hidden", children: [
647
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
648
- "button",
649
- {
650
- type: "button",
651
- onClick: () => onChange("unified"),
652
- "aria-pressed": mode === "unified",
653
- className: cn(
654
- "flex items-center gap-1 px-2 py-1 text-xs transition-colors cursor-pointer",
655
- mode === "unified" ? "bg-muted text-foreground" : "hover:bg-muted/50 text-muted-foreground"
656
- ),
657
- title: "Unified view (single column, emphasized diffs)",
658
- children: [
659
- /* @__PURE__ */ jsxRuntimeExports.jsx(Rows3, { className: "size-3" }),
660
- "Unified"
661
- ]
662
- }
663
- ),
664
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
665
- "button",
666
- {
667
- type: "button",
668
- onClick: () => onChange("split"),
669
- "aria-pressed": mode === "split",
670
- className: cn(
671
- "flex items-center gap-1 px-2 py-1 text-xs transition-colors border-l border-border cursor-pointer",
672
- mode === "split" ? "bg-muted text-foreground" : "hover:bg-muted/50 text-muted-foreground"
673
- ),
674
- title: "Split view (path | left | right)",
675
- children: [
676
- /* @__PURE__ */ jsxRuntimeExports.jsx(Columns2, { className: "size-3" }),
677
- "Split"
678
- ]
679
- }
680
- )
681
- ] });
682
- }
683
- function SideSummary({
684
- log,
685
- side,
686
- displayNumber
687
- }) {
688
- const conversationId = getConversationId(log);
689
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0 space-y-1 text-xs", children: [
690
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
691
- /* @__PURE__ */ jsxRuntimeExports.jsx(
692
- Badge,
693
- {
694
- variant: "outline",
695
- className: cn(
696
- "text-[10px] px-1.5 py-0 h-5 font-mono shrink-0",
697
- side === "left" ? "border-status-danger/40 text-status-danger" : "border-status-success/40 text-status-success"
698
- ),
699
- children: side === "left" ? "← Left" : "Right →"
700
- }
701
- ),
702
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-status-info", title: `Log ID ${String(log.id)}`, children: [
703
- "#",
704
- displayNumber
705
- ] }),
706
- log.model !== null && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 truncate font-mono leading-snug text-muted-foreground", children: log.model })
707
- ] }),
708
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 font-mono text-muted-foreground", children: [
709
- log.cacheCreationInputTokens !== null && log.cacheCreationInputTokens > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-status-success", children: [
710
- "KV Cache +",
711
- formatTokens(log.cacheCreationInputTokens)
712
- ] }),
713
- log.cacheReadInputTokens !== null && log.cacheReadInputTokens > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-status-accent", children: [
714
- "KV Cache ~",
715
- formatTokens(log.cacheReadInputTokens)
716
- ] }),
717
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", title: log.timestamp, children: log.timestamp })
718
- ] }),
719
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-muted-foreground/70 font-mono truncate", title: conversationId, children: [
720
- "session: ",
721
- conversationId
722
- ] })
723
- ] });
724
- }
725
- function CompareDrawer({
726
- left,
727
- right,
728
- leftDisplayNumber,
729
- rightDisplayNumber,
730
- onClose
731
- }) {
732
- const panelRef = reactExports.useRef(null);
733
- const closeButtonRef = reactExports.useRef(null);
734
- const previousActiveElementRef = reactExports.useRef(null);
735
- const ops = reactExports.useMemo(() => {
736
- const leftRequest = getLogFormatAdapter(resolveLogFormat(left)).analyzeRequest(
737
- left.rawRequestBody
738
- );
739
- const rightRequest = getLogFormatAdapter(resolveLogFormat(right)).analyzeRequest(
740
- right.rawRequestBody
741
- );
742
- const l = normalizeRequest(leftRequest.comparisonValue);
743
- const r = normalizeRequest(rightRequest.comparisonValue);
744
- return diffTrees(l, r);
745
- }, [
746
- left.apiFormat,
747
- left.path,
748
- left.rawRequestBody,
749
- right.apiFormat,
750
- right.path,
751
- right.rawRequestBody
752
- ]);
753
- const grouped = reactExports.useMemo(() => groupContiguousEquals(ops), [ops]);
754
- const counts = reactExports.useMemo(() => {
755
- let added = 0;
756
- let removed = 0;
757
- let changed = 0;
758
- for (const g of grouped) {
759
- if (g.kind !== "single") continue;
760
- switch (g.op.kind) {
761
- case "added":
762
- added++;
763
- break;
764
- case "removed":
765
- removed++;
766
- break;
767
- case "changed":
768
- changed++;
769
- break;
770
- }
771
- }
772
- return { added, removed, changed };
773
- }, [grouped]);
774
- const [expandedRuns, setExpandedRuns] = reactExports.useState(/* @__PURE__ */ new Set());
775
- const toggleRun = (idx) => {
776
- setExpandedRuns((prev) => {
777
- const next = new Set(prev);
778
- if (next.has(idx)) next.delete(idx);
779
- else next.add(idx);
780
- return next;
781
- });
782
- };
783
- const [expandedRows, setExpandedRows] = reactExports.useState(/* @__PURE__ */ new Set());
784
- const toggleRow = (idx) => {
785
- setExpandedRows((prev) => {
786
- const next = new Set(prev);
787
- if (next.has(idx)) next.delete(idx);
788
- else next.add(idx);
789
- return next;
790
- });
791
- };
792
- reactExports.useEffect(() => {
793
- setExpandedRows(/* @__PURE__ */ new Set());
794
- }, [left.id, right.id]);
795
- const [mode, setMode] = reactExports.useState("unified");
796
- const bodyRef = reactExports.useRef(null);
797
- const [copiedPath, setCopiedPath] = reactExports.useState(null);
798
- const copyResetTimer = reactExports.useRef(null);
799
- const onCopyPath = (path) => {
800
- void copyTextToClipboard(path).then((success) => {
801
- if (!success) return;
802
- setCopiedPath(path);
803
- if (copyResetTimer.current !== null) clearTimeout(copyResetTimer.current);
804
- copyResetTimer.current = setTimeout(() => setCopiedPath(null), 1500);
805
- });
806
- };
807
- reactExports.useEffect(() => {
808
- return () => {
809
- if (copyResetTimer.current !== null) clearTimeout(copyResetTimer.current);
810
- };
811
- }, []);
812
- const jumpToKind = (kind) => {
813
- const idx = grouped.findIndex((g) => g.kind === "single" && g.op.kind === kind);
814
- if (idx === -1) return;
815
- const root = bodyRef.current;
816
- if (root === null) return;
817
- const el = root.querySelector(`[data-diff-idx="${idx}"]`);
818
- if (el !== null) {
819
- el.scrollIntoView({ behavior: "smooth", block: "center" });
820
- }
821
- };
822
- reactExports.useEffect(() => {
823
- previousActiveElementRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
824
- closeButtonRef.current?.focus();
825
- const onKey = (e) => {
826
- if (e.key === "Escape") onClose();
827
- };
828
- document.addEventListener("keydown", onKey);
829
- const prevOverflow = document.body.style.overflow;
830
- document.body.style.overflow = "hidden";
831
- return () => {
832
- document.removeEventListener("keydown", onKey);
833
- document.body.style.overflow = prevOverflow;
834
- previousActiveElementRef.current?.focus();
835
- };
836
- }, [onClose]);
837
- const handlePanelKeyDown = (event) => {
838
- event.stopPropagation();
839
- if (event.key !== "Tab") return;
840
- const panel = panelRef.current;
841
- if (panel === null) return;
842
- const focusable = Array.from(
843
- panel.querySelectorAll(
844
- 'button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex="-1"])'
845
- )
846
- );
847
- const first = focusable[0];
848
- const last = focusable[focusable.length - 1];
849
- if (first === void 0 || last === void 0) return;
850
- if (event.shiftKey && document.activeElement === first) {
851
- event.preventDefault();
852
- last.focus();
853
- return;
854
- }
855
- if (!event.shiftKey && document.activeElement === last) {
856
- event.preventDefault();
857
- first.focus();
858
- }
859
- };
860
- const sameSession = getConversationId(left) === getConversationId(right);
861
- const allEqual = ops.length === 1 && ops[0]?.kind === "equal";
862
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
863
- "div",
864
- {
865
- className: "fixed inset-0 z-50 flex justify-end",
866
- role: "dialog",
867
- "aria-modal": "true",
868
- "aria-label": "Compare two log requests",
869
- children: [
870
- /* @__PURE__ */ jsxRuntimeExports.jsx(
871
- "button",
872
- {
873
- type: "button",
874
- onClick: onClose,
875
- "aria-label": "Close compare drawer",
876
- className: "absolute inset-0 bg-black/40 cursor-default",
877
- tabIndex: -1
878
- }
879
- ),
880
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
881
- "div",
882
- {
883
- ref: panelRef,
884
- className: cn(
885
- "relative overflow-x-hidden bg-background border-l border-border shadow-xl",
886
- "w-full md:w-[70vw] max-w-[1100px] flex flex-col h-full"
887
- ),
888
- onClick: (e) => e.stopPropagation(),
889
- onKeyDown: handlePanelKeyDown,
890
- children: [
891
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: COMPARE_RESPONSIVE_HEADER_CLASS_NAME, children: [
892
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid min-w-0 flex-1 grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4", children: [
893
- /* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: left, side: "left", displayNumber: leftDisplayNumber }),
894
- /* @__PURE__ */ jsxRuntimeExports.jsx(SideSummary, { log: right, side: "right", displayNumber: rightDisplayNumber })
895
- ] }),
896
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full shrink-0 items-center justify-between gap-2 sm:w-auto sm:justify-start", children: [
897
- /* @__PURE__ */ jsxRuntimeExports.jsx(ModeToggle, { mode, onChange: setMode }),
898
- /* @__PURE__ */ jsxRuntimeExports.jsx(
899
- "button",
900
- {
901
- ref: closeButtonRef,
902
- type: "button",
903
- onClick: onClose,
904
- "aria-label": "Close",
905
- className: "p-1 rounded text-muted-foreground hover:text-foreground hover:bg-muted cursor-pointer",
906
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-4" })
907
- }
908
- )
909
- ] })
910
- ] }),
911
- !sameSession && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-b border-border bg-warning/10 px-4 py-1.5 text-xs text-foreground", children: "Heads up: the two selected logs are from different sessions." }),
912
- allEqual ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto flex items-center justify-center text-muted-foreground text-sm", children: "The two Request payloads are identical." }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
913
- /* @__PURE__ */ jsxRuntimeExports.jsx(SummaryChips, { counts, onJumpTo: jumpToKind }),
914
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: bodyRef, className: "flex-1 min-h-0 overflow-y-auto", children: mode === "unified" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-2 space-y-0.5", children: grouped.map((g, i) => {
915
- if (g.kind === "equal-run") {
916
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
917
- EqualRunRow,
918
- {
919
- ops: g.ops,
920
- expanded: expandedRuns.has(i),
921
- onToggle: () => toggleRun(i)
922
- },
923
- `r${i}`
924
- );
925
- }
926
- const op = g.op;
927
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
928
- UnifiedOpRow,
929
- {
930
- op,
931
- idx: i,
932
- copiedPath,
933
- onCopyPath,
934
- expanded: expandedRows.has(i),
935
- onToggle: () => toggleRow(i)
936
- },
937
- `o${i}`
938
- );
939
- }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
940
- SplitBody,
941
- {
942
- grouped,
943
- left,
944
- right,
945
- leftDisplayNumber,
946
- rightDisplayNumber
947
- }
948
- ) })
949
- ] })
950
- ]
951
- }
952
- )
953
- ]
954
- }
955
- );
956
- }
957
- function SplitBody({
958
- grouped,
959
- left,
960
- right,
961
- leftDisplayNumber,
962
- rightDisplayNumber
963
- }) {
964
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { "data-compare-layout": "responsive-split", className: COMPARE_RESPONSIVE_SPLIT_CLASS_NAME, children: [
965
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-1 mb-2 grid grid-cols-1 gap-x-2 gap-y-1 border-b border-border pb-2 text-[10px] uppercase tracking-wider text-muted-foreground md:col-span-3 md:grid-cols-[200px_minmax(0,1fr)_minmax(0,1fr)]", children: [
966
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Path" }),
967
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { title: `Log ID ${String(left.id)}`, children: [
968
- "Left (Log #",
969
- leftDisplayNumber,
970
- ")"
971
- ] }),
972
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { title: `Log ID ${String(right.id)}`, children: [
973
- "Right (Log #",
974
- rightDisplayNumber,
975
- ")"
976
- ] })
977
- ] }),
978
- grouped.map((g, i) => {
979
- if (g.kind === "equal-run") {
980
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
981
- "div",
982
- {
983
- className: "col-span-1 px-2 py-1 text-xs text-muted-foreground/60 md:col-span-3",
984
- children: [
985
- g.ops.length,
986
- " equal siblings collapsed — switch to Unified to expand"
987
- ]
988
- },
989
- i
990
- );
991
- }
992
- const op = g.op;
993
- if (op.kind === "equal") {
994
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
995
- "div",
996
- {
997
- className: "col-span-1 grid min-w-0 grid-cols-1 gap-x-2 gap-y-1 px-2 py-0.5 text-muted-foreground md:col-span-3 md:grid-cols-[200px_minmax(0,1fr)_minmax(0,1fr)]",
998
- children: [
999
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-xs truncate", title: op.path, children: op.path }),
1000
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-xs break-all opacity-60", children: previewNode(op.value, 200) }),
1001
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-xs break-all opacity-60", children: previewNode(op.value, 200) })
1002
- ]
1003
- },
1004
- i
1005
- );
1006
- }
1007
- if (op.kind === "added") {
1008
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1009
- "div",
1010
- {
1011
- className: "col-span-1 rounded border-l-2 border-l-status-success bg-status-success/5 px-2 py-1 text-xs md:col-span-3",
1012
- children: [
1013
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground mb-0.5", children: op.path }),
1014
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-mono break-all text-status-success", children: [
1015
- "+ ",
1016
- previewNode(op.value, 400)
1017
- ] })
1018
- ]
1019
- },
1020
- i
1021
- );
1022
- }
1023
- if (op.kind === "removed") {
1024
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1025
- "div",
1026
- {
1027
- className: "col-span-1 rounded border-l-2 border-l-status-danger bg-status-danger/5 px-2 py-1 text-xs md:col-span-3",
1028
- children: [
1029
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground mb-0.5", children: op.path }),
1030
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-mono break-all text-status-danger line-through", children: [
1031
- "− ",
1032
- previewNode(op.value, 400)
1033
- ] })
1034
- ]
1035
- },
1036
- i
1037
- );
1038
- }
1039
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1040
- "div",
1041
- {
1042
- className: "col-span-1 rounded border-l-2 border-l-status-watch bg-status-watch/5 px-2 py-1 text-xs md:col-span-3",
1043
- children: [
1044
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground mb-1", children: op.path }),
1045
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: [
1046
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono break-all text-status-danger line-through", children: previewNode(op.left, 400) }),
1047
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono break-all text-status-success", children: previewNode(op.right, 400) })
1048
- ] })
1049
- ]
1050
- },
1051
- i
1052
- );
1053
- })
1054
- ] });
1055
- }
1056
- export {
1057
- COMPARE_RESPONSIVE_HEADER_CLASS_NAME,
1058
- COMPARE_RESPONSIVE_SPLIT_CLASS_NAME,
1059
- CompareDrawer
1060
- };