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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui/stats.ts +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-flight-deck",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Live OpenCode V2 session telemetry — agent, model, branch, cost, tokens, cache hit rate and context usage in your sidebar.",
5
5
  "keywords": [
6
6
  "opencode",
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
- const row = (label: string, value: string): string => `${label.padEnd(labelWidth)}${value}`;
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": {