mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
feat: add UsageStats schema and type (#8441)
feat: add UsageStats schema and type to cloud.ts Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
9bcd9918af
commit
c8a8188f8c
1 changed files with 22 additions and 0 deletions
|
|
@ -721,3 +721,25 @@ export type LeaveResponse = {
|
|||
taskId?: string
|
||||
timestamp?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* UsageStats
|
||||
*/
|
||||
|
||||
export const usageStatsSchema = z.object({
|
||||
success: z.boolean(),
|
||||
data: z.object({
|
||||
dates: z.array(z.string()), // Array of date strings
|
||||
tasks: z.array(z.number()), // Array of task counts
|
||||
tokens: z.array(z.number()), // Array of token counts
|
||||
costs: z.array(z.number()), // Array of costs in USD
|
||||
totals: z.object({
|
||||
tasks: z.number(),
|
||||
tokens: z.number(),
|
||||
cost: z.number(), // Total cost in USD
|
||||
}),
|
||||
}),
|
||||
period: z.number(), // Period in days (e.g., 30)
|
||||
})
|
||||
|
||||
export type UsageStats = z.infer<typeof usageStatsSchema>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue