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

Function parse

packages/session-ui/src/components/session-turn.tsx:36–42  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

34 const text = message.replace(/^Error:\s*/, "").trim()
35
36 const parse = (value: string) => {
37 try {
38 return JSON.parse(value) as unknown
39 } catch {
40 return undefined
41 }
42 }
43
44 const read = (value: string) => {
45 const first = parse(value)

Callers 1

readFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected