MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / estimateTokenCountFromBytes

Function estimateTokenCountFromBytes

src/eval/harness.ts:108–110  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

106}
107
108export function estimateTokenCountFromBytes(bytes: number): number {
109 return Math.max(1, Math.ceil(bytes / 4));
110}
111
112function formatPath(filePath: string | null, redactPaths: boolean): string {
113 if (!filePath) {

Callers 2

evaluateDiscoveryTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected