diff --git a/ui/src/components/cliproxy/control-panel-embed.tsx b/ui/src/components/cliproxy/control-panel-embed.tsx index 6fcce60f..e29ea502 100644 --- a/ui/src/components/cliproxy/control-panel-embed.tsx +++ b/ui/src/components/cliproxy/control-panel-embed.tsx @@ -11,9 +11,7 @@ import { RefreshCw, AlertCircle, Key, X, Gauge, Globe, Settings } from 'lucide-r import { useQuery } from '@tanstack/react-query'; import { api } from '@/lib/api-client'; import type { CliproxyServerConfig } from '@/lib/api-client'; - -/** CLIProxyAPI default port */ -const CLIPROXY_DEFAULT_PORT = 8317; +import { CLIPROXY_DEFAULT_PORT } from '@/lib/preset-utils'; interface AuthTokensResponse { apiKey: { value: string; isCustom: boolean }; diff --git a/ui/src/pages/cursor.tsx b/ui/src/pages/cursor.tsx index 0997dddd..f66dd584 100644 --- a/ui/src/pages/cursor.tsx +++ b/ui/src/pages/cursor.tsx @@ -23,7 +23,7 @@ import { XCircle, } from 'lucide-react'; import { cn } from '@/lib/utils'; -import { useCursor } from '@/hooks/use-cursor'; +import { DEFAULT_CURSOR_PORT, useCursor } from '@/hooks/use-cursor'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -77,7 +77,7 @@ function buildConfigDraft(config?: { haiku_model?: string; }): CursorConfigDraft { return { - port: String(config?.port ?? 20129), + port: String(config?.port ?? DEFAULT_CURSOR_PORT), auto_start: config?.auto_start ?? false, ghost_mode: config?.ghost_mode ?? true, model: config?.model?.trim() || 'gpt-5.3-codex', @@ -767,7 +767,7 @@ export function CursorPage() {
Port - {status?.port ?? config?.port ?? 20129} + {status?.port ?? config?.port ?? DEFAULT_CURSOR_PORT}