hyperhive/frontend/packages/agent/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 8db8bd610f feat(stats): surface first-turn ctx tokens on the per-agent stats page
Builds the read/surface half of the per-session first-turn-tokens metric
(the capture — sessions table + turn_stats.session_id — landed separately).
A fresh claude session's first turn pays the full static prefix (system
prompt + tools + CLAUDE.md + first wake) as uncached input, so its
input_tokens is a clean proxy for prompt / CLAUDE.md sprawl — watching it
over time surfaces creep.

- stats.rs: add `Snapshot.first_turn_ctx: Option<u64>` populated by
  `read_first_turn_ctx` — the agreed per-session derive (first turn,
  `ORDER BY started_at LIMIT 1`, of the most recent session that started
  in the window). Inert-until-capture: `.ok()` maps both "no fresh
  session yet" and "older db without the sessions table" to None, the
  same decoupling as read_bash_breakdown; the field is skipped from the
  JSON when None. Pre-capture rows have a NULL session_id and are excluded.
- agent stats.js: add a "first-turn ctx" summary chip, guarded on a
  numeric value so it stays hidden until capture has data.

clippy + cargo fmt clean; agent bundle builds.
2026-06-10 20:37:35 +02:00
..
agent.css feat(frontend): per-agent effort-level quick-picker (#1596) 2026-06-10 01:34:21 +02:00
app.js feat(agent-ui): show turn start/end times + duration on the agent terminal 2026-06-10 14:36:54 +02:00
colors.css refactor(frontend): base16 theme contract in a swappable colors.css 2026-06-08 21:24:07 +02:00
index.html feat(frontend): per-agent effort-level quick-picker (#1596) 2026-06-10 01:34:21 +02:00
screen.html refactor(frontend): base16 theme contract in a swappable colors.css 2026-06-08 21:24:07 +02:00
stats.html refactor(frontend): migrate agent stat-window selector to createTabStrip (#1464 step 1) 2026-06-08 22:41:54 +02:00
stats.js feat(stats): surface first-turn ctx tokens on the per-agent stats page 2026-06-10 20:37:35 +02:00
theme.css refactor(frontend): base16 theme contract in a swappable colors.css 2026-06-08 21:24:07 +02:00