omniroute 3.4.5 → 3.4.6
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/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cache/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cache/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/memory/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +3 -3
- package/app/.next/server/app/api/provider-models/route.js +2 -2
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +2 -2
- package/app/.next/server/app/api/provider-nodes/route.js +3 -3
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/sync-models/route.js +3 -3
- package/app/.next/server/app/api/providers/[id]/sync-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +6 -6
- package/app/.next/server/app/api/providers/route.js +4 -4
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +5 -5
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/system/version/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +2 -2
- package/app/.next/server/app/api/usage/provider-limits/route.js +5 -5
- package/app/.next/server/app/api/usage/provider-limits/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route.js +4 -4
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js +4 -4
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.7zz6j._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.lz97q._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0.m9_5-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00-bzx_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00hsd7k._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__00i_ryi._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__01fudn9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__024slax._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__030_-af._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__03gl9dh._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__03x69ll._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__047np0t._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__04lc9.m._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__05u48b-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06dr~pl._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06hr_sx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__06r5eje._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__07.ui7z._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__075j.5s._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__07ju0wx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__07wj.c4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__08-9vz.._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0908q-_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__09blmoy._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__09c50mp._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0a.3c_r._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0bkx9sd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0c4v_hg._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0c5t729._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0cem6i6._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0d-qyrk._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0d-rd-n._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0djfz6n._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0dmb7bd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0e7dp.z._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0el_v65._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0enebbv._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0enecpa._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0eps0zu._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fbv0zh._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fmf-tk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fw0v5q._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0g0b9au._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0gukblk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h-q5l0._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h1fgwr._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h86b7i._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0h~a5f1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0irqapk._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0j0ez8_._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0jacr87._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0jnihz9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0jp3yj4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0llqbda._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0m-356c._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0mj7x5~._.js +8 -8
- package/app/.next/server/chunks/[root-of-the-server]__0mpnloa._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0n-~kvf._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0n.gjo8._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0n0nara._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0ncz8xj._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0oph175._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0p3a7_l._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0pl_899._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0prott7._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0pwiejj._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0pxqo8v._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0q04t~4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0q9h_5u._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0qaruz-._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0qka2s7._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rnvi83._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rpwwig._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0rs2ec_._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0s1dq3.._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0s1ya.l._.js +5 -5
- package/app/.next/server/chunks/[root-of-the-server]__0svm~lc._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0t83olx._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0tsl88m._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0uctzvq._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vkqjj1._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0vwq47l._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vx1juw._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0vzvfbd._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0w39cdo._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0wc__c~._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0y2h760._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0y_c7uk._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0~8fltv._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0~dj8ev._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10.x-iq._.js +4 -4
- package/app/.next/server/chunks/[root-of-the-server]__10e1a_z._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10o_k-p._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__10smy7g._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__11wa4b~._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__11xpr8u._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__122-jdl._.js +8 -8
- package/app/.next/server/chunks/[root-of-the-server]__12e9-l1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__12gh.g1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__136nal9._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__13_i443._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__13c-d_4._.js +2 -2
- package/app/.next/server/chunks/_0-jnvci._.js +1 -1
- package/app/.next/server/chunks/_0-~thzo._.js +1 -1
- package/app/.next/server/chunks/_00.pgsp._.js +1 -1
- package/app/.next/server/chunks/_013gowh._.js +1 -1
- package/app/.next/server/chunks/{_03c-j3o._.js → _02~yzex._.js} +2 -2
- package/app/.next/server/chunks/_036lxbr._.js +1 -1
- package/app/.next/server/chunks/_05reh6o._.js +1 -1
- package/app/.next/server/chunks/_0a3.3sc._.js +1 -1
- package/app/.next/server/chunks/_0c.abwr._.js +1 -1
- package/app/.next/server/chunks/_0due8oe._.js +2 -2
- package/app/.next/server/chunks/_0h-j8c2._.js +1 -1
- package/app/.next/server/chunks/_0k43pd6._.js +3 -3
- package/app/.next/server/chunks/_0vx-r0i._.js +2 -2
- package/app/.next/server/chunks/_10.rw9f._.js +1 -1
- package/app/.next/server/chunks/_13mo7j5._.js +1 -1
- package/app/.next/server/chunks/src_0f_le~m._.js +1 -1
- package/app/.next/server/chunks/ssr/_008ht2n._.js +2 -2
- package/app/.next/server/chunks/ssr/_0oo1f90._.js +2 -2
- package/app/.next/server/chunks/ssr/_0~laquj._.js +1 -1
- package/app/.next/server/chunks/ssr/src_04gjot1._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_(dashboard)_dashboard_cache_04_vca6._.js +1 -1
- package/app/.next/server/chunks/ssr/{src_app_(dashboard)_dashboard_settings_0ni3aus._.js → src_app_(dashboard)_dashboard_settings_09gq48u._.js} +2 -2
- package/app/.next/server/chunks/ssr/src_i18n_messages_en_json_[json]_cjs_13rg.m2._.js +1 -1
- package/app/.next/server/chunks/ssr/src_i18n_messages_pt-BR_json_[json]_cjs_01n5fvn._.js +1 -1
- package/app/.next/server/chunks/ssr/src_i18n_messages_pt_json_[json]_cjs_0fwb8p.._.js +1 -1
- package/app/.next/server/chunks/ssr/src_shared_0jy4djq._.js +3 -0
- package/app/.next/server/chunks/ssr/src_shared_components_0v5o286._.js +3 -0
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{03~_6b5~n101_.js → 0.ap2gsi3d-1e.js} +1 -1
- package/app/.next/static/chunks/08iujr48xci8k.js +1 -0
- package/app/.next/static/chunks/{0up_y.7qkqwxz.js → 08n6n76lz~vt6.js} +1 -1
- package/app/.next/static/chunks/{060zmf~qn1q6y.js → 0f611s~575pn8.js} +1 -1
- package/app/.next/static/chunks/0y5kx9rgeb6~_.js +1 -0
- package/app/.next/static/chunks/13xz-222deqiy.js +1 -0
- package/app/CHANGELOG.md +18 -0
- package/app/docs/openapi.yaml +1 -1
- package/app/llm.txt +2 -2
- package/app/open-sse/handlers/chatCore.ts +2 -2
- package/app/open-sse/package.json +1 -1
- package/app/open-sse/translator/request/claude-to-gemini.ts +17 -0
- package/app/open-sse/translator/request/openai-to-gemini.ts +14 -3
- package/app/open-sse/utils/stream.ts +2 -2
- package/app/package-lock.json +3 -3
- package/app/package.json +1 -1
- package/app/src/app/(dashboard)/dashboard/cache/components/CacheTrends.tsx +19 -12
- package/app/src/app/(dashboard)/dashboard/cache/page.tsx +0 -3
- package/app/src/app/(dashboard)/dashboard/memory/page.tsx +20 -20
- package/app/src/i18n/messages/en.json +55 -1
- package/app/src/i18n/messages/pt-BR.json +53 -0
- package/app/src/i18n/messages/pt.json +54 -1
- package/app/src/shared/constants/providers.ts +40 -0
- package/app/src/shared/constants/sidebarVisibility.ts +6 -0
- package/app/src/shared/utils/circuitBreaker.ts +14 -4
- package/package.json +1 -1
- package/app/.next/server/chunks/ssr/src_05ekey-._.js +0 -3
- package/app/.next/server/chunks/ssr/src_100xxow._.js +0 -3
- package/app/.next/static/chunks/05tcrkqknq.20.js +0 -1
- package/app/.next/static/chunks/0eng4c9gz1s4..js +0 -1
- package/app/.next/static/chunks/0go~kwn1zgxnd.js +0 -1
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_buildManifest.js +0 -0
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565650,e=>{"use strict";e.i(342923),e.i(80173),e.i(907714),e.i(393718),e.i(703166),e.i(454149),e.i(822124),e.i(969353),e.i(635055),e.i(897844),e.i(450222),e.i(647829),e.i(6998),e.i(982131),e.i(116016),e.i(279743),e.i(193464),e.i(548036),e.i(566770),e.i(953789),e.i(8839),e.i(227404),e.i(621745),e.i(567955),e.i(17517),e.i(419947),e.i(323060),e.i(642440),e.i(629342),e.i(816062),e.i(690777),e.i(563201),e.i(115243),e.i(165149),e.i(359505),e.s([],565650)},11477,e=>{"use strict";var t=e.i(393718);e.s(["Card",()=>t.default])},474078,e=>{"use strict";var t=e.i(342923);e.s(["Button",()=>t.default])},11131,e=>{"use strict";var t=e.i(629342);e.s(["EmptyState",()=>t.default])},256765,e=>{"use strict";var t=e.i(843476),s=e.i(271645);e.i(565650);var a=e.i(11477),l=e.i(474078),i=e.i(11131),r=e.i(627949),d=e.i(948148);function c(){let e=(0,d.useTranslations)("cache"),[a,i]=(0,s.useState)([]),[r,c]=(0,s.useState)({page:1,limit:20,total:0,totalPages:0}),[n,x]=(0,s.useState)(!0),[o,m]=(0,s.useState)(""),[h,u]=(0,s.useState)(null),p=(0,s.useCallback)(async(e=1)=>{x(!0);try{let t=new URLSearchParams({page:String(e),limit:String(r.limit)});o&&t.set("search",o);let s=await fetch(`/api/cache/entries?${t}`);if(s.ok){let e=await s.json();i(e.entries),c(e.pagination)}}catch{}finally{x(!1)}},[o,r.limit]);(0,s.useEffect)(()=>{p()},[p]);let b=async e=>{u(e);try{await fetch(`/api/cache/entries?signature=${encodeURIComponent(e)}`,{method:"DELETE"}),await p(r.page)}finally{u(null)}},j=e=>new Date(e).toLocaleString();return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("input",{type:"text",placeholder:e("searchEntries"),value:o,onChange:e=>m(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),className:"flex-1 px-3 py-2 text-sm rounded-lg border border-border bg-surface text-text-main placeholder:text-text-muted"}),(0,t.jsx)(l.Button,{variant:"secondary",size:"sm",onClick:()=>p(),children:e("search")})]}),n?(0,t.jsx)("div",{className:"text-sm text-text-muted",children:e("loading")}):0===a.length?(0,t.jsx)("div",{className:"text-sm text-text-muted text-center py-8",children:e("noEntries")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("signature")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("model")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("hits")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("tokensSaved")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("created")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("expires")}),(0,t.jsx)("th",{className:"pb-2",children:e("actions")})]})}),(0,t.jsx)("tbody",{children:a.map(e=>(0,t.jsxs)("tr",{className:"border-b border-border/20",children:[(0,t.jsxs)("td",{className:"py-2 pr-4 font-mono text-xs",children:[e.signature.slice(0,12),"..."]}),(0,t.jsx)("td",{className:"py-2 pr-4",children:e.model}),(0,t.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:e.hit_count}),(0,t.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:e.tokens_saved.toLocaleString()}),(0,t.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:j(e.created_at)}),(0,t.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:j(e.expires_at)}),(0,t.jsx)("td",{className:"py-2",children:(0,t.jsx)("button",{onClick:()=>b(e.signature),disabled:h===e.signature,className:"text-xs text-red-400 hover:text-red-300 disabled:opacity-50",children:h===e.signature?"...":"🗑️"})})]},e.id))})]})}),r.totalPages>1&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-2",children:[(0,t.jsx)(l.Button,{variant:"secondary",size:"sm",onClick:()=>p(r.page-1),disabled:r.page<=1,children:"←"}),(0,t.jsxs)("span",{className:"text-sm text-text-muted",children:[r.page," / ",r.totalPages]}),(0,t.jsx)(l.Button,{variant:"secondary",size:"sm",onClick:()=>p(r.page+1),disabled:r.page>=r.totalPages,children:"→"})]})]})]})}function n({icon:e,label:s,value:a,sub:l,valueClass:i="text-text"}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-4 rounded-xl bg-surface-raised border border-border/40",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-base leading-none","aria-hidden":"true",children:e}),s]}),(0,t.jsx)("div",{className:`text-2xl font-semibold tabular-nums ${i}`,children:a}),l&&(0,t.jsx)("div",{className:"text-xs text-text-muted",children:l})]})}function x({hitRate:e,label:s}){let a=e>=70?"bg-green-500":e>=40?"bg-amber-400":"bg-red-500",l=e>=70?"text-green-500":e>=40?"text-amber-400":"text-red-500";return(0,t.jsxs)("div",{className:"w-full",role:"progressbar","aria-label":s,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs mb-1.5",children:[(0,t.jsx)("span",{className:"text-text-muted",children:s}),(0,t.jsxs)("span",{className:`font-semibold tabular-nums ${l}`,children:[e.toFixed(1),"%"]})]}),(0,t.jsx)("div",{className:"w-full h-2 rounded-full bg-surface/50 overflow-hidden",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all duration-500 ${a}`,style:{width:`${Math.min(e,100)}%`}})})]})}function o({icon:e,children:s}){return(0,t.jsxs)("div",{className:"flex gap-2 text-sm text-text-muted",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-base leading-5 text-blue-400 shrink-0","aria-hidden":"true",children:e}),(0,t.jsx)("span",{children:s})]})}e.s(["default",0,function(){let e=(0,d.useTranslations)("cache"),[m,h]=(0,s.useState)(null),[u,p]=(0,s.useState)(!0),[b,j]=(0,s.useState)(!1),[g,v]=(0,s.useState)("overview"),f=(0,r.useNotificationStore)(),N=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/cache");if(e.ok){let t=await e.json();h(t)}}catch(e){console.error("[CachePage] Failed to fetch cache stats:",e)}finally{p(!1)}},[]);(0,s.useEffect)(()=>{N();let e=setInterval(()=>void N(),1e4);return()=>clearInterval(e)},[N]);let y=async()=>{j(!0);try{let t=await fetch("/api/cache",{method:"DELETE"});if(t.ok){let s=await t.json();f.success(e("clearSuccess",{count:s.expiredRemoved??0})),await N()}else f.error(e("clearError"))}catch(t){console.error("[CachePage] Failed to clear cache:",t),f.error(e("clearError"))}finally{j(!1)}},w=m?.semanticCache,C=m?.promptCache,S=m?.trend??[],k=m?.idempotency,T=w?parseFloat(w.hitRate):0,E=w?w.hits+w.misses:0,L=C&&C.totalRequests>0?C.requestsWithCacheControl/C.totalRequests*100:0,q=C?Object.entries(C.byProvider):[],R=Math.max(1,...S.map(e=>e.requests));return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e("description")})]}),(0,t.jsxs)("div",{className:"flex gap-2 shrink-0",children:[(0,t.jsx)(l.Button,{variant:"secondary",icon:"refresh",size:"sm",onClick:()=>void N(),disabled:u,"aria-label":e("refresh"),children:e("refresh")}),(0,t.jsx)(l.Button,{variant:"danger",icon:"delete_sweep",size:"sm",onClick:()=>void y(),disabled:b||u,loading:b,"aria-label":e("clearAll"),children:e("clearAll")})]})]}),(0,t.jsxs)("div",{className:"flex gap-1 p-1 rounded-lg bg-black/5 dark:bg-white/5 w-fit",children:[(0,t.jsx)("button",{onClick:()=>v("overview"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"overview"===g?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:e("overview")}),(0,t.jsx)("button",{onClick:()=>v("entries"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"entries"===g?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:e("entries")})]}),"entries"===g&&(0,t.jsx)(c,{}),"overview"===g&&(0,t.jsxs)(t.Fragment,{children:[u&&(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","aria-busy":"true","aria-label":"Loading cache statistics",children:Array.from({length:4}).map((e,s)=>(0,t.jsx)("div",{className:"h-24 rounded-xl bg-surface-raised animate-pulse"},s))}),!u&&!m&&(0,t.jsx)(i.EmptyState,{icon:"cached",title:e("unavailable"),description:e("unavailableDesc"),actionLabel:e("refresh"),onAction:()=>void N()}),!u&&m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsx)(n,{icon:"memory",label:e("memoryEntries"),value:w?.memoryEntries??0,sub:e("memoryEntriesSub")}),(0,t.jsx)(n,{icon:"storage",label:e("dbEntries"),value:w?.dbEntries??0,sub:e("dbEntriesSub")}),(0,t.jsx)(n,{icon:"trending_up",label:e("cacheHits"),value:w?.hits??0,sub:e("cacheHitsSub",{total:E}),valueClass:"text-green-500"}),(0,t.jsx)(n,{icon:"token",label:e("tokensSaved"),value:(w?.tokensSaved??0).toLocaleString(),sub:e("tokensSavedSub"),valueClass:"text-blue-400"})]}),(0,t.jsx)(a.Card,{children:(0,t.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"font-medium text-sm",children:e("performance")}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:e("autoRefresh",{seconds:10})})]}),(0,t.jsx)(x,{hitRate:T,label:e("hitRate")}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 pt-3 border-t border-border/30 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:w?.hits??0}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("hits")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums text-red-400",children:w?.misses??0}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("misses")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:E}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("total")})]})]})]})}),C&&(0,t.jsx)(a.Card,{children:(0,t.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"bolt"}),(0,t.jsx)("h2",{className:"font-medium text-sm",children:e("promptCache")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:C.requestsWithCacheControl.toLocaleString()}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("cachedRequests")})]}),(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsxs)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:[L.toFixed(1),"%"]}),(0,t.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[e("cacheHitRate")," (",C.requestsWithCacheControl,"/",C.totalRequests,")"]})]}),(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums text-blue-400",children:C.totalCachedTokens.toLocaleString()}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("cachedTokens")})]}),(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums text-purple-400",children:C.totalCacheCreationTokens.toLocaleString()}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("cacheCreationTokens")})]})]}),q.length>0&&(0,t.jsxs)("div",{className:"pt-3 border-t border-border/30",children:[(0,t.jsx)("h3",{className:"text-xs font-medium text-text-muted mb-3",children:e("byProvider")}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("provider")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("requests")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("inputTokens")}),(0,t.jsx)("th",{className:"pb-2 pr-4",children:e("cachedTokensCol")}),(0,t.jsx)("th",{className:"pb-2",children:e("cacheCreation")})]})}),(0,t.jsx)("tbody",{children:q.map(([e,s])=>(0,t.jsxs)("tr",{className:"border-b border-border/20",children:[(0,t.jsx)("td",{className:"py-2 pr-4 font-medium",children:e}),(0,t.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:s.requests.toLocaleString()}),(0,t.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:s.inputTokens.toLocaleString()}),(0,t.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:s.cachedTokens.toLocaleString()}),(0,t.jsx)("td",{className:"py-2 tabular-nums text-purple-400",children:s.cacheCreationTokens.toLocaleString()})]},e))})]})})]})]})}),S.length>0&&(0,t.jsx)(a.Card,{children:(0,t.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"timeline"}),(0,t.jsx)("h2",{className:"font-medium text-sm",children:e("trend24h")})]}),(0,t.jsx)("div",{className:"flex items-end gap-1 h-32",children:S.map(s=>{let a=Math.max(4,s.requests/R*100),l=s.requests>0?Math.max(2,s.cachedRequests/s.requests*a):0,i=new Date(s.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1 group relative",children:[(0,t.jsxs)("div",{className:"absolute bottom-full mb-1 hidden group-hover:block bg-surface-raised border border-border rounded px-2 py-1 text-xs whitespace-nowrap z-10",children:[i,": ",s.requests," ",e("requests").toLowerCase(),","," ",s.cachedRequests," ",e("cached").toLowerCase()]}),(0,t.jsxs)("div",{className:"w-full flex flex-col justify-end h-full gap-px",children:[(0,t.jsx)("div",{className:"w-full bg-green-500/30 rounded-t",style:{height:`${l}%`}}),(0,t.jsx)("div",{className:"w-full bg-text-muted/20 rounded-t",style:{height:`${a-l}%`}})]}),(0,t.jsx)("span",{className:"text-[10px] text-text-muted truncate w-full text-center",children:i.split(":")[0]})]},s.timestamp)})}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-text-muted",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded bg-text-muted/20"}),(0,t.jsx)("span",{children:e("total")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded bg-green-500/30"}),(0,t.jsx)("span",{children:e("cached")})]})]})]})}),(0,t.jsx)(a.Card,{children:(0,t.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,t.jsx)("h2",{className:"font-medium text-sm",children:e("behavior")}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,t.jsx)(o,{icon:"info",children:e("behaviorDeterministic")}),(0,t.jsx)(o,{icon:"info",children:e.rich("behaviorBypass",{header:()=>(0,t.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"X-OmniRoute-No-Cache: true"})})}),(0,t.jsx)(o,{icon:"info",children:e("behaviorTwoTier")}),(0,t.jsx)(o,{icon:"info",children:e.rich("behaviorTtl",{envVar:()=>(0,t.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"SEMANTIC_CACHE_TTL_MS"})})})]})]})}),(0,t.jsx)(a.Card,{children:(0,t.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"fingerprint"}),(0,t.jsx)("h2",{className:"font-medium text-sm",children:e("idempotency")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:k?.activeKeys??0}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("activeDedupKeys")})]}),(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:k?`${(k.windowMs/1e3).toFixed(0)}s`:"—"}),(0,t.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("dedupWindow")})]})]})]})})]})]})]})}],256765)}]);
|