430b796d
session: extend List response with summary, turn_count, token totals, model
Add five aggregate fields to Session struct (Summary, TurnCount, TokensInTotal, TokensOutTotal, Model) populated via a new sessionListSelectColumns const that wraps correlated subqueries. List uses the new const; Get is unchanged. TestList_Aggregates covers: zero turns, long-content truncation to 200 chars, mixed-role model tracking (newest turn wins), and NULL token sums.
Eugene Blikh <bigbes@gmail.com> — 2026-04-26 03:18:53 UTC
Commit 430b796df8a8a4c2df3761271a10115b2eeabbba —
view raw patch
Parent(s):
1af5bcbe
| File | Status | + | − |
|---|---|---|---|
internal/domain/session/repository.go
|
M | +55 | -12 |
internal/domain/session/repository_test.go
|
M | +143 |