Skip to content

Commit 24b7abe

Browse files
justiclaude
andcommitted
fix(opencode): honor --since/--until in SQLite loader and JSON scan
Push date bounds into the OpenCode loader instead of reading every DB row and JSON file on each invocation, which hangs on large installs. - SQLite: indexed `WHERE time_created` push-down with -1d/+2d slack, falling back to an unfiltered scan when the schema lacks the column (the in-loop date check still applies, so no row is silently dropped). - JSON files: extract `time.created` from the raw payload and apply the same `format_date_tz` check as the authoritative `filter_loaded_entries_by_date`, failing open to a full parse so no in-range row is ever dropped. Combines the indexed SQL push-down from #1188 with the content-based JSON extraction from #1220, per maintainer guidance. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 88246e6 commit 24b7abe

1 file changed

Lines changed: 422 additions & 8 deletions

File tree

  • rust/crates/ccusage/src/adapter/opencode

0 commit comments

Comments
 (0)