@cartanova/qgrid-cli 2.10.9 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/_virtual/_rolldown/runtime.js +1 -10
- package/bundle/dist/application/monit/log-buffer.js +12 -6
- package/bundle/dist/application/monit/monit.frame.js +11 -3
- package/bundle/dist/application/monit/monit.types.js +1 -1
- package/bundle/dist/application/qgrid/conv-routing.js +9 -6
- package/bundle/dist/application/qgrid/expired-token-reminder.js +2 -2
- package/bundle/dist/application/qgrid/oauth.js +31 -4
- package/bundle/dist/application/qgrid/qgrid-image-generation.js +1 -1
- package/bundle/dist/application/qgrid/qgrid-response-format.js +22 -20
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +43 -34
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +128 -93
- package/bundle/dist/application/qgrid/qgrid.frame.js +930 -49
- package/bundle/dist/application/qgrid/qgrid.types.js +212 -5
- package/bundle/dist/application/qgrid/schema-prompt.js +75 -48
- package/bundle/dist/application/qgrid/slack-user-map.js +1 -1
- package/bundle/dist/application/qgrid/token-death.js +1 -1
- package/bundle/dist/application/qgrid/token-subscriber.js +83 -30
- package/bundle/dist/application/qgrid/token-trigger-setup.js +1 -1
- package/bundle/dist/application/qgrid/token-window-keepalive.js +8 -6
- package/bundle/dist/application/qgrid/tool-emulation-schema.js +13 -13
- package/bundle/dist/application/qgrid/tool-emulation.js +19 -15
- package/bundle/dist/application/request-log/json-schema-type-text.js +29 -12
- package/bundle/dist/application/request-log/request-log.model.js +83 -69
- package/bundle/dist/application/request-log/request-log.types.js +8 -2
- package/bundle/dist/application/request-log/zod-code-format.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.model.js +1 -1
- package/bundle/dist/application/request-log-step/request-log-step.types.js +1 -1
- package/bundle/dist/application/setting/setting.constant.js +1 -1
- package/bundle/dist/application/setting/setting.model.js +2 -2
- package/bundle/dist/application/setting/setting.store.js +2 -2
- package/bundle/dist/application/setting/setting.types.js +1 -1
- package/bundle/dist/application/sonamu.generated.js +40 -16
- package/bundle/dist/application/sonamu.generated.sso.js +2 -1
- package/bundle/dist/application/token/token.model.js +26 -9
- package/bundle/dist/application/token/token.types.js +20 -3
- package/bundle/dist/i18n/en.js +15 -1
- package/bundle/dist/i18n/ko.js +15 -1
- package/bundle/dist/i18n/sd.generated.js +2 -1
- package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +8 -6
- package/bundle/dist/migrations/20261018215031_alter_request_logs_add1_alter1.js +15 -0
- package/bundle/dist/server-bootstrap.js +4 -2
- package/bundle/dist/server-error-handler.js +1 -1
- package/bundle/dist/sonamu.config.js +37 -8
- package/bundle/dist/startup-migrations.js +17 -7
- package/bundle/dist/testing/global.js +1 -1
- package/bundle/dist/testing/schema-bench.js +0 -0
- package/bundle/dist/testing/test-database-name.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +1 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +11 -5
- package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +4 -4
- package/bundle/dist/utils/providers/anthropic/anthropic-thinking.js +1 -1
- package/bundle/dist/utils/providers/anthropic/claude-session.js +20 -19
- package/bundle/dist/utils/providers/anthropic/fence-strip.js +1 -1
- package/bundle/dist/utils/providers/anthropic/stream-json-adapter.js +49 -23
- package/bundle/dist/utils/providers/common/credentials.js +5 -1
- package/bundle/dist/utils/providers/common/effort.js +3 -3
- package/bundle/dist/utils/providers/common/model-cost.js +69 -14
- package/bundle/dist/utils/providers/common/provider-types.js +29 -1
- package/bundle/dist/utils/providers/common/schema-validation.js +78 -40
- package/bundle/dist/utils/providers/common/smooth-weighted-round-robin.js +1 -1
- package/bundle/dist/utils/providers/common/strictifier.js +62 -43
- package/bundle/dist/utils/providers/common/thinking.js +3 -2
- package/bundle/dist/utils/providers/common/ttft.js +1 -1
- package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +427 -0
- package/bundle/dist/utils/providers/grok/grok-constants.js +55 -0
- package/bundle/dist/utils/providers/grok/grok-direct-client.js +196 -0
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +1313 -0
- package/bundle/dist/utils/providers/grok/grok-headers.js +118 -0
- package/bundle/dist/utils/providers/grok/grok-media-client.js +420 -0
- package/bundle/dist/utils/providers/grok/grok-models.js +114 -0
- package/bundle/dist/utils/providers/grok/grok-oauth.js +455 -0
- package/bundle/dist/utils/providers/grok/grok-quota.js +119 -0
- package/bundle/dist/utils/providers/grok/grok-refresh.js +192 -0
- package/bundle/dist/utils/providers/grok/grok-types.js +186 -0
- package/bundle/dist/utils/providers/grok/grok-voice-client.js +199 -0
- package/bundle/dist/utils/providers/grok/index.js +11 -0
- package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +111 -83
- package/bundle/dist/utils/providers/openai/openai-callback-relay.js +3 -2
- package/bundle/dist/utils/providers/openai/openai-constants.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-direct-client.js +23 -7
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +143 -106
- package/bundle/dist/utils/providers/openai/openai-image-generation.js +48 -33
- package/bundle/dist/utils/providers/openai/openai-oauth.js +28 -13
- package/bundle/dist/utils/providers/openai/openai-quota.js +38 -27
- package/bundle/dist/utils/providers/openai/openai-refresh.js +17 -9
- package/bundle/dist/utils/providers/openai/openai-sse.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-transport-config.js +1 -1
- package/bundle/dist/utils/quiet-hours.js +1 -1
- package/bundle/dist/utils/slack-notify.js +14 -8
- package/bundle/dist/utils/subset-loaders.js +4 -5
- package/bundle/src/application/monit/log-buffer.ts +23 -9
- package/bundle/src/application/monit/monit.frame.ts +22 -5
- package/bundle/src/application/monit/monit.types.ts +6 -0
- package/bundle/src/application/qgrid/conv-routing.test.ts +76 -4
- package/bundle/src/application/qgrid/conv-routing.ts +35 -9
- package/bundle/src/application/qgrid/expired-token-reminder.ts +9 -1
- package/bundle/src/application/qgrid/oauth.ts +51 -15
- package/bundle/src/application/qgrid/qgrid-image-generation.ts +9 -0
- package/bundle/src/application/qgrid/qgrid-response-format.ts +50 -25
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +33 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +87 -40
- package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +97 -0
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +274 -126
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +1013 -3
- package/bundle/src/application/qgrid/qgrid.frame.ts +1415 -60
- package/bundle/src/application/qgrid/qgrid.types.ts +335 -0
- package/bundle/src/application/qgrid/schema-prompt.ts +105 -41
- package/bundle/src/application/qgrid/slack-user-map.ts +5 -0
- package/bundle/src/application/qgrid/token-death.ts +4 -0
- package/bundle/src/application/qgrid/token-subscriber.test.ts +21 -19
- package/bundle/src/application/qgrid/token-subscriber.ts +186 -53
- package/bundle/src/application/qgrid/token-trigger-setup.ts +2 -0
- package/bundle/src/application/qgrid/token-window-keepalive.ts +49 -6
- package/bundle/src/application/qgrid/tool-emulation-schema.ts +33 -29
- package/bundle/src/application/qgrid/tool-emulation.ts +52 -27
- package/bundle/src/application/request-log/json-schema-type-text.test.ts +5 -5
- package/bundle/src/application/request-log/json-schema-type-text.ts +81 -26
- package/bundle/src/application/request-log/request-log.entity.json +8 -0
- package/bundle/src/application/request-log/request-log.model.test.ts +111 -4
- package/bundle/src/application/request-log/request-log.model.ts +279 -145
- package/bundle/src/application/request-log/request-log.types.ts +17 -0
- package/bundle/src/application/request-log/zod-code-format.ts +11 -0
- package/bundle/src/application/request-log-step/request-log-step.model.ts +1 -0
- package/bundle/src/application/request-log-step/request-log-step.types.ts +2 -0
- package/bundle/src/application/setting/setting.constant.ts +9 -0
- package/bundle/src/application/setting/setting.model.ts +12 -2
- package/bundle/src/application/setting/setting.store.ts +5 -1
- package/bundle/src/application/setting/setting.types.ts +8 -0
- package/bundle/src/application/sonamu.generated.http +135 -0
- package/bundle/src/application/sonamu.generated.sso.ts +3 -0
- package/bundle/src/application/sonamu.generated.ts +29 -0
- package/bundle/src/application/token/token.identity.test.ts +20 -0
- package/bundle/src/application/token/token.model.ts +66 -7
- package/bundle/src/application/token/token.types.ts +24 -1
- package/bundle/src/i18n/en.ts +19 -0
- package/bundle/src/i18n/ko.ts +21 -0
- package/bundle/src/i18n/sd.generated.ts +24 -2
- package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +16 -8
- package/bundle/src/migrations/20261018215031_alter_request_logs_add1_alter1.ts +15 -0
- package/bundle/src/server-bootstrap.ts +4 -2
- package/bundle/src/server-error-handler.ts +1 -0
- package/bundle/src/sonamu.config.ts +69 -7
- package/bundle/src/startup-migrations.ts +27 -9
- package/bundle/src/testing/global.ts +20 -0
- package/bundle/src/testing/schema-bench.ts +105 -30
- package/bundle/src/testing/test-database-name.ts +2 -0
- package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +8 -0
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +41 -6
- package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +7 -3
- package/bundle/src/utils/providers/anthropic/anthropic-thinking.ts +6 -0
- package/bundle/src/utils/providers/anthropic/claude-session.ts +58 -24
- package/bundle/src/utils/providers/anthropic/fence-strip.ts +11 -0
- package/bundle/src/utils/providers/anthropic/stream-json-adapter.ts +110 -45
- package/bundle/src/utils/providers/common/credentials.ts +8 -0
- package/bundle/src/utils/providers/common/effort.ts +9 -2
- package/bundle/src/utils/providers/common/model-cost.test.ts +48 -1
- package/bundle/src/utils/providers/common/model-cost.ts +259 -158
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +98 -2
- package/bundle/src/utils/providers/common/provider-types.ts +46 -3
- package/bundle/src/utils/providers/common/schema-validation.test.ts +5 -1
- package/bundle/src/utils/providers/common/schema-validation.ts +124 -56
- package/bundle/src/utils/providers/common/smooth-weighted-round-robin.ts +4 -0
- package/bundle/src/utils/providers/common/strictifier.ts +185 -59
- package/bundle/src/utils/providers/common/thinking.ts +2 -2
- package/bundle/src/utils/providers/common/ttft.ts +4 -2
- package/bundle/src/utils/providers/grok/__fixtures__/golden-responses-1.0.60.json +164 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.test.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +721 -0
- package/bundle/src/utils/providers/grok/grok-constants.ts +105 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.test.ts +179 -0
- package/bundle/src/utils/providers/grok/grok-direct-client.ts +313 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +1395 -0
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +2105 -0
- package/bundle/src/utils/providers/grok/grok-headers.test.ts +149 -0
- package/bundle/src/utils/providers/grok/grok-headers.ts +199 -0
- package/bundle/src/utils/providers/grok/grok-media-client.test.ts +446 -0
- package/bundle/src/utils/providers/grok/grok-media-client.ts +703 -0
- package/bundle/src/utils/providers/grok/grok-models.test.ts +96 -0
- package/bundle/src/utils/providers/grok/grok-models.ts +161 -0
- package/bundle/src/utils/providers/grok/grok-oauth.test.ts +406 -0
- package/bundle/src/utils/providers/grok/grok-oauth.ts +771 -0
- package/bundle/src/utils/providers/grok/grok-quota.test.ts +142 -0
- package/bundle/src/utils/providers/grok/grok-quota.ts +198 -0
- package/bundle/src/utils/providers/grok/grok-refresh.test.ts +239 -0
- package/bundle/src/utils/providers/grok/grok-refresh.ts +325 -0
- package/bundle/src/utils/providers/grok/grok-types.test.ts +252 -0
- package/bundle/src/utils/providers/grok/grok-types.ts +374 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.test.ts +321 -0
- package/bundle/src/utils/providers/grok/grok-voice-client.ts +284 -0
- package/bundle/src/utils/providers/grok/index.ts +20 -0
- package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +221 -137
- package/bundle/src/utils/providers/openai/openai-callback-relay.ts +12 -1
- package/bundle/src/utils/providers/openai/openai-constants.ts +2 -0
- package/bundle/src/utils/providers/openai/openai-direct-client.ts +111 -21
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +322 -169
- package/bundle/src/utils/providers/openai/openai-image-generation.ts +116 -36
- package/bundle/src/utils/providers/openai/openai-oauth.ts +48 -20
- package/bundle/src/utils/providers/openai/openai-quota.ts +77 -46
- package/bundle/src/utils/providers/openai/openai-refresh.ts +42 -18
- package/bundle/src/utils/providers/openai/openai-sse.ts +27 -3
- package/bundle/src/utils/providers/openai/openai-transport-config.ts +2 -0
- package/bundle/src/utils/quiet-hours.ts +12 -1
- package/bundle/src/utils/slack-notify.ts +44 -13
- package/bundle/src/utils/subset-loaders.ts +7 -7
- package/bundle/web-dist/client/assets/clsx-5XM_pHvN.js +1 -0
- package/bundle/web-dist/client/assets/index-BA7uQ-6c.js +31 -0
- package/bundle/web-dist/client/assets/index-Be2qCZmI.css +1 -0
- package/bundle/web-dist/client/assets/logs-C47OJGEI.js +1 -0
- package/bundle/web-dist/client/assets/monit-BS9no0dU.js +4 -0
- package/bundle/web-dist/client/assets/plus-sdACTfH0.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +1 -0
- package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +1 -0
- package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-BsieU37H.js → services.generated-CefiDXEv.js} +5 -5
- package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +1 -0
- package/bundle/web-dist/client/assets/show-u8Np69q3.js +2 -0
- package/bundle/web-dist/client/assets/tokens-QvP410NW.js +1 -0
- package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-Bzdh28Ws.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +244 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +1 -0
- package/bundle/web-dist/client/index.html +6 -6
- package/bundle/web-dist/server/assets/clsx-D_N5PN_2.js +16 -0
- package/bundle/web-dist/server/assets/{lazyRouteComponent-Dtd0NR4r.js → lazyRouteComponent-D8iTIHyn.js} +129 -2
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +825 -0
- package/bundle/web-dist/server/assets/{monit-DvzribSE.js → monit-B2hqorPe.js} +385 -126
- package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +28 -0
- package/bundle/web-dist/server/assets/{react-dom-B4a6-uuR.js → react-dom-BIYQzBqG.js} +2 -129
- package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +44 -0
- package/bundle/web-dist/server/assets/{request-model-CbqfnQOJ.js → request-model-I6OdODSH.js} +15 -6
- package/bundle/web-dist/server/assets/{routes-BAPWTizT.js → routes-B95YlUv2.js} +760 -213
- package/bundle/web-dist/server/assets/{services.generated-CEbGjsI0.js → services.generated-DQATJ6qf.js} +12821 -12194
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +830 -0
- package/bundle/web-dist/server/assets/{show-CxVZTAdv.js → show-Bxaj3rhH.js} +1355 -419
- package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +1038 -0
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +18 -0
- package/bundle/web-dist/server/assets/use-oauth-login-flow-CKDHgc3U.js +2379 -0
- package/bundle/web-dist/server/assets/{use-update-token-mutation-CfYmk_4_.js → use-update-token-mutation-BEbgOzaa.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +4303 -22810
- package/dist/cli.js +9 -9
- package/package.json +4 -11
- package/postinstall.mjs +12 -0
- package/skills/qgrid/SKILL.md +1 -0
- package/skills/qgrid/references/cli-env-and-server-boot.md +4 -1
- package/skills/qgrid/references/decision-rationale.md +24 -1
- package/skills/qgrid/references/grok-runtime.md +89 -0
- package/skills/qgrid/references/provider-runtime-differences.md +30 -29
- package/skills/qgrid/references/repo-map.md +10 -0
- package/skills/qgrid/references/request-log-run-lifecycle.md +1 -1
- package/skills/qgrid/references/sonamu-api-web-flow.md +1 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +56 -3
- package/bundle/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -406
- package/bundle/dist/node_modules/.pnpm/@vitest_expect@4.1.10/node_modules/@vitest/expect/dist/index.js +0 -1507
- package/bundle/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.10/node_modules/@vitest/pretty-format/dist/index.js +0 -887
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/chunk-artifact.js +0 -2756
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/index.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/utils.js +0 -8
- package/bundle/dist/node_modules/.pnpm/@vitest_snapshot@4.1.10/node_modules/@vitest/snapshot/dist/index.js +0 -922
- package/bundle/dist/node_modules/.pnpm/@vitest_spy@4.1.10/node_modules/@vitest/spy/dist/index.js +0 -386
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -121
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/constants.js +0 -51
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/diff.js +0 -1317
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/display.js +0 -561
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/error.js +0 -40
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/helpers.js +0 -272
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/offset.js +0 -27
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/serialize.js +0 -77
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/source-map.js +0 -381
- package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/timers.js +0 -51
- package/bundle/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.js +0 -2986
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js +0 -109
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js +0 -10
- package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js +0 -10
- package/bundle/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +0 -1126
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -21
- package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -432
- package/bundle/dist/node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js +0 -517
- package/bundle/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.js +0 -101
- package/bundle/dist/node_modules/.pnpm/vite@8.0.3_@emnapi_core@1.11.2_@emnapi_runtime@1.11.2_@types_node@25.0.7_esbuild@0.27.4_5b35fc1fb85d2af4d105e0d74f940f50/node_modules/vite/dist/node/module-runner.js +0 -1265
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -9
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/benchmark.CX_oY03V.js +0 -41
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -19
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.Chj8NDwU.js +0 -202
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.DdgEv5B1.js +0 -46
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +0 -119
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/test.DNmyFkvJ.js +0 -3044
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +0 -59
- package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/index.js +0 -28
- package/bundle/dist/testing/setup-mocks.js +0 -16
- package/bundle/src/testing/setup-mocks.ts +0 -44
- package/bundle/web-dist/client/assets/index-Bw2s88Ot.css +0 -1
- package/bundle/web-dist/client/assets/index-CrXKu_J8.js +0 -106
- package/bundle/web-dist/client/assets/logs-B2SmWJXA.js +0 -1
- package/bundle/web-dist/client/assets/monit-D-JwXXoA.js +0 -1
- package/bundle/web-dist/client/assets/plus-B62CuqT8.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-NNcU0Cmq.js +0 -1
- package/bundle/web-dist/client/assets/request-model-CojtinqK.js +0 -1
- package/bundle/web-dist/client/assets/routes-C5r4gTvY.js +0 -5
- package/bundle/web-dist/client/assets/settings-D3tDSAck.js +0 -1
- package/bundle/web-dist/client/assets/show-Cah_kUKC.js +0 -2
- package/bundle/web-dist/client/assets/tokens-DU2Iyxxd.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-D0UaR9_e.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-DAq0F8p-.js +0 -1
- package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +0 -9
- package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +0 -1
- package/bundle/web-dist/server/assets/logs-l91avYif.js +0 -509
- package/bundle/web-dist/server/assets/plus-KZrECewT.js +0 -19
- package/bundle/web-dist/server/assets/refresh-cw-BND93JrF.js +0 -23
- package/bundle/web-dist/server/assets/settings-BZR5HSAL.js +0 -461
- package/bundle/web-dist/server/assets/tokens-D1hb4eKk.js +0 -448
- package/bundle/web-dist/server/assets/use-oauth-login-flow-Cvdy0zF8.js +0 -178
- package/dist/cli.d.ts +0 -10
- /package/bundle/web-dist/client/assets/{cost-DH2jZbrw.js → cost-DB3HbU7T.js} +0 -0
- /package/bundle/web-dist/client/assets/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js} +0 -0
- /package/bundle/web-dist/server/assets/{cost-eEHeTRT5.js → cost-BC9yzyA9.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as Link } from "./lazyRouteComponent-
|
|
3
|
-
import { c as
|
|
4
|
-
import { n as formatMicroUsd, t as cacheHitRate } from "./cost-
|
|
5
|
-
import { n as lucideZap, t as requestModelDisplay } from "./request-model-
|
|
1
|
+
import { C as number, E as union, F as require_react, P as require_jsx_runtime, Q as __commonJSMin, S as looseObject, T as string, b as json, h as array, i as RequestLogStepService, j as useQuery, k as require_jsx_dev_runtime, l as isSonamuError, r as RequestLogService, tt as __toESM, w as object } from "./services.generated-DQATJ6qf.js";
|
|
2
|
+
import { a as Link } from "./lazyRouteComponent-D8iTIHyn.js";
|
|
3
|
+
import { c as remarkGfm, l as Markdown, o as lucideX, t as Route } from "../entry-server.generated.js";
|
|
4
|
+
import { n as formatMicroUsd, t as cacheHitRate } from "./cost-BC9yzyA9.js";
|
|
5
|
+
import { n as lucideZap, t as requestModelDisplay } from "./request-model-I6OdODSH.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/extends.js
|
|
7
7
|
var require_extends = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8
8
|
function _extends() {
|
|
@@ -1835,90 +1835,141 @@ var lightTheme = {
|
|
|
1835
1835
|
};
|
|
1836
1836
|
//#endregion
|
|
1837
1837
|
//#region ~icons/lucide/arrow-left.jsx
|
|
1838
|
-
var
|
|
1838
|
+
var import_jsx_dev_runtime = require_jsx_dev_runtime();
|
|
1839
|
+
var _jsxFileName$4 = "~icons/lucide/arrow-left.jsx";
|
|
1840
|
+
var lucideArrowLeft = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
1839
1841
|
viewBox: "0 0 24 24",
|
|
1840
1842
|
width: "1.2em",
|
|
1841
1843
|
height: "1.2em",
|
|
1842
1844
|
...props,
|
|
1843
|
-
children: /* @__PURE__ */ (0,
|
|
1845
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("path", {
|
|
1844
1846
|
fill: "none",
|
|
1845
1847
|
stroke: "currentColor",
|
|
1846
1848
|
strokeLinecap: "round",
|
|
1847
1849
|
strokeLinejoin: "round",
|
|
1848
1850
|
strokeWidth: 2,
|
|
1849
1851
|
d: "m12 19l-7-7l7-7m7 7H5"
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
+
}, void 0, false, {
|
|
1853
|
+
fileName: _jsxFileName$4,
|
|
1854
|
+
lineNumber: 2,
|
|
1855
|
+
columnNumber: 99
|
|
1856
|
+
}, void 0)
|
|
1857
|
+
}, void 0, false, {
|
|
1858
|
+
fileName: _jsxFileName$4,
|
|
1859
|
+
lineNumber: 2,
|
|
1860
|
+
columnNumber: 34
|
|
1861
|
+
}, void 0);
|
|
1852
1862
|
//#endregion
|
|
1853
1863
|
//#region ~icons/lucide/check.jsx
|
|
1854
|
-
var
|
|
1864
|
+
var _jsxFileName$3 = "~icons/lucide/check.jsx";
|
|
1865
|
+
var lucideCheck = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
1855
1866
|
viewBox: "0 0 24 24",
|
|
1856
1867
|
width: "1.2em",
|
|
1857
1868
|
height: "1.2em",
|
|
1858
1869
|
...props,
|
|
1859
|
-
children: /* @__PURE__ */ (0,
|
|
1870
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("path", {
|
|
1860
1871
|
fill: "none",
|
|
1861
1872
|
stroke: "currentColor",
|
|
1862
1873
|
strokeLinecap: "round",
|
|
1863
1874
|
strokeLinejoin: "round",
|
|
1864
1875
|
strokeWidth: 2,
|
|
1865
1876
|
d: "M20 6L9 17l-5-5"
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1877
|
+
}, void 0, false, {
|
|
1878
|
+
fileName: _jsxFileName$3,
|
|
1879
|
+
lineNumber: 2,
|
|
1880
|
+
columnNumber: 95
|
|
1881
|
+
}, void 0)
|
|
1882
|
+
}, void 0, false, {
|
|
1883
|
+
fileName: _jsxFileName$3,
|
|
1884
|
+
lineNumber: 2,
|
|
1885
|
+
columnNumber: 30
|
|
1886
|
+
}, void 0);
|
|
1868
1887
|
//#endregion
|
|
1869
1888
|
//#region ~icons/lucide/chevron-down.jsx
|
|
1870
|
-
var
|
|
1889
|
+
var _jsxFileName$2 = "~icons/lucide/chevron-down.jsx";
|
|
1890
|
+
var lucideChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
1871
1891
|
viewBox: "0 0 24 24",
|
|
1872
1892
|
width: "1.2em",
|
|
1873
1893
|
height: "1.2em",
|
|
1874
1894
|
...props,
|
|
1875
|
-
children: /* @__PURE__ */ (0,
|
|
1895
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("path", {
|
|
1876
1896
|
fill: "none",
|
|
1877
1897
|
stroke: "currentColor",
|
|
1878
1898
|
strokeLinecap: "round",
|
|
1879
1899
|
strokeLinejoin: "round",
|
|
1880
1900
|
strokeWidth: 2,
|
|
1881
1901
|
d: "m6 9l6 6l6-6"
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1902
|
+
}, void 0, false, {
|
|
1903
|
+
fileName: _jsxFileName$2,
|
|
1904
|
+
lineNumber: 2,
|
|
1905
|
+
columnNumber: 101
|
|
1906
|
+
}, void 0)
|
|
1907
|
+
}, void 0, false, {
|
|
1908
|
+
fileName: _jsxFileName$2,
|
|
1909
|
+
lineNumber: 2,
|
|
1910
|
+
columnNumber: 36
|
|
1911
|
+
}, void 0);
|
|
1884
1912
|
//#endregion
|
|
1885
1913
|
//#region ~icons/lucide/copy.jsx
|
|
1886
|
-
var
|
|
1914
|
+
var _jsxFileName$1 = "~icons/lucide/copy.jsx";
|
|
1915
|
+
var lucideCopy = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
1887
1916
|
viewBox: "0 0 24 24",
|
|
1888
1917
|
width: "1.2em",
|
|
1889
1918
|
height: "1.2em",
|
|
1890
1919
|
...props,
|
|
1891
|
-
children: /* @__PURE__ */ (0,
|
|
1920
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("g", {
|
|
1892
1921
|
fill: "none",
|
|
1893
1922
|
stroke: "currentColor",
|
|
1894
1923
|
strokeLinecap: "round",
|
|
1895
1924
|
strokeLinejoin: "round",
|
|
1896
1925
|
strokeWidth: 2,
|
|
1897
|
-
children: [/* @__PURE__ */ (0,
|
|
1926
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("rect", {
|
|
1898
1927
|
width: 14,
|
|
1899
1928
|
height: 14,
|
|
1900
1929
|
x: 8,
|
|
1901
1930
|
y: 8,
|
|
1902
1931
|
rx: 2,
|
|
1903
1932
|
ry: 2
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
|
|
1933
|
+
}, void 0, false, {
|
|
1934
|
+
fileName: _jsxFileName$1,
|
|
1935
|
+
lineNumber: 2,
|
|
1936
|
+
columnNumber: 192
|
|
1937
|
+
}, void 0), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }, void 0, false, {
|
|
1938
|
+
fileName: _jsxFileName$1,
|
|
1939
|
+
lineNumber: 2,
|
|
1940
|
+
columnNumber: 249
|
|
1941
|
+
}, void 0)]
|
|
1942
|
+
}, void 0, true, {
|
|
1943
|
+
fileName: _jsxFileName$1,
|
|
1944
|
+
lineNumber: 2,
|
|
1945
|
+
columnNumber: 94
|
|
1946
|
+
}, void 0)
|
|
1947
|
+
}, void 0, false, {
|
|
1948
|
+
fileName: _jsxFileName$1,
|
|
1949
|
+
lineNumber: 2,
|
|
1950
|
+
columnNumber: 29
|
|
1951
|
+
}, void 0);
|
|
1907
1952
|
//#endregion
|
|
1908
1953
|
//#region src/routes/requests/show.tsx?tsr-split=component
|
|
1954
|
+
var _jsxFileName = "/home/runner/work/qgrid/qgrid/packages/web/src/routes/requests/show.tsx?tsr-split=component";
|
|
1909
1955
|
function RequestShowPage() {
|
|
1910
1956
|
const { id } = Route.useSearch();
|
|
1911
|
-
return /* @__PURE__ */ (0,
|
|
1957
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(RequestDetail, { id }, void 0, false, {
|
|
1958
|
+
fileName: _jsxFileName,
|
|
1959
|
+
lineNumber: 28,
|
|
1960
|
+
columnNumber: 10
|
|
1961
|
+
}, this);
|
|
1912
1962
|
}
|
|
1913
1963
|
function formatNum(n) {
|
|
1914
1964
|
return n.toLocaleString();
|
|
1915
1965
|
}
|
|
1916
1966
|
var TOKENS_PER_SEC_PROVIDERS = /* @__PURE__ */ new Set();
|
|
1967
|
+
var JsonValue = json();
|
|
1917
1968
|
function tryParseJson(text) {
|
|
1918
1969
|
try {
|
|
1919
1970
|
return {
|
|
1920
1971
|
ok: true,
|
|
1921
|
-
value: JSON.parse(text)
|
|
1972
|
+
value: JsonValue.parse(JSON.parse(text))
|
|
1922
1973
|
};
|
|
1923
1974
|
} catch {
|
|
1924
1975
|
return { ok: false };
|
|
@@ -1927,7 +1978,7 @@ function tryParseJson(text) {
|
|
|
1927
1978
|
function safeParseJson(text) {
|
|
1928
1979
|
if (!text) return {};
|
|
1929
1980
|
try {
|
|
1930
|
-
return JSON.parse(text);
|
|
1981
|
+
return JsonValue.parse(JSON.parse(text));
|
|
1931
1982
|
} catch {
|
|
1932
1983
|
return text;
|
|
1933
1984
|
}
|
|
@@ -1943,12 +1994,24 @@ function CopyButton({ text, dark }) {
|
|
|
1943
1994
|
navigator.clipboard.writeText(text);
|
|
1944
1995
|
setCopied(true);
|
|
1945
1996
|
};
|
|
1946
|
-
return /* @__PURE__ */ (0,
|
|
1997
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", {
|
|
1947
1998
|
type: "button",
|
|
1948
1999
|
className: `absolute top-2 right-2 p-1 rounded transition-colors ${dark ? "text-sand-500 hover:text-sand-300" : "text-sand-400 hover:text-sand-600"}`,
|
|
1949
2000
|
onClick: handleCopy,
|
|
1950
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
1951
|
-
|
|
2001
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideCheck, { className: "size-3.5 text-sage-500" }, void 0, false, {
|
|
2002
|
+
fileName: _jsxFileName,
|
|
2003
|
+
lineNumber: 82,
|
|
2004
|
+
columnNumber: 17
|
|
2005
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideCopy, { className: "size-3.5" }, void 0, false, {
|
|
2006
|
+
fileName: _jsxFileName,
|
|
2007
|
+
lineNumber: 82,
|
|
2008
|
+
columnNumber: 68
|
|
2009
|
+
}, this)
|
|
2010
|
+
}, void 0, false, {
|
|
2011
|
+
fileName: _jsxFileName,
|
|
2012
|
+
lineNumber: 81,
|
|
2013
|
+
columnNumber: 10
|
|
2014
|
+
}, this);
|
|
1952
2015
|
}
|
|
1953
2016
|
var DATA_IMAGE_TAG_RE = /<img\s+[^>]*src=["'](data:image\/[^"']+;base64,[^"']+)["'][^>]*(?:alt=["']([^"']*)["'][^>]*)?\/?>/gi;
|
|
1954
2017
|
function parseImageSegments(text) {
|
|
@@ -1976,94 +2039,178 @@ function parseImageSegments(text) {
|
|
|
1976
2039
|
function ImageAwareContent({ text, markdown }) {
|
|
1977
2040
|
const [viewerSrc, setViewerSrc] = (0, import_react.useState)(null);
|
|
1978
2041
|
const segments = parseImageSegments(text);
|
|
1979
|
-
if (!segments.some((segment) => segment.type === "image")) return markdown ? /* @__PURE__ */ (0,
|
|
2042
|
+
if (!segments.some((segment) => segment.type === "image")) return markdown ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
1980
2043
|
className: "prose prose-sm prose-qgrid max-w-none",
|
|
1981
|
-
children: /* @__PURE__ */ (0,
|
|
2044
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Markdown, {
|
|
1982
2045
|
remarkPlugins: [remarkGfm],
|
|
1983
2046
|
children: text
|
|
1984
|
-
}
|
|
1985
|
-
|
|
2047
|
+
}, void 0, false, {
|
|
2048
|
+
fileName: _jsxFileName,
|
|
2049
|
+
lineNumber: 128,
|
|
2050
|
+
columnNumber: 9
|
|
2051
|
+
}, this)
|
|
2052
|
+
}, void 0, false, {
|
|
2053
|
+
fileName: _jsxFileName,
|
|
2054
|
+
lineNumber: 127,
|
|
2055
|
+
columnNumber: 23
|
|
2056
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
1986
2057
|
className: "text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed",
|
|
1987
2058
|
children: text
|
|
1988
|
-
}
|
|
1989
|
-
|
|
2059
|
+
}, void 0, false, {
|
|
2060
|
+
fileName: _jsxFileName,
|
|
2061
|
+
lineNumber: 129,
|
|
2062
|
+
columnNumber: 16
|
|
2063
|
+
}, this);
|
|
2064
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
1990
2065
|
className: "space-y-3",
|
|
1991
|
-
children: [segments.map((segment, index) => segment.type === "text" ? markdown ? /* @__PURE__ */ (0,
|
|
2066
|
+
children: [segments.map((segment, index) => segment.type === "text" ? markdown ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
1992
2067
|
className: "prose prose-sm prose-qgrid max-w-none",
|
|
1993
|
-
children: /* @__PURE__ */ (0,
|
|
2068
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Markdown, {
|
|
1994
2069
|
remarkPlugins: [remarkGfm],
|
|
1995
2070
|
children: segment.text
|
|
1996
|
-
}
|
|
1997
|
-
|
|
2071
|
+
}, void 0, false, {
|
|
2072
|
+
fileName: _jsxFileName,
|
|
2073
|
+
lineNumber: 135,
|
|
2074
|
+
columnNumber: 15
|
|
2075
|
+
}, this)
|
|
2076
|
+
}, `text-${index}`, false, {
|
|
2077
|
+
fileName: _jsxFileName,
|
|
2078
|
+
lineNumber: 134,
|
|
2079
|
+
columnNumber: 78
|
|
2080
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
1998
2081
|
className: "text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed",
|
|
1999
2082
|
children: segment.text
|
|
2000
|
-
}, `text-${index}
|
|
2083
|
+
}, `text-${index}`, false, {
|
|
2084
|
+
fileName: _jsxFileName,
|
|
2085
|
+
lineNumber: 136,
|
|
2086
|
+
columnNumber: 22
|
|
2087
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", {
|
|
2001
2088
|
type: "button",
|
|
2002
2089
|
className: "block max-w-full rounded-md border border-sand-200 overflow-hidden bg-white hover:border-sienna-300 transition-colors",
|
|
2003
2090
|
onClick: () => setViewerSrc(segment.src),
|
|
2004
2091
|
title: "Open image",
|
|
2005
|
-
children: /* @__PURE__ */ (0,
|
|
2092
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("img", {
|
|
2006
2093
|
src: segment.src,
|
|
2007
2094
|
alt: segment.alt,
|
|
2008
2095
|
className: "max-h-[520px] max-w-full object-contain",
|
|
2009
2096
|
loading: "lazy"
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2097
|
+
}, void 0, false, {
|
|
2098
|
+
fileName: _jsxFileName,
|
|
2099
|
+
lineNumber: 139,
|
|
2100
|
+
columnNumber: 13
|
|
2101
|
+
}, this)
|
|
2102
|
+
}, `image-${index}`, false, {
|
|
2103
|
+
fileName: _jsxFileName,
|
|
2104
|
+
lineNumber: 138,
|
|
2105
|
+
columnNumber: 22
|
|
2106
|
+
}, this)), viewerSrc && /* @__PURE__ */ (void 0)("div", {
|
|
2012
2107
|
className: "fixed inset-0 z-50 bg-black/70 p-4 flex items-center justify-center",
|
|
2013
2108
|
onClick: () => setViewerSrc(null),
|
|
2014
|
-
children: [/* @__PURE__ */ (0
|
|
2109
|
+
children: [/* @__PURE__ */ (void 0)("button", {
|
|
2015
2110
|
type: "button",
|
|
2016
2111
|
className: "absolute top-4 right-4 p-2 rounded-full bg-white/90 text-sand-700 hover:bg-white",
|
|
2017
2112
|
onClick: () => setViewerSrc(null),
|
|
2018
2113
|
title: "Close image",
|
|
2019
|
-
children: /* @__PURE__ */ (0
|
|
2020
|
-
|
|
2114
|
+
children: /* @__PURE__ */ (void 0)(lucideX, { className: "size-5" }, void 0, false, {
|
|
2115
|
+
fileName: _jsxFileName,
|
|
2116
|
+
lineNumber: 143,
|
|
2117
|
+
columnNumber: 13
|
|
2118
|
+
}, this)
|
|
2119
|
+
}, void 0, false, {
|
|
2120
|
+
fileName: _jsxFileName,
|
|
2121
|
+
lineNumber: 142,
|
|
2122
|
+
columnNumber: 11
|
|
2123
|
+
}, this), /* @__PURE__ */ (void 0)("img", {
|
|
2021
2124
|
src: viewerSrc,
|
|
2022
2125
|
alt: "generated preview",
|
|
2023
2126
|
className: "max-h-full max-w-full object-contain rounded-md bg-white",
|
|
2024
2127
|
onClick: (e) => e.stopPropagation()
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
|
|
2128
|
+
}, void 0, false, {
|
|
2129
|
+
fileName: _jsxFileName,
|
|
2130
|
+
lineNumber: 145,
|
|
2131
|
+
columnNumber: 11
|
|
2132
|
+
}, this)]
|
|
2133
|
+
}, void 0, true, {
|
|
2134
|
+
fileName: _jsxFileName,
|
|
2135
|
+
lineNumber: 141,
|
|
2136
|
+
columnNumber: 21
|
|
2137
|
+
}, this)]
|
|
2138
|
+
}, void 0, true, {
|
|
2139
|
+
fileName: _jsxFileName,
|
|
2140
|
+
lineNumber: 133,
|
|
2141
|
+
columnNumber: 10
|
|
2142
|
+
}, this);
|
|
2028
2143
|
}
|
|
2029
2144
|
function FormattedContent({ text, markdown }) {
|
|
2030
2145
|
const parsed = tryParseJson(text);
|
|
2031
2146
|
const [mode, setMode] = (0, import_react.useState)("pretty");
|
|
2032
|
-
const
|
|
2033
|
-
if (!parsed.ok ||
|
|
2034
|
-
if (markdown) return /* @__PURE__ */ (0,
|
|
2147
|
+
const jsonContainer = parsed.ok && parsed.value instanceof Object ? parsed.value : null;
|
|
2148
|
+
if (!parsed.ok || jsonContainer === null) {
|
|
2149
|
+
if (markdown) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ImageAwareContent, {
|
|
2035
2150
|
text,
|
|
2036
2151
|
markdown: true
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2152
|
+
}, void 0, false, {
|
|
2153
|
+
fileName: _jsxFileName,
|
|
2154
|
+
lineNumber: 163,
|
|
2155
|
+
columnNumber: 14
|
|
2156
|
+
}, this);
|
|
2157
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ImageAwareContent, { text: parsed.ok ? JSON.stringify(parsed.value, null, 2) : text }, void 0, false, {
|
|
2158
|
+
fileName: _jsxFileName,
|
|
2159
|
+
lineNumber: 165,
|
|
2160
|
+
columnNumber: 12
|
|
2161
|
+
}, this);
|
|
2039
2162
|
}
|
|
2040
|
-
return /* @__PURE__ */ (0,
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2041
2164
|
className: "flex gap-1 mb-2",
|
|
2042
|
-
children: [/* @__PURE__ */ (0,
|
|
2165
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", {
|
|
2043
2166
|
type: "button",
|
|
2044
2167
|
className: `px-2 py-0.5 text-[10px] rounded-md transition-colors ${mode === "plain" ? "bg-sand-200 text-sand-700" : "text-sand-400 hover:text-sand-600"}`,
|
|
2045
2168
|
onClick: () => setMode("plain"),
|
|
2046
2169
|
children: "Plain"
|
|
2047
|
-
}
|
|
2170
|
+
}, void 0, false, {
|
|
2171
|
+
fileName: _jsxFileName,
|
|
2172
|
+
lineNumber: 169,
|
|
2173
|
+
columnNumber: 9
|
|
2174
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", {
|
|
2048
2175
|
type: "button",
|
|
2049
2176
|
className: `px-2 py-0.5 text-[10px] rounded-md transition-colors ${mode === "pretty" ? "bg-sand-200 text-sand-700" : "text-sand-400 hover:text-sand-600"}`,
|
|
2050
2177
|
onClick: () => setMode("pretty"),
|
|
2051
2178
|
children: "Pretty"
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2179
|
+
}, void 0, false, {
|
|
2180
|
+
fileName: _jsxFileName,
|
|
2181
|
+
lineNumber: 172,
|
|
2182
|
+
columnNumber: 9
|
|
2183
|
+
}, this)]
|
|
2184
|
+
}, void 0, true, {
|
|
2185
|
+
fileName: _jsxFileName,
|
|
2186
|
+
lineNumber: 168,
|
|
2187
|
+
columnNumber: 7
|
|
2188
|
+
}, this), mode === "pretty" ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(JsonView, {
|
|
2189
|
+
value: jsonContainer,
|
|
2055
2190
|
style: lightTheme,
|
|
2056
2191
|
displayDataTypes: false,
|
|
2057
2192
|
enableClipboard: true,
|
|
2058
2193
|
collapsed: false
|
|
2059
|
-
}
|
|
2194
|
+
}, void 0, false, {
|
|
2195
|
+
fileName: _jsxFileName,
|
|
2196
|
+
lineNumber: 176,
|
|
2197
|
+
columnNumber: 28
|
|
2198
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
2060
2199
|
className: "text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed",
|
|
2061
2200
|
children: JSON.stringify(parsed.value, null, 2)
|
|
2062
|
-
}
|
|
2201
|
+
}, void 0, false, {
|
|
2202
|
+
fileName: _jsxFileName,
|
|
2203
|
+
lineNumber: 176,
|
|
2204
|
+
columnNumber: 143
|
|
2205
|
+
}, this)] }, void 0, true, {
|
|
2206
|
+
fileName: _jsxFileName,
|
|
2207
|
+
lineNumber: 167,
|
|
2208
|
+
columnNumber: 10
|
|
2209
|
+
}, this);
|
|
2063
2210
|
}
|
|
2064
2211
|
function Section({ title, defaultOpen = true, headerMetadata, onOpenChange, children }) {
|
|
2065
2212
|
const [open, setOpen] = (0, import_react.useState)(defaultOpen);
|
|
2066
|
-
return /* @__PURE__ */ (0,
|
|
2213
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("details", {
|
|
2067
2214
|
open,
|
|
2068
2215
|
className: "group panel overflow-hidden",
|
|
2069
2216
|
onToggle: (event) => {
|
|
@@ -2071,60 +2218,116 @@ function Section({ title, defaultOpen = true, headerMetadata, onOpenChange, chil
|
|
|
2071
2218
|
setOpen(nextOpen);
|
|
2072
2219
|
onOpenChange?.(nextOpen);
|
|
2073
2220
|
},
|
|
2074
|
-
children: [/* @__PURE__ */ (0,
|
|
2221
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("summary", {
|
|
2075
2222
|
className: "panel-header flex min-w-0 items-center gap-1.5 whitespace-nowrap cursor-pointer select-none list-none px-4 py-2.5",
|
|
2076
2223
|
children: [
|
|
2077
|
-
/* @__PURE__ */ (0,
|
|
2078
|
-
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideChevronDown, { className: "size-3.5 shrink-0 text-sand-400 transition-transform group-open:rotate-0 -rotate-90" }, void 0, false, {
|
|
2225
|
+
fileName: _jsxFileName,
|
|
2226
|
+
lineNumber: 201,
|
|
2227
|
+
columnNumber: 9
|
|
2228
|
+
}, this),
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2079
2230
|
className: "shrink-0 text-[11px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2080
2231
|
children: title
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2232
|
+
}, void 0, false, {
|
|
2233
|
+
fileName: _jsxFileName,
|
|
2234
|
+
lineNumber: 202,
|
|
2235
|
+
columnNumber: 9
|
|
2236
|
+
}, this),
|
|
2237
|
+
headerMetadata && /* @__PURE__ */ (void 0)("span", {
|
|
2083
2238
|
className: "flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden whitespace-nowrap text-[11px] normal-case text-sand-400",
|
|
2084
2239
|
children: headerMetadata
|
|
2085
|
-
}
|
|
2240
|
+
}, void 0, false, {
|
|
2241
|
+
fileName: _jsxFileName,
|
|
2242
|
+
lineNumber: 205,
|
|
2243
|
+
columnNumber: 28
|
|
2244
|
+
}, this)
|
|
2086
2245
|
]
|
|
2087
|
-
}
|
|
2246
|
+
}, void 0, true, {
|
|
2247
|
+
fileName: _jsxFileName,
|
|
2248
|
+
lineNumber: 200,
|
|
2249
|
+
columnNumber: 7
|
|
2250
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2088
2251
|
className: "p-4",
|
|
2089
2252
|
children
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2253
|
+
}, void 0, false, {
|
|
2254
|
+
fileName: _jsxFileName,
|
|
2255
|
+
lineNumber: 209,
|
|
2256
|
+
columnNumber: 7
|
|
2257
|
+
}, this)]
|
|
2258
|
+
}, void 0, true, {
|
|
2259
|
+
fileName: _jsxFileName,
|
|
2260
|
+
lineNumber: 195,
|
|
2261
|
+
columnNumber: 10
|
|
2262
|
+
}, this);
|
|
2092
2263
|
}
|
|
2093
2264
|
function Metric({ label, value }) {
|
|
2094
|
-
return /* @__PURE__ */ (0,
|
|
2265
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2095
2266
|
className: "min-w-0",
|
|
2096
|
-
children: [/* @__PURE__ */ (0,
|
|
2267
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("dt", {
|
|
2097
2268
|
className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate",
|
|
2098
2269
|
children: label
|
|
2099
|
-
}
|
|
2270
|
+
}, void 0, false, {
|
|
2271
|
+
fileName: _jsxFileName,
|
|
2272
|
+
lineNumber: 220,
|
|
2273
|
+
columnNumber: 7
|
|
2274
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("dd", {
|
|
2100
2275
|
className: "text-[15px] font-semibold text-sand-800 tabular-nums mt-0.5 truncate",
|
|
2101
2276
|
children: value
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2277
|
+
}, void 0, false, {
|
|
2278
|
+
fileName: _jsxFileName,
|
|
2279
|
+
lineNumber: 223,
|
|
2280
|
+
columnNumber: 7
|
|
2281
|
+
}, this)]
|
|
2282
|
+
}, void 0, true, {
|
|
2283
|
+
fileName: _jsxFileName,
|
|
2284
|
+
lineNumber: 219,
|
|
2285
|
+
columnNumber: 10
|
|
2286
|
+
}, this);
|
|
2104
2287
|
}
|
|
2105
|
-
var STATUS_STYLE =
|
|
2106
|
-
running
|
|
2107
|
-
succeeded
|
|
2108
|
-
error
|
|
2109
|
-
aborted
|
|
2110
|
-
|
|
2288
|
+
var STATUS_STYLE = new Map([
|
|
2289
|
+
["running", "bg-blue-100 text-blue-600"],
|
|
2290
|
+
["succeeded", "bg-sage-100 text-sage-600"],
|
|
2291
|
+
["error", "bg-red-100 text-red-600"],
|
|
2292
|
+
["aborted", "bg-caution-400/15 text-caution-500"]
|
|
2293
|
+
]);
|
|
2111
2294
|
function ErrorPanel({ message }) {
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2295
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2113
2296
|
className: "panel overflow-hidden border border-red-200 bg-red-50/60",
|
|
2114
|
-
children: [/* @__PURE__ */ (0,
|
|
2297
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2115
2298
|
className: "px-4 py-2.5 border-b border-red-100 flex items-center gap-1.5",
|
|
2116
|
-
children: /* @__PURE__ */ (0,
|
|
2299
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2117
2300
|
className: "text-[11px] uppercase tracking-wider text-red-600 font-medium",
|
|
2118
2301
|
children: "Error"
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2302
|
+
}, void 0, false, {
|
|
2303
|
+
fileName: _jsxFileName,
|
|
2304
|
+
lineNumber: 236,
|
|
2305
|
+
columnNumber: 9
|
|
2306
|
+
}, this)
|
|
2307
|
+
}, void 0, false, {
|
|
2308
|
+
fileName: _jsxFileName,
|
|
2309
|
+
lineNumber: 235,
|
|
2310
|
+
columnNumber: 7
|
|
2311
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2121
2312
|
className: "p-4",
|
|
2122
|
-
children: /* @__PURE__ */ (0,
|
|
2313
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
2123
2314
|
className: "text-[12px] text-red-700 whitespace-pre-wrap break-words font-mono leading-relaxed max-h-80 overflow-auto",
|
|
2124
2315
|
children: message
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2316
|
+
}, void 0, false, {
|
|
2317
|
+
fileName: _jsxFileName,
|
|
2318
|
+
lineNumber: 239,
|
|
2319
|
+
columnNumber: 9
|
|
2320
|
+
}, this)
|
|
2321
|
+
}, void 0, false, {
|
|
2322
|
+
fileName: _jsxFileName,
|
|
2323
|
+
lineNumber: 238,
|
|
2324
|
+
columnNumber: 7
|
|
2325
|
+
}, this)]
|
|
2326
|
+
}, void 0, true, {
|
|
2327
|
+
fileName: _jsxFileName,
|
|
2328
|
+
lineNumber: 234,
|
|
2329
|
+
columnNumber: 10
|
|
2330
|
+
}, this);
|
|
2128
2331
|
}
|
|
2129
2332
|
function HeaderBar({ data }) {
|
|
2130
2333
|
const isRunning = data.status === "running";
|
|
@@ -2135,120 +2338,241 @@ function HeaderBar({ data }) {
|
|
|
2135
2338
|
imageCostMethod: data.image_cost_method
|
|
2136
2339
|
});
|
|
2137
2340
|
const hasRequestedOnly = !isRunning && data.requested_model_name !== null && data.model_name === null;
|
|
2138
|
-
return /* @__PURE__ */ (0,
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2139
2342
|
className: "panel overflow-hidden px-4 py-3 flex flex-wrap items-center gap-x-2 gap-y-1.5 sm:px-5",
|
|
2140
2343
|
children: [
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2142
2345
|
className: "text-[15px] font-semibold text-sand-900 break-all",
|
|
2143
2346
|
children: modelDisplay.label === "—" ? "Unknown model" : modelDisplay.label
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2347
|
+
}, void 0, false, {
|
|
2348
|
+
fileName: _jsxFileName,
|
|
2349
|
+
lineNumber: 261,
|
|
2350
|
+
columnNumber: 7
|
|
2351
|
+
}, this),
|
|
2352
|
+
hasRequestedOnly && /* @__PURE__ */ (void 0)("span", {
|
|
2146
2353
|
className: "text-[10px] text-sand-400",
|
|
2147
2354
|
children: "요청"
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2355
|
+
}, void 0, false, {
|
|
2356
|
+
fileName: _jsxFileName,
|
|
2357
|
+
lineNumber: 264,
|
|
2358
|
+
columnNumber: 28
|
|
2359
|
+
}, this),
|
|
2360
|
+
data.service_tier === "fast" && /* @__PURE__ */ (void 0)("span", {
|
|
2150
2361
|
title: "Fast 모드",
|
|
2151
2362
|
className: "inline-flex shrink-0",
|
|
2152
|
-
children: /* @__PURE__ */ (0
|
|
2363
|
+
children: /* @__PURE__ */ (void 0)(lucideZap, {
|
|
2153
2364
|
"aria-label": "Fast 모드",
|
|
2154
2365
|
className: "size-3.5 text-[#1877F2] [&_path]:fill-current"
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
|
|
2366
|
+
}, void 0, false, {
|
|
2367
|
+
fileName: _jsxFileName,
|
|
2368
|
+
lineNumber: 266,
|
|
2369
|
+
columnNumber: 11
|
|
2370
|
+
}, this)
|
|
2371
|
+
}, void 0, false, {
|
|
2372
|
+
fileName: _jsxFileName,
|
|
2373
|
+
lineNumber: 265,
|
|
2374
|
+
columnNumber: 40
|
|
2375
|
+
}, this),
|
|
2376
|
+
!isRunning && (data.fallback_count ?? 0) > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2158
2377
|
className: "text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase",
|
|
2159
2378
|
children: ["fallback ×", data.fallback_count]
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
|
|
2379
|
+
}, void 0, true, {
|
|
2380
|
+
fileName: _jsxFileName,
|
|
2381
|
+
lineNumber: 268,
|
|
2382
|
+
columnNumber: 56
|
|
2383
|
+
}, this),
|
|
2384
|
+
!isRunning && data.status !== "succeeded" && /* @__PURE__ */ (void 0)("span", {
|
|
2385
|
+
className: `text-[10px] px-1.5 py-0.5 rounded-full font-medium uppercase ${STATUS_STYLE.get(data.status) ?? "bg-sand-100 text-sand-500"}`,
|
|
2163
2386
|
children: data.status
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2387
|
+
}, void 0, false, {
|
|
2388
|
+
fileName: _jsxFileName,
|
|
2389
|
+
lineNumber: 271,
|
|
2390
|
+
columnNumber: 53
|
|
2391
|
+
}, this),
|
|
2392
|
+
data.response_json_ok === false && /* @__PURE__ */ (void 0)("span", {
|
|
2166
2393
|
title: "structured 요청의 응답이 JSON 파싱에 실패했습니다",
|
|
2167
2394
|
className: "text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase",
|
|
2168
2395
|
children: "broken json"
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2396
|
+
}, void 0, false, {
|
|
2397
|
+
fileName: _jsxFileName,
|
|
2398
|
+
lineNumber: 274,
|
|
2399
|
+
columnNumber: 43
|
|
2400
|
+
}, this),
|
|
2401
|
+
data.effort && /* @__PURE__ */ (void 0)("span", {
|
|
2171
2402
|
className: "text-[11px] px-1.5 py-0.5 rounded-md bg-sand-100 text-sand-500 font-mono",
|
|
2172
2403
|
children: ["effort=", data.effort]
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2404
|
+
}, void 0, true, {
|
|
2405
|
+
fileName: _jsxFileName,
|
|
2406
|
+
lineNumber: 277,
|
|
2407
|
+
columnNumber: 23
|
|
2408
|
+
}, this),
|
|
2409
|
+
data.project_name && /* @__PURE__ */ (void 0)("span", {
|
|
2175
2410
|
className: "text-[12px] text-sand-400",
|
|
2176
2411
|
children: ["· project=", data.project_name]
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2412
|
+
}, void 0, true, {
|
|
2413
|
+
fileName: _jsxFileName,
|
|
2414
|
+
lineNumber: 280,
|
|
2415
|
+
columnNumber: 29
|
|
2416
|
+
}, this),
|
|
2417
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2179
2418
|
className: "ml-auto text-[11px] text-sand-400",
|
|
2180
2419
|
children: data.token_name
|
|
2181
|
-
}
|
|
2420
|
+
}, void 0, false, {
|
|
2421
|
+
fileName: _jsxFileName,
|
|
2422
|
+
lineNumber: 281,
|
|
2423
|
+
columnNumber: 7
|
|
2424
|
+
}, this)
|
|
2182
2425
|
]
|
|
2183
|
-
}
|
|
2426
|
+
}, void 0, true, {
|
|
2427
|
+
fileName: _jsxFileName,
|
|
2428
|
+
lineNumber: 260,
|
|
2429
|
+
columnNumber: 5
|
|
2430
|
+
}, this);
|
|
2184
2431
|
}
|
|
2185
2432
|
function MetricsPanel({ data, toolCallCount }) {
|
|
2186
2433
|
const tokensPerSecEnabled = isTokensPerSecEnabled(data);
|
|
2187
|
-
return /* @__PURE__ */ (0,
|
|
2434
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2188
2435
|
className: "panel overflow-hidden px-5 py-3 space-y-3",
|
|
2189
|
-
children: [/* @__PURE__ */ (0,
|
|
2436
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2190
2437
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-x-6 gap-y-3",
|
|
2191
2438
|
children: [
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2193
2440
|
label: "Duration",
|
|
2194
2441
|
value: `${(data.duration_ms / 1e3).toFixed(1)}s`
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2442
|
+
}, void 0, false, {
|
|
2443
|
+
fileName: _jsxFileName,
|
|
2444
|
+
lineNumber: 295,
|
|
2445
|
+
columnNumber: 9
|
|
2446
|
+
}, this),
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2197
2448
|
label: "TTFT",
|
|
2198
2449
|
value: formatRunTtftMs(data.ttft_ms)
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2450
|
+
}, void 0, false, {
|
|
2451
|
+
fileName: _jsxFileName,
|
|
2452
|
+
lineNumber: 296,
|
|
2453
|
+
columnNumber: 9
|
|
2454
|
+
}, this),
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2201
2456
|
label: "Tokens/sec",
|
|
2202
2457
|
value: formatTokensPerSec(data.output_tokens, data.duration_ms, data.ttft_ms, tokensPerSecEnabled)
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2458
|
+
}, void 0, false, {
|
|
2459
|
+
fileName: _jsxFileName,
|
|
2460
|
+
lineNumber: 297,
|
|
2461
|
+
columnNumber: 9
|
|
2462
|
+
}, this),
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2205
2464
|
label: "Driver",
|
|
2206
2465
|
value: data.cost_usd !== null ? formatMicroUsd(data.cost_usd) : "—"
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2466
|
+
}, void 0, false, {
|
|
2467
|
+
fileName: _jsxFileName,
|
|
2468
|
+
lineNumber: 298,
|
|
2469
|
+
columnNumber: 9
|
|
2470
|
+
}, this),
|
|
2471
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2209
2472
|
label: "Image",
|
|
2210
2473
|
value: data.image_cost_usd !== null ? formatMicroUsd(data.image_cost_usd) : "—"
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2474
|
+
}, void 0, false, {
|
|
2475
|
+
fileName: _jsxFileName,
|
|
2476
|
+
lineNumber: 299,
|
|
2477
|
+
columnNumber: 9
|
|
2478
|
+
}, this),
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2213
2480
|
label: "Tool Calls",
|
|
2214
2481
|
value: `${toolCallCount}회`
|
|
2215
|
-
}
|
|
2482
|
+
}, void 0, false, {
|
|
2483
|
+
fileName: _jsxFileName,
|
|
2484
|
+
lineNumber: 300,
|
|
2485
|
+
columnNumber: 9
|
|
2486
|
+
}, this)
|
|
2216
2487
|
]
|
|
2217
|
-
}
|
|
2488
|
+
}, void 0, true, {
|
|
2489
|
+
fileName: _jsxFileName,
|
|
2490
|
+
lineNumber: 294,
|
|
2491
|
+
columnNumber: 7
|
|
2492
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2218
2493
|
className: "border-t border-sand-100/60 pt-3 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-x-6 gap-y-3",
|
|
2219
2494
|
children: [
|
|
2220
|
-
/* @__PURE__ */ (0,
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2221
2496
|
label: "Input",
|
|
2222
2497
|
value: formatNum(data.input_tokens)
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2498
|
+
}, void 0, false, {
|
|
2499
|
+
fileName: _jsxFileName,
|
|
2500
|
+
lineNumber: 303,
|
|
2501
|
+
columnNumber: 9
|
|
2502
|
+
}, this),
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2225
2504
|
label: "Output",
|
|
2226
2505
|
value: formatNum(data.output_tokens)
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2506
|
+
}, void 0, false, {
|
|
2507
|
+
fileName: _jsxFileName,
|
|
2508
|
+
lineNumber: 304,
|
|
2509
|
+
columnNumber: 9
|
|
2510
|
+
}, this),
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2229
2512
|
label: "Cache Read",
|
|
2230
2513
|
value: formatNum(data.cache_read_tokens)
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2514
|
+
}, void 0, false, {
|
|
2515
|
+
fileName: _jsxFileName,
|
|
2516
|
+
lineNumber: 305,
|
|
2517
|
+
columnNumber: 9
|
|
2518
|
+
}, this),
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2233
2520
|
label: "Cache Write",
|
|
2234
2521
|
value: formatNum(data.cache_creation_tokens)
|
|
2235
|
-
}
|
|
2236
|
-
|
|
2522
|
+
}, void 0, false, {
|
|
2523
|
+
fileName: _jsxFileName,
|
|
2524
|
+
lineNumber: 306,
|
|
2525
|
+
columnNumber: 9
|
|
2526
|
+
}, this),
|
|
2527
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2237
2528
|
label: "Cache Write (5m)",
|
|
2238
2529
|
value: data.cache_creation_5m_tokens === null ? "—" : formatNum(data.cache_creation_5m_tokens)
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2530
|
+
}, void 0, false, {
|
|
2531
|
+
fileName: _jsxFileName,
|
|
2532
|
+
lineNumber: 307,
|
|
2533
|
+
columnNumber: 9
|
|
2534
|
+
}, this),
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2241
2536
|
label: "Cache Write (1h)",
|
|
2242
2537
|
value: data.cache_creation_1h_tokens === null ? "—" : formatNum(data.cache_creation_1h_tokens)
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2538
|
+
}, void 0, false, {
|
|
2539
|
+
fileName: _jsxFileName,
|
|
2540
|
+
lineNumber: 308,
|
|
2541
|
+
columnNumber: 9
|
|
2542
|
+
}, this),
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Metric, {
|
|
2245
2544
|
label: "Cache Hit",
|
|
2246
2545
|
value: cacheHitRate(data)
|
|
2247
|
-
}
|
|
2546
|
+
}, void 0, false, {
|
|
2547
|
+
fileName: _jsxFileName,
|
|
2548
|
+
lineNumber: 309,
|
|
2549
|
+
columnNumber: 9
|
|
2550
|
+
}, this)
|
|
2248
2551
|
]
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2552
|
+
}, void 0, true, {
|
|
2553
|
+
fileName: _jsxFileName,
|
|
2554
|
+
lineNumber: 302,
|
|
2555
|
+
columnNumber: 7
|
|
2556
|
+
}, this)]
|
|
2557
|
+
}, void 0, true, {
|
|
2558
|
+
fileName: _jsxFileName,
|
|
2559
|
+
lineNumber: 293,
|
|
2560
|
+
columnNumber: 10
|
|
2561
|
+
}, this);
|
|
2251
2562
|
}
|
|
2563
|
+
var ToolInputImage = object({
|
|
2564
|
+
mediaType: string().optional(),
|
|
2565
|
+
data: string().optional(),
|
|
2566
|
+
url: string().optional(),
|
|
2567
|
+
byteSize: number().optional()
|
|
2568
|
+
});
|
|
2569
|
+
var ToolInputArgs = looseObject({ inputImages: array(JsonValue) });
|
|
2570
|
+
var MaskableToolInputImage = looseObject({
|
|
2571
|
+
mediaType: JsonValue.optional(),
|
|
2572
|
+
byteSize: JsonValue.optional(),
|
|
2573
|
+
url: JsonValue.optional(),
|
|
2574
|
+
data: JsonValue.optional()
|
|
2575
|
+
});
|
|
2252
2576
|
function formatDurationMs(ms) {
|
|
2253
2577
|
if (ms === null || ms === void 0) return "—";
|
|
2254
2578
|
return ms >= 1e3 ? `${(ms / 1e3).toFixed(1)}s` : `${ms}ms`;
|
|
@@ -2263,10 +2587,12 @@ function detectTokenRateProvider(source) {
|
|
|
2263
2587
|
const canonical = modelName.includes("/") ? modelName.split("/").pop() : modelName;
|
|
2264
2588
|
if (canonical.startsWith("claude-")) return "anthropic";
|
|
2265
2589
|
if (/^(gpt-|codex-|o\d)/.test(canonical)) return "openai";
|
|
2590
|
+
if (canonical.startsWith("grok-")) return "grok";
|
|
2266
2591
|
}
|
|
2267
2592
|
const tokenName = source.token_name?.trim().toLowerCase();
|
|
2268
2593
|
if (tokenName?.startsWith("anthropic/")) return "anthropic";
|
|
2269
2594
|
if (tokenName?.startsWith("openai/")) return "openai";
|
|
2595
|
+
if (tokenName?.startsWith("grok/")) return "grok";
|
|
2270
2596
|
return null;
|
|
2271
2597
|
}
|
|
2272
2598
|
function isTokensPerSecEnabled(source) {
|
|
@@ -2280,47 +2606,60 @@ function formatTokensPerSec(outputTokens, durationMs, ttftMs, enabled) {
|
|
|
2280
2606
|
return `${Math.round(outputTokens / (generationMs / 1e3)).toLocaleString()} tok/s`;
|
|
2281
2607
|
}
|
|
2282
2608
|
function CompactMetric({ label, value }) {
|
|
2283
|
-
return /* @__PURE__ */ (0,
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2284
2610
|
className: "min-w-0 self-end",
|
|
2285
|
-
children: [label && /* @__PURE__ */ (0
|
|
2611
|
+
children: [label && /* @__PURE__ */ (void 0)("div", {
|
|
2286
2612
|
className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate",
|
|
2287
2613
|
children: label
|
|
2288
|
-
}
|
|
2614
|
+
}, void 0, false, {
|
|
2615
|
+
fileName: _jsxFileName,
|
|
2616
|
+
lineNumber: 419,
|
|
2617
|
+
columnNumber: 17
|
|
2618
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2289
2619
|
className: "mt-0.5 text-[13px] font-semibold text-sand-800 tabular-nums truncate",
|
|
2290
2620
|
children: value
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2621
|
+
}, void 0, false, {
|
|
2622
|
+
fileName: _jsxFileName,
|
|
2623
|
+
lineNumber: 422,
|
|
2624
|
+
columnNumber: 7
|
|
2625
|
+
}, this)]
|
|
2626
|
+
}, void 0, true, {
|
|
2627
|
+
fileName: _jsxFileName,
|
|
2628
|
+
lineNumber: 418,
|
|
2629
|
+
columnNumber: 5
|
|
2630
|
+
}, this);
|
|
2298
2631
|
}
|
|
2299
2632
|
function getToolInputImages(args) {
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2633
|
+
const parsedArgs = ToolInputArgs.safeParse(args);
|
|
2634
|
+
if (!parsedArgs.success) return [];
|
|
2635
|
+
return parsedArgs.data.inputImages.flatMap((item) => {
|
|
2636
|
+
const image = ToolInputImage.safeParse(item);
|
|
2637
|
+
return image.success && (image.data.url || image.data.data) ? [image.data] : [];
|
|
2304
2638
|
});
|
|
2305
2639
|
}
|
|
2640
|
+
function maskToolInputImage(item) {
|
|
2641
|
+
const parsed = MaskableToolInputImage.safeParse(item);
|
|
2642
|
+
if (!parsed.success) return item;
|
|
2643
|
+
const image = parsed.data;
|
|
2644
|
+
const masked = {};
|
|
2645
|
+
if (image.mediaType !== void 0) masked.mediaType = image.mediaType;
|
|
2646
|
+
if (image.byteSize !== void 0) masked.byteSize = image.byteSize;
|
|
2647
|
+
const url = string().safeParse(image.url);
|
|
2648
|
+
const maskedUrl = url.success && url.data.toLowerCase().startsWith("data:") ? `[data-url ${url.data.length} chars]` : image.url;
|
|
2649
|
+
if (maskedUrl) masked.url = maskedUrl;
|
|
2650
|
+
if (image.data) {
|
|
2651
|
+
const data = string().safeParse(image.data);
|
|
2652
|
+
masked.data = data.success ? `[base64 ${data.data.length} chars]` : "[base64 data]";
|
|
2653
|
+
}
|
|
2654
|
+
return masked;
|
|
2655
|
+
}
|
|
2656
|
+
/** Returns the value passed to JSON.stringify for display; undefined fields are omitted there. */
|
|
2306
2657
|
function hideToolInputImages(args) {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
const inputImages = readToolInputImages(record);
|
|
2310
|
-
if (!inputImages) return args;
|
|
2658
|
+
const parsedArgs = ToolInputArgs.safeParse(args);
|
|
2659
|
+
if (!parsedArgs.success || !(args instanceof Object) || Array.isArray(args)) return args;
|
|
2311
2660
|
return {
|
|
2312
|
-
...
|
|
2313
|
-
inputImages: inputImages.map(
|
|
2314
|
-
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
2315
|
-
const image = item;
|
|
2316
|
-
const maskedUrl = typeof image.url === "string" && image.url.toLowerCase().startsWith("data:") ? `[data-url ${image.url.length} chars]` : image.url;
|
|
2317
|
-
return {
|
|
2318
|
-
mediaType: image.mediaType,
|
|
2319
|
-
byteSize: image.byteSize,
|
|
2320
|
-
...maskedUrl ? { url: maskedUrl } : {},
|
|
2321
|
-
...image.data ? { data: `[base64 ${image.data.length} chars]` } : {}
|
|
2322
|
-
};
|
|
2323
|
-
})
|
|
2661
|
+
...args,
|
|
2662
|
+
inputImages: parsedArgs.data.inputImages.map(maskToolInputImage)
|
|
2324
2663
|
};
|
|
2325
2664
|
}
|
|
2326
2665
|
function ToolInputImages({ images }) {
|
|
@@ -2335,20 +2674,28 @@ function ToolInputImages({ images }) {
|
|
|
2335
2674
|
} : null;
|
|
2336
2675
|
}).filter((item) => item !== null);
|
|
2337
2676
|
if (renderableImages.length === 0) return null;
|
|
2338
|
-
return /* @__PURE__ */ (0,
|
|
2677
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2339
2678
|
className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2",
|
|
2340
2679
|
children: "Input Images"
|
|
2341
|
-
}
|
|
2680
|
+
}, void 0, false, {
|
|
2681
|
+
fileName: _jsxFileName,
|
|
2682
|
+
lineNumber: 483,
|
|
2683
|
+
columnNumber: 7
|
|
2684
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2342
2685
|
className: "mt-1 grid grid-cols-1 sm:grid-cols-2 gap-2",
|
|
2343
2686
|
children: renderableImages.map(({ image, index, src }) => {
|
|
2344
|
-
return /* @__PURE__ */ (0,
|
|
2687
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2345
2688
|
className: "rounded-md border border-sand-200 bg-white overflow-hidden",
|
|
2346
|
-
children: [/* @__PURE__ */ (0,
|
|
2689
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("img", {
|
|
2347
2690
|
src,
|
|
2348
2691
|
alt: `reference ${index + 1}`,
|
|
2349
2692
|
className: "max-h-64 w-full object-contain bg-white",
|
|
2350
2693
|
loading: "lazy"
|
|
2351
|
-
}
|
|
2694
|
+
}, void 0, false, {
|
|
2695
|
+
fileName: _jsxFileName,
|
|
2696
|
+
lineNumber: 493,
|
|
2697
|
+
columnNumber: 15
|
|
2698
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2352
2699
|
className: "px-2 py-1 text-[10px] text-sand-500 font-mono border-t border-sand-100",
|
|
2353
2700
|
children: [
|
|
2354
2701
|
image.mediaType ?? "image",
|
|
@@ -2356,14 +2703,35 @@ function ToolInputImages({ images }) {
|
|
|
2356
2703
|
" ",
|
|
2357
2704
|
image.byteSize !== void 0 ? `${image.byteSize.toLocaleString()} bytes` : "url"
|
|
2358
2705
|
]
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2706
|
+
}, void 0, true, {
|
|
2707
|
+
fileName: _jsxFileName,
|
|
2708
|
+
lineNumber: 494,
|
|
2709
|
+
columnNumber: 15
|
|
2710
|
+
}, this)]
|
|
2711
|
+
}, `${image.mediaType ?? "image"}-${index}`, true, {
|
|
2712
|
+
fileName: _jsxFileName,
|
|
2713
|
+
lineNumber: 492,
|
|
2714
|
+
columnNumber: 16
|
|
2715
|
+
}, this);
|
|
2361
2716
|
})
|
|
2362
|
-
}
|
|
2717
|
+
}, void 0, false, {
|
|
2718
|
+
fileName: _jsxFileName,
|
|
2719
|
+
lineNumber: 486,
|
|
2720
|
+
columnNumber: 7
|
|
2721
|
+
}, this)] }, void 0, true, {
|
|
2722
|
+
fileName: _jsxFileName,
|
|
2723
|
+
lineNumber: 482,
|
|
2724
|
+
columnNumber: 10
|
|
2725
|
+
}, this);
|
|
2363
2726
|
}
|
|
2364
|
-
function RequestInputImages({ stepId }) {
|
|
2365
|
-
const { data: detail } = RequestLogStepService.useRequestLogStep("I", stepId ?? 0, { enabled: stepId !== null });
|
|
2366
|
-
|
|
2727
|
+
function RequestInputImages({ images, stepId }) {
|
|
2728
|
+
const { data: detail } = RequestLogStepService.useRequestLogStep("I", stepId ?? 0, { enabled: images === null && stepId !== null });
|
|
2729
|
+
const args = detail ? safeParseJson(detail.tool_args) : null;
|
|
2730
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ToolInputImages, { images: images ?? getToolInputImages(args) }, void 0, false, {
|
|
2731
|
+
fileName: _jsxFileName,
|
|
2732
|
+
lineNumber: 518,
|
|
2733
|
+
columnNumber: 10
|
|
2734
|
+
}, this);
|
|
2367
2735
|
}
|
|
2368
2736
|
function ToolCallItem({ entry }) {
|
|
2369
2737
|
const hasError = !!entry.error;
|
|
@@ -2371,200 +2739,430 @@ function ToolCallItem({ entry }) {
|
|
|
2371
2739
|
const { data: detail } = RequestLogStepService.useRequestLogStep("A", entry.id, { enabled: opened });
|
|
2372
2740
|
const displayArgs = hideToolInputImages(detail ? safeParseJson(detail.tool_args) : null);
|
|
2373
2741
|
const result = detail ? safeParseJson(detail.tool_result) : null;
|
|
2742
|
+
const resultText = string().safeParse(result);
|
|
2743
|
+
const responseText = resultText.success ? resultText.data : JSON.stringify(result);
|
|
2374
2744
|
const error = detail?.error ?? entry.error;
|
|
2375
|
-
return /* @__PURE__ */ (0,
|
|
2745
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("details", {
|
|
2376
2746
|
className: "group/tool",
|
|
2377
2747
|
onToggle: (e) => setOpened(e.currentTarget.open),
|
|
2378
|
-
children: [/* @__PURE__ */ (0,
|
|
2748
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("summary", {
|
|
2379
2749
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer select-none list-none hover:bg-sand-50 transition-colors rounded-md",
|
|
2380
2750
|
children: [
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2382
|
-
|
|
2751
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideChevronDown, { className: "size-3 text-sand-400 transition-transform group-open/tool:rotate-0 -rotate-90 shrink-0" }, void 0, false, {
|
|
2752
|
+
fileName: _jsxFileName,
|
|
2753
|
+
lineNumber: 540,
|
|
2754
|
+
columnNumber: 9
|
|
2755
|
+
}, this),
|
|
2756
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2383
2757
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-sand-100 text-sand-500 font-mono shrink-0",
|
|
2384
2758
|
children: ["call ", entry.callIndex + 1]
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2759
|
+
}, void 0, true, {
|
|
2760
|
+
fileName: _jsxFileName,
|
|
2761
|
+
lineNumber: 541,
|
|
2762
|
+
columnNumber: 9
|
|
2763
|
+
}, this),
|
|
2764
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2387
2765
|
className: "text-[13px] font-medium text-sand-800 font-mono truncate",
|
|
2388
2766
|
children: entry.toolName
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2767
|
+
}, void 0, false, {
|
|
2768
|
+
fileName: _jsxFileName,
|
|
2769
|
+
lineNumber: 544,
|
|
2770
|
+
columnNumber: 9
|
|
2771
|
+
}, this),
|
|
2772
|
+
hasError && /* @__PURE__ */ (void 0)("span", {
|
|
2391
2773
|
className: "text-[10px] px-1.5 py-0.5 rounded-full bg-red-100 text-red-600 font-medium uppercase shrink-0",
|
|
2392
2774
|
children: "error"
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2775
|
+
}, void 0, false, {
|
|
2776
|
+
fileName: _jsxFileName,
|
|
2777
|
+
lineNumber: 547,
|
|
2778
|
+
columnNumber: 22
|
|
2779
|
+
}, this),
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2395
2781
|
className: "ml-auto text-[11px] text-sand-400 tabular-nums shrink-0",
|
|
2396
2782
|
children: formatDurationMs(entry.durationMs)
|
|
2397
|
-
}
|
|
2783
|
+
}, void 0, false, {
|
|
2784
|
+
fileName: _jsxFileName,
|
|
2785
|
+
lineNumber: 550,
|
|
2786
|
+
columnNumber: 9
|
|
2787
|
+
}, this)
|
|
2398
2788
|
]
|
|
2399
|
-
}
|
|
2789
|
+
}, void 0, true, {
|
|
2790
|
+
fileName: _jsxFileName,
|
|
2791
|
+
lineNumber: 539,
|
|
2792
|
+
columnNumber: 7
|
|
2793
|
+
}, this), opened && /* @__PURE__ */ (void 0)("div", {
|
|
2400
2794
|
className: "mt-1 mx-1 mb-3 space-y-2",
|
|
2401
2795
|
children: [
|
|
2402
|
-
/* @__PURE__ */ (0
|
|
2796
|
+
/* @__PURE__ */ (void 0)("div", { children: [/* @__PURE__ */ (void 0)("span", {
|
|
2403
2797
|
className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2",
|
|
2404
2798
|
children: "Request"
|
|
2405
|
-
}
|
|
2799
|
+
}, void 0, false, {
|
|
2800
|
+
fileName: _jsxFileName,
|
|
2801
|
+
lineNumber: 556,
|
|
2802
|
+
columnNumber: 13
|
|
2803
|
+
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2406
2804
|
className: "mt-1 rounded-md bg-sand-50 p-3 overflow-auto",
|
|
2407
|
-
children: /* @__PURE__ */ (0
|
|
2408
|
-
|
|
2409
|
-
|
|
2805
|
+
children: /* @__PURE__ */ (void 0)(FormattedContent, { text: detail ? JSON.stringify(displayArgs) : "Loading..." }, void 0, false, {
|
|
2806
|
+
fileName: _jsxFileName,
|
|
2807
|
+
lineNumber: 560,
|
|
2808
|
+
columnNumber: 15
|
|
2809
|
+
}, this)
|
|
2810
|
+
}, void 0, false, {
|
|
2811
|
+
fileName: _jsxFileName,
|
|
2812
|
+
lineNumber: 559,
|
|
2813
|
+
columnNumber: 13
|
|
2814
|
+
}, this)] }, void 0, true, {
|
|
2815
|
+
fileName: _jsxFileName,
|
|
2816
|
+
lineNumber: 555,
|
|
2817
|
+
columnNumber: 11
|
|
2818
|
+
}, this),
|
|
2819
|
+
error && /* @__PURE__ */ (void 0)("div", { children: [/* @__PURE__ */ (void 0)("span", {
|
|
2410
2820
|
className: "text-[10px] uppercase tracking-wider text-red-500 font-medium px-2",
|
|
2411
2821
|
children: "Error"
|
|
2412
|
-
}
|
|
2822
|
+
}, void 0, false, {
|
|
2823
|
+
fileName: _jsxFileName,
|
|
2824
|
+
lineNumber: 564,
|
|
2825
|
+
columnNumber: 15
|
|
2826
|
+
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2413
2827
|
className: "mt-1 rounded-md bg-red-50 border border-red-100 p-3 overflow-auto",
|
|
2414
|
-
children: /* @__PURE__ */ (0
|
|
2415
|
-
|
|
2416
|
-
|
|
2828
|
+
children: /* @__PURE__ */ (void 0)(FormattedContent, { text: error }, void 0, false, {
|
|
2829
|
+
fileName: _jsxFileName,
|
|
2830
|
+
lineNumber: 568,
|
|
2831
|
+
columnNumber: 17
|
|
2832
|
+
}, this)
|
|
2833
|
+
}, void 0, false, {
|
|
2834
|
+
fileName: _jsxFileName,
|
|
2835
|
+
lineNumber: 567,
|
|
2836
|
+
columnNumber: 15
|
|
2837
|
+
}, this)] }, void 0, true, {
|
|
2838
|
+
fileName: _jsxFileName,
|
|
2839
|
+
lineNumber: 563,
|
|
2840
|
+
columnNumber: 21
|
|
2841
|
+
}, this),
|
|
2842
|
+
/* @__PURE__ */ (void 0)("div", { children: [/* @__PURE__ */ (void 0)("span", {
|
|
2417
2843
|
className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2",
|
|
2418
2844
|
children: "Response"
|
|
2419
|
-
}
|
|
2845
|
+
}, void 0, false, {
|
|
2846
|
+
fileName: _jsxFileName,
|
|
2847
|
+
lineNumber: 572,
|
|
2848
|
+
columnNumber: 13
|
|
2849
|
+
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2420
2850
|
className: "mt-1 rounded-md bg-sand-50 p-3 overflow-auto",
|
|
2421
|
-
children: /* @__PURE__ */ (0
|
|
2422
|
-
text: detail ?
|
|
2851
|
+
children: /* @__PURE__ */ (void 0)(FormattedContent, {
|
|
2852
|
+
text: detail ? responseText : "Loading...",
|
|
2423
2853
|
markdown: true
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2854
|
+
}, void 0, false, {
|
|
2855
|
+
fileName: _jsxFileName,
|
|
2856
|
+
lineNumber: 576,
|
|
2857
|
+
columnNumber: 15
|
|
2858
|
+
}, this)
|
|
2859
|
+
}, void 0, false, {
|
|
2860
|
+
fileName: _jsxFileName,
|
|
2861
|
+
lineNumber: 575,
|
|
2862
|
+
columnNumber: 13
|
|
2863
|
+
}, this)] }, void 0, true, {
|
|
2864
|
+
fileName: _jsxFileName,
|
|
2865
|
+
lineNumber: 571,
|
|
2866
|
+
columnNumber: 11
|
|
2867
|
+
}, this)
|
|
2426
2868
|
]
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2869
|
+
}, void 0, true, {
|
|
2870
|
+
fileName: _jsxFileName,
|
|
2871
|
+
lineNumber: 554,
|
|
2872
|
+
columnNumber: 18
|
|
2873
|
+
}, this)]
|
|
2874
|
+
}, void 0, true, {
|
|
2875
|
+
fileName: _jsxFileName,
|
|
2876
|
+
lineNumber: 538,
|
|
2877
|
+
columnNumber: 10
|
|
2878
|
+
}, this);
|
|
2429
2879
|
}
|
|
2430
2880
|
function ReasoningBlock({ stepId }) {
|
|
2431
2881
|
const [opened, setOpened] = (0, import_react.useState)(false);
|
|
2432
2882
|
const { data: detail } = RequestLogStepService.useRequestLogStep("A", stepId, { enabled: opened });
|
|
2433
2883
|
const reasoningText = detail?.reasoning_text ?? null;
|
|
2434
|
-
return /* @__PURE__ */ (0,
|
|
2884
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("details", {
|
|
2435
2885
|
className: "group/reason mt-3",
|
|
2436
2886
|
onToggle: (e) => setOpened(e.currentTarget.open),
|
|
2437
|
-
children: [/* @__PURE__ */ (0,
|
|
2887
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("summary", {
|
|
2438
2888
|
className: "flex items-center gap-2 cursor-pointer select-none list-none",
|
|
2439
|
-
children: [/* @__PURE__ */ (0,
|
|
2889
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideChevronDown, { className: "size-3 text-sand-400 transition-transform group-open/reason:rotate-0 -rotate-90 shrink-0" }, void 0, false, {
|
|
2890
|
+
fileName: _jsxFileName,
|
|
2891
|
+
lineNumber: 596,
|
|
2892
|
+
columnNumber: 9
|
|
2893
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2440
2894
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2441
2895
|
children: "Reasoning"
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2896
|
+
}, void 0, false, {
|
|
2897
|
+
fileName: _jsxFileName,
|
|
2898
|
+
lineNumber: 597,
|
|
2899
|
+
columnNumber: 9
|
|
2900
|
+
}, this)]
|
|
2901
|
+
}, void 0, true, {
|
|
2902
|
+
fileName: _jsxFileName,
|
|
2903
|
+
lineNumber: 595,
|
|
2904
|
+
columnNumber: 7
|
|
2905
|
+
}, this), opened && /* @__PURE__ */ (void 0)("div", {
|
|
2444
2906
|
className: "mt-2 rounded-md bg-white/70 border border-sand-100 p-3 overflow-auto",
|
|
2445
|
-
children: reasoningText ? /* @__PURE__ */ (0
|
|
2907
|
+
children: reasoningText ? /* @__PURE__ */ (void 0)(FormattedContent, {
|
|
2446
2908
|
text: reasoningText,
|
|
2447
2909
|
markdown: true
|
|
2448
|
-
}
|
|
2910
|
+
}, void 0, false, {
|
|
2911
|
+
fileName: _jsxFileName,
|
|
2912
|
+
lineNumber: 602,
|
|
2913
|
+
columnNumber: 28
|
|
2914
|
+
}, this) : !detail ? /* @__PURE__ */ (void 0)("p", {
|
|
2449
2915
|
className: "text-sm text-sand-400",
|
|
2450
2916
|
children: "Loading..."
|
|
2451
|
-
}
|
|
2917
|
+
}, void 0, false, {
|
|
2918
|
+
fileName: _jsxFileName,
|
|
2919
|
+
lineNumber: 602,
|
|
2920
|
+
columnNumber: 91
|
|
2921
|
+
}, this) : /* @__PURE__ */ (void 0)("p", {
|
|
2452
2922
|
className: "text-sm text-sand-400",
|
|
2453
2923
|
children: "No reasoning text captured."
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
|
|
2924
|
+
}, void 0, false, {
|
|
2925
|
+
fileName: _jsxFileName,
|
|
2926
|
+
lineNumber: 602,
|
|
2927
|
+
columnNumber: 145
|
|
2928
|
+
}, this)
|
|
2929
|
+
}, void 0, false, {
|
|
2930
|
+
fileName: _jsxFileName,
|
|
2931
|
+
lineNumber: 601,
|
|
2932
|
+
columnNumber: 18
|
|
2933
|
+
}, this)]
|
|
2934
|
+
}, void 0, true, {
|
|
2935
|
+
fileName: _jsxFileName,
|
|
2936
|
+
lineNumber: 594,
|
|
2937
|
+
columnNumber: 10
|
|
2938
|
+
}, this);
|
|
2457
2939
|
}
|
|
2458
2940
|
function StepTreeItem({ entry, tokensPerSecEnabled }) {
|
|
2459
2941
|
const generate = entry.generate;
|
|
2460
2942
|
const hasReasoning = generate !== null && generate.reasoningTokens !== null && generate.reasoningTokens !== void 0 && generate.reasoningTokens > 0;
|
|
2461
2943
|
const errorCount = entry.toolCalls.filter((toolCall) => toolCall.error).length;
|
|
2462
|
-
return /* @__PURE__ */ (0,
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("details", {
|
|
2463
2945
|
open: true,
|
|
2464
2946
|
className: "group/step border-l border-sand-200 pl-3",
|
|
2465
|
-
children: [/* @__PURE__ */ (0,
|
|
2947
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("summary", {
|
|
2466
2948
|
className: "flex items-center gap-2 py-2 cursor-pointer select-none list-none",
|
|
2467
2949
|
children: [
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
|
|
2950
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideChevronDown, { className: "size-3.5 text-sand-400 transition-transform group-open/step:rotate-0 -rotate-90 shrink-0" }, void 0, false, {
|
|
2951
|
+
fileName: _jsxFileName,
|
|
2952
|
+
lineNumber: 618,
|
|
2953
|
+
columnNumber: 9
|
|
2954
|
+
}, this),
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2470
2956
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-sienna-100 text-sienna-700 font-mono shrink-0",
|
|
2471
2957
|
children: ["step ", entry.stepIndex + 1]
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2958
|
+
}, void 0, true, {
|
|
2959
|
+
fileName: _jsxFileName,
|
|
2960
|
+
lineNumber: 619,
|
|
2961
|
+
columnNumber: 9
|
|
2962
|
+
}, this),
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2474
2964
|
className: "text-[13px] font-semibold text-sand-900",
|
|
2475
2965
|
children: "LLM call"
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2966
|
+
}, void 0, false, {
|
|
2967
|
+
fileName: _jsxFileName,
|
|
2968
|
+
lineNumber: 622,
|
|
2969
|
+
columnNumber: 9
|
|
2970
|
+
}, this),
|
|
2971
|
+
generate?.finishReason && /* @__PURE__ */ (void 0)("span", {
|
|
2478
2972
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-sand-100 text-sand-500 font-mono shrink-0",
|
|
2479
2973
|
children: generate.finishReason
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2974
|
+
}, void 0, false, {
|
|
2975
|
+
fileName: _jsxFileName,
|
|
2976
|
+
lineNumber: 623,
|
|
2977
|
+
columnNumber: 36
|
|
2978
|
+
}, this),
|
|
2979
|
+
generate && (generate.fallbackCount ?? 0) > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2482
2980
|
className: "text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase shrink-0",
|
|
2483
2981
|
children: [
|
|
2484
2982
|
generate.requestedModelName,
|
|
2485
2983
|
" → ",
|
|
2486
2984
|
generate.modelName
|
|
2487
2985
|
]
|
|
2488
|
-
}
|
|
2489
|
-
|
|
2986
|
+
}, void 0, true, {
|
|
2987
|
+
fileName: _jsxFileName,
|
|
2988
|
+
lineNumber: 626,
|
|
2989
|
+
columnNumber: 59
|
|
2990
|
+
}, this),
|
|
2991
|
+
hasReasoning && /* @__PURE__ */ (void 0)("span", {
|
|
2490
2992
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-blue-100 text-blue-600 font-medium shrink-0",
|
|
2491
2993
|
children: "reasoning"
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2994
|
+
}, void 0, false, {
|
|
2995
|
+
fileName: _jsxFileName,
|
|
2996
|
+
lineNumber: 629,
|
|
2997
|
+
columnNumber: 26
|
|
2998
|
+
}, this),
|
|
2999
|
+
errorCount > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2494
3000
|
className: "text-[10px] px-1.5 py-0.5 rounded-full bg-red-100 text-red-600 font-medium uppercase shrink-0",
|
|
2495
3001
|
children: [errorCount, " error"]
|
|
2496
|
-
}
|
|
2497
|
-
|
|
3002
|
+
}, void 0, true, {
|
|
3003
|
+
fileName: _jsxFileName,
|
|
3004
|
+
lineNumber: 632,
|
|
3005
|
+
columnNumber: 28
|
|
3006
|
+
}, this),
|
|
3007
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2498
3008
|
className: "ml-auto text-[11px] text-sand-400 tabular-nums shrink-0",
|
|
2499
3009
|
children: [entry.toolCalls.length, " tools"]
|
|
2500
|
-
}
|
|
3010
|
+
}, void 0, true, {
|
|
3011
|
+
fileName: _jsxFileName,
|
|
3012
|
+
lineNumber: 635,
|
|
3013
|
+
columnNumber: 9
|
|
3014
|
+
}, this)
|
|
2501
3015
|
]
|
|
2502
|
-
}
|
|
3016
|
+
}, void 0, true, {
|
|
3017
|
+
fileName: _jsxFileName,
|
|
3018
|
+
lineNumber: 617,
|
|
3019
|
+
columnNumber: 7
|
|
3020
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2503
3021
|
className: "ml-4 mb-4 space-y-3",
|
|
2504
|
-
children: [generate && /* @__PURE__ */ (0
|
|
3022
|
+
children: [generate && /* @__PURE__ */ (void 0)("div", {
|
|
2505
3023
|
className: "rounded-md border border-sand-100 bg-sand-50/70 p-3",
|
|
2506
|
-
children: [/* @__PURE__ */ (0
|
|
3024
|
+
children: [/* @__PURE__ */ (void 0)("div", {
|
|
2507
3025
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-8 gap-x-4 gap-y-3",
|
|
2508
3026
|
children: [
|
|
2509
|
-
/* @__PURE__ */ (0
|
|
3027
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2510
3028
|
label: "Duration",
|
|
2511
3029
|
value: formatDurationMs(generate.durationMs)
|
|
2512
|
-
}
|
|
2513
|
-
|
|
3030
|
+
}, void 0, false, {
|
|
3031
|
+
fileName: _jsxFileName,
|
|
3032
|
+
lineNumber: 643,
|
|
3033
|
+
columnNumber: 15
|
|
3034
|
+
}, this),
|
|
3035
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2514
3036
|
label: "TTFT",
|
|
2515
3037
|
value: formatRunTtftMs(generate.ttftMs)
|
|
2516
|
-
}
|
|
2517
|
-
|
|
3038
|
+
}, void 0, false, {
|
|
3039
|
+
fileName: _jsxFileName,
|
|
3040
|
+
lineNumber: 644,
|
|
3041
|
+
columnNumber: 15
|
|
3042
|
+
}, this),
|
|
3043
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2518
3044
|
label: "Tokens/sec",
|
|
2519
3045
|
value: formatTokensPerSec(generate.outputTokens, generate.durationMs, generate.ttftMs, tokensPerSecEnabled)
|
|
2520
|
-
}
|
|
2521
|
-
|
|
3046
|
+
}, void 0, false, {
|
|
3047
|
+
fileName: _jsxFileName,
|
|
3048
|
+
lineNumber: 645,
|
|
3049
|
+
columnNumber: 15
|
|
3050
|
+
}, this),
|
|
3051
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2522
3052
|
label: "Input",
|
|
2523
3053
|
value: formatNum(generate.inputTokens ?? 0)
|
|
2524
|
-
}
|
|
2525
|
-
|
|
3054
|
+
}, void 0, false, {
|
|
3055
|
+
fileName: _jsxFileName,
|
|
3056
|
+
lineNumber: 646,
|
|
3057
|
+
columnNumber: 15
|
|
3058
|
+
}, this),
|
|
3059
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2526
3060
|
label: "Output",
|
|
2527
3061
|
value: formatNum(generate.outputTokens ?? 0)
|
|
2528
|
-
}
|
|
2529
|
-
|
|
3062
|
+
}, void 0, false, {
|
|
3063
|
+
fileName: _jsxFileName,
|
|
3064
|
+
lineNumber: 647,
|
|
3065
|
+
columnNumber: 15
|
|
3066
|
+
}, this),
|
|
3067
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2530
3068
|
label: "Cache Read",
|
|
2531
3069
|
value: formatNum(generate.cacheReadTokens ?? 0)
|
|
2532
|
-
}
|
|
2533
|
-
|
|
3070
|
+
}, void 0, false, {
|
|
3071
|
+
fileName: _jsxFileName,
|
|
3072
|
+
lineNumber: 648,
|
|
3073
|
+
columnNumber: 15
|
|
3074
|
+
}, this),
|
|
3075
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2534
3076
|
label: "Cache Write",
|
|
2535
3077
|
value: formatNum(generate.cacheCreationTokens ?? 0)
|
|
2536
|
-
}
|
|
2537
|
-
|
|
3078
|
+
}, void 0, false, {
|
|
3079
|
+
fileName: _jsxFileName,
|
|
3080
|
+
lineNumber: 649,
|
|
3081
|
+
columnNumber: 15
|
|
3082
|
+
}, this),
|
|
3083
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2538
3084
|
label: "Cache 5m / 1h",
|
|
2539
3085
|
value: `${generate.cacheCreation5mTokens === null ? "—" : formatNum(generate.cacheCreation5mTokens)} / ${generate.cacheCreation1hTokens === null ? "—" : formatNum(generate.cacheCreation1hTokens)}`
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
|
|
3086
|
+
}, void 0, false, {
|
|
3087
|
+
fileName: _jsxFileName,
|
|
3088
|
+
lineNumber: 650,
|
|
3089
|
+
columnNumber: 15
|
|
3090
|
+
}, this),
|
|
3091
|
+
/* @__PURE__ */ (void 0)(CompactMetric, { value: generate.costUsd === null ? "—" : formatMicroUsd(generate.costUsd) }, void 0, false, {
|
|
3092
|
+
fileName: _jsxFileName,
|
|
3093
|
+
lineNumber: 651,
|
|
3094
|
+
columnNumber: 15
|
|
3095
|
+
}, this),
|
|
3096
|
+
/* @__PURE__ */ (void 0)(CompactMetric, {
|
|
2543
3097
|
label: "Reasoning",
|
|
2544
3098
|
value: generate.reasoningTokens !== null && generate.reasoningTokens !== void 0 ? formatNum(generate.reasoningTokens) : "—"
|
|
2545
|
-
}
|
|
3099
|
+
}, void 0, false, {
|
|
3100
|
+
fileName: _jsxFileName,
|
|
3101
|
+
lineNumber: 652,
|
|
3102
|
+
columnNumber: 15
|
|
3103
|
+
}, this)
|
|
2546
3104
|
]
|
|
2547
|
-
}
|
|
2548
|
-
|
|
3105
|
+
}, void 0, true, {
|
|
3106
|
+
fileName: _jsxFileName,
|
|
3107
|
+
lineNumber: 642,
|
|
3108
|
+
columnNumber: 13
|
|
3109
|
+
}, this), hasReasoning && /* @__PURE__ */ (void 0)(ReasoningBlock, { stepId: generate.id }, void 0, false, {
|
|
3110
|
+
fileName: _jsxFileName,
|
|
3111
|
+
lineNumber: 655,
|
|
3112
|
+
columnNumber: 30
|
|
3113
|
+
}, this)]
|
|
3114
|
+
}, void 0, true, {
|
|
3115
|
+
fileName: _jsxFileName,
|
|
3116
|
+
lineNumber: 641,
|
|
3117
|
+
columnNumber: 22
|
|
3118
|
+
}, this), entry.toolCalls.length > 0 && /* @__PURE__ */ (void 0)("div", {
|
|
2549
3119
|
className: "space-y-0.5",
|
|
2550
|
-
children: entry.toolCalls.map((toolCall) => /* @__PURE__ */ (0
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
3120
|
+
children: entry.toolCalls.map((toolCall) => /* @__PURE__ */ (void 0)(ToolCallItem, { entry: toolCall }, `${toolCall.stepIndex}-${toolCall.callIndex}-${toolCall.toolCallId}`, false, {
|
|
3121
|
+
fileName: _jsxFileName,
|
|
3122
|
+
lineNumber: 659,
|
|
3123
|
+
columnNumber: 46
|
|
3124
|
+
}, this))
|
|
3125
|
+
}, void 0, false, {
|
|
3126
|
+
fileName: _jsxFileName,
|
|
3127
|
+
lineNumber: 658,
|
|
3128
|
+
columnNumber: 40
|
|
3129
|
+
}, this)]
|
|
3130
|
+
}, void 0, true, {
|
|
3131
|
+
fileName: _jsxFileName,
|
|
3132
|
+
lineNumber: 640,
|
|
3133
|
+
columnNumber: 7
|
|
3134
|
+
}, this)]
|
|
3135
|
+
}, void 0, true, {
|
|
3136
|
+
fileName: _jsxFileName,
|
|
3137
|
+
lineNumber: 616,
|
|
3138
|
+
columnNumber: 10
|
|
3139
|
+
}, this);
|
|
2554
3140
|
}
|
|
2555
3141
|
function StepTreeSection({ steps, tokensPerSecEnabled }) {
|
|
2556
3142
|
const toolCallCount = steps.reduce((sum, step) => sum + step.toolCalls.length, 0);
|
|
2557
|
-
return /* @__PURE__ */ (0,
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2558
3144
|
title: `Steps (${steps.length} steps · ${toolCallCount} tool calls)`,
|
|
2559
3145
|
defaultOpen: true,
|
|
2560
|
-
children: /* @__PURE__ */ (0,
|
|
3146
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2561
3147
|
className: "space-y-1",
|
|
2562
|
-
children: steps.map((step) => /* @__PURE__ */ (0,
|
|
3148
|
+
children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(StepTreeItem, {
|
|
2563
3149
|
entry: step,
|
|
2564
3150
|
tokensPerSecEnabled
|
|
2565
|
-
}, step.stepIndex
|
|
2566
|
-
|
|
2567
|
-
|
|
3151
|
+
}, step.stepIndex, false, {
|
|
3152
|
+
fileName: _jsxFileName,
|
|
3153
|
+
lineNumber: 674,
|
|
3154
|
+
columnNumber: 28
|
|
3155
|
+
}, this))
|
|
3156
|
+
}, void 0, false, {
|
|
3157
|
+
fileName: _jsxFileName,
|
|
3158
|
+
lineNumber: 673,
|
|
3159
|
+
columnNumber: 7
|
|
3160
|
+
}, this)
|
|
3161
|
+
}, void 0, false, {
|
|
3162
|
+
fileName: _jsxFileName,
|
|
3163
|
+
lineNumber: 672,
|
|
3164
|
+
columnNumber: 10
|
|
3165
|
+
}, this);
|
|
2568
3166
|
}
|
|
2569
3167
|
function buildStepTree(steps) {
|
|
2570
3168
|
const grouped = /* @__PURE__ */ new Map();
|
|
@@ -2627,40 +3225,83 @@ function historyItemLabel(item) {
|
|
|
2627
3225
|
if (item.type === "function_call_output") return `fn result`;
|
|
2628
3226
|
return item.role ?? item.type;
|
|
2629
3227
|
}
|
|
3228
|
+
var HistoryTextPart = looseObject({ text: string() });
|
|
3229
|
+
var HistoryContent = union([
|
|
3230
|
+
string(),
|
|
3231
|
+
array(union([HistoryTextPart, JsonValue])),
|
|
3232
|
+
JsonValue
|
|
3233
|
+
]);
|
|
2630
3234
|
function extractText(content) {
|
|
2631
|
-
|
|
2632
|
-
if (
|
|
2633
|
-
|
|
2634
|
-
|
|
3235
|
+
const text = string().safeParse(content);
|
|
3236
|
+
if (text.success) return text.data;
|
|
3237
|
+
const parts = array(union([HistoryTextPart, JsonValue])).safeParse(content);
|
|
3238
|
+
if (parts.success) return parts.data.map((part) => {
|
|
3239
|
+
const textPart = HistoryTextPart.safeParse(part);
|
|
3240
|
+
return textPart.success ? textPart.data.text : JSON.stringify(part);
|
|
2635
3241
|
}).join("\n");
|
|
2636
3242
|
return JSON.stringify(content);
|
|
2637
3243
|
}
|
|
2638
3244
|
function MonoPre({ className, children }) {
|
|
2639
|
-
return /* @__PURE__ */ (0,
|
|
3245
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
2640
3246
|
className: `text-[12px] text-sand-700 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed max-h-40 overflow-auto ${className ?? ""}`,
|
|
2641
3247
|
children
|
|
2642
|
-
}
|
|
3248
|
+
}, void 0, false, {
|
|
3249
|
+
fileName: _jsxFileName,
|
|
3250
|
+
lineNumber: 774,
|
|
3251
|
+
columnNumber: 10
|
|
3252
|
+
}, this);
|
|
2643
3253
|
}
|
|
2644
3254
|
function HistorySection({ history }) {
|
|
2645
|
-
return /* @__PURE__ */ (0,
|
|
3255
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2646
3256
|
title: "History",
|
|
2647
3257
|
defaultOpen: false,
|
|
2648
|
-
children: /* @__PURE__ */ (0,
|
|
3258
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2649
3259
|
className: "space-y-1.5",
|
|
2650
|
-
children: history.map((item, i) =>
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
3260
|
+
children: history.map((item, i) => {
|
|
3261
|
+
const content = HistoryContent.safeParse(item.content);
|
|
3262
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
3263
|
+
className: `rounded-md px-3 py-2 ${historyItemBg(item)}`,
|
|
3264
|
+
children: [
|
|
3265
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
3266
|
+
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium mb-1",
|
|
3267
|
+
children: historyItemLabel(item)
|
|
3268
|
+
}, void 0, false, {
|
|
3269
|
+
fileName: _jsxFileName,
|
|
3270
|
+
lineNumber: 788,
|
|
3271
|
+
columnNumber: 15
|
|
3272
|
+
}, this),
|
|
3273
|
+
item.content !== null && item.content !== void 0 && /* @__PURE__ */ (void 0)(MonoPre, { children: content.success ? extractText(content.data) : JSON.stringify(item.content) }, void 0, false, {
|
|
3274
|
+
fileName: _jsxFileName,
|
|
3275
|
+
lineNumber: 791,
|
|
3276
|
+
columnNumber: 71
|
|
3277
|
+
}, this),
|
|
3278
|
+
item.arguments && /* @__PURE__ */ (void 0)(MonoPre, { children: item.arguments }, void 0, false, {
|
|
3279
|
+
fileName: _jsxFileName,
|
|
3280
|
+
lineNumber: 794,
|
|
3281
|
+
columnNumber: 34
|
|
3282
|
+
}, this),
|
|
3283
|
+
item.output && /* @__PURE__ */ (void 0)(MonoPre, { children: item.output }, void 0, false, {
|
|
3284
|
+
fileName: _jsxFileName,
|
|
3285
|
+
lineNumber: 795,
|
|
3286
|
+
columnNumber: 31
|
|
3287
|
+
}, this)
|
|
3288
|
+
]
|
|
3289
|
+
}, `hist-${i}`, true, {
|
|
3290
|
+
fileName: _jsxFileName,
|
|
3291
|
+
lineNumber: 787,
|
|
3292
|
+
columnNumber: 16
|
|
3293
|
+
}, this);
|
|
3294
|
+
})
|
|
3295
|
+
}, void 0, false, {
|
|
3296
|
+
fileName: _jsxFileName,
|
|
3297
|
+
lineNumber: 784,
|
|
3298
|
+
columnNumber: 7
|
|
3299
|
+
}, this)
|
|
3300
|
+
}, void 0, false, {
|
|
3301
|
+
fileName: _jsxFileName,
|
|
3302
|
+
lineNumber: 783,
|
|
3303
|
+
columnNumber: 10
|
|
3304
|
+
}, this);
|
|
2664
3305
|
}
|
|
2665
3306
|
var TOOL_NAME_PREVIEW_CHARACTERS = 60;
|
|
2666
3307
|
var TOOL_NAME_COMPACT_PREVIEW_CHARACTERS = 30;
|
|
@@ -2680,81 +3321,145 @@ function ToolsHeaderMetadata({ tools }) {
|
|
|
2680
3321
|
const wide = toolNamePreview(tools);
|
|
2681
3322
|
const compact = toolNamePreview(tools, TOOL_NAME_COMPACT_PREVIEW_CHARACTERS);
|
|
2682
3323
|
const mobile = toolNamePreview(tools, TOOL_NAME_MOBILE_PREVIEW_CHARACTERS);
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
-
/* @__PURE__ */ (0,
|
|
3324
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(import_jsx_dev_runtime.Fragment, { children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2685
3326
|
className: "shrink-0",
|
|
2686
3327
|
children: "·"
|
|
2687
|
-
}
|
|
2688
|
-
|
|
3328
|
+
}, void 0, false, {
|
|
3329
|
+
fileName: _jsxFileName,
|
|
3330
|
+
lineNumber: 829,
|
|
3331
|
+
columnNumber: 7
|
|
3332
|
+
}, this),
|
|
3333
|
+
wide.names.length > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2689
3334
|
className: "hidden shrink-0 xl:inline",
|
|
2690
3335
|
children: wide.names.join(", ")
|
|
2691
|
-
}
|
|
2692
|
-
|
|
3336
|
+
}, void 0, false, {
|
|
3337
|
+
fileName: _jsxFileName,
|
|
3338
|
+
lineNumber: 830,
|
|
3339
|
+
columnNumber: 33
|
|
3340
|
+
}, this),
|
|
3341
|
+
wide.omittedCount > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2693
3342
|
className: "hidden shrink-0 xl:inline",
|
|
2694
3343
|
children: ["+", wide.omittedCount]
|
|
2695
|
-
}
|
|
2696
|
-
|
|
3344
|
+
}, void 0, true, {
|
|
3345
|
+
fileName: _jsxFileName,
|
|
3346
|
+
lineNumber: 831,
|
|
3347
|
+
columnNumber: 33
|
|
3348
|
+
}, this),
|
|
3349
|
+
compact.names.length > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2697
3350
|
className: "hidden shrink-0 sm:inline xl:hidden",
|
|
2698
3351
|
children: compact.names.join(", ")
|
|
2699
|
-
}
|
|
2700
|
-
|
|
3352
|
+
}, void 0, false, {
|
|
3353
|
+
fileName: _jsxFileName,
|
|
3354
|
+
lineNumber: 832,
|
|
3355
|
+
columnNumber: 36
|
|
3356
|
+
}, this),
|
|
3357
|
+
compact.omittedCount > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2701
3358
|
className: "hidden shrink-0 sm:inline xl:hidden",
|
|
2702
3359
|
children: ["+", compact.omittedCount]
|
|
2703
|
-
}
|
|
2704
|
-
|
|
3360
|
+
}, void 0, true, {
|
|
3361
|
+
fileName: _jsxFileName,
|
|
3362
|
+
lineNumber: 833,
|
|
3363
|
+
columnNumber: 36
|
|
3364
|
+
}, this),
|
|
3365
|
+
mobile.names.length > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2705
3366
|
className: "shrink-0 sm:hidden",
|
|
2706
3367
|
children: mobile.names.join(", ")
|
|
2707
|
-
}
|
|
2708
|
-
|
|
3368
|
+
}, void 0, false, {
|
|
3369
|
+
fileName: _jsxFileName,
|
|
3370
|
+
lineNumber: 834,
|
|
3371
|
+
columnNumber: 35
|
|
3372
|
+
}, this),
|
|
3373
|
+
mobile.omittedCount > 0 && /* @__PURE__ */ (void 0)("span", {
|
|
2709
3374
|
className: "shrink-0 sm:hidden",
|
|
2710
3375
|
children: ["+", mobile.omittedCount]
|
|
2711
|
-
}
|
|
2712
|
-
|
|
3376
|
+
}, void 0, true, {
|
|
3377
|
+
fileName: _jsxFileName,
|
|
3378
|
+
lineNumber: 835,
|
|
3379
|
+
columnNumber: 35
|
|
3380
|
+
}, this)
|
|
3381
|
+
] }, void 0, true);
|
|
2713
3382
|
}
|
|
2714
3383
|
function ToolInputZod({ code, fullCode }) {
|
|
2715
3384
|
const highlighted = (0, import_react.useMemo)(() => highlightTypeText(code), [code]);
|
|
2716
|
-
return /* @__PURE__ */ (0,
|
|
2717
|
-
"data-zod-parameter-
|
|
3385
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
3386
|
+
"data-zod-parameter-schema": true,
|
|
2718
3387
|
className: `max-h-64 overflow-auto rounded-md bg-sand-900 px-3 py-2.5 font-mono text-[11px] leading-relaxed whitespace-pre text-sand-200 ${fullCode ? "cursor-help outline-none focus-visible:ring-2 focus-visible:ring-sienna-300" : ""}`,
|
|
2719
3388
|
tabIndex: fullCode ? 0 : void 0,
|
|
2720
3389
|
title: fullCode,
|
|
2721
|
-
children: fullCode ? /* @__PURE__ */ (0,
|
|
3390
|
+
children: fullCode ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(import_jsx_dev_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2722
3391
|
"aria-hidden": "true",
|
|
2723
3392
|
children: highlighted
|
|
2724
|
-
}
|
|
3393
|
+
}, void 0, false, {
|
|
3394
|
+
fileName: _jsxFileName,
|
|
3395
|
+
lineNumber: 848,
|
|
3396
|
+
columnNumber: 11
|
|
3397
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2725
3398
|
className: "sr-only",
|
|
2726
3399
|
children: fullCode
|
|
2727
|
-
}
|
|
2728
|
-
|
|
3400
|
+
}, void 0, false, {
|
|
3401
|
+
fileName: _jsxFileName,
|
|
3402
|
+
lineNumber: 849,
|
|
3403
|
+
columnNumber: 11
|
|
3404
|
+
}, this)] }, void 0, true) : highlighted
|
|
3405
|
+
}, void 0, false, {
|
|
3406
|
+
fileName: _jsxFileName,
|
|
3407
|
+
lineNumber: 846,
|
|
3408
|
+
columnNumber: 10
|
|
3409
|
+
}, this);
|
|
2729
3410
|
}
|
|
2730
3411
|
function ToolCard({ tool }) {
|
|
2731
|
-
return /* @__PURE__ */ (0,
|
|
3412
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2732
3413
|
className: "min-w-0 rounded-md border border-sand-100 bg-sand-50/70 p-3",
|
|
2733
3414
|
children: [
|
|
2734
|
-
/* @__PURE__ */ (0,
|
|
3415
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2735
3416
|
className: "break-all font-mono text-[13px] font-semibold text-sand-900",
|
|
2736
3417
|
children: tool.name
|
|
2737
|
-
}
|
|
2738
|
-
|
|
3418
|
+
}, void 0, false, {
|
|
3419
|
+
fileName: _jsxFileName,
|
|
3420
|
+
lineNumber: 859,
|
|
3421
|
+
columnNumber: 7
|
|
3422
|
+
}, this),
|
|
3423
|
+
tool.description && /* @__PURE__ */ (void 0)("p", {
|
|
2739
3424
|
className: "mt-2 text-[12px] leading-relaxed text-sand-700",
|
|
2740
3425
|
children: tool.description
|
|
2741
|
-
}
|
|
2742
|
-
|
|
3426
|
+
}, void 0, false, {
|
|
3427
|
+
fileName: _jsxFileName,
|
|
3428
|
+
lineNumber: 860,
|
|
3429
|
+
columnNumber: 28
|
|
3430
|
+
}, this),
|
|
3431
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2743
3432
|
className: "mt-3",
|
|
2744
|
-
children: [/* @__PURE__ */ (0,
|
|
3433
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2745
3434
|
className: "mb-1.5 text-[10px] font-medium uppercase tracking-wider text-sand-400",
|
|
2746
3435
|
children: [
|
|
2747
3436
|
"Parameters (",
|
|
2748
3437
|
tool.parameterCount,
|
|
2749
3438
|
")"
|
|
2750
3439
|
]
|
|
2751
|
-
}
|
|
3440
|
+
}, void 0, true, {
|
|
3441
|
+
fileName: _jsxFileName,
|
|
3442
|
+
lineNumber: 862,
|
|
3443
|
+
columnNumber: 9
|
|
3444
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ToolInputZod, {
|
|
2752
3445
|
code: tool.inputZod,
|
|
2753
3446
|
fullCode: tool.fullInputZod
|
|
2754
|
-
}
|
|
2755
|
-
|
|
3447
|
+
}, void 0, false, {
|
|
3448
|
+
fileName: _jsxFileName,
|
|
3449
|
+
lineNumber: 865,
|
|
3450
|
+
columnNumber: 9
|
|
3451
|
+
}, this)]
|
|
3452
|
+
}, void 0, true, {
|
|
3453
|
+
fileName: _jsxFileName,
|
|
3454
|
+
lineNumber: 861,
|
|
3455
|
+
columnNumber: 7
|
|
3456
|
+
}, this)
|
|
2756
3457
|
]
|
|
2757
|
-
}
|
|
3458
|
+
}, void 0, true, {
|
|
3459
|
+
fileName: _jsxFileName,
|
|
3460
|
+
lineNumber: 858,
|
|
3461
|
+
columnNumber: 10
|
|
3462
|
+
}, this);
|
|
2758
3463
|
}
|
|
2759
3464
|
function ToolsPanel({ id, tools }) {
|
|
2760
3465
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
@@ -2766,22 +3471,46 @@ function ToolsPanel({ id, tools }) {
|
|
|
2766
3471
|
refetchOnReconnect: false
|
|
2767
3472
|
});
|
|
2768
3473
|
const hasView = query.data !== void 0 && query.data.length > 0;
|
|
2769
|
-
return /* @__PURE__ */ (0,
|
|
3474
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2770
3475
|
title: `Tools (${tools.length})`,
|
|
2771
3476
|
defaultOpen: false,
|
|
2772
|
-
headerMetadata: /* @__PURE__ */ (0,
|
|
3477
|
+
headerMetadata: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ToolsHeaderMetadata, { tools }, void 0, false, {
|
|
3478
|
+
fileName: _jsxFileName,
|
|
3479
|
+
lineNumber: 885,
|
|
3480
|
+
columnNumber: 89
|
|
3481
|
+
}, this),
|
|
2773
3482
|
onOpenChange: setOpen,
|
|
2774
|
-
children: query.isFetching && !hasView ? /* @__PURE__ */ (0,
|
|
3483
|
+
children: query.isFetching && !hasView ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2775
3484
|
className: "text-[12px] text-sand-400",
|
|
2776
3485
|
children: "Loading tool contracts…"
|
|
2777
|
-
}
|
|
3486
|
+
}, void 0, false, {
|
|
3487
|
+
fileName: _jsxFileName,
|
|
3488
|
+
lineNumber: 886,
|
|
3489
|
+
columnNumber: 39
|
|
3490
|
+
}, this) : query.isError || !hasView ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2778
3491
|
className: "text-[12px] text-sand-400",
|
|
2779
3492
|
children: "Tool contracts could not be loaded."
|
|
2780
|
-
}
|
|
3493
|
+
}, void 0, false, {
|
|
3494
|
+
fileName: _jsxFileName,
|
|
3495
|
+
lineNumber: 886,
|
|
3496
|
+
columnNumber: 138
|
|
3497
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2781
3498
|
className: "space-y-2",
|
|
2782
|
-
children: query.data.map((tool, index) => /* @__PURE__ */ (0,
|
|
2783
|
-
|
|
2784
|
-
|
|
3499
|
+
children: query.data.map((tool, index) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ToolCard, { tool }, `${tool.name}-${index}`, false, {
|
|
3500
|
+
fileName: _jsxFileName,
|
|
3501
|
+
lineNumber: 887,
|
|
3502
|
+
columnNumber: 44
|
|
3503
|
+
}, this))
|
|
3504
|
+
}, void 0, false, {
|
|
3505
|
+
fileName: _jsxFileName,
|
|
3506
|
+
lineNumber: 886,
|
|
3507
|
+
columnNumber: 221
|
|
3508
|
+
}, this)
|
|
3509
|
+
}, void 0, false, {
|
|
3510
|
+
fileName: _jsxFileName,
|
|
3511
|
+
lineNumber: 885,
|
|
3512
|
+
columnNumber: 10
|
|
3513
|
+
}, this);
|
|
2785
3514
|
}
|
|
2786
3515
|
var TYPE_TOKEN_RE = /("(?:[^"\\]|\\.)*")|(\b\d+(?:\.\d+)?\b)|(\btype\b|\bz\b(?=\.))|(\b(?:string|number|boolean|null|unknown|Record)\b)|([{}[\]()<>|?:,.=])|([A-Za-z_$][\w$]*)|(\s+|.)/g;
|
|
2787
3516
|
function highlightTypeText(text) {
|
|
@@ -2790,30 +3519,50 @@ function highlightTypeText(text) {
|
|
|
2790
3519
|
for (const match of text.matchAll(TYPE_TOKEN_RE)) {
|
|
2791
3520
|
const [token, str, num, kw, builtin, punct, ident] = match;
|
|
2792
3521
|
const key = `${match.index}-${token}`;
|
|
2793
|
-
if (str || num) nodes.push(/* @__PURE__ */ (0,
|
|
3522
|
+
if (str || num) nodes.push(/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2794
3523
|
className: "text-sage-400",
|
|
2795
3524
|
children: token
|
|
2796
|
-
}, key
|
|
3525
|
+
}, key, false, {
|
|
3526
|
+
fileName: _jsxFileName,
|
|
3527
|
+
lineNumber: 902,
|
|
3528
|
+
columnNumber: 18
|
|
3529
|
+
}, this));
|
|
2797
3530
|
else if (kw) {
|
|
2798
3531
|
afterTypeKeyword = token === "type";
|
|
2799
|
-
nodes.push(/* @__PURE__ */ (0,
|
|
3532
|
+
nodes.push(/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2800
3533
|
className: "text-sienna-400",
|
|
2801
3534
|
children: token
|
|
2802
|
-
}, key
|
|
2803
|
-
|
|
3535
|
+
}, key, false, {
|
|
3536
|
+
fileName: _jsxFileName,
|
|
3537
|
+
lineNumber: 908,
|
|
3538
|
+
columnNumber: 18
|
|
3539
|
+
}, this));
|
|
3540
|
+
} else if (builtin) nodes.push(/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2804
3541
|
className: "text-blue-300",
|
|
2805
3542
|
children: token
|
|
2806
|
-
}, key
|
|
2807
|
-
|
|
3543
|
+
}, key, false, {
|
|
3544
|
+
fileName: _jsxFileName,
|
|
3545
|
+
lineNumber: 912,
|
|
3546
|
+
columnNumber: 18
|
|
3547
|
+
}, this));
|
|
3548
|
+
else if (punct) nodes.push(/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2808
3549
|
className: "text-sand-500",
|
|
2809
3550
|
children: token
|
|
2810
|
-
}, key
|
|
3551
|
+
}, key, false, {
|
|
3552
|
+
fileName: _jsxFileName,
|
|
3553
|
+
lineNumber: 916,
|
|
3554
|
+
columnNumber: 18
|
|
3555
|
+
}, this));
|
|
2811
3556
|
else if (ident && afterTypeKeyword) {
|
|
2812
3557
|
afterTypeKeyword = false;
|
|
2813
|
-
nodes.push(/* @__PURE__ */ (0,
|
|
3558
|
+
nodes.push(/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2814
3559
|
className: "font-semibold text-sand-50",
|
|
2815
3560
|
children: token
|
|
2816
|
-
}, key
|
|
3561
|
+
}, key, false, {
|
|
3562
|
+
fileName: _jsxFileName,
|
|
3563
|
+
lineNumber: 922,
|
|
3564
|
+
columnNumber: 18
|
|
3565
|
+
}, this));
|
|
2817
3566
|
} else nodes.push(token);
|
|
2818
3567
|
}
|
|
2819
3568
|
return nodes;
|
|
@@ -2825,14 +3574,18 @@ function ResponseTypePanel({ id }) {
|
|
|
2825
3574
|
const code = mode === "zod" ? zod ?? typescript : typescript ?? zod;
|
|
2826
3575
|
const highlighted = (0, import_react.useMemo)(() => code === null ? null : highlightTypeText(code), [code]);
|
|
2827
3576
|
if (!data || code === null || highlighted === null) return null;
|
|
2828
|
-
return /* @__PURE__ */ (0,
|
|
3577
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2829
3578
|
className: "panel overflow-hidden",
|
|
2830
|
-
children: [/* @__PURE__ */ (0,
|
|
3579
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2831
3580
|
className: "panel-header flex items-center px-4 py-2",
|
|
2832
|
-
children: [/* @__PURE__ */ (0,
|
|
3581
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2833
3582
|
className: "text-[11px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2834
3583
|
children: "Response Type"
|
|
2835
|
-
}
|
|
3584
|
+
}, void 0, false, {
|
|
3585
|
+
fileName: _jsxFileName,
|
|
3586
|
+
lineNumber: 954,
|
|
3587
|
+
columnNumber: 9
|
|
3588
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2836
3589
|
className: "ml-auto flex gap-1",
|
|
2837
3590
|
children: [{
|
|
2838
3591
|
value: "zod",
|
|
@@ -2842,25 +3595,53 @@ function ResponseTypePanel({ id }) {
|
|
|
2842
3595
|
value: "ts",
|
|
2843
3596
|
label: "ts",
|
|
2844
3597
|
available: typescript !== null
|
|
2845
|
-
}].map((option) => /* @__PURE__ */ (0,
|
|
3598
|
+
}].map((option) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", {
|
|
2846
3599
|
type: "button",
|
|
2847
3600
|
disabled: !option.available,
|
|
2848
3601
|
className: `px-3 py-1 text-[12px] font-mono rounded-md transition-colors ${mode === option.value ? "bg-sand-200 text-sand-700" : "text-sand-400 hover:text-sand-600 disabled:text-sand-300 disabled:cursor-not-allowed"}`,
|
|
2849
3602
|
onClick: () => setMode(option.value),
|
|
2850
3603
|
children: option.label
|
|
2851
|
-
}, option.value
|
|
2852
|
-
|
|
2853
|
-
|
|
3604
|
+
}, option.value, false, {
|
|
3605
|
+
fileName: _jsxFileName,
|
|
3606
|
+
lineNumber: 966,
|
|
3607
|
+
columnNumber: 36
|
|
3608
|
+
}, this))
|
|
3609
|
+
}, void 0, false, {
|
|
3610
|
+
fileName: _jsxFileName,
|
|
3611
|
+
lineNumber: 957,
|
|
3612
|
+
columnNumber: 9
|
|
3613
|
+
}, this)]
|
|
3614
|
+
}, void 0, true, {
|
|
3615
|
+
fileName: _jsxFileName,
|
|
3616
|
+
lineNumber: 953,
|
|
3617
|
+
columnNumber: 7
|
|
3618
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2854
3619
|
className: "relative",
|
|
2855
|
-
children: [/* @__PURE__ */ (0,
|
|
3620
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(CopyButton, {
|
|
2856
3621
|
text: code,
|
|
2857
3622
|
dark: true
|
|
2858
|
-
}
|
|
3623
|
+
}, void 0, false, {
|
|
3624
|
+
fileName: _jsxFileName,
|
|
3625
|
+
lineNumber: 972,
|
|
3626
|
+
columnNumber: 9
|
|
3627
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("pre", {
|
|
2859
3628
|
className: "bg-sand-900 px-4 py-3 text-[12px] text-sand-200 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed max-h-64 overflow-auto",
|
|
2860
3629
|
children: highlighted
|
|
2861
|
-
}
|
|
2862
|
-
|
|
2863
|
-
|
|
3630
|
+
}, void 0, false, {
|
|
3631
|
+
fileName: _jsxFileName,
|
|
3632
|
+
lineNumber: 974,
|
|
3633
|
+
columnNumber: 9
|
|
3634
|
+
}, this)]
|
|
3635
|
+
}, void 0, true, {
|
|
3636
|
+
fileName: _jsxFileName,
|
|
3637
|
+
lineNumber: 971,
|
|
3638
|
+
columnNumber: 7
|
|
3639
|
+
}, this)]
|
|
3640
|
+
}, void 0, true, {
|
|
3641
|
+
fileName: _jsxFileName,
|
|
3642
|
+
lineNumber: 952,
|
|
3643
|
+
columnNumber: 10
|
|
3644
|
+
}, this);
|
|
2864
3645
|
}
|
|
2865
3646
|
function RequestDetail({ id }) {
|
|
2866
3647
|
const { data, isLoading, error, isError } = RequestLogService.useRequestLog("A", id);
|
|
@@ -2871,26 +3652,58 @@ function RequestDetail({ id }) {
|
|
|
2871
3652
|
orderBy: "id-asc"
|
|
2872
3653
|
});
|
|
2873
3654
|
const stepTree = buildStepTree(stepsData?.rows ?? []);
|
|
2874
|
-
if (isLoading || isStepsLoading) return /* @__PURE__ */ (0,
|
|
3655
|
+
if (isLoading || isStepsLoading) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2875
3656
|
className: "max-w-6xl mx-auto space-y-4",
|
|
2876
3657
|
children: [
|
|
2877
|
-
/* @__PURE__ */ (0,
|
|
2878
|
-
|
|
2879
|
-
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "h-4 w-32 bg-sand-200 rounded animate-pulse" }, void 0, false, {
|
|
3659
|
+
fileName: _jsxFileName,
|
|
3660
|
+
lineNumber: 1005,
|
|
3661
|
+
columnNumber: 9
|
|
3662
|
+
}, this),
|
|
3663
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "h-40 panel animate-pulse" }, void 0, false, {
|
|
3664
|
+
fileName: _jsxFileName,
|
|
3665
|
+
lineNumber: 1006,
|
|
3666
|
+
columnNumber: 9
|
|
3667
|
+
}, this),
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "h-32 panel animate-pulse" }, void 0, false, {
|
|
3669
|
+
fileName: _jsxFileName,
|
|
3670
|
+
lineNumber: 1007,
|
|
3671
|
+
columnNumber: 9
|
|
3672
|
+
}, this)
|
|
2880
3673
|
]
|
|
2881
|
-
}
|
|
2882
|
-
|
|
3674
|
+
}, void 0, true, {
|
|
3675
|
+
fileName: _jsxFileName,
|
|
3676
|
+
lineNumber: 1004,
|
|
3677
|
+
columnNumber: 12
|
|
3678
|
+
}, this);
|
|
3679
|
+
if (isError || isStepsError || !data) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2883
3680
|
className: "max-w-6xl mx-auto",
|
|
2884
|
-
children: [/* @__PURE__ */ (0,
|
|
3681
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, {
|
|
2885
3682
|
to: "/logs",
|
|
2886
3683
|
className: "flex items-center gap-1 text-[13px] text-sand-500 hover:text-sienna-500 mb-4",
|
|
2887
|
-
children: [/* @__PURE__ */ (0,
|
|
2888
|
-
|
|
3684
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideArrowLeft, { className: "size-3.5" }, void 0, false, {
|
|
3685
|
+
fileName: _jsxFileName,
|
|
3686
|
+
lineNumber: 1013,
|
|
3687
|
+
columnNumber: 11
|
|
3688
|
+
}, this), "Back to Logs"]
|
|
3689
|
+
}, void 0, true, {
|
|
3690
|
+
fileName: _jsxFileName,
|
|
3691
|
+
lineNumber: 1012,
|
|
3692
|
+
columnNumber: 9
|
|
3693
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2889
3694
|
role: "alert",
|
|
2890
3695
|
className: "text-danger-500 text-sm",
|
|
2891
3696
|
children: isError ? isSonamuError(error) && error.code === 404 ? "Request not found." : "Failed to load request." : isStepsError ? "Failed to load request steps." : "Request not found."
|
|
2892
|
-
}
|
|
2893
|
-
|
|
3697
|
+
}, void 0, false, {
|
|
3698
|
+
fileName: _jsxFileName,
|
|
3699
|
+
lineNumber: 1016,
|
|
3700
|
+
columnNumber: 9
|
|
3701
|
+
}, this)]
|
|
3702
|
+
}, void 0, true, {
|
|
3703
|
+
fileName: _jsxFileName,
|
|
3704
|
+
lineNumber: 1011,
|
|
3705
|
+
columnNumber: 12
|
|
3706
|
+
}, this);
|
|
2894
3707
|
const toolCalls = stepTree.flatMap((step) => step.toolCalls);
|
|
2895
3708
|
const firstImageGenerationStepId = toolCalls.find((toolCall) => toolCall.toolName === "image_generation")?.id ?? null;
|
|
2896
3709
|
const hasSteps = stepTree.length > 0;
|
|
@@ -2899,87 +3712,210 @@ function RequestDetail({ id }) {
|
|
|
2899
3712
|
const hasHistory = history !== null && history.length > 0;
|
|
2900
3713
|
const tools = data.tools ?? null;
|
|
2901
3714
|
const hasTools = tools !== null && tools.length > 0;
|
|
2902
|
-
const responseTypePanel = data.is_structured ? /* @__PURE__ */ (0,
|
|
2903
|
-
|
|
3715
|
+
const responseTypePanel = data.is_structured ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ResponseTypePanel, { id }, void 0, false, {
|
|
3716
|
+
fileName: _jsxFileName,
|
|
3717
|
+
lineNumber: 1031,
|
|
3718
|
+
columnNumber: 50
|
|
3719
|
+
}, this) : null;
|
|
3720
|
+
const promptSections = /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2904
3721
|
className: "space-y-4",
|
|
2905
|
-
children: [/* @__PURE__ */ (0,
|
|
3722
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2906
3723
|
title: "System",
|
|
2907
|
-
children: /* @__PURE__ */ (0,
|
|
3724
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2908
3725
|
className: "relative",
|
|
2909
|
-
children: [/* @__PURE__ */ (0,
|
|
3726
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(CopyButton, { text: data.system_prompt ?? "null" }, void 0, false, {
|
|
3727
|
+
fileName: _jsxFileName,
|
|
3728
|
+
lineNumber: 1035,
|
|
3729
|
+
columnNumber: 11
|
|
3730
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(FormattedContent, {
|
|
2910
3731
|
text: data.system_prompt ?? "null",
|
|
2911
3732
|
markdown: true
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
|
|
3733
|
+
}, void 0, false, {
|
|
3734
|
+
fileName: _jsxFileName,
|
|
3735
|
+
lineNumber: 1036,
|
|
3736
|
+
columnNumber: 11
|
|
3737
|
+
}, this)]
|
|
3738
|
+
}, void 0, true, {
|
|
3739
|
+
fileName: _jsxFileName,
|
|
3740
|
+
lineNumber: 1034,
|
|
3741
|
+
columnNumber: 9
|
|
3742
|
+
}, this)
|
|
3743
|
+
}, void 0, false, {
|
|
3744
|
+
fileName: _jsxFileName,
|
|
3745
|
+
lineNumber: 1033,
|
|
3746
|
+
columnNumber: 7
|
|
3747
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2915
3748
|
title: "User",
|
|
2916
|
-
children: /* @__PURE__ */ (0,
|
|
3749
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2917
3750
|
className: "space-y-3",
|
|
2918
|
-
children: [/* @__PURE__ */ (0,
|
|
3751
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2919
3752
|
className: "relative",
|
|
2920
|
-
children: [/* @__PURE__ */ (0,
|
|
3753
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(CopyButton, { text: data.user_prompt ?? "null" }, void 0, false, {
|
|
3754
|
+
fileName: _jsxFileName,
|
|
3755
|
+
lineNumber: 1042,
|
|
3756
|
+
columnNumber: 13
|
|
3757
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(FormattedContent, {
|
|
2921
3758
|
text: data.user_prompt ?? "null",
|
|
2922
3759
|
markdown: true
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
3760
|
+
}, void 0, false, {
|
|
3761
|
+
fileName: _jsxFileName,
|
|
3762
|
+
lineNumber: 1043,
|
|
3763
|
+
columnNumber: 13
|
|
3764
|
+
}, this)]
|
|
3765
|
+
}, void 0, true, {
|
|
3766
|
+
fileName: _jsxFileName,
|
|
3767
|
+
lineNumber: 1041,
|
|
3768
|
+
columnNumber: 11
|
|
3769
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(RequestInputImages, {
|
|
3770
|
+
images: data.input_images,
|
|
3771
|
+
stepId: firstImageGenerationStepId
|
|
3772
|
+
}, void 0, false, {
|
|
3773
|
+
fileName: _jsxFileName,
|
|
3774
|
+
lineNumber: 1045,
|
|
3775
|
+
columnNumber: 11
|
|
3776
|
+
}, this)]
|
|
3777
|
+
}, void 0, true, {
|
|
3778
|
+
fileName: _jsxFileName,
|
|
3779
|
+
lineNumber: 1040,
|
|
3780
|
+
columnNumber: 9
|
|
3781
|
+
}, this)
|
|
3782
|
+
}, void 0, false, {
|
|
3783
|
+
fileName: _jsxFileName,
|
|
3784
|
+
lineNumber: 1039,
|
|
3785
|
+
columnNumber: 7
|
|
3786
|
+
}, this)]
|
|
3787
|
+
}, void 0, true, {
|
|
3788
|
+
fileName: _jsxFileName,
|
|
3789
|
+
lineNumber: 1032,
|
|
3790
|
+
columnNumber: 26
|
|
3791
|
+
}, this);
|
|
3792
|
+
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2929
3793
|
className: `mx-auto space-y-4 ${hasSteps ? "max-w-[120rem]" : "max-w-6xl"}`,
|
|
2930
3794
|
children: [
|
|
2931
|
-
/* @__PURE__ */ (0,
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, {
|
|
2932
3796
|
to: "/logs",
|
|
2933
3797
|
className: "inline-flex items-center gap-1 text-[13px] text-sand-500 hover:text-sienna-500 transition-colors",
|
|
2934
|
-
children: [/* @__PURE__ */ (0,
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
3798
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(lucideArrowLeft, { className: "size-3.5" }, void 0, false, {
|
|
3799
|
+
fileName: _jsxFileName,
|
|
3800
|
+
lineNumber: 1051,
|
|
3801
|
+
columnNumber: 9
|
|
3802
|
+
}, this), "Back to Logs"]
|
|
3803
|
+
}, void 0, true, {
|
|
3804
|
+
fileName: _jsxFileName,
|
|
3805
|
+
lineNumber: 1050,
|
|
3806
|
+
columnNumber: 7
|
|
3807
|
+
}, this),
|
|
3808
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(HeaderBar, { data }, void 0, false, {
|
|
3809
|
+
fileName: _jsxFileName,
|
|
3810
|
+
lineNumber: 1055,
|
|
3811
|
+
columnNumber: 7
|
|
3812
|
+
}, this),
|
|
3813
|
+
data.error_message && /* @__PURE__ */ (void 0)(ErrorPanel, { message: data.error_message }, void 0, false, {
|
|
3814
|
+
fileName: _jsxFileName,
|
|
3815
|
+
lineNumber: 1057,
|
|
3816
|
+
columnNumber: 30
|
|
3817
|
+
}, this),
|
|
3818
|
+
hasHistory && /* @__PURE__ */ (void 0)(HistorySection, { history }, void 0, false, {
|
|
3819
|
+
fileName: _jsxFileName,
|
|
3820
|
+
lineNumber: 1059,
|
|
3821
|
+
columnNumber: 22
|
|
3822
|
+
}, this),
|
|
3823
|
+
hasSteps ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2940
3824
|
className: "flex flex-col lg:flex-row gap-4 items-stretch lg:items-start",
|
|
2941
|
-
children: [/* @__PURE__ */ (0,
|
|
3825
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2942
3826
|
className: "order-1 lg:order-2 flex-1 min-w-0 space-y-4",
|
|
2943
3827
|
children: [
|
|
2944
3828
|
responseTypePanel,
|
|
2945
|
-
hasTools && /* @__PURE__ */ (0
|
|
3829
|
+
hasTools && /* @__PURE__ */ (void 0)(ToolsPanel, {
|
|
2946
3830
|
id,
|
|
2947
3831
|
tools
|
|
2948
|
-
}
|
|
2949
|
-
|
|
3832
|
+
}, void 0, false, {
|
|
3833
|
+
fileName: _jsxFileName,
|
|
3834
|
+
lineNumber: 1067,
|
|
3835
|
+
columnNumber: 26
|
|
3836
|
+
}, this),
|
|
3837
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(StepTreeSection, {
|
|
2950
3838
|
steps: stepTree,
|
|
2951
3839
|
tokensPerSecEnabled
|
|
2952
|
-
}
|
|
3840
|
+
}, void 0, false, {
|
|
3841
|
+
fileName: _jsxFileName,
|
|
3842
|
+
lineNumber: 1068,
|
|
3843
|
+
columnNumber: 13
|
|
3844
|
+
}, this)
|
|
2953
3845
|
]
|
|
2954
|
-
}
|
|
3846
|
+
}, void 0, true, {
|
|
3847
|
+
fileName: _jsxFileName,
|
|
3848
|
+
lineNumber: 1065,
|
|
3849
|
+
columnNumber: 11
|
|
3850
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2955
3851
|
className: "order-2 lg:order-1 flex-1 min-w-0",
|
|
2956
3852
|
children: promptSections
|
|
2957
|
-
}
|
|
2958
|
-
|
|
3853
|
+
}, void 0, false, {
|
|
3854
|
+
fileName: _jsxFileName,
|
|
3855
|
+
lineNumber: 1070,
|
|
3856
|
+
columnNumber: 11
|
|
3857
|
+
}, this)]
|
|
3858
|
+
}, void 0, true, {
|
|
3859
|
+
fileName: _jsxFileName,
|
|
3860
|
+
lineNumber: 1064,
|
|
3861
|
+
columnNumber: 5
|
|
3862
|
+
}, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(import_jsx_dev_runtime.Fragment, { children: [
|
|
2959
3863
|
responseTypePanel,
|
|
2960
|
-
hasTools && /* @__PURE__ */ (0
|
|
3864
|
+
hasTools && /* @__PURE__ */ (void 0)(ToolsPanel, {
|
|
2961
3865
|
id,
|
|
2962
3866
|
tools
|
|
2963
|
-
}
|
|
3867
|
+
}, void 0, false, {
|
|
3868
|
+
fileName: _jsxFileName,
|
|
3869
|
+
lineNumber: 1073,
|
|
3870
|
+
columnNumber: 24
|
|
3871
|
+
}, this),
|
|
2964
3872
|
promptSections
|
|
2965
|
-
] }),
|
|
2966
|
-
/* @__PURE__ */ (0,
|
|
3873
|
+
] }, void 0, true),
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Section, {
|
|
2967
3875
|
title: "Response",
|
|
2968
|
-
children: /* @__PURE__ */ (0,
|
|
3876
|
+
children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2969
3877
|
className: "relative",
|
|
2970
|
-
children: [/* @__PURE__ */ (0,
|
|
3878
|
+
children: [/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(CopyButton, { text: data.response }, void 0, false, {
|
|
3879
|
+
fileName: _jsxFileName,
|
|
3880
|
+
lineNumber: 1079,
|
|
3881
|
+
columnNumber: 11
|
|
3882
|
+
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(FormattedContent, {
|
|
2971
3883
|
text: data.response,
|
|
2972
3884
|
markdown: true
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
3885
|
+
}, void 0, false, {
|
|
3886
|
+
fileName: _jsxFileName,
|
|
3887
|
+
lineNumber: 1080,
|
|
3888
|
+
columnNumber: 11
|
|
3889
|
+
}, this)]
|
|
3890
|
+
}, void 0, true, {
|
|
3891
|
+
fileName: _jsxFileName,
|
|
3892
|
+
lineNumber: 1078,
|
|
3893
|
+
columnNumber: 9
|
|
3894
|
+
}, this)
|
|
3895
|
+
}, void 0, false, {
|
|
3896
|
+
fileName: _jsxFileName,
|
|
3897
|
+
lineNumber: 1077,
|
|
3898
|
+
columnNumber: 7
|
|
3899
|
+
}, this),
|
|
3900
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(MetricsPanel, {
|
|
2977
3901
|
data,
|
|
2978
3902
|
toolCallCount: toolCalls.length
|
|
2979
|
-
}
|
|
2980
|
-
|
|
3903
|
+
}, void 0, false, {
|
|
3904
|
+
fileName: _jsxFileName,
|
|
3905
|
+
lineNumber: 1084,
|
|
3906
|
+
columnNumber: 7
|
|
3907
|
+
}, this),
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "pb-8" }, void 0, false, {
|
|
3909
|
+
fileName: _jsxFileName,
|
|
3910
|
+
lineNumber: 1086,
|
|
3911
|
+
columnNumber: 7
|
|
3912
|
+
}, this)
|
|
2981
3913
|
]
|
|
2982
|
-
}
|
|
3914
|
+
}, void 0, true, {
|
|
3915
|
+
fileName: _jsxFileName,
|
|
3916
|
+
lineNumber: 1049,
|
|
3917
|
+
columnNumber: 10
|
|
3918
|
+
}, this);
|
|
2983
3919
|
}
|
|
2984
3920
|
//#endregion
|
|
2985
3921
|
export { RequestShowPage as component };
|