oc-flight-deck 0.2.1 → 0.2.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/package.json +1 -1
- package/src/tui/stats.ts +8 -1
package/package.json
CHANGED
package/src/tui/stats.ts
CHANGED
|
@@ -221,7 +221,14 @@ export function statLine(
|
|
|
221
221
|
const labelWidth = layout.labelWidth ?? DEFAULT_LABEL_WIDTH;
|
|
222
222
|
const barWidth = layout.barWidth ?? DEFAULT_BAR_WIDTH;
|
|
223
223
|
const sparkWidth = layout.sparkWidth ?? DEFAULT_SPARK_WIDTH;
|
|
224
|
-
|
|
224
|
+
// At least one space, always.
|
|
225
|
+
//
|
|
226
|
+
// `padEnd` returns the label unchanged when it is already wider than the
|
|
227
|
+
// column, so a label longer than `labelWidth` was glued straight onto its
|
|
228
|
+
// value: at labelWidth 8 the `reasoning` row rendered as "reasoning153k".
|
|
229
|
+
// The label is nine characters, which made this reachable from a config file.
|
|
230
|
+
const row = (label: string, value: string): string =>
|
|
231
|
+
`${label.padEnd(labelWidth)}${label.length >= labelWidth ? " " : ""}${value}`;
|
|
225
232
|
|
|
226
233
|
switch (field) {
|
|
227
234
|
case "caution": {
|