(model: ModelName)
| 393 | } |
| 394 | |
| 395 | export function renderModelName(model: ModelName): string { |
| 396 | const publicName = getPublicModelDisplayName(model) |
| 397 | if (publicName) { |
| 398 | return publicName |
| 399 | } |
| 400 | if (process.env.USER_TYPE === 'ant') { |
| 401 | const resolved = parseUserSpecifiedModel(model) |
| 402 | const antModel = resolveAntModel(model) |
| 403 | if (antModel) { |
| 404 | const baseName = antModel.model.replace(/\[1m\]$/i, '') |
| 405 | const masked = maskModelCodename(baseName) |
| 406 | const suffix = has1mContext(resolved) ? '[1m]' : '' |
| 407 | return masked + suffix |
| 408 | } |
| 409 | if (resolved !== model) { |
| 410 | return `${model} (${resolved})` |
| 411 | } |
| 412 | return resolved |
| 413 | } |
| 414 | return model |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Returns a safe author name for public display (e.g., in git commit trailers). |
no test coverage detected