forked from Rockachopa/Timmy-time-dashboard
This commit is contained in:
@@ -630,7 +630,7 @@ class ThinkingEngine:
|
||||
|
||||
if new_corr:
|
||||
# Count entries (assuming each entry starts with a timestamp or header)
|
||||
line_count = len([l for l in new_corr.splitlines() if l.strip()])
|
||||
line_count = len([line for line in new_corr.splitlines() if line.strip()])
|
||||
parts.append(
|
||||
f"Workspace: {line_count} new correspondence entries (latest from: Hermes)"
|
||||
)
|
||||
@@ -854,10 +854,12 @@ class ThinkingEngine:
|
||||
|
||||
if new_corr or new_inbox:
|
||||
if new_corr:
|
||||
line_count = len([l for l in new_corr.splitlines() if l.strip()])
|
||||
line_count = len([line for line in new_corr.splitlines() if line.strip()])
|
||||
logger.info("Workspace: processed %d new correspondence entries", line_count)
|
||||
if new_inbox:
|
||||
logger.info("Workspace: processed %d new inbox files: %s", len(new_inbox), new_inbox)
|
||||
logger.info(
|
||||
"Workspace: processed %d new inbox files: %s", len(new_inbox), new_inbox
|
||||
)
|
||||
|
||||
# Mark as seen to update the state file
|
||||
workspace_monitor.mark_seen()
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
"""Tests for timmy.workspace — Workspace heartbeat monitoring."""
|
||||
|
||||
import pytest
|
||||
|
||||
from timmy.workspace import WorkspaceMonitor
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Helpers
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -13,9 +10,9 @@ from timmy.workspace import WorkspaceMonitor
|
||||
def _make_monitor(tmp_path, monkeypatch):
|
||||
"""Create a WorkspaceMonitor with tmp_path as the repo_root."""
|
||||
# Mock repo_root to use tmp_path
|
||||
monkeypatch.setattr("timmy.workspace.settings", type("obj", (object,), {
|
||||
"repo_root": str(tmp_path)
|
||||
})())
|
||||
monkeypatch.setattr(
|
||||
"timmy.workspace.settings", type("obj", (object,), {"repo_root": str(tmp_path)})()
|
||||
)
|
||||
|
||||
state_path = tmp_path / "workspace_state.json"
|
||||
return WorkspaceMonitor(state_path=state_path)
|
||||
|
||||
Reference in New Issue
Block a user