@howaboua/opencode-usage-plugin 0.1.6 → 0.1.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/proxy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAgF,WAAW,EAAE,MAAM,aAAa,CAAA;AAK5H,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AA4B5C;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAoBf;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/proxy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAgF,WAAW,EAAE,MAAM,aAAa,CAAA;AAK5H,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AA4B5C;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAoBf;AA4ND,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,IAAI,CAwB7C,CAAA"}
|
|
@@ -192,15 +192,18 @@ function aggregateByProvider(provider, config) {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
if (aggregated.length > 0) {
|
|
195
|
+
const getTierGroupKey = (tier, groupName) => `${tier}::${groupName}`;
|
|
195
196
|
const resetLookup = new Map();
|
|
196
|
-
for (const tierInfo of Object.
|
|
197
|
+
for (const [tierName, tierInfo] of Object.entries(tiers)) {
|
|
197
198
|
for (const group of tierInfo.values()) {
|
|
198
|
-
|
|
199
|
+
const key = getTierGroupKey(tierName, group.name);
|
|
200
|
+
resetLookup.set(key, pickPreferredResetTime(resetLookup.get(key), group.resetTime));
|
|
199
201
|
}
|
|
200
202
|
}
|
|
201
203
|
for (const tier of aggregated) {
|
|
202
204
|
for (const group of tier.quotaGroups) {
|
|
203
|
-
|
|
205
|
+
const key = getTierGroupKey(tier.tier, group.name);
|
|
206
|
+
group.resetTime = pickPreferredResetTime(group.resetTime, resetLookup.get(key));
|
|
204
207
|
}
|
|
205
208
|
}
|
|
206
209
|
return aggregated;
|