MCPcopy Create free account
hub / github.com/anomalyco/opencode / tokens

Function tokens

packages/opencode/test/lib/llm-server.ts:60–67  ·  view source on GitHub ↗
(input?: Usage)

Source from the content-addressed store, hash-verified

58}
59
60function tokens(input?: Usage) {
61 if (!input) return
62 return {
63 prompt_tokens: input.input,
64 completion_tokens: input.output,
65 total_tokens: input.input + input.output,
66 }
67}
68
69function chunk(input: { delta?: Record<string, unknown>; finish?: string; usage?: Usage }) {
70 return {

Callers 3

chunkFunction · 0.70
tooltipValueFunction · 0.50
SessionContextTabFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected