@leo000001/opencode-quota-sidebar 1.13.0 → 1.13.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.
@@ -30,11 +30,8 @@ export function createQuotaService(deps) {
30
30
  : client.provider.list({
31
31
  query: { directory: deps.directory },
32
32
  throwOnError: true,
33
- }))
34
- .catch(swallow('getProviderOptionsMap'));
35
- const data = isRecord(response) && isRecord(response.data)
36
- ? response.data
37
- : undefined;
33
+ })).catch(swallow('getProviderOptionsMap'));
34
+ const data = isRecord(response) && isRecord(response.data) ? response.data : undefined;
38
35
  const list = Array.isArray(data?.providers)
39
36
  ? data.providers
40
37
  : Array.isArray(data?.all)
@@ -66,7 +63,9 @@ export function createQuotaService(deps) {
66
63
  const isValidQuotaCache = (snapshot) => {
67
64
  // Guard against stale RightCode cache entries from pre-daily format.
68
65
  if (snapshot.adapterID !== 'rightcode' || snapshot.status !== 'ok')
69
- return true;
66
+ return !(snapshot.adapterID === 'anthropic' &&
67
+ snapshot.status === 'unsupported' &&
68
+ snapshot.note === 'oauth quota endpoint is not publicly documented');
70
69
  if (!snapshot.windows || snapshot.windows.length === 0)
71
70
  return true;
72
71
  const primary = snapshot.windows[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leo000001/opencode-quota-sidebar",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "OpenCode plugin that shows quota and token usage in session titles",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",