MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / tokenTable

Function tokenTable

atomic-cli/src/commands/query/graph_inspector.js:58–68  ·  view source on GitHub ↗
(parent, tokens)

Source from the content-addressed store, hash-verified

56 section(title).appendChild(element('pre', text, 'inspector-value'));
57 }
58 function tokenTable(parent, tokens) {
59 var table = element('table', undefined, 'inspector-token-table');
60 [['Input', 'input'], ['Output', 'output'], ['Reasoning', 'reasoning'],
61 ['Cache read', 'cache_read'], ['Cache write', 'cache_write'], ['Recorded total', 'total']].forEach(function(pair) {
62 var row = element('tr');
63 row.appendChild(element('th', pair[0]));
64 row.appendChild(element('td', tokens ? Number(tokens[pair[1]]).toLocaleString('en-US') : 'Not recorded'));
65 table.appendChild(row);
66 });
67 parent.appendChild(table);
68 }
69 function usageDetails(node) {
70 var usage = node.metadata && node.metadata.ai_usage;
71 var types = node.types || [node.kind];

Callers 1

usageDetailsFunction · 0.85

Calls 1

elementFunction · 0.85

Tested by

no test coverage detected