MCPcopy Create free account
hub / github.com/anomalyco/opencode / requireText

Function requireText

packages/core/src/system-context/index.ts:309–312  ·  view source on GitHub ↗
(key: Key, kind: string, text: string)

Source from the content-addressed store, hash-verified

307}
308
309function requireText(key: Key, kind: string, text: string) {
310 if (text.length === 0) throw new Error(`System context source ${key} rendered an empty ${kind}`)
311 return text
312}
313
314function assertUniqueKeys(sources: ReadonlyArray<PackedSource>) {
315 const keys = new Set<Key>()

Callers 2

snapshotFunction · 0.85
makeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected