@cartanova/qgrid-cli 2.10.10 → 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 +21 -19
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +40 -33
- 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 -70
- package/bundle/dist/application/request-log/request-log.types.js +1 -1
- 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 +32 -16
- package/bundle/dist/application/sonamu.generated.sso.js +1 -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 +1 -1
- package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +8 -6
- 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 +19 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +84 -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.model.test.ts +111 -4
- package/bundle/src/application/request-log/request-log.model.ts +277 -146
- package/bundle/src/application/request-log/request-log.types.ts +6 -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 +133 -0
- package/bundle/src/application/sonamu.generated.sso.ts +2 -0
- package/bundle/src/application/sonamu.generated.ts +15 -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 +23 -2
- package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +16 -8
- 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-NP-ValHd.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-CgBdabgd.js → lazyRouteComponent-D8iTIHyn.js} +129 -2
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +825 -0
- package/bundle/web-dist/server/assets/{monit-ZPt66W5M.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-Ds75e4Jl.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-DjGldb-h.js → request-model-I6OdODSH.js} +15 -6
- package/bundle/web-dist/server/assets/{routes-Ct-k7nBA.js → routes-B95YlUv2.js} +760 -213
- package/bundle/web-dist/server/assets/{services.generated-BA4AcAf5.js → services.generated-DQATJ6qf.js} +12820 -12194
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +830 -0
- package/bundle/web-dist/server/assets/{show-LSFIzvO2.js → show-Bxaj3rhH.js} +1350 -418
- 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-pkArIzCP.js → use-update-token-mutation-BEbgOzaa.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +4295 -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 +23 -0
- 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/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-DZwzUfI-.js +0 -106
- package/bundle/web-dist/client/assets/logs-Cog79DU5.js +0 -1
- package/bundle/web-dist/client/assets/monit-2auznBys.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-B0lTeLK-.js +0 -5
- package/bundle/web-dist/client/assets/settings-D8ZxZGSJ.js +0 -1
- package/bundle/web-dist/client/assets/show-CFSERlnM.js +0 -2
- package/bundle/web-dist/client/assets/tokens-CZXUyI7O.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-hboOs3wG.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-BQHS0byG.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-BMyR98rU.js +0 -509
- package/bundle/web-dist/server/assets/plus-BZ9I0VgC.js +0 -19
- package/bundle/web-dist/server/assets/refresh-cw-CztCFis-.js +0 -23
- package/bundle/web-dist/server/assets/settings-CBUZ47Xx.js +0 -461
- package/bundle/web-dist/server/assets/tokens-DxrBW512.js +0 -448
- package/bundle/web-dist/server/assets/use-oauth-login-flow-Gn8flMK5.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,509 +0,0 @@
|
|
|
1
|
-
import { A as require_react, S as string, k as require_jsx_runtime, n as QgridService, o as TokenService, r as RequestLogService, x as object } from "./services.generated-BA4AcAf5.js";
|
|
2
|
-
import { a as Link, o as useNavigate } from "./lazyRouteComponent-CgBdabgd.js";
|
|
3
|
-
import { i as RequestLogOrderBy, n as Route, r as RequestLogBaseListParams } from "../entry-server.generated.js";
|
|
4
|
-
import { i as formatUsd, r as formatRequestCost, t as cacheHitRate } from "./cost-eEHeTRT5.js";
|
|
5
|
-
import { t as lucideRefreshCw } from "./refresh-cw-CztCFis-.js";
|
|
6
|
-
import { n as lucideZap, t as requestModelDisplay } from "./request-model-DjGldb-h.js";
|
|
7
|
-
require_react();
|
|
8
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
9
|
-
var lucideChevronLeft = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
width: "1.2em",
|
|
12
|
-
height: "1.2em",
|
|
13
|
-
...props,
|
|
14
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
15
|
-
fill: "none",
|
|
16
|
-
stroke: "currentColor",
|
|
17
|
-
strokeLinecap: "round",
|
|
18
|
-
strokeLinejoin: "round",
|
|
19
|
-
strokeWidth: 2,
|
|
20
|
-
d: "m15 18l-6-6l6-6"
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region ~icons/lucide/chevron-right.jsx
|
|
25
|
-
var lucideChevronRight = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
26
|
-
viewBox: "0 0 24 24",
|
|
27
|
-
width: "1.2em",
|
|
28
|
-
height: "1.2em",
|
|
29
|
-
...props,
|
|
30
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
31
|
-
fill: "none",
|
|
32
|
-
stroke: "currentColor",
|
|
33
|
-
strokeLinecap: "round",
|
|
34
|
-
strokeLinejoin: "round",
|
|
35
|
-
strokeWidth: 2,
|
|
36
|
-
d: "m9 18l6-6l-6-6"
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/components/qgrid/RequestLogTable.tsx
|
|
41
|
-
var PAGE_SIZE = 50;
|
|
42
|
-
var UNASSIGNED = "__unassigned__";
|
|
43
|
-
function formatDateTime(iso) {
|
|
44
|
-
const d = new Date(iso);
|
|
45
|
-
return `${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
46
|
-
}
|
|
47
|
-
function formatNum(n) {
|
|
48
|
-
return n.toLocaleString();
|
|
49
|
-
}
|
|
50
|
-
function formatDuration(ms) {
|
|
51
|
-
const total = Math.round(ms / 1e3);
|
|
52
|
-
const m = Math.floor(total / 60);
|
|
53
|
-
const s = total % 60;
|
|
54
|
-
return m > 0 ? `${m}m ${s}s` : `${s}s`;
|
|
55
|
-
}
|
|
56
|
-
function RequestModel({ status, requestedModel, servedModel, imageCostMethod, fallbackCount }) {
|
|
57
|
-
if (status === "running") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
58
|
-
className: "text-[9px] px-1.5 py-0.5 rounded-full bg-blue-100 text-blue-600 font-medium whitespace-nowrap",
|
|
59
|
-
children: "실행 중"
|
|
60
|
-
});
|
|
61
|
-
const modelDisplay = requestModelDisplay({
|
|
62
|
-
status,
|
|
63
|
-
requestedModel,
|
|
64
|
-
servedModel,
|
|
65
|
-
imageCostMethod
|
|
66
|
-
});
|
|
67
|
-
const hasRequestedOnly = requestedModel !== null && servedModel === null;
|
|
68
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
69
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
70
|
-
className: "text-xs text-sand-500",
|
|
71
|
-
children: modelDisplay.label
|
|
72
|
-
}),
|
|
73
|
-
hasRequestedOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
74
|
-
className: "ml-1 text-[9px] text-sand-400",
|
|
75
|
-
children: "요청"
|
|
76
|
-
}),
|
|
77
|
-
(fallbackCount ?? 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
78
|
-
className: "ml-1 text-[9px] text-caution-500",
|
|
79
|
-
children: ["×", fallbackCount]
|
|
80
|
-
})
|
|
81
|
-
] });
|
|
82
|
-
}
|
|
83
|
-
function formatTtft(ms) {
|
|
84
|
-
if (ms <= 0) return "—";
|
|
85
|
-
return ms >= 1e3 ? `${(ms / 1e3).toFixed(1)}s` : `${ms}ms`;
|
|
86
|
-
}
|
|
87
|
-
var COLUMNS = [
|
|
88
|
-
{
|
|
89
|
-
label: "ID",
|
|
90
|
-
align: "left",
|
|
91
|
-
width: "w-12",
|
|
92
|
-
sortKey: "id"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label: "Date",
|
|
96
|
-
align: "left",
|
|
97
|
-
width: "w-20",
|
|
98
|
-
sortKey: "created_at"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
label: "Project",
|
|
102
|
-
align: "left",
|
|
103
|
-
width: "w-20"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: "Token",
|
|
107
|
-
align: "left",
|
|
108
|
-
width: "w-24"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: "Model",
|
|
112
|
-
align: "left",
|
|
113
|
-
width: "w-20"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
label: "Fmt",
|
|
117
|
-
align: "left",
|
|
118
|
-
width: "w-12"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: "TTFT",
|
|
122
|
-
align: "right",
|
|
123
|
-
width: "w-16",
|
|
124
|
-
sortKey: "ttft_ms"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
label: "Duration",
|
|
128
|
-
align: "right",
|
|
129
|
-
width: "w-20",
|
|
130
|
-
sortKey: "duration_ms"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
label: "In",
|
|
134
|
-
align: "right",
|
|
135
|
-
width: "w-16",
|
|
136
|
-
sortKey: "input_tokens"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
label: "Out",
|
|
140
|
-
align: "right",
|
|
141
|
-
width: "w-20",
|
|
142
|
-
sortKey: "output_tokens"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
label: "C.Read",
|
|
146
|
-
align: "right",
|
|
147
|
-
width: "w-20",
|
|
148
|
-
sortKey: "cache_read_tokens"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
label: "C.Write",
|
|
152
|
-
align: "right",
|
|
153
|
-
width: "w-20",
|
|
154
|
-
sortKey: "cache_creation_tokens"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: "Hit",
|
|
158
|
-
align: "right",
|
|
159
|
-
width: "w-14"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
label: "Tools",
|
|
163
|
-
align: "right",
|
|
164
|
-
width: "w-14"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
label: "$",
|
|
168
|
-
align: "right",
|
|
169
|
-
width: "w-20",
|
|
170
|
-
sortKey: "cost_usd"
|
|
171
|
-
}
|
|
172
|
-
];
|
|
173
|
-
function RequestLogTable({ search, onSearchChange }) {
|
|
174
|
-
const navigate = useNavigate();
|
|
175
|
-
const page = search.page ?? 1;
|
|
176
|
-
const tokenFilter = search.token ?? "";
|
|
177
|
-
const projectFilter = search.project ?? "";
|
|
178
|
-
const modelFilter = search.model ?? "";
|
|
179
|
-
const { data: tokensData } = TokenService.useTokens("A");
|
|
180
|
-
const tokenNames = (tokensData?.rows ?? []).map((t) => t.name).filter(Boolean);
|
|
181
|
-
const { data: projectData } = QgridService.useProjectNames();
|
|
182
|
-
const projectNames = projectData?.names ?? [];
|
|
183
|
-
const { data: modelData } = QgridService.useModelNames();
|
|
184
|
-
const modelNames = modelData?.names ?? [];
|
|
185
|
-
const projectFilterParam = (() => {
|
|
186
|
-
if (projectFilter === UNASSIGNED) return { project_name_is_null: true };
|
|
187
|
-
if (projectFilter) return { project_name: projectFilter };
|
|
188
|
-
return {};
|
|
189
|
-
})();
|
|
190
|
-
const listFilters = {
|
|
191
|
-
...tokenFilter ? { token_name: tokenFilter } : {},
|
|
192
|
-
...projectFilterParam,
|
|
193
|
-
...modelFilter ? { model_name: modelFilter } : {}
|
|
194
|
-
};
|
|
195
|
-
const sort = search.sort ?? "id-desc";
|
|
196
|
-
const separator = sort.lastIndexOf("-");
|
|
197
|
-
const sortColumn = sort.slice(0, separator);
|
|
198
|
-
const sortDirection = sort.slice(separator + 1) === "asc" ? "asc" : "desc";
|
|
199
|
-
const { data, isLoading, isError, refresh, isRefreshing } = RequestLogService.useRequestLogs("P", {
|
|
200
|
-
num: PAGE_SIZE,
|
|
201
|
-
page,
|
|
202
|
-
orderBy: sort,
|
|
203
|
-
...listFilters
|
|
204
|
-
});
|
|
205
|
-
const { data: costData, isError: isCostError, refresh: refreshCost } = QgridService.useTotalCost({
|
|
206
|
-
num: 0,
|
|
207
|
-
page: 1,
|
|
208
|
-
...listFilters
|
|
209
|
-
});
|
|
210
|
-
const rows = data?.rows ?? [];
|
|
211
|
-
const total = data?.total ?? 0;
|
|
212
|
-
const totalPages = Math.ceil(total / PAGE_SIZE);
|
|
213
|
-
const updateFilter = (patch) => {
|
|
214
|
-
onSearchChange({
|
|
215
|
-
...search,
|
|
216
|
-
...patch,
|
|
217
|
-
page: 1
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
221
|
-
className: "panel overflow-hidden",
|
|
222
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
223
|
-
className: "panel-header flex items-center gap-2 px-3 py-2.5 flex-wrap sm:gap-3 sm:px-5",
|
|
224
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", {
|
|
226
|
-
value: tokenFilter,
|
|
227
|
-
onChange: (e) => updateFilter({ token: e.target.value || void 0 }),
|
|
228
|
-
disabled: tokenNames.length === 0,
|
|
229
|
-
className: "border border-sand-200/80 rounded-lg px-2.5 py-1.5 text-[11px] text-sand-700 bg-sand-50/50 focus:outline-none focus:border-sienna-300 disabled:text-sand-300 disabled:cursor-not-allowed",
|
|
230
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
231
|
-
value: "",
|
|
232
|
-
children: tokenNames.length > 0 ? "All Tokens" : "Tokens —"
|
|
233
|
-
}), tokenNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
234
|
-
value: name,
|
|
235
|
-
children: name
|
|
236
|
-
}, name))]
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", {
|
|
239
|
-
value: projectFilter,
|
|
240
|
-
onChange: (e) => updateFilter({ project: e.target.value || void 0 }),
|
|
241
|
-
className: "border border-sand-200/80 rounded-lg px-2.5 py-1.5 text-[11px] text-sand-700 bg-sand-50/50 focus:outline-none focus:border-sienna-300",
|
|
242
|
-
children: [
|
|
243
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
244
|
-
value: "",
|
|
245
|
-
children: "All Projects"
|
|
246
|
-
}),
|
|
247
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
248
|
-
value: UNASSIGNED,
|
|
249
|
-
children: "(unassigned)"
|
|
250
|
-
}),
|
|
251
|
-
projectNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
252
|
-
value: name,
|
|
253
|
-
children: name
|
|
254
|
-
}, name))
|
|
255
|
-
]
|
|
256
|
-
}),
|
|
257
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", {
|
|
258
|
-
value: modelFilter,
|
|
259
|
-
onChange: (e) => updateFilter({ model: e.target.value || void 0 }),
|
|
260
|
-
disabled: modelNames.length === 0,
|
|
261
|
-
className: "border border-sand-200/80 rounded-lg px-2.5 py-1.5 text-[11px] text-sand-700 bg-sand-50/50 focus:outline-none focus:border-sienna-300 disabled:text-sand-300 disabled:cursor-not-allowed",
|
|
262
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
263
|
-
value: "",
|
|
264
|
-
children: modelNames.length > 0 ? "All Models" : "Models —"
|
|
265
|
-
}), modelNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {
|
|
266
|
-
value: name,
|
|
267
|
-
children: name
|
|
268
|
-
}, name))]
|
|
269
|
-
}),
|
|
270
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
271
|
-
type: "button",
|
|
272
|
-
onClick: () => void Promise.all([refresh(), refreshCost()]),
|
|
273
|
-
disabled: isRefreshing,
|
|
274
|
-
"aria-label": "Reload",
|
|
275
|
-
title: "Reload",
|
|
276
|
-
className: "p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors",
|
|
277
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideRefreshCw, { className: isRefreshing ? "size-3.5 animate-spin" : "size-3.5" })
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1" }),
|
|
280
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
281
|
-
className: "text-[11px] text-sand-400",
|
|
282
|
-
children: [isError || !data ? "—" : total, " results"]
|
|
283
|
-
}),
|
|
284
|
-
isCostError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
285
|
-
role: "alert",
|
|
286
|
-
className: "text-[11px] text-danger-500",
|
|
287
|
-
children: "Failed to load total cost."
|
|
288
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
289
|
-
className: "text-[11px] tabular-nums font-medium text-sienna-600",
|
|
290
|
-
children: costData ? formatUsd(costData.usd) : "—"
|
|
291
|
-
})
|
|
292
|
-
]
|
|
293
|
-
}), isError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
294
|
-
role: "alert",
|
|
295
|
-
className: "text-danger-500 text-center py-12 text-sm",
|
|
296
|
-
children: "Failed to load request logs."
|
|
297
|
-
}) : isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
298
|
-
className: "space-y-2",
|
|
299
|
-
children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-8 bg-sand-100 rounded animate-pulse" }, `skel-${i}`))
|
|
300
|
-
}) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
301
|
-
className: "text-sand-400 text-center py-12 text-sm",
|
|
302
|
-
children: "No requests yet."
|
|
303
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
304
|
-
className: "overflow-x-auto px-3 py-3 sm:px-5",
|
|
305
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
|
|
306
|
-
className: "w-full min-w-[900px] text-[13px]",
|
|
307
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
308
|
-
className: "border-b border-sand-100/60",
|
|
309
|
-
children: [COLUMNS.map((col) => {
|
|
310
|
-
const padX = col.label === "Duration" ? "pl-5 pr-3" : col.width ? "px-4" : "px-3";
|
|
311
|
-
const active = col.sortKey === sortColumn;
|
|
312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
313
|
-
className: `${col.align === "right" ? "text-right" : "text-left"} ${col.width ?? ""} ${col.width ? "whitespace-nowrap" : ""} ${padX} py-1.5 text-[10px] uppercase font-medium ${active ? "text-sienna-600" : "text-sand-400"}`,
|
|
314
|
-
children: col.sortKey ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
315
|
-
type: "button",
|
|
316
|
-
onClick: () => updateFilter({ sort: RequestLogOrderBy.parse(`${col.sortKey}-${active && sortDirection === "desc" ? "asc" : "desc"}`) }),
|
|
317
|
-
className: `inline-flex items-center gap-0.5 text-[10px] uppercase font-medium hover:text-sienna-500 transition-colors duration-150 ${col.align === "right" ? "justify-end w-full" : ""}`,
|
|
318
|
-
children: [col.label, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
319
|
-
className: active ? "" : "text-sand-300",
|
|
320
|
-
children: active ? sortDirection === "desc" ? "↓" : "↑" : "↕"
|
|
321
|
-
})]
|
|
322
|
-
}) : col.label
|
|
323
|
-
}, col.label);
|
|
324
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { className: "w-8" })]
|
|
325
|
-
}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", {
|
|
326
|
-
className: "divide-y divide-sand-100/60",
|
|
327
|
-
children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
328
|
-
className: "transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer",
|
|
329
|
-
onClick: (e) => {
|
|
330
|
-
if (e.metaKey || e.ctrlKey) {
|
|
331
|
-
window.open(`/requests/show?id=${row.id}`, "_blank");
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
navigate({
|
|
335
|
-
to: "/requests/show",
|
|
336
|
-
search: { id: row.id }
|
|
337
|
-
});
|
|
338
|
-
},
|
|
339
|
-
children: [
|
|
340
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
341
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
342
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
343
|
-
to: "/requests/show",
|
|
344
|
-
search: { id: row.id },
|
|
345
|
-
onClick: (e) => e.stopPropagation(),
|
|
346
|
-
className: "text-xs text-sand-500 tabular-nums hover:text-sienna-500",
|
|
347
|
-
children: row.id
|
|
348
|
-
})
|
|
349
|
-
}),
|
|
350
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
351
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
352
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
353
|
-
className: "text-xs text-sand-400 tabular-nums",
|
|
354
|
-
children: formatDateTime(row.created_at)
|
|
355
|
-
})
|
|
356
|
-
}),
|
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
358
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
359
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
360
|
-
className: "text-xs text-sand-600",
|
|
361
|
-
children: row.project_name ?? "—"
|
|
362
|
-
})
|
|
363
|
-
}),
|
|
364
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
365
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
366
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
367
|
-
className: "text-xs text-sand-500",
|
|
368
|
-
children: row.token_name
|
|
369
|
-
})
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", {
|
|
372
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
373
|
-
children: [
|
|
374
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RequestModel, {
|
|
375
|
-
status: row.status,
|
|
376
|
-
requestedModel: row.requested_model_name,
|
|
377
|
-
servedModel: row.model_name,
|
|
378
|
-
imageCostMethod: row.image_cost_method,
|
|
379
|
-
fallbackCount: row.fallback_count
|
|
380
|
-
}),
|
|
381
|
-
row.service_tier === "fast" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
382
|
-
title: "Fast 모드",
|
|
383
|
-
className: "ml-1 inline-flex align-middle",
|
|
384
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideZap, {
|
|
385
|
-
"aria-label": "Fast 모드",
|
|
386
|
-
className: "size-3 text-[#1877F2] [&_path]:fill-current"
|
|
387
|
-
})
|
|
388
|
-
}),
|
|
389
|
-
row.response_json_ok === false && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
390
|
-
title: "structured 요청의 응답이 JSON 파싱에 실패했습니다",
|
|
391
|
-
className: "ml-1.5 rounded-full bg-caution-400/15 px-1.5 py-0.5 text-[9px] font-semibold text-caution-500",
|
|
392
|
-
children: "broken"
|
|
393
|
-
})
|
|
394
|
-
]
|
|
395
|
-
}),
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
397
|
-
className: "px-4 py-1.5 whitespace-nowrap",
|
|
398
|
-
children: row.is_image_generation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
399
|
-
className: "rounded bg-sage-100 px-1.5 py-0.5 font-mono text-[10px] text-sage-700",
|
|
400
|
-
children: "img"
|
|
401
|
-
}) : row.is_structured ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
402
|
-
className: "rounded bg-sienna-100 px-1.5 py-0.5 font-mono text-[10px] text-sienna-700",
|
|
403
|
-
children: "json"
|
|
404
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
405
|
-
className: "font-mono text-[10px] text-sand-400",
|
|
406
|
-
children: "text"
|
|
407
|
-
})
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
410
|
-
className: "px-4 py-1.5 text-right tabular-nums text-sand-500 whitespace-nowrap",
|
|
411
|
-
children: formatTtft(row.ttft_ms)
|
|
412
|
-
}),
|
|
413
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
414
|
-
className: "pl-5 pr-3 py-1.5 text-right tabular-nums text-sand-500 whitespace-nowrap",
|
|
415
|
-
children: formatDuration(row.duration_ms)
|
|
416
|
-
}),
|
|
417
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
418
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700",
|
|
419
|
-
children: formatNum(row.input_tokens)
|
|
420
|
-
}),
|
|
421
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
422
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700",
|
|
423
|
-
children: formatNum(row.output_tokens)
|
|
424
|
-
}),
|
|
425
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
426
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700",
|
|
427
|
-
children: formatNum(row.cache_read_tokens)
|
|
428
|
-
}),
|
|
429
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
430
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700",
|
|
431
|
-
children: formatNum(row.cache_creation_tokens)
|
|
432
|
-
}),
|
|
433
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
434
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700",
|
|
435
|
-
children: cacheHitRate(row)
|
|
436
|
-
}),
|
|
437
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
438
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-500",
|
|
439
|
-
children: row.tool_call_count > 0 ? row.tool_call_count : "—"
|
|
440
|
-
}),
|
|
441
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
442
|
-
className: "px-3 py-1.5 text-right tabular-nums text-sand-700 whitespace-nowrap",
|
|
443
|
-
children: formatRequestCost(row)
|
|
444
|
-
}),
|
|
445
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
446
|
-
className: "px-2 py-1.5",
|
|
447
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideChevronRight, { className: "size-4 text-sand-400" })
|
|
448
|
-
})
|
|
449
|
-
]
|
|
450
|
-
}, row.id))
|
|
451
|
-
})]
|
|
452
|
-
})
|
|
453
|
-
}), totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
454
|
-
className: "flex items-center justify-center gap-3 px-5 py-2.5 border-t border-sand-100/60",
|
|
455
|
-
children: [
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
457
|
-
type: "button",
|
|
458
|
-
className: "p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors",
|
|
459
|
-
disabled: page === 1,
|
|
460
|
-
onClick: () => onSearchChange({
|
|
461
|
-
...search,
|
|
462
|
-
page: page - 1
|
|
463
|
-
}),
|
|
464
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideChevronLeft, { className: "size-4" })
|
|
465
|
-
}),
|
|
466
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
467
|
-
className: "text-[11px] text-sand-400 tabular-nums",
|
|
468
|
-
children: [
|
|
469
|
-
page,
|
|
470
|
-
" / ",
|
|
471
|
-
totalPages
|
|
472
|
-
]
|
|
473
|
-
}),
|
|
474
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
475
|
-
type: "button",
|
|
476
|
-
className: "p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors",
|
|
477
|
-
disabled: page === totalPages,
|
|
478
|
-
onClick: () => onSearchChange({
|
|
479
|
-
...search,
|
|
480
|
-
page: page + 1
|
|
481
|
-
}),
|
|
482
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideChevronRight, { className: "size-4" })
|
|
483
|
-
})
|
|
484
|
-
]
|
|
485
|
-
})] })]
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
//#endregion
|
|
489
|
-
//#region src/routes/logs.tsx?tsr-split=component
|
|
490
|
-
object({
|
|
491
|
-
token: string().optional(),
|
|
492
|
-
project: string().optional(),
|
|
493
|
-
model: string().optional(),
|
|
494
|
-
sort: RequestLogOrderBy.optional(),
|
|
495
|
-
page: RequestLogBaseListParams.shape.page.default(1)
|
|
496
|
-
});
|
|
497
|
-
function LogsPage() {
|
|
498
|
-
const search = Route.useSearch();
|
|
499
|
-
const navigate = Route.useNavigate();
|
|
500
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
501
|
-
className: "max-w-[100rem] mx-auto",
|
|
502
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RequestLogTable, {
|
|
503
|
-
search,
|
|
504
|
-
onSearchChange: (next) => navigate({ search: next })
|
|
505
|
-
})
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
//#endregion
|
|
509
|
-
export { LogsPage as component };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { A as require_react, k as require_jsx_runtime } from "./services.generated-BA4AcAf5.js";
|
|
2
|
-
require_react();
|
|
3
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
4
|
-
var lucidePlus = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
width: "1.2em",
|
|
7
|
-
height: "1.2em",
|
|
8
|
-
...props,
|
|
9
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
10
|
-
fill: "none",
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
strokeLinecap: "round",
|
|
13
|
-
strokeLinejoin: "round",
|
|
14
|
-
strokeWidth: 2,
|
|
15
|
-
d: "M5 12h14m-7-7v14"
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
//#endregion
|
|
19
|
-
export { lucidePlus as t };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { A as require_react, k as require_jsx_runtime } from "./services.generated-BA4AcAf5.js";
|
|
2
|
-
require_react();
|
|
3
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
4
|
-
var lucideRefreshCw = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
|
-
width: "1.2em",
|
|
7
|
-
height: "1.2em",
|
|
8
|
-
...props,
|
|
9
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", {
|
|
10
|
-
fill: "none",
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
strokeLinecap: "round",
|
|
13
|
-
strokeLinejoin: "round",
|
|
14
|
-
strokeWidth: 2,
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9a9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
17
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 3v5h-5m5 4a9 9 0 0 1-9 9a9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
18
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 16H3v5" })
|
|
19
|
-
]
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { lucideRefreshCw as t };
|