()
| 183 | |
| 184 | |
| 185 | def status() -> dict[str, Any]: |
| 186 | enabled = is_enabled() |
| 187 | buf = _buffer_path() |
| 188 | pending = 0 |
| 189 | if buf.exists(): |
| 190 | try: |
| 191 | pending = sum(1 for line in buf.read_text().splitlines() if line.strip()) |
| 192 | except Exception: |
| 193 | pass |
| 194 | sent_log = _sent_log_path() |
| 195 | total_sent = 0 |
| 196 | if sent_log.exists(): |
| 197 | try: |
| 198 | total_sent = sum(1 for line in sent_log.read_text().splitlines() if line.strip()) |
| 199 | except Exception: |
| 200 | pass |
| 201 | return { |
| 202 | "enabled": enabled, |
| 203 | "pending_records": pending, |
| 204 | "total_sent": total_sent, |
| 205 | } |
| 206 | |
| 207 | |
| 208 | # ─── Embedding Noise ─── |
no test coverage detected