diff --git a/src-tauri/src/services/provider/mod.rs b/src-tauri/src/services/provider/mod.rs index 73b9944c..b3c5c54f 100644 --- a/src-tauri/src/services/provider/mod.rs +++ b/src-tauri/src/services/provider/mod.rs @@ -312,7 +312,8 @@ base_url = "http://localhost:8080" #[tokio::test] #[serial] - async fn update_current_claude_provider_syncs_live_when_proxy_takeover_detected_without_backup() { + async fn update_current_claude_provider_syncs_live_when_proxy_takeover_detected_without_backup() + { let _home = TempHome::new(); crate::settings::reload_settings().expect("reload settings"); @@ -369,7 +370,11 @@ base_url = "http://localhost:8080" ) .expect("seed taken-over live file"); - state.proxy_service.start().await.expect("start proxy service"); + state + .proxy_service + .start() + .await + .expect("start proxy service"); let updated = Provider::with_id( "p1".into(), @@ -1181,8 +1186,7 @@ impl ProviderService { let live_taken_over = state .proxy_service .detect_takeover_in_live_config_for_app(&app_type); - let should_sync_via_proxy = - is_proxy_running && (has_live_backup || live_taken_over); + let should_sync_via_proxy = is_proxy_running && (has_live_backup || live_taken_over); if should_sync_via_proxy { futures::executor::block_on( diff --git a/src-tauri/src/services/proxy.rs b/src-tauri/src/services/proxy.rs index 0411c26d..4817f679 100644 --- a/src-tauri/src/services/proxy.rs +++ b/src-tauri/src/services/proxy.rs @@ -132,9 +132,12 @@ impl ProxyService { &self, provider: &Provider, ) -> Result<(), String> { - let mut effective_settings = - build_effective_settings_with_common_config(self.db.as_ref(), &AppType::Claude, provider) - .map_err(|e| format!("构建 claude 有效配置失败: {e}"))?; + let mut effective_settings = build_effective_settings_with_common_config( + self.db.as_ref(), + &AppType::Claude, + provider, + ) + .map_err(|e| format!("构建 claude 有效配置失败: {e}"))?; let (proxy_url, _) = self.build_proxy_urls().await?; Self::apply_claude_takeover_fields(&mut effective_settings, &proxy_url); diff --git a/src/components/sessions/SessionManagerPage.tsx b/src/components/sessions/SessionManagerPage.tsx index c73f09ab..a42cd1af 100644 --- a/src/components/sessions/SessionManagerPage.tsx +++ b/src/components/sessions/SessionManagerPage.tsx @@ -468,9 +468,12 @@ export function SessionManagerPage({ appId }: { appId: string }) { variant="secondary" size="icon" className="size-7 bg-blue-50 text-blue-600 hover:bg-blue-100 dark:bg-blue-950/40 dark:text-blue-300 dark:hover:bg-blue-950/60" - aria-label={t("sessionManager.exitBatchModeTooltip", { - defaultValue: "退出批量管理", - })} + aria-label={t( + "sessionManager.exitBatchModeTooltip", + { + defaultValue: "退出批量管理", + }, + )} onClick={exitSelectionMode} >