(body)
| 1096 | } |
| 1097 | |
| 1098 | function parseCodexTokenUsageLog(body) { |
| 1099 | const text = String(body || ""); |
| 1100 | const usageMatch = text.match(/total_usage_tokens=(\d+)/); |
| 1101 | if (!usageMatch) return null; |
| 1102 | const limitMatch = text.match(/auto_compact_limit=(\d+)/); |
| 1103 | return { |
| 1104 | totalTokens: Number(usageMatch[1]), |
| 1105 | modelContextWindow: limitMatch ? Number(limitMatch[1]) : null |
| 1106 | }; |
| 1107 | } |
| 1108 | |
| 1109 | async function querySqliteRows(dbPath, query) { |
| 1110 | return new Promise((resolve, reject) => { |
no outgoing calls
no test coverage detected