nntrivi2001
65fe680d38
fix(pricing): book daily cost to the day tokens were spent
...
token_usage holds a session's cumulative totals with no time, so
/api/pricing/cost booked a multi-day session's whole cost to its start
date and the status bar's Today read ~$0. TranscriptCache now also splits
usage by each message's UTC hour (tokensByHour); the hook writer stores it
in the new token_usage_hourly table (MAX per hour) and the server
back-fills existing sessions at start. The daily split books each total
over its hourly rows' local days and the rest to the start date, so the
days still add up to the total.
2026-10-05 08:03:05 +07:00
..
2026-09-18 16:52:05 +07:00
2026-09-29 08:18:40 +07:00
2026-10-01 13:39:17 +07:00
2026-09-29 08:25:37 +07:00
2026-10-01 10:11:43 +07:00
2026-10-01 13:39:17 +07:00
2026-09-29 08:25:37 +07:00
2026-09-29 08:25:37 +07:00
2026-10-01 13:39:17 +07:00
2026-07-30 14:39:03 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-09-07 12:09:15 +07:00
2026-09-09 10:00:05 +07:00
2026-09-09 09:36:52 +07:00
2026-09-17 22:20:32 +07:00
2026-09-23 16:46:20 +07:00
2026-09-21 15:15:22 +07:00
2026-09-17 16:16:31 +07:00
2026-09-10 16:05:07 +07:00
2026-09-17 23:17:06 +07:00
2026-09-07 08:32:19 +07:00
2026-09-07 12:09:15 +07:00
2026-10-02 01:10:58 +07:00
2026-09-09 01:29:17 +07:00
2026-09-09 01:17:06 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-09-09 08:30:45 +07:00
2026-09-29 16:09:19 +07:00
2026-09-09 08:30:45 +07:00
2026-10-02 16:18:00 +07:00
2026-09-07 12:09:15 +07:00
2026-09-21 17:03:27 +07:00
2026-08-25 09:38:09 +07:00
2026-09-25 10:44:40 +07:00
2026-09-25 10:44:40 +07:00
2026-10-01 16:03:24 +07:00
2026-10-02 13:22:29 +07:00
2026-10-01 16:03:24 +07:00
2026-10-05 08:03:05 +07:00
2026-09-28 17:49:05 +07:00
2026-09-07 12:09:15 +07:00
2026-09-07 12:09:15 +07:00
2026-10-01 16:03:24 +07:00
2026-09-24 15:49:39 +07:00
2026-09-07 12:09:15 +07:00
2026-07-30 14:39:03 +07:00
2026-09-25 17:30:28 +07:00
2026-09-18 09:44:17 +07:00
2026-09-07 12:09:15 +07:00
2026-10-01 16:03:24 +07:00
2026-09-07 12:09:15 +07:00
2026-10-01 16:03:24 +07:00
2026-10-02 01:10:58 +07:00
2026-10-01 16:03:24 +07:00
2026-10-02 14:19:02 +07:00
2026-09-07 12:09:15 +07:00
2026-10-03 16:25:42 +07:00
2026-09-28 17:49:05 +07:00
2026-09-10 16:03:07 +07:00
2026-08-04 10:03:40 +07:00
2026-07-30 14:39:03 +07:00
2026-10-01 13:39:17 +07:00
2026-09-09 01:45:00 +07:00
2026-10-01 16:33:25 +07:00
2026-10-01 16:03:24 +07:00
2026-09-25 11:30:02 +07:00
2026-10-02 18:09:31 +07:00
2026-09-21 15:15:22 +07:00
2026-07-30 14:39:03 +07:00
2026-09-07 12:09:15 +07:00
2026-10-02 14:19:02 +07:00
2026-09-09 01:45:00 +07:00
2026-07-30 14:39:03 +07:00
2026-09-07 12:09:15 +07:00
2026-07-30 14:39:03 +07:00
2026-08-18 16:04:27 +07:00
2026-09-10 13:44:28 +07:00
2026-09-25 11:23:59 +07:00
2026-10-02 13:22:29 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 08:25:37 +07:00
2026-07-30 14:39:03 +07:00
2026-08-28 10:05:24 +07:00
2026-09-29 08:18:40 +07:00
2026-07-30 14:39:03 +07:00
2026-10-05 08:03:05 +07:00
2026-10-01 10:09:12 +07:00
2026-09-07 12:09:15 +07:00
2026-09-07 12:09:15 +07:00
2026-07-30 14:39:03 +07:00
2026-10-02 13:22:29 +07:00