tokmon 0.11.1 → 0.11.3
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 +10 -5
- 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: 14, cr: 12, 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) {
|
|
@@ -1113,8 +1118,8 @@ function TableView({ rows: allRows, cursor, expanded, maxRows, wide, onRowClick
|
|
|
1113
1118
|
/* @__PURE__ */ jsx(Text, { bold: true, children: col("Models", W.models, "left") }),
|
|
1114
1119
|
/* @__PURE__ */ jsx(Text, { bold: true, children: col("Input", W.input) }),
|
|
1115
1120
|
/* @__PURE__ */ jsx(Text, { bold: true, children: col("Output", W.output) }),
|
|
1116
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: col("CchCrt", W.cc) }),
|
|
1117
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: col("CchRd", W.cr) }),
|
|
1121
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: col(wide ? "Cache Create" : "CchCrt", W.cc) }),
|
|
1122
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: col(wide ? "Cache Read" : "CchRd", W.cr) }),
|
|
1118
1123
|
W.total > 0 && /* @__PURE__ */ jsx(Text, { bold: true, children: col("Total", W.total) }),
|
|
1119
1124
|
/* @__PURE__ */ jsx(Text, { bold: true, children: col("Cost", W.cost) })
|
|
1120
1125
|
] }),
|