MCPcopy Create free account
hub / github.com/cursor/cookbook / buildVariantLabel

Function buildVariantLabel

sdk/coding-agent-cli/src/agent.ts:284–293  ·  view source on GitHub ↗
(model: SDKModel, variantDisplayName: string)

Source from the content-addressed store, hash-verified

282}
283
284function buildVariantLabel(model: SDKModel, variantDisplayName: string) {
285 const baseLabel = model.displayName || model.id
286 const variantLabel = variantDisplayName.trim()
287
288 if (!variantLabel || labelsMatch(baseLabel, variantLabel)) {
289 return baseLabel
290 }
291
292 return `${baseLabel} - ${variantLabel}`
293}
294
295function disambiguateDuplicateLabels(
296 choices: ModelChoice[],

Callers 1

modelToChoicesFunction · 0.85

Calls 1

labelsMatchFunction · 0.85

Tested by

no test coverage detected