mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
fix: align Claude MCP path for custom config dirs (#3431)
* fix claude mcp path for custom config dir * fix claude mcp custom profile isolation * fix claude mcp override path edges * fix ci test isolation
This commit is contained in:
@@ -463,6 +463,7 @@ base_url = "http://localhost:8080"
|
||||
|
||||
db.update_proxy_config(ProxyConfig {
|
||||
live_takeover_active: true,
|
||||
listen_port: 0,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@@ -491,7 +492,7 @@ base_url = "http://localhost:8080"
|
||||
)
|
||||
.expect("seed taken-over live file");
|
||||
|
||||
state
|
||||
let proxy_info = state
|
||||
.proxy_service
|
||||
.start()
|
||||
.await
|
||||
@@ -544,7 +545,7 @@ base_url = "http://localhost:8080"
|
||||
live.get("env")
|
||||
.and_then(|env| env.get("ANTHROPIC_BASE_URL"))
|
||||
.and_then(|v| v.as_str()),
|
||||
Some("http://127.0.0.1:15721"),
|
||||
Some(format!("http://127.0.0.1:{}", proxy_info.port).as_str()),
|
||||
"proxy base URL should stay intact"
|
||||
);
|
||||
assert!(
|
||||
|
||||
@@ -5444,8 +5444,10 @@ command = "shared-command"
|
||||
)
|
||||
.expect("set common config snippet");
|
||||
|
||||
let mut proxy_config = ProxyConfig::default();
|
||||
proxy_config.listen_port = 0;
|
||||
let proxy_config = ProxyConfig {
|
||||
listen_port: 0,
|
||||
..Default::default()
|
||||
};
|
||||
db.update_proxy_config(proxy_config)
|
||||
.await
|
||||
.expect("set test proxy config");
|
||||
@@ -5582,8 +5584,10 @@ requires_openai_auth = true
|
||||
let db = Arc::new(Database::memory().expect("init db"));
|
||||
let state = crate::store::AppState::new(db.clone());
|
||||
|
||||
let mut proxy_config = ProxyConfig::default();
|
||||
proxy_config.listen_port = 0;
|
||||
let proxy_config = ProxyConfig {
|
||||
listen_port: 0,
|
||||
..Default::default()
|
||||
};
|
||||
db.update_proxy_config(proxy_config)
|
||||
.await
|
||||
.expect("set test proxy config");
|
||||
|
||||
Reference in New Issue
Block a user