claude-rpc 0.17.1 → 0.17.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-rpc",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "Discord Rich Presence for Claude Code — live model, project, tokens, and lifetime stats driven by Claude Code's hook system.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/format.js CHANGED
@@ -448,11 +448,16 @@ export function buildVars(state, config, aggregate) {
448
448
  const usageWeeklyPct = usage?.weeklyPct ?? '';
449
449
  let usageStateLabel = '';
450
450
  if (usage) {
451
+ // The usage rotation frame's DETAILS line already shows "{usageWeeklyPct}%
452
+ // weekly", so this state line must NOT repeat weekly% — it complements with
453
+ // session% + reset day. (A weekly-only fallback lives below so the line
454
+ // isn't empty when session% is absent and we'd otherwise show nothing.)
451
455
  const bits = [];
452
456
  if (usage.sessionPct != null) bits.push(`session ${usage.sessionPct}%`);
453
- if (usage.weeklyPct != null) bits.push(`weekly ${usage.weeklyPct}%`);
454
457
  const day = fmtResetDay(usage.weeklyResetsAt);
455
458
  if (day) bits.push(`resets ${day}`);
459
+ // Only fall back to weekly% when the line would otherwise be empty.
460
+ if (!bits.length && usage.weeklyPct != null) bits.push(`weekly ${usage.weeklyPct}%`);
456
461
  usageStateLabel = bits.join(' · ');
457
462
  }
458
463
 
package/src/version.js CHANGED
@@ -11,7 +11,7 @@ import { readFileSync } from 'node:fs';
11
11
  import { join } from 'node:path';
12
12
  import { ROOT } from './paths.js';
13
13
 
14
- const BAKED = '0.17.1';
14
+ const BAKED = '0.17.2';
15
15
 
16
16
  function readPkgVersion() {
17
17
  try {