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

Function assertContextEvent

github/index.ts:293–299  ·  view source on GitHub ↗
(...events: string[])

Source from the content-addressed store, hash-verified

291}
292
293function assertContextEvent(...events: string[]) {
294 const context = useContext()
295 if (!events.includes(context.eventName)) {
296 throw new Error(`Unsupported event type: ${context.eventName}`)
297 }
298 return context
299}
300
301function useEnvModel() {
302 const value = process.env["MODEL"]

Callers 1

index.tsFile · 0.85

Calls 1

useContextFunction · 0.85

Tested by

no test coverage detected