tokmon 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +8 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -844,7 +844,7 @@ function App({ interval: cliInterval }) {
|
|
|
844
844
|
cursor,
|
|
845
845
|
expanded,
|
|
846
846
|
maxRows: rows - 12,
|
|
847
|
-
|
|
847
|
+
cols,
|
|
848
848
|
onRowClick: (idx) => {
|
|
849
849
|
if (idx === cursor) setExpanded((e) => e === idx ? -1 : idx);
|
|
850
850
|
else setCursor(idx);
|
|
@@ -1090,8 +1090,13 @@ function SummaryRow({ label, summary }) {
|
|
|
1090
1090
|
] }) })
|
|
1091
1091
|
] });
|
|
1092
1092
|
}
|
|
1093
|
-
function TableView({ rows: allRows, cursor, expanded, maxRows,
|
|
1094
|
-
const
|
|
1093
|
+
function TableView({ rows: allRows, cursor, expanded, maxRows, cols, onRowClick }) {
|
|
1094
|
+
const wide = cols > 90;
|
|
1095
|
+
const base = wide ? { label: 12, input: 10, output: 10, cc: 10, cr: 11, total: 11, cost: 13 } : { label: 8, input: 7, output: 7, cc: 7, cr: 8, total: 0, cost: 11 };
|
|
1096
|
+
const fixed = base.label + base.input + base.output + base.cc + base.cr + base.total + base.cost;
|
|
1097
|
+
const minModels = wide ? 22 : 14;
|
|
1098
|
+
const available = cols - fixed - 6;
|
|
1099
|
+
const W = { ...base, models: Math.max(minModels, available) };
|
|
1095
1100
|
const lineW = W.label + W.models + W.input + W.output + W.cc + W.cr + W.total + W.cost;
|
|
1096
1101
|
const totals = { input: 0, output: 0, cacheCreate: 0, cacheRead: 0, cost: 0 };
|
|
1097
1102
|
for (const r of allRows) {
|