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

Function parseHighlight

packages/app/src/context/highlights.tsx:51–62  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

49}
50
51function parseHighlight(value: unknown): Highlight | undefined {
52 if (!isRecord(value)) return
53
54 const title = getText(value.title)
55 if (!title) return
56
57 const description = getText(value.description) ?? getText(value.shortDescription)
58 if (!description) return
59
60 const media = parseMedia(value.media, title)
61 return { title, description, media }
62}
63
64function parseRelease(value: unknown): ParsedRelease | undefined {
65 if (!isRecord(value)) return

Callers 1

parseReleaseFunction · 0.85

Calls 3

getTextFunction · 0.85
parseMediaFunction · 0.85
isRecordFunction · 0.70

Tested by

no test coverage detected