mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-22 03:00:55 +00:00
fix: destructure cost before spread so convertCost isn't overwritten in models JSON output
This commit is contained in:
parent
09139b1d92
commit
fad21f3097
1 changed files with 1 additions and 2 deletions
|
|
@ -125,8 +125,7 @@ function buildJsonReport(projects: ProjectSummary[], period: string) {
|
|||
}
|
||||
const models = Object.entries(modelMap)
|
||||
.sort(([, a], [, b]) => b.cost - a.cost)
|
||||
.map(([name, d]) => ({ name, cost: convertCost(d.cost), ...d, cost_usd: undefined }))
|
||||
.map(({ cost_usd: _, ...rest }) => rest)
|
||||
.map(([name, { cost, ...rest }]) => ({ name, ...rest, cost: convertCost(cost) }))
|
||||
|
||||
// activities
|
||||
const catMap: Record<string, { turns: number; cost: number; editTurns: number; oneShotTurns: number }> = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue