Skip to content

The open source coding agent.

TypeScript

wip: zen

Frank790baec41fb6
diff --git a/packages/console/app/src/routes/zen/util/handler.ts b/packages/console/app/src/routes/zen/util/handler.ts
index d64922e7358..56efe451ca1 100644
--- a/packages/console/app/src/routes/zen/util/handler.ts
+++ b/packages/console/app/src/routes/zen/util/handler.ts
@@ -676,7 +676,12 @@ export async function handler(
ELSE ${cost}
END
`,
- timeRollingUpdated: sql`now()`,
+ timeRollingUpdated: sql`
+ CASE
+ WHEN UNIX_TIMESTAMP(${SubscriptionTable.timeRollingUpdated}) >= UNIX_TIMESTAMP(now()) - ${rollingWindowSeconds} THEN ${SubscriptionTable.timeRollingUpdated}
+ ELSE now()
+ END
+ `,
})
.where(
and(