opencode-usage 0.4.5 → 0.4.7

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/index.js CHANGED
@@ -648,7 +648,7 @@ function renderTable(dailyStats) {
648
648
  console.log();
649
649
  }
650
650
 
651
- // node_modules/@opentui/core/index-zrvzvh6r.js
651
+ // node_modules/@opentui/core/index-rje6z21e.js
652
652
  function wrapAssembly(lib) {
653
653
  function patch(prototype, name, fn) {
654
654
  const original = prototype[name];
@@ -1866,7 +1866,7 @@ var highlights_default5 = "./highlights-hk7bwhj4.scm";
1866
1866
  // node_modules/@opentui/core/assets/zig/tree-sitter-zig.wasm
1867
1867
  var tree_sitter_zig_default = "./tree-sitter-zig-e78zbjpm.wasm";
1868
1868
 
1869
- // node_modules/@opentui/core/index-zrvzvh6r.js
1869
+ // node_modules/@opentui/core/index-rje6z21e.js
1870
1870
  function getParsers() {
1871
1871
  if (!_cachedParsers) {
1872
1872
  _cachedParsers = [
@@ -9331,7 +9331,6 @@ class MouseParser {
9331
9331
  const y = str.charCodeAt(5) - 33;
9332
9332
  const button = buttonByte & 3;
9333
9333
  const isScroll = (buttonByte & 64) !== 0;
9334
- const isMotion = (buttonByte & 32) !== 0;
9335
9334
  const scrollDirection = !isScroll ? undefined : MouseParser.SCROLL_DIRECTIONS[button];
9336
9335
  const modifiers = {
9337
9336
  shift: (buttonByte & 4) !== 0,
@@ -9348,9 +9347,6 @@ class MouseParser {
9348
9347
  direction: scrollDirection,
9349
9348
  delta: 1
9350
9349
  };
9351
- } else if (isMotion) {
9352
- type = "move";
9353
- actualButton = button === 3 ? -1 : button;
9354
9350
  } else {
9355
9351
  type = button === 3 ? "up" : "down";
9356
9352
  actualButton = button === 3 ? 0 : button;
@@ -16097,11 +16093,9 @@ Captured output:
16097
16093
  if (mouseEvent.type === "scroll") {
16098
16094
  const maybeRenderableId2 = this.hitTest(mouseEvent.x, mouseEvent.y);
16099
16095
  const maybeRenderable2 = Renderable.renderablesByNumber.get(maybeRenderableId2);
16100
- const fallbackTarget = this._currentFocusedRenderable && !this._currentFocusedRenderable.isDestroyed && this._currentFocusedRenderable.focused ? this._currentFocusedRenderable : null;
16101
- const scrollTarget = maybeRenderable2 ?? fallbackTarget;
16102
- if (scrollTarget) {
16103
- const event2 = new MouseEvent(scrollTarget, mouseEvent);
16104
- scrollTarget.processMouseEvent(event2);
16096
+ if (maybeRenderable2) {
16097
+ const event2 = new MouseEvent(maybeRenderable2, mouseEvent);
16098
+ maybeRenderable2.processMouseEvent(event2);
16105
16099
  }
16106
16100
  return true;
16107
16101
  }
@@ -22541,41 +22535,6 @@ class InputRenderable extends TextareaRenderable {
22541
22535
  this.emit("input", this.plainText);
22542
22536
  return result;
22543
22537
  }
22544
- deleteLine() {
22545
- const result = super.deleteLine();
22546
- this.emit("input", this.plainText);
22547
- return result;
22548
- }
22549
- deleteWordBackward() {
22550
- const result = super.deleteWordBackward();
22551
- this.emit("input", this.plainText);
22552
- return result;
22553
- }
22554
- deleteWordForward() {
22555
- const result = super.deleteWordForward();
22556
- this.emit("input", this.plainText);
22557
- return result;
22558
- }
22559
- deleteToLineStart() {
22560
- const result = super.deleteToLineStart();
22561
- this.emit("input", this.plainText);
22562
- return result;
22563
- }
22564
- deleteToLineEnd() {
22565
- const result = super.deleteToLineEnd();
22566
- this.emit("input", this.plainText);
22567
- return result;
22568
- }
22569
- undo() {
22570
- const result = super.undo();
22571
- this.emit("input", this.plainText);
22572
- return result;
22573
- }
22574
- redo() {
22575
- const result = super.redo();
22576
- this.emit("input", this.plainText);
22577
- return result;
22578
- }
22579
22538
  deleteCharacter(direction) {
22580
22539
  if (direction === "backward") {
22581
22540
  this.deleteCharBackward();
@@ -27456,7 +27415,7 @@ function createRenderer({
27456
27415
  while (removed = getFirstChild(parent))
27457
27416
  removeNode(parent, removed);
27458
27417
  replacement && insertNode(parent, replacement);
27459
- return replacement ?? "";
27418
+ return replacement;
27460
27419
  }
27461
27420
  const node = replacement || createSlotNode();
27462
27421
  if (current.length) {
@@ -28110,9 +28069,19 @@ async function readJsonFile(filePath) {
28110
28069
  return null;
28111
28070
  }
28112
28071
  }
28072
+ async function readJsonFileFromPaths(filePaths) {
28073
+ for (const filePath of filePaths) {
28074
+ const data = await readJsonFile(filePath);
28075
+ if (data !== null)
28076
+ return data;
28077
+ }
28078
+ return null;
28079
+ }
28113
28080
  async function loadMultiAccountQuota() {
28114
- const path2 = join3(homedir2(), ".local/share/opencode/multi-account-state.json");
28115
- const state = await readJsonFile(path2);
28081
+ const state = await readJsonFileFromPaths([
28082
+ ANTHROPIC_MULTI_ACCOUNT_STATE_PATH,
28083
+ ANTHROPIC_MULTI_ACCOUNT_STATE_LEGACY_PATH
28084
+ ]);
28116
28085
  if (!state?.usage) {
28117
28086
  return [
28118
28087
  {
@@ -28183,8 +28152,10 @@ function normalizeThresholds(value) {
28183
28152
  };
28184
28153
  }
28185
28154
  async function loadMultiAccountThresholds() {
28186
- const path2 = join3(homedir2(), ".local/share/opencode/multi-account-state.json");
28187
- const state = await readJsonFile(path2);
28155
+ const state = await readJsonFileFromPaths([
28156
+ ANTHROPIC_MULTI_ACCOUNT_STATE_PATH,
28157
+ ANTHROPIC_MULTI_ACCOUNT_STATE_LEGACY_PATH
28158
+ ]);
28188
28159
  if (!state)
28189
28160
  return null;
28190
28161
  return normalizeThresholds(state.config?.threshold);
@@ -28245,6 +28216,8 @@ async function loadAntigravityQuota() {
28245
28216
  ];
28246
28217
  }
28247
28218
  var isBun = typeof globalThis.Bun !== "undefined";
28219
+ var ANTHROPIC_MULTI_ACCOUNT_STATE_PATH = join3(homedir2(), ".config/opencode/anthropic-multi-account-state.json");
28220
+ var ANTHROPIC_MULTI_ACCOUNT_STATE_LEGACY_PATH = join3(homedir2(), ".local/share/opencode/multi-account-state.json");
28248
28221
 
28249
28222
  // src/codex-client.ts
28250
28223
  import { readFile as readFile2 } from "fs/promises";
@@ -28255,11 +28228,18 @@ function getCodexMultiAuthStorePaths() {
28255
28228
  if (explicitFile)
28256
28229
  return [explicitFile];
28257
28230
  const explicitDir = process.env[CODEX_MULTI_AUTH_STORE_DIR_ENV]?.trim();
28258
- if (explicitDir)
28259
- return [join4(explicitDir, "accounts.json")];
28231
+ if (explicitDir) {
28232
+ return [
28233
+ join4(explicitDir, "codex-multi-account-accounts.json"),
28234
+ join4(explicitDir, "codex-multi-accounts.json"),
28235
+ join4(explicitDir, "accounts.json")
28236
+ ];
28237
+ }
28260
28238
  return [
28261
- CODEX_MULTI_AUTH_DEFAULT_STORE_PATH,
28262
- CODEX_MULTI_AUTH_LEGACY_STORE_PATH
28239
+ CODEX_MULTI_AUTH_STORE_PATH,
28240
+ CODEX_MULTI_AUTH_LEGACY_STORE_PATH,
28241
+ CODEX_MULTI_AUTH_OLDER_STORE_PATH,
28242
+ CODEX_MULTI_AUTH_OLDEST_STORE_PATH
28263
28243
  ];
28264
28244
  }
28265
28245
  function windowToUsed(window) {
@@ -28447,8 +28427,10 @@ async function loadCodexQuota(token) {
28447
28427
  var isBun2 = typeof globalThis.Bun !== "undefined";
28448
28428
  var CODEX_API_URL = "https://chatgpt.com/backend-api/wham/usage";
28449
28429
  var CODEX_AUTH_PATH = join4(homedir3(), ".codex", "auth.json");
28450
- var CODEX_MULTI_AUTH_DEFAULT_STORE_PATH = join4(homedir3(), ".config", "oc-codex-multi-account", "accounts.json");
28451
- var CODEX_MULTI_AUTH_LEGACY_STORE_PATH = join4(homedir3(), ".config", "opencode-multi-auth", "accounts.json");
28430
+ var CODEX_MULTI_AUTH_STORE_PATH = join4(homedir3(), ".config", "opencode", "codex-multi-account-accounts.json");
28431
+ var CODEX_MULTI_AUTH_LEGACY_STORE_PATH = join4(homedir3(), ".config", "opencode", "codex-multi-accounts.json");
28432
+ var CODEX_MULTI_AUTH_OLDER_STORE_PATH = join4(homedir3(), ".config", "oc-codex-multi-account", "accounts.json");
28433
+ var CODEX_MULTI_AUTH_OLDEST_STORE_PATH = join4(homedir3(), ".config", "opencode-multi-auth", "accounts.json");
28452
28434
  var CODEX_MULTI_AUTH_STORE_FILE_ENV = "OPENCODE_MULTI_AUTH_STORE_FILE";
28453
28435
  var CODEX_MULTI_AUTH_STORE_DIR_ENV = "OPENCODE_MULTI_AUTH_STORE_DIR";
28454
28436
 
@@ -28698,7 +28680,7 @@ function UsageTable(props) {
28698
28680
  insert(_el$11, () => padLeft2(formatNum(totalStats().tokens), 13));
28699
28681
  insert(_el$12, () => padLeft2(formatCost2(totalStats().cost), 10));
28700
28682
  effect((_p$) => {
28701
- var _v$ = props.isSelected ? COLORS.accent.teal : COLORS.border, _v$2 = props.width ?? "50%", _v$3 = COLORS.bg.secondary, _v$4 = COLORS.accent.teal, _v$5 = COLORS.border, _v$6 = COLORS.text.muted, _v$7 = COLORS.border, _v$8 = {
28683
+ var _v$ = props.isSelected ? COLORS.accent.teal : COLORS.border, _v$2 = props.width ?? "49%", _v$3 = COLORS.bg.secondary, _v$4 = COLORS.accent.teal, _v$5 = COLORS.border, _v$6 = COLORS.text.muted, _v$7 = COLORS.border, _v$8 = {
28702
28684
  fg: COLORS.accent.teal,
28703
28685
  bold: true
28704
28686
  }, _v$9 = {
@@ -28753,7 +28735,7 @@ function QuotaPanel(props) {
28753
28735
  const resetDate = new Date(resetAt * 1000);
28754
28736
  const now = new Date;
28755
28737
  if (resetDate <= now)
28756
- return "\u27F3 resetting...";
28738
+ return compact ? "\u27F3 reset" : "\u27F3 resetting...";
28757
28739
  const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
28758
28740
  const tomorrow = new Date(today);
28759
28741
  tomorrow.setDate(tomorrow.getDate() + 1);
@@ -28874,6 +28856,7 @@ function QuotaPanel(props) {
28874
28856
  children: ([accountName, accountQuotas]) => {
28875
28857
  const isActive = accountName.includes("[ACTIVE]");
28876
28858
  const cleanName = accountName.replace(" [ACTIVE]", "").trim();
28859
+ const displayAccountName = props.twoColumns ? truncateText(cleanName, isActive ? 15 : 22) : cleanName;
28877
28860
  return (() => {
28878
28861
  var _el$52 = createElement("box"), _el$53 = createElement("box"), _el$54 = createElement("text");
28879
28862
  insertNode(_el$52, _el$53);
@@ -28897,7 +28880,7 @@ function QuotaPanel(props) {
28897
28880
  insert(_el$54, isActive ? [(() => {
28898
28881
  var _el$55 = createElement("span"), _el$56 = createTextNode(`\u25CF `);
28899
28882
  insertNode(_el$55, _el$56);
28900
- insert(_el$55, cleanName, null);
28883
+ insert(_el$55, displayAccountName, null);
28901
28884
  effect((_$p) => setProp(_el$55, "style", {
28902
28885
  fg: COLORS.accent.teal,
28903
28886
  bold: true
@@ -28912,7 +28895,7 @@ function QuotaPanel(props) {
28912
28895
  return _el$57;
28913
28896
  })()] : (() => {
28914
28897
  var _el$60 = createElement("span");
28915
- insert(_el$60, cleanName);
28898
+ insert(_el$60, displayAccountName);
28916
28899
  effect((_$p) => setProp(_el$60, "style", {
28917
28900
  fg: COLORS.text.primary,
28918
28901
  bold: true
@@ -28925,22 +28908,24 @@ function QuotaPanel(props) {
28925
28908
  const rawDisplayLabel = quota.label.replace(accountName, "").replace(/^[\s-]+/, "").trim();
28926
28909
  const displayLabel = rawDisplayLabel || "Status";
28927
28910
  const compact = Boolean(props.twoColumns);
28928
- const labelWidth = compact ? 12 : 15;
28929
- const barWidth = compact ? 14 : 20;
28911
+ const labelWidth = compact ? 10 : 15;
28912
+ const barWidth = compact ? 10 : 20;
28913
+ const displayLabelText = compact ? truncateText(displayLabel, labelWidth) : displayLabel;
28914
+ const resetText = formatResetTime(quota.resetAt, compact);
28915
+ const compactResetText = compact ? truncateText(resetText, 8) : resetText;
28916
+ const errorText = compact ? truncateText(`${displayLabel}: ${quota.error ?? "Error"}`, 28) : `${displayLabel}: ${quota.error}`;
28930
28917
  return createComponent2(Show, {
28931
28918
  get when() {
28932
28919
  return !quota.error;
28933
28920
  },
28934
28921
  get fallback() {
28935
28922
  return (() => {
28936
- var _el$69 = createElement("box"), _el$70 = createElement("text"), _el$71 = createTextNode(`\u2717 `), _el$72 = createTextNode(`: `);
28923
+ var _el$69 = createElement("box"), _el$70 = createElement("text"), _el$71 = createTextNode(`\u2717 `);
28937
28924
  insertNode(_el$69, _el$70);
28938
28925
  setProp(_el$69, "paddingLeft", 1);
28939
28926
  setProp(_el$69, "flexShrink", 0);
28940
28927
  insertNode(_el$70, _el$71);
28941
- insertNode(_el$70, _el$72);
28942
- insert(_el$70, displayLabel, _el$72);
28943
- insert(_el$70, () => quota.error, null);
28928
+ insert(_el$70, errorText, null);
28944
28929
  effect((_$p) => setProp(_el$70, "fg", COLORS.accent.red, _$p));
28945
28930
  return _el$69;
28946
28931
  })();
@@ -28955,12 +28940,12 @@ function QuotaPanel(props) {
28955
28940
  insertNode(_el$62, _el$65);
28956
28941
  insertNode(_el$62, _el$67);
28957
28942
  setProp(_el$62, "wrapMode", "none");
28958
- insert(_el$63, () => padRight2(displayLabel, labelWidth));
28943
+ insert(_el$63, () => padRight2(displayLabelText, labelWidth));
28959
28944
  insert(_el$64, () => renderBar(quota.used, barWidth));
28960
28945
  insertNode(_el$65, _el$66);
28961
28946
  insert(_el$65, () => padLeft2((quota.used * 100).toFixed(0) + "%", 4), null);
28962
28947
  insertNode(_el$67, _el$68);
28963
- insert(_el$67, () => formatResetTime(quota.resetAt, compact), null);
28948
+ insert(_el$67, compactResetText, null);
28964
28949
  effect((_p$) => {
28965
28950
  var _v$24 = {
28966
28951
  fg: COLORS.text.secondary
@@ -28987,7 +28972,7 @@ function QuotaPanel(props) {
28987
28972
  });
28988
28973
  }
28989
28974
  }), null);
28990
- effect((_$p) => setProp(_el$52, "width", props.twoColumns ? "50%" : undefined, _$p));
28975
+ effect((_$p) => setProp(_el$52, "width", props.twoColumns ? "49%" : undefined, _$p));
28991
28976
  return _el$52;
28992
28977
  })();
28993
28978
  }
@@ -29010,7 +28995,7 @@ function QuotaPanel(props) {
29010
28995
  }
29011
28996
  }), null);
29012
28997
  effect((_p$) => {
29013
- var _v$18 = props.isSelected ? COLORS.accent.teal : COLORS.border, _v$19 = props.width ?? "50%", _v$20 = COLORS.bg.secondary, _v$21 = COLORS.accent.teal;
28998
+ var _v$18 = props.isSelected ? COLORS.accent.teal : COLORS.border, _v$19 = props.width ?? "49%", _v$20 = COLORS.bg.secondary, _v$21 = COLORS.accent.teal;
29014
28999
  _v$18 !== _p$.e && (_p$.e = setProp(_el$37, "borderColor", _v$18, _p$.e));
29015
29000
  _v$19 !== _p$.t && (_p$.t = setProp(_el$37, "width", _v$19, _p$.t));
29016
29001
  _v$20 !== _p$.a && (_p$.a = setProp(_el$37, "backgroundColor", _v$20, _p$.a));
@@ -29045,22 +29030,22 @@ function StatusBar(props) {
29045
29030
  return days.toString();
29046
29031
  };
29047
29032
  return (() => {
29048
- var _el$73 = createElement("box"), _el$74 = createElement("text"), _el$75 = createElement("span"), _el$76 = createTextNode(`\u27F3 `), _el$77 = createTextNode(` \u2502 DAYS: `), _el$79 = createElement("span"), _el$80 = createTextNode(` \u2502 `), _el$81 = createElement("span");
29033
+ var _el$72 = createElement("box"), _el$73 = createElement("text"), _el$74 = createElement("span"), _el$75 = createTextNode(`\u27F3 `), _el$76 = createTextNode(` \u2502 DAYS: `), _el$78 = createElement("span"), _el$79 = createTextNode(` \u2502 `), _el$80 = createElement("span");
29034
+ insertNode(_el$72, _el$73);
29035
+ setProp(_el$72, "height", 1);
29036
+ setProp(_el$72, "border-top", true);
29037
+ setProp(_el$72, "padding-left", 1);
29038
+ setProp(_el$72, "padding-right", 1);
29049
29039
  insertNode(_el$73, _el$74);
29050
- setProp(_el$73, "height", 1);
29051
- setProp(_el$73, "border-top", true);
29052
- setProp(_el$73, "padding-left", 1);
29053
- setProp(_el$73, "padding-right", 1);
29040
+ insertNode(_el$73, _el$76);
29041
+ insertNode(_el$73, _el$78);
29042
+ insertNode(_el$73, _el$79);
29043
+ insertNode(_el$73, _el$80);
29044
+ setProp(_el$73, "wrapMode", "none");
29054
29045
  insertNode(_el$74, _el$75);
29055
- insertNode(_el$74, _el$77);
29056
- insertNode(_el$74, _el$79);
29057
- insertNode(_el$74, _el$80);
29058
- insertNode(_el$74, _el$81);
29059
- setProp(_el$74, "wrapMode", "none");
29060
- insertNode(_el$75, _el$76);
29061
- insert(_el$75, () => formatTime(props.lastUpdate), null);
29062
- insert(_el$79, daysLabel);
29063
- insertNode(_el$81, createTextNode(`TAB:PANEL \u2191\u2193:SCROLL \u2190\u2192:DAYS t:TODAY w:WEEK m:MONTH a:ALL HOME:RESET ^C:EXIT`));
29046
+ insert(_el$74, () => formatTime(props.lastUpdate), null);
29047
+ insert(_el$78, daysLabel);
29048
+ insertNode(_el$80, createTextNode(`TAB:PANEL \u2191\u2193:SCROLL \u2190\u2192:DAYS t:TODAY w:WEEK m:MONTH a:ALL HOME:RESET ^C:EXIT`));
29064
29049
  effect((_p$) => {
29065
29050
  var _v$28 = COLORS.border, _v$29 = COLORS.bg.accent, _v$30 = COLORS.text.secondary, _v$31 = {
29066
29051
  fg: COLORS.accent.teal
@@ -29069,12 +29054,12 @@ function StatusBar(props) {
29069
29054
  }, _v$33 = {
29070
29055
  fg: COLORS.text.muted
29071
29056
  };
29072
- _v$28 !== _p$.e && (_p$.e = setProp(_el$73, "border-color", _v$28, _p$.e));
29073
- _v$29 !== _p$.t && (_p$.t = setProp(_el$73, "background-color", _v$29, _p$.t));
29074
- _v$30 !== _p$.a && (_p$.a = setProp(_el$74, "fg", _v$30, _p$.a));
29075
- _v$31 !== _p$.o && (_p$.o = setProp(_el$75, "style", _v$31, _p$.o));
29076
- _v$32 !== _p$.i && (_p$.i = setProp(_el$79, "style", _v$32, _p$.i));
29077
- _v$33 !== _p$.n && (_p$.n = setProp(_el$81, "style", _v$33, _p$.n));
29057
+ _v$28 !== _p$.e && (_p$.e = setProp(_el$72, "border-color", _v$28, _p$.e));
29058
+ _v$29 !== _p$.t && (_p$.t = setProp(_el$72, "background-color", _v$29, _p$.t));
29059
+ _v$30 !== _p$.a && (_p$.a = setProp(_el$73, "fg", _v$30, _p$.a));
29060
+ _v$31 !== _p$.o && (_p$.o = setProp(_el$74, "style", _v$31, _p$.o));
29061
+ _v$32 !== _p$.i && (_p$.i = setProp(_el$78, "style", _v$32, _p$.i));
29062
+ _v$33 !== _p$.n && (_p$.n = setProp(_el$80, "style", _v$33, _p$.n));
29078
29063
  return _p$;
29079
29064
  }, {
29080
29065
  e: undefined,
@@ -29084,7 +29069,7 @@ function StatusBar(props) {
29084
29069
  i: undefined,
29085
29070
  n: undefined
29086
29071
  });
29087
- return _el$73;
29072
+ return _el$72;
29088
29073
  })();
29089
29074
  }
29090
29075
  function Dashboard(props) {
@@ -29250,15 +29235,15 @@ function Dashboard(props) {
29250
29235
  const sideBySide = () => dimensions().width >= 168;
29251
29236
  const quotaTwoColumns = () => dimensions().width >= 150;
29252
29237
  return (() => {
29253
- var _el$83 = createElement("box"), _el$84 = createElement("box");
29254
- insertNode(_el$83, _el$84);
29255
- setProp(_el$83, "width", "100%");
29256
- setProp(_el$83, "height", "100%");
29257
- setProp(_el$83, "flex-direction", "column");
29258
- setProp(_el$84, "flex-grow", 1);
29259
- setProp(_el$84, "gap", 0);
29260
- setProp(_el$84, "padding", 0);
29261
- insert(_el$84, createComponent2(UsageTable, {
29238
+ var _el$82 = createElement("box"), _el$83 = createElement("box");
29239
+ insertNode(_el$82, _el$83);
29240
+ setProp(_el$82, "width", "100%");
29241
+ setProp(_el$82, "height", "100%");
29242
+ setProp(_el$82, "flex-direction", "column");
29243
+ setProp(_el$83, "flex-grow", 1);
29244
+ setProp(_el$83, "gap", 0);
29245
+ setProp(_el$83, "padding", 0);
29246
+ insert(_el$83, createComponent2(UsageTable, {
29262
29247
  get stats() {
29263
29248
  return displayedStats();
29264
29249
  },
@@ -29281,10 +29266,10 @@ function Dashboard(props) {
29281
29266
  return selectedPanel() === "usage";
29282
29267
  },
29283
29268
  get width() {
29284
- return sideBySide() ? "50%" : "100%";
29269
+ return sideBySide() ? "49%" : "100%";
29285
29270
  }
29286
29271
  }), null);
29287
- insert(_el$84, createComponent2(QuotaPanel, {
29272
+ insert(_el$83, createComponent2(QuotaPanel, {
29288
29273
  get quotas() {
29289
29274
  return quotas();
29290
29275
  },
@@ -29292,7 +29277,7 @@ function Dashboard(props) {
29292
29277
  return selectedPanel() === "quota";
29293
29278
  },
29294
29279
  get width() {
29295
- return sideBySide() ? "50%" : "100%";
29280
+ return sideBySide() ? "49%" : "100%";
29296
29281
  },
29297
29282
  get twoColumns() {
29298
29283
  return quotaTwoColumns();
@@ -29304,7 +29289,7 @@ function Dashboard(props) {
29304
29289
  return codexThresholds();
29305
29290
  }
29306
29291
  }), null);
29307
- insert(_el$83, createComponent2(StatusBar, {
29292
+ insert(_el$82, createComponent2(StatusBar, {
29308
29293
  get daysFilter() {
29309
29294
  return daysFilter();
29310
29295
  },
@@ -29314,14 +29299,14 @@ function Dashboard(props) {
29314
29299
  }), null);
29315
29300
  effect((_p$) => {
29316
29301
  var _v$34 = COLORS.bg.primary, _v$35 = sideBySide() ? "row" : "column";
29317
- _v$34 !== _p$.e && (_p$.e = setProp(_el$83, "background-color", _v$34, _p$.e));
29318
- _v$35 !== _p$.t && (_p$.t = setProp(_el$84, "flex-direction", _v$35, _p$.t));
29302
+ _v$34 !== _p$.e && (_p$.e = setProp(_el$82, "background-color", _v$34, _p$.e));
29303
+ _v$35 !== _p$.t && (_p$.t = setProp(_el$83, "flex-direction", _v$35, _p$.t));
29319
29304
  return _p$;
29320
29305
  }, {
29321
29306
  e: undefined,
29322
29307
  t: undefined
29323
29308
  });
29324
- return _el$83;
29309
+ return _el$82;
29325
29310
  })();
29326
29311
  }
29327
29312
  async function runSolidDashboard(options) {
@@ -29362,6 +29347,15 @@ var COLORS = {
29362
29347
  };
29363
29348
  var padLeft2 = (str, width) => str.padStart(width, " ");
29364
29349
  var padRight2 = (str, width) => str.padEnd(width, " ");
29350
+ var truncateText = (str, width) => {
29351
+ if (width <= 0)
29352
+ return "";
29353
+ if (str.length <= width)
29354
+ return str;
29355
+ if (width <= 3)
29356
+ return str.slice(0, width);
29357
+ return `${str.slice(0, width - 3)}...`;
29358
+ };
29365
29359
 
29366
29360
  // src/config-commands.ts
29367
29361
  import { readFile as readFile3 } from "fs/promises";
@@ -29372,7 +29366,7 @@ import { join as join6 } from "path";
29372
29366
  import { join as join5 } from "path";
29373
29367
  function getConfigPath() {
29374
29368
  const configDir = "/home/runner/.config";
29375
- return join5(configDir, "opencode-usage", "config.json");
29369
+ return join5(configDir, "opencode", "opencode-usage-config.json");
29376
29370
  }
29377
29371
 
29378
29372
  // src/config-commands.ts
@@ -29485,4 +29479,4 @@ async function main2() {
29485
29479
  var WATCH_INTERVAL_MS = 5 * 60 * 1000;
29486
29480
  main2().catch(console.error);
29487
29481
 
29488
- //# debugId=DB4C88253D44E5AC64756E2164756E21
29482
+ //# debugId=C12EF127A8F53A8064756E2164756E21