Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/copilot_usage/vscode_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


def _format_log_files_line(summary: VSCodeLogSummary) -> str:
"""Build the 'Log Files' line, surfacing unreadable or inconsistent counts."""
"""Build the 'Log Files' line, surfacing unreadable file counts."""
found = summary.log_files_found
parsed = summary.log_files_parsed
unreadable = found - parsed
Expand All @@ -27,11 +27,6 @@ def _format_log_files_line(summary: VSCodeLogSummary) -> str:
f" ({found} found, "
f"[red]{unreadable} unreadable[/red])"
)
if unreadable < 0:
return (
f"[bold]Log Files:[/bold] {parsed}"
f" ([yellow]{found} found; inconsistent counts[/yellow])"
)
return f"[bold]Log Files:[/bold] {parsed}"


Expand Down
16 changes: 0 additions & 16 deletions tests/copilot_usage/test_vscode_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,19 +431,3 @@ def test_happy_path_no_unreadable_annotation(self) -> None:
assert "Log Files: 4" in log_line
assert "unreadable" not in log_line
assert "found" not in log_line

def test_inconsistent_counts_shown_when_parsed_exceeds_found(self) -> None:
"""When parsed > found, a yellow warning about inconsistent counts appears."""
summary = _make_summary(
total_requests=10,
log_files_parsed=5,
log_files_found=3,
)
output = _capture(summary)
log_line = _strip_ansi(
next(line for line in output.splitlines() if "Log Files" in line)
)
assert "Log Files: 5" in log_line
assert "3 found" in log_line
assert "inconsistent counts" in log_line
assert "unreadable" not in log_line
Loading