MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getActiveProxyUrl

Function getActiveProxyUrl

apps/desktop/main/network/proxy.ts:281–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279 * 仅在手动模式且 URL 有效时返回代理 URL,否则返回 undefined
280 */
281export function getActiveProxyUrl(): string | undefined {
282 const config = loadProxyConfig()
283 if (config.mode === 'manual' && config.url) {
284 const validation = validateProxyUrl(config.url)
285 if (validation.valid) {
286 return config.url
287 }
288 }
289 return undefined
290}
291
292export async function resolveModelDownloadProxyUrl(): Promise<string | undefined> {
293 const config = loadProxyConfig()

Callers 1

configureUpdateProxyFunction · 0.90

Calls 2

loadProxyConfigFunction · 0.85
validateProxyUrlFunction · 0.85

Tested by

no test coverage detected