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

Function encodeModelSelection

sdk/app-builder/src/components/app-builder.tsx:3827–3833  ·  view source on GitHub ↗
(selection: { id: string; params?: ModelParam[] })

Source from the content-addressed store, hash-verified

3825}
3826
3827function encodeModelSelection(selection: { id: string; params?: ModelParam[] }) {
3828 const params = selection.params?.filter((param) => param.value)
3829 return JSON.stringify({
3830 id: selection.id,
3831 ...(params?.length ? { params } : {}),
3832 })
3833}
3834
3835function parseModelSelectionValue(value: string): {
3836 id: string

Callers 3

app-builder.tsxFile · 0.85
selectModelParameterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected