界面改进和代码重构:设置窗口最小尺寸并抽象预设供应商配置

- 设置窗口最小尺寸为600x400,防止界面缩放问题
- 将预设供应商配置提取到独立文件providerPresets.ts
- 便于管理和维护预设供应商列表

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
farion1231
2025-08-08 12:12:28 +08:00
parent 6021ad8b22
commit fe71373e7d
3 changed files with 56 additions and 32 deletions

View File

@@ -0,0 +1,52 @@
/**
* 预设供应商配置模板
*/
export interface ProviderPreset {
name: string;
websiteUrl: string;
settingsConfig: object;
}
export const providerPresets: ProviderPreset[] = [
{
name: "智谱GLM",
websiteUrl: "https://open.bigmodel.cn",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://open.bigmodel.cn/api/anthropic",
ANTHROPIC_AUTH_TOKEN: "sk-your-api-key-here",
},
},
},
{
name: "千问Qwen-Coder",
websiteUrl: "https://bailian.console.aliyun.com",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL:
"https://dashscope.aliyuncs.com/api/v2/apps/claude-code-proxy",
ANTHROPIC_AUTH_TOKEN: "sk-your-api-key-here",
},
},
},
{
name: "PackyCode",
websiteUrl: "https://www.packycode.com",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://api.packycode.com",
ANTHROPIC_AUTH_TOKEN: "sk-your-api-key-here",
},
},
},
{
name: "AnyRouter",
websiteUrl: "https://anyrouter.top",
settingsConfig: {
env: {
ANTHROPIC_BASE_URL: "https://anyrouter.top",
ANTHROPIC_AUTH_TOKEN: "sk-your-api-key-here",
},
},
},
];