mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-26 14:35:22 +08:00
bbce75fcda
* fix(session): 修复session log模式下子Agent token统计遗漏 collect_jsonl_files() 只扫描了两层目录,遗漏了子Agent的JSONL日志文件, 导致子Agent的独立token使用数据完全未统计到session费用中。 (仅影响session log模式,proxy代理模式不受影响) * refactor(session): optimize collect_jsonl_files logic - Replace two independent if statements with if-else for mutually exclusive conditions - Remove unnecessary clone() when pushing file paths - Add clarifying comments for main session vs subagent files - Apply cargo fmt for consistent formatting Performance improvement: Eliminates redundant clone() operations when processing .jsonl files, as a path cannot be both a file and a directory. --------- Co-authored-by: Jason <farion1231@gmail.com>