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

Function modelSelectionKey

sdk/coding-agent-cli/src/agent.ts:383–390  ·  view source on GitHub ↗
(selection: ModelSelection)

Source from the content-addressed store, hash-verified

381}
382
383function modelSelectionKey(selection: ModelSelection) {
384 const params = [...(selection.params ?? [])]
385 .sort((left, right) => left.id.localeCompare(right.id))
386 .map((param) => `${param.id}=${param.value}`)
387 .join("&")
388
389 return params ? `${selection.id}?${params}` : selection.id
390}
391
392function detectCloudRepository(cwd: string): CloudRepository {
393 const remote = runGit(cwd, ["config", "--get", "remote.origin.url"])

Callers 2

currentAgentKeyMethod · 0.85
dedupeModelChoicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected