@leo000001/opencode-quota-sidebar 2.0.19 → 2.0.20

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.
@@ -93,25 +93,6 @@ function parseTokenWindow(value) {
93
93
  resetAt: toIso(value.nextResetTime),
94
94
  };
95
95
  }
96
- function parseMcpWindow(value) {
97
- if (value.type !== 'TIME_LIMIT')
98
- return undefined;
99
- const total = asNumber(value.usage);
100
- const remaining = asNumber(value.remaining);
101
- if (total === undefined ||
102
- remaining === undefined ||
103
- !Number.isFinite(total) ||
104
- !Number.isFinite(remaining) ||
105
- total <= 0) {
106
- return undefined;
107
- }
108
- return {
109
- label: `MCP ${formatCountValue(remaining)}/${formatCountValue(total)}`,
110
- showPercent: false,
111
- remainingPercent: Math.max(0, Math.min(100, (remaining / total) * 100)),
112
- resetAt: toIso(value.nextResetTime),
113
- };
114
- }
115
96
  async function fetchZhipuCodingPlanQuota({ providerID, providerOptions, auth, config, }) {
116
97
  const checkedAt = Date.now();
117
98
  const base = {
@@ -186,10 +167,7 @@ async function fetchZhipuCodingPlanQuota({ providerID, providerOptions, auth, co
186
167
  const token = limits
187
168
  .map((item) => parseTokenWindow(item))
188
169
  .find((value) => Boolean(value));
189
- const mcp = limits
190
- .map((item) => parseMcpWindow(item))
191
- .find((value) => Boolean(value));
192
- const windows = [token, mcp].filter((value) => Boolean(value));
170
+ const windows = [token].filter((value) => Boolean(value));
193
171
  const primary = token || windows[0];
194
172
  return {
195
173
  ...base,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leo000001/opencode-quota-sidebar",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "OpenCode plugin that shows quota and token usage in session titles",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",