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