MCPcopy Index your code
hub / github.com/simstudioai/sim / hasRealTokenData

Function hasRealTokenData

apps/sim/lib/tokenization/utils.ts:60–65  ·  view source on GitHub ↗
(
  tokens?: Pick<BlockTokens, 'total' | 'input' | 'output'>
)

Source from the content-addressed store, hash-verified

58 * Checks if tokens/cost data is meaningful (non-zero)
59 */
60export function hasRealTokenData(
61 tokens?: Pick<BlockTokens, 'total' | 'input' | 'output'>
62): boolean {
63 if (!tokens) return false
64 return (tokens.total ?? 0) > 0 || (tokens.input ?? 0) > 0 || (tokens.output ?? 0) > 0
65}
66
67/**
68 * Checks if cost data is meaningful (non-zero)

Callers 1

processStreamingBlockLogFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected