MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isValidGeneratorFunction

Function isValidGeneratorFunction

common/src/templates/agent-validation.ts:300–304  ·  view source on GitHub ↗

* Validates if a string represents a valid generator function

(code: string)

Source from the content-addressed store, hash-verified

298 * Validates if a string represents a valid generator function
299 */
300function isValidGeneratorFunction(code: string): boolean {
301 const trimmed = code.trim()
302 // Check if it's a generator function (must start with function*)
303 return trimmed.startsWith('function*')
304}
305
306/**
307 * Convert JSON schema to Zod schema format using json-schema-to-zod.

Callers 1

validateSingleAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected