feat: gate model overrides and load full token history (#271)

Co-authored-by: zuolingxuan <zuolingxuan@bytedance.com>
This commit is contained in:
Lingxuan Zuo
2026-03-04 11:52:54 +08:00
committed by GitHub
Unverified
parent 3371e4fe74
commit 30b03add1c
12 changed files with 181 additions and 33 deletions

View File

@@ -1882,8 +1882,8 @@ function registerSettingsHandlers(gatewayManager: GatewayManager): void {
function registerUsageHandlers(): void {
ipcMain.handle('usage:recentTokenHistory', async (_, limit?: number) => {
const safeLimit = typeof limit === 'number' && Number.isFinite(limit)
? Math.min(Math.max(Math.floor(limit), 1), 100)
: 20;
? Math.max(Math.floor(limit), 1)
: undefined;
return await getRecentTokenUsageHistory(safeLimit);
});
}