@howaboua/opencode-usage-plugin 0.1.4-dev.2 → 0.1.4

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.
@@ -55,9 +55,10 @@ export function formatMissingSnapshot(snapshot) {
55
55
  function getConfigPath() {
56
56
  const home = homedir();
57
57
  const plat = platform();
58
- if (plat === "darwin")
59
- return join(home, ".config", "opencode", "usage-config.jsonc");
60
- if (plat === "win32")
58
+ if (plat === "win32") {
61
59
  return join(process.env.APPDATA || join(home, "AppData", "Roaming"), "opencode", "usage-config.jsonc");
62
- return join(process.env.XDG_CONFIG_HOME || join(home, ".config"), "opencode", "usage-config.jsonc");
60
+ }
61
+ // For macOS, Linux, and other Unix-like systems, use XDG_CONFIG_HOME or default to ~/.config
62
+ const configHome = process.env.XDG_CONFIG_HOME || join(home, ".config");
63
+ return join(configHome, "opencode", "usage-config.jsonc");
63
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/opencode-usage-plugin",
3
- "version": "0.1.4-dev.2",
3
+ "version": "0.1.4",
4
4
  "description": "opencode plugin for tracking AI provider usage, rate limits, and quotas",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",