mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-07 14:41:19 +08:00
style(*): format code with prettier
- Remove extra whitespace in http_client.rs - Fix formatting issues in useProviderActions.ts
This commit is contained in:
@@ -544,5 +544,4 @@ mod tests {
|
||||
std::env::remove_var(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -141,20 +141,17 @@ export function useProviderActions(activeApp: AppId, isProxyRunning?: boolean) {
|
||||
async (provider: Provider) => {
|
||||
// Determine why this provider requires the proxy
|
||||
let proxyRequiredReason: string | null = null;
|
||||
if (
|
||||
!isProxyRunning &&
|
||||
provider.category !== "official"
|
||||
) {
|
||||
if (!isProxyRunning && provider.category !== "official") {
|
||||
if (
|
||||
provider.meta?.apiFormat === "openai_chat" &&
|
||||
(activeApp === "claude")
|
||||
activeApp === "claude"
|
||||
) {
|
||||
proxyRequiredReason = t("notifications.proxyReasonOpenAIChat", {
|
||||
defaultValue: "使用 OpenAI Chat 接口格式",
|
||||
});
|
||||
} else if (
|
||||
provider.meta?.apiFormat === "openai_responses" &&
|
||||
(activeApp === "claude")
|
||||
activeApp === "claude"
|
||||
) {
|
||||
proxyRequiredReason = t("notifications.proxyReasonOpenAIResponses", {
|
||||
defaultValue: "使用 OpenAI Responses 接口格式",
|
||||
@@ -173,7 +170,8 @@ export function useProviderActions(activeApp: AppId, isProxyRunning?: boolean) {
|
||||
toast.warning(
|
||||
t("notifications.proxyRequiredForSwitch", {
|
||||
reason: proxyRequiredReason,
|
||||
defaultValue: "此供应商{{reason}},需要代理服务才能正常使用,请先启动代理",
|
||||
defaultValue:
|
||||
"此供应商{{reason}},需要代理服务才能正常使用,请先启动代理",
|
||||
}),
|
||||
);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user