omniroute 1.4.10 → 1.4.11
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/app-path-routes-manifest.json +34 -34
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.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-log/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.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.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/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/profile/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/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/translator/page.js +4 -4
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.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/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.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.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.js +1 -1
- package/app/.next/server/app/login/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/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +34 -34
- package/app/.next/server/chunks/1259.js +1 -1
- package/app/.next/server/chunks/1960.js +1 -1
- package/app/.next/server/chunks/1990.js +1 -1
- package/app/.next/server/chunks/3498.js +5 -3
- package/app/.next/server/chunks/9824.js +2 -2
- package/app/.next/server/pages/500.html +2 -2
- 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/{5846-bac355f56b136439.js → 5846-19c878280decbd16.js} +1 -1
- package/app/.next/static/chunks/{993-961f6e199b93539a.js → 993-e3050ebfd4f5032f.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-a50474b6ebdf468a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/page-08f3ed204d01b6a0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-fbe1442b61df950a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-b351778975cb8622.js +4 -0
- package/app/.next/static/chunks/app/forgot-password/page-a440e0c1675842bf.js +1 -0
- package/app/.next/static/chunks/app/login/page-164f6b6b41167c5a.js +1 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-3fcbbdb2221f0b0c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/page-f256689b8410bd74.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-a5a48afa8c125ada.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-75c8b38a55e13042.js +0 -4
- package/app/.next/static/chunks/app/forgot-password/page-057ea91c6f140e0b.js +0 -1
- package/app/.next/static/chunks/app/login/page-c1d7bfab91a7877c.js +0 -1
- /package/app/.next/static/{8UAle4UTGR7gIVofXmh_1 → g7Mie-iq39oZ7ts610YtL}/_buildManifest.js +0 -0
- /package/app/.next/static/{8UAle4UTGR7gIVofXmh_1 → g7Mie-iq39oZ7ts610YtL}/_ssgManifest.js +0 -0
package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-75c8b38a55e13042.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{2824:(e,t,s)=>{"use strict";s.d(t,{default:()=>C});var a=s(95155),r=s(12115),n=s(40993),l=s(50910);let i=[{id:"simple-chat",name:"Simple Chat",icon:"chat",description:"Basic text message",formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello! How are you today?"}],stream:!0},claude:{model:"claude-sonnet-4-20250514",system:"You are a helpful assistant.",max_tokens:1024,messages:[{role:"user",content:"Hello! How are you today?"}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:"Hello! How are you today?"}]}],systemInstruction:{parts:[{text:"You are a helpful assistant."}]}},"openai-responses":{model:"gpt-4o",input:"Hello! How are you today?",instructions:"You are a helpful assistant."}}},{id:"tool-calling",name:"Tool Calling",icon:"build",description:"Function/tool invocation",formats:{openai:{model:"gpt-4o",messages:[{role:"user",content:"What's the weather in S\xe3o Paulo?"}],tools:[{type:"function",function:{name:"get_weather",description:"Get current weather for a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}}],stream:!0},claude:{model:"claude-sonnet-4-20250514",max_tokens:1024,messages:[{role:"user",content:"What's the weather in S\xe3o Paulo?"}],tools:[{name:"get_weather",description:"Get current weather for a location",input_schema:{type:"object",properties:{location:{type:"string",description:"City name"},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:"What's the weather in S\xe3o Paulo?"}]}],tools:[{functionDeclarations:[{name:"get_weather",description:"Get current weather for a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}]}]}}},{id:"multi-turn",name:"Multi-turn",icon:"forum",description:"Conversation with history",formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:"You are a coding assistant."},{role:"user",content:"Write a function to sort an array in Python."},{role:"assistant",content:"Here's a simple sort function:\n\n```python\ndef sort_array(arr):\n return sorted(arr)\n```"},{role:"user",content:"Now make it sort in descending order."}],stream:!0},claude:{model:"claude-sonnet-4-20250514",system:"You are a coding assistant.",max_tokens:1024,messages:[{role:"user",content:"Write a function to sort an array in Python."},{role:"assistant",content:"Here's a simple sort function:\n\n```python\ndef sort_array(arr):\n return sorted(arr)\n```"},{role:"user",content:"Now make it sort in descending order."}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:"Write a function to sort an array in Python."}]},{role:"model",parts:[{text:"Here's a simple sort function:\n\n```python\ndef sort_array(arr):\n return sorted(arr)\n```"}]},{role:"user",parts:[{text:"Now make it sort in descending order."}]}],systemInstruction:{parts:[{text:"You are a coding assistant."}]}}}},{id:"thinking",name:"Thinking",icon:"psychology",description:"Extended thinking / reasoning",formats:{openai:{model:"o3-mini",messages:[{role:"user",content:"What is the sum of the first 100 prime numbers?"}],stream:!0},claude:{model:"claude-sonnet-4-20250514",max_tokens:16e3,thinking:{type:"enabled",budget_tokens:1e4},messages:[{role:"user",content:"What is the sum of the first 100 prime numbers?"}],stream:!0},gemini:{model:"gemini-2.5-flash-thinking",contents:[{role:"user",parts:[{text:"What is the sum of the first 100 prime numbers?"}]}],generationConfig:{thinkingConfig:{thinkingBudget:1e4}}}}},{id:"system-prompt",name:"System Prompt",icon:"settings",description:"Complex system instructions",formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:"You are a senior software engineer specializing in distributed systems. Answer questions concisely using industry best practices. Always provide code examples when relevant. Format your responses using markdown."},{role:"user",content:"How do I implement a circuit breaker pattern?"}],temperature:.7,stream:!0},claude:{model:"claude-sonnet-4-20250514",system:"You are a senior software engineer specializing in distributed systems. Answer questions concisely using industry best practices. Always provide code examples when relevant. Format your responses using markdown.",max_tokens:2048,messages:[{role:"user",content:"How do I implement a circuit breaker pattern?"}],temperature:.7,stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:"How do I implement a circuit breaker pattern?"}]}],systemInstruction:{parts:[{text:"You are a senior software engineer specializing in distributed systems. Answer questions concisely using industry best practices. Always provide code examples when relevant. Format your responses using markdown."}]},generationConfig:{temperature:.7}}}},{id:"streaming",name:"Streaming",icon:"stream",description:"SSE streaming request",formats:{openai:{model:"gpt-4o",messages:[{role:"user",content:"Tell me a short story about a robot learning to paint."}],stream:!0,stream_options:{include_usage:!0}},claude:{model:"claude-sonnet-4-20250514",max_tokens:1024,messages:[{role:"user",content:"Tell me a short story about a robot learning to paint."}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:"Tell me a short story about a robot learning to paint."}]}]}}}],o={openai:{label:"OpenAI",color:"emerald",icon:"smart_toy"},"openai-responses":{label:"OpenAI Responses",color:"amber",icon:"swap_horiz"},claude:{label:"Claude",color:"orange",icon:"psychology"},gemini:{label:"Gemini",color:"blue",icon:"auto_awesome"},antigravity:{label:"Antigravity",color:"purple",icon:"rocket_launch"},kiro:{label:"Kiro",color:"cyan",icon:"terminal"},cursor:{label:"Cursor",color:"pink",icon:"edit"},codex:{label:"Codex",color:"yellow",icon:"code"}},c=Object.entries(o).map(([e,t])=>({value:e,label:t.label}));var d=s(75707),m=s.n(d);let u=m()(()=>s.e(8202).then(s.bind(s,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1});function x(){let e=(0,l.c)("translator"),[t,s]=(0,r.useState)("claude"),[d,m]=(0,r.useState)("openai"),[x,p]=(0,r.useState)(""),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(null),[y,j]=(0,r.useState)(!1),[v,N]=(0,r.useState)(!1),[w,k]=(0,r.useState)(null),S=(0,r.useCallback)(async e=>{if(!e||e.trim().length<5)return void b(null);try{let t=JSON.parse(e);N(!0);let a=await fetch("/api/translator/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t})}),r=await a.json();r.success&&(b(r.format),s(r.format))}catch{}finally{N(!1)}},[]);(0,r.useEffect)(()=>{let e=setTimeout(()=>{S(x)},600);return()=>clearTimeout(e)},[x,S]);let C=async()=>{if(x.trim()){j(!0),f("");try{let e=JSON.parse(x),s=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:t,targetFormat:d,body:e})}),a=await s.json();a.success?f(JSON.stringify(a.result,null,2)):f(JSON.stringify({error:a.error},null,2))}catch(e){f(JSON.stringify({error:e.message},null,2))}j(!1)}},O=async e=>{try{await navigator.clipboard.writeText(e)}catch{}},_=o[t]||o.openai,P=o[d]||o.openai;return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("formatConverter")}),(0,a.jsx)("p",{children:"Paste or type a JSON request body. The translator will auto-detect the source format and convert it to the target format. Use this to debug how OmniRoute translates requests between formats (OpenAI ↔ Claude ↔ Gemini ↔ Responses API)."})]})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col sm:flex-row items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Source Format"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] text-${_.color}-500`,children:_.icon}),(0,a.jsx)(n.l6,{value:t,onChange:e=>{s(e.target.value),b(null)},options:c,className:"flex-1"}),g&&(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",icon:"auto_awesome",children:"Auto"})]})]}),(0,a.jsx)("button",{onClick:()=>{s(d),m(t),p(h),f(""),b(null)},className:"p-2 rounded-full hover:bg-primary/10 text-text-muted hover:text-primary transition-all mt-4 sm:mt-5",title:"Swap formats",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"swap_horiz"})}),(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Target Format"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] text-${P.color}-500`,children:P.icon}),(0,a.jsx)(n.l6,{value:d,onChange:e=>m(e.target.value),options:c,className:"flex-1"})]})]}),(0,a.jsx)("div",{className:"pt-0 sm:pt-5",children:(0,a.jsx)(n.$n,{icon:"arrow_forward",onClick:C,loading:y,disabled:!x.trim()||y,className:"whitespace-nowrap",children:"Translate"})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"input"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e(">input</")}),g&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",dot:!0,children:o[g]?.label||g}),v&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted animate-spin",children:"progress_activity"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("button",{onClick:()=>O(x),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Copy",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,a.jsx)("button",{onClick:()=>{p(""),f(""),b(null),k(null)},className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]}),(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(u,{height:"400px",defaultLanguage:"json",value:x,onChange:e=>p(e||""),theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,placeholder:"Paste a request body here or select a template below..."}})})]})}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"output"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e(">output</")}),h&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:o[d]?.label||d})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("button",{onClick:()=>O(h),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:"Copy",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})})})]}),(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(u,{height:"400px",defaultLanguage:"json",value:h,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})]})})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"library_books"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Example Templates"}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"— Click to load"})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2",children:i.map(e=>(0,a.jsxs)("button",{onClick:()=>{p(JSON.stringify(e.formats[t]||e.formats.openai,null,2)),k(e.id),f("")},className:`
|
|
2
|
-
group flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all text-center
|
|
3
|
-
${w===e.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30 hover:bg-primary/5 text-text-muted hover:text-text-main"}
|
|
4
|
-
`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] ${w===e.id?"text-primary":"text-text-muted group-hover:text-primary"} transition-colors`,children:e.icon}),(0,a.jsx)("span",{className:"text-xs font-medium leading-tight",children:e.name})]},e.id))}),w&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"}),"Template loads the request in"," ",(0,a.jsx)("strong",{className:"text-text-main",children:o[t]?.label||t})," ","format. Change Source Format to load in a different format."]})]})})]})}var p=s(20909);function h(e="openai"){let[t,s]=(0,r.useState)(e),[a,n]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),[a,r]=await Promise.all([e.json(),t.json()]),l=new Map((r.nodes||[]).map(e=>[e.id,e])),i=[...new Set((a.connections||[]).filter(e=>!1!==e.isActive).map(e=>e.provider))].map(e=>{let t=p.Q2[e],s=l.get(e),a=t?.name||s?.name||e;return!t&&e.startsWith(p.JH)&&(a=s?.name||"OpenAI Compatible"),!t&&e.startsWith(p.DI)&&(a=s?.name||"Anthropic Compatible"),{value:e,label:a}}).sort((e,t)=>e.label.localeCompare(t.label)),o=i.length>0?i:Object.entries(p.Q2).map(([e,t])=>({value:e,label:t.name}));n(o),o.length>0&&s(e=>o.some(t=>t.value===e)?e:o[0].value)}catch{let e=Object.entries(p.Q2).map(([e,t])=>({value:e,label:t.name}));n(e),e.length>0&&s(t=>e.some(e=>e.value===t)?t:e[0].value)}finally{i(!1)}})()},[]),{provider:t,setProvider:s,providerOptions:a,loading:l}}let f={openai:["gpt-","o1-","o3-","o4-"],"openai-responses":["gpt-","o1-","o3-","o4-"],claude:["claude-"],gemini:["gemini-"]};function g(){let[e,t]=(0,r.useState)(""),[s,a]=(0,r.useState)([]),[n,l]=(0,r.useState)(!0);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/v1/models"),t=((await e.json()).data||[]).map(e=>e.id).sort((e,t)=>e.localeCompare(t));a(t)}catch{a([])}finally{l(!1)}})()},[]);let i=(0,r.useCallback)(e=>{if(0===s.length)return"";for(let t of f[e]||[]){let e=s.find(e=>e.startsWith(t));if(e)return e}return s[0]},[s]);return{model:e,setModel:t,availableModels:s,loading:n,pickModelForFormat:i}}let b=m()(()=>s.e(8202).then(s.bind(s,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1});function y(){let e=(0,l.c)("translator"),{provider:t,setProvider:s,providerOptions:i}=h("openai"),{model:d,setModel:m,availableModels:u,pickModelForFormat:x}=g(),[p,f]=(0,r.useState)("openai"),[y,j]=(0,r.useState)(""),[v,N]=(0,r.useState)(!1),[w,k]=(0,r.useState)([]),[S,C]=(0,r.useState)(null),[O,_]=(0,r.useState)(null),P=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=x(p);e&&m(e)},[p,x,m]);let T=()=>{P.current?.scrollIntoView({behavior:"smooth"})},I=async()=>{if(!y.trim()||v)return;let e=y.trim();j(""),N(!0),k(t=>[...t,{role:"user",content:e}]);let s=[];try{let a,r=[...w.map(e=>({role:e.role,content:e.content})),{role:"user",content:e}];a="claude"===p?{model:d,max_tokens:1024,messages:r,stream:!0}:"gemini"===p?{model:d,contents:r.map(e=>({role:"assistant"===e.role?"model":"user",parts:[{text:e.content}]}))}:"openai-responses"===p?{model:d,input:r.map(e=>({type:"message",role:e.role,content:[{type:"input_text",text:e.content}]})),stream:!0}:{model:d,messages:r,stream:!0},s.push({id:1,name:"Client Request",description:"The request body as your client would send it",format:p,content:JSON.stringify(a,null,2),status:"done"});let n=await fetch("/api/translator/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:a})}),l=(await n.json()).format||p;s.push({id:2,name:"Format Detected",description:"OmniRoute auto-detects the API format from the request structure",format:l,content:JSON.stringify({detectedFormat:l,clientFormat:p,match:l===p},null,2),status:"done"});let i=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:l,targetFormat:"openai",body:a})}),o=await i.json();s.push({id:3,name:"OpenAI Intermediate",description:"All formats are first normalized to OpenAI format (the universal bridge)",format:"openai",content:JSON.stringify(o.result||o,null,2),status:o.success?"done":"error"});let c=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:"openai",provider:t,body:o.result})}),m=await c.json(),u=m.targetFormat||"openai";s.push({id:4,name:"Provider Format",description:"OpenAI format is translated to the provider's native format",format:u,content:JSON.stringify(m.result||m,null,2),status:m.success?"done":"error"});let x=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,body:m.result||o.result})});if(x.ok){let e=x.body.getReader(),t=new TextDecoder,a="";for(;;){let{done:s,value:r}=await e.read();if(s)break;a+=t.decode(r,{stream:!0})}s.push({id:5,name:"Provider Response",description:"The raw SSE stream from the provider API",format:u,content:a.slice(0,5e3)+(a.length>5e3?"\n... (truncated)":""),status:"done"});let r=function(e){let t="";for(let s of e.split("\n")){if(!s.startsWith("data: "))continue;let e=s.slice(6).trim();if("[DONE]"===e)break;try{let s=JSON.parse(e),a=s.choices?.[0]?.delta;a?.content&&(t+=a.content),"content_block_delta"===s.type&&s.delta?.text&&(t+=s.delta.text)}catch{}}return t||e.slice(0,500)}(a);k(e=>[...e,{role:"assistant",content:r||"(No text extracted)"}])}else{let e=await x.json().catch(()=>({error:"Request failed"}));s.push({id:5,name:"Provider Response",description:"The raw response from the provider API",format:u,content:JSON.stringify(e,null,2),status:"error"}),k(t=>[...t,{role:"assistant",content:`Error: ${e.error||"Request failed"}`}])}}catch(e){s.push({id:s.length+1,name:"Error",description:"An unexpected error occurred",format:"error",content:JSON.stringify({error:e.message},null,2),status:"error"}),k(t=>[...t,{role:"assistant",content:`Error: ${e.message}`}])}C(s),_(s.length>0?s[s.length-1].id:null),N(!1),setTimeout(T,100)};return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("pipelineDebugger")}),(0,a.jsxs)("p",{children:["Send messages as a specific client format and see how each step of the translation pipeline works. The right panel shows the full flow:"," ",(0,a.jsx)("strong",{className:"text-text-main",children:"Client Request → Format Detection → OpenAI Intermediate → Provider Format → Response"}),". Click any step to inspect the data at that stage."]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:"Client Format"}),(0,a.jsx)(n.l6,{value:p,onChange:e=>f(e.target.value),options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:"Provider"}),(0,a.jsx)(n.l6,{value:t,onChange:e=>s(e.target.value),options:i})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:"Model"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:d,onChange:e=>m(e.target.value),list:"model-suggestions",placeholder:"Select or type a model name...",className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"model-suggestions",children:u.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),(0,a.jsxs)(n.Zp,{className:"min-h-[400px] flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 flex-1 overflow-y-auto max-h-[500px] space-y-3",children:[0===w.length&&(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-text-muted py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"chat"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:"Send a message to see the translation pipeline"}),(0,a.jsxs)("p",{className:"text-xs text-center max-w-xs",children:["Your message will be formatted as a"," ",(0,a.jsx)("strong",{children:o[p]?.label})," request, translated through the pipeline, and sent to the selected provider."]})]}),w.map((e,t)=>(0,a.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[85%] rounded-lg px-3 py-2 text-sm ${"user"===e.role?"bg-primary/10 text-text-main border border-primary/20":"bg-bg-subtle text-text-main border border-border"}`,children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-text-muted mb-1 uppercase",children:"user"===e.role?`You (${o[p]?.label})`:"Assistant"}),(0,a.jsx)("p",{className:"whitespace-pre-wrap",children:e.content})]})},t)),(0,a.jsx)("div",{ref:P})]}),(0,a.jsx)("div",{className:"p-3 border-t border-border",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:y,onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&I(),placeholder:"Type a message...",className:"flex-1 bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors",disabled:v}),(0,a.jsx)(n.$n,{icon:"send",onClick:I,loading:v,disabled:!y.trim()||v,children:"Send"})]})})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"account_tree"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("translationPipeline")})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Click on any step to inspect the data at that stage"})]})}),S?(0,a.jsx)("div",{className:"space-y-2",children:S.map((e,t)=>{let s=o[e.format]||{label:e.format,color:"gray",icon:"code"},r=O===e.id;return(0,a.jsxs)("div",{children:[t>0&&(0,a.jsx)("div",{className:"flex justify-center py-1",children:(0,a.jsx)("div",{className:"w-px h-4 bg-border"})}),(0,a.jsxs)(n.Zp,{className:"error"===e.status?"border-red-500/30":r?"border-primary/30":"",children:[(0,a.jsxs)("button",{onClick:()=>_(r?null:e.id),className:"w-full p-3 flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold ${"error"===e.status?"bg-red-500/10 text-red-500":"done"===e.status?`bg-${s.color}-500/10 text-${s.color}-500`:"bg-bg-subtle text-text-muted"}`,children:"error"===e.status?"!":e.id}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:e.name}),e.description&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted truncate",children:e.description})]}),(0,a.jsx)(n.Ex,{variant:"error"===e.status?"error":"default",size:"sm",children:s.label}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:r?"expand_less":"expand_more"})]}),r&&(0,a.jsx)("div",{className:"px-3 pb-3",children:(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(b,{height:"250px",defaultLanguage:"json",value:e.content,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:11,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})})]})]},e.id)})}):(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"account_tree"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:"Pipeline visualization"}),(0,a.jsx)("p",{className:"text-xs text-center max-w-xs",children:"Send a message to see how your request flows through detection → translation → provider call."})]})})]})]})]})}let j=[{id:"simple-chat",name:"Simple Chat",icon:"chat",templateId:"simple-chat"},{id:"tool-calling",name:"Tool Calling",icon:"build",templateId:"tool-calling"},{id:"multi-turn",name:"Multi-turn",icon:"forum",templateId:"multi-turn"},{id:"thinking",name:"Thinking",icon:"psychology",templateId:"thinking"},{id:"system-prompt",name:"System Prompt",icon:"settings",templateId:"system-prompt"},{id:"streaming",name:"Streaming",icon:"stream",templateId:"streaming"}];function v(){let e=(0,l.c)("translator"),[t,s]=(0,r.useState)("claude"),{provider:d,setProvider:m,providerOptions:u}=h("openai"),{model:x,setModel:p,availableModels:f,pickModelForFormat:b}=g(),[y,v]=(0,r.useState)({}),[N,w]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=b(t);e&&p(e)},[t,b,p]);let k=async e=>{v(t=>({...t,[e.id]:{status:"running"}}));let s=Date.now();try{let a=i.find(t=>t.id===e.templateId),r=a?.formats[t]||a?.formats.openai;if(!r)return void v(t=>({...t,[e.id]:{status:"error",error:"No template for this format",latency:0}}));let n={...r,model:x};r.contents&&(n.model=x);let l=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:t,provider:d,body:n})}),o=await l.json();if(!o.success)return void v(t=>({...t,[e.id]:{status:"error",error:`Translation failed: ${o.error}`,latency:Date.now()-s}}));let c=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:d,body:o.result})}),m=Date.now()-s;if(!c.ok){let t=await c.json().catch(()=>({}));v(s=>({...s,[e.id]:{status:"error",error:t.error||`HTTP ${c.status}`,latency:m,httpStatus:c.status}}));return}let u=c.body.getReader(),p=0;for(;;){let{done:e}=await u.read();if(e)break;p++}v(t=>({...t,[e.id]:{status:"pass",latency:Date.now()-s,chunks:p}}))}catch(t){v(a=>({...a,[e.id]:{status:"error",error:t.message,latency:Date.now()-s}}))}},S=async()=>{for(let e of(w(!0),v({}),j))await k(e);w(!1)},C=Object.values(y).filter(e=>"pass"===e.status).length,O=Object.values(y).filter(e=>"error"===e.status).length,_=C+O,P=_>0?Math.round(C/_*100):0,T=o[t]||o.openai;return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("compatibilityTester")}),(0,a.jsx)("p",{children:"Run predefined scenarios (Simple Chat, Tool Calling, etc.) to verify translation and provider compatibility. Select a source format and target provider, then run all tests to see a compatibility percentage. Use this to find which features work across providers."})]})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-end gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Source Format"}),(0,a.jsx)(n.l6,{value:t,onChange:e=>{s(e.target.value),v({})},options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsx)("div",{className:"flex items-center justify-center px-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px] text-text-muted",children:"arrow_forward"})}),(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Target Provider"}),(0,a.jsx)(n.l6,{value:d,onChange:e=>{m(e.target.value),v({})},options:u})]}),(0,a.jsx)(n.$n,{icon:"play_arrow",onClick:S,loading:N,disabled:N,children:"Run All Tests"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:"Model"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:x,onChange:e=>p(e.target.value),list:"testbench-model-suggestions",placeholder:"Select or type a model name...",className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"testbench-model-suggestions",children:f.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),_>0&&(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("compatibilityReport")}),(0,a.jsxs)(n.Ex,{variant:P>=80?"success":P>=50?"warning":"error",size:"lg",children:[P,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",C," passed"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",O," failed"]})]})]}),(0,a.jsx)("div",{className:"w-full h-2 bg-bg-subtle rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-green-500 to-emerald-400 rounded-full transition-all duration-500",style:{width:`${P}%`}})})]})}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:j.map(e=>{let t=y[e.id],s=t?.status==="running";return(0,a.jsx)(n.Zp,{className:`transition-all ${t?.status==="pass"?"border-green-500/30":t?.status==="error"?"border-red-500/30":""}`,children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-9 h-9 rounded-lg ${t?.status==="pass"?"bg-green-500/10 text-green-500":t?.status==="error"?"bg-red-500/10 text-red-500":"bg-bg-subtle text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:s?"progress_activity":t?.status==="pass"?"check_circle":t?.status==="error"?"error":e.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:e.name}),(0,a.jsxs)("p",{className:"text-[10px] text-text-muted uppercase",children:[T.label," →"," ",u.find(e=>e.value===d)?.label||d]})]})]})}),t&&"running"!==t.status&&(0,a.jsx)("div",{className:`rounded-lg p-2 text-xs ${"pass"===t.status?"bg-green-500/5 text-green-600 dark:text-green-400":"bg-red-500/5 text-red-600 dark:text-red-400"}`,children:"pass"===t.status?(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{children:"✅ Passed"}),(0,a.jsxs)("span",{className:"text-text-muted",children:[t.latency,"ms • ",t.chunks," chunks"]})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["❌ ",t.error]}),(0,a.jsxs)("p",{className:"text-text-muted mt-0.5",children:[t.latency,"ms"]})]})}),(0,a.jsx)(n.$n,{size:"sm",variant:t?.status==="pass"?"ghost":"outline",icon:s?"progress_activity":"play_arrow",onClick:()=>k(e),disabled:s||N,className:"w-full",children:s?"Running...":t?"Re-run":"Run Test"})]})},e.id)})})]})}function N(){let e=(0,l.c)("translator"),[t,s]=(0,r.useState)([]),[i,c]=(0,r.useState)(!0),[d,m]=(0,r.useState)(!0),u=(0,r.useRef)(null),x=async()=>{try{let e=await fetch("/api/translator/history?limit=50");if(e.ok){let t=await e.json();s(t.events||[])}}catch{}finally{c(!1)}};(0,r.useEffect)(()=>(x(),d&&(u.current=setInterval(x,3e3)),()=>{u.current&&clearInterval(u.current)}),[d]);let p=t.filter(e=>"success"===e.status).length,h=t.filter(e=>"error"===e.status).length,f=t.length>0?Math.round(t.reduce((e,t)=>e+(t.latency||0),0)/t.length):0;return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("realtime")}),(0,a.jsxs)("p",{children:["Shows translation events as API calls flow through OmniRoute. Events come from the in-memory buffer (resets on restart). Use"," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("chatTester")}),","," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("testBench")}),", or external API calls to generate events."]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[(0,a.jsx)(w,{icon:"translate",label:"Total Translations",value:t.length,color:"blue"}),(0,a.jsx)(w,{icon:"check_circle",label:"Successful",value:p,color:"green"}),(0,a.jsx)(w,{icon:"error",label:"Errors",value:h,color:"red"}),(0,a.jsx)(w,{icon:"speed",label:"Avg Latency",value:`${f}ms`,color:"purple"})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-3 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${d?"text-green-500 animate-pulse":"text-text-muted"}`,children:d?"radio_button_checked":"radio_button_unchecked"}),(0,a.jsx)("button",{onClick:()=>m(!d),className:"text-sm text-text-main hover:text-primary transition-colors",children:d?"Live — Auto-refreshing":"Paused"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"refresh"}),"Refresh"]})]})}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main mb-3",children:e("recentTranslations")}),i?(0,a.jsxs)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}):0===t.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"monitoring"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("noTranslations")}),(0,a.jsx)("p",{className:"text-xs text-center max-w-sm",children:"Translation events appear here as requests flow through OmniRoute. Use any of these methods to generate events:"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mt-3 text-xs",children:[(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:"Chat Tester tab"}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:"Test Bench tab"}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:"External API calls"}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:"IDE/CLI integrations"})]}),(0,a.jsx)("p",{className:"text-[10px] mt-3 text-text-muted/70",children:"Note: Events are stored in-memory and reset when the server restarts."})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"pb-2 pr-4",children:e(">time</")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e(">source</")}),(0,a.jsx)("th",{className:"pb-2 pr-4"}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e(">target</")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e(">model</")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e(">status</")}),(0,a.jsx)("th",{className:"pb-2 text-right",children:e(">latency</")})]})}),(0,a.jsx)("tbody",{children:t.map((e,t)=>{let s=o[e.sourceFormat]||{label:e.sourceFormat||"?",color:"gray"},r=o[e.targetFormat]||{label:e.targetFormat||"?",color:"gray"};return(0,a.jsxs)("tr",{className:"border-b border-border/50 hover:bg-bg-subtle/50 transition-colors",children:[(0,a.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted whitespace-nowrap",children:e.timestamp?new Date(e.timestamp).toLocaleTimeString():"—"}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:s.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_forward"})}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:r.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-xs font-mono text-text-muted",children:e.model||"—"}),(0,a.jsx)("td",{className:"py-2 pr-4",children:"success"===e.status?(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"OK"}):(0,a.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e.statusCode||"ERR"})}),(0,a.jsx)("td",{className:"py-2 text-right text-xs text-text-muted",children:e.latency?`${e.latency}ms`:"—"})]},e.id||t)})})]})})]})})]})}function w({icon:e,label:t,value:s,color:r}){return(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-${r}-500/10`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] text-${r}-500`,children:e})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-lg font-bold text-text-main",children:s}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:t})]})]})})}let k=[{value:"playground",label:"Playground",icon:"code"},{value:"chat-tester",label:"Chat Tester",icon:"chat"},{value:"test-bench",label:"Test Bench",icon:"science"},{value:"live-monitor",label:"Live Monitor",icon:"monitoring"}],S={playground:"Paste any API request body and see how OmniRoute translates it between provider formats (OpenAI ↔ Claude ↔ Gemini ↔ Responses API)","chat-tester":"Send real chat requests through OmniRoute and see the full round-trip: your input, the translated request, the provider response, and the translated output","test-bench":"Define multiple test cases with different inputs and expected outputs, run them all at once, and compare results across providers and models","live-monitor":"Watch incoming requests in real-time as they flow through OmniRoute — see format translations happening live and identify issues instantly"};function C(){let[e,t]=(0,r.useState)("playground");return(0,a.jsxs)("div",{className:"p-8 space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[28px]",children:"translate"}),"Translator Playground"]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:S[e]||"Debug, test, and visualize how OmniRoute translates API requests between providers"})]}),(0,a.jsx)(n.Iz,{options:k,value:e,onChange:t,size:"md"})]}),"playground"===e&&(0,a.jsx)(x,{}),"chat-tester"===e&&(0,a.jsx)(y,{}),"test-bench"===e&&(0,a.jsx)(v,{}),"live-monitor"===e&&(0,a.jsx)(N,{})]})}},5214:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=s(17828)},17828:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,s(64054).createAsyncLocalStorage)()},21957:(e,t,s)=>{"use strict";function a({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}}),s(95155),s(47650),s(5214),s(2451),s(53887)},41112:(e,t,s)=>{"use strict";function a({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),s(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return c}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return l?new l:new n}function o(e){return l?l.bind(e):n.bind(e)}function c(){return l?l.snapshot():function(e,...t){return e(...t)}}},65355:(e,t,s)=>{Promise.resolve().then(s.bind(s,2824))},68635:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=s(95155),r=s(12115),n=s(41112);function l(e){return{default:e&&"default"in e?e.default:e}}s(21957);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},o=function(e){let t={...i,...e},s=(0,r.lazy)(()=>t.loader().then(l)),o=t.loading;function c(e){let l=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?r.Suspense:r.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(s,{...e})]}):(0,a.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(s,{...e})});return(0,a.jsx)(c,{...i?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},75707:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}});let a=s(73623)._(s(68635));function r(e,t){let s={};"function"==typeof e&&(s.loader=e);let r={...s,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[3418,8500,9751,782,6458,5846,993,8441,3794,7358],()=>e(e.s=65355)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2162],{40182:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>d});var l=t(95155),a=t(50910),r=t(98500),i=t.n(r),n=t(40993);function d(){let e=(0,a.c)("auth");return(0,l.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,l.jsxs)("div",{className:"w-full max-w-lg",children:[(0,l.jsxs)("div",{className:"text-center mb-8",children:[(0,l.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:e(">resetPassword</")}),(0,l.jsx)("p",{className:"text-text-muted",children:e("resetDescription")})]}),(0,l.jsx)(n.Zp,{className:"mb-4",children:(0,l.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-primary/10 text-primary shrink-0 mt-0.5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"terminal"})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold mb-1",children:"Method 1: CLI Reset"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-3",children:"Run the following command on the server where OmniRoute is running:"}),(0,l.jsx)("div",{className:"bg-black/30 rounded-lg p-3 mb-3 font-mono text-sm text-green-400 border border-white/5",children:(0,l.jsx)("code",{children:"npx omniroute reset-password"})}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"This will prompt you to set a new password. The server must be stopped first."})]})]})}),(0,l.jsx)(n.Zp,{className:"mb-6",children:(0,l.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-amber-500/10 text-amber-500 shrink-0 mt-0.5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"database"})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold mb-1",children:"Method 2: Manual Reset"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-3",children:"Delete the password from the database and set a new one on startup:"}),(0,l.jsxs)("ol",{className:"text-sm text-text-muted space-y-2 list-decimal list-inside mb-3",children:[(0,l.jsx)("li",{children:e("stopServer")}),(0,l.jsxs)("li",{children:["Set a new password in your"," ",(0,l.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:".env"})," file:",(0,l.jsx)("div",{className:"bg-black/30 rounded-lg p-2 mt-1 font-mono text-xs text-green-400 border border-white/5",children:"INITIAL_PASSWORD=your_new_password"})]}),(0,l.jsxs)("li",{children:["Delete"," ",(0,l.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:"data/settings.json"})," ","(or remove the"," ",(0,l.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:"passwordHash"})," ","field)"]}),(0,l.jsx)("li",{children:"Restart the server — it will use the new password"})]})]})]})}),(0,l.jsx)("div",{className:"text-center",children:(0,l.jsxs)(i(),{href:"/login",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_back"}),"Back to Login"]})})]})})}},50057:(e,s,t)=>{Promise.resolve().then(t.bind(t,40182))}},e=>{e.O(0,[3418,8500,9751,782,6458,5846,993,8441,3794,7358],()=>e(e.s=50057)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{13504:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(50910),i=s(12115),n=s(40993),l=s(73321);function d(){let e=(0,r.c)("auth"),[t,s]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),[o,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,p]=(0,i.useState)(null),[b,f]=(0,i.useState)(!1),y=(0,l.useRouter)();(0,i.useEffect)(()=>{f(!0),async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/settings`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin){y.push("/dashboard"),y.refresh();return}u(!!e.hasPassword),p(!!e.setupComplete)}else u(!0),p(!0)}catch(e){clearTimeout(t),u(!0),p(!0)}}()},[y]);let j=async e=>{e.preventDefault(),m(!0),c("");try{let e=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t})});if(e.ok)sessionStorage.setItem("omniroute_login_time",String(Date.now())),y.push("/dashboard"),y.refresh();else{let t=await e.json();c(t.error||"Invalid password")}}catch(e){c("An error occurred. Please try again.")}finally{m(!1)}};return null===x||null===h?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-10 h-10 border-2 border-primary/20 rounded-full"}),(0,a.jsx)("div",{className:"absolute inset-0 w-10 h-10 border-2 border-primary border-t-transparent rounded-full animate-spin"})]}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Loading..."})]})}):x||h?!x&&h?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${b?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-amber-500/10 to-amber-500/5 border border-amber-500/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-500 text-[40px]",children:"shield_person"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:"Secure Your Instance"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("passwordNotEnabled")})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:"Set a password to protect your dashboard and secure your API endpoints from unauthorized access."}),(0,a.jsx)(n.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>y.push("/dashboard/settings?tab=security"),children:"Configure Password"})]})}),(0,a.jsx)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:"OmniRoute — Unified AI API Proxy"})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex bg-bg",children:[(0,a.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-sm transition-all duration-700 ease-out ${b?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"mb-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-8",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-primary-hover flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,a.jsx)("span",{className:"text-xl font-semibold text-text-main tracking-tight",children:"OmniRoute"})]}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main tracking-tight",children:e(">signIn</")}),(0,a.jsx)("p",{className:"text-text-muted mt-1.5",children:e("enterPassword")})]}),(0,a.jsxs)("form",{onSubmit:j,className:"space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:e(">password</")}),(0,a.jsx)(n.pd,{type:"password",placeholder:"Enter your password",value:t,onChange:e=>s(e.target.value),required:!0,autoFocus:!0,className:"h-11"}),d&&(0,a.jsxs)("p",{className:"text-sm text-red-500 flex items-center gap-1.5 pt-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),d]})]}),(0,a.jsx)(n.$n,{type:"submit",variant:"primary",className:"w-full h-11 text-sm font-medium",loading:o,children:"Continue"})]}),(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:(0,a.jsx)("a",{href:"/forgot-password",className:"text-sm text-text-muted hover:text-primary transition-colors",children:"Forgot your password?"})})]})}),(0,a.jsx)("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-primary/5 via-primary/3 to-transparent items-center justify-center p-12",children:(0,a.jsx)("div",{className:`max-w-md transition-all duration-700 delay-200 ease-out ${b?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-text-main mb-3",children:"Unified AI API Proxy"}),(0,a.jsx)("p",{className:"text-text-muted leading-relaxed",children:"Route requests to multiple AI providers through a single endpoint. Load balancing, failover, and usage tracking built in."})]}),(0,a.jsx)("div",{className:"space-y-4",children:[{icon:"swap_horiz",title:"Multi-Provider",desc:"OpenAI, Anthropic, Google, and more"},{icon:"speed",title:"Load Balancing",desc:"Distribute requests intelligently"},{icon:"analytics",title:"Usage Tracking",desc:"Monitor costs and tokens"}].map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-surface/50 border border-border",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:e.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e.desc})]})]},e.icon))})]})})})]}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${b?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-primary/10 to-primary/5 border border-primary/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[40px]",children:"rocket_launch"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:e(">welcome</")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Let's get your OmniRoute instance configured"})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:"Run the onboarding wizard to set up your password and connect your first AI provider."}),(0,a.jsx)(n.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>y.push("/dashboard/onboarding"),children:"Start Onboarding"})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedProxy")]})]})})}},90723:(e,t,s)=>{Promise.resolve().then(s.bind(s,13504))}},e=>{e.O(0,[3418,8500,9751,782,6458,5846,993,8441,3794,7358],()=>e(e.s=90723)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|