MCPcopy Index your code
hub / github.com/anomalyco/opencode / formatMcpResourceBytes

Function formatMcpResourceBytes

packages/opencode/src/session/prompt.ts:90–94  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

88}
89
90function formatMcpResourceBytes(value: number) {
91 if (value < 1024) return `${value} B`
92 if (value < 1024 * 1024) return `${Math.ceil(value / 1024)} KB`
93 return `${Math.ceil(value / (1024 * 1024))} MB`
94}
95
96function isOrphanedInterruptedTool(part: SessionV1.ToolPart) {
97 // cleanup() marks abandoned tool_use blocks this way after retries/aborts.

Callers 1

prompt.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected