Commit Graph

3 Commits

Author SHA1 Message Date
YoVinchen 1efa41082c feat(frontend): update usage types and API for pagination support
Types (usage.ts):
- Add isStreaming, firstTokenMs, durationMs to RequestLog
- Add PaginatedLogs interface with data, total, page, pageSize
- Change LogFilters: providerId -> appType + providerName

API (usage.ts):
- Change getRequestLogs params from limit/offset to page/pageSize
- Return PaginatedLogs instead of RequestLog[]
- Pass filters object directly to backend

Query (usage.ts):
- Update usageKeys.logs key generation for pagination
- Update useRequestLogs hook signature
2025-12-03 21:54:02 +08:00
YoVinchen 38e8949152 feat(api): add frontend usage API and query hooks
Add TypeScript types for usage statistics.
Implement usage API with Tauri invoke calls.
Add TanStack Query hooks for usage data fetching.
2025-12-03 00:21:29 +08:00
YoVinchen c0122d717c feat(db): add usage tracking schema and types
Add database tables for proxy request logs and model pricing.
Extend Provider and error types to support usage statistics.
2025-12-03 00:16:40 +08:00