MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / formatShortModelName

Function formatShortModelName

apps/web/src/lib/format-model-name.ts:11–20  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

9 * - Empty string → empty string
10 */
11export 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.

Callers 2

SessionInfoDialogFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected