@rizal72/oc-models-pro 0.1.4 → 0.1.5

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/bench.ts CHANGED
@@ -18,7 +18,8 @@ import { dirname, join } from "node:path"
18
18
 
19
19
  export const CATALOG = "https://catalog.stencil.so/models.json"
20
20
 
21
- const CACHE = join(homedir(), ".cache", "oc-models-pro", "bench.json")
21
+ const CACHE_DIR = process.env.XDG_CACHE_HOME || join(homedir(), ".cache")
22
+ const CACHE = join(CACHE_DIR, "oc-models-pro", "bench.json")
22
23
  const GRACE_MS = 6 * 60 * 60 * 1000
23
24
 
24
25
  export interface Bench {
package/multipliers.ts CHANGED
@@ -54,7 +54,8 @@ export interface Credits {
54
54
  peak?: number
55
55
  }
56
56
 
57
- const CACHE = join(homedir(), ".cache", "oc-models-pro", "go-limits.json")
57
+ const CACHE_DIR = process.env.XDG_CACHE_HOME || join(homedir(), ".cache")
58
+ const CACHE = join(CACHE_DIR, "oc-models-pro", "go-limits.json")
58
59
 
59
60
  function text(html: string): string {
60
61
  return html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizal72/oc-models-pro",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "OpenCode v2 model picker with prices, context, intelligence, Go credit and the cost of a request",
6
6
  "repository": {