feat: gate model overrides and load full token history (#271)
Co-authored-by: zuolingxuan <zuolingxuan@bytedance.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
3371e4fe74
commit
30b03add1c
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user