Skip to content

feat: track API profile per session for per-profile stats #32

@ourines

Description

@ourines

背景

Stats tab 的 per-profile 成本分组需求(原 #29)因数据层缺失被跳过。Claude session JSONL 不包含 profile 信息。

方案

在 codes 启动 session 时,记录当��� active profile name 到 session 元数据中:

  • ~/.codes/stats.jsonSessionRecord 增加 Profile 字段
  • session 启动时从 config.Default 读取当前 profile
  • Stats tab 添加 per-profile 分组视图

TODO

  • SessionRecord 增加 Profile string 字段
  • scanner 扫描时关联 profile(通过 codes session 记录或 fallback 为 "unknown")
  • DailyStat 增加 ByProfile map[string]float64
  • Stats tab 中 f 键增加 profile 视图

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions