feat: 添加自动邮箱映射功能并完善署名系统

- 新增 attributionEmail.ts 实现模型名到邮箱的自动映射
- 重构署名逻辑,统一使用 getRealModelName() 和 getAttributionEmail()
- 将产品名从 Claude Code 更新为 Claude Code Best
- 更新 PRODUCT_URL 指向 claude-code-best fork 仓库

Co-Authored-By: glm-4.7 <noreply@zhipuai.cn>
This commit is contained in:
claude-code-best
2026-05-07 11:12:40 +08:00
parent f7f69b759c
commit cb4a6e76cf
3 changed files with 34 additions and 27 deletions

View File

@@ -0,0 +1,22 @@
const MODEL_EMAIL_MAP: Array<{ keywords: string[]; email: string }> = [
{ keywords: ['claude'], email: 'noreply@anthropic.com' },
{
keywords: ['gpt', 'dall-e', 'o1-', 'o3-', 'o4-'],
email: 'noreply@openai.com',
},
{ keywords: ['gemini'], email: 'noreply@google.com' },
{ keywords: ['grok'], email: 'noreply@xai.com' },
{ keywords: ['glm'], email: 'noreply@zhipuai.cn' },
{ keywords: ['deepseek'], email: 'noreply@deepseek.com' },
{ keywords: ['qwen'], email: 'noreply@alibabacloud.com' },
]
export function getAttributionEmail(modelName: string): string {
const lower = modelName.toLowerCase()
for (const { keywords, email } of MODEL_EMAIL_MAP) {
if (keywords.some(kw => lower.includes(kw))) {
return email
}
}
return 'noreply@anthropic.com'
}