mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
Merge branch 'main' into feat/proxy-server
This commit is contained in:
@@ -152,7 +152,7 @@ export function SettingsPage({
|
|||||||
const isBusy = useMemo(() => isLoading && !settings, [isLoading, settings]);
|
const isBusy = useMemo(() => isLoading && !settings, [isLoading, settings]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto max-w-[56rem] flex flex-col h-[calc(100vh-8rem)] px-6">
|
<div className="mx-auto max-w-[56rem] flex flex-col h-[calc(100vh-8rem)] overflow-hidden px-6">
|
||||||
{isBusy ? (
|
{isBusy ? (
|
||||||
<div className="flex flex-1 items-center justify-center">
|
<div className="flex flex-1 items-center justify-center">
|
||||||
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||||
@@ -173,7 +173,7 @@ export function SettingsPage({
|
|||||||
<TabsTrigger value="about">{t("common.about")}</TabsTrigger>
|
<TabsTrigger value="about">{t("common.about")}</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
|
|
||||||
<div className="flex-1 overflow-y-auto pr-2">
|
<div className="flex-1 overflow-y-auto overflow-x-hidden pr-2">
|
||||||
<TabsContent value="general" className="space-y-6 mt-0">
|
<TabsContent value="general" className="space-y-6 mt-0">
|
||||||
{settings ? (
|
{settings ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -205,12 +205,10 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
|
|||||||
}, [skills, searchQuery, filterStatus]);
|
}, [skills, searchQuery, filterStatus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full min-h-0 bg-background/50">
|
<div className="mx-auto max-w-[56rem] px-6 flex flex-col h-[calc(100vh-8rem)] overflow-hidden bg-background/50">
|
||||||
{/* 顶部操作栏(固定区域)已移除,由 App.tsx 接管 */}
|
|
||||||
|
|
||||||
{/* 技能网格(可滚动详情区域) */}
|
{/* 技能网格(可滚动详情区域) */}
|
||||||
<div className="flex-1 min-h-0 overflow-y-auto animate-fade-in">
|
<div className="flex-1 overflow-y-auto overflow-x-hidden animate-fade-in">
|
||||||
<div className="mx-auto max-w-[56rem] px-6 py-4">
|
<div className="py-4">
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="flex items-center justify-center h-64">
|
<div className="flex items-center justify-center h-64">
|
||||||
<RefreshCw className="h-8 w-8 animate-spin text-muted-foreground" />
|
<RefreshCw className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||||
|
|||||||
@@ -257,11 +257,11 @@ export const providerPresets: ProviderPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MiniMax en",
|
name: "MiniMax en",
|
||||||
websiteUrl: "https://platform.minimaxi.io",
|
websiteUrl: "https://platform.minimax.io",
|
||||||
apiKeyUrl: "https://platform.minimax.io/subscribe/coding-plan",
|
apiKeyUrl: "https://platform.minimax.io/subscribe/coding-plan",
|
||||||
settingsConfig: {
|
settingsConfig: {
|
||||||
env: {
|
env: {
|
||||||
ANTHROPIC_BASE_URL: "https://api.minimaxi.io/anthropic",
|
ANTHROPIC_BASE_URL: "https://api.minimax.io/anthropic",
|
||||||
ANTHROPIC_AUTH_TOKEN: "",
|
ANTHROPIC_AUTH_TOKEN: "",
|
||||||
API_TIMEOUT_MS: "3000000",
|
API_TIMEOUT_MS: "3000000",
|
||||||
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: 1,
|
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: 1,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function generateThirdPartyAuth(apiKey: string): Record<string, any> {
|
|||||||
export function generateThirdPartyConfig(
|
export function generateThirdPartyConfig(
|
||||||
providerName: string,
|
providerName: string,
|
||||||
baseUrl: string,
|
baseUrl: string,
|
||||||
modelName = "gpt-5-codex",
|
modelName = "gpt-5.1-codex",
|
||||||
): string {
|
): string {
|
||||||
// 清理供应商名称,确保符合TOML键名规范
|
// 清理供应商名称,确保符合TOML键名规范
|
||||||
const cleanProviderName =
|
const cleanProviderName =
|
||||||
@@ -85,7 +85,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
|||||||
isOfficial: true,
|
isOfficial: true,
|
||||||
auth: generateThirdPartyAuth(""),
|
auth: generateThirdPartyAuth(""),
|
||||||
config: `model_provider = "azure"
|
config: `model_provider = "azure"
|
||||||
model = "gpt-5-codex"
|
model = "gpt-5.1-codex"
|
||||||
model_reasoning_effort = "high"
|
model_reasoning_effort = "high"
|
||||||
disable_response_storage = true
|
disable_response_storage = true
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"aihubmix",
|
"aihubmix",
|
||||||
"https://aihubmix.com/v1",
|
"https://aihubmix.com/v1",
|
||||||
"gpt-5-codex",
|
"gpt-5.1-codex",
|
||||||
),
|
),
|
||||||
endpointCandidates: [
|
endpointCandidates: [
|
||||||
"https://aihubmix.com/v1",
|
"https://aihubmix.com/v1",
|
||||||
@@ -128,7 +128,7 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"dmxapi",
|
"dmxapi",
|
||||||
"https://www.dmxapi.cn/v1",
|
"https://www.dmxapi.cn/v1",
|
||||||
"gpt-5-codex",
|
"gpt-5.1-codex",
|
||||||
),
|
),
|
||||||
endpointCandidates: ["https://www.dmxapi.cn/v1"],
|
endpointCandidates: ["https://www.dmxapi.cn/v1"],
|
||||||
},
|
},
|
||||||
@@ -141,7 +141,7 @@ requires_openai_auth = true`,
|
|||||||
config: generateThirdPartyConfig(
|
config: generateThirdPartyConfig(
|
||||||
"packycode",
|
"packycode",
|
||||||
"https://www.packyapi.com/v1",
|
"https://www.packyapi.com/v1",
|
||||||
"gpt-5-codex",
|
"gpt-5.1-codex",
|
||||||
),
|
),
|
||||||
endpointCandidates: [
|
endpointCandidates: [
|
||||||
"https://www.packyapi.com/v1",
|
"https://www.packyapi.com/v1",
|
||||||
|
|||||||
Reference in New Issue
Block a user