GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — claude-code-source-code/src/constants/product.ts at main · wangwang4git/claude-code-source-code Expand file tree/ Copy pathproduct.tsMore file actions 76 lines (71 loc) · 2.5 KB / Copy pathproduct.tsFile metadata and controls76 lines (71 loc) · 2.5 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 export const PRODUCT_URL = 'https://claude.com/claude-code' // Claude Code Remote session URLs export const CLAUDE_AI_BASE_URL = 'https://claude.ai' export const CLAUDE_AI_STAGING_BASE_URL = 'https://claude-ai.staging.ant.dev' export const CLAUDE_AI_LOCAL_BASE_URL = 'http://localhost:4000' /** * Determine if we're in a staging environment for remote sessions. * Checks session ID format and ingress URL. */ export function isRemoteSessionStaging( sessionId?: string, ingressUrl?: string, ): boolean { return ( sessionId?.includes('_staging_') === true || ingressUrl?.includes('staging') === true ) } /** * Determine if we're in a local-dev environment for remote sessions. * Checks session ID format (e.g. `session_local_...`) and ingress URL. */ export function isRemoteSessionLocal( sessionId?: string, ingressUrl?: string, ): boolean { return ( sessionId?.includes('_local_') === true || ingressUrl?.includes('localhost') === true ) } /** * Get the base URL for Claude AI based on environment. */ export function getClaudeAiBaseUrl( sessionId?: string, ingressUrl?: string, ): string { if (isRemoteSessionLocal(sessionId, ingressUrl)) { return CLAUDE_AI_LOCAL_BASE_URL } if (isRemoteSessionStaging(sessionId, ingressUrl)) { return CLAUDE_AI_STAGING_BASE_URL } return CLAUDE_AI_BASE_URL } /** * Get the full session URL for a remote session. * * The cse_→session_ translation is a temporary shim gated by * tengu_bridge_repl_v2_cse_shim_enabled (see isCseShimEnabled). Worker * endpoints (/v1/code/sessions/{id}/worker/*) want `cse_*` but the claude.ai * frontend currently routes on `session_*` (compat/convert.go:27 validates * TagSession). Same UUID body, different tag prefix. Once the server tags by * environment_kind and the frontend accepts `cse_*` directly, flip the gate * off. No-op for IDs already in `session_*` form. See toCompatSessionId in * src/bridge/sessionIdCompat.ts for the canonical helper (lazy-required here * to keep constants/ leaf-of-DAG at module-load time). */ export function getRemoteSessionUrl( sessionId: string, ingressUrl?: string, ): string { /* eslint-disable @typescript-eslint/no-require-imports */ const { toCompatSessionId } = require('../bridge/sessionIdCompat.js') as typeof import('../bridge/sessionIdCompat.js') /* eslint-enable @typescript-eslint/no-require-imports */ const compatId = toCompatSessionId(sessionId) const baseUrl = getClaudeAiBaseUrl(compatId, ingressUrl) return `${baseUrl}/code/${compatId}` } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |