Skip to content

Add count mode to logs command - #1542

Open
lntutor wants to merge 1 commit into
simonw:mainfrom
lntutor:feat/logs-count-1071
Open

Add count mode to logs command#1542
lntutor wants to merge 1 commit into
simonw:mainfrom
lntutor:feat/logs-count-1071

Conversation

@lntutor

@lntutor lntutor commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • keep -n for limiting displayed logs and rename its long form to --limit
  • add llm logs --count using the existing query construction so all filters are respected
  • document the new mode and update generated CLI help
  • cover unfiltered, model, search, limit-independent, and tool-filtered counts

Closes #1071

Validation

  • uv run pytest tests/test_llm_logs.py -q (83 passed)
  • uv run black --check .
  • uv run ruff check .
  • targeted Cog check for docs/help.md and docs/logging.md

The full suite reached 707 passing tests; its embedding migration failures reproduce unchanged on clean upstream/main with the locally resolved sqlite-utils version (cannot commit - no transaction is active).

@lntutor
lntutor force-pushed the feat/logs-count-1071 branch from df949a4 to 5166c73 Compare July 27, 2026 15:08
@lntutor
lntutor force-pushed the feat/logs-count-1071 branch from 5166c73 to e3affe9 Compare July 30, 2026 15:57
@lntutor

lntutor commented Jul 30, 2026

Copy link
Copy Markdown
Author

Rebased onto current main and resolved the log-query conflict by adapting --count to the new unified merged_log_rows() path, so it counts both current and legacy log storage while --limit continues to affect display only. Validation: all 87 tests in tests/test_llm_logs.py pass, and Ruff reports no issues for the changed Python files.

@lntutor

lntutor commented Aug 1, 2026

Copy link
Copy Markdown
Author

Current head e3affe93742762b4c962a9bef87f87d314363e0d is mergeable, the Read the Docs preview is green, and there are no unresolved review threads on the current PR state. The July 30, 2026 rebase/verification note on this PR still matches the current head. This looks ready for maintainer review when convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llm logs --count should return a count of matching logs

1 participant