MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / parseBlockRef

Function parseBlockRef

lib/message-ids.ts:60–68  ·  view source on GitHub ↗
(ref: string)

Source from the content-addressed store, hash-verified

58}
59
60export function parseBlockRef(ref: string): number | null {
61 const normalized = ref.trim().toLowerCase()
62 const match = normalized.match(BLOCK_REF_REGEX)
63 if (!match) {
64 return null
65 }
66 const id = Number.parseInt(match[1], 10)
67 return Number.isInteger(id) ? id : null
68}
69
70export function parseBoundaryId(id: string): ParsedBoundaryId | null {
71 const normalized = id.trim().toLowerCase()

Callers 3

parseBlockIdArgFunction · 0.90
parseBlockIdArgFunction · 0.90
parseBoundaryIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected