dcfaf47809d79d1e65c64c051b401a1a7613bd13
根因:insert_llm_usage / insert_chat_record 因旧 iPet 遗留列 (kind/entry NOT NULL, context_token_present boolean→context_token text) 导致 INSERT 静默失败, 四个调用点 let _ = 吞掉错误。ias usage 显示 token 总量为 0。 修复: - llm_usage: 迁移 0010 ADD COLUMN IF NOT EXISTS + 条件 DROP NOT NULL, insert_llm_usage 写入 kind/entry 默认值 - chat_records: 迁移 0011 列名 context_token_present→context_token 类型转换+重命名, 迁移 0012 清理存量重复→partial UNIQUE index→恢复 ON CONFLICT - main.rs: 所有 let _ = insert_* 改为 if let Err(e) 日志输出, message_id 缺失时归为 '' 而非 '0'
Description
No description provided
Languages
Rust
99.7%
Shell
0.3%