MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / parseStructuredString

Function parseStructuredString

src/ui/src/lib/agentComment.ts:45–53  ·  view source on GitHub ↗
(value?: string)

Source from the content-addressed store, hash-verified

43}
44
45function parseStructuredString(value?: string): Record<string, unknown> | null {
46 if (!value) return null
47 try {
48 const parsed = JSON.parse(value) as unknown
49 return asRecord(parsed)
50 } catch {
51 return null
52 }
53}
54
55export function normalizeAgentComment(value: unknown): AgentComment | null {
56 const direct = asString(value)

Callers 1

extractOperationCommentFunction · 0.85

Calls 2

asRecordFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected