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

Function selectionOverlapScore

sdk/coding-agent-cli/src/tui/App.tsx:1101–1109  ·  view source on GitHub ↗
(left: ModelSelection, right: ModelSelection)

Source from the content-addressed store, hash-verified

1099}
1100
1101function selectionOverlapScore(left: ModelSelection, right: ModelSelection) {
1102 const rightParams = new Set(
1103 (right.params ?? []).map((param) => `${param.id}=${param.value}`)
1104 )
1105
1106 return (left.params ?? []).filter((param) =>
1107 rightParams.has(`${param.id}=${param.value}`)
1108 ).length
1109}
1110
1111function selectionSearchText(selection: ModelSelection) {
1112 return [

Callers 1

findPreferredSelectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected