mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
feat: 支持自托管的 remote-control-server (#214)
* feat: 支持自托管的 remote-control-server (#214) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import {
|
||||
getClaudeAiBaseUrl,
|
||||
getRemoteSessionUrl,
|
||||
} from '../constants/product.js'
|
||||
import { getClaudeAiBaseUrl } from '../constants/product.js'
|
||||
import { isSelfHostedBridge, getBridgeBaseUrl } from './bridgeConfig.js'
|
||||
import { stringWidth } from '@anthropic/ink'
|
||||
import { formatDuration, truncateToWidth } from '../utils/format.js'
|
||||
import { getGraphemeSegmenter } from '../utils/intl.js'
|
||||
@@ -40,7 +38,10 @@ export function buildBridgeConnectUrl(
|
||||
environmentId: string,
|
||||
ingressUrl?: string,
|
||||
): string {
|
||||
const baseUrl = getClaudeAiBaseUrl(undefined, ingressUrl)
|
||||
// Self-hosted: use the configured server URL directly
|
||||
const baseUrl = isSelfHostedBridge()
|
||||
? getBridgeBaseUrl()
|
||||
: getClaudeAiBaseUrl(undefined, ingressUrl)
|
||||
return `${baseUrl}/code?bridge=${environmentId}`
|
||||
}
|
||||
|
||||
@@ -54,7 +55,11 @@ export function buildBridgeSessionUrl(
|
||||
environmentId: string,
|
||||
ingressUrl?: string,
|
||||
): string {
|
||||
return `${getRemoteSessionUrl(sessionId, ingressUrl)}?bridge=${environmentId}`
|
||||
// Self-hosted: use the configured server URL directly
|
||||
const baseUrl = isSelfHostedBridge()
|
||||
? getBridgeBaseUrl()
|
||||
: getClaudeAiBaseUrl(undefined, ingressUrl)
|
||||
return `${baseUrl}/code/${sessionId}?bridge=${environmentId}`
|
||||
}
|
||||
|
||||
/** Compute the glimmer index for a reverse-sweep shimmer animation. */
|
||||
|
||||
Reference in New Issue
Block a user