spatial-monorepo / editor/src / parseRecognitionResponse
Function: parseRecognitionResponse()
parseRecognitionResponse(
text,fallbackWidth,fallbackHeight):RecognitionResult
Defined in: packages/editor/src/recognition/prompt.ts:92
Parse a model's text reply into a validated RecognitionResult. Tolerates code fences and surrounding prose; drops malformed entries rather than failing the whole result. Throws RecognitionError when no usable JSON object is present.
Parameters
text
string
fallbackWidth
number
fallbackHeight
number
