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

Function modelKeyFromSelection

sdk/coding-agent-cli/src/tui/App.tsx:1141–1148  ·  view source on GitHub ↗
(selection: ModelSelection)

Source from the content-addressed store, hash-verified

1139}
1140
1141function modelKeyFromSelection(selection: ModelSelection) {
1142 return JSON.stringify({
1143 id: selection.id,
1144 params: [...(selection.params ?? [])].sort((left, right) =>
1145 left.id.localeCompare(right.id)
1146 ),
1147 })
1148}
1149
1150function isModelSelection(value: unknown): value is ModelSelection {
1151 if (!hasStringProperty(value, "id")) {

Callers 2

modelKeyFunction · 0.85
modelSelectionEqualsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected