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.
Files changed (249) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/build-manifest.json +3 -3
  3. package/app/.next/prerender-manifest.json +3 -3
  4. package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/audit/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/cache/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/cache/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/memory/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/_global-error.html +1 -1
  41. package/app/.next/server/app/_global-error.rsc +1 -1
  42. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  43. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  44. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  45. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  46. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  47. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/api/monitoring/health/route.js +3 -3
  49. package/app/.next/server/app/api/provider-models/route.js +2 -2
  50. package/app/.next/server/app/api/provider-nodes/[id]/route.js +2 -2
  51. package/app/.next/server/app/api/provider-nodes/route.js +3 -3
  52. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  53. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  54. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  55. package/app/.next/server/app/api/providers/[id]/sync-models/route.js +3 -3
  56. package/app/.next/server/app/api/providers/[id]/sync-models/route.js.nft.json +1 -1
  57. package/app/.next/server/app/api/providers/[id]/test/route.js +6 -6
  58. package/app/.next/server/app/api/providers/route.js +4 -4
  59. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  60. package/app/.next/server/app/api/providers/test-batch/route.js +5 -5
  61. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  62. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  63. package/app/.next/server/app/api/system/version/route.js.nft.json +1 -1
  64. package/app/.next/server/app/api/usage/[connectionId]/route.js +2 -2
  65. package/app/.next/server/app/api/usage/provider-limits/route.js +5 -5
  66. package/app/.next/server/app/api/usage/provider-limits/route.js.nft.json +1 -1
  67. package/app/.next/server/app/api/v1/models/route.js +4 -4
  68. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  69. package/app/.next/server/app/api/v1/route.js +4 -4
  70. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  71. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  72. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  73. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  74. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  77. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  79. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  81. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  82. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  83. package/app/.next/server/chunks/[root-of-the-server]__0.7zz6j._.js +1 -1
  84. package/app/.next/server/chunks/[root-of-the-server]__0.lz97q._.js +1 -1
  85. package/app/.next/server/chunks/[root-of-the-server]__0.m9_5-._.js +1 -1
  86. package/app/.next/server/chunks/[root-of-the-server]__00-bzx_._.js +1 -1
  87. package/app/.next/server/chunks/[root-of-the-server]__00hsd7k._.js +1 -1
  88. package/app/.next/server/chunks/[root-of-the-server]__00i_ryi._.js +1 -1
  89. package/app/.next/server/chunks/[root-of-the-server]__01fudn9._.js +1 -1
  90. package/app/.next/server/chunks/[root-of-the-server]__024slax._.js +1 -1
  91. package/app/.next/server/chunks/[root-of-the-server]__030_-af._.js +2 -2
  92. package/app/.next/server/chunks/[root-of-the-server]__03gl9dh._.js +2 -2
  93. package/app/.next/server/chunks/[root-of-the-server]__03x69ll._.js +1 -1
  94. package/app/.next/server/chunks/[root-of-the-server]__047np0t._.js +2 -2
  95. package/app/.next/server/chunks/[root-of-the-server]__04lc9.m._.js +2 -2
  96. package/app/.next/server/chunks/[root-of-the-server]__05u48b-._.js +1 -1
  97. package/app/.next/server/chunks/[root-of-the-server]__06dr~pl._.js +1 -1
  98. package/app/.next/server/chunks/[root-of-the-server]__06hr_sx._.js +1 -1
  99. package/app/.next/server/chunks/[root-of-the-server]__06r5eje._.js +2 -2
  100. package/app/.next/server/chunks/[root-of-the-server]__07.ui7z._.js +1 -1
  101. package/app/.next/server/chunks/[root-of-the-server]__075j.5s._.js +1 -1
  102. package/app/.next/server/chunks/[root-of-the-server]__07ju0wx._.js +1 -1
  103. package/app/.next/server/chunks/[root-of-the-server]__07wj.c4._.js +1 -1
  104. package/app/.next/server/chunks/[root-of-the-server]__08-9vz.._.js +1 -1
  105. package/app/.next/server/chunks/[root-of-the-server]__0908q-_._.js +1 -1
  106. package/app/.next/server/chunks/[root-of-the-server]__09blmoy._.js +1 -1
  107. package/app/.next/server/chunks/[root-of-the-server]__09c50mp._.js +1 -1
  108. package/app/.next/server/chunks/[root-of-the-server]__0a.3c_r._.js +1 -1
  109. package/app/.next/server/chunks/[root-of-the-server]__0bkx9sd._.js +1 -1
  110. package/app/.next/server/chunks/[root-of-the-server]__0c4v_hg._.js +2 -2
  111. package/app/.next/server/chunks/[root-of-the-server]__0c5t729._.js +1 -1
  112. package/app/.next/server/chunks/[root-of-the-server]__0cem6i6._.js +1 -1
  113. package/app/.next/server/chunks/[root-of-the-server]__0d-qyrk._.js +2 -2
  114. package/app/.next/server/chunks/[root-of-the-server]__0d-rd-n._.js +1 -1
  115. package/app/.next/server/chunks/[root-of-the-server]__0djfz6n._.js +1 -1
  116. package/app/.next/server/chunks/[root-of-the-server]__0dmb7bd._.js +1 -1
  117. package/app/.next/server/chunks/[root-of-the-server]__0e7dp.z._.js +2 -2
  118. package/app/.next/server/chunks/[root-of-the-server]__0el_v65._.js +1 -1
  119. package/app/.next/server/chunks/[root-of-the-server]__0enebbv._.js +2 -2
  120. package/app/.next/server/chunks/[root-of-the-server]__0enecpa._.js +1 -1
  121. package/app/.next/server/chunks/[root-of-the-server]__0eps0zu._.js +1 -1
  122. package/app/.next/server/chunks/[root-of-the-server]__0fbv0zh._.js +1 -1
  123. package/app/.next/server/chunks/[root-of-the-server]__0fmf-tk._.js +1 -1
  124. package/app/.next/server/chunks/[root-of-the-server]__0fw0v5q._.js +2 -2
  125. package/app/.next/server/chunks/[root-of-the-server]__0g0b9au._.js +1 -1
  126. package/app/.next/server/chunks/[root-of-the-server]__0gukblk._.js +1 -1
  127. package/app/.next/server/chunks/[root-of-the-server]__0h-q5l0._.js +1 -1
  128. package/app/.next/server/chunks/[root-of-the-server]__0h1fgwr._.js +1 -1
  129. package/app/.next/server/chunks/[root-of-the-server]__0h86b7i._.js +1 -1
  130. package/app/.next/server/chunks/[root-of-the-server]__0h~a5f1._.js +1 -1
  131. package/app/.next/server/chunks/[root-of-the-server]__0irqapk._.js +1 -1
  132. package/app/.next/server/chunks/[root-of-the-server]__0j0ez8_._.js +2 -2
  133. package/app/.next/server/chunks/[root-of-the-server]__0jacr87._.js +1 -1
  134. package/app/.next/server/chunks/[root-of-the-server]__0jnihz9._.js +1 -1
  135. package/app/.next/server/chunks/[root-of-the-server]__0jp3yj4._.js +1 -1
  136. package/app/.next/server/chunks/[root-of-the-server]__0llqbda._.js +2 -2
  137. package/app/.next/server/chunks/[root-of-the-server]__0m-356c._.js +1 -1
  138. package/app/.next/server/chunks/[root-of-the-server]__0mj7x5~._.js +8 -8
  139. package/app/.next/server/chunks/[root-of-the-server]__0mpnloa._.js +1 -1
  140. package/app/.next/server/chunks/[root-of-the-server]__0n-~kvf._.js +1 -1
  141. package/app/.next/server/chunks/[root-of-the-server]__0n.gjo8._.js +2 -2
  142. package/app/.next/server/chunks/[root-of-the-server]__0n0nara._.js +1 -1
  143. package/app/.next/server/chunks/[root-of-the-server]__0ncz8xj._.js +1 -1
  144. package/app/.next/server/chunks/[root-of-the-server]__0oph175._.js +1 -1
  145. package/app/.next/server/chunks/[root-of-the-server]__0p3a7_l._.js +1 -1
  146. package/app/.next/server/chunks/[root-of-the-server]__0pl_899._.js +1 -1
  147. package/app/.next/server/chunks/[root-of-the-server]__0prott7._.js +2 -2
  148. package/app/.next/server/chunks/[root-of-the-server]__0pwiejj._.js +1 -1
  149. package/app/.next/server/chunks/[root-of-the-server]__0pxqo8v._.js +1 -1
  150. package/app/.next/server/chunks/[root-of-the-server]__0q04t~4._.js +1 -1
  151. package/app/.next/server/chunks/[root-of-the-server]__0q9h_5u._.js +1 -1
  152. package/app/.next/server/chunks/[root-of-the-server]__0qaruz-._.js +1 -1
  153. package/app/.next/server/chunks/[root-of-the-server]__0qka2s7._.js +1 -1
  154. package/app/.next/server/chunks/[root-of-the-server]__0rnvi83._.js +1 -1
  155. package/app/.next/server/chunks/[root-of-the-server]__0rpwwig._.js +1 -1
  156. package/app/.next/server/chunks/[root-of-the-server]__0rs2ec_._.js +1 -1
  157. package/app/.next/server/chunks/[root-of-the-server]__0s1dq3.._.js +1 -1
  158. package/app/.next/server/chunks/[root-of-the-server]__0s1ya.l._.js +5 -5
  159. package/app/.next/server/chunks/[root-of-the-server]__0svm~lc._.js +1 -1
  160. package/app/.next/server/chunks/[root-of-the-server]__0t83olx._.js +1 -1
  161. package/app/.next/server/chunks/[root-of-the-server]__0tsl88m._.js +1 -1
  162. package/app/.next/server/chunks/[root-of-the-server]__0uctzvq._.js +1 -1
  163. package/app/.next/server/chunks/[root-of-the-server]__0vkqjj1._.js +2 -2
  164. package/app/.next/server/chunks/[root-of-the-server]__0vwq47l._.js +1 -1
  165. package/app/.next/server/chunks/[root-of-the-server]__0vx1juw._.js +1 -1
  166. package/app/.next/server/chunks/[root-of-the-server]__0vzvfbd._.js +2 -2
  167. package/app/.next/server/chunks/[root-of-the-server]__0w39cdo._.js +1 -1
  168. package/app/.next/server/chunks/[root-of-the-server]__0wc__c~._.js +1 -1
  169. package/app/.next/server/chunks/[root-of-the-server]__0y2h760._.js +1 -1
  170. package/app/.next/server/chunks/[root-of-the-server]__0y_c7uk._.js +2 -2
  171. package/app/.next/server/chunks/[root-of-the-server]__0~8fltv._.js +1 -1
  172. package/app/.next/server/chunks/[root-of-the-server]__0~dj8ev._.js +2 -2
  173. package/app/.next/server/chunks/[root-of-the-server]__10.x-iq._.js +4 -4
  174. package/app/.next/server/chunks/[root-of-the-server]__10e1a_z._.js +2 -2
  175. package/app/.next/server/chunks/[root-of-the-server]__10o_k-p._.js +2 -2
  176. package/app/.next/server/chunks/[root-of-the-server]__10smy7g._.js +1 -1
  177. package/app/.next/server/chunks/[root-of-the-server]__11wa4b~._.js +1 -1
  178. package/app/.next/server/chunks/[root-of-the-server]__11xpr8u._.js +1 -1
  179. package/app/.next/server/chunks/[root-of-the-server]__122-jdl._.js +8 -8
  180. package/app/.next/server/chunks/[root-of-the-server]__12e9-l1._.js +1 -1
  181. package/app/.next/server/chunks/[root-of-the-server]__12gh.g1._.js +1 -1
  182. package/app/.next/server/chunks/[root-of-the-server]__136nal9._.js +1 -1
  183. package/app/.next/server/chunks/[root-of-the-server]__13_i443._.js +1 -1
  184. package/app/.next/server/chunks/[root-of-the-server]__13c-d_4._.js +2 -2
  185. package/app/.next/server/chunks/_0-jnvci._.js +1 -1
  186. package/app/.next/server/chunks/_0-~thzo._.js +1 -1
  187. package/app/.next/server/chunks/_00.pgsp._.js +1 -1
  188. package/app/.next/server/chunks/_013gowh._.js +1 -1
  189. package/app/.next/server/chunks/{_03c-j3o._.js → _02~yzex._.js} +2 -2
  190. package/app/.next/server/chunks/_036lxbr._.js +1 -1
  191. package/app/.next/server/chunks/_05reh6o._.js +1 -1
  192. package/app/.next/server/chunks/_0a3.3sc._.js +1 -1
  193. package/app/.next/server/chunks/_0c.abwr._.js +1 -1
  194. package/app/.next/server/chunks/_0due8oe._.js +2 -2
  195. package/app/.next/server/chunks/_0h-j8c2._.js +1 -1
  196. package/app/.next/server/chunks/_0k43pd6._.js +3 -3
  197. package/app/.next/server/chunks/_0vx-r0i._.js +2 -2
  198. package/app/.next/server/chunks/_10.rw9f._.js +1 -1
  199. package/app/.next/server/chunks/_13mo7j5._.js +1 -1
  200. package/app/.next/server/chunks/src_0f_le~m._.js +1 -1
  201. package/app/.next/server/chunks/ssr/_008ht2n._.js +2 -2
  202. package/app/.next/server/chunks/ssr/_0oo1f90._.js +2 -2
  203. package/app/.next/server/chunks/ssr/_0~laquj._.js +1 -1
  204. package/app/.next/server/chunks/ssr/src_04gjot1._.js +1 -1
  205. package/app/.next/server/chunks/ssr/src_app_(dashboard)_dashboard_cache_04_vca6._.js +1 -1
  206. package/app/.next/server/chunks/ssr/{src_app_(dashboard)_dashboard_settings_0ni3aus._.js → src_app_(dashboard)_dashboard_settings_09gq48u._.js} +2 -2
  207. package/app/.next/server/chunks/ssr/src_i18n_messages_en_json_[json]_cjs_13rg.m2._.js +1 -1
  208. package/app/.next/server/chunks/ssr/src_i18n_messages_pt-BR_json_[json]_cjs_01n5fvn._.js +1 -1
  209. package/app/.next/server/chunks/ssr/src_i18n_messages_pt_json_[json]_cjs_0fwb8p.._.js +1 -1
  210. package/app/.next/server/chunks/ssr/src_shared_0jy4djq._.js +3 -0
  211. package/app/.next/server/chunks/ssr/src_shared_components_0v5o286._.js +3 -0
  212. package/app/.next/server/middleware-build-manifest.js +3 -3
  213. package/app/.next/server/pages/500.html +1 -1
  214. package/app/.next/server/server-reference-manifest.js +1 -1
  215. package/app/.next/server/server-reference-manifest.json +1 -1
  216. package/app/.next/static/chunks/{03~_6b5~n101_.js → 0.ap2gsi3d-1e.js} +1 -1
  217. package/app/.next/static/chunks/08iujr48xci8k.js +1 -0
  218. package/app/.next/static/chunks/{0up_y.7qkqwxz.js → 08n6n76lz~vt6.js} +1 -1
  219. package/app/.next/static/chunks/{060zmf~qn1q6y.js → 0f611s~575pn8.js} +1 -1
  220. package/app/.next/static/chunks/0y5kx9rgeb6~_.js +1 -0
  221. package/app/.next/static/chunks/13xz-222deqiy.js +1 -0
  222. package/app/CHANGELOG.md +18 -0
  223. package/app/docs/openapi.yaml +1 -1
  224. package/app/llm.txt +2 -2
  225. package/app/open-sse/handlers/chatCore.ts +2 -2
  226. package/app/open-sse/package.json +1 -1
  227. package/app/open-sse/translator/request/claude-to-gemini.ts +17 -0
  228. package/app/open-sse/translator/request/openai-to-gemini.ts +14 -3
  229. package/app/open-sse/utils/stream.ts +2 -2
  230. package/app/package-lock.json +3 -3
  231. package/app/package.json +1 -1
  232. package/app/src/app/(dashboard)/dashboard/cache/components/CacheTrends.tsx +19 -12
  233. package/app/src/app/(dashboard)/dashboard/cache/page.tsx +0 -3
  234. package/app/src/app/(dashboard)/dashboard/memory/page.tsx +20 -20
  235. package/app/src/i18n/messages/en.json +55 -1
  236. package/app/src/i18n/messages/pt-BR.json +53 -0
  237. package/app/src/i18n/messages/pt.json +54 -1
  238. package/app/src/shared/constants/providers.ts +40 -0
  239. package/app/src/shared/constants/sidebarVisibility.ts +6 -0
  240. package/app/src/shared/utils/circuitBreaker.ts +14 -4
  241. package/package.json +1 -1
  242. package/app/.next/server/chunks/ssr/src_05ekey-._.js +0 -3
  243. package/app/.next/server/chunks/ssr/src_100xxow._.js +0 -3
  244. package/app/.next/static/chunks/05tcrkqknq.20.js +0 -1
  245. package/app/.next/static/chunks/0eng4c9gz1s4..js +0 -1
  246. package/app/.next/static/chunks/0go~kwn1zgxnd.js +0 -1
  247. /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_buildManifest.js +0 -0
  248. /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_clientMiddlewareManifest.js +0 -0
  249. /package/app/.next/static/{Dbb1D6OoD7WlyZuPBm3L6 → ImZm5czz4prt8gnJPx7vv}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[172992,a=>a.a(async(b,c)=>{try{var d=a.i(739906),e=a.i(587377),f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),442308,a=>a.a(async(b,c)=>{try{a.i(674204),a.i(59809),a.i(812955),a.i(436595),a.i(940436),a.i(831097),a.i(936561),a.i(497160),a.i(533285);var d=a.i(604195),e=a.i(561487),f=a.i(811118),g=a.i(303648),h=a.i(33723);a.i(743442);var i=a.i(93225);a.i(646958),a.i(511064),a.i(930510),a.i(883818),a.i(795479),a.i(405309),a.i(505825),a.i(394093),a.i(317291),a.i(296193),a.i(581349),a.i(441581),a.i(336444),a.i(934140),a.i(198106),a.i(690851),a.i(29198);var j=a.i(172992),k=b([d,e,f,g,h,i,j]);[d,e,f,g,h,i,j]=k.then?(await k)():k,a.s([]),c()}catch(a){c(a)}},!1),292216,a=>{"use strict";var b=a.i(436595);a.s(["Card",()=>b.default])},294023,a=>{"use strict";var b=a.i(674204);a.s(["Button",()=>b.default])},489108,a=>{"use strict";var b=a.i(59809);a.s(["Input",()=>b.default])},818465,a=>{"use strict";var b=a.i(497160);a.s(["Badge",()=>b.default])},525290,a=>{"use strict";var b=a.i(812955);a.s(["Select",()=>b.default])},518263,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(292216),h=a.i(818465),i=a.i(294023),j=a.i(489108),k=a.i(525290),l=a.i(415925),m=b([f]);[f]=m.then?(await m)():m,a.s(["default",0,function(){(0,l.useTranslations)("memory");let[a,b]=(0,e.useState)([]),[c,f]=(0,e.useState)({totalEntries:0,tokensUsed:0,hitRate:0}),[m,n]=(0,e.useState)("all"),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!0);(0,e.useEffect)(()=>{s()},[]);let s=async()=>{try{let a=await fetch("/api/memory");if(a.ok){let c=await a.json();b(c.memories||[]),f(c.stats||{totalEntries:0,tokensUsed:0,hitRate:0})}}catch(a){console.error("Failed to fetch memories:",a)}finally{r(!1)}},t=async c=>{try{await fetch(`/api/memory/${c}`,{method:"DELETE"}),b(a.filter(a=>a.id!==c))}catch(a){console.error("Failed to delete memory:",a)}},u=a.filter(a=>{let b="all"===m||a.type===m,c=""===o||a.content.toLowerCase().includes(o.toLowerCase())||a.key.toLowerCase().includes(o.toLowerCase());return b&&c});return q?(0,d.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900"})}):(0,d.jsxs)("div",{className:"space-y-6 p-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold",children:"Memory Management"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.Button,{variant:"outline",onClick:()=>{let b=JSON.stringify(a,null,2),c=new Blob([b],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`memory-export-${new Date().toISOString()}.json`,e.click()},children:"Export"}),(0,d.jsx)(i.Button,{variant:"outline",children:"Import"}),(0,d.jsx)(i.Button,{children:"Add Memory"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:"Total Entries"}),(0,d.jsx)("div",{className:"text-2xl font-bold",children:c.totalEntries})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:"Tokens Used"}),(0,d.jsx)("div",{className:"text-2xl font-bold",children:c.tokensUsed.toLocaleString()})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:"Hit Rate"}),(0,d.jsxs)("div",{className:"text-2xl font-bold",children:[(100*c.hitRate).toFixed(1),"%"]})]})})]}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Memories"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{placeholder:"Search memories...",value:o,onChange:a=>p(a.target.value),className:"w-64"}),(0,d.jsxs)(k.Select,{value:m,onChange:a=>n(a.target.value),children:[(0,d.jsx)("option",{value:"all",children:"All Types"}),(0,d.jsx)("option",{value:"factual",children:"Factual"}),(0,d.jsx)("option",{value:"episodic",children:"Episodic"}),(0,d.jsx)("option",{value:"procedural",children:"Procedural"}),(0,d.jsx)("option",{value:"semantic",children:"Semantic"})]})]})]}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"border-b",children:[(0,d.jsx)("th",{className:"text-left py-2 px-4",children:"Type"}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:"Key"}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:"Content"}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:"Created"}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:"Actions"})]})}),(0,d.jsx)("tbody",{children:u.map(a=>(0,d.jsxs)("tr",{className:"border-b",children:[(0,d.jsx)("td",{className:"py-2 px-4",children:(0,d.jsx)(h.Badge,{variant:(a=>{switch(a){case"factual":return"info";case"episodic":return"success";case"procedural":return"warning";case"semantic":return"error";default:return"default"}})(a.type),children:a.type})}),(0,d.jsx)("td",{className:"py-2 px-4 font-medium",children:a.key}),(0,d.jsx)("td",{className:"py-2 px-4 max-w-md truncate",children:a.content}),(0,d.jsx)("td",{className:"py-2 px-4",children:new Date(a.createdAt).toLocaleDateString()}),(0,d.jsx)("td",{className:"py-2 px-4",children:(0,d.jsx)(i.Button,{variant:"ghost",size:"sm",onClick:()=>t(a.id),children:"Delete"})})]},a.id))})]})})]})})]})}]),c()}catch(a){c(a)}},!1)];
1
+ module.exports=[172992,a=>a.a(async(b,c)=>{try{var d=a.i(739906),e=a.i(587377),f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),442308,a=>a.a(async(b,c)=>{try{a.i(674204),a.i(59809),a.i(812955),a.i(436595),a.i(940436),a.i(831097),a.i(936561),a.i(497160),a.i(533285);var d=a.i(604195),e=a.i(561487),f=a.i(811118),g=a.i(303648),h=a.i(33723);a.i(743442);var i=a.i(93225);a.i(646958),a.i(511064),a.i(930510),a.i(883818),a.i(795479),a.i(405309),a.i(505825),a.i(394093),a.i(317291),a.i(296193),a.i(581349),a.i(441581),a.i(336444),a.i(934140),a.i(198106),a.i(690851),a.i(29198);var j=a.i(172992),k=b([d,e,f,g,h,i,j]);[d,e,f,g,h,i,j]=k.then?(await k)():k,a.s([]),c()}catch(a){c(a)}},!1),292216,a=>{"use strict";var b=a.i(436595);a.s(["Card",()=>b.default])},294023,a=>{"use strict";var b=a.i(674204);a.s(["Button",()=>b.default])},489108,a=>{"use strict";var b=a.i(59809);a.s(["Input",()=>b.default])},818465,a=>{"use strict";var b=a.i(497160);a.s(["Badge",()=>b.default])},525290,a=>{"use strict";var b=a.i(812955);a.s(["Select",()=>b.default])},518263,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(292216),h=a.i(818465),i=a.i(294023),j=a.i(489108),k=a.i(525290),l=a.i(415925),m=b([f]);[f]=m.then?(await m)():m,a.s(["default",0,function(){let a=(0,l.useTranslations)("memory"),[b,c]=(0,e.useState)([]),[f,m]=(0,e.useState)({totalEntries:0,tokensUsed:0,hitRate:0}),[n,o]=(0,e.useState)("all"),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!0);(0,e.useEffect)(()=>{t()},[]);let t=async()=>{try{let a=await fetch("/api/memory");if(a.ok){let b=await a.json();c(b.memories||[]),m(b.stats||{totalEntries:0,tokensUsed:0,hitRate:0})}}catch(a){console.error("Failed to fetch memories:",a)}finally{s(!1)}},u=async a=>{try{await fetch(`/api/memory/${a}`,{method:"DELETE"}),c(b.filter(b=>b.id!==a))}catch(a){console.error("Failed to delete memory:",a)}},v=b.filter(a=>{let b="all"===n||a.type===n,c=""===p||a.content.toLowerCase().includes(p.toLowerCase())||a.key.toLowerCase().includes(p.toLowerCase());return b&&c});return r?(0,d.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900"})}):(0,d.jsxs)("div",{className:"space-y-6 p-6",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold",children:a("title")}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.Button,{variant:"outline",onClick:()=>{let a=JSON.stringify(b,null,2),c=new Blob([a],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`memory-export-${new Date().toISOString()}.json`,e.click()},children:a("export")}),(0,d.jsx)(i.Button,{variant:"outline",children:a("import")}),(0,d.jsx)(i.Button,{children:a("addMemory")})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:a("totalEntries")}),(0,d.jsx)("div",{className:"text-2xl font-bold",children:f.totalEntries})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:a("tokensUsed")}),(0,d.jsx)("div",{className:"text-2xl font-bold",children:f.tokensUsed.toLocaleString()})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsx)("div",{className:"text-sm text-gray-500",children:a("hitRate")}),(0,d.jsxs)("div",{className:"text-2xl font-bold",children:[(100*f.hitRate).toFixed(1),"%"]})]})})]}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:a("memories")}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{placeholder:a("search"),value:p,onChange:a=>q(a.target.value),className:"w-64"}),(0,d.jsxs)(k.Select,{value:n,onChange:a=>o(a.target.value),children:[(0,d.jsx)("option",{value:"all",children:a("allTypes")}),(0,d.jsx)("option",{value:"factual",children:a("factual")}),(0,d.jsx)("option",{value:"episodic",children:a("episodic")}),(0,d.jsx)("option",{value:"procedural",children:a("procedural")}),(0,d.jsx)("option",{value:"semantic",children:a("semantic")})]})]})]}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"border-b",children:[(0,d.jsx)("th",{className:"text-left py-2 px-4",children:a("type")}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:a("key")}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:a("content")}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:a("created")}),(0,d.jsx)("th",{className:"text-left py-2 px-4",children:a("actions")})]})}),(0,d.jsx)("tbody",{children:v.map(b=>(0,d.jsxs)("tr",{className:"border-b",children:[(0,d.jsx)("td",{className:"py-2 px-4",children:(0,d.jsx)(h.Badge,{variant:(a=>{switch(a){case"factual":return"info";case"episodic":return"success";case"procedural":return"warning";case"semantic":return"error";default:return"default"}})(b.type),children:b.type})}),(0,d.jsx)("td",{className:"py-2 px-4 font-medium",children:b.key}),(0,d.jsx)("td",{className:"py-2 px-4 max-w-md truncate",children:b.content}),(0,d.jsx)("td",{className:"py-2 px-4",children:new Date(b.createdAt).toLocaleDateString()}),(0,d.jsx)("td",{className:"py-2 px-4",children:(0,d.jsx)(i.Button,{variant:"ghost",size:"sm",onClick:()=>u(b.id),children:a("delete")})})]},b.id))})]})})]})})]})}]),c()}catch(a){c(a)}},!1)];
2
2
 
3
3
  //# sourceMappingURL=src_04gjot1._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[171387,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(294023),h=a.i(415925),i=b([f]);[f]=i.then?(await i)():i,a.s(["default",0,function(){let a=(0,h.useTranslations)("cache"),[b,c]=(0,e.useState)([]),[f,i]=(0,e.useState)({page:1,limit:20,total:0,totalPages:0}),[j,k]=(0,e.useState)(!0),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(null),p=(0,e.useCallback)(async(a=1)=>{k(!0);try{let b=new URLSearchParams({page:String(a),limit:String(f.limit)});l&&b.set("search",l);let d=await fetch(`/api/cache/entries?${b}`);if(d.ok){let a=await d.json();c(a.entries),i(a.pagination)}}catch{}finally{k(!1)}},[l,f.limit]);(0,e.useEffect)(()=>{p()},[p]);let q=async a=>{o(a);try{await fetch(`/api/cache/entries?signature=${encodeURIComponent(a)}`,{method:"DELETE"}),await p(f.page)}finally{o(null)}},r=a=>new Date(a).toLocaleString();return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("input",{type:"text",placeholder:a("searchEntries"),value:l,onChange:a=>m(a.target.value),onKeyDown:a=>"Enter"===a.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,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(),children:a("search")})]}),j?(0,d.jsx)("div",{className:"text-sm text-text-muted",children:a("loading")}):0===b.length?(0,d.jsx)("div",{className:"text-sm text-text-muted text-center py-8",children:a("noEntries")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("signature")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("model")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("hits")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("tokensSaved")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("created")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("expires")}),(0,d.jsx)("th",{className:"pb-2",children:a("actions")})]})}),(0,d.jsx)("tbody",{children:b.map(a=>(0,d.jsxs)("tr",{className:"border-b border-border/20",children:[(0,d.jsxs)("td",{className:"py-2 pr-4 font-mono text-xs",children:[a.signature.slice(0,12),"..."]}),(0,d.jsx)("td",{className:"py-2 pr-4",children:a.model}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:a.hit_count}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:a.tokens_saved.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:r(a.created_at)}),(0,d.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:r(a.expires_at)}),(0,d.jsx)("td",{className:"py-2",children:(0,d.jsx)("button",{onClick:()=>q(a.signature),disabled:n===a.signature,className:"text-xs text-red-400 hover:text-red-300 disabled:opacity-50",children:n===a.signature?"...":"🗑️"})})]},a.id))})]})}),f.totalPages>1&&(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-2",children:[(0,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(f.page-1),disabled:f.page<=1,children:"←"}),(0,d.jsxs)("span",{className:"text-sm text-text-muted",children:[f.page," / ",f.totalPages]}),(0,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(f.page+1),disabled:f.page>=f.totalPages,children:"→"})]})]})]})}]),c()}catch(a){c(a)}},!1),92191,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(292216),h=a.i(294023),i=a.i(609754),j=a.i(240246),k=a.i(415925),l=a.i(171387),m=a.i(976066),n=b([f,l,m]);function o({icon:a,label:b,value:c,sub:e,valueClass:f="text-text"}){return(0,d.jsxs)("div",{className:"flex flex-col gap-1 p-4 rounded-xl bg-surface-raised border border-border/40",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base leading-none","aria-hidden":"true",children:a}),b]}),(0,d.jsx)("div",{className:`text-2xl font-semibold tabular-nums ${f}`,children:c}),e&&(0,d.jsx)("div",{className:"text-xs text-text-muted",children:e})]})}function p({hitRate:a,label:b}){let c=a>=70?"bg-green-500":a>=40?"bg-amber-400":"bg-red-500",e=a>=70?"text-green-500":a>=40?"text-amber-400":"text-red-500";return(0,d.jsxs)("div",{className:"w-full",role:"progressbar","aria-label":b,"aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[(0,d.jsxs)("div",{className:"flex justify-between text-xs mb-1.5",children:[(0,d.jsx)("span",{className:"text-text-muted",children:b}),(0,d.jsxs)("span",{className:`font-semibold tabular-nums ${e}`,children:[a.toFixed(1),"%"]})]}),(0,d.jsx)("div",{className:"w-full h-2 rounded-full bg-surface/50 overflow-hidden",children:(0,d.jsx)("div",{className:`h-full rounded-full transition-all duration-500 ${c}`,style:{width:`${Math.min(a,100)}%`}})})]})}function q({icon:a,children:b}){return(0,d.jsxs)("div",{className:"flex gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base leading-5 text-blue-400 shrink-0","aria-hidden":"true",children:a}),(0,d.jsx)("span",{children:b})]})}[f,l,m]=n.then?(await n)():n;a.s(["default",0,function(){let a=(0,k.useTranslations)("cache"),[b,c]=(0,e.useState)(null),[f,n]=(0,e.useState)(!0),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)("overview"),v=(0,j.useNotificationStore)(),w=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cache");if(a.ok){let b=await a.json();c(b)}}catch(a){console.error("[CachePage] Failed to fetch cache stats:",a)}finally{n(!1)}},[]);(0,e.useEffect)(()=>{w();let a=setInterval(()=>void w(),1e4);return()=>clearInterval(a)},[w]);let x=async()=>{s(!0);try{let b=await fetch("/api/cache",{method:"DELETE"});if(b.ok){let c=await b.json();v.success(a("clearSuccess",{count:c.expiredRemoved??0})),await w()}else v.error(a("clearError"))}catch(b){console.error("[CachePage] Failed to clear cache:",b),v.error(a("clearError"))}finally{s(!1)}},y=b?.semanticCache,z=b?.promptCache,A=b?.trend??[],B=b?.idempotency,C=y?parseFloat(y.hitRate):0,D=y?y.hits+y.misses:0,E=z&&z.totalRequests>0?z.requestsWithCacheControl/z.totalRequests*100:0,F=z?Object.entries(z.byProvider):[],G=Math.max(1,...A.map(a=>a.requests));return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-xl font-semibold",children:a("title")}),(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a("description")})]}),(0,d.jsxs)("div",{className:"flex gap-2 shrink-0",children:[(0,d.jsx)(h.Button,{variant:"secondary",icon:"refresh",size:"sm",onClick:()=>void w(),disabled:f,"aria-label":a("refresh"),children:a("refresh")}),(0,d.jsx)(h.Button,{variant:"danger",icon:"delete_sweep",size:"sm",onClick:()=>void x(),disabled:r||f,loading:r,"aria-label":a("clearAll"),children:a("clearAll")})]})]}),(0,d.jsxs)("div",{className:"flex gap-1 p-1 rounded-lg bg-black/5 dark:bg-white/5 w-fit",children:[(0,d.jsx)("button",{onClick:()=>u("overview"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"overview"===t?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:a("overview")}),(0,d.jsx)("button",{onClick:()=>u("entries"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"entries"===t?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:a("entries")})]}),"entries"===t&&(0,d.jsx)(l.default,{}),"overview"===t&&(0,d.jsxs)(d.Fragment,{children:[f&&(0,d.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((a,b)=>(0,d.jsx)("div",{className:"h-24 rounded-xl bg-surface-raised animate-pulse"},b))}),!f&&!b&&(0,d.jsx)(i.EmptyState,{icon:"cached",title:a("unavailable"),description:a("unavailableDesc"),actionLabel:a("refresh"),onAction:()=>void w()}),!f&&b&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsx)(o,{icon:"memory",label:a("memoryEntries"),value:y?.memoryEntries??0,sub:a("memoryEntriesSub")}),(0,d.jsx)(o,{icon:"storage",label:a("dbEntries"),value:y?.dbEntries??0,sub:a("dbEntriesSub")}),(0,d.jsx)(o,{icon:"trending_up",label:a("cacheHits"),value:y?.hits??0,sub:a("cacheHitsSub",{total:D}),valueClass:"text-green-500"}),(0,d.jsx)(o,{icon:"token",label:a("tokensSaved"),value:(y?.tokensSaved??0).toLocaleString(),sub:a("tokensSavedSub"),valueClass:"text-blue-400"})]}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("performance")}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:a("autoRefresh",{seconds:10})})]}),(0,d.jsx)(p,{hitRate:C,label:a("hitRate")}),(0,d.jsxs)("div",{className:"grid grid-cols-3 gap-4 pt-3 border-t border-border/30 text-center",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:y?.hits??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("hits")})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-red-400",children:y?.misses??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("misses")})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:D}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("total")})]})]})]})}),z&&(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"bolt"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("promptCache")})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:z.requestsWithCacheControl.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cachedRequests")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsxs)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:[E.toFixed(1),"%"]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[a("cacheHitRate")," (",z.requestsWithCacheControl,"/",z.totalRequests,")"]})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-blue-400",children:z.totalCachedTokens.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cachedTokens")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-purple-400",children:z.totalCacheCreationTokens.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cacheCreationTokens")})]})]}),F.length>0&&(0,d.jsxs)("div",{className:"pt-3 border-t border-border/30",children:[(0,d.jsx)("h3",{className:"text-xs font-medium text-text-muted mb-3",children:a("byProvider")}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("provider")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("requests")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("inputTokens")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("cachedTokensCol")}),(0,d.jsx)("th",{className:"pb-2",children:a("cacheCreation")})]})}),(0,d.jsx)("tbody",{children:F.map(([a,b])=>(0,d.jsxs)("tr",{className:"border-b border-border/20",children:[(0,d.jsx)("td",{className:"py-2 pr-4 font-medium",children:a}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:b.requests.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:b.inputTokens.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:b.cachedTokens.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 tabular-nums text-purple-400",children:b.cacheCreationTokens.toLocaleString()})]},a))})]})})]})]})}),(0,d.jsx)(m.default,{}),A.length>0&&(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"timeline"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("trend24h")})]}),(0,d.jsx)("div",{className:"flex items-end gap-1 h-32",children:A.map(b=>{let c=Math.max(4,b.requests/G*100),e=b.requests>0?Math.max(2,b.cachedRequests/b.requests*c):0,f=new Date(b.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return(0,d.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1 group relative",children:[(0,d.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:[f,": ",b.requests," ",a("requests").toLowerCase(),","," ",b.cachedRequests," ",a("cached").toLowerCase()]}),(0,d.jsxs)("div",{className:"w-full flex flex-col justify-end h-full gap-px",children:[(0,d.jsx)("div",{className:"w-full bg-green-500/30 rounded-t",style:{height:`${e}%`}}),(0,d.jsx)("div",{className:"w-full bg-text-muted/20 rounded-t",style:{height:`${c-e}%`}})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted truncate w-full text-center",children:f.split(":")[0]})]},b.timestamp)})}),(0,d.jsxs)("div",{className:"flex items-center gap-4 text-xs text-text-muted",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded bg-text-muted/20"}),(0,d.jsx)("span",{children:a("total")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded bg-green-500/30"}),(0,d.jsx)("span",{children:a("cached")})]})]})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("behavior")}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,d.jsx)(q,{icon:"info",children:a("behaviorDeterministic")}),(0,d.jsx)(q,{icon:"info",children:a.rich("behaviorBypass",{header:()=>(0,d.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"X-OmniRoute-No-Cache: true"})})}),(0,d.jsx)(q,{icon:"info",children:a("behaviorTwoTier")}),(0,d.jsx)(q,{icon:"info",children:a.rich("behaviorTtl",{envVar:()=>(0,d.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"SEMANTIC_CACHE_TTL_MS"})})})]})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"fingerprint"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("idempotency")})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:B?.activeKeys??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("activeDedupKeys")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:B?`${(B.windowMs/1e3).toFixed(0)}s`:"—"}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("dedupWindow")})]})]})]})})]})]})]})}]),c()}catch(a){c(a)}},!1)];
1
+ module.exports=[171387,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(294023),h=a.i(415925),i=b([f]);[f]=i.then?(await i)():i,a.s(["default",0,function(){let a=(0,h.useTranslations)("cache"),[b,c]=(0,e.useState)([]),[f,i]=(0,e.useState)({page:1,limit:20,total:0,totalPages:0}),[j,k]=(0,e.useState)(!0),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(null),p=(0,e.useCallback)(async(a=1)=>{k(!0);try{let b=new URLSearchParams({page:String(a),limit:String(f.limit)});l&&b.set("search",l);let d=await fetch(`/api/cache/entries?${b}`);if(d.ok){let a=await d.json();c(a.entries),i(a.pagination)}}catch{}finally{k(!1)}},[l,f.limit]);(0,e.useEffect)(()=>{p()},[p]);let q=async a=>{o(a);try{await fetch(`/api/cache/entries?signature=${encodeURIComponent(a)}`,{method:"DELETE"}),await p(f.page)}finally{o(null)}},r=a=>new Date(a).toLocaleString();return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("input",{type:"text",placeholder:a("searchEntries"),value:l,onChange:a=>m(a.target.value),onKeyDown:a=>"Enter"===a.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,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(),children:a("search")})]}),j?(0,d.jsx)("div",{className:"text-sm text-text-muted",children:a("loading")}):0===b.length?(0,d.jsx)("div",{className:"text-sm text-text-muted text-center py-8",children:a("noEntries")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("signature")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("model")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("hits")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("tokensSaved")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("created")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("expires")}),(0,d.jsx)("th",{className:"pb-2",children:a("actions")})]})}),(0,d.jsx)("tbody",{children:b.map(a=>(0,d.jsxs)("tr",{className:"border-b border-border/20",children:[(0,d.jsxs)("td",{className:"py-2 pr-4 font-mono text-xs",children:[a.signature.slice(0,12),"..."]}),(0,d.jsx)("td",{className:"py-2 pr-4",children:a.model}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:a.hit_count}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:a.tokens_saved.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:r(a.created_at)}),(0,d.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted",children:r(a.expires_at)}),(0,d.jsx)("td",{className:"py-2",children:(0,d.jsx)("button",{onClick:()=>q(a.signature),disabled:n===a.signature,className:"text-xs text-red-400 hover:text-red-300 disabled:opacity-50",children:n===a.signature?"...":"🗑️"})})]},a.id))})]})}),f.totalPages>1&&(0,d.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-2",children:[(0,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(f.page-1),disabled:f.page<=1,children:"←"}),(0,d.jsxs)("span",{className:"text-sm text-text-muted",children:[f.page," / ",f.totalPages]}),(0,d.jsx)(g.Button,{variant:"secondary",size:"sm",onClick:()=>p(f.page+1),disabled:f.page>=f.totalPages,children:"→"})]})]})]})}]),c()}catch(a){c(a)}},!1),92191,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(442308),g=a.i(292216),h=a.i(294023),i=a.i(609754),j=a.i(240246),k=a.i(415925),l=a.i(171387),m=b([f,l]);function n({icon:a,label:b,value:c,sub:e,valueClass:f="text-text"}){return(0,d.jsxs)("div",{className:"flex flex-col gap-1 p-4 rounded-xl bg-surface-raised border border-border/40",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base leading-none","aria-hidden":"true",children:a}),b]}),(0,d.jsx)("div",{className:`text-2xl font-semibold tabular-nums ${f}`,children:c}),e&&(0,d.jsx)("div",{className:"text-xs text-text-muted",children:e})]})}function o({hitRate:a,label:b}){let c=a>=70?"bg-green-500":a>=40?"bg-amber-400":"bg-red-500",e=a>=70?"text-green-500":a>=40?"text-amber-400":"text-red-500";return(0,d.jsxs)("div",{className:"w-full",role:"progressbar","aria-label":b,"aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[(0,d.jsxs)("div",{className:"flex justify-between text-xs mb-1.5",children:[(0,d.jsx)("span",{className:"text-text-muted",children:b}),(0,d.jsxs)("span",{className:`font-semibold tabular-nums ${e}`,children:[a.toFixed(1),"%"]})]}),(0,d.jsx)("div",{className:"w-full h-2 rounded-full bg-surface/50 overflow-hidden",children:(0,d.jsx)("div",{className:`h-full rounded-full transition-all duration-500 ${c}`,style:{width:`${Math.min(a,100)}%`}})})]})}function p({icon:a,children:b}){return(0,d.jsxs)("div",{className:"flex gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base leading-5 text-blue-400 shrink-0","aria-hidden":"true",children:a}),(0,d.jsx)("span",{children:b})]})}[f,l]=m.then?(await m)():m;a.s(["default",0,function(){let a=(0,k.useTranslations)("cache"),[b,c]=(0,e.useState)(null),[f,m]=(0,e.useState)(!0),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)("overview"),u=(0,j.useNotificationStore)(),v=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cache");if(a.ok){let b=await a.json();c(b)}}catch(a){console.error("[CachePage] Failed to fetch cache stats:",a)}finally{m(!1)}},[]);(0,e.useEffect)(()=>{v();let a=setInterval(()=>void v(),1e4);return()=>clearInterval(a)},[v]);let w=async()=>{r(!0);try{let b=await fetch("/api/cache",{method:"DELETE"});if(b.ok){let c=await b.json();u.success(a("clearSuccess",{count:c.expiredRemoved??0})),await v()}else u.error(a("clearError"))}catch(b){console.error("[CachePage] Failed to clear cache:",b),u.error(a("clearError"))}finally{r(!1)}},x=b?.semanticCache,y=b?.promptCache,z=b?.trend??[],A=b?.idempotency,B=x?parseFloat(x.hitRate):0,C=x?x.hits+x.misses:0,D=y&&y.totalRequests>0?y.requestsWithCacheControl/y.totalRequests*100:0,E=y?Object.entries(y.byProvider):[],F=Math.max(1,...z.map(a=>a.requests));return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-xl font-semibold",children:a("title")}),(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a("description")})]}),(0,d.jsxs)("div",{className:"flex gap-2 shrink-0",children:[(0,d.jsx)(h.Button,{variant:"secondary",icon:"refresh",size:"sm",onClick:()=>void v(),disabled:f,"aria-label":a("refresh"),children:a("refresh")}),(0,d.jsx)(h.Button,{variant:"danger",icon:"delete_sweep",size:"sm",onClick:()=>void w(),disabled:q||f,loading:q,"aria-label":a("clearAll"),children:a("clearAll")})]})]}),(0,d.jsxs)("div",{className:"flex gap-1 p-1 rounded-lg bg-black/5 dark:bg-white/5 w-fit",children:[(0,d.jsx)("button",{onClick:()=>t("overview"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"overview"===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:a("overview")}),(0,d.jsx)("button",{onClick:()=>t("entries"),className:`px-4 py-2 rounded-md text-sm font-medium transition-all ${"entries"===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:a("entries")})]}),"entries"===s&&(0,d.jsx)(l.default,{}),"overview"===s&&(0,d.jsxs)(d.Fragment,{children:[f&&(0,d.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((a,b)=>(0,d.jsx)("div",{className:"h-24 rounded-xl bg-surface-raised animate-pulse"},b))}),!f&&!b&&(0,d.jsx)(i.EmptyState,{icon:"cached",title:a("unavailable"),description:a("unavailableDesc"),actionLabel:a("refresh"),onAction:()=>void v()}),!f&&b&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsx)(n,{icon:"memory",label:a("memoryEntries"),value:x?.memoryEntries??0,sub:a("memoryEntriesSub")}),(0,d.jsx)(n,{icon:"storage",label:a("dbEntries"),value:x?.dbEntries??0,sub:a("dbEntriesSub")}),(0,d.jsx)(n,{icon:"trending_up",label:a("cacheHits"),value:x?.hits??0,sub:a("cacheHitsSub",{total:C}),valueClass:"text-green-500"}),(0,d.jsx)(n,{icon:"token",label:a("tokensSaved"),value:(x?.tokensSaved??0).toLocaleString(),sub:a("tokensSavedSub"),valueClass:"text-blue-400"})]}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("performance")}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:a("autoRefresh",{seconds:10})})]}),(0,d.jsx)(o,{hitRate:B,label:a("hitRate")}),(0,d.jsxs)("div",{className:"grid grid-cols-3 gap-4 pt-3 border-t border-border/30 text-center",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:x?.hits??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("hits")})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-red-400",children:x?.misses??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("misses")})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:C}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("total")})]})]})]})}),y&&(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"bolt"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("promptCache")})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:y.requestsWithCacheControl.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cachedRequests")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsxs)("div",{className:"text-lg font-semibold tabular-nums text-green-500",children:[D.toFixed(1),"%"]}),(0,d.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[a("cacheHitRate")," (",y.requestsWithCacheControl,"/",y.totalRequests,")"]})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-blue-400",children:y.totalCachedTokens.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cachedTokens")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums text-purple-400",children:y.totalCacheCreationTokens.toLocaleString()}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("cacheCreationTokens")})]})]}),E.length>0&&(0,d.jsxs)("div",{className:"pt-3 border-t border-border/30",children:[(0,d.jsx)("h3",{className:"text-xs font-medium text-text-muted mb-3",children:a("byProvider")}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"w-full text-sm",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border/30",children:[(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("provider")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("requests")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("inputTokens")}),(0,d.jsx)("th",{className:"pb-2 pr-4",children:a("cachedTokensCol")}),(0,d.jsx)("th",{className:"pb-2",children:a("cacheCreation")})]})}),(0,d.jsx)("tbody",{children:E.map(([a,b])=>(0,d.jsxs)("tr",{className:"border-b border-border/20",children:[(0,d.jsx)("td",{className:"py-2 pr-4 font-medium",children:a}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:b.requests.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums",children:b.inputTokens.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 pr-4 tabular-nums text-green-500",children:b.cachedTokens.toLocaleString()}),(0,d.jsx)("td",{className:"py-2 tabular-nums text-purple-400",children:b.cacheCreationTokens.toLocaleString()})]},a))})]})})]})]})}),z.length>0&&(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"timeline"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("trend24h")})]}),(0,d.jsx)("div",{className:"flex items-end gap-1 h-32",children:z.map(b=>{let c=Math.max(4,b.requests/F*100),e=b.requests>0?Math.max(2,b.cachedRequests/b.requests*c):0,f=new Date(b.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return(0,d.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1 group relative",children:[(0,d.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:[f,": ",b.requests," ",a("requests").toLowerCase(),","," ",b.cachedRequests," ",a("cached").toLowerCase()]}),(0,d.jsxs)("div",{className:"w-full flex flex-col justify-end h-full gap-px",children:[(0,d.jsx)("div",{className:"w-full bg-green-500/30 rounded-t",style:{height:`${e}%`}}),(0,d.jsx)("div",{className:"w-full bg-text-muted/20 rounded-t",style:{height:`${c-e}%`}})]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted truncate w-full text-center",children:f.split(":")[0]})]},b.timestamp)})}),(0,d.jsxs)("div",{className:"flex items-center gap-4 text-xs text-text-muted",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded bg-text-muted/20"}),(0,d.jsx)("span",{children:a("total")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("div",{className:"w-3 h-3 rounded bg-green-500/30"}),(0,d.jsx)("span",{children:a("cached")})]})]})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("behavior")}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,d.jsx)(p,{icon:"info",children:a("behaviorDeterministic")}),(0,d.jsx)(p,{icon:"info",children:a.rich("behaviorBypass",{header:()=>(0,d.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"X-OmniRoute-No-Cache: true"})})}),(0,d.jsx)(p,{icon:"info",children:a("behaviorTwoTier")}),(0,d.jsx)(p,{icon:"info",children:a.rich("behaviorTtl",{envVar:()=>(0,d.jsx)("code",{className:"bg-surface px-1 py-0.5 rounded text-xs font-mono",children:"SEMANTIC_CACHE_TTL_MS"})})})]})]})}),(0,d.jsx)(g.Card,{children:(0,d.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted","aria-hidden":"true",children:"fingerprint"}),(0,d.jsx)("h2",{className:"font-medium text-sm",children:a("idempotency")})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:A?.activeKeys??0}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("activeDedupKeys")})]}),(0,d.jsxs)("div",{className:"p-3 rounded-lg bg-surface/50",children:[(0,d.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:A?`${(A.windowMs/1e3).toFixed(0)}s`:"—"}),(0,d.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:a("dedupWindow")})]})]})]})})]})]})]})}]),c()}catch(a){c(a)}},!1)];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28dashboard%29_dashboard_cache_04_vca6._.js.map