MCPcopy Create free account
hub / github.com/microsoft/Webwright / tokenTotalDisplay

Function tokenTotalDisplay

assets/compare_trajectory/app.js:1907–1921  ·  view source on GitHub ↗
(trace)

Source from the content-addressed store, hash-verified

1905 this[side] = stripTrajectoryCompanion(trace);
1906 },
1907 tokenTotalDisplay(trace) {
1908 if (!trace) {
1909 return 'n/a';
1910 }
1911 if (trace.exactTokens && typeof trace.exactTokens.total_tokens === 'number') {
1912 return 'Exact tokens: ' + numberFormat(trace.exactTokens.total_tokens);
1913 }
1914 if (typeof trace.tokenEstimateTotal === 'number') {
1915 return 'Est. output tokens: ~' + numberFormat(trace.tokenEstimateTotal);
1916 }
1917 if (trace.tokenEstimateError) {
1918 return 'Est. output tokens failed';
1919 }
1920 return 'Estimating output tokens...';
1921 },
1922 tokenNote(trace) {
1923 if (!trace) {
1924 return '';

Callers

nothing calls this directly

Calls 1

numberFormatFunction · 0.85

Tested by

no test coverage detected