(slug: string)
| 9 | * - Empty string → empty string |
| 10 | */ |
| 11 | export function formatShortModelName(slug: string): string { |
| 12 | if (!slug) return slug; |
| 13 | // Strip kilo/ prefix first |
| 14 | const withoutKilo = slug.startsWith(KILOCODE_KILO_PROVIDER_PREFIX) |
| 15 | ? slug.slice(KILOCODE_KILO_PROVIDER_PREFIX.length) |
| 16 | : slug; |
| 17 | // Strip provider prefix (everything before and including the first /) |
| 18 | const slashIndex = withoutKilo.indexOf('/'); |
| 19 | return slashIndex === -1 ? withoutKilo : withoutKilo.slice(slashIndex + 1); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Formats a `{ providerID, modelID }` ref into a short display name. |
no outgoing calls
no test coverage detected