MCPcopy Index your code
hub / github.com/anomalyco/opencode / valid

Function valid

packages/opencode/src/lsp/server.ts:1002–1007  ·  view source on GitHub ↗
(item: { name?: string; browser_download_url?: string })

Source from the content-addressed store, hash-verified

1000
1001 const assets = release.assets ?? []
1002 const valid = (item: { name?: string; browser_download_url?: string }) => {
1003 if (!item.name) return false
1004 if (!item.browser_download_url) return false
1005 if (!item.name.includes(token)) return false
1006 return item.name.includes(tag)
1007 }
1008
1009 const asset =
1010 assets.find((item) => valid(item) && item.name?.endsWith(".zip")) ??

Callers 3

spawnFunction · 0.85
handleSubmitFunction · 0.85
AuthPromptsViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected