mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
style: apply rustfmt formatting to proxy and provider modules
Reformat chained .header() calls in ClaudeAdapter and StreamCheckService for consistent alignment. Reorder imports alphabetically in stream_check. Fix trailing whitespace in transform.rs and merge import lines in provider/mod.rs.
This commit is contained in:
@@ -349,11 +349,23 @@ impl ProviderAdapter for ClaudeAdapter {
|
||||
// GitHub Copilot: Bearer + 统一指纹头
|
||||
AuthStrategy::GitHubCopilot => request
|
||||
.header("Authorization", format!("Bearer {}", auth.api_key))
|
||||
.header("editor-version", super::copilot_auth::COPILOT_EDITOR_VERSION)
|
||||
.header("editor-plugin-version", super::copilot_auth::COPILOT_PLUGIN_VERSION)
|
||||
.header("copilot-integration-id", super::copilot_auth::COPILOT_INTEGRATION_ID)
|
||||
.header(
|
||||
"editor-version",
|
||||
super::copilot_auth::COPILOT_EDITOR_VERSION,
|
||||
)
|
||||
.header(
|
||||
"editor-plugin-version",
|
||||
super::copilot_auth::COPILOT_PLUGIN_VERSION,
|
||||
)
|
||||
.header(
|
||||
"copilot-integration-id",
|
||||
super::copilot_auth::COPILOT_INTEGRATION_ID,
|
||||
)
|
||||
.header("user-agent", super::copilot_auth::COPILOT_USER_AGENT)
|
||||
.header("x-github-api-version", super::copilot_auth::COPILOT_API_VERSION)
|
||||
.header(
|
||||
"x-github-api-version",
|
||||
super::copilot_auth::COPILOT_API_VERSION,
|
||||
)
|
||||
.header("openai-intent", "conversation-panel"),
|
||||
_ => request,
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ pub fn resolve_reasoning_effort(body: &Value) -> Option<&'static str> {
|
||||
"medium" => Some("medium"),
|
||||
"high" => Some("high"),
|
||||
"max" => Some("xhigh"), // OpenAI xhigh = maximum reasoning effort
|
||||
_ => None, // unknown value — do not inject
|
||||
_ => None, // unknown value — do not inject
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user