codex-rpc 1.0.0 → 1.0.1

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/codex-rpc.js +3 -2
  2. package/package.json +1 -1
package/codex-rpc.js CHANGED
@@ -432,8 +432,9 @@ class Presence {
432
432
  }
433
433
  current(now = Date.now()) {
434
434
  const age = (now - this.lastActivityTs) / 1000;
435
- if (this.lastState === 'success' && (now - this.successTs) / 1000 < this.cfg.successHoldSec) {
436
- return 'success';
435
+ if (this.lastState === 'success') {
436
+ if ((now - this.successTs) / 1000 < this.cfg.successHoldSec) return 'success';
437
+ return 'sleeping';
437
438
  }
438
439
  if (age > this.cfg.sleepAfterSec) return 'sleeping';
439
440
  if (this.lastState === 'error' && (now - this.errorTs) / 1000 < 25) return 'error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-rpc",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Discord Rich Presence for the OpenAI Codex CLI — Gaming on Codex, with cute per-state animations",
5
5
  "homepage": "https://codex-rpc.ssh.codes",
6
6
  "repository": {