feat(cli): add codegraph usage command to show AI balance and recent usage
Adds a `usage` subcommand that pings `/v1/usage` with the stored token and displays balance, plan, 30-day explore/token counts, and allowance reset date. Degrades quietly in all non-happy-path states — signed out, BYO endpoint, or unreachable server — so managed reasoning remaining optional doesn't change. Also extends `OffloadUsage` with the fields the endpoint already returns (`unlimited`, `banned`, `tokensLast30`, `callsLast30`, `creditsLast30`) that were previously untyped.
This commit is contained in:
@@ -47,6 +47,11 @@ export interface OffloadUsage {
|
||||
overage?: number;
|
||||
remaining?: number;
|
||||
periodEnd?: number;
|
||||
unlimited?: boolean;
|
||||
banned?: boolean;
|
||||
tokensLast30?: number;
|
||||
callsLast30?: number;
|
||||
creditsLast30?: number;
|
||||
models?: string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user