mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
feat: 署名邮箱改为 GitHub noreply 格式并新增模型映射
Co-Authored-By: glm-5.1[1m] <zhipuai@users.noreply.github.com>
This commit is contained in:
@@ -1,19 +1,23 @@
|
|||||||
const MODEL_EMAIL_MAP: Array<{ keywords: string[]; email: string }> = [
|
const MODEL_GITHUB_MAP: Array<{ keywords: string[]; email: string }> = [
|
||||||
{ keywords: ['claude'], email: 'noreply@anthropic.com' },
|
{ keywords: ['claude'], email: 'noreply@anthropic.com' },
|
||||||
|
// TODO: 待用户确认以下 GitHub 账号映射
|
||||||
{
|
{
|
||||||
keywords: ['gpt', 'dall-e', 'o1-', 'o3-', 'o4-'],
|
keywords: ['gpt', 'dall-e', 'o1-', 'o3-', 'o4-'],
|
||||||
email: 'noreply@openai.com',
|
email: 'openai@users.noreply.github.com',
|
||||||
},
|
},
|
||||||
{ keywords: ['gemini'], email: 'noreply@google.com' },
|
{ keywords: ['gemini'], email: 'google-gemini@users.noreply.github.com' },
|
||||||
{ keywords: ['grok'], email: 'noreply@xai.com' },
|
{ keywords: ['grok'], email: 'xai-org@users.noreply.github.com' },
|
||||||
{ keywords: ['glm'], email: 'noreply@zhipuai.cn' },
|
{ keywords: ['glm'], email: 'zhipuai@users.noreply.github.com' },
|
||||||
{ keywords: ['deepseek'], email: 'noreply@deepseek.com' },
|
{ keywords: ['deepseek'], email: 'deepseek-ai@users.noreply.github.com' },
|
||||||
{ keywords: ['qwen'], email: 'noreply@alibabacloud.com' },
|
{ keywords: ['qwen'], email: 'QwenLM@users.noreply.github.com' },
|
||||||
|
{ keywords: ['minimax'], email: 'MiniMax-AI@users.noreply.github.com' },
|
||||||
|
{ keywords: ['mimo'], email: 'XiaomiMiMo@users.noreply.github.com' },
|
||||||
|
{ keywords: ['kimi'], email: 'MoonshotAI@users.noreply.github.com' },
|
||||||
]
|
]
|
||||||
|
|
||||||
export function getAttributionEmail(modelName: string): string {
|
export function getAttributionEmail(modelName: string): string {
|
||||||
const lower = modelName.toLowerCase()
|
const lower = modelName.toLowerCase()
|
||||||
for (const { keywords, email } of MODEL_EMAIL_MAP) {
|
for (const { keywords, email } of MODEL_GITHUB_MAP) {
|
||||||
if (keywords.some(kw => lower.includes(kw))) {
|
if (keywords.some(kw => lower.includes(kw))) {
|
||||||
return email
|
return email
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user