mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
0396cd5491
collect_jsonl_files only walked <project>/<session>/subagents/*.jsonl, so it missed Workflow sub-agent transcripts which live one level deeper at subagents/workflows/wf_*/agent-*.jsonl. As a result all Workflow token usage was invisible to the no-proxy session-log accounting. Descend into subagents/workflows/wf_*/ as well, via a new push_jsonl_children helper that keeps the fixed-depth, no-recursion design. journal.jsonl carries no assistant rows so it is skipped at parse time and needs no filename special-casing. Existing dedup (request_id PK + INSERT OR IGNORE + should_skip_session_insert) keeps the next sync's backfill idempotent. Add test_collect_jsonl_files_includes_workflow_subagents.