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

Function parseBoundaryId

lib/message-ids.ts:70–91  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

68}
69
70export function parseBoundaryId(id: string): ParsedBoundaryId | null {
71 const normalized = id.trim().toLowerCase()
72 const messageIndex = parseMessageRef(normalized)
73 if (messageIndex !== null) {
74 return {
75 kind: "message",
76 ref: formatMessageRef(messageIndex),
77 index: messageIndex,
78 }
79 }
80
81 const blockId = parseBlockRef(normalized)
82 if (blockId !== null) {
83 return {
84 kind: "compressed-block",
85 ref: formatBlockRef(blockId),
86 blockId,
87 }
88 }
89
90 return null
91}
92
93function escapeXmlAttribute(value: string): string {
94 return value

Callers 2

resolveBoundaryIdsFunction · 0.90
resolveMessageFunction · 0.90

Calls 4

parseMessageRefFunction · 0.85
formatMessageRefFunction · 0.85
parseBlockRefFunction · 0.85
formatBlockRefFunction · 0.85

Tested by

no test coverage detected