feat(panel): add experimental quota reservation estimator, violet bar indicator, and clipboard log export

This commit is contained in:
fish
2026-11-22 18:34:58 +09:00
parent 95a3c0c355
commit 4d6d676e56
26 changed files with 2128 additions and 86 deletions
@@ -45,6 +45,7 @@ import {
} from './model-pricing.mjs';
import { getCloudStatus, getPricingPhaseEpoch, pricingCatalogRevision } from './pricing-catalog.mjs';
import { buildOfficialQuotaPools } from './quota-pools.mjs';
import { updatePoolQuotaReservationEstimates } from './quota-reservation.mjs';
import { getDefaultWindowBridgeStatus } from './window-bridge.mjs';
import {
aggregateConsumptionPresetBundle,
@@ -1684,6 +1685,15 @@ export async function buildTelemetryPayloadInternal(
poolObj.cycleWeekly = pStats?.cycleWeekly || createEmptyCycleSummary();
}
updatePoolQuotaReservationEstimates({
endpointId,
accountScope: accountScope || '',
quotaPoolsMap,
poolCycleStats,
quotaFetchedAtMs: officialQuotaInfo?.fetchedAtMs || 0,
nowMs: Date.now(),
});
// 6. 组装当前活跃配额池与每周限额视图数据
const { activePoolQuota, weeklyQuota } = buildActivePoolAndWeeklyQuotas({
activePoolKey,