MCPcopy Create free account
hub / github.com/StarsTom/mobileCodexHelper / tail_lines

Function tail_lines

mobile_codex_control.py:553–562  ·  view source on GitHub ↗
(file_path: Path, max_lines: int = 200)

Source from the content-addressed store, hash-verified

551
552
553def tail_lines(file_path: Path, max_lines: int = 200) -> list[str]:
554 if not file_path.exists():
555 return []
556 lines: deque[str] = deque(maxlen=max_lines)
557 with file_path.open("r", encoding="utf-8", errors="replace") as handle:
558 for line in handle:
559 stripped = line.rstrip()
560 if stripped:
561 lines.append(stripped)
562 return list(lines)
563
564
565def recent_mobile_requests(limit: int = 6) -> list[dict[str, Any]]:

Callers 2

recent_mobile_requestsFunction · 0.85
tail_error_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected